Skip to content

Commit bfbc3a1

Browse files
authored
Merge pull request #318 from Shopify/add_2024_01_support
Add 2024-01 API support
2 parents 3c7a4ff + 1eabf13 commit bfbc3a1

411 files changed

Lines changed: 34195 additions & 2820 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

88
## Unreleased
99

10+
- [#318](https://github.com/Shopify/shopify-api-php/pull/318) [Minor] Adding support for 2024-01 API version
11+
1012
## v5.2.0 - 2023-10-24
1113

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

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222
],
2323
"require": {
24-
"php": "~8.0.0 || ~8.1.0 || ~8.2.0",
24+
"php": "^8.0",
2525
"ext-ctype": "*",
2626
"ext-hash": "*",
2727
"ext-json": "*",

composer.lock

Lines changed: 408 additions & 453 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ApiVersion.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ class ApiVersion
2323
/** @var string */
2424
public const OCTOBER_2023 = "2023-10";
2525
/** @var string */
26-
public const LATEST = self::OCTOBER_2023;
26+
public const JANUARY_2024 = "2024-01";
27+
/** @var string */
28+
public const LATEST = self::JANUARY_2024;
2729

2830
private static $ALL_VERSIONS = [
2931
self::UNSTABLE,
@@ -34,6 +36,7 @@ class ApiVersion
3436
self::APRIL_2023,
3537
self::JULY_2023,
3638
self::OCTOBER_2023,
39+
self::JANUARY_2024,
3740
];
3841

3942
public static function isValid(string $version): bool
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
<?php
2+
3+
/***********************************************************************************************************************
4+
* This file is auto-generated. If you have an issue, please create a GitHub issue. *
5+
***********************************************************************************************************************/
6+
7+
declare(strict_types=1);
8+
9+
namespace Shopify\Rest\Admin2022_04;
10+
11+
use Shopify\Auth\Session;
12+
use Shopify\Rest\Base;
13+
14+
/**
15+
* @property string|null $created_at
16+
* @property int|null $id
17+
* @property string|null $name
18+
* @property string|null $query
19+
* @property string|null $updated_at
20+
*/
21+
class CustomerSavedSearch extends Base
22+
{
23+
public static string $API_VERSION = "2022-04";
24+
protected static array $HAS_ONE = [];
25+
protected static array $HAS_MANY = [];
26+
protected static array $PATHS = [
27+
["http_method" => "delete", "operation" => "delete", "ids" => ["id"], "path" => "customer_saved_searches/<id>.json"],
28+
["http_method" => "get", "operation" => "count", "ids" => [], "path" => "customer_saved_searches/count.json"],
29+
["http_method" => "get", "operation" => "customers", "ids" => ["id"], "path" => "customer_saved_searches/<id>/customers.json"],
30+
["http_method" => "get", "operation" => "get", "ids" => [], "path" => "customer_saved_searches.json"],
31+
["http_method" => "get", "operation" => "get", "ids" => ["id"], "path" => "customer_saved_searches/<id>.json"],
32+
["http_method" => "post", "operation" => "post", "ids" => [], "path" => "customer_saved_searches.json"],
33+
["http_method" => "put", "operation" => "put", "ids" => ["id"], "path" => "customer_saved_searches/<id>.json"]
34+
];
35+
36+
/**
37+
* @param Session $session
38+
* @param int|string $id
39+
* @param array $urlIds
40+
* @param mixed[] $params Allowed indexes:
41+
* fields
42+
*
43+
* @return CustomerSavedSearch|null
44+
*/
45+
public static function find(
46+
Session $session,
47+
$id,
48+
array $urlIds = [],
49+
array $params = []
50+
): ?CustomerSavedSearch {
51+
$result = parent::baseFind(
52+
$session,
53+
array_merge(["id" => $id], $urlIds),
54+
$params,
55+
);
56+
return !empty($result) ? $result[0] : null;
57+
}
58+
59+
/**
60+
* @param Session $session
61+
* @param int|string $id
62+
* @param array $urlIds
63+
* @param mixed[] $params
64+
*
65+
* @return array|null
66+
*/
67+
public static function delete(
68+
Session $session,
69+
$id,
70+
array $urlIds = [],
71+
array $params = []
72+
): ?array {
73+
$response = parent::request(
74+
"delete",
75+
"delete",
76+
$session,
77+
array_merge(["id" => $id], $urlIds),
78+
$params,
79+
);
80+
81+
return $response->getDecodedBody();
82+
}
83+
84+
/**
85+
* @param Session $session
86+
* @param array $urlIds
87+
* @param mixed[] $params Allowed indexes:
88+
* limit,
89+
* since_id,
90+
* fields
91+
*
92+
* @return CustomerSavedSearch[]
93+
*/
94+
public static function all(
95+
Session $session,
96+
array $urlIds = [],
97+
array $params = []
98+
): array {
99+
return parent::baseFind(
100+
$session,
101+
[],
102+
$params,
103+
);
104+
}
105+
106+
/**
107+
* @param Session $session
108+
* @param array $urlIds
109+
* @param mixed[] $params Allowed indexes:
110+
* since_id
111+
*
112+
* @return array|null
113+
*/
114+
public static function count(
115+
Session $session,
116+
array $urlIds = [],
117+
array $params = []
118+
): ?array {
119+
$response = parent::request(
120+
"get",
121+
"count",
122+
$session,
123+
[],
124+
$params,
125+
[],
126+
);
127+
128+
return $response->getDecodedBody();
129+
}
130+
131+
/**
132+
* @param Session $session
133+
* @param int|string $id
134+
* @param array $urlIds
135+
* @param mixed[] $params Allowed indexes:
136+
* order,
137+
* limit,
138+
* fields
139+
*
140+
* @return array|null
141+
*/
142+
public static function customers(
143+
Session $session,
144+
$id,
145+
array $urlIds = [],
146+
array $params = []
147+
): ?array {
148+
$response = parent::request(
149+
"get",
150+
"customers",
151+
$session,
152+
array_merge(["id" => $id], $urlIds),
153+
$params,
154+
[],
155+
);
156+
157+
return $response->getDecodedBody();
158+
}
159+
160+
}

src/Rest/Admin2023_01/FulfillmentOrder.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* @property int|null $shop_id
3030
* @property string|null $status
3131
* @property string[]|null $supported_actions
32-
* @property array|null $updated_at
32+
* @property string|null $updated_at
3333
*/
3434
class FulfillmentOrder extends Base
3535
{
@@ -233,7 +233,8 @@ public function release_hold(
233233
}
234234

235235
/**
236-
* @param mixed[] $params
236+
* @param mixed[] $params Allowed indexes:
237+
* new_fulfill_at
237238
* @param array|string $body
238239
*
239240
* @return array|null

src/Rest/Admin2023_01/PaymentTransaction.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Shopify\Rest\Base;
1313

1414
/**
15+
* @property array[]|null $adjustment_order_transactions
1516
* @property string|null $amount
1617
* @property Currency|null $currency
1718
* @property string|null $fee
@@ -22,7 +23,7 @@
2223
* @property string|null $processed_at
2324
* @property int|null $source_id
2425
* @property int|null $source_order_id
25-
* @property int|null $source_order_transaction_id
26+
* @property string|null $source_order_transaction_id
2627
* @property string|null $source_type
2728
* @property bool|null $test
2829
* @property string|null $type

src/Rest/Admin2023_04/FulfillmentOrder.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* @property int|null $shop_id
3030
* @property string|null $status
3131
* @property string[]|null $supported_actions
32-
* @property array|null $updated_at
32+
* @property string|null $updated_at
3333
*/
3434
class FulfillmentOrder extends Base
3535
{
@@ -233,7 +233,8 @@ public function release_hold(
233233
}
234234

235235
/**
236-
* @param mixed[] $params
236+
* @param mixed[] $params Allowed indexes:
237+
* new_fulfill_at
237238
* @param array|string $body
238239
*
239240
* @return array|null

src/Rest/Admin2023_04/Order.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,11 @@
5959
* @property string|null $order_status_url
6060
* @property array|null $original_total_additional_fees_set
6161
* @property array|null $original_total_duties_set
62-
* @property array|null $payment_details
6362
* @property string[]|null $payment_gateway_names
6463
* @property array|null $payment_terms
6564
* @property string|null $phone
6665
* @property string|null $presentment_currency
6766
* @property string|null $processed_at
68-
* @property string|null $processing_method
6967
* @property string|null $referring_site
7068
* @property Refund[]|null $refunds
7169
* @property array|null $shipping_address

src/Rest/Admin2023_04/PaymentTransaction.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Shopify\Rest\Base;
1313

1414
/**
15+
* @property array[]|null $adjustment_order_transactions
1516
* @property string|null $amount
1617
* @property Currency|null $currency
1718
* @property string|null $fee
@@ -22,7 +23,7 @@
2223
* @property string|null $processed_at
2324
* @property int|null $source_id
2425
* @property int|null $source_order_id
25-
* @property int|null $source_order_transaction_id
26+
* @property string|null $source_order_transaction_id
2627
* @property string|null $source_type
2728
* @property bool|null $test
2829
* @property string|null $type

0 commit comments

Comments
 (0)