@salable/sdk 1.0.47 → 1.0.48

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.
@@ -43,7 +43,7 @@ export interface CheckoutPostRequestBody extends Parsable {
43
43
  /**
44
44
  * The billing interval for recurring charges (e.g., month, year). Required for subscription mode. Set to null for one-time payments.
45
45
  */
46
- interval?: CheckoutPostRequestBody_interval | null;
46
+ interval?: CheckoutPostRequestBody_intervalMember1 | string | null;
47
47
  /**
48
48
  * The number of intervals between billings. For example, intervalCount of 3 with interval of month represents billing every 3 months.
49
49
  */
@@ -57,7 +57,7 @@ export interface CheckoutPostRequestBody extends Parsable {
57
57
  */
58
58
  owner?: string | null;
59
59
  /**
60
- * Controls whether Stripe always collects a payment method for subscription Checkout or only collects one when payment is due. If any plans contain one-off line items, the payment method collection will fallback to `always`. Defaults to `always`.
60
+ * Whether a card is required at checkout. Applies only when trial days are set on the plan or in the checkout. `always` sets the card to be required, `if_required` sets the checkout to be cardless but cannot be used if any one-off line items are included on the plan. Defaults to the plan's product settings trial card behaviour.
61
61
  */
62
62
  paymentMethodCollection?: CheckoutPostRequestBody_paymentMethodCollection | null;
63
63
  /**
@@ -85,7 +85,9 @@ export interface CheckoutPostRequestBody_discounts extends Parsable {
85
85
  */
86
86
  promotionCode?: string | null;
87
87
  }
88
- export type CheckoutPostRequestBody_interval = (typeof CheckoutPostRequestBody_intervalObject)[keyof typeof CheckoutPostRequestBody_intervalObject];
88
+ export type CheckoutPostRequestBody_interval = CheckoutPostRequestBody_intervalMember1 | string;
89
+ export interface CheckoutPostRequestBody_intervalMember1 extends AdditionalDataHolder, Parsable {
90
+ }
89
91
  /**
90
92
  * Optionally set config for each line item by using the line item slug as the key in the object.
91
93
  */
@@ -140,6 +142,18 @@ export interface CheckoutRequestBuilder extends BaseRequestBuilder<CheckoutReque
140
142
  * @returns {CheckoutPostRequestBody_discounts}
141
143
  */
142
144
  export declare function createCheckoutPostRequestBody_discountsFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
145
+ /**
146
+ * Creates a new instance of the appropriate class based on discriminator value
147
+ * @param parseNode The parse node to use to read the discriminator value and create the object
148
+ * @returns {CheckoutPostRequestBody_intervalMember1 | string}
149
+ */
150
+ export declare function createCheckoutPostRequestBody_intervalFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
151
+ /**
152
+ * Creates a new instance of the appropriate class based on discriminator value
153
+ * @param parseNode The parse node to use to read the discriminator value and create the object
154
+ * @returns {CheckoutPostRequestBody_intervalMember1}
155
+ */
156
+ export declare function createCheckoutPostRequestBody_intervalMember1FromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
143
157
  /**
144
158
  * Creates a new instance of the appropriate class based on discriminator value
145
159
  * @param parseNode The parse node to use to read the discriminator value and create the object
@@ -176,6 +190,18 @@ export declare function deserializeIntoCheckoutPostRequestBody(checkoutPostReque
176
190
  * @returns {Record<string, (node: ParseNode) => void>}
177
191
  */
178
192
  export declare function deserializeIntoCheckoutPostRequestBody_discounts(checkoutPostRequestBody_discounts?: Partial<CheckoutPostRequestBody_discounts> | undefined): Record<string, (node: ParseNode) => void>;
193
+ /**
194
+ * The deserialization information for the current model
195
+ * @param CheckoutPostRequestBody_interval The instance to deserialize into.
196
+ * @returns {Record<string, (node: ParseNode) => void>}
197
+ */
198
+ export declare function deserializeIntoCheckoutPostRequestBody_interval(checkoutPostRequestBody_interval?: Partial<Parsable | CheckoutPostRequestBody_intervalMember1 | string> | undefined): Record<string, (node: ParseNode) => void>;
199
+ /**
200
+ * The deserialization information for the current model
201
+ * @param CheckoutPostRequestBody_intervalMember1 The instance to deserialize into.
202
+ * @returns {Record<string, (node: ParseNode) => void>}
203
+ */
204
+ export declare function deserializeIntoCheckoutPostRequestBody_intervalMember1(checkoutPostRequestBody_intervalMember1?: Partial<CheckoutPostRequestBody_intervalMember1> | undefined): Record<string, (node: ParseNode) => void>;
179
205
  /**
180
206
  * The deserialization information for the current model
181
207
  * @param CheckoutPostRequestBody_metadata The instance to deserialize into.
@@ -208,6 +234,20 @@ export declare function serializeCheckoutPostRequestBody(writer: SerializationWr
208
234
  * @param writer Serialization writer to use to serialize this model
209
235
  */
210
236
  export declare function serializeCheckoutPostRequestBody_discounts(writer: SerializationWriter, checkoutPostRequestBody_discounts?: Partial<CheckoutPostRequestBody_discounts> | undefined | null, isSerializingDerivedType?: boolean): void;
237
+ /**
238
+ * Serializes information the current object
239
+ * @param CheckoutPostRequestBody_interval The instance to serialize from.
240
+ * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
241
+ * @param writer Serialization writer to use to serialize this model
242
+ */
243
+ export declare function serializeCheckoutPostRequestBody_interval(writer: SerializationWriter, checkoutPostRequestBody_interval?: Partial<Parsable | CheckoutPostRequestBody_intervalMember1> | undefined | null, isSerializingDerivedType?: boolean): void;
244
+ /**
245
+ * Serializes information the current object
246
+ * @param CheckoutPostRequestBody_intervalMember1 The instance to serialize from.
247
+ * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
248
+ * @param writer Serialization writer to use to serialize this model
249
+ */
250
+ export declare function serializeCheckoutPostRequestBody_intervalMember1(writer: SerializationWriter, checkoutPostRequestBody_intervalMember1?: Partial<CheckoutPostRequestBody_intervalMember1> | undefined | null, isSerializingDerivedType?: boolean): void;
211
251
  /**
212
252
  * Serializes information the current object
213
253
  * @param CheckoutPostRequestBody_metadata The instance to serialize from.
@@ -385,16 +425,7 @@ export declare const CheckoutPostRequestBody_currencyObject: {
385
425
  readonly OMR: "OMR";
386
426
  };
387
427
  /**
388
- * The billing interval for recurring charges (e.g., month, year). Required for subscription mode. Set to null for one-time payments.
389
- */
390
- export declare const CheckoutPostRequestBody_intervalObject: {
391
- readonly Day: "day";
392
- readonly Week: "week";
393
- readonly Month: "month";
394
- readonly Year: "year";
395
- };
396
- /**
397
- * Controls whether Stripe always collects a payment method for subscription Checkout or only collects one when payment is due. If any plans contain one-off line items, the payment method collection will fallback to `always`. Defaults to `always`.
428
+ * Whether a card is required at checkout. Applies only when trial days are set on the plan or in the checkout. `always` sets the card to be required, `if_required` sets the checkout to be cardless but cannot be used if any one-off line items are included on the plan. Defaults to the plan's product settings trial card behaviour.
398
429
  */
399
430
  export declare const CheckoutPostRequestBody_paymentMethodCollectionObject: {
400
431
  readonly Always: "always";