From d6438c79198c07e5ddf82839300de4d88f4471d8 Mon Sep 17 00:00:00 2001 From: tarikkamat Date: Mon, 16 Sep 2024 13:08:48 +0300 Subject: [PATCH] getHttpHeadersV2 to getHttpHeadersIsV2 --- .../Model/Iyzilink/IyziLinkDeleteProduct.php | 2 +- src/Iyzipay/Model/ReportingPaymentDetail.php | 4 ++-- src/Iyzipay/Model/Subscription/RetrieveList.php | 16 ++++++++-------- .../Model/Subscription/SubscriptionProduct.php | 12 ++++++------ src/Iyzipay/Model/UCSInitialize.php | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Iyzipay/Model/Iyzilink/IyziLinkDeleteProduct.php b/src/Iyzipay/Model/Iyzilink/IyziLinkDeleteProduct.php index 66f00795..4464a74b 100644 --- a/src/Iyzipay/Model/Iyzilink/IyziLinkDeleteProduct.php +++ b/src/Iyzipay/Model/Iyzilink/IyziLinkDeleteProduct.php @@ -13,7 +13,7 @@ class IyziLinkDeleteProduct extends IyziLinkDeleteProductResource public static function create(Request $request, Options $options, $token) { $uri = $options->getBaseUrl() . "/v2/iyzilink/products/" . $token . RequestStringBuilder::requestToStringQuery($request, null); - $rawResult = parent::httpClient()->delete($uri, parent::getHttpHeadersV2($uri, null, $options)); + $rawResult = parent::httpClient()->delete($uri, parent::getHttpHeadersIsV2($uri, null, $options)); return IyziLinkDeleteProductMapper::create($rawResult)->jsonDecode()->mapIyziLinkDeleteProduct(new IyziLinkDeleteProduct()); } } \ No newline at end of file diff --git a/src/Iyzipay/Model/ReportingPaymentDetail.php b/src/Iyzipay/Model/ReportingPaymentDetail.php index 23de8784..2fa2ca4a 100644 --- a/src/Iyzipay/Model/ReportingPaymentDetail.php +++ b/src/Iyzipay/Model/ReportingPaymentDetail.php @@ -12,8 +12,8 @@ class ReportingPaymentDetail extends ReportingPaymentDetailResource public static function create(ReportingPaymentDetailRequest $request, Options $options) { $uri = $options->getBaseUrl() . "/v2/reporting/payment/details" . RequestStringBuilder::requestToStringQuery($request, 'reporting'); - $rawResult = parent::httpClient()->getV2($uri, parent::getHttpHeadersV2($uri, null, $options)); + $rawResult = parent::httpClient()->getV2($uri, parent::getHttpHeadersIsV2($uri, null, $options)); return ReportingPaymentDetailMapper::create($rawResult)->jsonDecode()->mapReportingPaymentDetail(new ReportingPaymentDetail()); - } + } } \ No newline at end of file diff --git a/src/Iyzipay/Model/Subscription/RetrieveList.php b/src/Iyzipay/Model/Subscription/RetrieveList.php index af9f871b..ce592874 100644 --- a/src/Iyzipay/Model/Subscription/RetrieveList.php +++ b/src/Iyzipay/Model/Subscription/RetrieveList.php @@ -22,30 +22,30 @@ class RetrieveList extends IyzipayResource public static function products(SubscriptionListProductsRequest $request, Options $options) { - $uri = $options->getBaseUrl() . "/v2/subscription/products".RequestStringBuilder::requestToStringQuery($request, 'subscriptionItems'); - $rawResult = parent::httpClient()->getV2($uri, parent::getHttpHeadersV2($uri, null, $options), $request->toJsonString()); + $uri = $options->getBaseUrl() . "/v2/subscription/products" . RequestStringBuilder::requestToStringQuery($request, 'subscriptionItems'); + $rawResult = parent::httpClient()->getV2($uri, parent::getHttpHeadersIsV2($uri, null, $options), $request->toJsonString()); return RetrieveListMapper::create($rawResult)->jsonDecode()->mapRetrieveList(new RetrieveList()); } public static function pricingPlan(SubscriptionListPricingPlanRequest $request, Options $options) { - $uri = $options->getBaseUrl() . "/v2/subscription/products/".$request->getProductReferenceCode()."/pricing-plans".RequestStringBuilder::requestToStringQuery($request, 'subscriptionItems'); - $rawResult = parent::httpClient()->getV2($uri, parent::getHttpHeadersV2($uri, null, $options), $request->toJsonString()); + $uri = $options->getBaseUrl() . "/v2/subscription/products/" . $request->getProductReferenceCode() . "/pricing-plans" . RequestStringBuilder::requestToStringQuery($request, 'subscriptionItems'); + $rawResult = parent::httpClient()->getV2($uri, parent::getHttpHeadersIsV2($uri, null, $options), $request->toJsonString()); return RetrieveListMapper::create($rawResult)->jsonDecode()->mapRetrieveList(new RetrieveList()); } public static function customers(SubscriptionListCustomersRequest $request, Options $options) { - $uri = $options->getBaseUrl() . "/v2/subscription/customers".RequestStringBuilder::requestToStringQuery($request, 'subscriptionItems'); - $rawResult = parent::httpClient()->getV2($uri, parent::getHttpHeadersV2($uri, null, $options), $request->toJsonString()); + $uri = $options->getBaseUrl() . "/v2/subscription/customers" . RequestStringBuilder::requestToStringQuery($request, 'subscriptionItems'); + $rawResult = parent::httpClient()->getV2($uri, parent::getHttpHeadersIsV2($uri, null, $options), $request->toJsonString()); return RetrieveListMapper::create($rawResult)->jsonDecode()->mapRetrieveList(new RetrieveList()); } public static function subscriptions(SubscriptionSearchRequest $request, Options $options) { - $uri = $options->getBaseUrl() . "/v2/subscription/subscriptions".RequestStringBuilder::requestToStringQuery($request, 'searchSubscription'); - $rawResult = parent::httpClient()->getV2($uri, parent::getHttpHeadersV2($uri, null, $options), $request->toJsonString()); + $uri = $options->getBaseUrl() . "/v2/subscription/subscriptions" . RequestStringBuilder::requestToStringQuery($request, 'searchSubscription'); + $rawResult = parent::httpClient()->getV2($uri, parent::getHttpHeadersIsV2($uri, null, $options), $request->toJsonString()); return RetrieveListMapper::create($rawResult)->jsonDecode()->mapRetrieveList(new RetrieveList()); } diff --git a/src/Iyzipay/Model/Subscription/SubscriptionProduct.php b/src/Iyzipay/Model/Subscription/SubscriptionProduct.php index 546b0b44..63fc2e6f 100644 --- a/src/Iyzipay/Model/Subscription/SubscriptionProduct.php +++ b/src/Iyzipay/Model/Subscription/SubscriptionProduct.php @@ -24,27 +24,27 @@ class SubscriptionProduct extends IyzipayResource public static function create(SubscriptionCreateProductRequest $request, Options $options) { $uri = $options->getBaseUrl() . "/v2/subscription/products"; - $rawResult = parent::httpClient()->post($uri, parent::getHttpHeadersV2($uri, $request, $options), $request->toJsonString()); + $rawResult = parent::httpClient()->post($uri, parent::getHttpHeadersIsV2($uri, $request, $options), $request->toJsonString()); return SubscriptionProductMapper::create($rawResult)->jsonDecode()->mapSubscriptionProduct(new SubscriptionProduct()); } public static function retrieve(SubscriptionRetrieveProductRequest $request, $options) { - $uri = $options->getBaseUrl() . "/v2/subscription/products/".$request->getProductReferenceCode().RequestStringBuilder::requestToStringQuery($request, 'defaultParams'); - $rawResult = parent::httpClient()->getV2($uri, parent::getHttpHeadersV2($uri, null, $options), $request->toJsonString()); + $uri = $options->getBaseUrl() . "/v2/subscription/products/" . $request->getProductReferenceCode() . RequestStringBuilder::requestToStringQuery($request, 'defaultParams'); + $rawResult = parent::httpClient()->getV2($uri, parent::getHttpHeadersIsV2($uri, null, $options), $request->toJsonString()); return SubscriptionProductMapper::create($rawResult)->jsonDecode()->mapSubscriptionProduct(new SubscriptionProduct()); } public static function update(SubscriptionUpdateProductRequest $request, $options) { - $uri = $options->getBaseUrl() . "/v2/subscription/products/".$request->getProductReferenceCode(); - $rawResult = parent::httpClient()->post($uri, parent::getHttpHeadersV2($uri, $request, $options), $request->toJsonString()); + $uri = $options->getBaseUrl() . "/v2/subscription/products/" . $request->getProductReferenceCode(); + $rawResult = parent::httpClient()->post($uri, parent::getHttpHeadersIsV2($uri, $request, $options), $request->toJsonString()); return SubscriptionProductMapper::create($rawResult)->jsonDecode()->mapSubscriptionProduct(new SubscriptionProduct()); } public static function delete(SubscriptionDeleteProductRequest $request, $options) { - $uri = $options->getBaseUrl() . "/v2/subscription/products/".$request->getProductReferenceCode().RequestStringBuilder::requestToStringQuery($request, 'defaultParams'); + $uri = $options->getBaseUrl() . "/v2/subscription/products/" . $request->getProductReferenceCode() . RequestStringBuilder::requestToStringQuery($request, 'defaultParams'); $rawResult = parent::httpClient()->delete($uri, parent::getHttpHeadersV2($uri, $request, $options), $request->toJsonString()); return SubscriptionProductMapper::create($rawResult)->jsonDecode()->mapSubscriptionProduct(new SubscriptionProduct()); } diff --git a/src/Iyzipay/Model/UCSInitialize.php b/src/Iyzipay/Model/UCSInitialize.php index 00c65f8c..12928f43 100644 --- a/src/Iyzipay/Model/UCSInitialize.php +++ b/src/Iyzipay/Model/UCSInitialize.php @@ -11,7 +11,7 @@ class UCSInitialize extends UCSInitializeResource public static function create(UCSInitializeRequest $request, Options $options) { $uri = $options->getBaseUrl() . "/v2/ucs/init"; - $rawResult = parent::httpClient()->post($uri, parent::getHttpHeadersV2($uri, $request, $options), $request->toJsonString()); + $rawResult = parent::httpClient()->post($uri, parent::getHttpHeadersIsV2($uri, $request, $options), $request->toJsonString()); return UCSInitializeMapper::create($rawResult)->jsonDecode()->mapUCSInitialize(new UCSInitialize()); } } \ No newline at end of file