@epcc-sdk/sdks-shopper 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1766,6 +1766,7 @@ export type CartsRequest = {
1766
1766
  * The cart name provided by the shopper. A cart name must contain 1 to 255 characters. You cannot use whitespace characters, but special characters are permitted. For more information, see the [Safe Characters](/guides/Getting-Started/safe-characters) section.
1767
1767
  */
1768
1768
  name?: string;
1769
+ contact?: CartContact;
1769
1770
  /**
1770
1771
  * This optional parameter sets a reference date for the cart. If this parameter is set, it allows the cart to act as one that might occur on that specified date. For example, such future carts might acquire future-enabled discounts, allowing users to test and validate future interactions with carts. The snapshot_date must be in the format 2026-02-21T15:07:25Z. By default, this parameter is left empty.
1771
1772
  */
@@ -1776,6 +1777,12 @@ export type CartsRequest = {
1776
1777
  */
1777
1778
  payment_intent_id?: string;
1778
1779
  };
1780
+ export type CartContact = {
1781
+ /**
1782
+ * The email address attached to a cart.
1783
+ */
1784
+ email?: string;
1785
+ };
1779
1786
  export type DiscountSettings = {
1780
1787
  /**
1781
1788
  * This parameter enables custom discounts for a cart. When set to true, Elastic Path promotions will not be applied to the new carts. Default is set from cart discount settings for the store. See [Cart Settings](/docs/api/settings/put-v-2-settings-cart).
@@ -1823,6 +1830,7 @@ export type CartResponse = {
1823
1830
  * A description of the cart.
1824
1831
  */
1825
1832
  description?: string;
1833
+ contact?: CartContact;
1826
1834
  discount_settings?: DiscountSettings;
1827
1835
  /**
1828
1836
  * Stripe-assigned unique identifier for the linked Payment Intent
@@ -1843,7 +1851,7 @@ export type CartResponse = {
1843
1851
  without_discount?: FormattedPriceData;
1844
1852
  shipping?: FormattedPriceData;
1845
1853
  };
1846
- timestamps?: Timestamps;
1854
+ timestamps?: CartCheckoutTimestamps;
1847
1855
  };
1848
1856
  relationships?: {
1849
1857
  customers?: {
@@ -1872,7 +1880,7 @@ export type CartResponse = {
1872
1880
  };
1873
1881
  };
1874
1882
  };
1875
- export type CartItemsObjectRequest = CartItemObject | CartMergeObjectRequest | CustomItemObject | ReOrderObjectRequest | PromotionItemObject;
1883
+ export type CartItemsObjectRequest = CartItemObject | SubscriptionItemObject | CartMergeObjectRequest | CustomItemObject | ReOrderObjectRequest | PromotionItemObject;
1876
1884
  export type CartItemObject = {
1877
1885
  data?: CartItemObjectData & CartItemResponse;
1878
1886
  };
@@ -1913,11 +1921,45 @@ export type CartItemObjectData = {
1913
1921
  selected_options?: {
1914
1922
  [key: string]: unknown;
1915
1923
  };
1924
+ /**
1925
+ * Array of component products for the selected options.
1926
+ */
1927
+ component_products?: Array<unknown>;
1916
1928
  };
1917
1929
  /**
1918
1930
  * Identifier for a created Cart Shipping Group
1919
1931
  */
1920
1932
  shipping_group_id?: string;
1933
+ /**
1934
+ * The slug of a stock location.
1935
+ */
1936
+ location?: string;
1937
+ };
1938
+ export type SubscriptionItemObject = {
1939
+ data?: SubscriptionItemObjectData & CartItemResponse;
1940
+ };
1941
+ export type SubscriptionItemObjectData = {
1942
+ /**
1943
+ * The type of object being returned.
1944
+ */
1945
+ type: "subscription_item";
1946
+ /**
1947
+ * The number of items added to the cart.
1948
+ */
1949
+ quantity: number;
1950
+ /**
1951
+ * Specifies the ID of the subscription offering you want to add to cart.
1952
+ */
1953
+ id: string;
1954
+ /**
1955
+ * Specifies how the subscription offering should be configured.
1956
+ */
1957
+ subscription_configuration: {
1958
+ /**
1959
+ * The ID of the plan within the offering to use for the subscription.
1960
+ */
1961
+ plan: string;
1962
+ };
1921
1963
  };
1922
1964
  export type CartMergeObjectRequest = {
1923
1965
  data?: Array<CartMergeObject>;
@@ -2066,6 +2108,10 @@ export type CartItemResponse = {
2066
2108
  * The unique ID of the product.
2067
2109
  */
2068
2110
  readonly product_id?: string;
2111
+ /**
2112
+ * The unique ID of the subscription offering for subscription items.
2113
+ */
2114
+ readonly subscription_offering_id?: string;
2069
2115
  /**
2070
2116
  * The name of this item
2071
2117
  */
@@ -2113,7 +2159,7 @@ export type CartItemResponse = {
2113
2159
  discount?: FormattedPriceData;
2114
2160
  without_discount?: FormattedPriceData;
2115
2161
  };
2116
- timestamps?: Timestamps;
2162
+ timestamps?: CartCheckoutTimestamps;
2117
2163
  };
2118
2164
  };
2119
2165
  export type CartsResponse = {
@@ -2322,11 +2368,15 @@ export type OrdersAnonymizeData = {
2322
2368
  order_ids?: Array<string>;
2323
2369
  };
2324
2370
  export type OrdersUpdateRequest = {
2325
- data?: OrdersAddressData | OrdersCancelData | OrdersFulfulledData;
2371
+ data?: OrdersAddressData | OrdersCancelData | OrdersFulfilledData;
2326
2372
  };
2327
2373
  export type OrdersAddressData = {
2328
2374
  /**
2329
- * Represents an optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and does not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
2375
+ * Specifies a user-managed, optional field used as an alternative to the existing order_id. If provided, the order-number will be sent to Authorize.net instead of the order_id, and will appear as the invoice number in Authorize.net transactions.
2376
+ */
2377
+ order_number?: string;
2378
+ /**
2379
+ * Represents an optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
2330
2380
  */
2331
2381
  external_ref?: string;
2332
2382
  shipping_address: {
@@ -2390,11 +2440,11 @@ export type OrdersCancelData = {
2390
2440
  */
2391
2441
  type: string;
2392
2442
  /**
2393
- * Represents an optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and does not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
2443
+ * Represents an optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
2394
2444
  */
2395
2445
  external_ref?: string;
2396
2446
  };
2397
- export type OrdersFulfulledData = {
2447
+ export type OrdersFulfilledData = {
2398
2448
  /**
2399
2449
  * The shipping status of the order. You can only update the shipping status to `fulfilled`.
2400
2450
  */
@@ -2404,7 +2454,7 @@ export type OrdersFulfulledData = {
2404
2454
  */
2405
2455
  type: string;
2406
2456
  /**
2407
- * Represents an optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and does not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
2457
+ * Represents an optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
2408
2458
  */
2409
2459
  external_ref?: string;
2410
2460
  };
@@ -2554,7 +2604,7 @@ export type DataPayPalExpressCheckoutPayment = DataBasePayments & {
2554
2604
  soft_descriptor?: string;
2555
2605
  application_context?: {
2556
2606
  /**
2557
- * The label that overrides the business name in the PayPal account on the payPal site.
2607
+ * The label that overrides the business name in the PayPal account on the PayPal site.
2558
2608
  */
2559
2609
  brand_name?: string;
2560
2610
  /**
@@ -2691,7 +2741,7 @@ export type TransactionResponse = {
2691
2741
  meta?: {
2692
2742
  display_price?: FormattedPriceData;
2693
2743
  display_refunded_amount?: FormattedPriceData;
2694
- timestamps?: Timestamps;
2744
+ timestamps?: CartCheckoutTimestamps;
2695
2745
  };
2696
2746
  };
2697
2747
  export type OrdersTransactionsConfirmRequest = {
@@ -2786,6 +2836,10 @@ export type OrderItemResponse = {
2786
2836
  * The unique identifier for this order item.
2787
2837
  */
2788
2838
  readonly product_id?: string;
2839
+ /**
2840
+ * The unique identifier for the subscription offering for this order item.
2841
+ */
2842
+ readonly subscription_offering_id?: string;
2789
2843
  /**
2790
2844
  * The name of this order item.
2791
2845
  */
@@ -2815,7 +2869,7 @@ export type OrderItemResponse = {
2815
2869
  };
2816
2870
  };
2817
2871
  };
2818
- timestamps?: Timestamps;
2872
+ timestamps?: CartCheckoutTimestamps;
2819
2873
  };
2820
2874
  relationships?: {
2821
2875
  cart_item?: {
@@ -2845,6 +2899,14 @@ export type OrderResponse = {
2845
2899
  * Specifies the type of object being returned. You must use `order`.
2846
2900
  */
2847
2901
  type?: string;
2902
+ /**
2903
+ * Specifies a user-managed, optional field used as an alternative to the existing `order_id`. If provided, the order-number will be sent to Authorize.net instead of the `order_id`, and will appear as the invoice number in Authorize.net transactions.
2904
+ */
2905
+ order_number?: string;
2906
+ /**
2907
+ * An optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
2908
+ */
2909
+ external_ref?: string;
2848
2910
  /**
2849
2911
  * Specifies the unique identifier of the order.
2850
2912
  */
@@ -2871,7 +2933,7 @@ export type OrderResponse = {
2871
2933
  shipping_address?: ShippingAddress;
2872
2934
  };
2873
2935
  export type OrderMeta = {
2874
- timestamps?: Timestamps;
2936
+ timestamps?: CartCheckoutTimestamps;
2875
2937
  with_tax?: FormattedPriceData;
2876
2938
  without_tax?: FormattedPriceData;
2877
2939
  tax?: FormattedPriceData;
@@ -2882,6 +2944,14 @@ export type OrderMeta = {
2882
2944
  };
2883
2945
  export type CustomerCheckout = {
2884
2946
  data?: {
2947
+ /**
2948
+ * A user-managed, optional field used as an alternative to the existing `order_id`. If provided, the order-number will be sent to Authorize.net instead of the `order_id`, and will appear as the invoice number in Authorize.net transactions.
2949
+ */
2950
+ order_number?: string;
2951
+ /**
2952
+ * An optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
2953
+ */
2954
+ external_ref?: string;
2885
2955
  customer?: {
2886
2956
  /**
2887
2957
  * The ID of the customer.
@@ -2894,6 +2964,14 @@ export type CustomerCheckout = {
2894
2964
  };
2895
2965
  export type AccountCheckout = {
2896
2966
  data?: {
2967
+ /**
2968
+ * A user-managed, optional field used as an alternative to the existing `order_id`. If provided, the order-number will be sent to Authorize.net instead of the `order_id`, and will appear as the invoice number in Authorize.net transactions.
2969
+ */
2970
+ order_number?: string;
2971
+ /**
2972
+ * An optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
2973
+ */
2974
+ external_ref?: string;
2897
2975
  account?: {
2898
2976
  /**
2899
2977
  * The account ID.
@@ -2919,18 +2997,6 @@ export type AccountCheckout = {
2919
2997
  };
2920
2998
  };
2921
2999
  export type BillingAddress = {
2922
- /**
2923
- * Company name of the billing recipient.
2924
- */
2925
- company_name?: string;
2926
- /**
2927
- * Specifies the country of the billing address.
2928
- */
2929
- country: string;
2930
- /**
2931
- * Specifies the county of the billing address.
2932
- */
2933
- county?: string;
2934
3000
  /**
2935
3001
  * First name of the billing recipient.
2936
3002
  */
@@ -2939,6 +3005,10 @@ export type BillingAddress = {
2939
3005
  * Last name of the billing recipient.
2940
3006
  */
2941
3007
  last_name: string;
3008
+ /**
3009
+ * Company name of the billing recipient.
3010
+ */
3011
+ company_name: string;
2942
3012
  /**
2943
3013
  * First line of the billing address.
2944
3014
  */
@@ -2946,13 +3016,25 @@ export type BillingAddress = {
2946
3016
  /**
2947
3017
  * Second line of the billing address.
2948
3018
  */
2949
- line_2?: string;
3019
+ line_2: string;
3020
+ /**
3021
+ * City of the billing address.
3022
+ */
3023
+ city: string;
2950
3024
  /**
2951
3025
  * Postcode of the billing address.
2952
3026
  */
2953
3027
  postcode: string;
2954
3028
  /**
2955
- * Specifies state, province, or region of the billing address.
3029
+ * County of the billing address.
3030
+ */
3031
+ county: string;
3032
+ /**
3033
+ * Country of the billing address.
3034
+ */
3035
+ country: string;
3036
+ /**
3037
+ * State, province, or region of the billing address.
2956
3038
  */
2957
3039
  region: string;
2958
3040
  };
@@ -2967,18 +3049,6 @@ export type Contact = {
2967
3049
  name?: string;
2968
3050
  };
2969
3051
  export type ShippingAddress = {
2970
- /**
2971
- * Company of the shipping recipient.
2972
- */
2973
- company_name?: string;
2974
- /**
2975
- * Specifies the country of the shipping address.
2976
- */
2977
- country: string;
2978
- /**
2979
- * Specifies the county of the shipping address.
2980
- */
2981
- county?: string;
2982
3052
  /**
2983
3053
  * First name of the shipping recipient.
2984
3054
  */
@@ -2987,6 +3057,14 @@ export type ShippingAddress = {
2987
3057
  * Last name of the shipping recipient.
2988
3058
  */
2989
3059
  last_name: string;
3060
+ /**
3061
+ * Phone number of the shipping recipient.
3062
+ */
3063
+ phone_number: string;
3064
+ /**
3065
+ * Company of the shipping recipient.
3066
+ */
3067
+ company_name: string;
2990
3068
  /**
2991
3069
  * First line of the shipping address.
2992
3070
  */
@@ -2994,88 +3072,1685 @@ export type ShippingAddress = {
2994
3072
  /**
2995
3073
  * Second line of the shipping address.
2996
3074
  */
2997
- line_2?: string;
3075
+ line_2: string;
3076
+ /**
3077
+ * City of the shipping address.
3078
+ */
3079
+ city: string;
2998
3080
  /**
2999
3081
  * Post code of the shipping address.
3000
3082
  */
3001
3083
  postcode: string;
3002
3084
  /**
3003
- * Specifies the state, province, or region of the shipping address.
3085
+ * County of the shipping address.
3086
+ */
3087
+ county: string;
3088
+ /**
3089
+ * Country of the shipping address.
3090
+ */
3091
+ country: string;
3092
+ /**
3093
+ * State, province, or region of the shipping address.
3004
3094
  */
3005
3095
  region: string;
3096
+ /**
3097
+ * Delivery instructions.
3098
+ */
3099
+ instructions: string;
3006
3100
  };
3007
3101
  export type ResponseMetaCarts = {
3008
3102
  page?: ResponsePaginationPage;
3009
3103
  results?: ResponsePaginationResults;
3010
3104
  };
3011
- export type ResponseMetaOrders = {
3012
- page?: ResponsePaginationPage;
3013
- results?: ResponsePaginationResults;
3105
+ export type ResponseMetaOrders = {
3106
+ page?: ResponsePaginationPage;
3107
+ results?: ResponsePaginationResults;
3108
+ };
3109
+ export type ResponsePaginationPage = {
3110
+ /**
3111
+ * The current page.
3112
+ */
3113
+ current?: number;
3114
+ /**
3115
+ * The maximum number of records per page for this response. You can set this value up to 100.
3116
+ */
3117
+ limit?: number;
3118
+ /**
3119
+ * The current offset by number of records, not pages. Offset is zero-based.
3120
+ */
3121
+ offset?: number;
3122
+ /**
3123
+ * The total page count.
3124
+ */
3125
+ total?: number;
3126
+ };
3127
+ export type ResponsePaginationResults = {
3128
+ /**
3129
+ * The total page count.
3130
+ */
3131
+ total?: number;
3132
+ };
3133
+ export type ResponsePageLinks = {
3134
+ /**
3135
+ * Always the current page.
3136
+ */
3137
+ current?: string;
3138
+ /**
3139
+ * Always the first page.
3140
+ */
3141
+ first?: string;
3142
+ /**
3143
+ * If there is only one page, it is `null`.
3144
+ */
3145
+ last?: string;
3146
+ /**
3147
+ * If there is only one page, it is `null`.
3148
+ */
3149
+ next?: string;
3150
+ /**
3151
+ * if the user is on the first page, it is `null`.
3152
+ */
3153
+ prev?: string;
3154
+ };
3155
+ export type ResponseData = {
3156
+ data?: unknown;
3157
+ };
3158
+ export type ResponseError = Array<unknown>;
3159
+ export type CartTimestamps = {
3160
+ created_at?: string;
3161
+ updated_at?: unknown;
3162
+ expires_at?: unknown;
3163
+ };
3164
+ export type CartCheckoutTimestamps = {
3165
+ /**
3166
+ * The date this was created.
3167
+ */
3168
+ created_at?: string;
3169
+ /**
3170
+ * The date this was last updated.
3171
+ */
3172
+ updated_at?: unknown;
3173
+ };
3174
+ /**
3175
+ * Whether a plan is active on a subscription using that offering. The `active_plan` attribute is null if a plan is not active in a subscription.
3176
+ */
3177
+ export type ActivePlan = boolean;
3178
+ /**
3179
+ * A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.
3180
+ */
3181
+ export type ExternalRef = string;
3182
+ /**
3183
+ * A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.
3184
+ */
3185
+ export type ExternalRefUpdate = string | null;
3186
+ export type SubscriptionType = "subscription";
3187
+ export type SubscriptionProductType = "subscription_product";
3188
+ export type ProrationPolicyType = "subscription_proration_policy";
3189
+ export type SubscriptionDunningRuleType = "subscription_dunning_rule";
3190
+ export type SubscriptionPlanType = "subscription_plan";
3191
+ export type SubscriptionFeatureType = "subscription_feature";
3192
+ export type SubscriptionOfferingType = "subscription_offering";
3193
+ export type SubscriptionOfferingFeatureType = "subscription_offering_feature";
3194
+ export type SubscriptionOfferingProductType = "subscription_offering_product";
3195
+ export type SubscriptionOfferingPlanType = "subscription_offering_plan";
3196
+ export type SubscriptionJobType = "subscription_job";
3197
+ export type SubscriptionImportType = "subscription_import";
3198
+ export type SubscriptionImportErrorType = "subscription_import_error";
3199
+ export type SubscriptionImportError = {
3200
+ id: Uuid;
3201
+ type: SubscriptionImportErrorType;
3202
+ meta: SubscriptionImportErrorMeta;
3203
+ };
3204
+ export type SubscriptionImportErrorMeta = {
3205
+ owner: string;
3206
+ timestamps: Timestamps;
3207
+ error: string;
3208
+ field: string;
3209
+ /**
3210
+ * The line in the imported JSONL file at which the validation error occurred. Starts from 1.
3211
+ */
3212
+ line_number: number;
3213
+ external_ref?: ExternalRef;
3214
+ };
3215
+ /**
3216
+ * This represents the type of resource object being returned. Always `subscription_invoice`.
3217
+ */
3218
+ export type SubscriptionInvoiceType = "subscription_invoice";
3219
+ /**
3220
+ * This represents the type of resource object being returned. Always `subscription_invoice_payment`.
3221
+ */
3222
+ export type SubscriptionInvoicePaymentType = "subscription_invoice_payment";
3223
+ export type Links2 = {
3224
+ [key: string]: Link;
3225
+ };
3226
+ export type Link = LinkUri | LinkObject;
3227
+ export type LinkUri = string | null;
3228
+ export type LinkObject = {
3229
+ href?: string;
3230
+ title?: string;
3231
+ describedby?: string;
3232
+ };
3233
+ export type Timestamps = {
3234
+ /**
3235
+ * The date and time a resource was updated.
3236
+ */
3237
+ updated_at: string;
3238
+ /**
3239
+ * The date and time a resource was created.
3240
+ */
3241
+ created_at: string;
3242
+ };
3243
+ /**
3244
+ * The status of a subscription, either `active` or `inactive`.
3245
+ */
3246
+ export type Status = "active" | "inactive";
3247
+ /**
3248
+ * Relationships are established between different subscription entities. For example, a product and a plan are related to an offering, as both are attached to it.
3249
+ */
3250
+ export type Relationships = unknown;
3251
+ export type Relationship = SingleRelationship | ManyRelationship;
3252
+ /**
3253
+ * The list of resources that are related.
3254
+ */
3255
+ export type ManyRelationship = {
3256
+ data?: Array<RelationshipData>;
3257
+ links?: RelationshipLinks;
3258
+ };
3259
+ /**
3260
+ * The subscription resource that is related.
3261
+ */
3262
+ export type SingleRelationship = {
3263
+ data?: RelationshipData;
3264
+ links?: RelationshipLinks;
3265
+ };
3266
+ export type RelationshipData = {
3267
+ id: Uuid;
3268
+ /**
3269
+ * This represents the type of resource being returned.
3270
+ */
3271
+ type: string;
3272
+ };
3273
+ /**
3274
+ * Links are used to allow you, as an API consumer, to move between requests. Single entities use a self parameter with a link to that specific resource. Sometimes, there aren’t enough entities for a project to fill multiple pages. In this situation, we return some defaults, instead of expecting you to check for these special cases.
3275
+ *
3276
+ * - current - Always the current page.
3277
+ * - first - Always the first page.
3278
+ * - last - always `null`.
3279
+ * - next - `null` if the user is on the first page.
3280
+ * - previous - `null` if there is only one page.
3281
+ *
3282
+ */
3283
+ export type RelationshipLinks = {
3284
+ related?: string;
3285
+ };
3286
+ /**
3287
+ * A period of time between a start and end point.
3288
+ */
3289
+ export type TimePeriod = {
3290
+ /**
3291
+ * The date and time a billing period started.
3292
+ */
3293
+ start: Date;
3294
+ /**
3295
+ * The date and time a billing period ended.
3296
+ */
3297
+ end: Date;
3298
+ };
3299
+ /**
3300
+ * A price in a single currency.
3301
+ */
3302
+ export type SingleCurrencyPrice = {
3303
+ /**
3304
+ * The three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in uppercase, associated with a price.
3305
+ */
3306
+ currency: string;
3307
+ /**
3308
+ * The value as a whole number of the currency's smallest subdivision.
3309
+ */
3310
+ amount: BigInt;
3311
+ /**
3312
+ * Whether the amount includes any taxes.
3313
+ */
3314
+ includes_tax?: boolean;
3315
+ };
3316
+ /**
3317
+ * A unit of time.
3318
+ */
3319
+ export type Unit = "day" | "month";
3320
+ /**
3321
+ * The timeframe during which the product price is applicable. For example, for a streaming service, the price is $12.99 and the `unit` is `months` and the `amount` is `1`. In other words, the streaming service is available for $12.99 a month. You may want to specify a unit price if you have many products that all have different prices. Rather than having to create separate plans for each product, you can specify the timeframe during which the product price is applicable and then create one plan that determines the billing frequency for those products.
3322
+ */
3323
+ export type PriceUnits = {
3324
+ /**
3325
+ * A unit of time.
3326
+ */
3327
+ unit: "day" | "month";
3328
+ /**
3329
+ * The number of days or months the period covers.
3330
+ */
3331
+ amount: number;
3332
+ };
3333
+ /**
3334
+ * The timeframe during which the product price is applicable. For example, for a streaming service, the price is $12.99 and the `unit` is `months` and the `amount` is `1`. In other words, the streaming service is available for $12.99 a month. You may want to specify a unit price if you have many products that all have different prices. Rather than having to create separate plans for each product, you can specify the timeframe during which the product price is applicable and then create one plan that determines the billing frequency for those products.
3335
+ */
3336
+ export type NullablePriceUnits = {
3337
+ /**
3338
+ * A unit of time, either days or months.
3339
+ */
3340
+ unit: "day" | "month";
3341
+ /**
3342
+ * The number of days or months the period covers.
3343
+ */
3344
+ amount: number;
3345
+ } | null;
3346
+ export type Price = unknown;
3347
+ export type NullablePrice = {
3348
+ [key: string]: {
3349
+ /**
3350
+ * The value as a whole number of the currency's smallest subdivision.
3351
+ */
3352
+ amount: BigInt;
3353
+ /**
3354
+ * Whether the amount includes any taxes.
3355
+ */
3356
+ includes_tax?: boolean;
3357
+ } | null;
3358
+ } | null;
3359
+ export type DisplayPrice2 = {
3360
+ without_tax?: PriceFormatting;
3361
+ with_tax?: PriceFormatting;
3362
+ };
3363
+ export type PriceFormatting = {
3364
+ /**
3365
+ * The unformatted amount for the objects.
3366
+ */
3367
+ amount: BigInt;
3368
+ /**
3369
+ * The three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in uppercase, associated with a price.
3370
+ */
3371
+ currency: string;
3372
+ /**
3373
+ * The formatted amount for the objects.
3374
+ */
3375
+ formatted: string;
3376
+ };
3377
+ export type Feature = {
3378
+ id?: Uuid;
3379
+ type: SubscriptionFeatureType;
3380
+ attributes: FeatureResponseAttributes;
3381
+ meta: FeatureMeta;
3382
+ };
3383
+ export type FeatureMeta = {
3384
+ owner: OwnerMeta;
3385
+ timestamps: Timestamps;
3386
+ };
3387
+ export type FeatureCreate = {
3388
+ type: SubscriptionFeatureType;
3389
+ attributes: FeatureAttributes;
3390
+ };
3391
+ export type FeatureUpdate = {
3392
+ id: Uuid;
3393
+ type: SubscriptionFeatureType;
3394
+ attributes: FeatureUpdateAttributes;
3395
+ };
3396
+ export type FeatureResponseAttributes = FeatureAttributes;
3397
+ /**
3398
+ * A tag to add to the customer's account when entitled to the feature.
3399
+ */
3400
+ export type FeatureTag = string;
3401
+ export type FeatureAccessAttributes = {
3402
+ type: "access";
3403
+ tag: FeatureTag;
3404
+ };
3405
+ export type FeaturePromotion = {
3406
+ /**
3407
+ * The name of the feature.
3408
+ */
3409
+ name: string;
3410
+ tag: FeatureTag;
3411
+ promotion_id?: Uuid;
3412
+ };
3413
+ export type FeaturePromotionAttributes = {
3414
+ type: "promotion";
3415
+ promotions: Array<FeaturePromotion>;
3416
+ };
3417
+ export type FeatureUsageAttributes = {
3418
+ type: "usage";
3419
+ tag: FeatureTag;
3420
+ /**
3421
+ * The property that has a usage limit.
3422
+ */
3423
+ label: string;
3424
+ /**
3425
+ * The default initial value
3426
+ */
3427
+ default_value: number;
3428
+ };
3429
+ export type FeatureConfiguration = (({
3430
+ type?: "access";
3431
+ } & FeatureAccessAttributes) | ({
3432
+ type?: "promotion";
3433
+ } & FeaturePromotionAttributes) | ({
3434
+ type?: "usage";
3435
+ } & FeatureUsageAttributes)) & {
3436
+ /**
3437
+ * The type of feature, one of access, promotion or usage.
3438
+ */
3439
+ type: "access" | "promotion" | "usage";
3440
+ };
3441
+ export type FeatureAttributes = {
3442
+ external_ref?: ExternalRef;
3443
+ /**
3444
+ * The name of the feature.
3445
+ */
3446
+ name: string;
3447
+ /**
3448
+ * The feature description to display to customers.
3449
+ */
3450
+ description?: string;
3451
+ configuration: FeatureConfiguration;
3452
+ };
3453
+ export type FeatureUpdateAttributes = {
3454
+ external_ref?: ExternalRefUpdate;
3455
+ /**
3456
+ * The name of the feature.
3457
+ */
3458
+ name?: string;
3459
+ /**
3460
+ * The feature description to display to customers.
3461
+ */
3462
+ description?: string | null;
3463
+ configuration?: FeatureConfiguration;
3464
+ };
3465
+ export type Product2 = {
3466
+ id?: Uuid;
3467
+ type: SubscriptionProductType;
3468
+ attributes: ProductResponseAttributes;
3469
+ meta: ProductMeta2;
3470
+ };
3471
+ export type ProductMeta2 = {
3472
+ display_price?: DisplayPrice2;
3473
+ owner: OwnerMeta;
3474
+ timestamps: Timestamps;
3475
+ };
3476
+ export type ProductCreate = {
3477
+ type: SubscriptionProductType;
3478
+ attributes: ProductAttributes2;
3479
+ };
3480
+ export type ProductUpdate = {
3481
+ id: Uuid;
3482
+ type: SubscriptionProductType;
3483
+ attributes: ProductUpdateAttributes;
3484
+ };
3485
+ export type OfferingProductResponseAttributes = ProductResponseAttributes & OfferingProductResponseExtraAttributes;
3486
+ export type OfferingProductResponseExtraAttributes = {
3487
+ /**
3488
+ * A map of configurations indicating which features are available for the product
3489
+ */
3490
+ feature_configurations: {
3491
+ [key: string]: FeatureProductConfiguration;
3492
+ };
3493
+ };
3494
+ export type ProductResponseAttributes = ProductAttributes2 & Timestamps;
3495
+ export type ProductAttributes2 = {
3496
+ external_ref?: ExternalRef;
3497
+ /**
3498
+ * The name of the product.
3499
+ */
3500
+ name: string;
3501
+ /**
3502
+ * The product or service description to display to customers.
3503
+ */
3504
+ description?: string;
3505
+ /**
3506
+ * A stock keeping unit for the product, if appropriate.
3507
+ */
3508
+ sku?: string;
3509
+ /**
3510
+ * A URL from which an image or file for the product can be fetched. You can either upload your images and files to Commerce using the Commerce Files API or you can use your own content delivery network. If you are using the Commerce Files API, use [**Create a File**](/docs/api/pxm/files/create-a-file) to upload your file and return an HREF link in the response. An extensive range of [**media and file extensions**](/docs/api/pxm/files/files-service-api) are supported.
3511
+ */
3512
+ main_image?: string;
3513
+ price?: Price;
3514
+ price_units?: PriceUnits;
3515
+ };
3516
+ export type OfferingProductUpdateAttributes = ProductUpdateAttributes & OfferingProductUpdateExtraAttributes;
3517
+ export type OfferingProductUpdateExtraAttributes = {
3518
+ /**
3519
+ * A map of configurations indicating which features are available for the product
3520
+ */
3521
+ feature_configurations?: {
3522
+ [key: string]: FeatureProductConfigurationUpdate;
3523
+ };
3524
+ };
3525
+ export type ProductUpdateAttributes = {
3526
+ external_ref?: ExternalRefUpdate;
3527
+ /**
3528
+ * The name of the product.
3529
+ */
3530
+ name?: string;
3531
+ /**
3532
+ * The product or service description to display to customers.
3533
+ */
3534
+ description?: string | null;
3535
+ /**
3536
+ * A stock keeping unit for the product, if appropriate.
3537
+ */
3538
+ sku?: string | null;
3539
+ /**
3540
+ * A URL from which an image or file for the product can be fetched. You can either upload your images and files to Commerce using the Commerce Files API or you can use your own content delivery network. If you are using the Commerce Files API, use [**Create a File**](/docs/api/pxm/files/create-a-file) to upload your file and return an HREF link in the response. An extensive range of [**media and file extensions**](/docs/api/pxm/files/files-service-api) are supported.
3541
+ */
3542
+ main_image?: string | null;
3543
+ price?: NullablePrice;
3544
+ price_units?: NullablePriceUnits;
3545
+ };
3546
+ export type DunningRule = {
3547
+ id?: Uuid;
3548
+ type: SubscriptionDunningRuleType;
3549
+ attributes: DunningRuleAttributes;
3550
+ meta: DunningRuleMeta;
3551
+ };
3552
+ export type DunningRuleMeta = {
3553
+ owner: OwnerMeta;
3554
+ timestamps: Timestamps;
3555
+ };
3556
+ export type DunningRuleCreate = {
3557
+ type: SubscriptionDunningRuleType;
3558
+ attributes: DunningRuleAttributes;
3559
+ };
3560
+ export type DunningRuleUpdate = {
3561
+ id: Uuid;
3562
+ type: SubscriptionDunningRuleType;
3563
+ attributes: DunningRuleUpdateAttributes;
3564
+ };
3565
+ /**
3566
+ * The strategy used to make payments. Always `fixed`. This means payments are retried on a fixed schedule as defined by the `payment_retry_unit` and `payment_retry_interval`, for example, every two days.
3567
+ *
3568
+ */
3569
+ export type PaymentRetryType = "fixed" | "backoff" | "tiered";
3570
+ /**
3571
+ * The unit of time used to measure the intervals between payment attempts or retries.
3572
+ */
3573
+ export type PaymentRetryUnit = "day" | "week";
3574
+ /**
3575
+ * The action to take after all payment attempts for an invoice have failed.
3576
+ *
3577
+ * - None - the subscription remains active and Subscriptions does not attempt to retry the payment. However, the subscription is still available for a subscriber to use.
3578
+ * - Suspend the subscription. Subscriptions does not attempt to retry the payment. A subscriber can choose to pay the outstanding invoice. However, a subscriber cannot renew their subscription; a merchandizer must renew the subscription on behalf of the subscriber.
3579
+ * - close a subscription. The subscription ends and it's status becomes `inactive`. However, a merchandizer can choose to resume the subscription if a subscriber pays the outstanding payment.
3580
+ *
3581
+ */
3582
+ export type Action = "none" | "pause" | "close" | "suspend";
3583
+ /**
3584
+ * The dunning rule attributes you can use to configure your payment retry strategy.
3585
+ *
3586
+ */
3587
+ export type DunningRuleAttributes = {
3588
+ /**
3589
+ * The strategy used to make payments. Always `fixed`. This means payments are retried on a fixed schedule as defined by the `payment_retry_unit` and `payment_retry_interval`, for example, every two days.
3590
+ *
3591
+ */
3592
+ payment_retry_type: "fixed" | "backoff" | "tiered";
3593
+ /**
3594
+ * The number of `payment_interval_unit`s to wait between each payment retry attempt.
3595
+ */
3596
+ payment_retry_interval?: BigInt;
3597
+ /**
3598
+ * The unit of time used to measure the intervals between payment attempts or retries.
3599
+ */
3600
+ payment_retry_unit?: "day" | "week";
3601
+ /**
3602
+ * The multiplier that increases the interval between consecutive each payment attempts or retries. This is typically used to gradually extend the time between retries. Allowing more time between attempts as failures persist, helps reduce the risk of triggering multiple failures in a short period and gives the subscriber more time to resolve the issue. Must only be set for backup types.
3603
+ */
3604
+ payment_retry_multiplier?: number;
3605
+ /**
3606
+ * The number of times Subscriptions attempts payment retries before `action` is taken.
3607
+ */
3608
+ payment_retries_limit: BigInt;
3609
+ /**
3610
+ * The action to take after all payment attempts for an invoice have failed.
3611
+ *
3612
+ * - None - the subscription remains active and Subscriptions does not attempt to retry the payment. However, the subscription is still available for a subscriber to use.
3613
+ * - Suspend the subscription. Subscriptions does not attempt to retry the payment. A subscriber can choose to pay the outstanding invoice. However, a subscriber cannot renew their subscription; a merchandizer must renew the subscription on behalf of the subscriber.
3614
+ * - close a subscription. The subscription ends and it's status becomes `inactive`. However, a merchandizer can choose to resume the subscription if a subscriber pays the outstanding payment.
3615
+ *
3616
+ */
3617
+ action: "none" | "pause" | "close" | "suspend";
3618
+ /**
3619
+ * Set to `true` if you want this rule to be the default for the store.
3620
+ */
3621
+ default?: boolean;
3622
+ };
3623
+ export type DunningRuleUpdateAttributes = {
3624
+ /**
3625
+ * The strategy used to make payments. Always `fixed`. This means payments are retried on a fixed schedule as defined by the `payment_retry_unit` and `payment_retry_interval`, for example, every two days.
3626
+ *
3627
+ */
3628
+ payment_retry_type?: "fixed" | "backoff" | "tiered";
3629
+ /**
3630
+ * The number of `payment_interval_unit`s to wait between each payment retry attempt.
3631
+ */
3632
+ payment_retry_interval?: BigInt | null;
3633
+ /**
3634
+ * The unit of time used to measure the intervals between payment attempts or retries.
3635
+ */
3636
+ payment_retry_unit?: "day" | "week";
3637
+ /**
3638
+ * The multiplier that increases the interval between consecutive each payment attempts or retries. This is typically used to gradually extend the time between retries. Allowing more time between attempts as failures persist, helps reduce the risk of triggering multiple failures in a short period and gives the subscriber more time to resolve the issue. Must only be set for backup types.
3639
+ */
3640
+ payment_retry_multiplier?: number | null;
3641
+ /**
3642
+ * The number of times Subscriptions attempts payment retries before `action` is taken.
3643
+ */
3644
+ payment_retries_limit?: BigInt;
3645
+ /**
3646
+ * The action to take after all payment attempts for an invoice have failed.
3647
+ */
3648
+ action?: "none" | "pause" | "close" | "suspend";
3649
+ /**
3650
+ * Set to `true` if you want this rule to be the default for the store.
3651
+ */
3652
+ default?: boolean;
3653
+ };
3654
+ export type ProrationPolicy = {
3655
+ id?: Uuid;
3656
+ type: ProrationPolicyType;
3657
+ attributes: ProrationPolicyResponseAttributes;
3658
+ meta: ProrationPolicyMeta;
3659
+ };
3660
+ export type ProrationPolicyUpdate = {
3661
+ id: Uuid;
3662
+ type: ProrationPolicyType;
3663
+ attributes: ProrationPolicyUpdateAttributes;
3664
+ };
3665
+ export type ProrationPolicyRelationshipAttributes = {
3666
+ type: ProrationPolicyType;
3667
+ id: Uuid;
3668
+ };
3669
+ export type ProrationPolicyUpdateRelationshipAttributes = {
3670
+ type: ProrationPolicyType;
3671
+ id: Uuid;
3672
+ } | null;
3673
+ export type ProrationPolicyResponseAttributes = ProrationPolicyAttributes;
3674
+ export type ProrationPolicyCreate = {
3675
+ type: ProrationPolicyType;
3676
+ attributes: ProrationPolicyAttributes;
3677
+ };
3678
+ /**
3679
+ * When rounding in proration, you must decide how to round the units of time used to calculate the charges.
3680
+ *
3681
+ * - round up to the next unit, ensuring subscribers are charged slightly more to cover any partial use.
3682
+ * - round down to the previous whole unit, providing subscribers with a slight benefit by not charging for partial use.
3683
+ * - round to the nearest whole unit, whether up or down, based on standard rounding rules. For example, rounding 0.5 up and rounding 0.5 down.
3684
+ *
3685
+ */
3686
+ export type Rounding = "up" | "down" | "nearest";
3687
+ export type ProrationPolicyAttributes = {
3688
+ /**
3689
+ * A name for the proration policy.
3690
+ */
3691
+ name: string;
3692
+ /**
3693
+ * When rounding in proration, you must decide how to round the units of time used to calculate the charges.
3694
+ *
3695
+ * - round up to the next unit, ensuring subscribers are charged slightly more to cover any partial use.
3696
+ * - round down to the previous whole unit, providing subscribers with a slight benefit by not charging for partial use.
3697
+ * - round to the nearest whole unit, whether up or down, based on standard rounding rules. For example, rounding 0.5 up and rounding 0.5 down.
3698
+ *
3699
+ */
3700
+ rounding: "up" | "down" | "nearest";
3701
+ external_ref?: ExternalRef;
3702
+ };
3703
+ export type ProrationPolicyUpdateAttributes = {
3704
+ external_ref?: ExternalRefUpdate;
3705
+ /**
3706
+ * The name of the proration policy.
3707
+ */
3708
+ name?: string;
3709
+ /**
3710
+ * Whether to round up or down
3711
+ */
3712
+ rounding?: "up" | "down" | "nearest";
3713
+ };
3714
+ export type ProrationPolicyMeta = {
3715
+ owner: OwnerMeta;
3716
+ timestamps: Timestamps;
3717
+ };
3718
+ export type Plan = {
3719
+ id?: Uuid;
3720
+ type: SubscriptionPlanType;
3721
+ attributes: PlanResponseAttributes;
3722
+ meta: PlanMeta;
3723
+ };
3724
+ export type PlanMeta = {
3725
+ owner: OwnerMeta;
3726
+ timestamps: Timestamps;
3727
+ };
3728
+ export type PlanCreate = {
3729
+ type: SubscriptionPlanType;
3730
+ attributes: PlanAttributes;
3731
+ };
3732
+ export type PlanUpdate = {
3733
+ id: Uuid;
3734
+ type: SubscriptionPlanType;
3735
+ attributes: PlanUpdateAttributes;
3736
+ };
3737
+ export type PlanResponseAttributes = PlanAttributes & Timestamps;
3738
+ /**
3739
+ * The unit of time that billing intervals are measured.
3740
+ */
3741
+ export type BillingIntervalType = "day" | "week" | "month" | "year";
3742
+ /**
3743
+ * Enables you to specify recurring payments. If `end_behavior` is `roll`, customers pay regularly and repeatedly. If `end_behavior` is `close`, customers pay a total amount in a limited number of partial payments.
3744
+ */
3745
+ export type EndBehavior = "close" | "roll";
3746
+ export type PlanAttributes = {
3747
+ external_ref?: ExternalRef;
3748
+ /**
3749
+ * A name for the plan.
3750
+ */
3751
+ name: string;
3752
+ /**
3753
+ * The plan description to display to customers.
3754
+ */
3755
+ description?: string;
3756
+ /**
3757
+ * The unit of time that billing intervals are measured.
3758
+ */
3759
+ billing_interval_type: "day" | "week" | "month" | "year";
3760
+ /**
3761
+ * The number of intervals between issuing bills.
3762
+ */
3763
+ billing_frequency: number;
3764
+ /**
3765
+ * The number of intervals from the start of the subscription before billing starts. Used with `billing_interval_type`. For example, if `billing_interval_type` is `months`, and `trial_period` is `1`, the trial period is 1 month.
3766
+ */
3767
+ trial_period?: number;
3768
+ /**
3769
+ * The number of intervals that the subscription runs for.
3770
+ */
3771
+ plan_length: number;
3772
+ /**
3773
+ * Enables you to specify recurring payments. If `end_behavior` is `roll`, customers pay regularly and repeatedly. If `end_behavior` is `close`, customers pay a total amount in a limited number of partial payments.
3774
+ */
3775
+ end_behavior: "close" | "roll";
3776
+ /**
3777
+ * The subscriber can pause a subscription.
3778
+ */
3779
+ can_pause: boolean;
3780
+ /**
3781
+ * The subscriber can resume a paused subscription.
3782
+ */
3783
+ can_resume: boolean;
3784
+ /**
3785
+ * The subscriber can cancel a subscription.
3786
+ */
3787
+ can_cancel: boolean;
3788
+ /**
3789
+ * A percentage discount on the total cost of any products within an offering. For example, you can configure a percentage that equates the cost of a plan to the total value of all products within the offering, reduced by a percentage. For example, if you specify `10`, a 10% discount is applied to the total value of all repeat products in an offering.
3790
+ */
3791
+ base_price_percentage?: number;
3792
+ fixed_price?: Price;
3793
+ };
3794
+ export type PlanUpdateAttributes = {
3795
+ external_ref?: ExternalRefUpdate;
3796
+ name?: string;
3797
+ /**
3798
+ * The plan description to display to customers.
3799
+ */
3800
+ description?: string | null;
3801
+ /**
3802
+ * The unit of time in which billing intervals are measured.
3803
+ */
3804
+ billing_interval_type?: "day" | "week" | "month" | "year";
3805
+ /**
3806
+ * The number of intervals between issuing bills.
3807
+ */
3808
+ billing_frequency?: number;
3809
+ /**
3810
+ * The number of intervals from the start of the subscription before billing starts. Used with `billing_interval_type`. For example, if `billing_interval_type` is `months`, and `trial_period` is `1`, the trial period is 1 month.
3811
+ */
3812
+ trial_period?: number | null;
3813
+ /**
3814
+ * The length of time for which a subscription plan is valid. For example, six months after which the plan is renewed.
3815
+ */
3816
+ plan_length?: number;
3817
+ /**
3818
+ * Enables you to specify recurring payments. If `end_behavior` is `roll`, customers pay regularly and repeatedly. If `end_behavior` is `close`, customers pay a total amount in a limited number of partial payments.
3819
+ */
3820
+ end_behavior?: "close" | "roll";
3821
+ /**
3822
+ * The subscriber can pause a subscription.
3823
+ */
3824
+ can_pause?: boolean;
3825
+ /**
3826
+ * The subscriber can resume a paused subscription.
3827
+ */
3828
+ can_resume?: boolean;
3829
+ /**
3830
+ * The subscriber can cancel a subscription.
3831
+ */
3832
+ can_cancel?: boolean;
3833
+ /**
3834
+ * A percentage discount on the total cost of any products within an offering. For example, you can configure a percentage that equates the cost of a plan to the total value of all products within the offering, reduced by a percentage. For example, if you specify `10`, a 10% discount is applied to the total value of all repeat products in an offering.
3835
+ */
3836
+ base_price_percentage?: number | null;
3837
+ fixed_price?: NullablePrice;
3838
+ };
3839
+ export type BuildOffering = {
3840
+ external_ref?: ExternalRef;
3841
+ /**
3842
+ * The name of the offering.
3843
+ */
3844
+ name: string;
3845
+ /**
3846
+ * The offering description to display to customers.
3847
+ */
3848
+ description?: string;
3849
+ /**
3850
+ * The unique ID or external ref of the proration policy
3851
+ */
3852
+ proration_policy_id?: string;
3853
+ /**
3854
+ * Either references of existing features (id or external_ref) to be attached to the offering or feature information to be created directly within the offering
3855
+ */
3856
+ features?: Array<ExternalRef | FeatureAttributes | Uuid>;
3857
+ /**
3858
+ * Either references of existing products (id or external_ref) to be attached to the offering or product information to be created directly within the offering
3859
+ */
3860
+ products: Array<ExternalRef | ProductAttributes2 | Uuid>;
3861
+ /**
3862
+ * Either references of existing plans (id or external_ref) to be attached to the offering or plan information to be created directly within the offering
3863
+ */
3864
+ plans: Array<ExternalRef | PlanAttributes | Uuid>;
3865
+ };
3866
+ export type Offering = {
3867
+ id?: Uuid;
3868
+ type: SubscriptionOfferingType;
3869
+ attributes: OfferingResponseAttributes;
3870
+ relationships?: Relationships;
3871
+ meta: OfferingMeta;
3872
+ };
3873
+ export type OfferingIncludes = {
3874
+ features?: Array<OfferingFeature>;
3875
+ products?: Array<OfferingProduct>;
3876
+ plans?: Array<OfferingPlan>;
3877
+ };
3878
+ export type OfferingMeta = {
3879
+ external_product_refs: Array<OfferingProductExternalRefMeta>;
3880
+ owner: OwnerMeta;
3881
+ timestamps: Timestamps;
3882
+ };
3883
+ export type OfferingCreate = {
3884
+ type: SubscriptionOfferingType;
3885
+ attributes: OfferingAttributes;
3886
+ relationships?: OfferingRelationships;
3887
+ };
3888
+ export type OfferingProductUpdate = {
3889
+ id: Uuid;
3890
+ type: SubscriptionOfferingProductType;
3891
+ attributes: OfferingProductUpdateAttributes;
3892
+ };
3893
+ /**
3894
+ * Configures an access feature against a product in an offering, indicating that the referenced feature is a benefit of that product.
3895
+ */
3896
+ export type FeatureConfigAccessAttributes = {
3897
+ type: "access";
3898
+ };
3899
+ /**
3900
+ * Configures a promotion feature against a product in an offering, indicating that the referenced feature is a benefit of that product. The tag of the specific promotion that it to be made available must be supplied.
3901
+ */
3902
+ export type FeatureConfigPromotionAttributes = {
3903
+ type: "promotion";
3904
+ tag: FeatureTag;
3905
+ };
3906
+ /**
3907
+ * Configures a usgae feature against a product in an offering, indicating that the referenced feature is a benefit of that product. The default value that the usage metrics adopts must be supplied.
3908
+ */
3909
+ export type FeatureConfigUsageAttributes = {
3910
+ type: "usage";
3911
+ /**
3912
+ * The default initial value
3913
+ */
3914
+ default_value: number;
3915
+ };
3916
+ export type FeatureProductConfiguration = (({
3917
+ type?: "access";
3918
+ } & FeatureConfigAccessAttributes) | ({
3919
+ type?: "promotion";
3920
+ } & FeatureConfigPromotionAttributes) | ({
3921
+ type?: "usage";
3922
+ } & FeatureConfigUsageAttributes)) & {
3923
+ /**
3924
+ * The type of feature, one of access, promotion or usage.
3925
+ */
3926
+ type: "access" | "promotion" | "usage";
3927
+ };
3928
+ export type FeatureProductConfigurationUpdate = (({
3929
+ type?: "access";
3930
+ } & FeatureConfigAccessAttributes) | ({
3931
+ type?: "promotion";
3932
+ } & FeatureConfigPromotionAttributes) | ({
3933
+ type?: "usage";
3934
+ } & FeatureConfigUsageAttributes) | null) & {
3935
+ /**
3936
+ * The type of feature, one of access, promotion or usage.
3937
+ */
3938
+ type: "access" | "promotion" | "usage";
3939
+ };
3940
+ export type OfferingFeatureUpdate = {
3941
+ id: Uuid;
3942
+ type: SubscriptionOfferingFeatureType;
3943
+ attributes: FeatureUpdateAttributes;
3944
+ };
3945
+ export type OfferingFeature = {
3946
+ id?: Uuid;
3947
+ type: SubscriptionOfferingFeatureType;
3948
+ attributes: FeatureResponseAttributes;
3949
+ relationships?: Relationships;
3950
+ meta: FeatureMeta;
3951
+ };
3952
+ export type OfferingProduct = {
3953
+ id?: Uuid;
3954
+ type: SubscriptionOfferingProductType;
3955
+ attributes: OfferingProductResponseAttributes;
3956
+ relationships?: Relationships;
3957
+ meta: ProductMeta2;
3958
+ };
3959
+ export type OfferingPlanUpdate = {
3960
+ id: Uuid;
3961
+ type: SubscriptionOfferingPlanType;
3962
+ attributes: PlanUpdateAttributes;
3963
+ };
3964
+ export type OfferingPlan = {
3965
+ id?: Uuid;
3966
+ type: SubscriptionOfferingPlanType;
3967
+ attributes: PlanResponseAttributes;
3968
+ relationships?: Relationships;
3969
+ meta: OfferingPlanMeta;
3970
+ };
3971
+ export type OfferingPlanMeta = {
3972
+ price?: Price;
3973
+ display_price?: DisplayPrice2;
3974
+ active_plan?: ActivePlan;
3975
+ owner: OwnerMeta;
3976
+ timestamps: Timestamps;
3977
+ };
3978
+ /**
3979
+ * A list of feature IDs to attach to the offering. See [**List Features**](/docs/api/subscriptions/list-features).
3980
+ */
3981
+ export type OfferingFeatureAttach = {
3982
+ features: Array<Uuid>;
3983
+ };
3984
+ /**
3985
+ * A list of plan IDs to attach to the offering. See [**List Plans**](/docs/api/subscriptions/list-plans).
3986
+ */
3987
+ export type OfferingPlanAttach = {
3988
+ plans: Array<Uuid>;
3989
+ };
3990
+ /**
3991
+ * A list of product IDs to attach to the offering. See [**List Products**](/docs/api/subscriptions/list-products).
3992
+ */
3993
+ export type OfferingProductAttach = {
3994
+ products: Array<Uuid>;
3995
+ };
3996
+ /**
3997
+ * A list of product IDs to replace on the offering. See [**List Products**](/docs/api/subscriptions/list-products).
3998
+ */
3999
+ export type OfferingProductReplace = {
4000
+ products: Array<Uuid>;
4001
+ };
4002
+ export type OfferingUpdate = unknown & {
4003
+ id: Uuid;
4004
+ type: SubscriptionOfferingType;
4005
+ attributes?: OfferingUpdateAttributes;
4006
+ relationships?: OfferingUpdateRelationships;
4007
+ };
4008
+ export type OfferingResponseAttributes = OfferingAttributes & Timestamps;
4009
+ export type OfferingAttributes = {
4010
+ external_ref?: ExternalRef;
4011
+ /**
4012
+ * The name of the offering.
4013
+ */
4014
+ name: string;
4015
+ /**
4016
+ * The offering description to display to customers.
4017
+ */
4018
+ description?: string;
4019
+ };
4020
+ export type OfferingUpdateAttributes = {
4021
+ external_ref?: ExternalRefUpdate;
4022
+ /**
4023
+ * The name of the offering.
4024
+ */
4025
+ name?: string;
4026
+ /**
4027
+ * The offering description to display to customers.
4028
+ */
4029
+ description?: string | null;
4030
+ };
4031
+ export type OfferingRelationships = {
4032
+ proration_policy?: ProrationPolicyRelationshipAttributes;
4033
+ };
4034
+ export type OfferingUpdateRelationships = {
4035
+ proration_policy?: ProrationPolicyUpdateRelationshipAttributes;
4036
+ };
4037
+ export type BuildSubscription = {
4038
+ external_ref?: ExternalRef;
4039
+ account_id: Uuid;
4040
+ address_id?: Uuid;
4041
+ offering_external_ref?: ExternalRef;
4042
+ offering_id?: Uuid;
4043
+ plan_id?: Uuid;
4044
+ currency: CurrencyIdentifier;
4045
+ payment_authority?: PaymentAuthority;
4046
+ manual_payments: ManualPayments;
4047
+ name: string;
4048
+ email: string;
4049
+ /**
4050
+ * Whether a subscription is pending activation or not. See [Creating a pending subscription](/docs/api/subscriptions/subscriptions#creating-a-pending-subscription).
4051
+ */
4052
+ pending?: boolean;
4053
+ /**
4054
+ * Indicates that payment for the first billing period of the subscription has already been taken. As well as creating the subscription a settled invoice is created to cover the first period.
4055
+ */
4056
+ first_invoice_paid?: boolean;
4057
+ /**
4058
+ * When importing an active subscription from an existing system you can specify the date and time of the start of the most recent period. This may only be supplied when `first_invoice_paid` is true. As well as creating the subscription a settled invoice is created to cover the correct billing period.
4059
+ */
4060
+ started_at?: string;
4061
+ offering?: OfferingAttributes;
4062
+ products?: Array<ProductAttributes2>;
4063
+ plans?: Array<PlanAttributesAndSelectedMeta>;
4064
+ selected_plan?: ExternalRef;
4065
+ meta?: SubscriptionMeta;
4066
+ };
4067
+ export type PlanAttributesAndSelectedMeta = PlanAttributes & SelectedPlanMeta;
4068
+ export type SelectedPlanMeta = {
4069
+ meta?: SelectedPlanMetaAttributes;
4070
+ };
4071
+ export type SelectedPlanMetaAttributes = {
4072
+ /**
4073
+ * One plan must be selected for use in the subscription
4074
+ */
4075
+ selected?: boolean;
4076
+ };
4077
+ export type Subscription = {
4078
+ id?: Uuid;
4079
+ type: SubscriptionType;
4080
+ attributes: SubscriptionAttributes;
4081
+ relationships?: Relationships;
4082
+ meta: SubscriptionMeta;
4083
+ };
4084
+ export type ManageSubscriptionProducts = {
4085
+ type: "attach" | "detach" | "replace";
4086
+ products: Array<Uuid>;
4087
+ };
4088
+ export type SubscriptionUpdate = {
4089
+ id: Uuid;
4090
+ type: SubscriptionType;
4091
+ attributes: SubscriptionUpdateAttributes;
4092
+ };
4093
+ export type SubscriptionUpdateAttributes = {
4094
+ plan_id?: unknown;
4095
+ address_id?: string | null;
4096
+ payment_authority?: PaymentAuthority;
4097
+ /**
4098
+ * The date and time a `pending` subscription goes live and becomes active. See [Creating a pending subscription](/docs/api/subscriptions/subscriptions#creating-a-pending-subscription).
4099
+ */
4100
+ go_live_after?: string | null;
4101
+ };
4102
+ export type SubscriptionIncludes = {
4103
+ products?: Array<OfferingProduct>;
4104
+ plans?: Array<OfferingPlan>;
4105
+ };
4106
+ export type SubscriptionMeta = {
4107
+ owner: OwnerMeta;
4108
+ timestamps: SubscriptionTimestamps;
4109
+ status: Status;
4110
+ state?: SubscriptionState;
4111
+ manual_payments: ManualPayments;
4112
+ /**
4113
+ * Indicates that the first billing period of this subscription was paid for outside of the subscriptions service.
4114
+ */
4115
+ first_invoice_prepaid: boolean;
4116
+ /**
4117
+ * Whether a subscription is canceled or not.
4118
+ */
4119
+ canceled: boolean;
4120
+ /**
4121
+ * Whether a subscription is paused or not.
4122
+ */
4123
+ paused: boolean;
4124
+ /**
4125
+ * Whether a subscription is closed or not.
4126
+ */
4127
+ closed: boolean;
4128
+ /**
4129
+ * Whether a subscription is suspended or not.
4130
+ */
4131
+ suspended: boolean;
4132
+ /**
4133
+ * Whether a subscription is pending activation or not.
4134
+ */
4135
+ pending: boolean;
4136
+ /**
4137
+ * The time when the subscription becomes eligible for a new invoice. The next invoice will be generated at the next billing run after this point.
4138
+ */
4139
+ invoice_after: string;
4140
+ };
4141
+ export type SubscriptionTimestamps = Timestamps & {
4142
+ /**
4143
+ * The date and time a subscription was cancelled.
4144
+ */
4145
+ canceled_at?: string;
4146
+ /**
4147
+ * The date and time a subscription was paused.
4148
+ */
4149
+ paused_at?: string;
4150
+ /**
4151
+ * The date and time a subscription was resumed.
4152
+ */
4153
+ resumed_at?: string;
4154
+ /**
4155
+ * The date and time a subscription will end.
4156
+ */
4157
+ end_date?: string;
4158
+ /**
4159
+ * The date and time a subscription will go live and become active.
4160
+ */
4161
+ go_live_after?: string;
4162
+ /**
4163
+ * The date and time a subscription was released from the pending state and made active.
4164
+ */
4165
+ go_live?: string;
4166
+ };
4167
+ export type SubscriptionAttributes = {
4168
+ external_ref?: ExternalRef;
4169
+ account_id: Uuid;
4170
+ address_id?: Uuid;
4171
+ offering: Offering;
4172
+ plan_id: Uuid;
4173
+ currency: CurrencyIdentifier;
4174
+ payment_authority?: PaymentAuthority;
4175
+ };
4176
+ export type ChangeState = {
4177
+ type: SubscriptionStateType;
4178
+ attributes: SubscriptionStateAttributes;
4179
+ };
4180
+ export type SubscriptionStateAttributes = {
4181
+ action: SubscriptionStateAction;
4182
+ };
4183
+ /**
4184
+ * This represents the type of resource object being returned. Always `subscription_state`.
4185
+ */
4186
+ export type SubscriptionStateType = "subscription_state";
4187
+ /**
4188
+ * The subscription lifecycle is the states that a subscription can go through when a customer subscribes to a service or a product.
4189
+ *
4190
+ * A subscription can have the following states; `canceled`, `paused`, or `resumed`.
4191
+ *
4192
+ * See [**Managing the subscription lifecycle**](/docs/api/subscriptions/subscriptions#managing-the-subscription-lifecycle).
4193
+ *
4194
+ */
4195
+ export type SubscriptionStateAction = "cancel" | "pause" | "resume" | "pending";
4196
+ export type StateMeta = {
4197
+ /**
4198
+ * The date and time a resource was created.
4199
+ */
4200
+ created_at: string;
4201
+ };
4202
+ export type SubscriptionState = {
4203
+ id?: Uuid;
4204
+ type: SubscriptionStateType;
4205
+ attributes: SubscriptionStateAttributes;
4206
+ meta: StateMeta;
4207
+ };
4208
+ /**
4209
+ * When configured to true, no payment gateway is used and a pending payment is created. See [External Payments](/docs/api/subscriptions/invoices#external-payments).
4210
+ */
4211
+ export type ManualPayments = boolean;
4212
+ export type PaymentAuthority = (({
4213
+ type?: "elastic_path_payments_stripe";
4214
+ } & PaymentAuthorityStripe) | ({
4215
+ type?: "authorize_net";
4216
+ } & PaymentAuthorityAuthorizeNet)) & {
4217
+ /**
4218
+ * The name of the payment gateway facilitating the secure transmission of payment data.
4219
+ */
4220
+ type: "authorize_net" | "elastic_path_payments_stripe";
4221
+ };
4222
+ export type NullablePaymentAuthority = (({
4223
+ type?: "elastic_path_payments_stripe";
4224
+ } & PaymentAuthorityStripe) | ({
4225
+ type?: "authorize_net";
4226
+ } & PaymentAuthorityAuthorizeNet) | null) & {
4227
+ /**
4228
+ * The name of the payment gateway facilitating the secure transmission of payment data.
4229
+ */
4230
+ type: "authorize_net" | "elastic_path_payments_stripe";
4231
+ };
4232
+ export type PaymentAuthorityAuthorizeNet = {
4233
+ /**
4234
+ * The name of the payment gateway facilitating the secure transmission of payment data.
4235
+ */
4236
+ type: "authorize_net";
4237
+ /**
4238
+ * The customer's payment profile id, unique to Authorize.net, used to facilitate payment of the subscription.
4239
+ */
4240
+ payment_profile_id?: string;
4241
+ /**
4242
+ * The customer's profile id, unique to Authorize.net, used to facilitate payment of the subscription.
4243
+ */
4244
+ customer_profile_id?: string;
4245
+ };
4246
+ export type PaymentAuthorityStripe = {
4247
+ /**
4248
+ * The name of the payment gateway facilitating the secure transmission of payment data.
4249
+ */
4250
+ type: "elastic_path_payments_stripe";
4251
+ /**
4252
+ * The unique identifier for a customer.
4253
+ */
4254
+ customer_id?: string;
4255
+ /**
4256
+ * The unique identifier of the card used to facilitate payment of the subscription. If a card payment fails, you can use the `card_id` and `customer_id` attributes to program your front-end implementation to allow your preferred payment service provider to update a subscription with new card details. See [Card declines](/docs/api/subscriptions/invoices#card-declines).
4257
+ */
4258
+ card_id?: string;
4259
+ };
4260
+ export type Import = {
4261
+ id?: Uuid;
4262
+ type: SubscriptionImportType;
4263
+ attributes: ImportAttributes;
4264
+ meta: ImportMeta;
4265
+ };
4266
+ /**
4267
+ * The status of job.
4268
+ * - **pending** - Commerce has received the request but is currently busy processing other requests.
4269
+ * - **started** - Commerce has started processing the job.
4270
+ * - **success** - The job has successfully completed.
4271
+ * - **failed** - The job has failed.
4272
+ *
4273
+ */
4274
+ export type Status2 = "pending" | "started" | "success" | "failed";
4275
+ export type ImportAttributes = {
4276
+ external_ref?: ExternalRef;
4277
+ /**
4278
+ * The status of job.
4279
+ * - **pending** - Commerce has received the request but is currently busy processing other requests.
4280
+ * - **started** - Commerce has started processing the job.
4281
+ * - **success** - The job has successfully completed.
4282
+ * - **failed** - The job has failed.
4283
+ *
4284
+ */
4285
+ status: "pending" | "started" | "success" | "failed";
4286
+ };
4287
+ export type ImportMeta = {
4288
+ owner: OwnerMeta;
4289
+ timestamps: JobTimestamps;
4290
+ records: ImportRecords;
4291
+ };
4292
+ /**
4293
+ * You can track the number of records imported to ensure the completeness, accuracy and integrity of the import. Uploaded shows the number of records ready to be imported into Subscriptions. However, this does not mean they are valid subscription objects, only that they have the correct type and their JSON format is properly formatted. Imported shows the number of records that have been both validated and successfully added to Subscriptions.
4294
+ */
4295
+ export type ImportRecords = {
4296
+ uploaded: {
4297
+ /**
4298
+ * The total number of products uploaded.
4299
+ */
4300
+ subscription_product: number;
4301
+ /**
4302
+ * The total number of plans uploaded.
4303
+ */
4304
+ subscription_plan: number;
4305
+ /**
4306
+ * The total number of subscribers uploaded.
4307
+ */
4308
+ subscription_subscriber: number;
4309
+ /**
4310
+ * The total number of offerings uploaded.
4311
+ */
4312
+ subscription_offering: number;
4313
+ /**
4314
+ * The total number of subscriptions uploaded.
4315
+ */
4316
+ subscription: number;
4317
+ };
4318
+ imported: {
4319
+ /**
4320
+ * The total number of products imported.
4321
+ */
4322
+ subscription_product: number;
4323
+ /**
4324
+ * The total number of plans imported.
4325
+ */
4326
+ subscription_plan: number;
4327
+ /**
4328
+ * The total number of subscribers imported.
4329
+ */
4330
+ subscription_subscriber: number;
4331
+ /**
4332
+ * The total number of offerings imported.
4333
+ */
4334
+ subscription_offering: number;
4335
+ /**
4336
+ * The total number of subscriptions imported.
4337
+ */
4338
+ subscription: number;
4339
+ };
4340
+ };
4341
+ export type Job = {
4342
+ id?: Uuid;
4343
+ type: SubscriptionJobType;
4344
+ attributes: JobResponseAttributes;
4345
+ relationships?: Relationships;
4346
+ meta: JobMeta;
4347
+ };
4348
+ export type JobMeta = {
4349
+ owner: OwnerMeta;
4350
+ timestamps: JobTimestamps;
4351
+ report?: JobReport;
4352
+ };
4353
+ /**
4354
+ * You can track your Subscriptions billing, tax, and payment operations using reports.
4355
+ */
4356
+ export type JobReport = BillingRunReport | TaxRunReport | PaymentRunReport;
4357
+ export type BillingRunReport = {
4358
+ /**
4359
+ * The total number of invoices created that are ready for payment.
4360
+ */
4361
+ invoices_ready_for_payment: number;
4362
+ /**
4363
+ * The total number of invoices created that need taxes to be applied before payment can be made.
4364
+ */
4365
+ invoices_tax_required: number;
4366
+ /**
4367
+ * The total number of invoices that were scheduled but creation failed.
4368
+ */
4369
+ invoice_failures: number;
4370
+ total_ready_for_payment: unknown & Price;
4371
+ total_tax_required: unknown & Price;
4372
+ };
4373
+ export type TaxRunReport = {
4374
+ /**
4375
+ * The total number of invoices to which tax was successfully added.
4376
+ */
4377
+ invoices_updated: number;
4378
+ /**
4379
+ * The total number of invoices to which tax could not be added.
4380
+ */
4381
+ invoice_failures: number;
4382
+ };
4383
+ export type PaymentRunReport = {
4384
+ /**
4385
+ * The total number of invoices for which payment was attempted.
4386
+ */
4387
+ total_payment_attempts: number;
4388
+ /**
4389
+ * The number of failed payment attempts.
4390
+ */
4391
+ failed_payments: number;
4392
+ total_collected: unknown & Price;
4393
+ };
4394
+ export type JobTimestamps = Timestamps & {
4395
+ /**
4396
+ * The date and time a job is started.
4397
+ */
4398
+ started_at?: string;
4399
+ /**
4400
+ * The date and time a job finished.
4401
+ */
4402
+ finished_at?: string;
4403
+ };
4404
+ export type JobCreate = {
4405
+ type: SubscriptionJobType;
4406
+ attributes: JobCreateAttributes;
4407
+ };
4408
+ export type JobResponseAttributes = JobCreateAttributes & JobAttributes & Timestamps;
4409
+ /**
4410
+ * The type of job. One of the following:
4411
+ * - `billing_run` - a billing run job.
4412
+ * - `payment_run` - a payment run job.
4413
+ * - `tax_run` - a tax run job.
4414
+ *
4415
+ */
4416
+ export type JobType = "billing-run" | "tax-run" | "payment-run" | "import";
4417
+ export type JobCreateAttributes = {
4418
+ external_ref?: ExternalRef;
4419
+ job_type: JobType;
4420
+ taxes?: Array<InvoiceTaxItems>;
4421
+ };
4422
+ export type JobAttributes = {
4423
+ external_ref?: ExternalRef;
4424
+ /**
4425
+ * The status of job.
4426
+ */
4427
+ status: "pending" | "started" | "success" | "failed";
4428
+ };
4429
+ export type InvoiceTaxItems = {
4430
+ invoice_id: Uuid;
4431
+ tax_items: Array<TaxItem>;
4432
+ };
4433
+ export type TaxItem = {
4434
+ /**
4435
+ * This represents the type of resource object being returned. Always `tax_item`.
4436
+ */
4437
+ type: "tax_item";
4438
+ /**
4439
+ * The name that appears on your customer's invoice and usually describes the specific type of tax, for example, `Sales`, `VAT` or `GST`.
4440
+ */
4441
+ name?: string;
4442
+ /**
4443
+ * The unique identifier assigned to goods and services for taxation purposes.
4444
+ */
4445
+ code?: string;
4446
+ /**
4447
+ * The tax rate is the percentage of the subscription amount that is required to be paid as tax.
4448
+ */
4449
+ rate: number;
4450
+ /**
4451
+ * The geographic area or political entity that has authority to levy and collect taxes.
4452
+ */
4453
+ jurisdiction?: string;
4454
+ };
4455
+ export type SubscriptionInvoice = {
4456
+ id?: Uuid;
4457
+ type: SubscriptionInvoiceType;
4458
+ attributes: SubscriptionInvoiceAttributes;
4459
+ meta: SubscriptionInvoiceMeta;
4460
+ };
4461
+ export type UpdateInvoicePayment = {
4462
+ id: Uuid;
4463
+ type: SubscriptionInvoicePaymentType;
4464
+ attributes: UpdateInvoicePaymentAttributes;
4465
+ };
4466
+ export type UpdateInvoicePaymentAttributes = {
4467
+ /**
4468
+ * Whether the payment was successful.
4469
+ */
4470
+ success: boolean;
4471
+ /**
4472
+ * An optional external ID that is specific to the gateway used.
4473
+ */
4474
+ external_payment_id?: string;
4475
+ /**
4476
+ * A message generated by an external payment method that describes why a payment fails.
4477
+ */
4478
+ failure_detail?: string;
4479
+ /**
4480
+ * The date and time the invoice payment was taken at.
4481
+ */
4482
+ payment_taken_at?: string;
4483
+ };
4484
+ export type SubscriptionInvoicePayment = {
4485
+ id: Uuid;
4486
+ type: SubscriptionInvoicePaymentType;
4487
+ attributes: SubscriptionInvoicePaymentAttributes;
4488
+ meta: SubscriptionInvoicePaymentMeta;
4489
+ };
4490
+ export type SubscriptionInvoiceMeta = {
4491
+ owner: OwnerMeta;
4492
+ subscription_id?: Uuid;
4493
+ subscriber_id?: Uuid;
4494
+ price?: SingleCurrencyPrice;
4495
+ timestamps: InvoiceTimestamps;
4496
+ proration_events: Array<ProrationEvent>;
4497
+ };
4498
+ export type ProrationEvent = {
4499
+ proration_policy_id: Uuid;
4500
+ /**
4501
+ * The value as a whole number of the currency's smallest subdivision
4502
+ */
4503
+ billing_cost_before_proration: BigInt;
4504
+ /**
4505
+ * The value as a whole number of the currency's smallest subdivision.
4506
+ */
4507
+ refunded_amount_for_unused_plan: BigInt;
4508
+ /**
4509
+ * The value as a whole number of the currency's smallest subdivision.
4510
+ */
4511
+ new_plan_cost: BigInt;
4512
+ /**
4513
+ * The date and time the subscription was prorated.
4514
+ */
4515
+ prorated_at: string;
4516
+ };
4517
+ export type InvoiceTimestamps = Timestamps & {
4518
+ /**
4519
+ * The date and time taxes were added to an invoice.
4520
+ */
4521
+ taxes_added_at?: string;
4522
+ };
4523
+ export type SubscriptionInvoicePaymentMeta = {
4524
+ owner: OwnerMeta;
4525
+ subscription_id: Uuid;
4526
+ invoice_id: Uuid;
4527
+ job_id: Uuid;
4528
+ timestamps: InvoicePaymentTimestamps;
4529
+ /**
4530
+ * Whether manual payments are enabled or the payment will be handled by the configured gateway.
4531
+ */
4532
+ manual_payment: boolean;
4533
+ };
4534
+ export type InvoicePaymentTimestamps = Timestamps & {
4535
+ /**
4536
+ * The date and time a payment was taken.
4537
+ */
4538
+ payment_taken_at?: string;
4539
+ };
4540
+ export type SubscriptionInvoiceAttributes = {
4541
+ billing_period: TimePeriod;
4542
+ invoice_items: Array<SubscriptionInvoiceItem>;
4543
+ tax_items?: Array<TaxItem>;
4544
+ /**
4545
+ * The invoice still requires payment if `true`.
4546
+ */
4547
+ outstanding: boolean;
4548
+ /**
4549
+ * A sequential number assigned by the billing run.
4550
+ */
4551
+ number?: number;
4552
+ /**
4553
+ * Whether tax is required for this invoice.
4554
+ */
4555
+ tax_required: boolean;
4556
+ /**
4557
+ * Whether the limit of payment retries has been reached.
4558
+ */
4559
+ payment_retries_limit_reached: boolean;
4560
+ /**
4561
+ * The date and time an invoice was updated.
4562
+ */
4563
+ updated_at?: string;
4564
+ /**
4565
+ * The date and time an invoice was created.
4566
+ */
4567
+ created_at?: string;
4568
+ /**
4569
+ * Whether there is a manual pending payment pending on the invoice.
4570
+ */
4571
+ manual_payment_pending: boolean;
4572
+ };
4573
+ export type SubscriptionInvoicePaymentAttributes = {
4574
+ /**
4575
+ * Whether the payment was successful.
4576
+ */
4577
+ success: boolean;
4578
+ /**
4579
+ * Whether the payment is pending (only for manual payments).
4580
+ */
4581
+ pending?: boolean;
4582
+ /**
4583
+ * Specifies the payment gateway.
4584
+ */
4585
+ gateway: string;
4586
+ /**
4587
+ * An optional external ID that is specific to the gateway used.
4588
+ */
4589
+ external_payment_id?: string;
4590
+ failure_detail?: PaymentFailureDetail;
4591
+ amount: SingleCurrencyPrice;
4592
+ };
4593
+ /**
4594
+ * The reason the payment failed.
4595
+ */
4596
+ export type PaymentFailureDetail = {
4597
+ reason?: string;
4598
+ };
4599
+ export type SubscriptionInvoiceItem = {
4600
+ /**
4601
+ * A description of the subscribed item.
4602
+ */
4603
+ description: string;
4604
+ price: SingleCurrencyPrice;
4605
+ product_id?: Uuid;
4606
+ /**
4607
+ * The start date and time of the billing period in this price
4608
+ */
4609
+ from_time_period?: string;
4610
+ /**
4611
+ * The end date and time of the billing period in this price
4612
+ */
4613
+ until_time_period?: string;
4614
+ };
4615
+ export type ErrorResponse2 = {
4616
+ errors: Array<Error2>;
4617
+ };
4618
+ export type Error2 = {
4619
+ /**
4620
+ * The HTTP response code of the error.
4621
+ */
4622
+ status: string;
4623
+ /**
4624
+ * A brief summary of the error.
4625
+ */
4626
+ title: string;
4627
+ /**
4628
+ * Optional additional detail about the error.
4629
+ */
4630
+ detail?: string;
4631
+ /**
4632
+ * Additional supporting meta data for the error.
4633
+ */
4634
+ meta?: {
4635
+ [key: string]: unknown;
4636
+ };
4637
+ };
4638
+ /**
4639
+ * The three-letter [**ISO currency code**](https://www.iso.org/iso-4217-currency-codes.html) in uppercase.
4640
+ */
4641
+ export type CurrencyIdentifier = string;
4642
+ /**
4643
+ * The unique identifier.
4644
+ */
4645
+ export type Uuid = string;
4646
+ /**
4647
+ * The owner of a resource, either `store` or `organization`.
4648
+ */
4649
+ export type OwnerMeta = string;
4650
+ /**
4651
+ * The offerings product external_ref value
4652
+ */
4653
+ export type OfferingProductExternalRefMeta = string;
4654
+ export type Subscriber = {
4655
+ id?: Uuid;
4656
+ type: SubscriptionSubscriberType;
4657
+ attributes: SubscriberResponseAttributes;
4658
+ meta: SubscriberMeta;
4659
+ };
4660
+ export type SubscriberMeta = {
4661
+ owner: OwnerMeta;
4662
+ timestamps: Timestamps;
3014
4663
  };
3015
- export type ResponsePaginationPage = {
4664
+ export type SubscriptionSubscriberType = "subscription_subscriber";
4665
+ export type SubscriberResponseAttributes = SubscriberAttributes & Timestamps;
4666
+ export type SubscriberAttributes = {
4667
+ account_id: Uuid;
3016
4668
  /**
3017
- * The current page.
4669
+ * The name of the subscriber.
3018
4670
  */
3019
- current?: number;
4671
+ name: string;
3020
4672
  /**
3021
- * The maximum number of records per page for this response. You can set this value up to 100.
4673
+ * The email of the subscriber.
3022
4674
  */
3023
- limit?: number;
4675
+ email: string;
4676
+ payment_authority?: PaymentAuthority;
4677
+ };
4678
+ export type SubscriberUpdateAttributes = {
3024
4679
  /**
3025
- * The current offset by number of records, not pages. Offset is zero-based.
4680
+ * The name of the subscriber.
3026
4681
  */
3027
- offset?: number;
4682
+ name?: string;
3028
4683
  /**
3029
- * The total page count.
4684
+ * The email of the subscriber.
3030
4685
  */
3031
- total?: number;
4686
+ email?: string;
4687
+ payment_authority?: NullablePaymentAuthority;
3032
4688
  };
3033
- export type ResponsePaginationResults = {
3034
- /**
3035
- * The total page count.
3036
- */
3037
- total?: number;
4689
+ export type SubscriberCreate = {
4690
+ type: SubscriptionSubscriberType;
4691
+ attributes: SubscriberAttributes;
3038
4692
  };
3039
- export type ResponsePageLinks = {
3040
- /**
3041
- * Always the current page.
3042
- */
3043
- current?: string;
4693
+ export type SubscriberUpdate = {
4694
+ id: Uuid;
4695
+ type: SubscriptionSubscriberType;
4696
+ attributes: SubscriberUpdateAttributes;
4697
+ };
4698
+ export type ScheduleCreate = {
4699
+ type: SubscriptionScheduleType;
4700
+ attributes: ScheduleAttributes;
4701
+ };
4702
+ export type Schedule2 = {
4703
+ id?: Uuid;
4704
+ type: SubscriptionScheduleType;
4705
+ attributes: ScheduleResponseAttributes;
4706
+ meta: ScheduleMeta;
4707
+ };
4708
+ export type ScheduleMeta = {
4709
+ scheduled_for?: Date;
4710
+ owner: OwnerMeta;
4711
+ timestamps: Timestamps;
4712
+ };
4713
+ export type SubscriptionScheduleType = "subscription_schedule";
4714
+ export type ScheduleResponseAttributes = ScheduleAttributes & Timestamps;
4715
+ export type ScheduleAttributes = {
4716
+ external_ref?: ExternalRef;
3044
4717
  /**
3045
- * Always the first page.
4718
+ * The name of the schedule.
3046
4719
  */
3047
- first?: string;
4720
+ name?: string;
3048
4721
  /**
3049
- * If there is only one page, it is `null`.
4722
+ * A cron-style specification of when the jobs should be created. See [**Schedules**](/docs/api/subscriptions/schedules).
3050
4723
  */
3051
- last?: string;
4724
+ specification: string;
3052
4725
  /**
3053
- * If there is only one page, it is `null`.
4726
+ * The location of the time zone that the schedule operates in. Subscriptions runs on Coordinated Universal Time (UTC) time and conforms to [**RFC 3339**](https://www.rfc-editor.org/rfc/rfc3339).
3054
4727
  */
3055
- next?: string;
4728
+ location: string;
4729
+ job: ScheduleJob;
4730
+ };
4731
+ export type ScheduleUpdateAttributes = {
4732
+ external_ref?: ExternalRefUpdate;
3056
4733
  /**
3057
- * if the user is on the first page, it is `null`.
4734
+ * The name of the schedule.
3058
4735
  */
3059
- prev?: string;
3060
- };
3061
- export type ResponseData = {
3062
- data?: unknown;
3063
- };
3064
- export type ResponseError = Array<unknown>;
3065
- export type Timestamps = {
4736
+ name?: string | null;
3066
4737
  /**
3067
- * The date this was created.
4738
+ * A cron-style specification of when the jobs should be created.
3068
4739
  */
3069
- created_at?: string;
4740
+ specification?: string;
3070
4741
  /**
3071
- * The date this was last updated.
4742
+ * The location of the time zone that the schedule operates in.
3072
4743
  */
3073
- updated_at?: unknown;
4744
+ location?: string;
4745
+ job?: ScheduleJob;
3074
4746
  };
3075
- export type CartTimestamps = {
3076
- created_at?: string;
3077
- updated_at?: unknown;
3078
- expires_at?: unknown;
4747
+ export type ScheduleJob = {
4748
+ job_type: JobType;
4749
+ };
4750
+ export type ScheduleUpdate = {
4751
+ id: Uuid;
4752
+ type: SubscriptionScheduleType;
4753
+ attributes: ScheduleUpdateAttributes;
3079
4754
  };
3080
4755
  /**
3081
4756
  * The language and locale your storefront prefers. See [Accept-Language](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language).
@@ -3127,6 +4802,23 @@ export type Offset = BigInt;
3127
4802
  * Product tags are used to store or assign a key word against a product. The product tag can then be used to describe or label that product. Using product tags means that you can group your products together, for example, by brand, category, subcategory, colors, types, industries, and so on. You can enhance your product list using tags, enabling you to refine your product list and run targeted promotions. Tags are used to refine the eligibility criteria for a rule. Requests populate the catalog rule tag using the `EP-Context-Tag` header.
3128
4803
  */
3129
4804
  export type Tag = string;
4805
+ /**
4806
+ * Some Subscriptions API endpoints support filtering. For the general syntax, see [**Filtering**](/guides/Getting-Started/filtering), but you must go to a specific endpoint to understand the attributes and operators an endpoint supports.
4807
+ *
4808
+ */
4809
+ export type Filter = string;
4810
+ /**
4811
+ * A comma-separated list of resources to include. See [Characteristics of Include Parameter](/guides/Getting-Started/includes#characteristics-of-include-parameter).
4812
+ */
4813
+ export type Include2 = string;
4814
+ /**
4815
+ * The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the [page length](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
4816
+ */
4817
+ export type PageLimit = BigInt;
4818
+ /**
4819
+ * The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [page length](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
4820
+ */
4821
+ export type PageOffset = BigInt;
3130
4822
  /**
3131
4823
  * The bundle configuration.
3132
4824
  */
@@ -5567,6 +7259,19 @@ export type AddCustomDiscountToCartItemData = {
5567
7259
  query?: never;
5568
7260
  url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts";
5569
7261
  };
7262
+ export type AddCustomDiscountToCartItemErrors = {
7263
+ /**
7264
+ * Unauthorized
7265
+ */
7266
+ 401: ResponseError;
7267
+ };
7268
+ export type AddCustomDiscountToCartItemError = AddCustomDiscountToCartItemErrors[keyof AddCustomDiscountToCartItemErrors];
7269
+ export type AddCustomDiscountToCartItemResponses = {
7270
+ 200: ResponseData & {
7271
+ data?: CartsCustomDiscountsResponse;
7272
+ };
7273
+ };
7274
+ export type AddCustomDiscountToCartItemResponse = AddCustomDiscountToCartItemResponses[keyof AddCustomDiscountToCartItemResponses];
5570
7275
  export type DeleteCustomDiscountFromCartItemData = {
5571
7276
  body?: never;
5572
7277
  path: {
@@ -5621,6 +7326,19 @@ export type UpdateCustomDiscountForCartItemData = {
5621
7326
  query?: never;
5622
7327
  url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts/{customdiscountID}";
5623
7328
  };
7329
+ export type UpdateCustomDiscountForCartItemErrors = {
7330
+ /**
7331
+ * Unauthorized
7332
+ */
7333
+ 401: ResponseError;
7334
+ };
7335
+ export type UpdateCustomDiscountForCartItemError = UpdateCustomDiscountForCartItemErrors[keyof UpdateCustomDiscountForCartItemErrors];
7336
+ export type UpdateCustomDiscountForCartItemResponses = {
7337
+ 200: ResponseData & {
7338
+ data?: CartsCustomDiscountsResponse;
7339
+ };
7340
+ };
7341
+ export type UpdateCustomDiscountForCartItemResponse = UpdateCustomDiscountForCartItemResponses[keyof UpdateCustomDiscountForCartItemResponses];
5624
7342
  export type CreateCartPaymentIntentData = {
5625
7343
  body?: ElasticPathPaymentsPoweredByStripePayment;
5626
7344
  path: {
@@ -5785,7 +7503,7 @@ export type GetOrderItemsResponses = {
5785
7503
  };
5786
7504
  export type GetOrderItemsResponse = GetOrderItemsResponses[keyof GetOrderItemsResponses];
5787
7505
  export type AnonymizeOrdersData = {
5788
- body?: OrdersAnonymizeRequest;
7506
+ body?: OrdersAnonymizeRequest & unknown;
5789
7507
  path?: never;
5790
7508
  query?: never;
5791
7509
  url: "/v2/orders/anonymize";
@@ -5810,7 +7528,7 @@ export type AnonymizeOrdersResponses = {
5810
7528
  };
5811
7529
  };
5812
7530
  export type AnonymizeOrdersResponse = AnonymizeOrdersResponses[keyof AnonymizeOrdersResponses];
5813
- export type AuthorizeSetupData = {
7531
+ export type PaymentSetupData = {
5814
7532
  body?: PaymentsRequest;
5815
7533
  path: {
5816
7534
  /**
@@ -5821,14 +7539,14 @@ export type AuthorizeSetupData = {
5821
7539
  query?: never;
5822
7540
  url: "/v2/orders/{orderID}/payments";
5823
7541
  };
5824
- export type AuthorizeSetupErrors = {
7542
+ export type PaymentSetupErrors = {
5825
7543
  /**
5826
7544
  * Unauthorized
5827
7545
  */
5828
7546
  401: ResponseError;
5829
7547
  };
5830
- export type AuthorizeSetupError = AuthorizeSetupErrors[keyof AuthorizeSetupErrors];
5831
- export type AuthorizeSetupResponses = {
7548
+ export type PaymentSetupError = PaymentSetupErrors[keyof PaymentSetupErrors];
7549
+ export type PaymentSetupResponses = {
5832
7550
  /**
5833
7551
  * OK
5834
7552
  */
@@ -5836,8 +7554,8 @@ export type AuthorizeSetupResponses = {
5836
7554
  data?: TransactionResponse;
5837
7555
  };
5838
7556
  };
5839
- export type AuthorizeSetupResponse = AuthorizeSetupResponses[keyof AuthorizeSetupResponses];
5840
- export type ConfirmSetupData = {
7557
+ export type PaymentSetupResponse = PaymentSetupResponses[keyof PaymentSetupResponses];
7558
+ export type ConfirmPaymentData = {
5841
7559
  body?: OrdersTransactionsConfirmRequest;
5842
7560
  path: {
5843
7561
  /**
@@ -5852,19 +7570,19 @@ export type ConfirmSetupData = {
5852
7570
  query?: never;
5853
7571
  url: "/v2/orders/{orderID}/transactions/{transactionID}/confirm";
5854
7572
  };
5855
- export type ConfirmSetupErrors = {
7573
+ export type ConfirmPaymentErrors = {
5856
7574
  /**
5857
7575
  * Unauthorized
5858
7576
  */
5859
7577
  401: ResponseError;
5860
7578
  };
5861
- export type ConfirmSetupError = ConfirmSetupErrors[keyof ConfirmSetupErrors];
5862
- export type ConfirmSetupResponses = {
7579
+ export type ConfirmPaymentError = ConfirmPaymentErrors[keyof ConfirmPaymentErrors];
7580
+ export type ConfirmPaymentResponses = {
5863
7581
  200: ResponseData & {
5864
7582
  data?: TransactionResponse;
5865
7583
  };
5866
7584
  };
5867
- export type ConfirmSetupResponse = ConfirmSetupResponses[keyof ConfirmSetupResponses];
7585
+ export type ConfirmPaymentResponse = ConfirmPaymentResponses[keyof ConfirmPaymentResponses];
5868
7586
  export type CaptureATransactionData = {
5869
7587
  body?: OrdersTransactionsCaptureRequest;
5870
7588
  path: {
@@ -6001,3 +7719,318 @@ export type CancelATransactionResponses = {
6001
7719
  };
6002
7720
  };
6003
7721
  export type CancelATransactionResponse = CancelATransactionResponses[keyof CancelATransactionResponses];
7722
+ export type GetSubscriptionProductData = {
7723
+ body?: never;
7724
+ path: {
7725
+ /**
7726
+ * The unique identifier of a product.
7727
+ */
7728
+ product_uuid: Uuid;
7729
+ };
7730
+ query?: never;
7731
+ url: "/v2/subscriptions/products/{product_uuid}";
7732
+ };
7733
+ export type GetSubscriptionProductErrors = {
7734
+ /**
7735
+ * Bad request. The request failed validation.
7736
+ */
7737
+ 400: ErrorResponse2;
7738
+ /**
7739
+ * Not found. The requested entity does not exist.
7740
+ */
7741
+ 404: ErrorResponse2;
7742
+ /**
7743
+ * Internal server error. There was a system failure in the platform.
7744
+ */
7745
+ 500: ErrorResponse2;
7746
+ };
7747
+ export type GetSubscriptionProductError = GetSubscriptionProductErrors[keyof GetSubscriptionProductErrors];
7748
+ export type GetSubscriptionProductResponses = {
7749
+ /**
7750
+ * Success. The product details are returned.
7751
+ */
7752
+ 200: {
7753
+ data?: Product2;
7754
+ };
7755
+ };
7756
+ export type GetSubscriptionProductResponse = GetSubscriptionProductResponses[keyof GetSubscriptionProductResponses];
7757
+ export type GetPlanData = {
7758
+ body?: never;
7759
+ path: {
7760
+ /**
7761
+ * The unique identifier of the plan.
7762
+ */
7763
+ plan_uuid: Uuid;
7764
+ };
7765
+ query?: never;
7766
+ url: "/v2/subscriptions/plans/{plan_uuid}";
7767
+ };
7768
+ export type GetPlanErrors = {
7769
+ /**
7770
+ * Bad request. The request failed validation.
7771
+ */
7772
+ 400: ErrorResponse2;
7773
+ /**
7774
+ * Not found. The requested entity does not exist.
7775
+ */
7776
+ 404: ErrorResponse2;
7777
+ /**
7778
+ * Internal server error. There was a system failure in the platform.
7779
+ */
7780
+ 500: ErrorResponse2;
7781
+ };
7782
+ export type GetPlanError = GetPlanErrors[keyof GetPlanErrors];
7783
+ export type GetPlanResponses = {
7784
+ /**
7785
+ * Success. The details of the plan are returned.
7786
+ */
7787
+ 200: {
7788
+ data?: Plan;
7789
+ };
7790
+ };
7791
+ export type GetPlanResponse = GetPlanResponses[keyof GetPlanResponses];
7792
+ export type ListOfferingsData = {
7793
+ body?: never;
7794
+ path?: never;
7795
+ query?: {
7796
+ /**
7797
+ * Some Subscriptions API endpoints support filtering. For the general syntax, see [**Filtering**](/guides/Getting-Started/filtering), but you must go to a specific endpoint to understand the attributes and operators an endpoint supports.
7798
+ *
7799
+ */
7800
+ filter?: string;
7801
+ /**
7802
+ * The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [page length](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
7803
+ */
7804
+ "page[offset]"?: BigInt;
7805
+ /**
7806
+ * The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the [page length](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
7807
+ */
7808
+ "page[limit]"?: BigInt;
7809
+ /**
7810
+ * A comma-separated list of resources to include. See [Characteristics of Include Parameter](/guides/Getting-Started/includes#characteristics-of-include-parameter).
7811
+ */
7812
+ include?: string;
7813
+ };
7814
+ url: "/v2/subscriptions/offerings";
7815
+ };
7816
+ export type ListOfferingsErrors = {
7817
+ /**
7818
+ * Bad request. The request failed validation.
7819
+ */
7820
+ 400: ErrorResponse2;
7821
+ /**
7822
+ * Internal server error. There was a system failure in the platform.
7823
+ */
7824
+ 500: ErrorResponse2;
7825
+ };
7826
+ export type ListOfferingsError = ListOfferingsErrors[keyof ListOfferingsErrors];
7827
+ export type ListOfferingsResponses = {
7828
+ /**
7829
+ * Success. A list of offerings is returned.
7830
+ */
7831
+ 200: {
7832
+ data?: Array<Offering>;
7833
+ included?: OfferingIncludes;
7834
+ links?: Links2;
7835
+ };
7836
+ };
7837
+ export type ListOfferingsResponse = ListOfferingsResponses[keyof ListOfferingsResponses];
7838
+ export type GetOfferingData = {
7839
+ body?: never;
7840
+ path: {
7841
+ /**
7842
+ * The unique identifier of the offering.
7843
+ */
7844
+ offering_uuid: Uuid;
7845
+ };
7846
+ query?: {
7847
+ /**
7848
+ * A comma-separated list of resources to include. See [Characteristics of Include Parameter](/guides/Getting-Started/includes#characteristics-of-include-parameter).
7849
+ */
7850
+ include?: string;
7851
+ };
7852
+ url: "/v2/subscriptions/offerings/{offering_uuid}";
7853
+ };
7854
+ export type GetOfferingErrors = {
7855
+ /**
7856
+ * Bad request. The request failed validation.
7857
+ */
7858
+ 400: ErrorResponse2;
7859
+ /**
7860
+ * Not found. The requested entity does not exist.
7861
+ */
7862
+ 404: ErrorResponse2;
7863
+ /**
7864
+ * Internal server error. There was a system failure in the platform.
7865
+ */
7866
+ 500: ErrorResponse2;
7867
+ };
7868
+ export type GetOfferingError = GetOfferingErrors[keyof GetOfferingErrors];
7869
+ export type GetOfferingResponses = {
7870
+ /**
7871
+ * Success. The details of the subscription offering are returned.
7872
+ */
7873
+ 200: {
7874
+ data?: Offering;
7875
+ included?: OfferingIncludes;
7876
+ };
7877
+ };
7878
+ export type GetOfferingResponse = GetOfferingResponses[keyof GetOfferingResponses];
7879
+ export type ListOfferingPlansData = {
7880
+ body?: never;
7881
+ path: {
7882
+ /**
7883
+ * The unique identifier of the offering.
7884
+ */
7885
+ offering_uuid: Uuid;
7886
+ };
7887
+ query?: {
7888
+ /**
7889
+ * The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [page length](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
7890
+ */
7891
+ "page[offset]"?: BigInt;
7892
+ /**
7893
+ * The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the [page length](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
7894
+ */
7895
+ "page[limit]"?: BigInt;
7896
+ };
7897
+ url: "/v2/subscriptions/offerings/{offering_uuid}/plans";
7898
+ };
7899
+ export type ListOfferingPlansErrors = {
7900
+ /**
7901
+ * Not found. The requested entity does not exist.
7902
+ */
7903
+ 404: ErrorResponse2;
7904
+ /**
7905
+ * Internal server error. There was a system failure in the platform.
7906
+ */
7907
+ 500: ErrorResponse2;
7908
+ };
7909
+ export type ListOfferingPlansError = ListOfferingPlansErrors[keyof ListOfferingPlansErrors];
7910
+ export type ListOfferingPlansResponses = {
7911
+ /**
7912
+ * Success. A list of plans attached with the offering is returned.
7913
+ */
7914
+ 200: {
7915
+ data?: Array<OfferingPlan>;
7916
+ links?: Links2;
7917
+ };
7918
+ };
7919
+ export type ListOfferingPlansResponse = ListOfferingPlansResponses[keyof ListOfferingPlansResponses];
7920
+ export type ListOfferingFeaturesData = {
7921
+ body?: never;
7922
+ path: {
7923
+ /**
7924
+ * The unique identifier of the offering.
7925
+ */
7926
+ offering_uuid: Uuid;
7927
+ };
7928
+ query?: {
7929
+ /**
7930
+ * The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [page length](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
7931
+ */
7932
+ "page[offset]"?: BigInt;
7933
+ /**
7934
+ * The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the [page length](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
7935
+ */
7936
+ "page[limit]"?: BigInt;
7937
+ };
7938
+ url: "/v2/subscriptions/offerings/{offering_uuid}/features";
7939
+ };
7940
+ export type ListOfferingFeaturesErrors = {
7941
+ /**
7942
+ * Not found. The requested entity does not exist.
7943
+ */
7944
+ 404: ErrorResponse2;
7945
+ /**
7946
+ * Internal server error. There was a system failure in the platform.
7947
+ */
7948
+ 500: ErrorResponse2;
7949
+ };
7950
+ export type ListOfferingFeaturesError = ListOfferingFeaturesErrors[keyof ListOfferingFeaturesErrors];
7951
+ export type ListOfferingFeaturesResponses = {
7952
+ /**
7953
+ * Success. A list of subscription features attached to the offering is returned.
7954
+ */
7955
+ 200: {
7956
+ data?: Array<OfferingFeature>;
7957
+ links?: Links2;
7958
+ };
7959
+ };
7960
+ export type ListOfferingFeaturesResponse = ListOfferingFeaturesResponses[keyof ListOfferingFeaturesResponses];
7961
+ export type ListOfferingProductsData = {
7962
+ body?: never;
7963
+ path: {
7964
+ /**
7965
+ * The unique identifier of the offering.
7966
+ */
7967
+ offering_uuid: Uuid;
7968
+ };
7969
+ query?: {
7970
+ /**
7971
+ * The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [page length](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
7972
+ */
7973
+ "page[offset]"?: BigInt;
7974
+ /**
7975
+ * The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the [page length](/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.
7976
+ */
7977
+ "page[limit]"?: BigInt;
7978
+ };
7979
+ url: "/v2/subscriptions/offerings/{offering_uuid}/products";
7980
+ };
7981
+ export type ListOfferingProductsErrors = {
7982
+ /**
7983
+ * Not found. The requested entity does not exist.
7984
+ */
7985
+ 404: ErrorResponse2;
7986
+ /**
7987
+ * Internal server error. There was a system failure in the platform.
7988
+ */
7989
+ 500: ErrorResponse2;
7990
+ };
7991
+ export type ListOfferingProductsError = ListOfferingProductsErrors[keyof ListOfferingProductsErrors];
7992
+ export type ListOfferingProductsResponses = {
7993
+ /**
7994
+ * Success. A list of subscription products attached to the offering is returned.
7995
+ */
7996
+ 200: {
7997
+ data?: Array<OfferingProduct>;
7998
+ links?: Links2;
7999
+ };
8000
+ };
8001
+ export type ListOfferingProductsResponse = ListOfferingProductsResponses[keyof ListOfferingProductsResponses];
8002
+ export type GetFeatureData = {
8003
+ body?: never;
8004
+ path: {
8005
+ /**
8006
+ * The unique identifier of a feature.
8007
+ */
8008
+ feature_uuid: Uuid;
8009
+ };
8010
+ query?: never;
8011
+ url: "/v2/subscriptions/features/{feature_uuid}";
8012
+ };
8013
+ export type GetFeatureErrors = {
8014
+ /**
8015
+ * Bad request. The request failed validation.
8016
+ */
8017
+ 400: ErrorResponse2;
8018
+ /**
8019
+ * Not found. The requested entity does not exist.
8020
+ */
8021
+ 404: ErrorResponse2;
8022
+ /**
8023
+ * Internal server error. There was a system failure in the platform.
8024
+ */
8025
+ 500: ErrorResponse2;
8026
+ };
8027
+ export type GetFeatureError = GetFeatureErrors[keyof GetFeatureErrors];
8028
+ export type GetFeatureResponses = {
8029
+ /**
8030
+ * Success. The feature details are returned.
8031
+ */
8032
+ 200: {
8033
+ data?: Feature;
8034
+ };
8035
+ };
8036
+ export type GetFeatureResponse = GetFeatureResponses[keyof GetFeatureResponses];