@salable/sdk 1.0.24 → 1.0.25

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.
@@ -28,6 +28,10 @@ export interface CheckoutPostRequestBody extends Parsable {
28
28
  * The case-insensitive three-letter ISO 4217 currency code (e.g., USD, GBP, EUR). Input is normalized to canonical uppercase. If not provided the checkout will use geolocation. For geolocation to work all line item prices on the plan must have the same default currency.
29
29
  */
30
30
  currency?: CheckoutPostRequestBody_currency | null;
31
+ /**
32
+ * A single Stripe coupon or promotion code to apply to the checkout session.
33
+ */
34
+ discounts?: CheckoutPostRequestBody_discounts[] | null;
31
35
  /**
32
36
  * The email address of the customer. If the owner already exists in the system and does not have a Stripe email it will be used to either create or update the Stripe customer record.
33
37
  */
@@ -67,6 +71,16 @@ export interface CheckoutPostRequestBody extends Parsable {
67
71
  }
68
72
  export type CheckoutPostRequestBody_cardPrefillPreference = (typeof CheckoutPostRequestBody_cardPrefillPreferenceObject)[keyof typeof CheckoutPostRequestBody_cardPrefillPreferenceObject];
69
73
  export type CheckoutPostRequestBody_currency = (typeof CheckoutPostRequestBody_currencyObject)[keyof typeof CheckoutPostRequestBody_currencyObject];
74
+ export interface CheckoutPostRequestBody_discounts extends Parsable {
75
+ /**
76
+ * The Stripe coupon ID to apply to the checkout session.
77
+ */
78
+ coupon?: string | null;
79
+ /**
80
+ * The Stripe promotion code ID to apply to the checkout session.
81
+ */
82
+ promotionCode?: string | null;
83
+ }
70
84
  export type CheckoutPostRequestBody_interval = (typeof CheckoutPostRequestBody_intervalObject)[keyof typeof CheckoutPostRequestBody_intervalObject];
71
85
  /**
72
86
  * Optionally set config for each line item by using the line item slug as the key in the object.
@@ -115,6 +129,12 @@ export interface CheckoutRequestBuilder extends BaseRequestBuilder<CheckoutReque
115
129
  */
116
130
  toPostRequestInformation(body: CheckoutPostRequestBody, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
117
131
  }
132
+ /**
133
+ * Creates a new instance of the appropriate class based on discriminator value
134
+ * @param parseNode The parse node to use to read the discriminator value and create the object
135
+ * @returns {CheckoutPostRequestBody_discounts}
136
+ */
137
+ export declare function createCheckoutPostRequestBody_discountsFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
118
138
  /**
119
139
  * Creates a new instance of the appropriate class based on discriminator value
120
140
  * @param parseNode The parse node to use to read the discriminator value and create the object
@@ -145,6 +165,12 @@ export declare function createCheckoutPostResponseFromDiscriminatorValue(parseNo
145
165
  * @returns {Record<string, (node: ParseNode) => void>}
146
166
  */
147
167
  export declare function deserializeIntoCheckoutPostRequestBody(checkoutPostRequestBody?: Partial<CheckoutPostRequestBody> | undefined): Record<string, (node: ParseNode) => void>;
168
+ /**
169
+ * The deserialization information for the current model
170
+ * @param CheckoutPostRequestBody_discounts The instance to deserialize into.
171
+ * @returns {Record<string, (node: ParseNode) => void>}
172
+ */
173
+ export declare function deserializeIntoCheckoutPostRequestBody_discounts(checkoutPostRequestBody_discounts?: Partial<CheckoutPostRequestBody_discounts> | undefined): Record<string, (node: ParseNode) => void>;
148
174
  /**
149
175
  * The deserialization information for the current model
150
176
  * @param CheckoutPostRequestBody_metadata The instance to deserialize into.
@@ -170,6 +196,13 @@ export declare function deserializeIntoCheckoutPostResponse_data(checkoutPostRes
170
196
  * @param writer Serialization writer to use to serialize this model
171
197
  */
172
198
  export declare function serializeCheckoutPostRequestBody(writer: SerializationWriter, checkoutPostRequestBody?: Partial<CheckoutPostRequestBody> | undefined | null, isSerializingDerivedType?: boolean): void;
199
+ /**
200
+ * Serializes information the current object
201
+ * @param CheckoutPostRequestBody_discounts The instance to serialize from.
202
+ * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
203
+ * @param writer Serialization writer to use to serialize this model
204
+ */
205
+ export declare function serializeCheckoutPostRequestBody_discounts(writer: SerializationWriter, checkoutPostRequestBody_discounts?: Partial<CheckoutPostRequestBody_discounts> | undefined | null, isSerializingDerivedType?: boolean): void;
173
206
  /**
174
207
  * Serializes information the current object
175
208
  * @param CheckoutPostRequestBody_metadata The instance to serialize from.
@@ -824,6 +824,12 @@ export declare function createErrorResponseBody_errorsFromDiscriminatorValue(par
824
824
  * @returns {ErrorResponseBody}
825
825
  */
826
826
  export declare function createErrorResponseBodyFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
827
+ /**
828
+ * Creates a new instance of the appropriate class based on discriminator value
829
+ * @param parseNode The parse node to use to read the discriminator value and create the object
830
+ * @returns {GenerateCheckoutLinkRequestSchema_discounts}
831
+ */
832
+ export declare function createGenerateCheckoutLinkRequestSchema_discountsFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
827
833
  /**
828
834
  * Creates a new instance of the appropriate class based on discriminator value
829
835
  * @param parseNode The parse node to use to read the discriminator value and create the object
@@ -3863,6 +3869,12 @@ export declare function deserializeIntoErrorResponseBody_errors(errorResponseBod
3863
3869
  * @returns {Record<string, (node: ParseNode) => void>}
3864
3870
  */
3865
3871
  export declare function deserializeIntoGenerateCheckoutLinkRequestSchema(generateCheckoutLinkRequestSchema?: Partial<GenerateCheckoutLinkRequestSchema> | undefined): Record<string, (node: ParseNode) => void>;
3872
+ /**
3873
+ * The deserialization information for the current model
3874
+ * @param GenerateCheckoutLinkRequestSchema_discounts The instance to deserialize into.
3875
+ * @returns {Record<string, (node: ParseNode) => void>}
3876
+ */
3877
+ export declare function deserializeIntoGenerateCheckoutLinkRequestSchema_discounts(generateCheckoutLinkRequestSchema_discounts?: Partial<GenerateCheckoutLinkRequestSchema_discounts> | undefined): Record<string, (node: ParseNode) => void>;
3866
3878
  /**
3867
3879
  * The deserialization information for the current model
3868
3880
  * @param GenerateCheckoutLinkSchema The instance to deserialize into.
@@ -5956,6 +5968,10 @@ export interface GenerateCheckoutLinkRequestSchema extends Parsable {
5956
5968
  * The collectShippingAddress property
5957
5969
  */
5958
5970
  collectShippingAddress?: boolean | null;
5971
+ /**
5972
+ * A single Stripe coupon or promotion code to apply to the checkout session.
5973
+ */
5974
+ discounts?: GenerateCheckoutLinkRequestSchema_discounts[] | null;
5959
5975
  /**
5960
5976
  * The email property
5961
5977
  */
@@ -5970,6 +5986,16 @@ export interface GenerateCheckoutLinkRequestSchema extends Parsable {
5970
5986
  trialPeriodDays?: number | null;
5971
5987
  }
5972
5988
  export type GenerateCheckoutLinkRequestSchema_cardPrefillPreference = (typeof GenerateCheckoutLinkRequestSchema_cardPrefillPreferenceObject)[keyof typeof GenerateCheckoutLinkRequestSchema_cardPrefillPreferenceObject];
5989
+ export interface GenerateCheckoutLinkRequestSchema_discounts extends Parsable {
5990
+ /**
5991
+ * The Stripe coupon ID to apply to the checkout session.
5992
+ */
5993
+ coupon?: string | null;
5994
+ /**
5995
+ * The Stripe promotion code ID to apply to the checkout session.
5996
+ */
5997
+ promotionCode?: string | null;
5998
+ }
5973
5999
  export interface GenerateCheckoutLinkSchema extends AdditionalDataHolder, Parsable {
5974
6000
  /**
5975
6001
  * The data property
@@ -14700,6 +14726,13 @@ export declare function serializeErrorResponseBody_errors(writer: SerializationW
14700
14726
  * @param writer Serialization writer to use to serialize this model
14701
14727
  */
14702
14728
  export declare function serializeGenerateCheckoutLinkRequestSchema(writer: SerializationWriter, generateCheckoutLinkRequestSchema?: Partial<GenerateCheckoutLinkRequestSchema> | undefined | null, isSerializingDerivedType?: boolean): void;
14729
+ /**
14730
+ * Serializes information the current object
14731
+ * @param GenerateCheckoutLinkRequestSchema_discounts The instance to serialize from.
14732
+ * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
14733
+ * @param writer Serialization writer to use to serialize this model
14734
+ */
14735
+ export declare function serializeGenerateCheckoutLinkRequestSchema_discounts(writer: SerializationWriter, generateCheckoutLinkRequestSchema_discounts?: Partial<GenerateCheckoutLinkRequestSchema_discounts> | undefined | null, isSerializingDerivedType?: boolean): void;
14703
14736
  /**
14704
14737
  * Serializes information the current object
14705
14738
  * @param GenerateCheckoutLinkSchema The instance to serialize from.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salable/sdk",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",