@wix/subscription 1.0.3 → 1.0.5

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.
@@ -87,6 +87,8 @@ interface Subscription$1 {
87
87
  * @readonly
88
88
  */
89
89
  changesCounter?: string | null;
90
+ /** Billing order id. Optional. */
91
+ orderId?: string | null;
90
92
  /** items, minSize is 1, maxSize is 100 */
91
93
  items?: Item$1[];
92
94
  }
@@ -154,7 +156,7 @@ interface BillingSettings$1 {
154
156
  /** customer payment source to make recurring payments with */
155
157
  paymentMethod?: PaymentMethod$1;
156
158
  /** Instructs how payments will be collected. */
157
- collectionMethod?: CollectionMethod$1;
159
+ collectionMethod?: CollectionMethodEnumCollectionMethod$1;
158
160
  /**
159
161
  * Duration of cycle. For example, 1 MONTH, 2 WEEKS, 7 DAYS, 1 YEAR etc.
160
162
  * Shortest supported cycle duration is 7 days.
@@ -168,7 +170,12 @@ interface BillingSettings$1 {
168
170
  customBillingSchedule?: CustomBillingSchedule$1;
169
171
  /** Definition of trial period */
170
172
  freeTrialDuration?: Duration$1;
171
- /** Shipping costs collected each cycle */
173
+ /**
174
+ * Shipping costs collected each cycle
175
+ * @deprecated
176
+ * @replacedBy shipping_charges
177
+ * @targetRemovalDate 2024-10-31
178
+ */
172
179
  shippingFee?: string | null;
173
180
  /** Billing address associated with subscription to be used for payments. */
174
181
  billingAddress?: FullAddressDetails$1;
@@ -181,6 +188,8 @@ interface BillingSettings$1 {
181
188
  * Max: 5 additional fees
182
189
  */
183
190
  additionalFees?: AdditionalFee$1[];
191
+ /** Shipping fee charges */
192
+ shippingCharges?: ShippingCharges$1;
184
193
  /** General discount that applied to all items in the subscription */
185
194
  discounts?: Discount$1[];
186
195
  /**
@@ -193,7 +202,7 @@ interface PaymentMethod$1 {
193
202
  /** reference to payment source id stored in payments system */
194
203
  id?: string;
195
204
  }
196
- declare enum CollectionMethod$1 {
205
+ declare enum CollectionMethodEnumCollectionMethod$1 {
197
206
  UNKNOWN = "UNKNOWN",
198
207
  /** Subscriber automatically charged */
199
208
  AUTO_CHARGE = "AUTO_CHARGE",
@@ -352,6 +361,17 @@ interface TaxValueOneOf$1 {
352
361
  interface DynamicTax$1 {
353
362
  taxGroupId?: string | null;
354
363
  }
364
+ interface ShippingCharges$1 {
365
+ /**
366
+ * Amount of the shipping fee in `0.00` format.
367
+ *
368
+ * Min: `0.01`
369
+ */
370
+ amount?: string;
371
+ /** Tax of the shipping fee */
372
+ tax?: Tax$1;
373
+ discounts?: Discount$1[];
374
+ }
355
375
  interface Discount$1 extends DiscountValueOneOf$1 {
356
376
  /**
357
377
  * Discount amount.
@@ -1487,19 +1507,25 @@ interface DiscountNonNullableFields$1 {
1487
1507
  cycles?: DiscountCyclesNonNullableFields$1;
1488
1508
  origin?: DiscountOriginNonNullableFields$1;
1489
1509
  }
1510
+ interface ShippingChargesNonNullableFields$1 {
1511
+ amount: string;
1512
+ tax?: TaxNonNullableFields$1;
1513
+ discounts: DiscountNonNullableFields$1[];
1514
+ }
1490
1515
  interface ExternalCollectionDetailsNonNullableFields$1 {
1491
1516
  collectorName: string;
1492
1517
  }
1493
1518
  interface BillingSettingsNonNullableFields$1 {
1494
1519
  currency: string;
1495
1520
  paymentMethod?: PaymentMethodNonNullableFields$1;
1496
- collectionMethod: CollectionMethod$1;
1521
+ collectionMethod: CollectionMethodEnumCollectionMethod$1;
1497
1522
  cycleDuration?: DurationNonNullableFields$1;
1498
1523
  cycleAutoRenew: boolean;
1499
1524
  freeTrialDuration?: DurationNonNullableFields$1;
1500
1525
  billingAddress?: FullAddressDetailsNonNullableFields$1;
1501
1526
  taxSettings?: TaxSettingsNonNullableFields$1;
1502
1527
  additionalFees: AdditionalFeeNonNullableFields$1[];
1528
+ shippingCharges?: ShippingChargesNonNullableFields$1;
1503
1529
  discounts: DiscountNonNullableFields$1[];
1504
1530
  externalCollectionDetails?: ExternalCollectionDetailsNonNullableFields$1;
1505
1531
  }
@@ -1828,6 +1854,8 @@ interface Subscription {
1828
1854
  * @readonly
1829
1855
  */
1830
1856
  changesCounter?: string | null;
1857
+ /** Billing order id. Optional. */
1858
+ orderId?: string | null;
1831
1859
  /** items, minSize is 1, maxSize is 100 */
1832
1860
  items?: Item[];
1833
1861
  }
@@ -1895,7 +1923,7 @@ interface BillingSettings {
1895
1923
  /** customer payment source to make recurring payments with */
1896
1924
  paymentMethod?: PaymentMethod;
1897
1925
  /** Instructs how payments will be collected. */
1898
- collectionMethod?: CollectionMethod;
1926
+ collectionMethod?: CollectionMethodEnumCollectionMethod;
1899
1927
  /**
1900
1928
  * Duration of cycle. For example, 1 MONTH, 2 WEEKS, 7 DAYS, 1 YEAR etc.
1901
1929
  * Shortest supported cycle duration is 7 days.
@@ -1909,7 +1937,12 @@ interface BillingSettings {
1909
1937
  customBillingSchedule?: CustomBillingSchedule;
1910
1938
  /** Definition of trial period */
1911
1939
  freeTrialDuration?: Duration;
1912
- /** Shipping costs collected each cycle */
1940
+ /**
1941
+ * Shipping costs collected each cycle
1942
+ * @deprecated
1943
+ * @replacedBy shipping_charges
1944
+ * @targetRemovalDate 2024-10-31
1945
+ */
1913
1946
  shippingFee?: string | null;
1914
1947
  /** Billing address associated with subscription to be used for payments. */
1915
1948
  billingAddress?: FullAddressDetails;
@@ -1922,6 +1955,8 @@ interface BillingSettings {
1922
1955
  * Max: 5 additional fees
1923
1956
  */
1924
1957
  additionalFees?: AdditionalFee[];
1958
+ /** Shipping fee charges */
1959
+ shippingCharges?: ShippingCharges;
1925
1960
  /** General discount that applied to all items in the subscription */
1926
1961
  discounts?: Discount[];
1927
1962
  /**
@@ -1934,7 +1969,7 @@ interface PaymentMethod {
1934
1969
  /** reference to payment source id stored in payments system */
1935
1970
  _id?: string;
1936
1971
  }
1937
- declare enum CollectionMethod {
1972
+ declare enum CollectionMethodEnumCollectionMethod {
1938
1973
  UNKNOWN = "UNKNOWN",
1939
1974
  /** Subscriber automatically charged */
1940
1975
  AUTO_CHARGE = "AUTO_CHARGE",
@@ -2093,6 +2128,17 @@ interface TaxValueOneOf {
2093
2128
  interface DynamicTax {
2094
2129
  taxGroupId?: string | null;
2095
2130
  }
2131
+ interface ShippingCharges {
2132
+ /**
2133
+ * Amount of the shipping fee in `0.00` format.
2134
+ *
2135
+ * Min: `0.01`
2136
+ */
2137
+ amount?: string;
2138
+ /** Tax of the shipping fee */
2139
+ tax?: Tax;
2140
+ discounts?: Discount[];
2141
+ }
2096
2142
  interface Discount extends DiscountValueOneOf {
2097
2143
  /**
2098
2144
  * Discount amount.
@@ -3228,19 +3274,25 @@ interface DiscountNonNullableFields {
3228
3274
  cycles?: DiscountCyclesNonNullableFields;
3229
3275
  origin?: DiscountOriginNonNullableFields;
3230
3276
  }
3277
+ interface ShippingChargesNonNullableFields {
3278
+ amount: string;
3279
+ tax?: TaxNonNullableFields;
3280
+ discounts: DiscountNonNullableFields[];
3281
+ }
3231
3282
  interface ExternalCollectionDetailsNonNullableFields {
3232
3283
  collectorName: string;
3233
3284
  }
3234
3285
  interface BillingSettingsNonNullableFields {
3235
3286
  currency: string;
3236
3287
  paymentMethod?: PaymentMethodNonNullableFields;
3237
- collectionMethod: CollectionMethod;
3288
+ collectionMethod: CollectionMethodEnumCollectionMethod;
3238
3289
  cycleDuration?: DurationNonNullableFields;
3239
3290
  cycleAutoRenew: boolean;
3240
3291
  freeTrialDuration?: DurationNonNullableFields;
3241
3292
  billingAddress?: FullAddressDetailsNonNullableFields;
3242
3293
  taxSettings?: TaxSettingsNonNullableFields;
3243
3294
  additionalFees: AdditionalFeeNonNullableFields[];
3295
+ shippingCharges?: ShippingChargesNonNullableFields;
3244
3296
  discounts: DiscountNonNullableFields[];
3245
3297
  externalCollectionDetails?: ExternalCollectionDetailsNonNullableFields;
3246
3298
  }