From 17591589c97fd5fbe80991ac39c197370f370226 Mon Sep 17 00:00:00 2001 From: jmanucornejo Date: Wed, 8 May 2024 20:20:17 -0500 Subject: [PATCH 1/3] Remove usage charge from ActivateUsageCharge.php Removed deprecated field billing_on for usage charges --- src/Actions/ActivateUsageCharge.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Actions/ActivateUsageCharge.php b/src/Actions/ActivateUsageCharge.php index 6408adb8..4caa73f5 100644 --- a/src/Actions/ActivateUsageCharge.php +++ b/src/Actions/ActivateUsageCharge.php @@ -94,7 +94,6 @@ public function __invoke(ShopId $shopId, UsageChargeDetailsTransfer $ucd) $uct->shopId = $shopId; $uct->planId = $shop->plan->getId(); $uct->chargeReference = ChargeReference::fromNative((int) $response['id']); - $uct->billingOn = new Carbon($response['billing_on']); $uct->details = $ucd; // Save the usage charge From c68ae682e7138f6a72ea255cff09e73bb32333ca Mon Sep 17 00:00:00 2001 From: jmanucornejo Date: Wed, 8 May 2024 20:21:45 -0500 Subject: [PATCH 2/3] Remove billing_on for usagecharges in Charge.php Remove billing_on for usagecharges in Charge.php because it is deprecated --- src/Storage/Commands/Charge.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Storage/Commands/Charge.php b/src/Storage/Commands/Charge.php index 18c23a3f..c6dd4105 100644 --- a/src/Storage/Commands/Charge.php +++ b/src/Storage/Commands/Charge.php @@ -99,7 +99,6 @@ public function makeUsage(UsageChargeTransfer $chargeObj): ChargeId $charge->charge_id = $chargeObj->chargeReference->toNative(); $charge->type = $chargeObj->chargeType->toNative(); $charge->status = $chargeObj->chargeStatus->toNative(); - $charge->billing_on = $chargeObj->billingOn->format('Y-m-d'); $charge->price = $chargeObj->details->price; $charge->description = $chargeObj->details->description; $charge->reference_charge = $chargeObj->details->chargeReference->toNative(); From 05149cd5f6dfd7de5c037f5d819ec680378df839 Mon Sep 17 00:00:00 2001 From: jmanucornejo Date: Tue, 21 May 2024 09:06:33 -0500 Subject: [PATCH 3/3] Update ActivateUsageCharge.php Remove Carbon to fix linter issues --- src/Actions/ActivateUsageCharge.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Actions/ActivateUsageCharge.php b/src/Actions/ActivateUsageCharge.php index 4caa73f5..adbcbc04 100644 --- a/src/Actions/ActivateUsageCharge.php +++ b/src/Actions/ActivateUsageCharge.php @@ -2,7 +2,6 @@ namespace Osiset\ShopifyApp\Actions; -use Illuminate\Support\Carbon; use Osiset\ShopifyApp\Contracts\Commands\Charge as IChargeCommand; use Osiset\ShopifyApp\Contracts\Queries\Shop as IShopQuery; use Osiset\ShopifyApp\Exceptions\ChargeNotRecurringException;