stripe 19.3.0-beta.1 → 19.4.0-alpha.1

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 (184) hide show
  1. package/CHANGELOG.md +235 -1
  2. package/OPENAPI_VERSION +1 -1
  3. package/VERSION +1 -1
  4. package/cjs/RequestSender.js +1 -1
  5. package/cjs/apiVersion.js +1 -1
  6. package/cjs/resources/DelegatedCheckout/RequestedSessions.js +28 -0
  7. package/cjs/resources/Identity/BlocklistEntries.js +25 -0
  8. package/cjs/resources/PaymentMethods.js +4 -0
  9. package/cjs/resources/TestHelpers/Capital/FinancingOffers.js +16 -0
  10. package/cjs/resources/V2/Billing/CustomPricingUnits.js +25 -0
  11. package/cjs/resources/V2/Billing/Intents/Actions.js +17 -0
  12. package/cjs/resources/V2/Billing/Intents.js +36 -0
  13. package/cjs/resources/V2/Billing/LicenseFeeSubscriptions.js +12 -0
  14. package/cjs/resources/V2/Billing/LicenseFees/Versions.js +17 -0
  15. package/cjs/resources/V2/Billing/LicenseFees.js +27 -0
  16. package/cjs/resources/V2/Billing/LicensedItems.js +25 -0
  17. package/cjs/resources/V2/Billing/MeteredItems.js +22 -0
  18. package/cjs/resources/V2/Billing/PricingPlanSubscriptions/Components.js +12 -0
  19. package/cjs/resources/V2/Billing/PricingPlanSubscriptions.js +26 -0
  20. package/cjs/resources/V2/Billing/PricingPlans/Components.js +29 -0
  21. package/cjs/resources/V2/Billing/PricingPlans/Versions.js +17 -0
  22. package/cjs/resources/V2/Billing/PricingPlans.js +29 -0
  23. package/cjs/resources/V2/Billing/RateCardSubscriptions.js +29 -0
  24. package/cjs/resources/V2/Billing/RateCards/Rates.js +25 -0
  25. package/cjs/resources/V2/Billing/RateCards/Versions.js +17 -0
  26. package/cjs/resources/V2/Billing/RateCards.js +29 -0
  27. package/cjs/resources/V2/Billing/ServiceActions.js +20 -0
  28. package/cjs/resources/V2/Core/ClaimableSandboxes.js +16 -0
  29. package/cjs/resources/V2/MoneyManagement/RecipientVerifications.js +20 -0
  30. package/cjs/resources/V2/Reporting/ReportRuns.js +13 -0
  31. package/cjs/resources/V2/Reporting/Reports.js +12 -0
  32. package/cjs/resources/V2/Tax/AutomaticRules.js +22 -0
  33. package/cjs/resources/V2/TestHelpers/MoneyManagement.js +12 -0
  34. package/cjs/resources.js +47 -1
  35. package/cjs/stripe.core.js +1 -1
  36. package/esm/RequestSender.js +1 -1
  37. package/esm/apiVersion.js +1 -1
  38. package/esm/resources/DelegatedCheckout/RequestedSessions.js +25 -0
  39. package/esm/resources/Identity/BlocklistEntries.js +22 -0
  40. package/esm/resources/PaymentMethods.js +4 -0
  41. package/esm/resources/TestHelpers/Capital/FinancingOffers.js +13 -0
  42. package/esm/resources/V2/Billing/CustomPricingUnits.js +22 -0
  43. package/esm/resources/V2/Billing/Intents/Actions.js +14 -0
  44. package/esm/resources/V2/Billing/Intents.js +33 -0
  45. package/esm/resources/V2/Billing/LicenseFeeSubscriptions.js +9 -0
  46. package/esm/resources/V2/Billing/LicenseFees/Versions.js +14 -0
  47. package/esm/resources/V2/Billing/LicenseFees.js +24 -0
  48. package/esm/resources/V2/Billing/LicensedItems.js +22 -0
  49. package/esm/resources/V2/Billing/MeteredItems.js +19 -0
  50. package/esm/resources/V2/Billing/PricingPlanSubscriptions/Components.js +9 -0
  51. package/esm/resources/V2/Billing/PricingPlanSubscriptions.js +23 -0
  52. package/esm/resources/V2/Billing/PricingPlans/Components.js +26 -0
  53. package/esm/resources/V2/Billing/PricingPlans/Versions.js +14 -0
  54. package/esm/resources/V2/Billing/PricingPlans.js +26 -0
  55. package/esm/resources/V2/Billing/RateCardSubscriptions.js +26 -0
  56. package/esm/resources/V2/Billing/RateCards/Rates.js +22 -0
  57. package/esm/resources/V2/Billing/RateCards/Versions.js +14 -0
  58. package/esm/resources/V2/Billing/RateCards.js +26 -0
  59. package/esm/resources/V2/Billing/ServiceActions.js +17 -0
  60. package/esm/resources/V2/Core/ClaimableSandboxes.js +13 -0
  61. package/esm/resources/V2/MoneyManagement/RecipientVerifications.js +17 -0
  62. package/esm/resources/V2/Reporting/ReportRuns.js +10 -0
  63. package/esm/resources/V2/Reporting/Reports.js +9 -0
  64. package/esm/resources/V2/Tax/AutomaticRules.js +19 -0
  65. package/esm/resources/V2/TestHelpers/MoneyManagement.js +9 -0
  66. package/esm/resources.js +46 -0
  67. package/esm/stripe.core.js +1 -1
  68. package/package.json +1 -1
  69. package/types/ApplicationFees.d.ts +6 -1
  70. package/types/Balance.d.ts +82 -0
  71. package/types/BalanceTransactions.d.ts +2 -1
  72. package/types/Billing/AlertTriggereds.d.ts +15 -0
  73. package/types/Billing/Alerts.d.ts +116 -1
  74. package/types/Billing/AlertsResource.d.ts +149 -2
  75. package/types/Billing/Analytics/MeterUsageResource.d.ts +5 -0
  76. package/types/Billing/Analytics/MeterUsageRows.d.ts +7 -0
  77. package/types/Billing/CreditBalanceSummary.d.ts +118 -2
  78. package/types/Billing/CreditBalanceSummaryResource.d.ts +12 -0
  79. package/types/Billing/CreditBalanceTransactions.d.ts +118 -2
  80. package/types/Billing/CreditGrants.d.ts +71 -1
  81. package/types/Billing/CreditGrantsResource.d.ts +32 -1
  82. package/types/Billing/MeterEventSummaries.d.ts +7 -0
  83. package/types/Billing/Meters.d.ts +5 -0
  84. package/types/Billing/MetersResource.d.ts +17 -0
  85. package/types/Cards.d.ts +14 -0
  86. package/types/Charges.d.ts +14 -0
  87. package/types/ChargesResource.d.ts +4 -16
  88. package/types/Checkout/Sessions.d.ts +58 -0
  89. package/types/Checkout/SessionsResource.d.ts +50 -0
  90. package/types/ConfirmationTokens.d.ts +14 -0
  91. package/types/Coupons.d.ts +3 -1
  92. package/types/CouponsResource.d.ts +3 -1
  93. package/types/DelegatedCheckout/RequestedSessions.d.ts +360 -0
  94. package/types/DelegatedCheckout/RequestedSessionsResource.d.ts +593 -0
  95. package/types/Identity/BlocklistEntries.d.ts +78 -0
  96. package/types/Identity/BlocklistEntriesResource.d.ts +146 -0
  97. package/types/Identity/VerificationReports.d.ts +10 -0
  98. package/types/Identity/VerificationReportsResource.d.ts +5 -0
  99. package/types/InvoiceItems.d.ts +104 -2
  100. package/types/InvoiceLineItems.d.ts +113 -2
  101. package/types/InvoicePayments.d.ts +1 -1
  102. package/types/InvoicesResource.d.ts +5 -0
  103. package/types/PaymentIntentAmountDetailsLineItems.d.ts +7 -13
  104. package/types/PaymentIntents.d.ts +37 -18
  105. package/types/PaymentIntentsResource.d.ts +164 -145
  106. package/types/PaymentMethodBalances.d.ts +63 -0
  107. package/types/PaymentMethods.d.ts +14 -0
  108. package/types/PaymentMethodsResource.d.ts +20 -0
  109. package/types/SetupIntents.d.ts +24 -1
  110. package/types/SetupIntentsResource.d.ts +90 -0
  111. package/types/TestHelpers/Capital/FinancingOffersResource.d.ts +100 -0
  112. package/types/Transfers.d.ts +4 -0
  113. package/types/TransfersResource.d.ts +2 -0
  114. package/types/TransitBalances.d.ts +40 -0
  115. package/types/V2/Billing/Cadences.d.ts +51 -2
  116. package/types/V2/Billing/CadencesResource.d.ts +32 -3
  117. package/types/V2/Billing/CollectionSettingVersions.d.ts +6 -2
  118. package/types/V2/Billing/CollectionSettings.d.ts +6 -2
  119. package/types/V2/Billing/CollectionSettingsResource.d.ts +12 -4
  120. package/types/V2/Billing/CustomPricingUnits.d.ts +56 -0
  121. package/types/V2/Billing/CustomPricingUnitsResource.d.ts +122 -0
  122. package/types/V2/Billing/IntentActions.d.ts +459 -0
  123. package/types/V2/Billing/Intents/ActionsResource.d.ts +58 -0
  124. package/types/V2/Billing/Intents.d.ts +117 -0
  125. package/types/V2/Billing/IntentsResource.d.ts +575 -0
  126. package/types/V2/Billing/LicenseFeeSubscriptions.d.ts +64 -0
  127. package/types/V2/Billing/LicenseFeeSubscriptionsResource.d.ts +28 -0
  128. package/types/V2/Billing/LicenseFeeVersions.d.ts +106 -0
  129. package/types/V2/Billing/LicenseFees/VersionsResource.d.ts +58 -0
  130. package/types/V2/Billing/LicenseFees.d.ts +164 -0
  131. package/types/V2/Billing/LicenseFeesResource.d.ts +290 -0
  132. package/types/V2/Billing/LicensedItems.d.ts +73 -0
  133. package/types/V2/Billing/LicensedItemsResource.d.ts +157 -0
  134. package/types/V2/Billing/MeteredItems.d.ts +101 -0
  135. package/types/V2/Billing/MeteredItemsResource.d.ts +189 -0
  136. package/types/V2/Billing/PricingPlanComponents.d.ts +109 -0
  137. package/types/V2/Billing/PricingPlanSubscriptionComponents.d.ts +57 -0
  138. package/types/V2/Billing/PricingPlanSubscriptions/ComponentsResource.d.ts +40 -0
  139. package/types/V2/Billing/PricingPlanSubscriptions.d.ts +144 -0
  140. package/types/V2/Billing/PricingPlanSubscriptionsResource.d.ts +120 -0
  141. package/types/V2/Billing/PricingPlanVersions.d.ts +49 -0
  142. package/types/V2/Billing/PricingPlans/ComponentsResource.d.ts +197 -0
  143. package/types/V2/Billing/PricingPlans/VersionsResource.d.ts +58 -0
  144. package/types/V2/Billing/PricingPlans.d.ts +84 -0
  145. package/types/V2/Billing/PricingPlansResource.d.ts +151 -0
  146. package/types/V2/Billing/RateCardRates.d.ts +144 -0
  147. package/types/V2/Billing/RateCardSubscriptions.d.ts +144 -0
  148. package/types/V2/Billing/RateCardSubscriptionsResource.d.ts +157 -0
  149. package/types/V2/Billing/RateCardVersions.d.ts +39 -0
  150. package/types/V2/Billing/RateCards/RatesResource.d.ts +203 -0
  151. package/types/V2/Billing/RateCards/VersionsResource.d.ts +58 -0
  152. package/types/V2/Billing/RateCards.d.ts +98 -0
  153. package/types/V2/Billing/RateCardsResource.d.ts +162 -0
  154. package/types/V2/Billing/ServiceActions.d.ts +274 -0
  155. package/types/V2/Billing/ServiceActionsResource.d.ts +370 -0
  156. package/types/V2/Core/Accounts.d.ts +1491 -23
  157. package/types/V2/Core/AccountsResource.d.ts +1619 -0
  158. package/types/V2/Core/ClaimableSandboxes.d.ts +132 -0
  159. package/types/V2/Core/ClaimableSandboxesResource.d.ts +74 -0
  160. package/types/V2/Core/EventTypes.d.ts +7399 -343
  161. package/types/V2/Core/Events.d.ts +14 -0
  162. package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +14 -0
  163. package/types/V2/MoneyManagement/InboundTransfers.d.ts +9 -3
  164. package/types/V2/MoneyManagement/OutboundPayments.d.ts +5 -0
  165. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +5 -0
  166. package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +34 -0
  167. package/types/V2/MoneyManagement/OutboundTransfers.d.ts +5 -0
  168. package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +5 -0
  169. package/types/V2/MoneyManagement/PayoutMethods.d.ts +41 -0
  170. package/types/V2/MoneyManagement/ReceivedCredits.d.ts +5 -0
  171. package/types/V2/MoneyManagement/ReceivedDebits.d.ts +10 -0
  172. package/types/V2/MoneyManagement/RecipientVerifications.d.ts +112 -0
  173. package/types/V2/MoneyManagement/RecipientVerificationsResource.d.ts +77 -0
  174. package/types/V2/Reporting/ReportRuns.d.ts +154 -0
  175. package/types/V2/Reporting/ReportRunsResource.d.ts +75 -0
  176. package/types/V2/Reporting/Reports.d.ts +120 -0
  177. package/types/V2/Reporting/ReportsResource.d.ts +30 -0
  178. package/types/V2/Tax/AutomaticRules.d.ts +53 -0
  179. package/types/V2/Tax/AutomaticRulesResource.d.ts +102 -0
  180. package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +6 -1
  181. package/types/V2/TestHelpers/MoneyManagementResource.d.ts +49 -0
  182. package/types/Webhooks.d.ts +2 -0
  183. package/types/apiVersion.d.ts +1 -1
  184. package/types/index.d.ts +82 -0
@@ -0,0 +1,49 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace V2 {
6
+ namespace Billing {
7
+ /**
8
+ * The PricingPlanVersion object.
9
+ */
10
+ interface PricingPlanVersion {
11
+ /**
12
+ * Unique identifier for the object.
13
+ */
14
+ id: string;
15
+
16
+ /**
17
+ * String representing the object's type. Objects of the same type share the same value of the object field.
18
+ */
19
+ object: 'v2.billing.pricing_plan_version';
20
+
21
+ /**
22
+ * Time at which the object was created.
23
+ */
24
+ created: string;
25
+
26
+ /**
27
+ * The timestamp when this version became inactive. Null if it's the latest version.
28
+ */
29
+ end_date?: string;
30
+
31
+ /**
32
+ * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
33
+ */
34
+ livemode: boolean;
35
+
36
+ /**
37
+ * The ID of the PricingPlan this version belongs to.
38
+ */
39
+ pricing_plan: string;
40
+
41
+ /**
42
+ * The timestamp when this version became active.
43
+ */
44
+ start_date: string;
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,197 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace V2 {
6
+ namespace Billing {
7
+ namespace PricingPlans {
8
+ interface ComponentCreateParams {
9
+ /**
10
+ * The type of the PricingPlanComponent.
11
+ */
12
+ type: ComponentCreateParams.Type;
13
+
14
+ /**
15
+ * Details if this component is a License Fee.
16
+ */
17
+ license_fee?: ComponentCreateParams.LicenseFee;
18
+
19
+ /**
20
+ * An identifier that can be used to find this component.
21
+ */
22
+ lookup_key?: string;
23
+
24
+ /**
25
+ * Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
26
+ */
27
+ metadata?: Stripe.MetadataParam;
28
+
29
+ /**
30
+ * Details if this component is a Rate Card.
31
+ */
32
+ rate_card?: ComponentCreateParams.RateCard;
33
+
34
+ /**
35
+ * Details if this component is a Service Action.
36
+ */
37
+ service_action?: ComponentCreateParams.ServiceAction;
38
+ }
39
+
40
+ namespace ComponentCreateParams {
41
+ interface LicenseFee {
42
+ /**
43
+ * The ID of the License Fee.
44
+ */
45
+ id: string;
46
+
47
+ /**
48
+ * The version of the LicenseFee. Defaults to 'latest', if not specified.
49
+ */
50
+ version?: string;
51
+ }
52
+
53
+ interface RateCard {
54
+ /**
55
+ * The ID of the Rate Card.
56
+ */
57
+ id: string;
58
+
59
+ /**
60
+ * The version of the RateCard. Defaults to 'latest', if not specified.
61
+ */
62
+ version?: string;
63
+ }
64
+
65
+ interface ServiceAction {
66
+ /**
67
+ * The ID of the service action.
68
+ */
69
+ id: string;
70
+ }
71
+
72
+ type Type = 'license_fee' | 'rate_card' | 'service_action';
73
+ }
74
+ }
75
+ }
76
+
77
+ namespace Billing {
78
+ namespace PricingPlans {
79
+ interface ComponentRetrieveParams {}
80
+ }
81
+ }
82
+
83
+ namespace Billing {
84
+ namespace PricingPlans {
85
+ interface ComponentUpdateParams {
86
+ /**
87
+ * An identifier that can be used to find this component. Maximum length of 200 characters.
88
+ */
89
+ lookup_key?: string;
90
+
91
+ /**
92
+ * Set of key-value pairs that you can attach to an object.
93
+ */
94
+ metadata?: Stripe.MetadataParam;
95
+ }
96
+ }
97
+ }
98
+
99
+ namespace Billing {
100
+ namespace PricingPlans {
101
+ interface ComponentListParams {
102
+ /**
103
+ * Optionally set the maximum number of results per page. Defaults to 20.
104
+ */
105
+ limit?: number;
106
+
107
+ /**
108
+ * Filter by lookup keys. Mutually exclusive with `pricing_plan_version`.
109
+ * You can specify up to 10 lookup keys.
110
+ */
111
+ lookup_keys?: Array<string>;
112
+
113
+ /**
114
+ * The ID of the Pricing Plan Version to list components for. Will use the latest version if not provided.
115
+ * Mutually exclusive with `lookup_keys`.
116
+ */
117
+ pricing_plan_version?: string;
118
+ }
119
+ }
120
+ }
121
+
122
+ namespace Billing {
123
+ namespace PricingPlans {
124
+ interface ComponentDeleteParams {}
125
+ }
126
+ }
127
+
128
+ namespace Billing {
129
+ namespace PricingPlans {
130
+ class ComponentsResource {
131
+ /**
132
+ * Create a Pricing Plan Component object.
133
+ */
134
+ create(
135
+ id: string,
136
+ params: ComponentCreateParams,
137
+ options?: RequestOptions
138
+ ): Promise<Stripe.Response<Stripe.V2.Billing.PricingPlanComponent>>;
139
+
140
+ /**
141
+ * Retrieve a Pricing Plan Component object.
142
+ */
143
+ retrieve(
144
+ pricingPlanId: string,
145
+ id: string,
146
+ params?: ComponentRetrieveParams,
147
+ options?: RequestOptions
148
+ ): Promise<Stripe.Response<Stripe.V2.Billing.PricingPlanComponent>>;
149
+ retrieve(
150
+ pricingPlanId: string,
151
+ id: string,
152
+ options?: RequestOptions
153
+ ): Promise<Stripe.Response<Stripe.V2.Billing.PricingPlanComponent>>;
154
+
155
+ /**
156
+ * Update a Pricing Plan Component object.
157
+ */
158
+ update(
159
+ pricingPlanId: string,
160
+ id: string,
161
+ params?: ComponentUpdateParams,
162
+ options?: RequestOptions
163
+ ): Promise<Stripe.Response<Stripe.V2.Billing.PricingPlanComponent>>;
164
+
165
+ /**
166
+ * List all Pricing Plan Component objects for a Pricing Plan.
167
+ */
168
+ list(
169
+ id: string,
170
+ params?: ComponentListParams,
171
+ options?: RequestOptions
172
+ ): ApiListPromise<Stripe.V2.Billing.PricingPlanComponent>;
173
+ list(
174
+ id: string,
175
+ options?: RequestOptions
176
+ ): ApiListPromise<Stripe.V2.Billing.PricingPlanComponent>;
177
+
178
+ /**
179
+ * Remove a Pricing Plan Component from the latest version of a Pricing Plan.
180
+ */
181
+ del(
182
+ pricingPlanId: string,
183
+ id: string,
184
+ params?: ComponentDeleteParams,
185
+ options?: RequestOptions
186
+ ): Promise<Stripe.Response<Stripe.V2.DeletedObject>>;
187
+ del(
188
+ pricingPlanId: string,
189
+ id: string,
190
+ options?: RequestOptions
191
+ ): Promise<Stripe.Response<Stripe.V2.DeletedObject>>;
192
+ }
193
+ }
194
+ }
195
+ }
196
+ }
197
+ }
@@ -0,0 +1,58 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace V2 {
6
+ namespace Billing {
7
+ namespace PricingPlans {
8
+ interface VersionRetrieveParams {}
9
+ }
10
+ }
11
+
12
+ namespace Billing {
13
+ namespace PricingPlans {
14
+ interface VersionListParams {
15
+ /**
16
+ * Optionally set the maximum number of results per page. Defaults to 20.
17
+ */
18
+ limit?: number;
19
+ }
20
+ }
21
+ }
22
+
23
+ namespace Billing {
24
+ namespace PricingPlans {
25
+ class VersionsResource {
26
+ /**
27
+ * Retrieve a specific Pricing Plan Version of a Pricing Plan.
28
+ */
29
+ retrieve(
30
+ pricingPlanId: string,
31
+ id: string,
32
+ params?: VersionRetrieveParams,
33
+ options?: RequestOptions
34
+ ): Promise<Stripe.Response<Stripe.V2.Billing.PricingPlanVersion>>;
35
+ retrieve(
36
+ pricingPlanId: string,
37
+ id: string,
38
+ options?: RequestOptions
39
+ ): Promise<Stripe.Response<Stripe.V2.Billing.PricingPlanVersion>>;
40
+
41
+ /**
42
+ * List all Pricing Plan Versions of a Pricing Plan.
43
+ */
44
+ list(
45
+ id: string,
46
+ params?: VersionListParams,
47
+ options?: RequestOptions
48
+ ): ApiListPromise<Stripe.V2.Billing.PricingPlanVersion>;
49
+ list(
50
+ id: string,
51
+ options?: RequestOptions
52
+ ): ApiListPromise<Stripe.V2.Billing.PricingPlanVersion>;
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,84 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace V2 {
6
+ namespace Billing {
7
+ /**
8
+ * The PricingPlan object.
9
+ */
10
+ interface PricingPlan {
11
+ /**
12
+ * Unique identifier for the object.
13
+ */
14
+ id: string;
15
+
16
+ /**
17
+ * String representing the object's type. Objects of the same type share the same value of the object field.
18
+ */
19
+ object: 'v2.billing.pricing_plan';
20
+
21
+ /**
22
+ * Whether the PricingPlan is active.
23
+ */
24
+ active: boolean;
25
+
26
+ /**
27
+ * Time at which the object was created.
28
+ */
29
+ created: string;
30
+
31
+ /**
32
+ * The currency of the PricingPlan.
33
+ */
34
+ currency: string;
35
+
36
+ /**
37
+ * A description for pricing plan subscription.
38
+ * Maximum length of 500 characters.
39
+ */
40
+ description?: string;
41
+
42
+ /**
43
+ * Display name of the PricingPlan.
44
+ */
45
+ display_name: string;
46
+
47
+ /**
48
+ * The ID of the latest version of the PricingPlan.
49
+ */
50
+ latest_version: string;
51
+
52
+ /**
53
+ * The ID of the live version of the PricingPlan.
54
+ */
55
+ live_version?: string;
56
+
57
+ /**
58
+ * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
59
+ */
60
+ livemode: boolean;
61
+
62
+ /**
63
+ * An internal key you can use to search for a particular PricingPlan. Maximum length of 200 characters.
64
+ */
65
+ lookup_key?: string;
66
+
67
+ /**
68
+ * Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
69
+ */
70
+ metadata?: Stripe.Metadata;
71
+
72
+ /**
73
+ * The Stripe Tax tax behavior - whether the PricingPlan is inclusive or exclusive of tax.
74
+ */
75
+ tax_behavior: PricingPlan.TaxBehavior;
76
+ }
77
+
78
+ namespace PricingPlan {
79
+ type TaxBehavior = 'exclusive' | 'inclusive';
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
@@ -0,0 +1,151 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace V2 {
6
+ namespace Billing {
7
+ interface PricingPlanCreateParams {
8
+ /**
9
+ * The currency of the PricingPlan.
10
+ */
11
+ currency: string;
12
+
13
+ /**
14
+ * Display name of the PricingPlan. Maximum 250 characters.
15
+ */
16
+ display_name: string;
17
+
18
+ /**
19
+ * The Stripe Tax tax behavior - whether the PricingPlan is inclusive or exclusive of tax.
20
+ */
21
+ tax_behavior: PricingPlanCreateParams.TaxBehavior;
22
+
23
+ /**
24
+ * Description of pricing plan subscription.
25
+ */
26
+ description?: string;
27
+
28
+ /**
29
+ * An internal key you can use to search for a particular PricingPlan. Maximum length of 200 characters.
30
+ */
31
+ lookup_key?: string;
32
+
33
+ /**
34
+ * Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
35
+ */
36
+ metadata?: Stripe.MetadataParam;
37
+ }
38
+
39
+ namespace PricingPlanCreateParams {
40
+ type TaxBehavior = 'exclusive' | 'inclusive';
41
+ }
42
+ }
43
+
44
+ namespace Billing {
45
+ interface PricingPlanRetrieveParams {}
46
+ }
47
+
48
+ namespace Billing {
49
+ interface PricingPlanUpdateParams {
50
+ /**
51
+ * Whether the PricingPlan is active.
52
+ */
53
+ active?: boolean;
54
+
55
+ /**
56
+ * Description of pricing plan subscription.
57
+ */
58
+ description?: string;
59
+
60
+ /**
61
+ * Display name of the PricingPlan. Maximum 250 characters.
62
+ */
63
+ display_name?: string;
64
+
65
+ /**
66
+ * The ID of the live version of the PricingPlan.
67
+ */
68
+ live_version?: string;
69
+
70
+ /**
71
+ * An internal key you can use to search for a particular PricingPlan. Maximum length of 200 characters.
72
+ */
73
+ lookup_key?: string;
74
+
75
+ /**
76
+ * Set of key-value pairs that you can attach to an object.
77
+ */
78
+ metadata?: Stripe.MetadataParam;
79
+ }
80
+ }
81
+
82
+ namespace Billing {
83
+ interface PricingPlanListParams {
84
+ /**
85
+ * Filter for active/inactive PricingPlans. Mutually exclusive with `lookup_keys`.
86
+ */
87
+ active?: boolean;
88
+
89
+ /**
90
+ * Optionally set the maximum number of results per page. Defaults to 20.
91
+ */
92
+ limit?: number;
93
+
94
+ /**
95
+ * Filter by lookup keys. Mutually exclusive with `active`.
96
+ * You can specify up to 10 lookup keys.
97
+ */
98
+ lookup_keys?: Array<string>;
99
+ }
100
+ }
101
+
102
+ namespace Billing {
103
+ class PricingPlansResource {
104
+ components: Stripe.V2.Billing.PricingPlans.ComponentsResource;
105
+ versions: Stripe.V2.Billing.PricingPlans.VersionsResource;
106
+
107
+ /**
108
+ * Create a Pricing Plan object.
109
+ */
110
+ create(
111
+ params: PricingPlanCreateParams,
112
+ options?: RequestOptions
113
+ ): Promise<Stripe.Response<Stripe.V2.Billing.PricingPlan>>;
114
+
115
+ /**
116
+ * Retrieve a Pricing Plan object.
117
+ */
118
+ retrieve(
119
+ id: string,
120
+ params?: PricingPlanRetrieveParams,
121
+ options?: RequestOptions
122
+ ): Promise<Stripe.Response<Stripe.V2.Billing.PricingPlan>>;
123
+ retrieve(
124
+ id: string,
125
+ options?: RequestOptions
126
+ ): Promise<Stripe.Response<Stripe.V2.Billing.PricingPlan>>;
127
+
128
+ /**
129
+ * Update a Pricing Plan object.
130
+ */
131
+ update(
132
+ id: string,
133
+ params?: PricingPlanUpdateParams,
134
+ options?: RequestOptions
135
+ ): Promise<Stripe.Response<Stripe.V2.Billing.PricingPlan>>;
136
+
137
+ /**
138
+ * List all Pricing Plan objects.
139
+ */
140
+ list(
141
+ params?: PricingPlanListParams,
142
+ options?: RequestOptions
143
+ ): ApiListPromise<Stripe.V2.Billing.PricingPlan>;
144
+ list(
145
+ options?: RequestOptions
146
+ ): ApiListPromise<Stripe.V2.Billing.PricingPlan>;
147
+ }
148
+ }
149
+ }
150
+ }
151
+ }
@@ -0,0 +1,144 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace V2 {
6
+ namespace Billing {
7
+ /**
8
+ * The RateCardRate object.
9
+ */
10
+ interface RateCardRate {
11
+ /**
12
+ * Unique identifier for the object.
13
+ */
14
+ id: string;
15
+
16
+ /**
17
+ * String representing the object's type. Objects of the same type share the same value of the object field.
18
+ */
19
+ object: 'v2.billing.rate_card_rate';
20
+
21
+ /**
22
+ * Timestamp of when the object was created.
23
+ */
24
+ created: string;
25
+
26
+ /**
27
+ * The custom pricing unit that this rate binds to.
28
+ */
29
+ custom_pricing_unit_amount?: RateCardRate.CustomPricingUnitAmount;
30
+
31
+ /**
32
+ * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
33
+ */
34
+ livemode: boolean;
35
+
36
+ /**
37
+ * Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
38
+ */
39
+ metadata?: Stripe.Metadata;
40
+
41
+ /**
42
+ * A Metered Item represents a billable item whose pricing is based on usage, measured by a meter. You can use rate cards
43
+ * to specify the pricing and create subscriptions to these items.
44
+ */
45
+ metered_item: Stripe.V2.Billing.MeteredItem;
46
+
47
+ /**
48
+ * The ID of the Rate Card it belongs to.
49
+ */
50
+ rate_card: string;
51
+
52
+ /**
53
+ * The ID of the Rate Card Version it was created on.
54
+ */
55
+ rate_card_version: string;
56
+
57
+ /**
58
+ * Defines whether the tiering price should be graduated or volume-based. In volume-based tiering, the maximum
59
+ * quantity within a period determines the per-unit price. In graduated tiering, the pricing changes as the quantity
60
+ * grows into new tiers. Can only be set if `tiers` is set.
61
+ */
62
+ tiering_mode?: RateCardRate.TieringMode;
63
+
64
+ /**
65
+ * Each element represents a pricing tier. Cannot be set if `unit_amount` is provided.
66
+ */
67
+ tiers: Array<RateCardRate.Tier>;
68
+
69
+ /**
70
+ * Apply a transformation to the reported usage or set quantity before computing the amount billed.
71
+ */
72
+ transform_quantity?: RateCardRate.TransformQuantity;
73
+
74
+ /**
75
+ * The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal
76
+ * places. Cannot be set if `tiers` is provided.
77
+ */
78
+ unit_amount?: string;
79
+ }
80
+
81
+ namespace RateCardRate {
82
+ interface CustomPricingUnitAmount {
83
+ /**
84
+ * The Custom Pricing Unit object.
85
+ */
86
+ custom_pricing_unit_details?: Stripe.V2.Billing.CustomPricingUnit;
87
+
88
+ /**
89
+ * The id of the custom pricing unit.
90
+ */
91
+ id: string;
92
+
93
+ /**
94
+ * The unit value for the custom pricing unit, as a string.
95
+ */
96
+ value: string;
97
+ }
98
+
99
+ interface Tier {
100
+ /**
101
+ * Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places.
102
+ */
103
+ flat_amount?: string;
104
+
105
+ /**
106
+ * Per-unit price for units included in this tier, represented as a decimal string in minor currency units with at
107
+ * most 12 decimal places.
108
+ */
109
+ unit_amount?: string;
110
+
111
+ /**
112
+ * Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may
113
+ * be set.
114
+ */
115
+ up_to_decimal?: string;
116
+
117
+ /**
118
+ * No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set.
119
+ */
120
+ up_to_inf?: 'inf';
121
+ }
122
+
123
+ type TieringMode = 'graduated' | 'volume';
124
+
125
+ interface TransformQuantity {
126
+ /**
127
+ * Divide usage by this number.
128
+ */
129
+ divide_by: number;
130
+
131
+ /**
132
+ * After division, round the result up or down.
133
+ */
134
+ round: TransformQuantity.Round;
135
+ }
136
+
137
+ namespace TransformQuantity {
138
+ type Round = 'down' | 'up';
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }