@flexprice/sdk 2.1.9 → 2.1.11

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.
Files changed (154) hide show
  1. package/docs/sdk/models/create-invoice-request.md +1 -0
  2. package/docs/sdk/models/create-subscription-request.md +38 -37
  3. package/docs/sdk/models/error-code.md +17 -0
  4. package/docs/sdk/models/error-response.md +5 -6
  5. package/docs/sdk/models/errors-error-response.md +5 -6
  6. package/docs/sdk/models/invoice-billing-reason.md +2 -2
  7. package/docs/sdk/models/invoice-response.md +1 -0
  8. package/docs/sdk/models/subscription-response-v2.md +1 -0
  9. package/docs/sdk/models/subscription-response.md +1 -0
  10. package/docs/sdks/invoices/README.md +0 -76
  11. package/esm/lib/config.d.ts +3 -3
  12. package/esm/lib/config.js +3 -3
  13. package/esm/lib/config.js.map +1 -1
  14. package/esm/sdk/invoices.d.ts +0 -7
  15. package/esm/sdk/invoices.d.ts.map +1 -1
  16. package/esm/sdk/invoices.js +0 -10
  17. package/esm/sdk/invoices.js.map +1 -1
  18. package/esm/sdk/models/create-invoice-request.d.ts +8 -0
  19. package/esm/sdk/models/create-invoice-request.d.ts.map +1 -1
  20. package/esm/sdk/models/create-invoice-request.js +2 -0
  21. package/esm/sdk/models/create-invoice-request.js.map +1 -1
  22. package/esm/sdk/models/create-subscription-request.d.ts +11 -0
  23. package/esm/sdk/models/create-subscription-request.d.ts.map +1 -1
  24. package/esm/sdk/models/create-subscription-request.js +2 -0
  25. package/esm/sdk/models/create-subscription-request.js.map +1 -1
  26. package/esm/sdk/models/customer-lookup-result.d.ts +1 -1
  27. package/esm/sdk/models/customer-lookup-result.d.ts.map +1 -1
  28. package/esm/sdk/models/customer-lookup-result.js +1 -1
  29. package/esm/sdk/models/customer-lookup-result.js.map +1 -1
  30. package/esm/sdk/models/error-code.d.ts +20 -0
  31. package/esm/sdk/models/error-code.d.ts.map +1 -0
  32. package/esm/sdk/models/error-code.js +21 -0
  33. package/esm/sdk/models/error-code.js.map +1 -0
  34. package/esm/sdk/models/error-response.d.ts +13 -0
  35. package/esm/sdk/models/error-response.d.ts.map +1 -0
  36. package/esm/sdk/models/error-response.js +22 -0
  37. package/esm/sdk/models/error-response.js.map +1 -0
  38. package/esm/sdk/models/errors-error-response.d.ts +3 -42
  39. package/esm/sdk/models/errors-error-response.d.ts.map +1 -1
  40. package/esm/sdk/models/errors-error-response.js +2 -42
  41. package/esm/sdk/models/errors-error-response.js.map +1 -1
  42. package/esm/sdk/models/failure-point.d.ts +1 -1
  43. package/esm/sdk/models/failure-point.d.ts.map +1 -1
  44. package/esm/sdk/models/failure-point.js +1 -1
  45. package/esm/sdk/models/failure-point.js.map +1 -1
  46. package/esm/sdk/models/index.d.ts +2 -5
  47. package/esm/sdk/models/index.d.ts.map +1 -1
  48. package/esm/sdk/models/index.js +2 -5
  49. package/esm/sdk/models/index.js.map +1 -1
  50. package/esm/sdk/models/invoice-billing-reason.d.ts +1 -0
  51. package/esm/sdk/models/invoice-billing-reason.d.ts.map +1 -1
  52. package/esm/sdk/models/invoice-billing-reason.js +1 -0
  53. package/esm/sdk/models/invoice-billing-reason.js.map +1 -1
  54. package/esm/sdk/models/invoice-response.d.ts +4 -0
  55. package/esm/sdk/models/invoice-response.d.ts.map +1 -1
  56. package/esm/sdk/models/invoice-response.js +2 -0
  57. package/esm/sdk/models/invoice-response.js.map +1 -1
  58. package/esm/sdk/models/meter-matching-result.d.ts +1 -1
  59. package/esm/sdk/models/meter-matching-result.d.ts.map +1 -1
  60. package/esm/sdk/models/meter-matching-result.js +1 -1
  61. package/esm/sdk/models/meter-matching-result.js.map +1 -1
  62. package/esm/sdk/models/price-lookup-result.d.ts +1 -1
  63. package/esm/sdk/models/price-lookup-result.d.ts.map +1 -1
  64. package/esm/sdk/models/price-lookup-result.js +1 -1
  65. package/esm/sdk/models/price-lookup-result.js.map +1 -1
  66. package/esm/sdk/models/subscription-line-item-lookup-result.d.ts +1 -1
  67. package/esm/sdk/models/subscription-line-item-lookup-result.d.ts.map +1 -1
  68. package/esm/sdk/models/subscription-line-item-lookup-result.js +1 -1
  69. package/esm/sdk/models/subscription-line-item-lookup-result.js.map +1 -1
  70. package/esm/sdk/models/subscription-response-v2.d.ts +8 -0
  71. package/esm/sdk/models/subscription-response-v2.d.ts.map +1 -1
  72. package/esm/sdk/models/subscription-response-v2.js +2 -0
  73. package/esm/sdk/models/subscription-response-v2.js.map +1 -1
  74. package/esm/sdk/models/subscription-response.d.ts +8 -0
  75. package/esm/sdk/models/subscription-response.d.ts.map +1 -1
  76. package/esm/sdk/models/subscription-response.js +2 -0
  77. package/esm/sdk/models/subscription-response.js.map +1 -1
  78. package/esm/sdk/sdk.d.ts +0 -3
  79. package/esm/sdk/sdk.d.ts.map +1 -1
  80. package/esm/sdk/sdk.js +0 -5
  81. package/esm/sdk/sdk.js.map +1 -1
  82. package/jsr.json +1 -1
  83. package/package.json +1 -1
  84. package/src/lib/config.ts +3 -3
  85. package/src/sdk/invoices.ts +0 -18
  86. package/src/sdk/models/create-invoice-request.ts +10 -0
  87. package/src/sdk/models/create-subscription-request.ts +13 -0
  88. package/src/sdk/models/customer-lookup-result.ts +1 -1
  89. package/src/sdk/models/error-code.ts +27 -0
  90. package/src/sdk/models/error-response.ts +44 -0
  91. package/src/sdk/models/errors-error-response.ts +4 -87
  92. package/src/sdk/models/failure-point.ts +1 -1
  93. package/src/sdk/models/index.ts +2 -5
  94. package/src/sdk/models/invoice-billing-reason.ts +1 -0
  95. package/src/sdk/models/invoice-response.ts +6 -0
  96. package/src/sdk/models/meter-matching-result.ts +1 -1
  97. package/src/sdk/models/price-lookup-result.ts +1 -1
  98. package/src/sdk/models/subscription-line-item-lookup-result.ts +1 -1
  99. package/src/sdk/models/subscription-response-v2.ts +10 -0
  100. package/src/sdk/models/subscription-response.ts +10 -0
  101. package/src/sdk/sdk.ts +0 -6
  102. package/docs/sdk/models/code.md +0 -17
  103. package/docs/sdk/models/details.md +0 -14
  104. package/docs/sdk/models/meter-usage-analytics-request.md +0 -30
  105. package/docs/sdk/models/meter-usage-analytics-response.md +0 -30
  106. package/docs/sdk/models/meter-usage-point.md +0 -21
  107. package/docs/sdk/models/meter-usage-query-request.md +0 -28
  108. package/docs/sdk/models/meter-usage-query-response.md +0 -30
  109. package/docs/sdks/meterusage/README.md +0 -182
  110. package/esm/funcs/invoices-get-meter-usage-preview-invoice.d.ts +0 -17
  111. package/esm/funcs/invoices-get-meter-usage-preview-invoice.d.ts.map +0 -1
  112. package/esm/funcs/invoices-get-meter-usage-preview-invoice.js +0 -83
  113. package/esm/funcs/invoices-get-meter-usage-preview-invoice.js.map +0 -1
  114. package/esm/funcs/meter-usage-get-meter-usage-analytics.d.ts +0 -17
  115. package/esm/funcs/meter-usage-get-meter-usage-analytics.d.ts.map +0 -1
  116. package/esm/funcs/meter-usage-get-meter-usage-analytics.js +0 -83
  117. package/esm/funcs/meter-usage-get-meter-usage-analytics.js.map +0 -1
  118. package/esm/funcs/meter-usage-query-meter-usage.d.ts +0 -17
  119. package/esm/funcs/meter-usage-query-meter-usage.d.ts.map +0 -1
  120. package/esm/funcs/meter-usage-query-meter-usage.js +0 -83
  121. package/esm/funcs/meter-usage-query-meter-usage.js.map +0 -1
  122. package/esm/sdk/meter-usage.d.ts +0 -19
  123. package/esm/sdk/meter-usage.d.ts.map +0 -1
  124. package/esm/sdk/meter-usage.js +0 -28
  125. package/esm/sdk/meter-usage.js.map +0 -1
  126. package/esm/sdk/models/meter-usage-analytics-request.d.ts +0 -26
  127. package/esm/sdk/models/meter-usage-analytics-request.d.ts.map +0 -1
  128. package/esm/sdk/models/meter-usage-analytics-request.js +0 -31
  129. package/esm/sdk/models/meter-usage-analytics-request.js.map +0 -1
  130. package/esm/sdk/models/meter-usage-analytics-response.d.ts +0 -11
  131. package/esm/sdk/models/meter-usage-analytics-response.d.ts.map +0 -1
  132. package/esm/sdk/models/meter-usage-analytics-response.js +0 -15
  133. package/esm/sdk/models/meter-usage-analytics-response.js.map +0 -1
  134. package/esm/sdk/models/meter-usage-point.d.ts +0 -12
  135. package/esm/sdk/models/meter-usage-point.d.ts.map +0 -1
  136. package/esm/sdk/models/meter-usage-point.js +0 -21
  137. package/esm/sdk/models/meter-usage-point.js.map +0 -1
  138. package/esm/sdk/models/meter-usage-query-request.d.ts +0 -26
  139. package/esm/sdk/models/meter-usage-query-request.d.ts.map +0 -1
  140. package/esm/sdk/models/meter-usage-query-request.js +0 -31
  141. package/esm/sdk/models/meter-usage-query-request.js.map +0 -1
  142. package/esm/sdk/models/meter-usage-query-response.d.ts +0 -16
  143. package/esm/sdk/models/meter-usage-query-response.d.ts.map +0 -1
  144. package/esm/sdk/models/meter-usage-query-response.js +0 -28
  145. package/esm/sdk/models/meter-usage-query-response.js.map +0 -1
  146. package/src/funcs/invoices-get-meter-usage-preview-invoice.ts +0 -172
  147. package/src/funcs/meter-usage-get-meter-usage-analytics.ts +0 -172
  148. package/src/funcs/meter-usage-query-meter-usage.ts +0 -172
  149. package/src/sdk/meter-usage.ts +0 -45
  150. package/src/sdk/models/meter-usage-analytics-request.ts +0 -69
  151. package/src/sdk/models/meter-usage-analytics-response.ts +0 -35
  152. package/src/sdk/models/meter-usage-point.ts +0 -43
  153. package/src/sdk/models/meter-usage-query-request.ts +0 -69
  154. package/src/sdk/models/meter-usage-query-response.ts +0 -58
@@ -33,6 +33,7 @@ let value: CreateInvoiceRequest = {
33
33
  | `invoicePdfUrl` | *string* | :heavy_minus_sign: | invoice_pdf_url is the URL where customers can download the PDF version of this invoice |
34
34
  | `invoiceStatus` | [models.InvoiceStatus](../../sdk/models/invoice-status.md) | :heavy_minus_sign: | N/A |
35
35
  | `invoiceType` | [models.InvoiceType](../../sdk/models/invoice-type.md) | :heavy_minus_sign: | N/A |
36
+ | `issueDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | issue_date overrides the user-facing date of the invoice.<br/>Defaults to created_at if not provided. |
36
37
  | `lineItemCoupons` | [models.InvoiceLineItemCoupon](../../sdk/models/invoice-line-item-coupon.md)[] | :heavy_minus_sign: | Invoice Line Item Coupons |
37
38
  | `lineItems` | [models.CreateInvoiceLineItemRequest](../../sdk/models/create-invoice-line-item-request.md)[] | :heavy_minus_sign: | line_items contains the individual items that make up this invoice |
38
39
  | `metadata` | Record<string, *string*> | :heavy_minus_sign: | N/A |
@@ -14,40 +14,41 @@ let value: CreateSubscriptionRequest = {
14
14
 
15
15
  ## Fields
16
16
 
17
- | Field | Type | Required | Description |
18
- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
19
- | `addons` | [models.AddAddonToSubscriptionRequest](../../sdk/models/add-addon-to-subscription-request.md)[] | :heavy_minus_sign: | Addons represents addons to be added to the subscription during creation |
20
- | `billingAnchor` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | BillingAnchor overrides the derived billing anchor when billing_cycle is anniversary.<br/>For monthly billing, the day-of-month (and time-of-day) define cycle boundaries: if start_date<br/>is before that day in the month, the first billing period ends on the next occurrence of that<br/>day in the same month (a shorter first period); subsequent periods follow the usual interval. |
21
- | `billingCycle` | [models.BillingCycle](../../sdk/models/billing-cycle.md) | :heavy_minus_sign: | N/A |
22
- | `billingPeriod` | [models.BillingPeriod](../../sdk/models/billing-period.md) | :heavy_check_mark: | N/A |
23
- | `billingPeriodCount` | *number* | :heavy_minus_sign: | N/A |
24
- | `collectionMethod` | [models.CollectionMethod](../../sdk/models/collection-method.md) | :heavy_minus_sign: | N/A |
25
- | `commitmentAmount` | *string* | :heavy_minus_sign: | CommitmentAmount is the minimum amount a customer commits to paying for a billing period |
26
- | `commitmentDuration` | [models.BillingPeriod](../../sdk/models/billing-period.md) | :heavy_minus_sign: | N/A |
27
- | `coupons` | *string*[] | :heavy_minus_sign: | N/A |
28
- | `creditGrants` | [models.CreateCreditGrantRequest](../../sdk/models/create-credit-grant-request.md)[] | :heavy_minus_sign: | Credit grants to be applied when subscription is created |
29
- | `currency` | *string* | :heavy_check_mark: | N/A |
30
- | `customerId` | *string* | :heavy_minus_sign: | customer_id is the flexprice customer id<br/>and it is prioritized over external_customer_id in case both are provided. |
31
- | `customerTimezone` | *string* | :heavy_minus_sign: | Timezone of the customer.<br/>If not set, the default value is UTC. |
32
- | `enableTrueUp` | *boolean* | :heavy_minus_sign: | Enable Commitment True Up Fee |
33
- | `endDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
34
- | `externalCustomerId` | *string* | :heavy_minus_sign: | external_customer_id is the customer id in your DB<br/>and must be same as what you provided as external_id while creating the customer in flexprice. |
35
- | `gatewayPaymentMethodId` | *string* | :heavy_minus_sign: | N/A |
36
- | `inheritance` | [models.SubscriptionInheritanceConfig](../../sdk/models/subscription-inheritance-config.md) | :heavy_minus_sign: | N/A |
37
- | `lineItemCommitments` | Record<string, [models.LineItemCommitmentConfig](../../sdk/models/line-item-commitment-config.md)> | :heavy_minus_sign: | LineItemCommitments allows setting commitment configuration per line item (keyed by price_id) |
38
- | `lineItemCoupons` | Record<string, *string*[]> | :heavy_minus_sign: | N/A |
39
- | `lineItems` | [models.CreateSubscriptionLineItemRequest](../../sdk/models/create-subscription-line-item-request.md)[] | :heavy_minus_sign: | LineItems are extra line items to add at creation (each with price_id or price), in addition to plan prices |
40
- | `lookupKey` | *string* | :heavy_minus_sign: | N/A |
41
- | `metadata` | Record<string, *string*> | :heavy_minus_sign: | N/A |
42
- | `overageFactor` | *string* | :heavy_minus_sign: | OverageFactor is a multiplier applied to usage beyond the commitment amount |
43
- | `overrideEntitlements` | [models.OverrideEntitlementRequest](../../sdk/models/override-entitlement-request.md)[] | :heavy_minus_sign: | OverrideEntitlements allows customizing specific entitlements for this subscription |
44
- | `overrideLineItems` | [models.OverrideLineItemRequest](../../sdk/models/override-line-item-request.md)[] | :heavy_minus_sign: | OverrideLineItems allows customizing specific prices for this subscription |
45
- | `paymentBehavior` | [models.PaymentBehavior](../../sdk/models/payment-behavior.md) | :heavy_minus_sign: | N/A |
46
- | `paymentTerms` | [models.PaymentTerms](../../sdk/models/payment-terms.md) | :heavy_minus_sign: | N/A |
47
- | `phases` | [models.SubscriptionPhaseCreateRequest](../../sdk/models/subscription-phase-create-request.md)[] | :heavy_minus_sign: | Phases represents subscription phases to be created with the subscription |
48
- | `planId` | *string* | :heavy_check_mark: | N/A |
49
- | `prorationBehavior` | [models.ProrationBehavior](../../sdk/models/proration-behavior.md) | :heavy_minus_sign: | N/A |
50
- | `startDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
51
- | `subscriptionStatus` | [models.SubscriptionStatus](../../sdk/models/subscription-status.md) | :heavy_minus_sign: | N/A |
52
- | `taxRateOverrides` | [models.TaxRateOverride](../../sdk/models/tax-rate-override.md)[] | :heavy_minus_sign: | tax_rate_overrides is the tax rate overrides to be applied to the subscription |
53
- | `trialPeriodDays` | *number* | :heavy_minus_sign: | TrialPeriodDays: nil = inherit trial length from plan recurring-fixed prices (must be uniform).<br/>0 = explicitly no trial (overrides catalog). >0 = override duration in days. |
17
+ | Field | Type | Required | Description |
18
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
19
+ | `addons` | [models.AddAddonToSubscriptionRequest](../../sdk/models/add-addon-to-subscription-request.md)[] | :heavy_minus_sign: | Addons represents addons to be added to the subscription during creation |
20
+ | `autoInvoiceThreshold` | *string* | :heavy_minus_sign: | AutoInvoiceThreshold is the usage amount (in subscription currency) that triggers<br/>an intermediate invoice mid-period. Set once at creation; cannot be changed later.<br/>Allowed only when the subscription resolves to type standalone (no parent hierarchy rows).<br/>Plan line items must be usage-based only (no fixed or other non-usage plan prices).<br/>Nil means auto invoice threshold billing is disabled for this subscription. |
21
+ | `billingAnchor` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | BillingAnchor overrides the derived billing anchor when billing_cycle is anniversary.<br/>For monthly billing, the day-of-month (and time-of-day) define cycle boundaries: if start_date<br/>is before that day in the month, the first billing period ends on the next occurrence of that<br/>day in the same month (a shorter first period); subsequent periods follow the usual interval. |
22
+ | `billingCycle` | [models.BillingCycle](../../sdk/models/billing-cycle.md) | :heavy_minus_sign: | N/A |
23
+ | `billingPeriod` | [models.BillingPeriod](../../sdk/models/billing-period.md) | :heavy_check_mark: | N/A |
24
+ | `billingPeriodCount` | *number* | :heavy_minus_sign: | N/A |
25
+ | `collectionMethod` | [models.CollectionMethod](../../sdk/models/collection-method.md) | :heavy_minus_sign: | N/A |
26
+ | `commitmentAmount` | *string* | :heavy_minus_sign: | CommitmentAmount is the minimum amount a customer commits to paying for a billing period |
27
+ | `commitmentDuration` | [models.BillingPeriod](../../sdk/models/billing-period.md) | :heavy_minus_sign: | N/A |
28
+ | `coupons` | *string*[] | :heavy_minus_sign: | N/A |
29
+ | `creditGrants` | [models.CreateCreditGrantRequest](../../sdk/models/create-credit-grant-request.md)[] | :heavy_minus_sign: | Credit grants to be applied when subscription is created |
30
+ | `currency` | *string* | :heavy_check_mark: | N/A |
31
+ | `customerId` | *string* | :heavy_minus_sign: | customer_id is the flexprice customer id<br/>and it is prioritized over external_customer_id in case both are provided. |
32
+ | `customerTimezone` | *string* | :heavy_minus_sign: | Timezone of the customer.<br/>If not set, the default value is UTC. |
33
+ | `enableTrueUp` | *boolean* | :heavy_minus_sign: | Enable Commitment True Up Fee |
34
+ | `endDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
35
+ | `externalCustomerId` | *string* | :heavy_minus_sign: | external_customer_id is the customer id in your DB<br/>and must be same as what you provided as external_id while creating the customer in flexprice. |
36
+ | `gatewayPaymentMethodId` | *string* | :heavy_minus_sign: | N/A |
37
+ | `inheritance` | [models.SubscriptionInheritanceConfig](../../sdk/models/subscription-inheritance-config.md) | :heavy_minus_sign: | N/A |
38
+ | `lineItemCommitments` | Record<string, [models.LineItemCommitmentConfig](../../sdk/models/line-item-commitment-config.md)> | :heavy_minus_sign: | LineItemCommitments allows setting commitment configuration per line item (keyed by price_id) |
39
+ | `lineItemCoupons` | Record<string, *string*[]> | :heavy_minus_sign: | N/A |
40
+ | `lineItems` | [models.CreateSubscriptionLineItemRequest](../../sdk/models/create-subscription-line-item-request.md)[] | :heavy_minus_sign: | LineItems are extra line items to add at creation (each with price_id or price), in addition to plan prices |
41
+ | `lookupKey` | *string* | :heavy_minus_sign: | N/A |
42
+ | `metadata` | Record<string, *string*> | :heavy_minus_sign: | N/A |
43
+ | `overageFactor` | *string* | :heavy_minus_sign: | OverageFactor is a multiplier applied to usage beyond the commitment amount |
44
+ | `overrideEntitlements` | [models.OverrideEntitlementRequest](../../sdk/models/override-entitlement-request.md)[] | :heavy_minus_sign: | OverrideEntitlements allows customizing specific entitlements for this subscription |
45
+ | `overrideLineItems` | [models.OverrideLineItemRequest](../../sdk/models/override-line-item-request.md)[] | :heavy_minus_sign: | OverrideLineItems allows customizing specific prices for this subscription |
46
+ | `paymentBehavior` | [models.PaymentBehavior](../../sdk/models/payment-behavior.md) | :heavy_minus_sign: | N/A |
47
+ | `paymentTerms` | [models.PaymentTerms](../../sdk/models/payment-terms.md) | :heavy_minus_sign: | N/A |
48
+ | `phases` | [models.SubscriptionPhaseCreateRequest](../../sdk/models/subscription-phase-create-request.md)[] | :heavy_minus_sign: | Phases represents subscription phases to be created with the subscription |
49
+ | `planId` | *string* | :heavy_check_mark: | N/A |
50
+ | `prorationBehavior` | [models.ProrationBehavior](../../sdk/models/proration-behavior.md) | :heavy_minus_sign: | N/A |
51
+ | `startDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A |
52
+ | `subscriptionStatus` | [models.SubscriptionStatus](../../sdk/models/subscription-status.md) | :heavy_minus_sign: | N/A |
53
+ | `taxRateOverrides` | [models.TaxRateOverride](../../sdk/models/tax-rate-override.md)[] | :heavy_minus_sign: | tax_rate_overrides is the tax rate overrides to be applied to the subscription |
54
+ | `trialPeriodDays` | *number* | :heavy_minus_sign: | TrialPeriodDays: nil = inherit trial length from plan recurring-fixed prices (must be uniform).<br/>0 = explicitly no trial (overrides catalog). >0 = override duration in days. |
@@ -0,0 +1,17 @@
1
+ # ErrorCode
2
+
3
+ ## Example Usage
4
+
5
+ ```typescript
6
+ import { ErrorCode } from "@flexprice/sdk/sdk/models";
7
+
8
+ let value: ErrorCode = "invalid_operation";
9
+
10
+ // Open enum: unrecognized values are captured as Unrecognized<string>
11
+ ```
12
+
13
+ ## Values
14
+
15
+ ```typescript
16
+ "http_client_error" | "system_error" | "internal_error" | "not_found" | "already_exists" | "version_conflict" | "validation_error" | "invalid_operation" | "permission_denied" | "database_error" | "service_unavailable" | "too_many_requests" | Unrecognized<string>
17
+ ```
@@ -10,9 +10,8 @@ let value: ErrorResponse = {};
10
10
 
11
11
  ## Fields
12
12
 
13
- | Field | Type | Required | Description |
14
- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
15
- | `code` | [models.Code](../../sdk/models/code.md) | :heavy_minus_sign: | N/A |
16
- | `details` | Record<string, [models.Details](../../sdk/models/details.md)> | :heavy_minus_sign: | N/A |
17
- | `httpStatusCode` | *number* | :heavy_minus_sign: | N/A |
18
- | `message` | *string* | :heavy_minus_sign: | N/A |
13
+ | Field | Type | Required | Description |
14
+ | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
15
+ | `code` | [models.ErrorCode](../../sdk/models/error-code.md) | :heavy_minus_sign: | N/A |
16
+ | `httpStatusCode` | *number* | :heavy_minus_sign: | N/A |
17
+ | `message` | *string* | :heavy_minus_sign: | N/A |
@@ -10,9 +10,8 @@ import { ErrorsErrorResponse } from "@flexprice/sdk/sdk/models";
10
10
 
11
11
  ## Fields
12
12
 
13
- | Field | Type | Required | Description |
14
- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- |
15
- | `code` | [models.Code](../../sdk/models/code.md) | :heavy_minus_sign: | N/A |
16
- | `details` | Record<string, [models.Details](../../sdk/models/details.md)> | :heavy_minus_sign: | N/A |
17
- | `httpStatusCode` | *number* | :heavy_minus_sign: | N/A |
18
- | `message` | *string* | :heavy_minus_sign: | N/A |
13
+ | Field | Type | Required | Description |
14
+ | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
15
+ | `code` | [models.ErrorCode](../../sdk/models/error-code.md) | :heavy_minus_sign: | N/A |
16
+ | `httpStatusCode` | *number* | :heavy_minus_sign: | N/A |
17
+ | `message` | *string* | :heavy_minus_sign: | N/A |
@@ -5,11 +5,11 @@
5
5
  ```typescript
6
6
  import { InvoiceBillingReason } from "@flexprice/sdk/sdk/models";
7
7
 
8
- let value: InvoiceBillingReason = "SUBSCRIPTION_CYCLE";
8
+ let value: InvoiceBillingReason = "SUBSCRIPTION_UPDATE";
9
9
  ```
10
10
 
11
11
  ## Values
12
12
 
13
13
  ```typescript
14
- "SUBSCRIPTION_CREATE" | "SUBSCRIPTION_CYCLE" | "SUBSCRIPTION_UPDATE" | "SUBSCRIPTION_TRIAL_END" | "SUBSCRIPTION_TRIAL_START" | "PRORATION" | "MANUAL"
14
+ "SUBSCRIPTION_CREATE" | "SUBSCRIPTION_CYCLE" | "SUBSCRIPTION_UPDATE" | "SUBSCRIPTION_TRIAL_END" | "SUBSCRIPTION_TRIAL_START" | "PRORATION" | "MANUAL" | "AUTO_INVOICE_THRESHOLD"
15
15
  ```
@@ -44,6 +44,7 @@ let value: InvoiceResponse = {
44
44
  | `invoicePdfUrl` | *string* | :heavy_minus_sign: | invoice_pdf_url is the URL where customers can download the PDF version of this invoice |
45
45
  | `invoiceStatus` | [models.InvoiceStatus](../../sdk/models/invoice-status.md) | :heavy_minus_sign: | N/A |
46
46
  | `invoiceType` | [models.InvoiceType](../../sdk/models/invoice-type.md) | :heavy_minus_sign: | N/A |
47
+ | `issueDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | issue_date is the user-facing date of the invoice. Defaults to created_at if not set. |
47
48
  | `lastComputedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | last_computed_at is the timestamp when this invoice was last computed by ComputeInvoice |
48
49
  | `lineItems` | [models.InvoiceLineItemResponse](../../sdk/models/invoice-line-item-response.md)[] | :heavy_minus_sign: | line_items contains the individual items that make up this invoice (overrides embedded field) |
49
50
  | `metadata` | Record<string, *string*> | :heavy_minus_sign: | N/A |
@@ -48,6 +48,7 @@ let value: SubscriptionResponseV2 = {
48
48
  | Field | Type | Required | Description |
49
49
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
50
50
  | `activePauseId` | *string* | :heavy_minus_sign: | ActivePauseID references the current active pause configuration<br/>This will be null if no pause is active or scheduled |
51
+ | `autoInvoiceThreshold` | *string* | :heavy_minus_sign: | AutoInvoiceThreshold is the usage amount (in subscription currency) that triggers<br/>an intermediate invoice. Overrides the plan-level threshold when set.<br/>Nil means: inherit from the plan's threshold (which may also be nil = disabled). |
51
52
  | `billingAnchor` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | BillingAnchor is the reference point that aligns future billing cycle dates.<br/>It sets the day of week for week intervals, the day of month for month and year intervals,<br/>and the month of year for year intervals. The timestamp is in UTC format. |
52
53
  | `billingCadence` | [models.BillingCadence](../../sdk/models/billing-cadence.md) | :heavy_minus_sign: | N/A |
53
54
  | `billingCycle` | [models.BillingCycle](../../sdk/models/billing-cycle.md) | :heavy_minus_sign: | N/A |
@@ -20,6 +20,7 @@ let value: SubscriptionResponse = {
20
20
  | Field | Type | Required | Description |
21
21
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
22
22
  | `activePauseId` | *string* | :heavy_minus_sign: | ActivePauseID references the current active pause configuration<br/>This will be null if no pause is active or scheduled |
23
+ | `autoInvoiceThreshold` | *string* | :heavy_minus_sign: | AutoInvoiceThreshold is the usage amount (in subscription currency) that triggers<br/>an intermediate invoice. Overrides the plan-level threshold when set.<br/>Nil means: inherit from the plan's threshold (which may also be nil = disabled). |
23
24
  | `billingAnchor` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | BillingAnchor is the reference point that aligns future billing cycle dates.<br/>It sets the day of week for week intervals, the day of month for month and year intervals,<br/>and the month of year for year intervals. The timestamp is in UTC format. |
24
25
  | `billingCadence` | [models.BillingCadence](../../sdk/models/billing-cadence.md) | :heavy_minus_sign: | N/A |
25
26
  | `billingCycle` | [models.BillingCycle](../../sdk/models/billing-cycle.md) | :heavy_minus_sign: | N/A |