Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## Unreleased

## v5.1.0 - 2023-07-11

- [#285](https://github.com/Shopify/shopify-api-php/pull/285) [Minor] Adding support for 2023-07 API version

## v5.0.0 - 2023-05-10

- [#269](https://github.com/Shopify/shopify-api-php/pull/269) [bugfix] Refactored query string building to account for Shopify-specific array format
Expand Down
5 changes: 4 additions & 1 deletion src/ApiVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class ApiVersion
/** @var string */
public const APRIL_2023 = "2023-04";
/** @var string */
public const LATEST = self::APRIL_2023;
public const JULY_2023 = "2023-07";
/** @var string */
public const LATEST = self::JULY_2023;

private static $ALL_VERSIONS = [
self::UNSTABLE,
Expand All @@ -28,6 +30,7 @@ class ApiVersion
self::OCTOBER_2022,
self::JANUARY_2023,
self::APRIL_2023,
self::JULY_2023,
];

public static function isValid(string $version): bool
Expand Down
4 changes: 1 addition & 3 deletions src/Rest/Admin2022_04/FulfillmentOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ public function close(

/**
* @param mixed[] $params Allowed indexes:
* reason,
* reason_notes,
* notify_merchant
* fulfillment_hold
* @param array|string $body
*
* @return array|null
Expand Down
2 changes: 1 addition & 1 deletion src/Rest/Admin2022_04/Shop.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
* @property string|null $shop_owner
* @property string|null $source
* @property string|null $tax_shipping
* @property string|null $taxes_included
* @property bool|null $taxes_included
* @property string|null $timezone
* @property bool|null $transactional_sms_disabled
* @property string|null $updated_at
Expand Down
4 changes: 1 addition & 3 deletions src/Rest/Admin2022_07/FulfillmentOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,7 @@ public function close(

/**
* @param mixed[] $params Allowed indexes:
* reason,
* reason_notes,
* notify_merchant
* fulfillment_hold
* @param array|string $body
*
* @return array|null
Expand Down
2 changes: 1 addition & 1 deletion src/Rest/Admin2022_07/Shop.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
* @property string|null $shop_owner
* @property string|null $source
* @property string|null $tax_shipping
* @property string|null $taxes_included
* @property bool|null $taxes_included
* @property string|null $timezone
* @property bool|null $transactional_sms_disabled
* @property string|null $updated_at
Expand Down
4 changes: 1 addition & 3 deletions src/Rest/Admin2022_10/FulfillmentOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,7 @@ public function close(

/**
* @param mixed[] $params Allowed indexes:
* reason,
* reason_notes,
* notify_merchant
* fulfillment_hold
* @param array|string $body
*
* @return array|null
Expand Down
2 changes: 1 addition & 1 deletion src/Rest/Admin2022_10/Shop.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
* @property string|null $shop_owner
* @property string|null $source
* @property string|null $tax_shipping
* @property string|null $taxes_included
* @property bool|null $taxes_included
* @property string|null $timezone
* @property bool|null $transactional_sms_disabled
* @property string|null $updated_at
Expand Down
4 changes: 1 addition & 3 deletions src/Rest/Admin2023_01/FulfillmentOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ public function close(

/**
* @param mixed[] $params Allowed indexes:
* reason,
* reason_notes,
* notify_merchant
* fulfillment_hold
* @param array|string $body
*
* @return array|null
Expand Down
2 changes: 1 addition & 1 deletion src/Rest/Admin2023_01/Shop.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
* @property string|null $shop_owner
* @property string|null $source
* @property string|null $tax_shipping
* @property string|null $taxes_included
* @property bool|null $taxes_included
* @property string|null $timezone
* @property bool|null $transactional_sms_disabled
* @property string|null $updated_at
Expand Down
2 changes: 1 addition & 1 deletion src/Rest/Admin2023_04/Shop.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
* @property string|null $shop_owner
* @property string|null $source
* @property string|null $tax_shipping
* @property string|null $taxes_included
* @property bool|null $taxes_included
* @property string|null $timezone
* @property bool|null $transactional_sms_disabled
* @property string|null $updated_at
Expand Down
101 changes: 101 additions & 0 deletions src/Rest/Admin2023_07/AbandonedCheckout.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?php

/***********************************************************************************************************************
* This file is auto-generated. If you have an issue, please create a GitHub issue. *
***********************************************************************************************************************/

declare(strict_types=1);

namespace Shopify\Rest\Admin2023_07;

use Shopify\Auth\Session;
use Shopify\Rest\Base;

/**
* @property string|null $abandoned_checkout_url
* @property array|null $billing_address
* @property bool|null $buyer_accepts_marketing
* @property bool|null $buyer_accepts_sms_marketing
* @property string|null $cart_token
* @property string|null $closed_at
* @property string|null $completed_at
* @property string|null $created_at
* @property Currency|null $currency
* @property Customer|null $customer
* @property string|null $customer_locale
* @property int|null $device_id
* @property DiscountCode[]|null $discount_codes
* @property string|null $email
* @property string|null $gateway
* @property int|null $id
* @property string|null $landing_site
* @property array|null $line_items
* @property int|null $location_id
* @property string|null $note
* @property string|null $phone
* @property string|null $presentment_currency
* @property string|null $referring_site
* @property array|null $shipping_address
* @property array|null $shipping_lines
* @property string|null $sms_marketing_phone
* @property string|null $source_name
* @property string|null $subtotal_price
* @property array|null $tax_lines
* @property bool|null $taxes_included
* @property string|null $token
* @property string|null $total_discounts
* @property string|null $total_duties
* @property string|null $total_line_items_price
* @property string|null $total_price
* @property string|null $total_tax
* @property int|null $total_weight
* @property string|null $updated_at
* @property int|null $user_id
*/
class AbandonedCheckout extends Base
{
public static string $API_VERSION = "2023-07";
protected static array $HAS_ONE = [
"currency" => Currency::class,
"customer" => Customer::class
];
protected static array $HAS_MANY = [
"discount_codes" => DiscountCode::class
];
protected static array $PATHS = [
["http_method" => "get", "operation" => "checkouts", "ids" => [], "path" => "checkouts.json"],
["http_method" => "get", "operation" => "checkouts", "ids" => [], "path" => "checkouts.json"]
];

/**
* @param Session $session
* @param array $urlIds
* @param mixed[] $params Allowed indexes:
* since_id,
* created_at_min,
* created_at_max,
* updated_at_min,
* updated_at_max,
* status,
* limit
*
* @return array|null
*/
public static function checkouts(
Session $session,
array $urlIds = [],
array $params = []
): ?array {
$response = parent::request(
"get",
"checkouts",
$session,
[],
$params,
[],
);

return $response->getDecodedBody();
}

}
47 changes: 47 additions & 0 deletions src/Rest/Admin2023_07/AccessScope.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php

/***********************************************************************************************************************
* This file is auto-generated. If you have an issue, please create a GitHub issue. *
***********************************************************************************************************************/

declare(strict_types=1);

namespace Shopify\Rest\Admin2023_07;

use Shopify\Auth\Session;
use Shopify\Rest\Base;

/**
* @property string $handle
* @property array[]|null $access_scopes
*/
class AccessScope extends Base
{
public static string $API_VERSION = "2023-07";
protected static array $HAS_ONE = [];
protected static array $HAS_MANY = [];
protected static ?string $CUSTOM_PREFIX = "/admin/oauth";
protected static array $PATHS = [
["http_method" => "get", "operation" => "get", "ids" => [], "path" => "access_scopes.json"]
];

/**
* @param Session $session
* @param array $urlIds
* @param mixed[] $params
*
* @return AccessScope[]
*/
public static function all(
Session $session,
array $urlIds = [],
array $params = []
): array {
return parent::baseFind(
$session,
[],
$params,
);
}

}
105 changes: 105 additions & 0 deletions src/Rest/Admin2023_07/ApplePayCertificate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<?php

/***********************************************************************************************************************
* This file is auto-generated. If you have an issue, please create a GitHub issue. *
***********************************************************************************************************************/

declare(strict_types=1);

namespace Shopify\Rest\Admin2023_07;

use Shopify\Auth\Session;
use Shopify\Rest\Base;

/**
* @property int|null $id
* @property string|null $merchant_id
* @property string|null $status
*/
class ApplePayCertificate extends Base
{
public static string $API_VERSION = "2023-07";
protected static array $HAS_ONE = [];
protected static array $HAS_MANY = [];
protected static array $PATHS = [
["http_method" => "delete", "operation" => "delete", "ids" => ["id"], "path" => "apple_pay_certificates/<id>.json"],
["http_method" => "get", "operation" => "csr", "ids" => ["id"], "path" => "apple_pay_certificates/<id>/csr.json"],
["http_method" => "get", "operation" => "get", "ids" => ["id"], "path" => "apple_pay_certificates/<id>.json"],
["http_method" => "post", "operation" => "post", "ids" => [], "path" => "apple_pay_certificates.json"],
["http_method" => "put", "operation" => "put", "ids" => ["id"], "path" => "apple_pay_certificates/<id>.json"]
];

/**
* @param Session $session
* @param int|string $id
* @param array $urlIds
* @param mixed[] $params
*
* @return ApplePayCertificate|null
*/
public static function find(
Session $session,
$id,
array $urlIds = [],
array $params = []
): ?ApplePayCertificate {
$result = parent::baseFind(
$session,
array_merge(["id" => $id], $urlIds),
$params,
);
return !empty($result) ? $result[0] : null;
}

/**
* @param Session $session
* @param int|string $id
* @param array $urlIds
* @param mixed[] $params
*
* @return array|null
*/
public static function delete(
Session $session,
$id,
array $urlIds = [],
array $params = []
): ?array {
$response = parent::request(
"delete",
"delete",
$session,
array_merge(["id" => $id], $urlIds),
$params,
);

return $response->getDecodedBody();
}

/**
* @param Session $session
* @param int|string $id
* @param array $urlIds
* @param mixed[] $params
*
* @return array|null
*/
public static function csr(
Session $session,
$id,
array $urlIds = [],
array $params = []
): ?array {
$response = parent::request(
"get",
"csr",
$session,
array_merge(["id" => $id], $urlIds),
$params,
[],
);

return $response->getDecodedBody();
}

}
Loading