-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating auto-generated REST resources
- Loading branch information
Showing
406 changed files
with
33,780 additions
and
2,363 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
<?php | ||
|
||
/*********************************************************************************************************************** | ||
* This file is auto-generated. If you have an issue, please create a GitHub issue. * | ||
***********************************************************************************************************************/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Shopify\Rest\Admin2022_04; | ||
|
||
use Shopify\Auth\Session; | ||
use Shopify\Rest\Base; | ||
|
||
/** | ||
* @property string|null $created_at | ||
* @property int|null $id | ||
* @property string|null $name | ||
* @property string|null $query | ||
* @property string|null $updated_at | ||
*/ | ||
class CustomerSavedSearch extends Base | ||
{ | ||
public static string $API_VERSION = "2022-04"; | ||
protected static array $HAS_ONE = []; | ||
protected static array $HAS_MANY = []; | ||
protected static array $PATHS = [ | ||
["http_method" => "delete", "operation" => "delete", "ids" => ["id"], "path" => "customer_saved_searches/<id>.json"], | ||
["http_method" => "get", "operation" => "count", "ids" => [], "path" => "customer_saved_searches/count.json"], | ||
["http_method" => "get", "operation" => "customers", "ids" => ["id"], "path" => "customer_saved_searches/<id>/customers.json"], | ||
["http_method" => "get", "operation" => "get", "ids" => [], "path" => "customer_saved_searches.json"], | ||
["http_method" => "get", "operation" => "get", "ids" => ["id"], "path" => "customer_saved_searches/<id>.json"], | ||
["http_method" => "post", "operation" => "post", "ids" => [], "path" => "customer_saved_searches.json"], | ||
["http_method" => "put", "operation" => "put", "ids" => ["id"], "path" => "customer_saved_searches/<id>.json"] | ||
]; | ||
|
||
/** | ||
* @param Session $session | ||
* @param int|string $id | ||
* @param array $urlIds | ||
* @param mixed[] $params Allowed indexes: | ||
* fields | ||
* | ||
* @return CustomerSavedSearch|null | ||
*/ | ||
public static function find( | ||
Session $session, | ||
$id, | ||
array $urlIds = [], | ||
array $params = [] | ||
): ?CustomerSavedSearch { | ||
$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 array $urlIds | ||
* @param mixed[] $params Allowed indexes: | ||
* limit, | ||
* since_id, | ||
* fields | ||
* | ||
* @return CustomerSavedSearch[] | ||
*/ | ||
public static function all( | ||
Session $session, | ||
array $urlIds = [], | ||
array $params = [] | ||
): array { | ||
return parent::baseFind( | ||
$session, | ||
[], | ||
$params, | ||
); | ||
} | ||
|
||
/** | ||
* @param Session $session | ||
* @param array $urlIds | ||
* @param mixed[] $params Allowed indexes: | ||
* since_id | ||
* | ||
* @return array|null | ||
*/ | ||
public static function count( | ||
Session $session, | ||
array $urlIds = [], | ||
array $params = [] | ||
): ?array { | ||
$response = parent::request( | ||
"get", | ||
"count", | ||
$session, | ||
[], | ||
$params, | ||
[], | ||
); | ||
|
||
return $response->getDecodedBody(); | ||
} | ||
|
||
/** | ||
* @param Session $session | ||
* @param int|string $id | ||
* @param array $urlIds | ||
* @param mixed[] $params Allowed indexes: | ||
* order, | ||
* limit, | ||
* fields | ||
* | ||
* @return array|null | ||
*/ | ||
public static function customers( | ||
Session $session, | ||
$id, | ||
array $urlIds = [], | ||
array $params = [] | ||
): ?array { | ||
$response = parent::request( | ||
"get", | ||
"customers", | ||
$session, | ||
array_merge(["id" => $id], $urlIds), | ||
$params, | ||
[], | ||
); | ||
|
||
return $response->getDecodedBody(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.