Skip to content

Commit

Permalink
Merge pull request #306 from Shopify/add_2023_10_api_version
Browse files Browse the repository at this point in the history
Add 2023-10 api version
  • Loading branch information
paulomarg authored Oct 24, 2023
2 parents f5f4fe4 + 2d2708f commit cd96b17
Show file tree
Hide file tree
Showing 507 changed files with 33,981 additions and 4,046 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## Unreleased

- [#306](https://github.com/Shopify/shopify-api-php/pull/306) [Minor] Adding support for 2023-10 API version
- [#297](https://github.com/Shopify/shopify-api-php/pull/297) [Patch] Fix CustomerAddress methods, FulfillmentRequest save method

## v5.1.0 - 2023-07-11
Expand Down
5 changes: 4 additions & 1 deletion src/ApiVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ class ApiVersion
/** @var string */
public const JULY_2023 = "2023-07";
/** @var string */
public const LATEST = self::JULY_2023;
public const OCTOBER_2023 = "2023-10";
/** @var string */
public const LATEST = self::OCTOBER_2023;

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

public static function isValid(string $version): bool
Expand Down
8 changes: 5 additions & 3 deletions src/Rest/Admin2022_04/AssignedFulfillmentOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ class AssignedFulfillmentOrder extends Base
/**
*
* @return string
* @return string[]
*/
protected static function getJsonResponseBodyName(): string
protected static function getJsonResponseBodyNames(): array
{
return "fulfillment_order";
return [
"fulfillment_order"
];
}

/**
Expand Down
13 changes: 13 additions & 0 deletions src/Rest/Admin2022_04/CustomerAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ protected static function getJsonBodyName(): string
return "address";
}

/**
*
* @return string[]
*/
protected static function getJsonResponseBodyNames(): array
{
return [
"customer_address",
"address"
];
}

/**
* @param Session $session
* @param int|string $id
Expand Down
13 changes: 13 additions & 0 deletions src/Rest/Admin2022_04/FulfillmentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ class FulfillmentRequest extends Base
["http_method" => "post", "operation" => "reject", "ids" => ["fulfillment_order_id"], "path" => "fulfillment_orders/<fulfillment_order_id>/fulfillment_request/reject.json"]
];

/**
*
* @return string[]
*/
protected static function getJsonResponseBodyNames(): array
{
return [
"submitted_fulfillment_order",
"fulfillment_order"
];
}

/**
* @param mixed[] $params Allowed indexes:
* message
Expand Down
8 changes: 5 additions & 3 deletions src/Rest/Admin2022_04/OrderRisk.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ protected static function getJsonBodyName(): string
/**
*
* @return string
* @return string[]
*/
protected static function getJsonResponseBodyName(): string
protected static function getJsonResponseBodyNames(): array
{
return "risk";
return [
"risk"
];
}

/**
Expand Down
8 changes: 5 additions & 3 deletions src/Rest/Admin2022_07/AssignedFulfillmentOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ class AssignedFulfillmentOrder extends Base
/**
*
* @return string
* @return string[]
*/
protected static function getJsonResponseBodyName(): string
protected static function getJsonResponseBodyNames(): array
{
return "fulfillment_order";
return [
"fulfillment_order"
];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Rest/Admin2022_07/Balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Shopify\Rest\Base;

/**
* @property array[]|null $balance
*/
class Balance extends Base
{
Expand Down
13 changes: 13 additions & 0 deletions src/Rest/Admin2022_07/CustomerAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ protected static function getJsonBodyName(): string
return "address";
}

/**
*
* @return string[]
*/
protected static function getJsonResponseBodyNames(): array
{
return [
"customer_address",
"address"
];
}

/**
* @param Session $session
* @param int|string $id
Expand Down
13 changes: 13 additions & 0 deletions src/Rest/Admin2022_07/FulfillmentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ class FulfillmentRequest extends Base
["http_method" => "post", "operation" => "reject", "ids" => ["fulfillment_order_id"], "path" => "fulfillment_orders/<fulfillment_order_id>/fulfillment_request/reject.json"]
];

/**
*
* @return string[]
*/
protected static function getJsonResponseBodyNames(): array
{
return [
"submitted_fulfillment_order",
"fulfillment_order"
];
}

/**
* @param mixed[] $params Allowed indexes:
* message
Expand Down
1 change: 1 addition & 0 deletions src/Rest/Admin2022_07/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* @property string|null $checkout_token
* @property array|null $client_details
* @property string|null $closed_at
* @property string|null $confirmation_number
* @property string|null $created_at
* @property string|null $currency
* @property string|null $current_subtotal_price
Expand Down
8 changes: 5 additions & 3 deletions src/Rest/Admin2022_07/OrderRisk.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ protected static function getJsonBodyName(): string
/**
*
* @return string
* @return string[]
*/
protected static function getJsonResponseBodyName(): string
protected static function getJsonResponseBodyNames(): array
{
return "risk";
return [
"risk"
];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Rest/Admin2022_10/Balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Shopify\Rest\Base;

/**
* @property array[]|null $balance
*/
class Balance extends Base
{
Expand Down
1 change: 1 addition & 0 deletions src/Rest/Admin2022_10/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* @property string|null $checkout_token
* @property array|null $client_details
* @property string|null $closed_at
* @property string|null $confirmation_number
* @property string|null $created_at
* @property string|null $currency
* @property string|null $current_subtotal_price
Expand Down
1 change: 0 additions & 1 deletion src/Rest/Admin2022_10/Shop.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @property string|null $address2
* @property bool|null $checkout_api_supported
* @property string|null $city
* @property string|null $cookie_consent_level
* @property string|null $country
* @property string|null $country_code
* @property string|null $country_name
Expand Down
4 changes: 1 addition & 3 deletions src/Rest/Admin2022_10/Variant.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @property string|null $inventory_management
* @property string|null $inventory_policy
* @property int|null $inventory_quantity
* @property int|null $inventory_quantity_adjustment
* @property int|null $old_inventory_quantity
* @property array|null $option
* @property int|null $position
Expand Down Expand Up @@ -53,8 +52,7 @@ class Variant extends Base
["http_method" => "put", "operation" => "put", "ids" => ["id"], "path" => "variants/<id>.json"]
];
protected static array $READ_ONLY_ATTRIBUTES = [
"inventory_quantity",
"inventory_quantity_adjustment"
"inventory_quantity"
];

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Rest/Admin2023_01/Balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Shopify\Rest\Base;

/**
* @property array[]|null $balance
*/
class Balance extends Base
{
Expand Down
1 change: 1 addition & 0 deletions src/Rest/Admin2023_01/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* @property array|null $client_details
* @property string|null $closed_at
* @property array|null $company
* @property string|null $confirmation_number
* @property string|null $created_at
* @property string|null $currency
* @property string|null $current_subtotal_price
Expand Down
1 change: 0 additions & 1 deletion src/Rest/Admin2023_01/Shop.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @property string|null $address2
* @property bool|null $checkout_api_supported
* @property string|null $city
* @property string|null $cookie_consent_level
* @property string|null $country
* @property string|null $country_code
* @property string|null $country_name
Expand Down
4 changes: 1 addition & 3 deletions src/Rest/Admin2023_01/Variant.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @property string|null $inventory_management
* @property string|null $inventory_policy
* @property int|null $inventory_quantity
* @property int|null $inventory_quantity_adjustment
* @property int|null $old_inventory_quantity
* @property array|null $option
* @property int|null $position
Expand Down Expand Up @@ -53,8 +52,7 @@ class Variant extends Base
["http_method" => "put", "operation" => "put", "ids" => ["id"], "path" => "variants/<id>.json"]
];
protected static array $READ_ONLY_ATTRIBUTES = [
"inventory_quantity",
"inventory_quantity_adjustment"
"inventory_quantity"
];

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Rest/Admin2023_04/Balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Shopify\Rest\Base;

/**
* @property array[]|null $balance
*/
class Balance extends Base
{
Expand Down
1 change: 1 addition & 0 deletions src/Rest/Admin2023_04/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* @property array|null $client_details
* @property string|null $closed_at
* @property array|null $company
* @property string|null $confirmation_number
* @property string|null $created_at
* @property string|null $currency
* @property string|null $current_subtotal_price
Expand Down
1 change: 0 additions & 1 deletion src/Rest/Admin2023_04/Shop.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @property string|null $address2
* @property bool|null $checkout_api_supported
* @property string|null $city
* @property string|null $cookie_consent_level
* @property string|null $country
* @property string|null $country_code
* @property string|null $country_name
Expand Down
4 changes: 1 addition & 3 deletions src/Rest/Admin2023_04/Variant.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @property string|null $inventory_management
* @property string|null $inventory_policy
* @property int|null $inventory_quantity
* @property int|null $inventory_quantity_adjustment
* @property int|null $old_inventory_quantity
* @property array|null $option
* @property int|null $position
Expand Down Expand Up @@ -53,8 +52,7 @@ class Variant extends Base
["http_method" => "put", "operation" => "put", "ids" => ["id"], "path" => "variants/<id>.json"]
];
protected static array $READ_ONLY_ATTRIBUTES = [
"inventory_quantity",
"inventory_quantity_adjustment"
"inventory_quantity"
];

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Rest/Admin2023_07/Balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Shopify\Rest\Base;

/**
* @property array[]|null $balance
*/
class Balance extends Base
{
Expand Down
1 change: 1 addition & 0 deletions src/Rest/Admin2023_07/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* @property array|null $client_details
* @property string|null $closed_at
* @property array|null $company
* @property string|null $confirmation_number
* @property string|null $created_at
* @property string|null $currency
* @property string|null $current_subtotal_price
Expand Down
Loading

0 comments on commit cd96b17

Please sign in to comment.