Skip to content

Commit

Permalink
getHttpHeadersV2 to getHttpHeadersIsV2
Browse files Browse the repository at this point in the history
  • Loading branch information
tarikkamat committed Sep 16, 2024
1 parent 4e25be6 commit d6438c7
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/Iyzipay/Model/Iyzilink/IyziLinkDeleteProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
4 changes: 2 additions & 2 deletions src/Iyzipay/Model/ReportingPaymentDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());

}
}
}
16 changes: 8 additions & 8 deletions src/Iyzipay/Model/Subscription/RetrieveList.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down
12 changes: 6 additions & 6 deletions src/Iyzipay/Model/Subscription/SubscriptionProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
2 changes: 1 addition & 1 deletion src/Iyzipay/Model/UCSInitialize.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

0 comments on commit d6438c7

Please sign in to comment.