stripe 18.5.0-beta.2 → 18.6.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 (200) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/OPENAPI_VERSION +1 -1
  3. package/README.md +5 -3
  4. package/VERSION +1 -1
  5. package/cjs/Error.js +63 -55
  6. package/cjs/RequestSender.js +7 -4
  7. package/cjs/apiVersion.js +1 -1
  8. package/cjs/resources/Mandates.js +5 -0
  9. package/cjs/resources/Subscriptions.js +4 -0
  10. package/cjs/resources/V2/Billing/BillSettings/Versions.js +17 -0
  11. package/cjs/resources/V2/Billing/BillSettings.js +27 -0
  12. package/cjs/resources/V2/Billing/Cadences.js +23 -0
  13. package/cjs/resources/V2/Billing/CollectionSettings/Versions.js +17 -0
  14. package/cjs/resources/V2/Billing/CollectionSettings.js +30 -0
  15. package/cjs/resources/V2/Billing/CustomPricingUnits.js +25 -0
  16. package/cjs/resources/V2/Billing/Intents/Actions.js +17 -0
  17. package/cjs/resources/V2/Billing/Intents.js +36 -0
  18. package/cjs/resources/V2/Billing/LicenseFeeSubscriptions.js +12 -0
  19. package/cjs/resources/V2/Billing/LicenseFees/Versions.js +17 -0
  20. package/cjs/resources/V2/Billing/LicenseFees.js +27 -0
  21. package/cjs/resources/V2/Billing/LicensedItems.js +25 -0
  22. package/cjs/resources/V2/Billing/MeteredItems.js +22 -0
  23. package/cjs/resources/V2/Billing/PricingPlanSubscriptions.js +17 -0
  24. package/cjs/resources/V2/Billing/PricingPlans/Components.js +29 -0
  25. package/cjs/resources/V2/Billing/PricingPlans/Versions.js +17 -0
  26. package/cjs/resources/V2/Billing/PricingPlans.js +29 -0
  27. package/cjs/resources/V2/Billing/Profiles.js +19 -0
  28. package/cjs/resources/V2/Billing/RateCardSubscriptions.js +29 -0
  29. package/cjs/resources/V2/Billing/RateCards/Rates.js +25 -0
  30. package/cjs/resources/V2/Billing/RateCards/Versions.js +17 -0
  31. package/cjs/resources/V2/Billing/RateCards.js +29 -0
  32. package/cjs/resources/V2/Billing/ServiceActions.js +16 -0
  33. package/cjs/resources/V2/Core/ClaimableSandboxes.js +12 -0
  34. package/cjs/resources/V2/Reporting/ReportRuns.js +13 -0
  35. package/cjs/resources/V2/Reporting/Reports.js +12 -0
  36. package/cjs/resources/V2/Tax/AutomaticRules.js +22 -0
  37. package/cjs/resources.js +64 -24
  38. package/cjs/stripe.core.js +27 -1
  39. package/esm/Error.js +50 -43
  40. package/esm/RequestSender.js +7 -4
  41. package/esm/apiVersion.js +1 -1
  42. package/esm/resources/Mandates.js +5 -0
  43. package/esm/resources/Subscriptions.js +4 -0
  44. package/esm/resources/V2/Billing/BillSettings/Versions.js +14 -0
  45. package/esm/resources/V2/Billing/BillSettings.js +24 -0
  46. package/esm/resources/V2/Billing/Cadences.js +20 -0
  47. package/esm/resources/V2/Billing/CollectionSettings/Versions.js +14 -0
  48. package/esm/resources/V2/Billing/CollectionSettings.js +27 -0
  49. package/esm/resources/V2/Billing/CustomPricingUnits.js +22 -0
  50. package/esm/resources/V2/Billing/Intents/Actions.js +14 -0
  51. package/esm/resources/V2/Billing/Intents.js +33 -0
  52. package/esm/resources/V2/Billing/LicenseFeeSubscriptions.js +9 -0
  53. package/esm/resources/V2/Billing/LicenseFees/Versions.js +14 -0
  54. package/esm/resources/V2/Billing/LicenseFees.js +24 -0
  55. package/esm/resources/V2/Billing/LicensedItems.js +22 -0
  56. package/esm/resources/V2/Billing/MeteredItems.js +19 -0
  57. package/esm/resources/V2/Billing/PricingPlanSubscriptions.js +14 -0
  58. package/esm/resources/V2/Billing/PricingPlans/Components.js +26 -0
  59. package/esm/resources/V2/Billing/PricingPlans/Versions.js +14 -0
  60. package/esm/resources/V2/Billing/PricingPlans.js +26 -0
  61. package/esm/resources/V2/Billing/Profiles.js +16 -0
  62. package/esm/resources/V2/Billing/RateCardSubscriptions.js +26 -0
  63. package/esm/resources/V2/Billing/RateCards/Rates.js +22 -0
  64. package/esm/resources/V2/Billing/RateCards/Versions.js +14 -0
  65. package/esm/resources/V2/Billing/RateCards.js +26 -0
  66. package/esm/resources/V2/Billing/ServiceActions.js +13 -0
  67. package/esm/resources/V2/Core/ClaimableSandboxes.js +9 -0
  68. package/esm/resources/V2/Reporting/ReportRuns.js +10 -0
  69. package/esm/resources/V2/Reporting/Reports.js +9 -0
  70. package/esm/resources/V2/Tax/AutomaticRules.js +19 -0
  71. package/esm/resources.js +45 -5
  72. package/esm/stripe.core.js +27 -1
  73. package/package.json +1 -1
  74. package/types/AccountSessions.d.ts +45 -0
  75. package/types/AccountSessionsResource.d.ts +76 -13
  76. package/types/Accounts.d.ts +2 -2
  77. package/types/Balance.d.ts +2 -7
  78. package/types/BalanceSettings.d.ts +52 -46
  79. package/types/BalanceSettingsResource.d.ts +55 -46
  80. package/types/Billing/AlertTriggereds.d.ts +16 -1
  81. package/types/Billing/Alerts.d.ts +116 -1
  82. package/types/Billing/AlertsResource.d.ts +93 -2
  83. package/types/Billing/CreditBalanceSummary.d.ts +118 -2
  84. package/types/Billing/CreditBalanceSummaryResource.d.ts +12 -0
  85. package/types/Billing/CreditBalanceTransactions.d.ts +118 -2
  86. package/types/Billing/CreditGrants.d.ts +71 -1
  87. package/types/Billing/CreditGrantsResource.d.ts +32 -1
  88. package/types/Billing/MeterUsageRows.d.ts +1 -1
  89. package/types/Billing/Meters.d.ts +1 -1
  90. package/types/Billing/MetersResource.d.ts +1 -1
  91. package/types/BillingPortal/Configurations.d.ts +5 -0
  92. package/types/BillingPortal/ConfigurationsResource.d.ts +10 -0
  93. package/types/Charges.d.ts +71 -5
  94. package/types/Checkout/Sessions.d.ts +128 -2
  95. package/types/Checkout/SessionsResource.d.ts +167 -3
  96. package/types/CreditNotesResource.d.ts +3 -3
  97. package/types/Disputes.d.ts +7 -2
  98. package/types/Errors.d.ts +51 -45
  99. package/types/FileLinksResource.d.ts +1 -1
  100. package/types/Files.d.ts +1 -0
  101. package/types/FilesResource.d.ts +3 -1
  102. package/types/InvoiceItems.d.ts +104 -2
  103. package/types/InvoiceLineItems.d.ts +113 -2
  104. package/types/InvoicePaymentsResource.d.ts +3 -0
  105. package/types/Invoices.d.ts +19 -2
  106. package/types/InvoicesResource.d.ts +64 -0
  107. package/types/Mandates.d.ts +58 -1
  108. package/types/MandatesResource.d.ts +31 -0
  109. package/types/PaymentAttemptRecords.d.ts +154 -9
  110. package/types/PaymentAttemptRecordsResource.d.ts +5 -0
  111. package/types/PaymentIntents.d.ts +136 -2
  112. package/types/PaymentIntentsResource.d.ts +280 -3
  113. package/types/PaymentLinksResource.d.ts +1 -1
  114. package/types/PaymentMethods.d.ts +5 -0
  115. package/types/PaymentRecords.d.ts +154 -9
  116. package/types/PaymentRecordsResource.d.ts +24 -3
  117. package/types/Payouts.d.ts +1 -1
  118. package/types/PromotionCodes.d.ts +5 -2
  119. package/types/QuotePreviewInvoices.d.ts +19 -2
  120. package/types/QuotePreviewSubscriptionSchedules.d.ts +47 -0
  121. package/types/SetupAttempts.d.ts +7 -1
  122. package/types/SetupIntents.d.ts +95 -1
  123. package/types/SetupIntentsResource.d.ts +207 -0
  124. package/types/SubscriptionSchedules.d.ts +47 -0
  125. package/types/SubscriptionSchedulesResource.d.ts +112 -0
  126. package/types/Subscriptions.d.ts +5 -0
  127. package/types/SubscriptionsResource.d.ts +145 -7
  128. package/types/Terminal/Configurations.d.ts +28 -0
  129. package/types/Terminal/ConfigurationsResource.d.ts +72 -0
  130. package/types/TestHelpers/Terminal/ReadersResource.d.ts +28 -1
  131. package/types/V2/Billing/BillSettingVersions.d.ts +97 -0
  132. package/types/V2/Billing/BillSettings/VersionsResource.d.ts +58 -0
  133. package/types/V2/Billing/BillSettings.d.ts +120 -0
  134. package/types/V2/Billing/BillSettingsResource.d.ts +241 -0
  135. package/types/V2/Billing/Cadences.d.ts +354 -0
  136. package/types/V2/Billing/CadencesResource.d.ts +489 -0
  137. package/types/V2/Billing/CollectionSettingVersions.d.ts +314 -0
  138. package/types/V2/Billing/CollectionSettings/VersionsResource.d.ts +62 -0
  139. package/types/V2/Billing/CollectionSettings.d.ts +337 -0
  140. package/types/V2/Billing/CollectionSettingsResource.d.ts +675 -0
  141. package/types/V2/Billing/CustomPricingUnits.d.ts +56 -0
  142. package/types/V2/Billing/CustomPricingUnitsResource.d.ts +122 -0
  143. package/types/V2/Billing/IntentActions.d.ts +458 -0
  144. package/types/V2/Billing/Intents/ActionsResource.d.ts +58 -0
  145. package/types/V2/Billing/Intents.d.ts +117 -0
  146. package/types/V2/Billing/IntentsResource.d.ts +574 -0
  147. package/types/V2/Billing/LicenseFeeSubscriptions.d.ts +64 -0
  148. package/types/V2/Billing/LicenseFeeSubscriptionsResource.d.ts +28 -0
  149. package/types/V2/Billing/LicenseFeeVersions.d.ts +106 -0
  150. package/types/V2/Billing/LicenseFees/VersionsResource.d.ts +58 -0
  151. package/types/V2/Billing/LicenseFees.d.ts +163 -0
  152. package/types/V2/Billing/LicenseFeesResource.d.ts +290 -0
  153. package/types/V2/Billing/LicensedItems.d.ts +73 -0
  154. package/types/V2/Billing/LicensedItemsResource.d.ts +157 -0
  155. package/types/V2/Billing/MeteredItems.d.ts +101 -0
  156. package/types/V2/Billing/MeteredItemsResource.d.ts +189 -0
  157. package/types/V2/Billing/PricingPlanComponents.d.ts +109 -0
  158. package/types/V2/Billing/PricingPlanSubscriptions.d.ts +134 -0
  159. package/types/V2/Billing/PricingPlanSubscriptionsResource.d.ts +93 -0
  160. package/types/V2/Billing/PricingPlanVersions.d.ts +49 -0
  161. package/types/V2/Billing/PricingPlans/ComponentsResource.d.ts +197 -0
  162. package/types/V2/Billing/PricingPlans/VersionsResource.d.ts +58 -0
  163. package/types/V2/Billing/PricingPlans.d.ts +84 -0
  164. package/types/V2/Billing/PricingPlansResource.d.ts +151 -0
  165. package/types/V2/Billing/Profiles.d.ts +70 -0
  166. package/types/V2/Billing/ProfilesResource.d.ts +150 -0
  167. package/types/V2/Billing/RateCardRates.d.ts +138 -0
  168. package/types/V2/Billing/RateCardSubscriptions.d.ts +134 -0
  169. package/types/V2/Billing/RateCardSubscriptionsResource.d.ts +157 -0
  170. package/types/V2/Billing/RateCardVersions.d.ts +39 -0
  171. package/types/V2/Billing/RateCards/RatesResource.d.ts +209 -0
  172. package/types/V2/Billing/RateCards/VersionsResource.d.ts +58 -0
  173. package/types/V2/Billing/RateCards.d.ts +98 -0
  174. package/types/V2/Billing/RateCardsResource.d.ts +162 -0
  175. package/types/V2/Billing/ServiceActions.d.ts +240 -0
  176. package/types/V2/Billing/ServiceActionsResource.d.ts +302 -0
  177. package/types/V2/Core/Accounts/PersonsResource.d.ts +32 -0
  178. package/types/V2/Core/Accounts.d.ts +49 -0
  179. package/types/V2/Core/AccountsResource.d.ts +78 -0
  180. package/types/V2/Core/ClaimableSandboxes.d.ts +349 -0
  181. package/types/V2/Core/ClaimableSandboxesResource.d.ts +310 -0
  182. package/types/V2/Core/Persons.d.ts +16 -0
  183. package/types/V2/EventTypes.d.ts +3682 -632
  184. package/types/V2/Events.d.ts +7 -0
  185. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +7 -2
  186. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +5 -0
  187. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +1 -1
  188. package/types/V2/MoneyManagement/TransactionEntries.d.ts +7 -0
  189. package/types/V2/MoneyManagement/Transactions.d.ts +7 -0
  190. package/types/V2/Reporting/ReportRuns.d.ts +178 -0
  191. package/types/V2/Reporting/ReportRunsResource.d.ts +99 -0
  192. package/types/V2/Reporting/Reports.d.ts +120 -0
  193. package/types/V2/Reporting/ReportsResource.d.ts +30 -0
  194. package/types/V2/Tax/AutomaticRules.d.ts +53 -0
  195. package/types/V2/Tax/AutomaticRulesResource.d.ts +102 -0
  196. package/types/WebhookEndpointsResource.d.ts +2 -1
  197. package/types/Webhooks.d.ts +2 -0
  198. package/types/index.d.ts +125 -5
  199. package/types/lib.d.ts +1 -1
  200. package/types/test/typescriptTest.ts +3 -3
@@ -4,6 +4,8 @@ declare module 'stripe' {
4
4
  namespace Stripe {
5
5
  namespace V2 {
6
6
  namespace Event {
7
+ interface Changes {}
8
+
7
9
  interface Reason {
8
10
  /**
9
11
  * Event reason type.
@@ -45,6 +47,11 @@ declare module 'stripe' {
45
47
  */
46
48
  object: 'v2.core.event';
47
49
 
50
+ /**
51
+ * Before and after changes for the primary related object.
52
+ */
53
+ changes: Event.Changes;
54
+
48
55
  /**
49
56
  * Authentication context needed to fetch the event or related object.
50
57
  */
@@ -5,7 +5,7 @@ declare module 'stripe' {
5
5
  namespace V2 {
6
6
  namespace MoneyManagement {
7
7
  /**
8
- * The Financial Account is the container that allows for the configuration of money movement.
8
+ * A FinancialAccount represents a balance and can be used as the source or destination for the money management (`/v2/money_management`) APIs.
9
9
  */
10
10
  interface FinancialAccount {
11
11
  /**
@@ -33,13 +33,18 @@ declare module 'stripe' {
33
33
  */
34
34
  created: string;
35
35
 
36
+ /**
37
+ * A descriptive name for the FinancialAccount, up to 50 characters long. This name will be used in the Stripe Dashboard and embedded components.
38
+ */
39
+ display_name: string | null;
40
+
36
41
  /**
37
42
  * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
38
43
  */
39
44
  livemode: boolean;
40
45
 
41
46
  /**
42
- * Metadata associated with the FinancialAccount
47
+ * Metadata associated with the FinancialAccount.
43
48
  */
44
49
  metadata: Stripe.Metadata | null;
45
50
 
@@ -10,6 +10,11 @@ declare module 'stripe' {
10
10
  */
11
11
  type: 'storage';
12
12
 
13
+ /**
14
+ * A descriptive name for the FinancialAccount, up to 50 characters long. This name will be used in the Stripe Dashboard and embedded components.
15
+ */
16
+ display_name?: string;
17
+
13
18
  /**
14
19
  * Metadata associated with the FinancialAccount.
15
20
  */
@@ -5,7 +5,7 @@ declare module 'stripe' {
5
5
  namespace V2 {
6
6
  namespace MoneyManagement {
7
7
  /**
8
- * OutboundPaymentQuote represents a quote
8
+ * OutboundPaymentQuote represents a quote that provides fee and amount estimates for OutboundPayment.
9
9
  */
10
10
  interface OutboundPaymentQuote {
11
11
  /**
@@ -87,6 +87,7 @@ declare module 'stripe' {
87
87
  namespace TransactionDetails {
88
88
  type Category =
89
89
  | 'adjustment'
90
+ | 'currency_conversion'
90
91
  | 'inbound_transfer'
91
92
  | 'outbound_payment'
92
93
  | 'outbound_transfer'
@@ -106,6 +107,11 @@ declare module 'stripe' {
106
107
  */
107
108
  adjustment: string | null;
108
109
 
110
+ /**
111
+ * In the future, this will be the ID of the currency conversion that created this Transaction. For now, this field is always null.
112
+ */
113
+ currency_conversion: string | null;
114
+
109
115
  /**
110
116
  * If applicable, the ID of the FeeTransaction that created this Transaction.
111
117
  */
@@ -140,6 +146,7 @@ declare module 'stripe' {
140
146
  namespace Flow {
141
147
  type Type =
142
148
  | 'adjustment'
149
+ | 'currency_conversion'
143
150
  | 'fee_transaction'
144
151
  | 'inbound_transfer'
145
152
  | 'outbound_payment'
@@ -89,6 +89,7 @@ declare module 'stripe' {
89
89
 
90
90
  type Category =
91
91
  | 'adjustment'
92
+ | 'currency_conversion'
92
93
  | 'inbound_transfer'
93
94
  | 'outbound_payment'
94
95
  | 'outbound_transfer'
@@ -108,6 +109,11 @@ declare module 'stripe' {
108
109
  */
109
110
  adjustment: string | null;
110
111
 
112
+ /**
113
+ * In the future, this will be the ID of the currency conversion that created this Transaction. For now, this field is always null.
114
+ */
115
+ currency_conversion: string | null;
116
+
111
117
  /**
112
118
  * If applicable, the ID of the FeeTransaction that created this Transaction.
113
119
  */
@@ -142,6 +148,7 @@ declare module 'stripe' {
142
148
  namespace Flow {
143
149
  type Type =
144
150
  | 'adjustment'
151
+ | 'currency_conversion'
145
152
  | 'fee_transaction'
146
153
  | 'inbound_transfer'
147
154
  | 'outbound_payment'
@@ -0,0 +1,178 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace V2 {
6
+ namespace Reporting {
7
+ /**
8
+ * The `ReportRun` object represents an instance of a `Report` generated with specific
9
+ * run parameters. Once the object is created, Stripe begins processing the report. When
10
+ * the report has finished running, it will give you a reference to the results.
11
+ */
12
+ interface ReportRun {
13
+ /**
14
+ * The unique identifier of the `ReportRun` object.
15
+ */
16
+ id: string;
17
+
18
+ /**
19
+ * String representing the object's type. Objects of the same type share the same value of the object field.
20
+ */
21
+ object: 'v2.reporting.report_run';
22
+
23
+ /**
24
+ * Time at which the object was created.
25
+ */
26
+ created: string;
27
+
28
+ /**
29
+ * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
30
+ */
31
+ livemode: boolean;
32
+
33
+ /**
34
+ * The unique identifier of the `Report` object which was run.
35
+ */
36
+ report: string;
37
+
38
+ /**
39
+ * The human-readable name of the `Report` which was run.
40
+ */
41
+ report_name: string;
42
+
43
+ /**
44
+ * The parameters used to customize the generation of the report.
45
+ */
46
+ report_parameters: {
47
+ [key: string]: ReportRun.ReportParameters;
48
+ };
49
+
50
+ /**
51
+ * Details how to retrieve the results of a successfully completed `ReportRun`.
52
+ */
53
+ result: ReportRun.Result | null;
54
+
55
+ /**
56
+ * The options specified for customizing the output file of the `ReportRun`.
57
+ */
58
+ result_options: ReportRun.ResultOptions | null;
59
+
60
+ /**
61
+ * The current status of the `ReportRun`.
62
+ */
63
+ status: ReportRun.Status;
64
+
65
+ /**
66
+ * Additional details about the current state of the `ReportRun`. The field is currently only populated when a `ReportRun`
67
+ * is in the `failed` state, providing more information about why the report failed to generate successfully.
68
+ */
69
+ status_details: {
70
+ [key: string]: ReportRun.StatusDetails;
71
+ };
72
+ }
73
+
74
+ namespace ReportRun {
75
+ interface ReportParameters {
76
+ /**
77
+ * Parameter with an array data type.
78
+ */
79
+ array_value: ReportParameters.ArrayValue | null;
80
+
81
+ /**
82
+ * Parameter with a string data type.
83
+ */
84
+ string_value: string | null;
85
+
86
+ /**
87
+ * Parameter with a timestamp data type.
88
+ */
89
+ timestamp_value: string | null;
90
+ }
91
+
92
+ namespace ReportParameters {
93
+ interface ArrayValue {
94
+ /**
95
+ * The list of string values in the array.
96
+ */
97
+ items: Array<string>;
98
+ }
99
+ }
100
+
101
+ interface Result {
102
+ /**
103
+ * Contains metadata about the file produced by the `ReportRun`, including
104
+ * its content type, size, and a URL to download its contents.
105
+ */
106
+ file: Result.File;
107
+
108
+ /**
109
+ * The type of the `ReportRun` result.
110
+ */
111
+ type: 'file';
112
+ }
113
+
114
+ namespace Result {
115
+ interface File {
116
+ /**
117
+ * The content type of the file.
118
+ */
119
+ content_type: File.ContentType;
120
+
121
+ /**
122
+ * A pre-signed URL that allows secure, time-limited access to download the file.
123
+ */
124
+ download_url: File.DownloadUrl;
125
+
126
+ /**
127
+ * The total size of the file in bytes.
128
+ */
129
+ size: number;
130
+ }
131
+
132
+ namespace File {
133
+ type ContentType = 'csv' | 'zip';
134
+
135
+ interface DownloadUrl {
136
+ /**
137
+ * The time that the URL expires.
138
+ */
139
+ expires_at: string | null;
140
+
141
+ /**
142
+ * The URL that can be used for accessing the file.
143
+ */
144
+ url: string;
145
+ }
146
+ }
147
+ }
148
+
149
+ interface ResultOptions {
150
+ /**
151
+ * If set, the generated report file will be compressed into a ZIP folder.
152
+ * This is useful for reducing file size and download time for large reports.
153
+ */
154
+ compress_file: boolean | null;
155
+ }
156
+
157
+ type Status = 'failed' | 'running' | 'succeeded';
158
+
159
+ interface StatusDetails {
160
+ /**
161
+ * Error code categorizing the reason the `ReportRun` failed.
162
+ */
163
+ error_code: StatusDetails.ErrorCode | null;
164
+
165
+ /**
166
+ * Error message with additional details about the failure.
167
+ */
168
+ error_message: string | null;
169
+ }
170
+
171
+ namespace StatusDetails {
172
+ type ErrorCode = 'file_size_above_limit' | 'internal_error';
173
+ }
174
+ }
175
+ }
176
+ }
177
+ }
178
+ }
@@ -0,0 +1,99 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace V2 {
6
+ namespace Reporting {
7
+ interface ReportRunCreateParams {
8
+ /**
9
+ * The unique identifier of the `Report` being requested.
10
+ */
11
+ report: string;
12
+
13
+ /**
14
+ * A map of parameter names to values, specifying how the report should be customized.
15
+ * The accepted parameters depend on the specific `Report` being run.
16
+ */
17
+ report_parameters: {
18
+ [key: string]: ReportRunCreateParams.ReportParameters;
19
+ };
20
+
21
+ /**
22
+ * Optional settings to customize the results of the `ReportRun`.
23
+ */
24
+ result_options?: ReportRunCreateParams.ResultOptions;
25
+ }
26
+
27
+ namespace ReportRunCreateParams {
28
+ interface ReportParameters {
29
+ /**
30
+ * Parameter with an array data type.
31
+ */
32
+ array_value?: ReportParameters.ArrayValue;
33
+
34
+ /**
35
+ * Parameter with a string data type.
36
+ */
37
+ string_value?: string;
38
+
39
+ /**
40
+ * Parameter with a timestamp data type.
41
+ */
42
+ timestamp_value?: string;
43
+ }
44
+
45
+ namespace ReportParameters {
46
+ interface ArrayValue {
47
+ /**
48
+ * The list of string values in the array.
49
+ */
50
+ items: Array<string>;
51
+ }
52
+ }
53
+
54
+ interface ResultOptions {
55
+ /**
56
+ * If set, the generated report file will be compressed into a ZIP folder.
57
+ * This is useful for reducing file size and download time for large reports.
58
+ */
59
+ compress_file?: boolean;
60
+ }
61
+ }
62
+ }
63
+
64
+ namespace Reporting {
65
+ interface ReportRunRetrieveParams {}
66
+ }
67
+
68
+ namespace Reporting {
69
+ class ReportRunsResource {
70
+ /**
71
+ * Initiates the generation of a `ReportRun` based on the specified report template
72
+ * and user-provided parameters. It's the starting point for obtaining report data,
73
+ * and returns a `ReportRun` object which can be used to track the progress and retrieve
74
+ * the results of the report.
75
+ * @throws Stripe.RateLimitError
76
+ */
77
+ create(
78
+ params: ReportRunCreateParams,
79
+ options?: RequestOptions
80
+ ): Promise<Stripe.Response<Stripe.V2.Reporting.ReportRun>>;
81
+
82
+ /**
83
+ * Fetches the current state and details of a previously created `ReportRun`. If the `ReportRun`
84
+ * has succeeded, the endpoint will provide details for how to retrieve the results.
85
+ */
86
+ retrieve(
87
+ id: string,
88
+ params?: ReportRunRetrieveParams,
89
+ options?: RequestOptions
90
+ ): Promise<Stripe.Response<Stripe.V2.Reporting.ReportRun>>;
91
+ retrieve(
92
+ id: string,
93
+ options?: RequestOptions
94
+ ): Promise<Stripe.Response<Stripe.V2.Reporting.ReportRun>>;
95
+ }
96
+ }
97
+ }
98
+ }
99
+ }
@@ -0,0 +1,120 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace V2 {
6
+ namespace Reporting {
7
+ /**
8
+ * The Report resource represents a customizable report template that provides insights into various aspects of your Stripe integration.
9
+ */
10
+ interface Report {
11
+ /**
12
+ * The unique identifier of the `Report` 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.reporting.report';
20
+
21
+ /**
22
+ * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
23
+ */
24
+ livemode: boolean;
25
+
26
+ /**
27
+ * The human-readable name of the `Report`.
28
+ */
29
+ name: string;
30
+
31
+ /**
32
+ * Specification of the parameters that the `Report` accepts. It details each parameter's
33
+ * name, description, whether it is required, and any validations performed.
34
+ */
35
+ parameters: {
36
+ [key: string]: Report.Parameters;
37
+ };
38
+ }
39
+
40
+ namespace Report {
41
+ interface Parameters {
42
+ /**
43
+ * For array parameters, provides details about the array elements.
44
+ */
45
+ array_details: Parameters.ArrayDetails | null;
46
+
47
+ /**
48
+ * Explains the purpose and usage of the parameter.
49
+ */
50
+ description: string;
51
+
52
+ /**
53
+ * For enum parameters, provides the list of allowed values.
54
+ */
55
+ enum_details: Parameters.EnumDetails | null;
56
+
57
+ /**
58
+ * Indicates whether the parameter must be provided.
59
+ */
60
+ required: boolean;
61
+
62
+ /**
63
+ * For timestamp parameters, specifies the allowed date range.
64
+ */
65
+ timestamp_details: Parameters.TimestampDetails | null;
66
+
67
+ /**
68
+ * The data type of the parameter.
69
+ */
70
+ type: Parameters.Type;
71
+ }
72
+
73
+ namespace Parameters {
74
+ interface ArrayDetails {
75
+ /**
76
+ * Data type of the elements in the array.
77
+ */
78
+ element_type: 'enum';
79
+
80
+ /**
81
+ * Details about enum elements in the array.
82
+ */
83
+ enum_details: ArrayDetails.EnumDetails | null;
84
+ }
85
+
86
+ namespace ArrayDetails {
87
+ interface EnumDetails {
88
+ /**
89
+ * Allowed values of the enum.
90
+ */
91
+ allowed_values: Array<string>;
92
+ }
93
+ }
94
+
95
+ interface EnumDetails {
96
+ /**
97
+ * Allowed values of the enum.
98
+ */
99
+ allowed_values: Array<string>;
100
+ }
101
+
102
+ interface TimestampDetails {
103
+ /**
104
+ * Maximum permitted timestamp which can be requested.
105
+ */
106
+ max: string;
107
+
108
+ /**
109
+ * Minimum permitted timestamp which can be requested.
110
+ */
111
+ min: string;
112
+ }
113
+
114
+ type Type = 'array' | 'enum' | 'string' | 'timestamp';
115
+ }
116
+ }
117
+ }
118
+ }
119
+ }
120
+ }
@@ -0,0 +1,30 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace V2 {
6
+ namespace Reporting {
7
+ interface ReportRetrieveParams {}
8
+ }
9
+
10
+ namespace Reporting {
11
+ class ReportsResource {
12
+ /**
13
+ * Retrieves metadata about a specific `Report` template, including its name, description,
14
+ * and the parameters it accepts. It's useful for understanding the capabilities and
15
+ * requirements of a particular `Report` before requesting a `ReportRun`.
16
+ */
17
+ retrieve(
18
+ id: string,
19
+ params?: ReportRetrieveParams,
20
+ options?: RequestOptions
21
+ ): Promise<Stripe.Response<Stripe.V2.Reporting.Report>>;
22
+ retrieve(
23
+ id: string,
24
+ options?: RequestOptions
25
+ ): Promise<Stripe.Response<Stripe.V2.Reporting.Report>>;
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,53 @@
1
+ // File generated from our OpenAPI spec
2
+
3
+ declare module 'stripe' {
4
+ namespace Stripe {
5
+ namespace V2 {
6
+ namespace Tax {
7
+ /**
8
+ * An AutomaticRule holds automatic Tax configuration for a BillableItem.
9
+ */
10
+ interface AutomaticRule {
11
+ /**
12
+ * The ID of the AutomaticRule 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.tax.automatic_rule';
20
+
21
+ /**
22
+ * The ID of the BillableItem.
23
+ */
24
+ billable_item: string;
25
+
26
+ /**
27
+ * The time at which the AutomaticRule object was created.
28
+ */
29
+ created: 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 status of the AutomaticRule object.
38
+ */
39
+ status: AutomaticRule.Status;
40
+
41
+ /**
42
+ * A TaxCode object that will be used for automatic tax calculations.
43
+ */
44
+ tax_code: string;
45
+ }
46
+
47
+ namespace AutomaticRule {
48
+ type Status = 'active' | 'inactive';
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }