FIX: Remove toku concept in database
This commit is contained in:
@ -252,9 +252,9 @@ class Toku extends Ideal\Service
|
|||||||
{
|
{
|
||||||
$output = [];
|
$output = [];
|
||||||
try {
|
try {
|
||||||
$output['invoice'] = $this->invoice->reset($skips['invoice'] ?? []);
|
|
||||||
$output['subscription'] = $this->subscription->reset($skips['subscription'] ?? []);
|
|
||||||
$output['customer'] = $this->customer->reset($skips['customer'] ?? []);
|
$output['customer'] = $this->customer->reset($skips['customer'] ?? []);
|
||||||
|
$output['subscription'] = $this->subscription->reset($skips['subscription'] ?? []);
|
||||||
|
$output['invoice'] = $this->invoice->reset($skips['invoice'] ?? []);
|
||||||
} catch (InvalidResult $exception) {
|
} catch (InvalidResult $exception) {
|
||||||
$this->logger->warning($exception);
|
$this->logger->warning($exception);
|
||||||
return [];
|
return [];
|
||||||
|
@ -58,6 +58,7 @@ class Customer extends AbstractEndPoint
|
|||||||
foreach ($customers as $customer) {
|
foreach ($customers as $customer) {
|
||||||
try {
|
try {
|
||||||
$this->delete($customer->toku_id);
|
$this->delete($customer->toku_id);
|
||||||
|
$this->customerRepository->remove($customer);
|
||||||
} catch (EmptyResponse $exception) {
|
} catch (EmptyResponse $exception) {
|
||||||
$this->logger->warning($exception, ['customer' => $customer]);
|
$this->logger->warning($exception, ['customer' => $customer]);
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,7 @@ class Invoice extends AbstractEndPoint
|
|||||||
foreach ($invoices as $invoice) {
|
foreach ($invoices as $invoice) {
|
||||||
try {
|
try {
|
||||||
$this->delete($invoice->toku_id);
|
$this->delete($invoice->toku_id);
|
||||||
|
$this->invoiceRepository->remove($invoice);
|
||||||
} catch (EmptyResponse $exception) {
|
} catch (EmptyResponse $exception) {
|
||||||
$this->logger->warning($exception, ['invoice' => $invoice]);
|
$this->logger->warning($exception, ['invoice' => $invoice]);
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,7 @@ class Subscription extends AbstractEndPoint
|
|||||||
foreach ($subscriptions as $subscription) {
|
foreach ($subscriptions as $subscription) {
|
||||||
try {
|
try {
|
||||||
$this->delete($subscription->toku_id);
|
$this->delete($subscription->toku_id);
|
||||||
|
$this->subscriptionRepsitory->remove($subscription);
|
||||||
} catch (EmptyResponse $exception) {
|
} catch (EmptyResponse $exception) {
|
||||||
$this->logger->warning($exception, ['subscription' => $subscription]);
|
$this->logger->warning($exception, ['subscription' => $subscription]);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user