@salable/sdk 1.0.20 → 1.0.21

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.
@@ -1,4 +1,4 @@
1
- import { type GetSubscriptionDetailSchema } from '../../../models/index.js';
1
+ import { type GetSubscriptionDetailSchema, type UpdateSalableOnlySubscriptionRequestSchema } from '../../../models/index.js';
2
2
  import { type AutoRenewRequestBuilder } from './autoRenew/index.js';
3
3
  import { type CancelRequestBuilder } from './cancel/index.js';
4
4
  import { type InvoicesRequestBuilder } from './invoices/index.js';
@@ -53,6 +53,19 @@ export interface SubscriptionsItemRequestBuilder extends BaseRequestBuilder<Subs
53
53
  * @throws {ErrorResponseBody} error when the service returns a 405 status code
54
54
  */
55
55
  get(requestConfiguration?: RequestConfiguration<SubscriptionsItemRequestBuilderGetQueryParameters> | undefined): Promise<GetSubscriptionDetailSchema | undefined>;
56
+ /**
57
+ * Updates the interval and intervalCount on a Salable Only subscription. Both fields must be set together or both set to null. Setting both to null removes the interval from the subscription, which is only permitted if the subscription has no metered line items.
58
+ * @param body The request body
59
+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
60
+ * @throws {ErrorResponseBody} error when the service returns a 400 status code
61
+ * @throws {ErrorResponseBody} error when the service returns a 401 status code
62
+ * @throws {ErrorResponseBody} error when the service returns a 403 status code
63
+ * @throws {ErrorResponseBody} error when the service returns a 404 status code
64
+ * @throws {ErrorResponseBody} error when the service returns a 405 status code
65
+ * @throws {ErrorResponseBody} error when the service returns a 429 status code
66
+ * @throws {ErrorResponseBody} error when the service returns a 500 status code
67
+ */
68
+ put(body: UpdateSalableOnlySubscriptionRequestSchema, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<void>;
56
69
  /**
57
70
  * Permanently deletes a subscription. This endpoint is only available in test mode. For recurring subscriptions that are not already canceled, this will first cancel the subscription on Stripe before deleting it.
58
71
  * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
@@ -65,6 +78,13 @@ export interface SubscriptionsItemRequestBuilder extends BaseRequestBuilder<Subs
65
78
  * @returns {RequestInformation}
66
79
  */
67
80
  toGetRequestInformation(requestConfiguration?: RequestConfiguration<SubscriptionsItemRequestBuilderGetQueryParameters> | undefined): RequestInformation;
81
+ /**
82
+ * Updates the interval and intervalCount on a Salable Only subscription. Both fields must be set together or both set to null. Setting both to null removes the interval from the subscription, which is only permitted if the subscription has no metered line items.
83
+ * @param body The request body
84
+ * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
85
+ * @returns {RequestInformation}
86
+ */
87
+ toPutRequestInformation(body: UpdateSalableOnlySubscriptionRequestSchema, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
68
88
  }
69
89
  /**
70
90
  * Retrieves the details of a subscription.
@@ -3149,6 +3149,12 @@ export declare function createUpdateProductResponseSchema_dataFromDiscriminatorV
3149
3149
  * @returns {UpdateProductResponseSchema}
3150
3150
  */
3151
3151
  export declare function createUpdateProductResponseSchemaFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
3152
+ /**
3153
+ * Creates a new instance of the appropriate class based on discriminator value
3154
+ * @param parseNode The parse node to use to read the discriminator value and create the object
3155
+ * @returns {UpdateSalableOnlySubscriptionRequestSchema}
3156
+ */
3157
+ export declare function createUpdateSalableOnlySubscriptionRequestSchemaFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
3152
3158
  /**
3153
3159
  * Creates a new instance of the appropriate class based on discriminator value
3154
3160
  * @param parseNode The parse node to use to read the discriminator value and create the object
@@ -5596,6 +5602,12 @@ export declare function deserializeIntoUpdateProductResponseSchema(updateProduct
5596
5602
  * @returns {Record<string, (node: ParseNode) => void>}
5597
5603
  */
5598
5604
  export declare function deserializeIntoUpdateProductResponseSchema_data(updateProductResponseSchema_data?: Partial<UpdateProductResponseSchema_data> | undefined): Record<string, (node: ParseNode) => void>;
5605
+ /**
5606
+ * The deserialization information for the current model
5607
+ * @param UpdateSalableOnlySubscriptionRequestSchema The instance to deserialize into.
5608
+ * @returns {Record<string, (node: ParseNode) => void>}
5609
+ */
5610
+ export declare function deserializeIntoUpdateSalableOnlySubscriptionRequestSchema(updateSalableOnlySubscriptionRequestSchema?: Partial<UpdateSalableOnlySubscriptionRequestSchema> | undefined): Record<string, (node: ParseNode) => void>;
5599
5611
  /**
5600
5612
  * The deserialization information for the current model
5601
5613
  * @param UpdateSubscriptionItemsRequestSchema The instance to deserialize into.
@@ -16739,6 +16751,13 @@ export declare function serializeUpdateProductResponseSchema(writer: Serializati
16739
16751
  * @param writer Serialization writer to use to serialize this model
16740
16752
  */
16741
16753
  export declare function serializeUpdateProductResponseSchema_data(writer: SerializationWriter, updateProductResponseSchema_data?: Partial<UpdateProductResponseSchema_data> | undefined | null, isSerializingDerivedType?: boolean): void;
16754
+ /**
16755
+ * Serializes information the current object
16756
+ * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
16757
+ * @param UpdateSalableOnlySubscriptionRequestSchema The instance to serialize from.
16758
+ * @param writer Serialization writer to use to serialize this model
16759
+ */
16760
+ export declare function serializeUpdateSalableOnlySubscriptionRequestSchema(writer: SerializationWriter, updateSalableOnlySubscriptionRequestSchema?: Partial<UpdateSalableOnlySubscriptionRequestSchema> | undefined | null, isSerializingDerivedType?: boolean): void;
16742
16761
  /**
16743
16762
  * Serializes information the current object
16744
16763
  * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
@@ -17309,6 +17328,17 @@ export interface UpdateProductResponseSchema_data extends Parsable {
17309
17328
  */
17310
17329
  updatedAt?: string | null;
17311
17330
  }
17331
+ export interface UpdateSalableOnlySubscriptionRequestSchema extends Parsable {
17332
+ /**
17333
+ * The interval property
17334
+ */
17335
+ interval?: UpdateSalableOnlySubscriptionRequestSchema_interval | null;
17336
+ /**
17337
+ * The intervalCount property
17338
+ */
17339
+ intervalCount?: number | null;
17340
+ }
17341
+ export type UpdateSalableOnlySubscriptionRequestSchema_interval = (typeof UpdateSalableOnlySubscriptionRequestSchema_intervalObject)[keyof typeof UpdateSalableOnlySubscriptionRequestSchema_intervalObject];
17312
17342
  export interface UpdateSubscriptionItemsRequestSchema extends Parsable {
17313
17343
  /**
17314
17344
  * The list of plan changes to apply to the subscription.
@@ -18094,6 +18124,12 @@ export declare const UpdateProductRequestSchema_settings_cardPrefillPreferenceOb
18094
18124
  readonly Always: "always";
18095
18125
  readonly Choice: "choice";
18096
18126
  };
18127
+ export declare const UpdateSalableOnlySubscriptionRequestSchema_intervalObject: {
18128
+ readonly Day: "day";
18129
+ readonly Week: "week";
18130
+ readonly Month: "month";
18131
+ readonly Year: "year";
18132
+ };
18097
18133
  /**
18098
18134
  * Controls how Stripe handles proration when items change mid-billing-period. Required for paid subscriptions; not applicable to Salable-only subscriptions. One of `always_invoice`, `create_prorations`, `none`.
18099
18135
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salable/sdk",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",