|
| 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 | +} |
0 commit comments