Skip to content

Commit f1f3428

Browse files
authored
Merge pull request #405 from Shopify/REST-2025-04
[Minor] Add 2025-04 API version
2 parents 7d95982 + b603123 commit f1f3428

File tree

148 files changed

+30391
-2
lines changed

Some content is hidden

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

148 files changed

+30391
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

88
## Unreleased
9-
- [#292](https://github.com/Shopify/shopify-api-php/pull/292) [Patch] Fix bug where null can be passed to param 3 of setcookie()
9+
- [#292](https://github.com/Shopify/shopify-api-php/pull/292) [Patch] Fix bug where null can be passed to param 3 of setcookie()
10+
- [#]() [Minor] Add support for 2025-04 API version
1011

1112
## v5.9.0 - 2025-01-08
1213
- [#393](https://github.com/Shopify/shopify-api-php/pull/393) [Minor] Add support for 2025-01 API version REST resources

src/ApiVersion.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,7 @@ class ApiVersion
3333
/** @var string */
3434
public const JANUARY_2025 = "2025-01";
3535
/** @var string */
36-
public const LATEST = self::JANUARY_2025;
36+
public const APRIL_2025 = "2025-04";
37+
/** @var string */
38+
public const LATEST = self::APRIL_2025;
3739
}
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
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\Admin2025_04;
10+
11+
use Shopify\Auth\Session;
12+
use Shopify\Rest\Base;
13+
14+
/**
15+
* @property string|null $abandoned_checkout_url
16+
* @property array|null $billing_address
17+
* @property bool|null $buyer_accepts_marketing
18+
* @property bool|null $buyer_accepts_sms_marketing
19+
* @property string|null $cart_token
20+
* @property string|null $closed_at
21+
* @property string|null $completed_at
22+
* @property string|null $created_at
23+
* @property Currency|null $currency
24+
* @property Customer|null $customer
25+
* @property string|null $customer_locale
26+
* @property int|null $device_id
27+
* @property DiscountCode[]|null $discount_codes
28+
* @property string|null $email
29+
* @property string|null $gateway
30+
* @property int|null $id
31+
* @property string|null $landing_site
32+
* @property array|null $line_items
33+
* @property int|null $location_id
34+
* @property string|null $note
35+
* @property string|null $phone
36+
* @property string|null $presentment_currency
37+
* @property string|null $referring_site
38+
* @property array|null $shipping_address
39+
* @property array|null $shipping_lines
40+
* @property string|null $sms_marketing_phone
41+
* @property string|null $source_name
42+
* @property string|null $subtotal_price
43+
* @property array|null $tax_lines
44+
* @property bool|null $taxes_included
45+
* @property string|null $token
46+
* @property string|null $total_discounts
47+
* @property string|null $total_duties
48+
* @property string|null $total_line_items_price
49+
* @property string|null $total_price
50+
* @property string|null $total_tax
51+
* @property int|null $total_weight
52+
* @property string|null $updated_at
53+
* @property int|null $user_id
54+
*/
55+
class AbandonedCheckout extends Base
56+
{
57+
public static string $API_VERSION = "2025-04";
58+
protected static array $HAS_ONE = [
59+
"currency" => Currency::class,
60+
"customer" => Customer::class
61+
];
62+
protected static array $HAS_MANY = [
63+
"discount_codes" => DiscountCode::class
64+
];
65+
protected static array $PATHS = [
66+
["http_method" => "get", "operation" => "checkouts", "ids" => [], "path" => "checkouts.json"],
67+
["http_method" => "get", "operation" => "checkouts", "ids" => [], "path" => "checkouts.json"]
68+
];
69+
70+
/**
71+
* @param Session $session
72+
* @param array $urlIds
73+
* @param mixed[] $params Allowed indexes:
74+
* since_id,
75+
* created_at_min,
76+
* created_at_max,
77+
* updated_at_min,
78+
* updated_at_max,
79+
* status,
80+
* limit
81+
*
82+
* @return array|null
83+
*/
84+
public static function checkouts(
85+
Session $session,
86+
array $urlIds = [],
87+
array $params = []
88+
): ?array {
89+
$response = parent::request(
90+
"get",
91+
"checkouts",
92+
$session,
93+
[],
94+
$params,
95+
[],
96+
);
97+
98+
return $response->getDecodedBody();
99+
}
100+
101+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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\Admin2025_04;
10+
11+
use Shopify\Auth\Session;
12+
use Shopify\Rest\Base;
13+
14+
/**
15+
* @property string $handle
16+
* @property array[]|null $access_scopes
17+
*/
18+
class AccessScope extends Base
19+
{
20+
public static string $API_VERSION = "2025-04";
21+
protected static array $HAS_ONE = [];
22+
protected static array $HAS_MANY = [];
23+
protected static ?string $CUSTOM_PREFIX = "/admin/oauth";
24+
protected static array $PATHS = [
25+
["http_method" => "get", "operation" => "get", "ids" => [], "path" => "access_scopes.json"]
26+
];
27+
28+
/**
29+
* @param Session $session
30+
* @param array $urlIds
31+
* @param mixed[] $params
32+
*
33+
* @return AccessScope[]
34+
*/
35+
public static function all(
36+
Session $session,
37+
array $urlIds = [],
38+
array $params = []
39+
): array {
40+
return parent::baseFind(
41+
$session,
42+
[],
43+
$params,
44+
);
45+
}
46+
47+
}
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
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\Admin2025_04;
10+
11+
use Shopify\Auth\Session;
12+
use Shopify\Rest\Base;
13+
14+
/**
15+
* @property int|null $id
16+
* @property string|null $merchant_id
17+
* @property string|null $status
18+
*/
19+
class ApplePayCertificate extends Base
20+
{
21+
public static string $API_VERSION = "2025-04";
22+
protected static array $HAS_ONE = [];
23+
protected static array $HAS_MANY = [];
24+
protected static array $PATHS = [
25+
["http_method" => "delete", "operation" => "delete", "ids" => ["id"], "path" => "apple_pay_certificates/<id>.json"],
26+
["http_method" => "get", "operation" => "csr", "ids" => ["id"], "path" => "apple_pay_certificates/<id>/csr.json"],
27+
["http_method" => "get", "operation" => "get", "ids" => ["id"], "path" => "apple_pay_certificates/<id>.json"],
28+
["http_method" => "post", "operation" => "post", "ids" => [], "path" => "apple_pay_certificates.json"],
29+
["http_method" => "put", "operation" => "put", "ids" => ["id"], "path" => "apple_pay_certificates/<id>.json"]
30+
];
31+
32+
/**
33+
* @param Session $session
34+
* @param int|string $id
35+
* @param array $urlIds
36+
* @param mixed[] $params
37+
*
38+
* @return ApplePayCertificate|null
39+
*/
40+
public static function find(
41+
Session $session,
42+
$id,
43+
array $urlIds = [],
44+
array $params = []
45+
): ?ApplePayCertificate {
46+
$result = parent::baseFind(
47+
$session,
48+
array_merge(["id" => $id], $urlIds),
49+
$params,
50+
);
51+
return !empty($result) ? $result[0] : null;
52+
}
53+
54+
/**
55+
* @param Session $session
56+
* @param int|string $id
57+
* @param array $urlIds
58+
* @param mixed[] $params
59+
*
60+
* @return array|null
61+
*/
62+
public static function delete(
63+
Session $session,
64+
$id,
65+
array $urlIds = [],
66+
array $params = []
67+
): ?array {
68+
$response = parent::request(
69+
"delete",
70+
"delete",
71+
$session,
72+
array_merge(["id" => $id], $urlIds),
73+
$params,
74+
);
75+
76+
return $response->getDecodedBody();
77+
}
78+
79+
/**
80+
* @param Session $session
81+
* @param int|string $id
82+
* @param array $urlIds
83+
* @param mixed[] $params
84+
*
85+
* @return array|null
86+
*/
87+
public static function csr(
88+
Session $session,
89+
$id,
90+
array $urlIds = [],
91+
array $params = []
92+
): ?array {
93+
$response = parent::request(
94+
"get",
95+
"csr",
96+
$session,
97+
array_merge(["id" => $id], $urlIds),
98+
$params,
99+
[],
100+
);
101+
102+
return $response->getDecodedBody();
103+
}
104+
105+
}
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
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\Admin2025_04;
10+
11+
use Shopify\Auth\Session;
12+
use Shopify\Rest\Base;
13+
14+
/**
15+
* @property string|null $confirmation_url
16+
* @property string|null $created_at
17+
* @property Currency|null $currency
18+
* @property int|null $id
19+
* @property string|null $name
20+
* @property string|float|null $price
21+
* @property string|null $return_url
22+
* @property string|null $status
23+
* @property bool|null $test
24+
* @property string|null $updated_at
25+
*/
26+
class ApplicationCharge extends Base
27+
{
28+
public static string $API_VERSION = "2025-04";
29+
protected static array $HAS_ONE = [
30+
"currency" => Currency::class
31+
];
32+
protected static array $HAS_MANY = [];
33+
protected static array $PATHS = [
34+
["http_method" => "get", "operation" => "get", "ids" => [], "path" => "application_charges.json"],
35+
["http_method" => "get", "operation" => "get", "ids" => ["id"], "path" => "application_charges/<id>.json"],
36+
["http_method" => "post", "operation" => "post", "ids" => [], "path" => "application_charges.json"]
37+
];
38+
39+
/**
40+
* @param Session $session
41+
* @param int|string $id
42+
* @param array $urlIds
43+
* @param mixed[] $params Allowed indexes:
44+
* fields
45+
*
46+
* @return ApplicationCharge|null
47+
*/
48+
public static function find(
49+
Session $session,
50+
$id,
51+
array $urlIds = [],
52+
array $params = []
53+
): ?ApplicationCharge {
54+
$result = parent::baseFind(
55+
$session,
56+
array_merge(["id" => $id], $urlIds),
57+
$params,
58+
);
59+
return !empty($result) ? $result[0] : null;
60+
}
61+
62+
/**
63+
* @param Session $session
64+
* @param array $urlIds
65+
* @param mixed[] $params Allowed indexes:
66+
* since_id,
67+
* fields
68+
*
69+
* @return ApplicationCharge[]
70+
*/
71+
public static function all(
72+
Session $session,
73+
array $urlIds = [],
74+
array $params = []
75+
): array {
76+
return parent::baseFind(
77+
$session,
78+
[],
79+
$params,
80+
);
81+
}
82+
83+
}

0 commit comments

Comments
 (0)