@leaflow/sdk 0.0.0-dev.357.gf8331d0 → 0.0.0-dev.359.gca6d1b5
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.
- package/dist/account/v1/generated/functions.d.ts +10 -3
- package/dist/account/v1/generated/functions.js +8 -3
- package/dist/account/v1/generated/models.d.ts +2 -0
- package/dist/account/v1/generated/schemas.zod.d.ts +10 -3
- package/dist/account/v1/generated/schemas.zod.js +10 -3
- package/dist/account/v1/generated/validators/acceptConsentsRequestBody.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/acceptConsentsRequestBody.zod.js +2 -0
- package/dist/account/v1/generated/validators/acceptInvitationByTokenRequestBody.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/acceptInvitationByTokenRequestBody.zod.js +2 -0
- package/dist/account/v1/generated/validators/acceptedInvitationResponseBody.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/acceptedInvitationResponseBody.zod.js +2 -0
- package/dist/account/v1/generated/validators/accountResource.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/accountResource.zod.js +2 -0
- package/dist/account/v1/generated/validators/agreementListResponseBody.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/agreementListResponseBody.zod.js +2 -0
- package/dist/account/v1/generated/validators/agreementResource.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/agreementResource.zod.js +2 -0
- package/dist/account/v1/generated/validators/consentBody.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/consentBody.zod.js +2 -0
- package/dist/account/v1/generated/validators/consentListResponseBody.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/consentListResponseBody.zod.js +2 -0
- package/dist/account/v1/generated/validators/consentResource.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/consentResource.zod.js +2 -0
- package/dist/account/v1/generated/validators/countryOption.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/countryOption.zod.js +2 -0
- package/dist/account/v1/generated/validators/createProjectRequestBody.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/createProjectRequestBody.zod.js +2 -0
- package/dist/account/v1/generated/validators/cursorPagination.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/cursorPagination.zod.js +2 -0
- package/dist/account/v1/generated/validators/error.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/error.zod.js +2 -0
- package/dist/account/v1/generated/validators/grantResource.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/grantResource.zod.js +2 -0
- package/dist/account/v1/generated/validators/identityVerificationResource.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/identityVerificationResource.zod.js +2 -0
- package/dist/account/v1/generated/validators/invitationPreviewResource.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/invitationPreviewResource.zod.js +2 -0
- package/dist/account/v1/generated/validators/invitationResource.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/invitationResource.zod.js +2 -0
- package/dist/account/v1/generated/validators/languageOption.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/languageOption.zod.js +2 -0
- package/dist/account/v1/generated/validators/lengthAwarePageInvitationResource.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/lengthAwarePageInvitationResource.zod.js +2 -0
- package/dist/account/v1/generated/validators/lengthAwarePageProjectAccessResource.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/lengthAwarePageProjectAccessResource.zod.js +2 -0
- package/dist/account/v1/generated/validators/listMyInvitationsParams.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/listMyInvitationsParams.zod.js +2 -0
- package/dist/account/v1/generated/validators/listProjectsParams.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/listProjectsParams.zod.js +2 -0
- package/dist/account/v1/generated/validators/locale.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/locale.zod.js +2 -0
- package/dist/account/v1/generated/validators/localeOptionsResource.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/localeOptionsResource.zod.js +2 -0
- package/dist/account/v1/generated/validators/offsetPagination.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/offsetPagination.zod.js +2 -0
- package/dist/account/v1/generated/validators/previewInvitationByTokenParams.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/previewInvitationByTokenParams.zod.js +2 -0
- package/dist/account/v1/generated/validators/projectAccessResource.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/projectAccessResource.zod.js +2 -0
- package/dist/account/v1/generated/validators/projectResource.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/projectResource.zod.js +2 -0
- package/dist/account/v1/generated/validators/projectSlugAvailabilityResource.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/projectSlugAvailabilityResource.zod.js +2 -0
- package/dist/account/v1/generated/validators/projectTraitResource.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/projectTraitResource.zod.js +2 -0
- package/dist/account/v1/generated/validators/registerRequestBody.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/registerRequestBody.zod.js +2 -0
- package/dist/account/v1/generated/validators/resourceRefResource.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/resourceRefResource.zod.js +2 -0
- package/dist/account/v1/generated/validators/ruleResource.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/ruleResource.zod.js +2 -0
- package/dist/account/v1/generated/validators/scopedTokenResponseBody.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/scopedTokenResponseBody.zod.js +2 -0
- package/dist/account/v1/generated/validators/settingsResource.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/settingsResource.zod.js +2 -0
- package/dist/account/v1/generated/validators/submitIdentityVerificationRequestBody.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/submitIdentityVerificationRequestBody.zod.js +2 -0
- package/dist/account/v1/generated/validators/updateAccountRequestBody.zod.d.ts +2 -0
- package/dist/account/v1/generated/validators/updateAccountRequestBody.zod.js +2 -0
- package/dist/billing/type/order/v1/generated/models.d.ts +71 -33
- package/dist/billing/type/order/v1/generated/models.js +2 -1
- package/dist/billing/type/order/v1/generated/validators/cancelSubscriptionRequest.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/cancellation.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/cancellationCreate.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/{terminationPolicy.zod.d.ts → cancellationPolicy.zod.d.ts} +3 -3
- package/dist/billing/type/order/v1/generated/validators/{terminationPolicy.zod.js → cancellationPolicy.zod.js} +2 -2
- package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreview.zod.d.ts +2 -0
- package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreview.zod.js +4 -3
- package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/cancellationRefundPreviewItem.zod.js +1 -0
- package/dist/billing/type/order/v1/generated/validators/order.zod.d.ts +5 -3
- package/dist/billing/type/order/v1/generated/validators/orderItem.zod.d.ts +5 -3
- package/dist/billing/type/order/v1/generated/validators/orderItem.zod.js +10 -6
- package/dist/billing/type/order/v1/generated/validators/orderItemList.zod.d.ts +5 -3
- package/dist/billing/type/order/v1/generated/validators/orderList.zod.d.ts +5 -3
- package/dist/billing/type/order/v1/generated/validators/orderRefundQuote.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/price.zod.d.ts +4 -1
- package/dist/billing/type/order/v1/generated/validators/price.zod.js +10 -2
- package/dist/billing/type/order/v1/generated/validators/priceList.zod.d.ts +4 -1
- package/dist/billing/type/order/v1/generated/validators/quote.zod.d.ts +2 -0
- package/dist/billing/type/order/v1/generated/validators/quoteCancellation.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/quoteItemInput.zod.d.ts +1 -1
- package/dist/billing/type/order/v1/generated/validators/quoteItemInput.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/quoteRenewal.zod.d.ts +1 -1
- package/dist/billing/type/order/v1/generated/validators/quoteRenewal.zod.js +3 -3
- package/dist/billing/type/order/v1/generated/validators/quoteRequest.zod.d.ts +2 -2
- package/dist/billing/type/order/v1/generated/validators/refundPolicy.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/refundPolicy.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/refundReason.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/renewRequest.zod.d.ts +1 -1
- package/dist/billing/type/order/v1/generated/validators/renewRequest.zod.js +3 -3
- package/dist/billing/type/order/v1/generated/validators/renewalOrderRequest.zod.d.ts +1 -1
- package/dist/billing/type/order/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
- package/dist/billing/type/order/v1/generated/validators/renewalPrice.zod.d.ts +4 -1
- package/dist/billing/type/order/v1/generated/validators/renewalPrice.zod.js +4 -2
- package/dist/billing/type/order/v1/generated/validators/renewalPriceList.zod.d.ts +4 -1
- package/dist/billing/type/order/v1/generated/validators/subscription.zod.d.ts +5 -1
- package/dist/billing/type/order/v1/generated/validators/subscription.zod.js +14 -2
- package/dist/billing/type/order/v1/generated/validators/subscriptionList.zod.d.ts +5 -1
- package/dist/billing/v1/generated/functions.d.ts +1 -1
- package/dist/billing/v1/generated/functions.js +1 -1
- package/dist/billing/v1/generated/models.d.ts +71 -33
- package/dist/billing/v1/generated/models.js +2 -1
- package/dist/billing/v1/generated/schemas.zod.d.ts +3 -3
- package/dist/billing/v1/generated/schemas.zod.js +1 -1
- package/dist/billing/v1/generated/validators/cancelSubscriptionRequest.zod.js +2 -2
- package/dist/billing/v1/generated/validators/cancellation.zod.js +2 -2
- package/dist/billing/v1/generated/validators/cancellationCreate.zod.js +2 -2
- package/dist/billing/v1/generated/validators/{terminationPolicy.zod.d.ts → cancellationPolicy.zod.d.ts} +3 -3
- package/dist/billing/v1/generated/validators/{terminationPolicy.zod.js → cancellationPolicy.zod.js} +2 -2
- package/dist/billing/v1/generated/validators/cancellationRefundPreview.zod.d.ts +2 -0
- package/dist/billing/v1/generated/validators/cancellationRefundPreview.zod.js +4 -3
- package/dist/billing/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/cancellationRefundPreviewItem.zod.js +1 -0
- package/dist/billing/v1/generated/validators/order.zod.d.ts +5 -3
- package/dist/billing/v1/generated/validators/orderItem.zod.d.ts +5 -3
- package/dist/billing/v1/generated/validators/orderItem.zod.js +10 -6
- package/dist/billing/v1/generated/validators/orderItemList.zod.d.ts +5 -3
- package/dist/billing/v1/generated/validators/orderList.zod.d.ts +5 -3
- package/dist/billing/v1/generated/validators/orderRefundQuote.zod.js +1 -1
- package/dist/billing/v1/generated/validators/price.zod.d.ts +4 -1
- package/dist/billing/v1/generated/validators/price.zod.js +10 -2
- package/dist/billing/v1/generated/validators/priceList.zod.d.ts +4 -1
- package/dist/billing/v1/generated/validators/quote.zod.d.ts +2 -0
- package/dist/billing/v1/generated/validators/quoteCancellation.zod.js +2 -2
- package/dist/billing/v1/generated/validators/quoteItemInput.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/quoteItemInput.zod.js +2 -2
- package/dist/billing/v1/generated/validators/quoteRenewal.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/quoteRenewal.zod.js +3 -3
- package/dist/billing/v1/generated/validators/quoteRequest.zod.d.ts +2 -2
- package/dist/billing/v1/generated/validators/refundPolicy.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/refundPolicy.zod.js +2 -2
- package/dist/billing/v1/generated/validators/refundReason.zod.js +1 -1
- package/dist/billing/v1/generated/validators/renewRequest.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/renewRequest.zod.js +3 -3
- package/dist/billing/v1/generated/validators/renewalOrderRequest.zod.d.ts +1 -1
- package/dist/billing/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
- package/dist/billing/v1/generated/validators/renewalPrice.zod.d.ts +4 -1
- package/dist/billing/v1/generated/validators/renewalPrice.zod.js +4 -2
- package/dist/billing/v1/generated/validators/renewalPriceList.zod.d.ts +4 -1
- package/dist/billing/v1/generated/validators/subscription.zod.d.ts +5 -1
- package/dist/billing/v1/generated/validators/subscription.zod.js +14 -2
- package/dist/billing/v1/generated/validators/subscriptionList.zod.d.ts +5 -1
- package/dist/canopy/v1/generated/models.d.ts +71 -33
- package/dist/canopy/v1/generated/models.js +2 -1
- package/dist/canopy/v1/generated/validators/cancelSubscriptionRequest.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/cancellation.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/cancellationCreate.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/{terminationPolicy.zod.d.ts → cancellationPolicy.zod.d.ts} +3 -3
- package/dist/canopy/v1/generated/validators/{terminationPolicy.zod.js → cancellationPolicy.zod.js} +2 -2
- package/dist/canopy/v1/generated/validators/cancellationRefundPreview.zod.d.ts +2 -0
- package/dist/canopy/v1/generated/validators/cancellationRefundPreview.zod.js +4 -3
- package/dist/canopy/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/cancellationRefundPreviewItem.zod.js +1 -0
- package/dist/canopy/v1/generated/validators/order.zod.d.ts +5 -3
- package/dist/canopy/v1/generated/validators/orderItem.zod.d.ts +5 -3
- package/dist/canopy/v1/generated/validators/orderItem.zod.js +10 -6
- package/dist/canopy/v1/generated/validators/orderItemList.zod.d.ts +5 -3
- package/dist/canopy/v1/generated/validators/orderList.zod.d.ts +5 -3
- package/dist/canopy/v1/generated/validators/orderRefundQuote.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/price.zod.d.ts +4 -1
- package/dist/canopy/v1/generated/validators/price.zod.js +10 -2
- package/dist/canopy/v1/generated/validators/priceList.zod.d.ts +4 -1
- package/dist/canopy/v1/generated/validators/quote5f60d00.zod.d.ts +2 -0
- package/dist/canopy/v1/generated/validators/quoteA200529.zod.d.ts +2 -0
- package/dist/canopy/v1/generated/validators/quoteCancellation.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/quoteItemInput.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/validators/quoteItemInput.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/quoteRenewal.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/validators/quoteRenewal.zod.js +3 -3
- package/dist/canopy/v1/generated/validators/quoteRequest.zod.d.ts +2 -2
- package/dist/canopy/v1/generated/validators/refundPolicy.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/refundPolicy.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/refundReason.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/renewRequest.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/validators/renewRequest.zod.js +3 -3
- package/dist/canopy/v1/generated/validators/renewalOrderRequest.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/renewalPrice.zod.d.ts +4 -1
- package/dist/canopy/v1/generated/validators/renewalPrice.zod.js +4 -2
- package/dist/canopy/v1/generated/validators/renewalPriceList.zod.d.ts +4 -1
- package/dist/canopy/v1/generated/validators/subscription.zod.d.ts +5 -1
- package/dist/canopy/v1/generated/validators/subscription.zod.js +14 -2
- package/dist/canopy/v1/generated/validators/subscriptionList.zod.d.ts +5 -1
- package/dist/iam/v1/generated/functions.d.ts +2 -1
- package/dist/iam/v1/generated/functions.js +2 -1
- package/dist/iam/v1/generated/schemas.zod.d.ts +2 -1
- package/dist/iam/v1/generated/schemas.zod.js +2 -1
- package/dist/membership/v1/generated/models.d.ts +71 -33
- package/dist/membership/v1/generated/models.js +2 -1
- package/dist/membership/v1/generated/validators/cancelSubscriptionRequest.zod.js +2 -2
- package/dist/membership/v1/generated/validators/cancellation.zod.js +2 -2
- package/dist/membership/v1/generated/validators/cancellationCreate.zod.js +2 -2
- package/dist/membership/v1/generated/validators/{terminationPolicy.zod.d.ts → cancellationPolicy.zod.d.ts} +3 -3
- package/dist/membership/v1/generated/validators/{terminationPolicy.zod.js → cancellationPolicy.zod.js} +2 -2
- package/dist/membership/v1/generated/validators/cancellationRefundPreview.zod.d.ts +2 -0
- package/dist/membership/v1/generated/validators/cancellationRefundPreview.zod.js +4 -3
- package/dist/membership/v1/generated/validators/cancellationRefundPreviewItem.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/cancellationRefundPreviewItem.zod.js +1 -0
- package/dist/membership/v1/generated/validators/order.zod.d.ts +5 -3
- package/dist/membership/v1/generated/validators/orderItem.zod.d.ts +5 -3
- package/dist/membership/v1/generated/validators/orderItem.zod.js +10 -6
- package/dist/membership/v1/generated/validators/orderItemList.zod.d.ts +5 -3
- package/dist/membership/v1/generated/validators/orderList.zod.d.ts +5 -3
- package/dist/membership/v1/generated/validators/orderRefundQuote.zod.js +1 -1
- package/dist/membership/v1/generated/validators/price.zod.d.ts +4 -1
- package/dist/membership/v1/generated/validators/price.zod.js +10 -2
- package/dist/membership/v1/generated/validators/priceList.zod.d.ts +4 -1
- package/dist/membership/v1/generated/validators/quote.zod.d.ts +2 -0
- package/dist/membership/v1/generated/validators/quoteCancellation.zod.js +2 -2
- package/dist/membership/v1/generated/validators/quoteItemInput.zod.d.ts +1 -1
- package/dist/membership/v1/generated/validators/quoteItemInput.zod.js +2 -2
- package/dist/membership/v1/generated/validators/quoteRenewal.zod.d.ts +1 -1
- package/dist/membership/v1/generated/validators/quoteRenewal.zod.js +3 -3
- package/dist/membership/v1/generated/validators/quoteRequest.zod.d.ts +2 -2
- package/dist/membership/v1/generated/validators/refundPolicy.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/refundPolicy.zod.js +2 -2
- package/dist/membership/v1/generated/validators/refundReason.zod.js +1 -1
- package/dist/membership/v1/generated/validators/renewRequest.zod.d.ts +1 -1
- package/dist/membership/v1/generated/validators/renewRequest.zod.js +3 -3
- package/dist/membership/v1/generated/validators/renewalOrderRequest.zod.d.ts +1 -1
- package/dist/membership/v1/generated/validators/renewalOrderRequest.zod.js +2 -2
- package/dist/membership/v1/generated/validators/renewalPrice.zod.d.ts +4 -1
- package/dist/membership/v1/generated/validators/renewalPrice.zod.js +4 -2
- package/dist/membership/v1/generated/validators/renewalPriceList.zod.d.ts +4 -1
- package/dist/membership/v1/generated/validators/subscription.zod.d.ts +5 -1
- package/dist/membership/v1/generated/validators/subscription.zod.js +14 -2
- package/dist/membership/v1/generated/validators/subscriptionList.zod.d.ts +5 -1
- package/package.json +1 -1
|
@@ -958,20 +958,34 @@ export interface WithdrawalItemList {
|
|
|
958
958
|
pagination: OffsetPagination;
|
|
959
959
|
}
|
|
960
960
|
/**
|
|
961
|
-
* Whether a delivered purchase may
|
|
961
|
+
* Whether a cancellation of a delivered purchase may take effect immediately or only at the end of its paid term; refunds follow the refund policy. When absent, no cancellation terms were agreed.
|
|
962
962
|
*/
|
|
963
|
-
export type
|
|
964
|
-
export declare const
|
|
963
|
+
export type CancellationPolicy = (typeof CancellationPolicy)[keyof typeof CancellationPolicy];
|
|
964
|
+
export declare const CancellationPolicy: {
|
|
965
965
|
readonly immediate: "immediate";
|
|
966
966
|
readonly period_end: "period_end";
|
|
967
967
|
};
|
|
968
968
|
/**
|
|
969
|
-
* `none` refunds nothing.
|
|
969
|
+
* `none` refunds nothing.
|
|
970
|
+
*
|
|
971
|
+
* `prorated` refunds the amount paid for the current period minus the value of the time used, never below zero
|
|
972
|
+
* or above what remains unrefunded. Time used runs from the period start to the effective cancellation, by the
|
|
973
|
+
* second. Each whole month from the period start is valued at the order item's `monthly_list_amount`, and the
|
|
974
|
+
* remainder at that amount in proportion to the length of the month it falls in; without `monthly_list_amount`,
|
|
975
|
+
* time used is valued at the amount paid in proportion to the length of the period. A renewal starts a new
|
|
976
|
+
* period, and an immediate change starts one at the change. Discounts and setup fees are not refunded. Refunds
|
|
977
|
+
* return to the original payment sources, with tax refunded in proportion.
|
|
978
|
+
*
|
|
979
|
+
* `short_rate` refunds as `prorated`, except that when the cancellation takes effect less than
|
|
980
|
+
* `short_rate_threshold_seconds` after the period start, the value of the time used is multiplied by
|
|
981
|
+
* `short_rate_multiplier`, up to `monthly_list_amount` for each month begun or, without `monthly_list_amount`,
|
|
982
|
+
* up to the amount paid.
|
|
970
983
|
*/
|
|
971
984
|
export type RefundPolicy = (typeof RefundPolicy)[keyof typeof RefundPolicy];
|
|
972
985
|
export declare const RefundPolicy: {
|
|
973
986
|
readonly none: "none";
|
|
974
987
|
readonly prorated: "prorated";
|
|
988
|
+
readonly short_rate: "short_rate";
|
|
975
989
|
};
|
|
976
990
|
export interface OrderCancel {
|
|
977
991
|
/**
|
|
@@ -991,8 +1005,8 @@ export declare const QuoteRenewalInterval: {
|
|
|
991
1005
|
* Price renewing a licensed subscription. Give `price_id`, or `interval` with
|
|
992
1006
|
* `interval_count`, to renew for another term at the price currently sold for it. Naming
|
|
993
1007
|
* the current term, or giving neither, renews at the agreed amount. A term sold at several
|
|
994
|
-
* prices that differ in
|
|
995
|
-
* `BILLING_RENEWAL_OPTION_AMBIGUOUS` unless `
|
|
1008
|
+
* prices that differ in cancellation policy is refused with 409
|
|
1009
|
+
* `BILLING_RENEWAL_OPTION_AMBIGUOUS` unless `cancellation_policy` or `price_id` is given.
|
|
996
1010
|
*/
|
|
997
1011
|
export interface QuoteRenewal {
|
|
998
1012
|
subscription_id: string;
|
|
@@ -1000,8 +1014,8 @@ export interface QuoteRenewal {
|
|
|
1000
1014
|
interval?: QuoteRenewalInterval;
|
|
1001
1015
|
/** @minimum 1 */
|
|
1002
1016
|
interval_count?: number;
|
|
1003
|
-
/** With `interval` and `interval_count`, chooses among prices of that term that differ in
|
|
1004
|
-
|
|
1017
|
+
/** With `interval` and `interval_count`, chooses among prices of that term that differ in cancellation policy. */
|
|
1018
|
+
cancellation_policy?: CancellationPolicy;
|
|
1005
1019
|
/**
|
|
1006
1020
|
* How many consecutive periods to renew for.
|
|
1007
1021
|
* @minimum 1
|
|
@@ -1133,6 +1147,7 @@ export interface CancellationRefundPreviewItem {
|
|
|
1133
1147
|
/** Whether automatic renewal is on now. Creating the cancellation turns it off; withdrawing it turns it back on for a metered subscription but not for a licensed one. */
|
|
1134
1148
|
auto_renew: boolean;
|
|
1135
1149
|
unused_amount: Money;
|
|
1150
|
+
short_rate_surcharge_amount: Money;
|
|
1136
1151
|
refundable_amount: Money;
|
|
1137
1152
|
refund_amount: Money;
|
|
1138
1153
|
credit_amount: Money;
|
|
@@ -1143,8 +1158,9 @@ export interface CancellationRefundPreviewItem {
|
|
|
1143
1158
|
* What the cancellation would return, per subscription and in total, as of now. Give `proration_date` and
|
|
1144
1159
|
* `refundable_amount` when creating the cancellation.
|
|
1145
1160
|
*
|
|
1146
|
-
* - `unused_amount`: before tax, the amount paid for the current periods
|
|
1147
|
-
*
|
|
1161
|
+
* - `unused_amount`: before tax, the amount paid for the current periods in proportion to the time remaining.
|
|
1162
|
+
* - `short_rate_surcharge_amount`: before tax, the part of `forfeited_amount` due to the short rate of the
|
|
1163
|
+
* refund policy.
|
|
1148
1164
|
* - `refundable_amount`: what is returned the way it was paid, tax included; `refund_amount` plus
|
|
1149
1165
|
* `credit_amount`.
|
|
1150
1166
|
* - `refund_amount`: the part returned to the balance or the payment method.
|
|
@@ -1155,13 +1171,14 @@ export interface CancellationRefundPreviewItem {
|
|
|
1155
1171
|
* Metered and one-time subscriptions show zero; their usage until release is charged as usual.
|
|
1156
1172
|
*/
|
|
1157
1173
|
export interface CancellationRefundPreview {
|
|
1158
|
-
mode:
|
|
1174
|
+
mode: CancellationPolicy;
|
|
1159
1175
|
/** For `period_end`, when release begins, the end of the paid terms. */
|
|
1160
1176
|
scheduled_at?: string;
|
|
1161
1177
|
/** For `immediate`, the second the refund is computed as of. Give it when creating the cancellation. */
|
|
1162
1178
|
proration_date?: string;
|
|
1163
1179
|
currency: string;
|
|
1164
1180
|
unused_amount: Money;
|
|
1181
|
+
short_rate_surcharge_amount: Money;
|
|
1165
1182
|
refundable_amount: Money;
|
|
1166
1183
|
refund_amount: Money;
|
|
1167
1184
|
credit_amount: Money;
|
|
@@ -1170,7 +1187,7 @@ export interface CancellationRefundPreview {
|
|
|
1170
1187
|
items: CancellationRefundPreviewItem[];
|
|
1171
1188
|
}
|
|
1172
1189
|
/**
|
|
1173
|
-
* An estimated refund to the original payment sources. Before acceptance, cancellation returns the collected amount. For delivered service, only value paid by this order is included; renewals are evaluated with their own orders under the agreed
|
|
1190
|
+
* An estimated refund to the original payment sources. Before acceptance, cancellation returns the collected amount. For delivered service, only value paid by this order is included; renewals are evaluated with their own orders under the agreed cancellation terms. Nothing is refunded by the quote; the amount is fixed when cancellation or termination is confirmed.
|
|
1174
1191
|
*/
|
|
1175
1192
|
export interface OrderRefundQuote {
|
|
1176
1193
|
order_id: string;
|
|
@@ -1210,7 +1227,7 @@ export interface QuoteCancellation {
|
|
|
1210
1227
|
* @maxItems 50
|
|
1211
1228
|
*/
|
|
1212
1229
|
subscription_ids: string[];
|
|
1213
|
-
mode:
|
|
1230
|
+
mode: CancellationPolicy;
|
|
1214
1231
|
}
|
|
1215
1232
|
export interface CancellationCreate {
|
|
1216
1233
|
/**
|
|
@@ -1219,7 +1236,7 @@ export interface CancellationCreate {
|
|
|
1219
1236
|
* @maxItems 50
|
|
1220
1237
|
*/
|
|
1221
1238
|
subscription_ids: string[];
|
|
1222
|
-
mode:
|
|
1239
|
+
mode: CancellationPolicy;
|
|
1223
1240
|
/** For `immediate`, the quote's `proration_date`: a whole second, not in the future and at most ten minutes old; the refund is computed as of it. Now when omitted. */
|
|
1224
1241
|
proration_date?: string;
|
|
1225
1242
|
/** The quote's `refundable_amount`; the cancellation is refused when the refund differs. */
|
|
@@ -1299,7 +1316,7 @@ export interface CancellationItem {
|
|
|
1299
1316
|
export interface Cancellation {
|
|
1300
1317
|
id: string;
|
|
1301
1318
|
status: CancellationStatus;
|
|
1302
|
-
mode:
|
|
1319
|
+
mode: CancellationPolicy;
|
|
1303
1320
|
scheduled_at?: string;
|
|
1304
1321
|
/** For `immediate`, the second the refund is computed as of. */
|
|
1305
1322
|
proration_date?: string;
|
|
@@ -2216,9 +2233,11 @@ export declare const RefundStatus: {
|
|
|
2216
2233
|
* - `change_expired`: a scheduled change could not take effect in time.
|
|
2217
2234
|
* - `subscription_canceled`: the unused value of a canceled subscription, under its refund terms.
|
|
2218
2235
|
* - `future_period_canceled`: a renewal that had not started was withdrawn.
|
|
2219
|
-
* - `downgrade_difference`: after a downgrade, the remaining paid value, valued
|
|
2220
|
-
*
|
|
2221
|
-
* `
|
|
2236
|
+
* - `downgrade_difference`: after a downgrade, the remaining paid value, valued under each paid period's refund
|
|
2237
|
+
* policy and as `prorated` where that policy is `none`, minus the new configuration's value for the remaining
|
|
2238
|
+
* time: each whole month at the change item's `monthly_list_amount` and the remainder in proportion to the
|
|
2239
|
+
* length of the month it falls in, or without `monthly_list_amount`, the new period price in proportion to the
|
|
2240
|
+
* remaining time.
|
|
2222
2241
|
* - `usage_true_up`: usage priced over the whole month cost less than was charged.
|
|
2223
2242
|
* - `payment_not_applied`: a payment arrived after its invoice could no longer be paid.
|
|
2224
2243
|
* - `operator`: made by the platform operator.
|
|
@@ -2439,8 +2458,14 @@ export interface Subscription {
|
|
|
2439
2458
|
interval_count?: number;
|
|
2440
2459
|
/** The whole licensed subscription's renewal amount, after continuing discounts and before tax. A pending subscription shows base terms until paying the order fixes any new discount. Absent for metered and one-time subscriptions. */
|
|
2441
2460
|
recurring_amount?: string;
|
|
2442
|
-
|
|
2461
|
+
cancellation_policy?: CancellationPolicy;
|
|
2443
2462
|
refund_policy?: RefundPolicy;
|
|
2463
|
+
/** Refund policy `short_rate` only, as on the price bought. */
|
|
2464
|
+
short_rate_multiplier?: string;
|
|
2465
|
+
/** Refund policy `short_rate` only, as on the price bought. */
|
|
2466
|
+
short_rate_threshold_seconds?: number;
|
|
2467
|
+
/** Licensed recurring only, the `monthly_list_amount` that a renewal at the agreed amount keeps; see the order item. */
|
|
2468
|
+
monthly_list_amount?: string;
|
|
2444
2469
|
order_item_id?: string;
|
|
2445
2470
|
coupon_id?: string;
|
|
2446
2471
|
coupon?: ObjectIdentity;
|
|
@@ -2513,8 +2538,12 @@ export declare const RenewalPriceInterval: {
|
|
|
2513
2538
|
readonly year: "year";
|
|
2514
2539
|
};
|
|
2515
2540
|
export interface RenewalPrice {
|
|
2516
|
-
|
|
2541
|
+
cancellation_policy?: CancellationPolicy;
|
|
2517
2542
|
refund_policy?: RefundPolicy;
|
|
2543
|
+
/** Refund policy `short_rate` only. */
|
|
2544
|
+
short_rate_multiplier?: string;
|
|
2545
|
+
/** Refund policy `short_rate` only. */
|
|
2546
|
+
short_rate_threshold_seconds?: number;
|
|
2518
2547
|
price_id: string;
|
|
2519
2548
|
/** How many periods one renewal covers. */
|
|
2520
2549
|
interval_count: number;
|
|
@@ -2553,8 +2582,8 @@ export interface RenewRequest {
|
|
|
2553
2582
|
* Leaving both out renews at the price this item already bills at, which a later price
|
|
2554
2583
|
* change does not affect. Naming a term that differs from the current one is a fresh
|
|
2555
2584
|
* choice, so it is bought at today's price. Naming the current term changes nothing. A
|
|
2556
|
-
* term sold at several prices that differ in
|
|
2557
|
-
* `BILLING_RENEWAL_OPTION_AMBIGUOUS` unless `
|
|
2585
|
+
* term sold at several prices that differ in cancellation policy is refused with 409
|
|
2586
|
+
* `BILLING_RENEWAL_OPTION_AMBIGUOUS` unless `cancellation_policy` is given.
|
|
2558
2587
|
*
|
|
2559
2588
|
* List the terms on offer with the renewal prices operation.
|
|
2560
2589
|
* @minimum 1
|
|
@@ -2562,8 +2591,8 @@ export interface RenewRequest {
|
|
|
2562
2591
|
interval_count?: number;
|
|
2563
2592
|
/** The unit interval_count counts in. */
|
|
2564
2593
|
interval?: RenewRequestInterval;
|
|
2565
|
-
/** With `interval` and `interval_count`, chooses among prices of that term that differ in
|
|
2566
|
-
|
|
2594
|
+
/** With `interval` and `interval_count`, chooses among prices of that term that differ in cancellation policy. */
|
|
2595
|
+
cancellation_policy?: CancellationPolicy;
|
|
2567
2596
|
payment_method_id?: string;
|
|
2568
2597
|
/** Whether to pay from the balance, with or without `payment_method_id`. */
|
|
2569
2598
|
use_balance?: boolean;
|
|
@@ -2599,7 +2628,7 @@ export interface RenewalOrderRequest {
|
|
|
2599
2628
|
/** As in renewing. */
|
|
2600
2629
|
interval?: RenewalOrderRequestInterval;
|
|
2601
2630
|
/** As in renewing. */
|
|
2602
|
-
|
|
2631
|
+
cancellation_policy?: CancellationPolicy;
|
|
2603
2632
|
}
|
|
2604
2633
|
export interface AutoRenewSet {
|
|
2605
2634
|
auto_renew: boolean;
|
|
@@ -2680,18 +2709,23 @@ export interface OrderItem {
|
|
|
2680
2709
|
interval: OrderItemInterval;
|
|
2681
2710
|
/** @minimum 1 */
|
|
2682
2711
|
interval_count?: number;
|
|
2683
|
-
|
|
2712
|
+
cancellation_policy?: CancellationPolicy;
|
|
2684
2713
|
refund_policy?: RefundPolicy;
|
|
2685
2714
|
/**
|
|
2686
|
-
* Recurring licensed items only:
|
|
2715
|
+
* Recurring licensed items only: a month at list price for this item's quantity, before tax and discounts, which values time under a refund or a downgrade. It is the monthly amount of the shortest period the plan sells, not longer than the one bought, at the item's dimensions, fixed at purchase; a renewal at the agreed amount keeps the previous value. Null when time used is valued at the amount paid, as for a daily period.
|
|
2716
|
+
* @nullable
|
|
2717
|
+
*/
|
|
2718
|
+
monthly_list_amount?: string | null;
|
|
2719
|
+
/**
|
|
2720
|
+
* Refund policy `short_rate` only, as on the price when bought.
|
|
2687
2721
|
* @nullable
|
|
2688
2722
|
*/
|
|
2689
|
-
|
|
2723
|
+
short_rate_multiplier?: string | null;
|
|
2690
2724
|
/**
|
|
2691
|
-
*
|
|
2725
|
+
* Refund policy `short_rate` only, as on the price when bought.
|
|
2692
2726
|
* @nullable
|
|
2693
2727
|
*/
|
|
2694
|
-
|
|
2728
|
+
short_rate_threshold_seconds?: number | null;
|
|
2695
2729
|
recurring_amount?: string;
|
|
2696
2730
|
setup_amount?: string;
|
|
2697
2731
|
type: PriceType;
|
|
@@ -3021,8 +3055,12 @@ export interface Price {
|
|
|
3021
3055
|
unit_quantity: string;
|
|
3022
3056
|
/** False once archived. An archived price cannot be bought until it is active again. */
|
|
3023
3057
|
active: boolean;
|
|
3024
|
-
|
|
3058
|
+
cancellation_policy?: CancellationPolicy;
|
|
3025
3059
|
refund_policy?: RefundPolicy;
|
|
3060
|
+
/** Refund policy `short_rate` only, the factor applied to the value of the time used when a cancellation takes effect less than `short_rate_threshold_seconds` after the period start. */
|
|
3061
|
+
short_rate_multiplier?: string;
|
|
3062
|
+
/** Refund policy `short_rate` only, how long after the period start `short_rate_multiplier` applies. */
|
|
3063
|
+
short_rate_threshold_seconds?: number;
|
|
3026
3064
|
product_id?: ProductID;
|
|
3027
3065
|
id: string;
|
|
3028
3066
|
plan_id: string;
|
|
@@ -3147,7 +3185,7 @@ export interface QuoteItemInput {
|
|
|
3147
3185
|
/** @minimum 1 */
|
|
3148
3186
|
interval_count?: number;
|
|
3149
3187
|
/** Selects among licensed prices with otherwise identical billing terms. Ambiguous terms are refused instead of choosing a price arbitrarily. */
|
|
3150
|
-
|
|
3188
|
+
cancellation_policy?: CancellationPolicy;
|
|
3151
3189
|
/** @pattern ^(?:(?:[1-9][0-9]{0,27}|0(?:[1-9][0-9]{0,26}|0(?:[1-9][0-9]{0,25}|0(?:[1-9][0-9]{0,24}|0(?:[1-9][0-9]{0,23}|0(?:[1-9][0-9]{0,22}|0(?:[1-9][0-9]{0,21}|0(?:[1-9][0-9]{0,20}|0(?:[1-9][0-9]{0,19}|0(?:[1-9][0-9]{0,18}|0(?:[1-9][0-9]{0,17}|0(?:[1-9][0-9]{0,16}|0(?:[1-9][0-9]{0,15}|0(?:[1-9][0-9]{0,14}|0(?:[1-9][0-9]{0,13}|0(?:[1-9][0-9]{0,12}|0(?:[1-9][0-9]{0,11}|0(?:[1-9][0-9]{0,10}|0(?:[1-9][0-9]{0,9}|0(?:[1-9][0-9]{0,8}|0(?:[1-9][0-9]{0,7}|0(?:[1-9][0-9]{0,6}|0(?:[1-9][0-9]{0,5}|0(?:[1-9][0-9]{0,4}|0(?:[1-9][0-9]{0,3}|0(?:[1-9][0-9]{0,2}|0(?:[1-9][0-9]{0,1}|0[1-9])))))))))))))))))))))))))))([.][0-9]{1,10})?|0{1,28}[.](?:[1-9][0-9]{0,9}|0(?:[1-9][0-9]{0,8}|0(?:[1-9][0-9]{0,7}|0(?:[1-9][0-9]{0,6}|0(?:[1-9][0-9]{0,5}|0(?:[1-9][0-9]{0,4}|0(?:[1-9][0-9]{0,3}|0(?:[1-9][0-9]{0,2}|0(?:[1-9][0-9]{0,1}|0[1-9]))))))))))$ */
|
|
3152
3190
|
quantity: string;
|
|
3153
3191
|
meter_id?: string;
|
|
@@ -3372,7 +3410,7 @@ export interface ContactList {
|
|
|
3372
3410
|
pagination: OffsetPagination;
|
|
3373
3411
|
}
|
|
3374
3412
|
export interface CancelSubscriptionRequest {
|
|
3375
|
-
mode:
|
|
3413
|
+
mode: CancellationPolicy;
|
|
3376
3414
|
/** For immediate cancellation, the quoted whole-second refund basis. Now when omitted. */
|
|
3377
3415
|
proration_date?: string;
|
|
3378
3416
|
/** The cancellation quote's refundable amount, including an explicit zero. */
|
|
@@ -95,13 +95,14 @@ export const WithdrawalStatus = {
|
|
|
95
95
|
failed: "failed",
|
|
96
96
|
reversed: "reversed",
|
|
97
97
|
};
|
|
98
|
-
export const
|
|
98
|
+
export const CancellationPolicy = {
|
|
99
99
|
immediate: "immediate",
|
|
100
100
|
period_end: "period_end",
|
|
101
101
|
};
|
|
102
102
|
export const RefundPolicy = {
|
|
103
103
|
none: "none",
|
|
104
104
|
prorated: "prorated",
|
|
105
|
+
short_rate: "short_rate",
|
|
105
106
|
};
|
|
106
107
|
export const QuoteRenewalInterval = {
|
|
107
108
|
day: "day",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
* OpenAPI spec version: 1.0.0
|
|
32
32
|
*/
|
|
33
33
|
import * as zod from "zod";
|
|
34
|
+
import { CancellationPolicy } from "./cancellationPolicy.zod.js";
|
|
34
35
|
import { Money } from "./money.zod.js";
|
|
35
|
-
import { TerminationPolicy } from "./terminationPolicy.zod.js";
|
|
36
36
|
export const cancelSubscriptionRequestExpectedRefundableAmountTwoRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
37
37
|
export const cancelSubscriptionRequestReasonMax = 1024;
|
|
38
38
|
export const CancelSubscriptionRequest = zod.strictObject({
|
|
39
|
-
mode:
|
|
39
|
+
mode: CancellationPolicy,
|
|
40
40
|
proration_date: zod.iso
|
|
41
41
|
.datetime({ offset: true })
|
|
42
42
|
.optional()
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
*/
|
|
33
33
|
import * as zod from "zod";
|
|
34
34
|
import { CancellationItem } from "./cancellationItem.zod.js";
|
|
35
|
+
import { CancellationPolicy } from "./cancellationPolicy.zod.js";
|
|
35
36
|
import { Money } from "./money.zod.js";
|
|
36
|
-
import { TerminationPolicy } from "./terminationPolicy.zod.js";
|
|
37
37
|
export const Cancellation = zod
|
|
38
38
|
.strictObject({
|
|
39
39
|
id: zod.uuid(),
|
|
40
40
|
status: zod.enum(["requested", "scheduled", "releasing", "completed", "canceled", "failed"]),
|
|
41
|
-
mode:
|
|
41
|
+
mode: CancellationPolicy,
|
|
42
42
|
scheduled_at: zod.iso.datetime({ offset: true }).optional(),
|
|
43
43
|
proration_date: zod.iso
|
|
44
44
|
.datetime({ offset: true })
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
* OpenAPI spec version: 1.0.0
|
|
32
32
|
*/
|
|
33
33
|
import * as zod from "zod";
|
|
34
|
+
import { CancellationPolicy } from "./cancellationPolicy.zod.js";
|
|
34
35
|
import { Money } from "./money.zod.js";
|
|
35
|
-
import { TerminationPolicy } from "./terminationPolicy.zod.js";
|
|
36
36
|
export const cancellationCreateSubscriptionIdsMax = 50;
|
|
37
37
|
export const cancellationCreateExpectedRefundableAmountTwoRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
38
38
|
export const cancellationCreateReasonMax = 1024;
|
|
@@ -42,7 +42,7 @@ export const CancellationCreate = zod.strictObject({
|
|
|
42
42
|
.min(1)
|
|
43
43
|
.max(cancellationCreateSubscriptionIdsMax)
|
|
44
44
|
.describe("As in the quote."),
|
|
45
|
-
mode:
|
|
45
|
+
mode: CancellationPolicy,
|
|
46
46
|
proration_date: zod.iso
|
|
47
47
|
.datetime({ offset: true })
|
|
48
48
|
.optional()
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
* OpenAPI spec version: 1.0.0
|
|
32
32
|
*/
|
|
33
33
|
import * as zod from "zod";
|
|
34
|
-
export declare const
|
|
34
|
+
export declare const CancellationPolicy: zod.ZodEnum<{
|
|
35
35
|
immediate: "immediate";
|
|
36
36
|
period_end: "period_end";
|
|
37
37
|
}>;
|
|
38
|
-
export type
|
|
39
|
-
export type
|
|
38
|
+
export type CancellationPolicy = zod.input<typeof CancellationPolicy>;
|
|
39
|
+
export type CancellationPolicyOutput = zod.output<typeof CancellationPolicy>;
|
package/dist/canopy/v1/generated/validators/{terminationPolicy.zod.js → cancellationPolicy.zod.js}
RENAMED
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
* OpenAPI spec version: 1.0.0
|
|
32
32
|
*/
|
|
33
33
|
import * as zod from "zod";
|
|
34
|
-
export const
|
|
34
|
+
export const CancellationPolicy = zod
|
|
35
35
|
.enum(["immediate", "period_end"])
|
|
36
|
-
.describe("Whether a delivered purchase may
|
|
36
|
+
.describe("Whether a cancellation of a delivered purchase may take effect immediately or only at the end of its paid term; refunds follow the refund policy. When absent, no cancellation terms were agreed.");
|
|
@@ -40,6 +40,7 @@ export declare const CancellationRefundPreview: zod.ZodObject<{
|
|
|
40
40
|
proration_date: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
41
41
|
currency: zod.ZodString;
|
|
42
42
|
unused_amount: zod.ZodString;
|
|
43
|
+
short_rate_surcharge_amount: zod.ZodString;
|
|
43
44
|
refundable_amount: zod.ZodString;
|
|
44
45
|
refund_amount: zod.ZodString;
|
|
45
46
|
credit_amount: zod.ZodString;
|
|
@@ -63,6 +64,7 @@ export declare const CancellationRefundPreview: zod.ZodObject<{
|
|
|
63
64
|
}>;
|
|
64
65
|
auto_renew: zod.ZodBoolean;
|
|
65
66
|
unused_amount: zod.ZodString;
|
|
67
|
+
short_rate_surcharge_amount: zod.ZodString;
|
|
66
68
|
refundable_amount: zod.ZodString;
|
|
67
69
|
refund_amount: zod.ZodString;
|
|
68
70
|
credit_amount: zod.ZodString;
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
* OpenAPI spec version: 1.0.0
|
|
32
32
|
*/
|
|
33
33
|
import * as zod from "zod";
|
|
34
|
+
import { CancellationPolicy } from "./cancellationPolicy.zod.js";
|
|
34
35
|
import { CancellationRefundPreviewItem } from "./cancellationRefundPreviewItem.zod.js";
|
|
35
36
|
import { Money } from "./money.zod.js";
|
|
36
|
-
import { TerminationPolicy } from "./terminationPolicy.zod.js";
|
|
37
37
|
export const CancellationRefundPreview = zod
|
|
38
38
|
.strictObject({
|
|
39
|
-
mode:
|
|
39
|
+
mode: CancellationPolicy,
|
|
40
40
|
scheduled_at: zod.iso
|
|
41
41
|
.datetime({ offset: true })
|
|
42
42
|
.optional()
|
|
@@ -47,6 +47,7 @@ export const CancellationRefundPreview = zod
|
|
|
47
47
|
.describe("For `immediate`, the second the refund is computed as of. Give it when creating the cancellation."),
|
|
48
48
|
currency: zod.string(),
|
|
49
49
|
unused_amount: Money,
|
|
50
|
+
short_rate_surcharge_amount: Money,
|
|
50
51
|
refundable_amount: Money,
|
|
51
52
|
refund_amount: Money,
|
|
52
53
|
credit_amount: Money,
|
|
@@ -54,4 +55,4 @@ export const CancellationRefundPreview = zod
|
|
|
54
55
|
forfeited_amount: Money,
|
|
55
56
|
items: zod.array(CancellationRefundPreviewItem),
|
|
56
57
|
})
|
|
57
|
-
.describe("What the cancellation would return, per subscription and in total, as of now. Give `proration_date` and\n`refundable_amount` when creating the cancellation.\n\n- `unused_amount`: before tax, the amount paid for the current periods
|
|
58
|
+
.describe("What the cancellation would return, per subscription and in total, as of now. Give `proration_date` and\n`refundable_amount` when creating the cancellation.\n\n- `unused_amount`: before tax, the amount paid for the current periods in proportion to the time remaining.\n- `short_rate_surcharge_amount`: before tax, the part of `forfeited_amount` due to the short rate of the\n refund policy.\n- `refundable_amount`: what is returned the way it was paid, tax included; `refund_amount` plus\n `credit_amount`.\n- `refund_amount`: the part returned to the balance or the payment method.\n- `credit_amount`: the part restored to the credit grants that paid.\n- `tax_amount`: the tax included in `refundable_amount`.\n- `forfeited_amount`: before tax, the part of `unused_amount` the refund terms do not return.\n\nMetered and one-time subscriptions show zero; their usage until release is charged as usual.");
|
|
@@ -49,6 +49,7 @@ export declare const CancellationRefundPreviewItem: zod.ZodObject<{
|
|
|
49
49
|
}>;
|
|
50
50
|
auto_renew: zod.ZodBoolean;
|
|
51
51
|
unused_amount: zod.ZodString;
|
|
52
|
+
short_rate_surcharge_amount: zod.ZodString;
|
|
52
53
|
refundable_amount: zod.ZodString;
|
|
53
54
|
refund_amount: zod.ZodString;
|
|
54
55
|
credit_amount: zod.ZodString;
|
|
@@ -50,6 +50,7 @@ export const CancellationRefundPreviewItem = zod
|
|
|
50
50
|
.boolean()
|
|
51
51
|
.describe("Whether automatic renewal is on now. Creating the cancellation turns it off; withdrawing it turns it back on for a metered subscription but not for a licensed one."),
|
|
52
52
|
unused_amount: Money,
|
|
53
|
+
short_rate_surcharge_amount: Money,
|
|
53
54
|
refundable_amount: Money,
|
|
54
55
|
refund_amount: Money,
|
|
55
56
|
credit_amount: Money,
|
|
@@ -117,16 +117,18 @@ export declare const Order: zod.ZodObject<{
|
|
|
117
117
|
year: "year";
|
|
118
118
|
}>;
|
|
119
119
|
interval_count: zod.ZodOptional<zod.ZodInt>;
|
|
120
|
-
|
|
120
|
+
cancellation_policy: zod.ZodOptional<zod.ZodEnum<{
|
|
121
121
|
immediate: "immediate";
|
|
122
122
|
period_end: "period_end";
|
|
123
123
|
}>>;
|
|
124
124
|
refund_policy: zod.ZodOptional<zod.ZodEnum<{
|
|
125
125
|
none: "none";
|
|
126
126
|
prorated: "prorated";
|
|
127
|
+
short_rate: "short_rate";
|
|
127
128
|
}>>;
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
monthly_list_amount: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
130
|
+
short_rate_multiplier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
131
|
+
short_rate_threshold_seconds: zod.ZodOptional<zod.ZodNullable<zod.ZodInt>>;
|
|
130
132
|
recurring_amount: zod.ZodOptional<zod.ZodString>;
|
|
131
133
|
setup_amount: zod.ZodOptional<zod.ZodString>;
|
|
132
134
|
type: zod.ZodEnum<{
|
|
@@ -45,16 +45,18 @@ export declare const OrderItem: zod.ZodObject<{
|
|
|
45
45
|
year: "year";
|
|
46
46
|
}>;
|
|
47
47
|
interval_count: zod.ZodOptional<zod.ZodInt>;
|
|
48
|
-
|
|
48
|
+
cancellation_policy: zod.ZodOptional<zod.ZodEnum<{
|
|
49
49
|
immediate: "immediate";
|
|
50
50
|
period_end: "period_end";
|
|
51
51
|
}>>;
|
|
52
52
|
refund_policy: zod.ZodOptional<zod.ZodEnum<{
|
|
53
53
|
none: "none";
|
|
54
54
|
prorated: "prorated";
|
|
55
|
+
short_rate: "short_rate";
|
|
55
56
|
}>>;
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
monthly_list_amount: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
58
|
+
short_rate_multiplier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
59
|
+
short_rate_threshold_seconds: zod.ZodOptional<zod.ZodNullable<zod.ZodInt>>;
|
|
58
60
|
recurring_amount: zod.ZodOptional<zod.ZodString>;
|
|
59
61
|
setup_amount: zod.ZodOptional<zod.ZodString>;
|
|
60
62
|
type: zod.ZodEnum<{
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
* OpenAPI spec version: 1.0.0
|
|
32
32
|
*/
|
|
33
33
|
import * as zod from "zod";
|
|
34
|
+
import { CancellationPolicy } from "./cancellationPolicy.zod.js";
|
|
34
35
|
import { Money } from "./money.zod.js";
|
|
35
36
|
import { OrderItemStatus } from "./orderItemStatus.zod.js";
|
|
36
37
|
import { PriceType } from "./priceType.zod.js";
|
|
37
38
|
import { Product } from "./product.zod.js";
|
|
38
39
|
import { ProductID } from "./productID.zod.js";
|
|
39
40
|
import { RefundPolicy } from "./refundPolicy.zod.js";
|
|
40
|
-
import { TerminationPolicy } from "./terminationPolicy.zod.js";
|
|
41
41
|
import { UsageType } from "./usageType.zod.js";
|
|
42
42
|
export const orderItemPositionMin = 0;
|
|
43
43
|
export const OrderItem = zod
|
|
@@ -58,16 +58,20 @@ export const OrderItem = zod
|
|
|
58
58
|
.describe("The Billing subscription: the new pending subscription of a recurring purchase, or the existing one renewed or changed, which keeps its ID. Absent for a purchase without a subscription."),
|
|
59
59
|
interval: zod.enum(["none", "day", "month", "year"]),
|
|
60
60
|
interval_count: zod.int().min(1).optional(),
|
|
61
|
-
|
|
61
|
+
cancellation_policy: CancellationPolicy.optional(),
|
|
62
62
|
refund_policy: RefundPolicy.optional(),
|
|
63
|
-
|
|
63
|
+
monthly_list_amount: zod
|
|
64
64
|
.string()
|
|
65
65
|
.nullish()
|
|
66
|
-
.describe("Recurring licensed items only:
|
|
67
|
-
|
|
66
|
+
.describe("Recurring licensed items only: a month at list price for this item's quantity, before tax and discounts, which values time under a refund or a downgrade. It is the monthly amount of the shortest period the plan sells, not longer than the one bought, at the item's dimensions, fixed at purchase; a renewal at the agreed amount keeps the previous value. Null when time used is valued at the amount paid, as for a daily period."),
|
|
67
|
+
short_rate_multiplier: zod
|
|
68
68
|
.string()
|
|
69
69
|
.nullish()
|
|
70
|
-
.describe("
|
|
70
|
+
.describe("Refund policy `short_rate` only, as on the price when bought."),
|
|
71
|
+
short_rate_threshold_seconds: zod
|
|
72
|
+
.int()
|
|
73
|
+
.nullish()
|
|
74
|
+
.describe("Refund policy `short_rate` only, as on the price when bought."),
|
|
71
75
|
recurring_amount: zod.string().optional(),
|
|
72
76
|
setup_amount: zod.string().optional(),
|
|
73
77
|
type: PriceType,
|
|
@@ -45,16 +45,18 @@ export declare const OrderItemList: zod.ZodObject<{
|
|
|
45
45
|
year: "year";
|
|
46
46
|
}>;
|
|
47
47
|
interval_count: zod.ZodOptional<zod.ZodInt>;
|
|
48
|
-
|
|
48
|
+
cancellation_policy: zod.ZodOptional<zod.ZodEnum<{
|
|
49
49
|
immediate: "immediate";
|
|
50
50
|
period_end: "period_end";
|
|
51
51
|
}>>;
|
|
52
52
|
refund_policy: zod.ZodOptional<zod.ZodEnum<{
|
|
53
53
|
none: "none";
|
|
54
54
|
prorated: "prorated";
|
|
55
|
+
short_rate: "short_rate";
|
|
55
56
|
}>>;
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
monthly_list_amount: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
58
|
+
short_rate_multiplier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
59
|
+
short_rate_threshold_seconds: zod.ZodOptional<zod.ZodNullable<zod.ZodInt>>;
|
|
58
60
|
recurring_amount: zod.ZodOptional<zod.ZodString>;
|
|
59
61
|
setup_amount: zod.ZodOptional<zod.ZodString>;
|
|
60
62
|
type: zod.ZodEnum<{
|
|
@@ -118,16 +118,18 @@ export declare const OrderList: zod.ZodObject<{
|
|
|
118
118
|
year: "year";
|
|
119
119
|
}>;
|
|
120
120
|
interval_count: zod.ZodOptional<zod.ZodInt>;
|
|
121
|
-
|
|
121
|
+
cancellation_policy: zod.ZodOptional<zod.ZodEnum<{
|
|
122
122
|
immediate: "immediate";
|
|
123
123
|
period_end: "period_end";
|
|
124
124
|
}>>;
|
|
125
125
|
refund_policy: zod.ZodOptional<zod.ZodEnum<{
|
|
126
126
|
none: "none";
|
|
127
127
|
prorated: "prorated";
|
|
128
|
+
short_rate: "short_rate";
|
|
128
129
|
}>>;
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
monthly_list_amount: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
131
|
+
short_rate_multiplier: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
132
|
+
short_rate_threshold_seconds: zod.ZodOptional<zod.ZodNullable<zod.ZodInt>>;
|
|
131
133
|
recurring_amount: zod.ZodOptional<zod.ZodString>;
|
|
132
134
|
setup_amount: zod.ZodOptional<zod.ZodString>;
|
|
133
135
|
type: zod.ZodEnum<{
|
|
@@ -40,4 +40,4 @@ export const OrderRefundQuote = zod
|
|
|
40
40
|
credit_amount: Money,
|
|
41
41
|
currency: zod.string(),
|
|
42
42
|
})
|
|
43
|
-
.describe("An estimated refund to the original payment sources. Before acceptance, cancellation returns the collected amount. For delivered service, only value paid by this order is included; renewals are evaluated with their own orders under the agreed
|
|
43
|
+
.describe("An estimated refund to the original payment sources. Before acceptance, cancellation returns the collected amount. For delivered service, only value paid by this order is included; renewals are evaluated with their own orders under the agreed cancellation terms. Nothing is refunded by the quote; the amount is fixed when cancellation or termination is confirmed.");
|
|
@@ -56,14 +56,17 @@ export declare const Price: zod.ZodObject<{
|
|
|
56
56
|
}, zod.z.core.$strict>>;
|
|
57
57
|
unit_quantity: zod.ZodString;
|
|
58
58
|
active: zod.ZodBoolean;
|
|
59
|
-
|
|
59
|
+
cancellation_policy: zod.ZodOptional<zod.ZodEnum<{
|
|
60
60
|
immediate: "immediate";
|
|
61
61
|
period_end: "period_end";
|
|
62
62
|
}>>;
|
|
63
63
|
refund_policy: zod.ZodOptional<zod.ZodEnum<{
|
|
64
64
|
none: "none";
|
|
65
65
|
prorated: "prorated";
|
|
66
|
+
short_rate: "short_rate";
|
|
66
67
|
}>>;
|
|
68
|
+
short_rate_multiplier: zod.ZodOptional<zod.ZodString>;
|
|
69
|
+
short_rate_threshold_seconds: zod.ZodOptional<zod.ZodInt>;
|
|
67
70
|
product_id: zod.ZodOptional<zod.ZodString>;
|
|
68
71
|
id: zod.ZodUUID;
|
|
69
72
|
plan_id: zod.ZodUUID;
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
*/
|
|
33
33
|
import * as zod from "zod";
|
|
34
34
|
import { BillingScheme } from "./billingScheme.zod.js";
|
|
35
|
+
import { CancellationPolicy } from "./cancellationPolicy.zod.js";
|
|
35
36
|
import { Money } from "./money.zod.js";
|
|
36
37
|
import { ObjectIdentity } from "./objectIdentity.zod.js";
|
|
37
38
|
import { PriceType } from "./priceType.zod.js";
|
|
38
39
|
import { Product } from "./product.zod.js";
|
|
39
40
|
import { ProductID } from "./productID.zod.js";
|
|
40
41
|
import { RefundPolicy } from "./refundPolicy.zod.js";
|
|
41
|
-
import { TerminationPolicy } from "./terminationPolicy.zod.js";
|
|
42
42
|
import { Tier } from "./tier.zod.js";
|
|
43
43
|
import { UsageType } from "./usageType.zod.js";
|
|
44
44
|
export const Price = zod.strictObject({
|
|
@@ -55,8 +55,16 @@ export const Price = zod.strictObject({
|
|
|
55
55
|
active: zod
|
|
56
56
|
.boolean()
|
|
57
57
|
.describe("False once archived. An archived price cannot be bought until it is active again."),
|
|
58
|
-
|
|
58
|
+
cancellation_policy: CancellationPolicy.optional(),
|
|
59
59
|
refund_policy: RefundPolicy.optional(),
|
|
60
|
+
short_rate_multiplier: zod
|
|
61
|
+
.string()
|
|
62
|
+
.optional()
|
|
63
|
+
.describe("Refund policy `short_rate` only, the factor applied to the value of the time used when a cancellation takes effect less than `short_rate_threshold_seconds` after the period start."),
|
|
64
|
+
short_rate_threshold_seconds: zod
|
|
65
|
+
.int()
|
|
66
|
+
.optional()
|
|
67
|
+
.describe("Refund policy `short_rate` only, how long after the period start `short_rate_multiplier` applies."),
|
|
60
68
|
product_id: ProductID.optional(),
|
|
61
69
|
id: zod.uuid(),
|
|
62
70
|
plan_id: zod.uuid(),
|