stripe 22.3.0-alpha.2 → 22.3.0-alpha.3

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 (210) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/OPENAPI_VERSION +1 -1
  3. package/README.md +1 -1
  4. package/VERSION +1 -1
  5. package/cjs/apiVersion.d.ts +1 -1
  6. package/cjs/apiVersion.js +1 -1
  7. package/cjs/autoPagination.js +27 -2
  8. package/cjs/autoPagination.js.map +1 -1
  9. package/cjs/platform/NodePlatformFunctions.d.ts +3 -0
  10. package/cjs/platform/NodePlatformFunctions.js +36 -2
  11. package/cjs/platform/NodePlatformFunctions.js.map +1 -1
  12. package/cjs/platform/PlatformFunctions.d.ts +1 -0
  13. package/cjs/platform/PlatformFunctions.js +3 -0
  14. package/cjs/platform/PlatformFunctions.js.map +1 -1
  15. package/cjs/resources/Charges.d.ts +19 -226
  16. package/cjs/resources/Checkout/Sessions.d.ts +8 -1
  17. package/cjs/resources/ConfirmationTokens.d.ts +10 -0
  18. package/cjs/resources/GiftCardOperations.d.ts +246 -0
  19. package/cjs/resources/GiftCardOperations.js +15 -0
  20. package/cjs/resources/GiftCardOperations.js.map +1 -0
  21. package/cjs/resources/GiftCards.d.ts +183 -0
  22. package/cjs/resources/GiftCards.js +51 -0
  23. package/cjs/resources/GiftCards.js.map +1 -0
  24. package/cjs/resources/Issuing/Authorizations.d.ts +1 -1
  25. package/cjs/resources/Issuing/Disputes.d.ts +43 -0
  26. package/cjs/resources/Issuing/Tokens.d.ts +1 -1
  27. package/cjs/resources/PaymentAttemptRecords.d.ts +46 -1
  28. package/cjs/resources/PaymentIntents.d.ts +264 -302
  29. package/cjs/resources/PaymentIntents.js +6 -0
  30. package/cjs/resources/PaymentIntents.js.map +1 -1
  31. package/cjs/resources/PaymentMethods.d.ts +10 -0
  32. package/cjs/resources/PaymentRecords.d.ts +46 -1
  33. package/cjs/resources/Radar/AccountEvaluations.d.ts +44 -4
  34. package/cjs/resources/Radar/CustomerEvaluations.d.ts +22 -2
  35. package/cjs/resources/SetupIntents.d.ts +7 -3
  36. package/cjs/resources/Tax/CalculationLineItems.d.ts +8 -1
  37. package/cjs/resources/Tax/Calculations.d.ts +38 -0
  38. package/cjs/resources/Tax/TransactionLineItems.d.ts +8 -1
  39. package/cjs/resources/TaxFunds.d.ts +126 -0
  40. package/cjs/resources/TaxFunds.js +23 -0
  41. package/cjs/resources/TaxFunds.js.map +1 -0
  42. package/cjs/resources/V2/Billing/BillSettings/Versions.d.ts +1 -1
  43. package/cjs/resources/V2/Billing/BillSettings/Versions.js +2 -2
  44. package/cjs/resources/V2/Billing/BillSettings/Versions.js.map +1 -1
  45. package/cjs/resources/V2/Billing/Cadences/SpendModifierRules.d.ts +1 -1
  46. package/cjs/resources/V2/Billing/Cadences/SpendModifierRules.js +2 -2
  47. package/cjs/resources/V2/Billing/Cadences/SpendModifierRules.js.map +1 -1
  48. package/cjs/resources/V2/Billing/CollectionSettings/Versions.d.ts +1 -1
  49. package/cjs/resources/V2/Billing/CollectionSettings/Versions.js +2 -2
  50. package/cjs/resources/V2/Billing/CollectionSettings/Versions.js.map +1 -1
  51. package/cjs/resources/V2/Billing/Contracts/LicensePricing/QuantityChanges.d.ts +1 -1
  52. package/cjs/resources/V2/Billing/Contracts/LicensePricing/QuantityChanges.js +2 -2
  53. package/cjs/resources/V2/Billing/Contracts/LicensePricing/QuantityChanges.js.map +1 -1
  54. package/cjs/resources/V2/Billing/Contracts.d.ts +2 -2
  55. package/cjs/resources/V2/Billing/Intents/Actions.d.ts +1 -1
  56. package/cjs/resources/V2/Billing/Intents/Actions.js +2 -2
  57. package/cjs/resources/V2/Billing/Intents/Actions.js.map +1 -1
  58. package/cjs/resources/V2/Billing/LicenseFees/Versions.d.ts +1 -1
  59. package/cjs/resources/V2/Billing/LicenseFees/Versions.js +2 -2
  60. package/cjs/resources/V2/Billing/LicenseFees/Versions.js.map +1 -1
  61. package/cjs/resources/V2/Billing/PricingPlans/Components.d.ts +2 -2
  62. package/cjs/resources/V2/Billing/PricingPlans/Components.js +4 -4
  63. package/cjs/resources/V2/Billing/PricingPlans/Components.js.map +1 -1
  64. package/cjs/resources/V2/Billing/PricingPlans/Versions.d.ts +1 -1
  65. package/cjs/resources/V2/Billing/PricingPlans/Versions.js +2 -2
  66. package/cjs/resources/V2/Billing/PricingPlans/Versions.js.map +1 -1
  67. package/cjs/resources/V2/Billing/RateCards/CustomPricingUnitOverageRates.d.ts +2 -2
  68. package/cjs/resources/V2/Billing/RateCards/CustomPricingUnitOverageRates.js +4 -4
  69. package/cjs/resources/V2/Billing/RateCards/CustomPricingUnitOverageRates.js.map +1 -1
  70. package/cjs/resources/V2/Billing/RateCards/Rates.d.ts +2 -2
  71. package/cjs/resources/V2/Billing/RateCards/Rates.js +4 -4
  72. package/cjs/resources/V2/Billing/RateCards/Rates.js.map +1 -1
  73. package/cjs/resources/V2/Billing/RateCards/Versions.d.ts +1 -1
  74. package/cjs/resources/V2/Billing/RateCards/Versions.js +2 -2
  75. package/cjs/resources/V2/Billing/RateCards/Versions.js.map +1 -1
  76. package/cjs/resources/V2/Commerce/ProductCatalog/Imports.d.ts +2 -2
  77. package/cjs/resources/V2/Commerce/ProductCatalogImports.d.ts +1 -1
  78. package/cjs/resources/V2/Core/Accounts/PersonTokens.d.ts +1 -1
  79. package/cjs/resources/V2/Core/Accounts/PersonTokens.js +2 -2
  80. package/cjs/resources/V2/Core/Accounts/PersonTokens.js.map +1 -1
  81. package/cjs/resources/V2/Core/Accounts/Persons.d.ts +2 -2
  82. package/cjs/resources/V2/Core/Accounts/Persons.js +4 -4
  83. package/cjs/resources/V2/Core/Accounts/Persons.js.map +1 -1
  84. package/cjs/resources/V2/Core/Accounts.d.ts +1 -1
  85. package/cjs/resources/V2/Core/FeeBatches.d.ts +71 -6
  86. package/cjs/resources/V2/Core/FeeBatches.js.map +1 -1
  87. package/cjs/resources/V2/Core/FeeEntries.d.ts +28 -3
  88. package/cjs/resources/V2/Core/FeeEntries.js.map +1 -1
  89. package/cjs/resources/V2/Core/Vault/UsBankAccounts.d.ts +1 -0
  90. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +1 -0
  91. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js.map +1 -1
  92. package/cjs/resources/V2/MoneyManagement/FinancialAccounts/Statements.d.ts +1 -1
  93. package/cjs/resources/V2/MoneyManagement/FinancialAccounts/Statements.js +2 -2
  94. package/cjs/resources/V2/MoneyManagement/FinancialAccounts/Statements.js.map +1 -1
  95. package/cjs/resources/V2/MoneyManagement/TransactionEntries.d.ts +6 -2
  96. package/cjs/resources/V2/MoneyManagement/Transactions.d.ts +6 -2
  97. package/cjs/resources/V2/Payments/SettlementAllocationIntents/Splits.d.ts +2 -2
  98. package/cjs/resources/V2/Payments/SettlementAllocationIntents/Splits.js +4 -4
  99. package/cjs/resources/V2/Payments/SettlementAllocationIntents/Splits.js.map +1 -1
  100. package/cjs/resources.d.ts +3 -0
  101. package/cjs/resources.js +8 -2
  102. package/cjs/resources.js.map +1 -1
  103. package/cjs/stripe.core.d.ts +12 -2
  104. package/cjs/stripe.core.js +12 -1
  105. package/cjs/stripe.core.js.map +1 -1
  106. package/esm/apiVersion.d.ts +1 -1
  107. package/esm/apiVersion.js +1 -1
  108. package/esm/autoPagination.js +27 -2
  109. package/esm/autoPagination.js.map +1 -1
  110. package/esm/platform/NodePlatformFunctions.d.ts +3 -0
  111. package/esm/platform/NodePlatformFunctions.js +36 -2
  112. package/esm/platform/NodePlatformFunctions.js.map +1 -1
  113. package/esm/platform/PlatformFunctions.d.ts +1 -0
  114. package/esm/platform/PlatformFunctions.js +3 -0
  115. package/esm/platform/PlatformFunctions.js.map +1 -1
  116. package/esm/resources/Charges.d.ts +19 -226
  117. package/esm/resources/Checkout/Sessions.d.ts +8 -1
  118. package/esm/resources/ConfirmationTokens.d.ts +10 -0
  119. package/esm/resources/GiftCardOperations.d.ts +246 -0
  120. package/esm/resources/GiftCardOperations.js +11 -0
  121. package/esm/resources/GiftCardOperations.js.map +1 -0
  122. package/esm/resources/GiftCards.d.ts +183 -0
  123. package/esm/resources/GiftCards.js +47 -0
  124. package/esm/resources/GiftCards.js.map +1 -0
  125. package/esm/resources/Issuing/Authorizations.d.ts +1 -1
  126. package/esm/resources/Issuing/Disputes.d.ts +43 -0
  127. package/esm/resources/Issuing/Tokens.d.ts +1 -1
  128. package/esm/resources/PaymentAttemptRecords.d.ts +46 -1
  129. package/esm/resources/PaymentIntents.d.ts +264 -302
  130. package/esm/resources/PaymentIntents.js +6 -0
  131. package/esm/resources/PaymentIntents.js.map +1 -1
  132. package/esm/resources/PaymentMethods.d.ts +10 -0
  133. package/esm/resources/PaymentRecords.d.ts +46 -1
  134. package/esm/resources/Radar/AccountEvaluations.d.ts +44 -4
  135. package/esm/resources/Radar/CustomerEvaluations.d.ts +22 -2
  136. package/esm/resources/SetupIntents.d.ts +7 -3
  137. package/esm/resources/Tax/CalculationLineItems.d.ts +8 -1
  138. package/esm/resources/Tax/Calculations.d.ts +38 -0
  139. package/esm/resources/Tax/TransactionLineItems.d.ts +8 -1
  140. package/esm/resources/TaxFunds.d.ts +126 -0
  141. package/esm/resources/TaxFunds.js +19 -0
  142. package/esm/resources/TaxFunds.js.map +1 -0
  143. package/esm/resources/V2/Billing/BillSettings/Versions.d.ts +1 -1
  144. package/esm/resources/V2/Billing/BillSettings/Versions.js +2 -2
  145. package/esm/resources/V2/Billing/BillSettings/Versions.js.map +1 -1
  146. package/esm/resources/V2/Billing/Cadences/SpendModifierRules.d.ts +1 -1
  147. package/esm/resources/V2/Billing/Cadences/SpendModifierRules.js +2 -2
  148. package/esm/resources/V2/Billing/Cadences/SpendModifierRules.js.map +1 -1
  149. package/esm/resources/V2/Billing/CollectionSettings/Versions.d.ts +1 -1
  150. package/esm/resources/V2/Billing/CollectionSettings/Versions.js +2 -2
  151. package/esm/resources/V2/Billing/CollectionSettings/Versions.js.map +1 -1
  152. package/esm/resources/V2/Billing/Contracts/LicensePricing/QuantityChanges.d.ts +1 -1
  153. package/esm/resources/V2/Billing/Contracts/LicensePricing/QuantityChanges.js +2 -2
  154. package/esm/resources/V2/Billing/Contracts/LicensePricing/QuantityChanges.js.map +1 -1
  155. package/esm/resources/V2/Billing/Contracts.d.ts +2 -2
  156. package/esm/resources/V2/Billing/Intents/Actions.d.ts +1 -1
  157. package/esm/resources/V2/Billing/Intents/Actions.js +2 -2
  158. package/esm/resources/V2/Billing/Intents/Actions.js.map +1 -1
  159. package/esm/resources/V2/Billing/LicenseFees/Versions.d.ts +1 -1
  160. package/esm/resources/V2/Billing/LicenseFees/Versions.js +2 -2
  161. package/esm/resources/V2/Billing/LicenseFees/Versions.js.map +1 -1
  162. package/esm/resources/V2/Billing/PricingPlans/Components.d.ts +2 -2
  163. package/esm/resources/V2/Billing/PricingPlans/Components.js +4 -4
  164. package/esm/resources/V2/Billing/PricingPlans/Components.js.map +1 -1
  165. package/esm/resources/V2/Billing/PricingPlans/Versions.d.ts +1 -1
  166. package/esm/resources/V2/Billing/PricingPlans/Versions.js +2 -2
  167. package/esm/resources/V2/Billing/PricingPlans/Versions.js.map +1 -1
  168. package/esm/resources/V2/Billing/RateCards/CustomPricingUnitOverageRates.d.ts +2 -2
  169. package/esm/resources/V2/Billing/RateCards/CustomPricingUnitOverageRates.js +4 -4
  170. package/esm/resources/V2/Billing/RateCards/CustomPricingUnitOverageRates.js.map +1 -1
  171. package/esm/resources/V2/Billing/RateCards/Rates.d.ts +2 -2
  172. package/esm/resources/V2/Billing/RateCards/Rates.js +4 -4
  173. package/esm/resources/V2/Billing/RateCards/Rates.js.map +1 -1
  174. package/esm/resources/V2/Billing/RateCards/Versions.d.ts +1 -1
  175. package/esm/resources/V2/Billing/RateCards/Versions.js +2 -2
  176. package/esm/resources/V2/Billing/RateCards/Versions.js.map +1 -1
  177. package/esm/resources/V2/Commerce/ProductCatalog/Imports.d.ts +2 -2
  178. package/esm/resources/V2/Commerce/ProductCatalogImports.d.ts +1 -1
  179. package/esm/resources/V2/Core/Accounts/PersonTokens.d.ts +1 -1
  180. package/esm/resources/V2/Core/Accounts/PersonTokens.js +2 -2
  181. package/esm/resources/V2/Core/Accounts/PersonTokens.js.map +1 -1
  182. package/esm/resources/V2/Core/Accounts/Persons.d.ts +2 -2
  183. package/esm/resources/V2/Core/Accounts/Persons.js +4 -4
  184. package/esm/resources/V2/Core/Accounts/Persons.js.map +1 -1
  185. package/esm/resources/V2/Core/Accounts.d.ts +1 -1
  186. package/esm/resources/V2/Core/FeeBatches.d.ts +71 -6
  187. package/esm/resources/V2/Core/FeeBatches.js.map +1 -1
  188. package/esm/resources/V2/Core/FeeEntries.d.ts +28 -3
  189. package/esm/resources/V2/Core/FeeEntries.js.map +1 -1
  190. package/esm/resources/V2/Core/Vault/UsBankAccounts.d.ts +1 -0
  191. package/esm/resources/V2/Core/Vault/UsBankAccounts.js +1 -0
  192. package/esm/resources/V2/Core/Vault/UsBankAccounts.js.map +1 -1
  193. package/esm/resources/V2/MoneyManagement/FinancialAccounts/Statements.d.ts +1 -1
  194. package/esm/resources/V2/MoneyManagement/FinancialAccounts/Statements.js +2 -2
  195. package/esm/resources/V2/MoneyManagement/FinancialAccounts/Statements.js.map +1 -1
  196. package/esm/resources/V2/MoneyManagement/TransactionEntries.d.ts +6 -2
  197. package/esm/resources/V2/MoneyManagement/Transactions.d.ts +6 -2
  198. package/esm/resources/V2/Payments/SettlementAllocationIntents/Splits.d.ts +2 -2
  199. package/esm/resources/V2/Payments/SettlementAllocationIntents/Splits.js +4 -4
  200. package/esm/resources/V2/Payments/SettlementAllocationIntents/Splits.js.map +1 -1
  201. package/esm/resources.d.ts +3 -0
  202. package/esm/resources.js +3 -0
  203. package/esm/resources.js.map +1 -1
  204. package/esm/stripe.core.d.ts +12 -2
  205. package/esm/stripe.core.js +12 -1
  206. package/esm/stripe.core.js.map +1 -1
  207. package/esm/stripe.esm.node.d.ts +11 -2
  208. package/esm/stripe.esm.node.js +7 -1
  209. package/esm/stripe.esm.node.js.map +1 -1
  210. package/package.json +1 -1
@@ -1010,6 +1010,7 @@ export declare namespace Checkout {
1010
1010
  boleto?: PaymentMethodDetails.Boleto;
1011
1011
  card?: PaymentMethodDetails.Card;
1012
1012
  link?: PaymentMethodDetails.Link;
1013
+ pix?: PaymentMethodDetails.Pix;
1013
1014
  sepa_debit?: PaymentMethodDetails.SepaDebit;
1014
1015
  /**
1015
1016
  * The type of payment method the customer is attempting to pay with. An additional hash is included in the payment method details with a name matching this value. It contains additional information specific to the payment method type.
@@ -1090,6 +1091,12 @@ export declare namespace Checkout {
1090
1091
  */
1091
1092
  fingerprint?: string | null;
1092
1093
  }
1094
+ interface Pix {
1095
+ /**
1096
+ * Uniquely identifies this particular Pix account. You can use this attribute to check whether two Pix accounts are the same.
1097
+ */
1098
+ fingerprint: string | null;
1099
+ }
1093
1100
  interface SepaDebit {
1094
1101
  /**
1095
1102
  * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
@@ -1103,7 +1110,7 @@ export declare namespace Checkout {
1103
1110
  fingerprint: string | null;
1104
1111
  }
1105
1112
  namespace Card {
1106
- type Brand = 'accel' | 'amex' | 'carnet' | 'cartes_bancaires' | 'conecs' | 'diners' | 'discover' | 'eftpos_au' | 'elo' | 'girocard' | 'interac' | 'jcb' | 'link' | 'maestro' | 'mastercard' | 'nyce' | 'pulse' | 'rupay' | 'star' | 'unionpay' | 'unknown' | 'visa';
1113
+ type Brand = 'accel' | 'amex' | 'carnet' | 'cartes_bancaires' | 'conecs' | 'diners' | 'discover' | 'eftpos_au' | 'elo' | 'girocard' | 'interac' | 'jaywan' | 'jcb' | 'link' | 'maestro' | 'mastercard' | 'nyce' | 'pulse' | 'rupay' | 'star' | 'unionpay' | 'unknown' | 'visa';
1107
1114
  type Funding = 'credit' | 'debit' | 'prepaid' | 'unknown';
1108
1115
  interface Wallet {
1109
1116
  /**
@@ -1019,6 +1019,7 @@ export declare namespace ConfirmationToken {
1019
1019
  * ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.
1020
1020
  */
1021
1021
  location?: string;
1022
+ multicapture?: CardPresent.Multicapture;
1022
1023
  /**
1023
1024
  * Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
1024
1025
  */
@@ -1062,6 +1063,12 @@ export declare namespace ConfirmationToken {
1062
1063
  wallet?: CardPresent.Wallet;
1063
1064
  }
1064
1065
  namespace CardPresent {
1066
+ interface Multicapture {
1067
+ /**
1068
+ * Indicates whether or not multiple captures are supported.
1069
+ */
1070
+ status: Multicapture.Status;
1071
+ }
1065
1072
  interface Offline {
1066
1073
  /**
1067
1074
  * Time at which the payment was collected while offline
@@ -1123,6 +1130,9 @@ export declare namespace ConfirmationToken {
1123
1130
  */
1124
1131
  type: Wallet.Type;
1125
1132
  }
1133
+ namespace Multicapture {
1134
+ type Status = 'available' | 'unavailable';
1135
+ }
1126
1136
  namespace Reauthorization {
1127
1137
  type Status = 'available' | 'unavailable';
1128
1138
  }
@@ -0,0 +1,246 @@
1
+ import { StripeResource } from '../StripeResource.js';
2
+ import { GiftCard } from './GiftCards.js';
3
+ import { RequestOptions, Response } from '../lib.js';
4
+ export declare class GiftCardOperationResource extends StripeResource {
5
+ /**
6
+ * Retrieves a third-party gift card operation object.
7
+ */
8
+ retrieve(id: string, params?: GiftCardOperationRetrieveParams, options?: RequestOptions): Promise<Response<GiftCardOperation>>;
9
+ }
10
+ export interface GiftCardOperation {
11
+ /**
12
+ * Unique identifier for the object.
13
+ */
14
+ id: string;
15
+ /**
16
+ * String representing the object's type. Objects of the same type share the same value.
17
+ */
18
+ object: 'gift_card_operation';
19
+ /**
20
+ * Details about a gift card activation operation.
21
+ */
22
+ activation?: GiftCardOperation.Activation;
23
+ /**
24
+ * Details about a gift card activation void operation.
25
+ */
26
+ activation_void?: GiftCardOperation.ActivationVoid;
27
+ /**
28
+ * Details about a gift card balance check operation.
29
+ */
30
+ balance_check?: GiftCardOperation.BalanceCheck;
31
+ /**
32
+ * Details about a gift card cashout operation.
33
+ */
34
+ cashout?: GiftCardOperation.Cashout;
35
+ /**
36
+ * Details about a gift card cashout void operation.
37
+ */
38
+ cashout_void?: GiftCardOperation.CashoutVoid;
39
+ /**
40
+ * The timestamp of when this operation was completed.
41
+ */
42
+ completed_at: number;
43
+ /**
44
+ * Time at which the object was created. Measured in seconds since the Unix epoch.
45
+ */
46
+ created: number;
47
+ /**
48
+ * Details about a gift card deactivation operation.
49
+ */
50
+ deactivation?: GiftCardOperation.Deactivation;
51
+ /**
52
+ * The failure code of the operation. Only present if the status is failed.
53
+ */
54
+ failure_code: GiftCardOperation.FailureCode | null;
55
+ /**
56
+ * The gift card this operation was performed on.
57
+ */
58
+ gift_card: string | GiftCard;
59
+ /**
60
+ * If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
61
+ */
62
+ livemode: boolean;
63
+ /**
64
+ * The connected account whose credentials were used to perform this operation.
65
+ */
66
+ on_behalf_of: string | null;
67
+ /**
68
+ * Details about a gift card reload operation.
69
+ */
70
+ reload?: GiftCardOperation.Reload;
71
+ /**
72
+ * Details about a gift card reload void operation.
73
+ */
74
+ reload_void?: GiftCardOperation.ReloadVoid;
75
+ /**
76
+ * The status of the operation.
77
+ */
78
+ status: GiftCardOperation.Status;
79
+ /**
80
+ * The type of operation performed.
81
+ */
82
+ type: GiftCardOperation.Type;
83
+ }
84
+ export declare namespace GiftCardOperation {
85
+ interface Activation {
86
+ /**
87
+ * The balance amount of a gift card, including currency and amount.
88
+ */
89
+ balance: Activation.Balance;
90
+ }
91
+ interface ActivationVoid {
92
+ /**
93
+ * The operation that was voided.
94
+ */
95
+ voided_operation: string;
96
+ }
97
+ interface BalanceCheck {
98
+ /**
99
+ * The balance amount of a gift card, including currency and amount.
100
+ */
101
+ balance: BalanceCheck.Balance;
102
+ }
103
+ interface Cashout {
104
+ /**
105
+ * The balance amount of a gift card, including currency and amount.
106
+ */
107
+ balance: Cashout.Balance;
108
+ /**
109
+ * The balance before the operation.
110
+ */
111
+ previous_balance: Cashout.PreviousBalance | null;
112
+ }
113
+ interface CashoutVoid {
114
+ /**
115
+ * The balance amount of a gift card, including currency and amount.
116
+ */
117
+ balance: CashoutVoid.Balance;
118
+ /**
119
+ * The operation that was voided.
120
+ */
121
+ voided_operation: string;
122
+ }
123
+ interface Deactivation {
124
+ }
125
+ type FailureCode = 'action_not_supported' | 'card_already_activated' | 'card_expired' | 'card_not_activated' | 'do_not_honor' | 'generic_failure' | 'insufficient_balance' | 'invalid_amount' | 'invalid_currency' | 'invalid_number' | 'invalid_pin' | 'invalid_track_data' | 'lost_card' | 'lost_or_stolen_card' | 'pin_required' | 'pin_tries_exceeded' | 'processing_error' | 'provider_unavailable' | 'stolen_card' | 'suspected_fraud' | 'timeout';
126
+ interface Reload {
127
+ /**
128
+ * The balance amount of a gift card, including currency and amount.
129
+ */
130
+ balance: Reload.Balance;
131
+ /**
132
+ * The balance before the operation.
133
+ */
134
+ previous_balance: Reload.PreviousBalance | null;
135
+ }
136
+ interface ReloadVoid {
137
+ /**
138
+ * The balance amount of a gift card, including currency and amount.
139
+ */
140
+ balance: ReloadVoid.Balance;
141
+ /**
142
+ * The operation that was voided.
143
+ */
144
+ voided_operation: string;
145
+ }
146
+ type Status = 'failed' | 'succeeded';
147
+ type Type = 'activation' | 'activation_void' | 'balance_check' | 'cashout' | 'cashout_void' | 'deactivation' | 'reload' | 'reload_void';
148
+ namespace Activation {
149
+ interface Balance {
150
+ /**
151
+ * The balance amount.
152
+ */
153
+ amount: number;
154
+ /**
155
+ * The currency of the balance.
156
+ */
157
+ currency: string;
158
+ }
159
+ }
160
+ namespace BalanceCheck {
161
+ interface Balance {
162
+ /**
163
+ * The balance amount.
164
+ */
165
+ amount: number;
166
+ /**
167
+ * The currency of the balance.
168
+ */
169
+ currency: string;
170
+ }
171
+ }
172
+ namespace Cashout {
173
+ interface Balance {
174
+ /**
175
+ * The balance amount.
176
+ */
177
+ amount: number;
178
+ /**
179
+ * The currency of the balance.
180
+ */
181
+ currency: string;
182
+ }
183
+ interface PreviousBalance {
184
+ /**
185
+ * The balance amount.
186
+ */
187
+ amount: number;
188
+ /**
189
+ * The currency of the balance.
190
+ */
191
+ currency: string;
192
+ }
193
+ }
194
+ namespace CashoutVoid {
195
+ interface Balance {
196
+ /**
197
+ * The balance amount.
198
+ */
199
+ amount: number;
200
+ /**
201
+ * The currency of the balance.
202
+ */
203
+ currency: string;
204
+ }
205
+ }
206
+ namespace Reload {
207
+ interface Balance {
208
+ /**
209
+ * The balance amount.
210
+ */
211
+ amount: number;
212
+ /**
213
+ * The currency of the balance.
214
+ */
215
+ currency: string;
216
+ }
217
+ interface PreviousBalance {
218
+ /**
219
+ * The balance amount.
220
+ */
221
+ amount: number;
222
+ /**
223
+ * The currency of the balance.
224
+ */
225
+ currency: string;
226
+ }
227
+ }
228
+ namespace ReloadVoid {
229
+ interface Balance {
230
+ /**
231
+ * The balance amount.
232
+ */
233
+ amount: number;
234
+ /**
235
+ * The currency of the balance.
236
+ */
237
+ currency: string;
238
+ }
239
+ }
240
+ }
241
+ export interface GiftCardOperationRetrieveParams {
242
+ /**
243
+ * Specifies which fields in the response should be expanded.
244
+ */
245
+ expand?: Array<string>;
246
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.GiftCardOperationResource = void 0;
5
+ const StripeResource_js_1 = require("../StripeResource.js");
6
+ class GiftCardOperationResource extends StripeResource_js_1.StripeResource {
7
+ /**
8
+ * Retrieves a third-party gift card operation object.
9
+ */
10
+ retrieve(id, params, options) {
11
+ return this._makeRequest('GET', `/v1/gift_card_operations/${id}`, params, options);
12
+ }
13
+ }
14
+ exports.GiftCardOperationResource = GiftCardOperationResource;
15
+ //# sourceMappingURL=GiftCardOperations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GiftCardOperations.js","sourceRoot":"","sources":["../../src/resources/GiftCardOperations.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAEvC,4DAAoD;AAIpD,MAAa,yBAA0B,SAAQ,kCAAc;IAC3D;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,4BAA4B,EAAE,EAAE,EAChC,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF;AAhBD,8DAgBC"}
@@ -0,0 +1,183 @@
1
+ import { StripeResource } from '../StripeResource.js';
2
+ import { GiftCardOperation } from './GiftCardOperations.js';
3
+ import { RequestOptions, Response } from '../lib.js';
4
+ export declare class GiftCardResource extends StripeResource {
5
+ /**
6
+ * Retrieves a third-party gift card object.
7
+ */
8
+ retrieve(id: string, params?: GiftCardRetrieveParams, options?: RequestOptions): Promise<Response<GiftCard>>;
9
+ /**
10
+ * Creates a gift card object.
11
+ */
12
+ create(params: GiftCardCreateParams, options?: RequestOptions): Promise<Response<GiftCard>>;
13
+ /**
14
+ * Activates a third-party gift card and optionally sets its balance.
15
+ */
16
+ activate(id: string, params?: GiftCardActivateParams, options?: RequestOptions): Promise<Response<GiftCardOperation>>;
17
+ /**
18
+ * Cashout a third-party gift card by zeroing its balance.
19
+ */
20
+ cashout(id: string, params?: GiftCardCashoutParams, options?: RequestOptions): Promise<Response<GiftCardOperation>>;
21
+ /**
22
+ * Checks the balance of a third-party gift card.
23
+ */
24
+ checkBalance(id: string, params?: GiftCardCheckBalanceParams, options?: RequestOptions): Promise<Response<GiftCardOperation>>;
25
+ /**
26
+ * Reloads a third-party gift card by adding the specified amount to its balance.
27
+ */
28
+ reload(id: string, params: GiftCardReloadParams, options?: RequestOptions): Promise<Response<GiftCardOperation>>;
29
+ /**
30
+ * Voids a previously performed gift card operation.
31
+ */
32
+ voidOperation(id: string, params: GiftCardVoidOperationParams, options?: RequestOptions): Promise<Response<GiftCardOperation>>;
33
+ }
34
+ export interface GiftCard {
35
+ /**
36
+ * Unique identifier for the object.
37
+ */
38
+ id: string;
39
+ /**
40
+ * String representing the object's type. Objects of the same type share the same value.
41
+ */
42
+ object: 'gift_card';
43
+ /**
44
+ * The brand of the gift card.
45
+ */
46
+ brand: GiftCard.Brand;
47
+ /**
48
+ * The expiration month of the gift card.
49
+ */
50
+ exp_month: number | null;
51
+ /**
52
+ * The expiration year of the gift card.
53
+ */
54
+ exp_year: number | null;
55
+ /**
56
+ * The last operation performed on this gift card.
57
+ */
58
+ last_operation: string | GiftCardOperation | null;
59
+ /**
60
+ * The last four digits of the gift card number.
61
+ */
62
+ last4: string | null;
63
+ /**
64
+ * If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
65
+ */
66
+ livemode: boolean;
67
+ }
68
+ export declare namespace GiftCard {
69
+ type Brand = 'fiserv_valuelink' | 'givex' | 'svs';
70
+ }
71
+ export interface GiftCardCreateParams {
72
+ /**
73
+ * The brand of the gift card.
74
+ */
75
+ brand: GiftCardCreateParams.Brand;
76
+ /**
77
+ * Two-digit number representing the gift card's expiration month.
78
+ */
79
+ exp_month?: number;
80
+ /**
81
+ * Four-digit number representing the gift card's expiration year.
82
+ */
83
+ exp_year?: number;
84
+ /**
85
+ * Specifies which fields in the response should be expanded.
86
+ */
87
+ expand?: Array<string>;
88
+ /**
89
+ * The gift card number.
90
+ */
91
+ number?: string;
92
+ /**
93
+ * The gift card PIN.
94
+ */
95
+ pin?: string;
96
+ }
97
+ export declare namespace GiftCardCreateParams {
98
+ type Brand = 'fiserv_valuelink' | 'givex' | 'svs';
99
+ }
100
+ export interface GiftCardRetrieveParams {
101
+ /**
102
+ * Specifies which fields in the response should be expanded.
103
+ */
104
+ expand?: Array<string>;
105
+ }
106
+ export interface GiftCardActivateParams {
107
+ /**
108
+ * The initial balance to set on the gift card.
109
+ */
110
+ balance?: GiftCardActivateParams.Balance;
111
+ /**
112
+ * Specifies which fields in the response should be expanded.
113
+ */
114
+ expand?: Array<string>;
115
+ /**
116
+ * The Stripe account ID to process the gift card operation on behalf of.
117
+ */
118
+ on_behalf_of?: string;
119
+ }
120
+ export declare namespace GiftCardActivateParams {
121
+ interface Balance {
122
+ /**
123
+ * The initial balance amount to be loaded when activating the gift card, in the smallest currency unit
124
+ */
125
+ amount: number;
126
+ /**
127
+ * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
128
+ */
129
+ currency: string;
130
+ }
131
+ }
132
+ export interface GiftCardCashoutParams {
133
+ /**
134
+ * Specifies which fields in the response should be expanded.
135
+ */
136
+ expand?: Array<string>;
137
+ /**
138
+ * The Stripe account ID to process the gift card operation on behalf of.
139
+ */
140
+ on_behalf_of?: string;
141
+ }
142
+ export interface GiftCardCheckBalanceParams {
143
+ /**
144
+ * Specifies which fields in the response should be expanded.
145
+ */
146
+ expand?: Array<string>;
147
+ /**
148
+ * The Stripe account ID to process the gift card operation on behalf of.
149
+ */
150
+ on_behalf_of?: string;
151
+ }
152
+ export interface GiftCardReloadParams {
153
+ /**
154
+ * The amount to add to the gift card balance, in the smallest currency unit.
155
+ */
156
+ amount: number;
157
+ /**
158
+ * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
159
+ */
160
+ currency: string;
161
+ /**
162
+ * Specifies which fields in the response should be expanded.
163
+ */
164
+ expand?: Array<string>;
165
+ /**
166
+ * The Stripe account ID to process the gift card operation on behalf of.
167
+ */
168
+ on_behalf_of?: string;
169
+ }
170
+ export interface GiftCardVoidOperationParams {
171
+ /**
172
+ * The ID of the gift card operation to void.
173
+ */
174
+ operation: string;
175
+ /**
176
+ * Specifies which fields in the response should be expanded.
177
+ */
178
+ expand?: Array<string>;
179
+ /**
180
+ * The Stripe account ID to process the gift card operation on behalf of.
181
+ */
182
+ on_behalf_of?: string;
183
+ }
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.GiftCardResource = void 0;
5
+ const StripeResource_js_1 = require("../StripeResource.js");
6
+ class GiftCardResource extends StripeResource_js_1.StripeResource {
7
+ /**
8
+ * Retrieves a third-party gift card object.
9
+ */
10
+ retrieve(id, params, options) {
11
+ return this._makeRequest('GET', `/v1/gift_cards/${id}`, params, options);
12
+ }
13
+ /**
14
+ * Creates a gift card object.
15
+ */
16
+ create(params, options) {
17
+ return this._makeRequest('POST', '/v1/gift_cards', params, options);
18
+ }
19
+ /**
20
+ * Activates a third-party gift card and optionally sets its balance.
21
+ */
22
+ activate(id, params, options) {
23
+ return this._makeRequest('POST', `/v1/gift_cards/${id}/activate`, params, options);
24
+ }
25
+ /**
26
+ * Cashout a third-party gift card by zeroing its balance.
27
+ */
28
+ cashout(id, params, options) {
29
+ return this._makeRequest('POST', `/v1/gift_cards/${id}/cashout`, params, options);
30
+ }
31
+ /**
32
+ * Checks the balance of a third-party gift card.
33
+ */
34
+ checkBalance(id, params, options) {
35
+ return this._makeRequest('POST', `/v1/gift_cards/${id}/check_balance`, params, options);
36
+ }
37
+ /**
38
+ * Reloads a third-party gift card by adding the specified amount to its balance.
39
+ */
40
+ reload(id, params, options) {
41
+ return this._makeRequest('POST', `/v1/gift_cards/${id}/reload`, params, options);
42
+ }
43
+ /**
44
+ * Voids a previously performed gift card operation.
45
+ */
46
+ voidOperation(id, params, options) {
47
+ return this._makeRequest('POST', `/v1/gift_cards/${id}/void_operation`, params, options);
48
+ }
49
+ }
50
+ exports.GiftCardResource = GiftCardResource;
51
+ //# sourceMappingURL=GiftCards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GiftCards.js","sourceRoot":"","sources":["../../src/resources/GiftCards.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAEvC,4DAAoD;AAIpD,MAAa,gBAAiB,SAAQ,kCAAc;IAClD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,kBAAkB,EAAE,EAAE,EACtB,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,MAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAQ,CAAC;IAC7E,CAAC;IACD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,kBAAkB,EAAE,WAAW,EAC/B,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,OAAO,CACL,EAAU,EACV,MAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,kBAAkB,EAAE,UAAU,EAC9B,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,YAAY,CACV,EAAU,EACV,MAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,kBAAkB,EAAE,gBAAgB,EACpC,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,MAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,kBAAkB,EAAE,SAAS,EAC7B,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,aAAa,CACX,EAAU,EACV,MAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,kBAAkB,EAAE,iBAAiB,EACrC,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF;AApGD,4CAoGC"}
@@ -742,7 +742,7 @@ export declare namespace Issuing {
742
742
  */
743
743
  card_reference_id?: string;
744
744
  /**
745
- * Stripe's recommendation to the network for this token activation request, derived from the same risk signals used for the activation decision.
745
+ * The network's recommendation to Stripe for this token activation request.
746
746
  */
747
747
  token_decision_recommendation?: Visa.TokenDecisionRecommendation | null;
748
748
  /**
@@ -72,6 +72,10 @@ export interface Dispute {
72
72
  * Incoming information from the card network for this dispute. Includes the acquiring merchant's initial response, pre-arbitration submission, and pre-arbitration response to the dispute.
73
73
  */
74
74
  network_lifecycle?: Issuing.Dispute.NetworkLifecycle | null;
75
+ /**
76
+ * Provisional credit details for this dispute.
77
+ */
78
+ provisional_credit?: Issuing.Dispute.ProvisionalCredit | null;
75
79
  /**
76
80
  * Current status of the dispute.
77
81
  */
@@ -130,6 +134,28 @@ export declare namespace Issuing {
130
134
  */
131
135
  pre_arbitration_submission: NetworkLifecycle.PreArbitrationSubmission | null;
132
136
  }
137
+ interface ProvisionalCredit {
138
+ /**
139
+ * The time by which the platform must grant a provisional credit to the consumer.
140
+ */
141
+ grant_deadline: number | null;
142
+ /**
143
+ * The time at which the platform reported granting the provisional credit.
144
+ */
145
+ granted_at: number | null;
146
+ /**
147
+ * The earliest time after which the platform can revoke the provisional credit.
148
+ */
149
+ revocable_after: number | null;
150
+ /**
151
+ * The time at which the platform reported revoking the provisional credit.
152
+ */
153
+ revoked_at: number | null;
154
+ /**
155
+ * The status of the provisional credit obligation.
156
+ */
157
+ status: ProvisionalCredit.Status;
158
+ }
133
159
  type Status = 'expired' | 'lost' | 'submitted' | 'unsubmitted' | 'won';
134
160
  interface Treasury {
135
161
  /**
@@ -487,6 +513,9 @@ export declare namespace Issuing {
487
513
  merchant_evidence_files: Array<string> | null;
488
514
  }
489
515
  }
516
+ namespace ProvisionalCredit {
517
+ type Status = 'delinquent' | 'granted' | 'not_required' | 'permanent' | 'required' | 'revocable' | 'revocation_notice_period' | 'revoked';
518
+ }
490
519
  }
491
520
  }
492
521
  export declare namespace Issuing {
@@ -781,6 +810,10 @@ export declare namespace Issuing {
781
810
  * Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
782
811
  */
783
812
  metadata?: Emptyable<MetadataParam>;
813
+ /**
814
+ * Provisional credit information for this dispute.
815
+ */
816
+ provisional_credit?: DisputeUpdateParams.ProvisionalCredit;
784
817
  }
785
818
  namespace DisputeUpdateParams {
786
819
  interface Evidence {
@@ -821,6 +854,16 @@ export declare namespace Issuing {
821
854
  */
822
855
  service_not_as_described?: Emptyable<Evidence.ServiceNotAsDescribed>;
823
856
  }
857
+ interface ProvisionalCredit {
858
+ /**
859
+ * The time at which the platform granted the provisional credit to their user.
860
+ */
861
+ granted_at?: number;
862
+ /**
863
+ * The time at which the platform revoked the provisional credit from their user.
864
+ */
865
+ revoked_at?: number;
866
+ }
824
867
  namespace Evidence {
825
868
  interface Canceled {
826
869
  /**
@@ -144,7 +144,7 @@ export declare namespace Issuing {
144
144
  */
145
145
  card_reference_id: string | null;
146
146
  /**
147
- * Stripe's recommendation to the network for this token activation request, derived from the same risk signals used for the activation decision.
147
+ * The network's recommendation to Stripe for this token activation request.
148
148
  */
149
149
  token_decision_recommendation?: Visa.TokenDecisionRecommendation | null;
150
150
  /**