stripe 2.0.3 → 5.55.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (214) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +1036 -0
  3. data/CODE_OF_CONDUCT.md +77 -0
  4. data/Gemfile +24 -23
  5. data/History.txt +1 -593
  6. data/Makefile +7 -0
  7. data/README.md +252 -53
  8. data/Rakefile +18 -24
  9. data/VERSION +1 -1
  10. data/bin/stripe-console +5 -3
  11. data/lib/stripe/api_operations/create.rb +4 -2
  12. data/lib/stripe/api_operations/delete.rb +31 -3
  13. data/lib/stripe/api_operations/list.rb +4 -13
  14. data/lib/stripe/api_operations/nested_resource.rb +73 -0
  15. data/lib/stripe/api_operations/request.rb +92 -10
  16. data/lib/stripe/api_operations/save.rb +25 -13
  17. data/lib/stripe/api_operations/search.rb +19 -0
  18. data/lib/stripe/api_resource.rb +55 -11
  19. data/lib/stripe/api_resource_test_helpers.rb +47 -0
  20. data/lib/stripe/connection_manager.rb +200 -0
  21. data/lib/stripe/error_object.rb +93 -0
  22. data/lib/stripe/errors.rb +98 -13
  23. data/lib/stripe/instrumentation.rb +84 -0
  24. data/lib/stripe/list_object.rb +55 -21
  25. data/lib/stripe/multipart_encoder.rb +131 -0
  26. data/lib/stripe/oauth.rb +65 -0
  27. data/lib/stripe/object_types.rb +119 -0
  28. data/lib/stripe/{account.rb → resources/account.rb} +75 -38
  29. data/lib/stripe/resources/account_link.rb +10 -0
  30. data/lib/stripe/resources/alipay_account.rb +34 -0
  31. data/lib/stripe/{apple_pay_domain.rb → resources/apple_pay_domain.rb} +6 -1
  32. data/lib/stripe/resources/application_fee.rb +14 -0
  33. data/lib/stripe/resources/application_fee_refund.rb +31 -0
  34. data/lib/stripe/resources/balance.rb +8 -0
  35. data/lib/stripe/resources/balance_transaction.rb +10 -0
  36. data/lib/stripe/resources/bank_account.rb +43 -0
  37. data/lib/stripe/resources/billing_portal/configuration.rb +14 -0
  38. data/lib/stripe/resources/billing_portal/session.rb +12 -0
  39. data/lib/stripe/{bitcoin_receiver.rb → resources/bitcoin_receiver.rb} +8 -4
  40. data/lib/stripe/resources/bitcoin_transaction.rb +16 -0
  41. data/lib/stripe/resources/capability.rb +34 -0
  42. data/lib/stripe/resources/card.rb +38 -0
  43. data/lib/stripe/resources/cash_balance.rb +22 -0
  44. data/lib/stripe/resources/charge.rb +32 -0
  45. data/lib/stripe/resources/checkout/session.rb +27 -0
  46. data/lib/stripe/resources/country_spec.rb +10 -0
  47. data/lib/stripe/{coupon.rb → resources/coupon.rb} +6 -1
  48. data/lib/stripe/resources/credit_note.rb +33 -0
  49. data/lib/stripe/resources/credit_note_line_item.rb +8 -0
  50. data/lib/stripe/resources/customer.rb +74 -0
  51. data/lib/stripe/resources/customer_balance_transaction.rb +31 -0
  52. data/lib/stripe/resources/discount.rb +8 -0
  53. data/lib/stripe/resources/dispute.rb +22 -0
  54. data/lib/stripe/resources/ephemeral_key.rb +20 -0
  55. data/lib/stripe/resources/event.rb +10 -0
  56. data/lib/stripe/resources/exchange_rate.rb +10 -0
  57. data/lib/stripe/resources/file.rb +36 -0
  58. data/lib/stripe/resources/file_link.rb +12 -0
  59. data/lib/stripe/resources/financial_connections/account.rb +31 -0
  60. data/lib/stripe/resources/financial_connections/account_owner.rb +10 -0
  61. data/lib/stripe/resources/financial_connections/account_ownership.rb +10 -0
  62. data/lib/stripe/resources/financial_connections/session.rb +12 -0
  63. data/lib/stripe/resources/funding_instructions.rb +16 -0
  64. data/lib/stripe/resources/identity/verification_report.rb +12 -0
  65. data/lib/stripe/resources/identity/verification_session.rb +35 -0
  66. data/lib/stripe/resources/invoice.rb +83 -0
  67. data/lib/stripe/{invoice_item.rb → resources/invoice_item.rb} +6 -1
  68. data/lib/stripe/resources/invoice_line_item.rb +8 -0
  69. data/lib/stripe/resources/issuing/authorization.rb +34 -0
  70. data/lib/stripe/resources/issuing/card.rb +25 -0
  71. data/lib/stripe/resources/issuing/card_details.rb +10 -0
  72. data/lib/stripe/resources/issuing/cardholder.rb +14 -0
  73. data/lib/stripe/resources/issuing/dispute.rb +25 -0
  74. data/lib/stripe/resources/issuing/transaction.rb +13 -0
  75. data/lib/stripe/resources/line_item.rb +8 -0
  76. data/lib/stripe/resources/login_link.rb +15 -0
  77. data/lib/stripe/resources/mandate.rb +8 -0
  78. data/lib/stripe/resources/order.rb +33 -0
  79. data/lib/stripe/resources/order_return.rb +10 -0
  80. data/lib/stripe/resources/payment_intent.rb +82 -0
  81. data/lib/stripe/resources/payment_link.rb +23 -0
  82. data/lib/stripe/resources/payment_method.rb +33 -0
  83. data/lib/stripe/resources/payout.rb +33 -0
  84. data/lib/stripe/resources/person.rb +32 -0
  85. data/lib/stripe/{plan.rb → resources/plan.rb} +5 -0
  86. data/lib/stripe/resources/price.rb +21 -0
  87. data/lib/stripe/resources/product.rb +22 -0
  88. data/lib/stripe/resources/promotion_code.rb +12 -0
  89. data/lib/stripe/resources/quote.rb +105 -0
  90. data/lib/stripe/resources/radar/early_fraud_warning.rb +12 -0
  91. data/lib/stripe/resources/radar/value_list.rb +15 -0
  92. data/lib/stripe/resources/radar/value_list_item.rb +14 -0
  93. data/lib/stripe/resources/recipient.rb +14 -0
  94. data/lib/stripe/resources/recipient_transfer.rb +7 -0
  95. data/lib/stripe/resources/refund.rb +42 -0
  96. data/lib/stripe/resources/reporting/report_run.rb +13 -0
  97. data/lib/stripe/resources/reporting/report_type.rb +13 -0
  98. data/lib/stripe/resources/reversal.rb +30 -0
  99. data/lib/stripe/resources/review.rb +21 -0
  100. data/lib/stripe/resources/setup_attempt.rb +10 -0
  101. data/lib/stripe/resources/setup_intent.rb +43 -0
  102. data/lib/stripe/resources/shipping_rate.rb +12 -0
  103. data/lib/stripe/resources/sigma/scheduled_query_run.rb +16 -0
  104. data/lib/stripe/{sku.rb → resources/sku.rb} +7 -2
  105. data/lib/stripe/resources/source.rb +47 -0
  106. data/lib/stripe/resources/source_transaction.rb +8 -0
  107. data/lib/stripe/resources/subscription.rb +35 -0
  108. data/lib/stripe/resources/subscription_item.rb +26 -0
  109. data/lib/stripe/resources/subscription_schedule.rb +33 -0
  110. data/lib/stripe/resources/tax_code.rb +10 -0
  111. data/lib/stripe/resources/tax_id.rb +27 -0
  112. data/lib/stripe/{product.rb → resources/tax_rate.rb} +7 -3
  113. data/lib/stripe/resources/terminal/configuration.rb +15 -0
  114. data/lib/stripe/resources/terminal/connection_token.rb +12 -0
  115. data/lib/stripe/resources/terminal/location.rb +15 -0
  116. data/lib/stripe/resources/terminal/reader.rb +75 -0
  117. data/lib/stripe/resources/test_helpers/test_clock.rb +25 -0
  118. data/lib/stripe/{three_d_secure.rb → resources/three_d_secure.rb} +5 -0
  119. data/lib/stripe/resources/token.rb +10 -0
  120. data/lib/stripe/resources/topup.rb +23 -0
  121. data/lib/stripe/resources/transfer.rb +27 -0
  122. data/lib/stripe/resources/usage_record.rb +8 -0
  123. data/lib/stripe/resources/usage_record_summary.rb +8 -0
  124. data/lib/stripe/{recipient.rb → resources/webhook_endpoint.rb} +6 -5
  125. data/lib/stripe/resources.rb +100 -0
  126. data/lib/stripe/search_result_object.rb +86 -0
  127. data/lib/stripe/singleton_api_resource.rb +10 -4
  128. data/lib/stripe/stripe_client.rb +886 -223
  129. data/lib/stripe/stripe_configuration.rb +194 -0
  130. data/lib/stripe/stripe_object.rb +301 -132
  131. data/lib/stripe/stripe_response.rb +89 -27
  132. data/lib/stripe/util.rb +272 -122
  133. data/lib/stripe/version.rb +3 -1
  134. data/lib/stripe/webhook.rb +121 -0
  135. data/lib/stripe.rb +94 -116
  136. data/stripe.gemspec +35 -16
  137. metadata +127 -156
  138. data/.gitattributes +0 -4
  139. data/.github/ISSUE_TEMPLATE.md +0 -5
  140. data/.gitignore +0 -5
  141. data/.travis.yml +0 -15
  142. data/lib/stripe/alipay_account.rb +0 -20
  143. data/lib/stripe/application_fee.rb +0 -20
  144. data/lib/stripe/application_fee_refund.rb +0 -18
  145. data/lib/stripe/balance.rb +0 -4
  146. data/lib/stripe/balance_transaction.rb +0 -9
  147. data/lib/stripe/bank_account.rb +0 -28
  148. data/lib/stripe/bitcoin_transaction.rb +0 -9
  149. data/lib/stripe/card.rb +0 -25
  150. data/lib/stripe/charge.rb +0 -80
  151. data/lib/stripe/country_spec.rb +0 -9
  152. data/lib/stripe/customer.rb +0 -77
  153. data/lib/stripe/dispute.rb +0 -15
  154. data/lib/stripe/event.rb +0 -5
  155. data/lib/stripe/file_upload.rb +0 -31
  156. data/lib/stripe/invoice.rb +0 -27
  157. data/lib/stripe/order.rb +0 -27
  158. data/lib/stripe/order_return.rb +0 -9
  159. data/lib/stripe/refund.rb +0 -7
  160. data/lib/stripe/reversal.rb +0 -18
  161. data/lib/stripe/source.rb +0 -11
  162. data/lib/stripe/subscription.rb +0 -31
  163. data/lib/stripe/subscription_item.rb +0 -12
  164. data/lib/stripe/token.rb +0 -5
  165. data/lib/stripe/transfer.rb +0 -16
  166. data/openapi/fixtures.json +0 -1383
  167. data/openapi/fixtures.yaml +0 -1130
  168. data/openapi/spec.json +0 -19749
  169. data/openapi/spec.yaml +0 -15359
  170. data/test/api_fixtures.rb +0 -29
  171. data/test/api_stub_helpers.rb +0 -125
  172. data/test/stripe/account_test.rb +0 -204
  173. data/test/stripe/alipay_account_test.rb +0 -19
  174. data/test/stripe/api_operations_test.rb +0 -31
  175. data/test/stripe/api_resource_test.rb +0 -496
  176. data/test/stripe/apple_pay_domain_test.rb +0 -33
  177. data/test/stripe/application_fee_refund_test.rb +0 -38
  178. data/test/stripe/application_fee_test.rb +0 -14
  179. data/test/stripe/balance_test.rb +0 -11
  180. data/test/stripe/bank_account_test.rb +0 -41
  181. data/test/stripe/bitcoin_receiver_test.rb +0 -70
  182. data/test/stripe/bitcoin_transaction_test.rb +0 -21
  183. data/test/stripe/charge_test.rb +0 -59
  184. data/test/stripe/country_spec_test.rb +0 -20
  185. data/test/stripe/coupon_test.rb +0 -44
  186. data/test/stripe/customer_card_test.rb +0 -42
  187. data/test/stripe/customer_test.rb +0 -116
  188. data/test/stripe/dispute_test.rb +0 -42
  189. data/test/stripe/errors_test.rb +0 -18
  190. data/test/stripe/file_upload_test.rb +0 -66
  191. data/test/stripe/invoice_item_test.rb +0 -55
  192. data/test/stripe/invoice_test.rb +0 -66
  193. data/test/stripe/list_object_test.rb +0 -170
  194. data/test/stripe/order_return_test.rb +0 -21
  195. data/test/stripe/order_test.rb +0 -59
  196. data/test/stripe/plan_test.rb +0 -52
  197. data/test/stripe/product_test.rb +0 -47
  198. data/test/stripe/recipient_card_test.rb +0 -40
  199. data/test/stripe/recipient_test.rb +0 -50
  200. data/test/stripe/refund_test.rb +0 -39
  201. data/test/stripe/reversal_test.rb +0 -43
  202. data/test/stripe/sku_test.rb +0 -50
  203. data/test/stripe/source_test.rb +0 -43
  204. data/test/stripe/stripe_client_test.rb +0 -440
  205. data/test/stripe/stripe_object_test.rb +0 -361
  206. data/test/stripe/stripe_response_test.rb +0 -46
  207. data/test/stripe/subscription_item_test.rb +0 -54
  208. data/test/stripe/subscription_test.rb +0 -60
  209. data/test/stripe/three_d_secure_test.rb +0 -23
  210. data/test/stripe/transfer_test.rb +0 -50
  211. data/test/stripe/util_test.rb +0 -149
  212. data/test/stripe_test.rb +0 -41
  213. data/test/test_data.rb +0 -59
  214. data/test/test_helper.rb +0 -41
@@ -1,1130 +0,0 @@
1
- ---
2
- account:
3
- active_payment_methods: []
4
- bank_accounts: {}
5
- business_logo: ''
6
- business_name: ''
7
- business_primary_color: ''
8
- business_url: ''
9
- charges_enabled: false
10
- country: US
11
- debit_negative_balances: true
12
- decline_charge_on:
13
- avs_failure: false
14
- cvc_failure: false
15
- default_currency: usd
16
- details_submitted: false
17
- display_name: ''
18
- email: foo+ujebwko0fp@example.com
19
- external_accounts:
20
- data: []
21
- has_more: false
22
- object: list
23
- total_count: 0
24
- url: "/v1/accounts/acct_19xOmSA6KsQaPpsx/external_accounts"
25
- fake_account: false
26
- id: acct_19xOmSA6KsQaPpsx
27
- legal_entity:
28
- additional_owners:
29
- address:
30
- city:
31
- country: US
32
- line1:
33
- line2:
34
- postal_code:
35
- state:
36
- business_name:
37
- business_name_kana:
38
- business_name_kanji:
39
- business_tax_id_provided: false
40
- business_vat_id_provided: false
41
- dob:
42
- day:
43
- month:
44
- year:
45
- first_name:
46
- first_name_kana:
47
- first_name_kanji:
48
- gender:
49
- last_name:
50
- last_name_kana:
51
- last_name_kanji:
52
- maiden_name:
53
- personal_address:
54
- city:
55
- country: US
56
- line1:
57
- line2:
58
- postal_code:
59
- state:
60
- personal_id_number_provided: false
61
- phone_number:
62
- ssn_last_4_provided: false
63
- type:
64
- verification:
65
- details:
66
- details_code:
67
- document:
68
- status: unverified
69
- light: false
70
- managed: true
71
- mcc: ''
72
- metadata: {}
73
- object: account
74
- orders: {}
75
- product_description: ''
76
- risk_details: {}
77
- statement_descriptor: ''
78
- support_address: {}
79
- support_email: ''
80
- support_phone: ''
81
- support_url: ''
82
- timezone: Etc/UTC
83
- tos_acceptance:
84
- date:
85
- ip:
86
- user_agent:
87
- transfer_schedule:
88
- delay_days: 7
89
- interval: daily
90
- transfer_statement_descriptor: ''
91
- transfers_enabled: false
92
- verification:
93
- disabled_reason: fields_needed
94
- due_by:
95
- fields_needed:
96
- - business_url
97
- - external_account
98
- - product_description
99
- - support_phone
100
- - tos_acceptance.date
101
- - tos_acceptance.ip
102
- account_with_keys:
103
- active_payment_methods: []
104
- bank_accounts: {}
105
- business_logo: ''
106
- business_name: ''
107
- business_primary_color: ''
108
- business_url: ''
109
- charges_enabled: false
110
- country: US
111
- debit_negative_balances: false
112
- decline_charge_on: {}
113
- default_currency: usd
114
- details_submitted: false
115
- display_name: ''
116
- email: foo+ujebwko0fp@example.com
117
- external_accounts: {}
118
- fake_account: false
119
- id: acct_19xOmSA6KsQaPpsx
120
- keys: {}
121
- legal_entity: {}
122
- light: false
123
- managed: false
124
- mcc: ''
125
- metadata: {}
126
- object: account
127
- orders: {}
128
- product_description: ''
129
- risk_details: {}
130
- statement_descriptor: ''
131
- support_address: {}
132
- support_email: ''
133
- support_phone: ''
134
- support_url: ''
135
- timezone: Etc/UTC
136
- tos_acceptance: {}
137
- transfer_schedule: {}
138
- transfer_statement_descriptor: ''
139
- transfers_enabled: false
140
- verification: {}
141
- alipay_account:
142
- created: 1234567890
143
- customer: ''
144
- fingerprint: NmrPSTwAXOffguOu
145
- id: aliacc_19xOmZA6KsQaPpsx8SQGAn0E
146
- livemode: false
147
- metadata: {}
148
- object: alipay_account
149
- payment_amount: 1000
150
- payment_currency: usd
151
- reusable: false
152
- used: false
153
- username: test@example.com
154
- apple_pay_domain:
155
- created: 1234567890
156
- domain_name: example.com
157
- id: apwc_19xOmYA6KsQaPpsxDX3zqwLL
158
- livemode: true
159
- object: apple_pay_domain
160
- balance:
161
- available:
162
- - amount: 0
163
- currency: usd
164
- source_types:
165
- card: 0
166
- connect_reserved: []
167
- livemode: false
168
- object: balance
169
- pending:
170
- - amount: 0
171
- currency: usd
172
- source_types:
173
- card: 0
174
- balance_transaction:
175
- amount: 100
176
- automatic_transfer: {}
177
- available_on: 1234567890
178
- created: 1234567890
179
- currency: usd
180
- description: ''
181
- fee: 0
182
- fee_details: []
183
- id: txn_19xOmYA6KsQaPpsxgSCbKQ3d
184
- net: 100
185
- object: balance_transaction
186
- source: ch_19xOmYA6KsQaPpsxRpMRzREK
187
- sourced_transfers: {}
188
- status: pending
189
- type: charge
190
- bank_account:
191
- account: acct_19xOmSA6KsQaPpsx
192
- account_holder_name: Jane Austen
193
- account_holder_type: individual
194
- address_city: ''
195
- address_line1: ''
196
- address_line2: ''
197
- address_state: ''
198
- address_zip: ''
199
- allows_debits: false
200
- bank_name: STRIPE TEST BANK
201
- bank_phone_number: ''
202
- country: US
203
- currency: usd
204
- customer: ''
205
- customer_reference: ''
206
- default_for_currency: false
207
- fingerprint: rhUqyC2EcjMewT6o
208
- id: ba_19xOmZA6KsQaPpsx7DTyLvtT
209
- last4: '6789'
210
- metadata: {}
211
- object: bank_account
212
- reusable: false
213
- routing_number: '110000000'
214
- status: new
215
- used: false
216
- bitcoin_receiver:
217
- active: false
218
- amount: 100
219
- amount_received: 0
220
- bitcoin_amount: 1757908
221
- bitcoin_amount_received: 0
222
- bitcoin_uri: bitcoin:test_7i9Fo4b5wXcUAuoVBFrc7nc9HDxD1?amount=0.01757908
223
- created: 1234567890
224
- currency: usd
225
- customer: ''
226
- description: Receiver for John Doe
227
- email: test@example.com
228
- filled: false
229
- id: btcrcv_19xOmZA6KsQaPpsx8TtHgMVX
230
- inbound_address: test_7i9Fo4b5wXcUAuoVBFrc7nc9HDxD1
231
- livemode: false
232
- metadata: {}
233
- object: bitcoin_receiver
234
- payment: ''
235
- refund_address: ''
236
- transactions: {}
237
- uncaptured_funds: false
238
- used_for_payment: false
239
- bitcoin_transaction:
240
- amount: 100
241
- bitcoin_amount: 1757908
242
- created: 1234567890
243
- currency: usd
244
- id: btctxn_19xOmZA6KsQaPpsx5FnHoZis
245
- object: bitcoin_transaction
246
- receiver: btcrcv_19xOmZB4YnRyKoofPMbLFiZa
247
- card:
248
- 3d_secure: {}
249
- account: ''
250
- address_city: ''
251
- address_country: ''
252
- address_line1: ''
253
- address_line1_check: ''
254
- address_line2: ''
255
- address_state: ''
256
- address_zip: ''
257
- address_zip_check: ''
258
- available_payout_methods: []
259
- brand: Visa
260
- country: ''
261
- currency: ''
262
- customer: ''
263
- cvc_check: ''
264
- default_for_currency: false
265
- description: ''
266
- dynamic_last4: ''
267
- emv_auth_data: ''
268
- estimated_availability: ''
269
- exp_month: 8
270
- exp_year: 2018
271
- fingerprint: ''
272
- funding: unknown
273
- google_reference: ''
274
- id: card_19xOmYA6KsQaPpsx93IwBRHM
275
- iin: ''
276
- issuer: ''
277
- last4: '4242'
278
- metadata: {}
279
- name: ''
280
- object: card
281
- recipient: ''
282
- three_d_secure: {}
283
- tokenization_method: ''
284
- charge:
285
- alternate_statement_descriptors: {}
286
- amount: 100
287
- amount_authorized: 0
288
- amount_captured: 0
289
- amount_refunded: 0
290
- application: ''
291
- application_fee: ''
292
- application_fees_refunded: 0
293
- authorization_code: ''
294
- balance_transaction: txn_19xOmYA6KsQaPpsxgSCbKQ3d
295
- captured: true
296
- card: {}
297
- created: 1234567890
298
- currency: usd
299
- customer: ''
300
- description: My First Test Charge (created for API docs)
301
- destination: ''
302
- dispute: ''
303
- failure_code: ''
304
- failure_message: ''
305
- fee_balance_transactions: {}
306
- fraud_details: {}
307
- id: ch_19xOmYA6KsQaPpsxRpMRzREK
308
- invoice: ''
309
- level3: {}
310
- livemode: false
311
- metadata: {}
312
- object: charge
313
- on_behalf_of: ''
314
- order: ''
315
- outcome: {}
316
- paid: true
317
- receipt_email: ''
318
- receipt_number: ''
319
- refunded: false
320
- refunds:
321
- data: []
322
- has_more: false
323
- object: list
324
- total_count: 0
325
- url: "/v1/charges/ch_19xOmYA6KsQaPpsxRpMRzREK/refunds"
326
- review: ''
327
- shipping: {}
328
- source:
329
- address_city:
330
- address_country:
331
- address_line1:
332
- address_line1_check:
333
- address_line2:
334
- address_state:
335
- address_zip:
336
- address_zip_check:
337
- brand: Visa
338
- country:
339
- customer:
340
- cvc_check:
341
- dynamic_last4:
342
- exp_month: 8
343
- exp_year: 2018
344
- funding: unknown
345
- id: card_19xOmYA6KsQaPpsx93IwBRHM
346
- last4: '4242'
347
- metadata: {}
348
- name:
349
- object: card
350
- tokenization_method:
351
- source_transfer: ''
352
- statement_descriptor: ''
353
- status: succeeded
354
- transfer: ''
355
- transfer_group: ''
356
- trust: {}
357
- country_spec:
358
- default_currency: usd
359
- field_schemas: {}
360
- id: US
361
- object: country_spec
362
- supported_bank_account_currencies:
363
- usd:
364
- - US
365
- supported_payment_currencies:
366
- - "..."
367
- - aed
368
- - afn
369
- - usd
370
- supported_payment_methods:
371
- - alipay
372
- - card
373
- - stripe
374
- verification_fields:
375
- company:
376
- additional: []
377
- minimum: []
378
- individual:
379
- additional: []
380
- minimum: []
381
- coupon:
382
- amount_off: 0
383
- created: 1234567890
384
- currency: usd
385
- duration: repeating
386
- duration_in_months: 3
387
- id: 25OFF
388
- livemode: false
389
- max_redemptions: 0
390
- metadata: {}
391
- object: coupon
392
- percent_off: 25
393
- redeem_by: 1234567890
394
- times_redeemed: 0
395
- valid: true
396
- customer:
397
- account_balance: 0
398
- alipay_accounts: {}
399
- bank_accounts: {}
400
- business_vat_id: ''
401
- cards: {}
402
- created: 1234567890
403
- currency: usd
404
- default_bank_account: ''
405
- default_card: ''
406
- default_source: ''
407
- default_source_type: ''
408
- delinquent: false
409
- description: ''
410
- discount: {}
411
- email: ''
412
- id: cus_AHykWO1tNrvBO2
413
- livemode: false
414
- metadata: {}
415
- object: customer
416
- shipping: {}
417
- sources:
418
- data: []
419
- has_more: false
420
- object: list
421
- total_count: 0
422
- url: "/v1/customers/cus_AHykWO1tNrvBO2/sources"
423
- subscription: {}
424
- subscriptions: {}
425
- trust: {}
426
- customer_source:
427
- customer: ''
428
- id: ba_19xOmZA6KsQaPpsx7DTyLvtT
429
- metadata: {}
430
- object: bank_account
431
- discount:
432
- coupon:
433
- amount_off:
434
- created: 1489533023
435
- currency: usd
436
- duration: repeating
437
- duration_in_months: 3
438
- id: 25OFF
439
- livemode: false
440
- max_redemptions:
441
- metadata: {}
442
- object: coupon
443
- percent_off: 25
444
- redeem_by:
445
- times_redeemed: 0
446
- valid: true
447
- customer: cus_AHykWO1tNrvBO2
448
- end: 1234567890
449
- object: discount
450
- start: 1234567890
451
- subscription: ''
452
- dispute:
453
- accepted_at: 1234567890
454
- amount: 1000
455
- balance_transaction: ''
456
- balance_transactions: []
457
- charge: ch_19xOmYA6KsQaPpsxRpMRzREK
458
- closed_at: 1234567890
459
- created: 1234567890
460
- currency: usd
461
- escalated_at: 1234567890
462
- evidence:
463
- access_activity_log:
464
- billing_address:
465
- cancellation_policy:
466
- cancellation_policy_disclosure:
467
- cancellation_rebuttal:
468
- customer_communication:
469
- customer_email_address:
470
- customer_name:
471
- customer_purchase_ip:
472
- customer_signature:
473
- duplicate_charge_documentation:
474
- duplicate_charge_explanation:
475
- duplicate_charge_id:
476
- product_description:
477
- receipt:
478
- refund_policy:
479
- refund_policy_disclosure:
480
- refund_refusal_explanation:
481
- service_date:
482
- service_documentation:
483
- shipping_address:
484
- shipping_carrier:
485
- shipping_date:
486
- shipping_documentation:
487
- shipping_tracking_number:
488
- uncategorized_file:
489
- uncategorized_text:
490
- evidence_details:
491
- due_by: 1491177599
492
- has_evidence: false
493
- past_due: false
494
- submission_count: 0
495
- evidence_submitted_at: []
496
- id: dp_19xOmYA6KsQaPpsxF27xl8iJ
497
- is_charge_refundable: false
498
- is_protected: false
499
- livemode: false
500
- metadata: {}
501
- network_reason_code: ''
502
- object: dispute
503
- reason: general
504
- status: needs_response
505
- event:
506
- api_version: ''
507
- created: 1234567890
508
- customer_email: ''
509
- data:
510
- object:
511
- amount: 2000
512
- created: 1489533023
513
- currency: usd
514
- id: gold
515
- interval: month
516
- interval_count: 1
517
- livemode: false
518
- metadata: {}
519
- name: Gold Special
520
- object: plan
521
- statement_descriptor:
522
- trial_period_days:
523
- id: evt_19xOmZA6KsQaPpsxg3PnM6Ax
524
- livemode: false
525
- object: event
526
- pending_webhooks: 0
527
- recipient_best_description: ''
528
- request: ''
529
- type: plan.created
530
- external_account_source:
531
- account: acct_19xOmSA6KsQaPpsx
532
- address_city: ''
533
- address_line1: ''
534
- address_line2: ''
535
- address_state: ''
536
- address_zip: ''
537
- country: US
538
- currency: usd
539
- customer: ''
540
- default_for_currency: false
541
- fingerprint: rhUqyC2EcjMewT6o
542
- id: ba_19xOmZA6KsQaPpsx7DTyLvtT
543
- last4: '6789'
544
- metadata: {}
545
- object: bank_account
546
- fee_refund:
547
- amount: 100
548
- balance_transaction: ''
549
- created: 1234567890
550
- currency: usd
551
- fee: fee_19xOmZA6KsQaPpsxZCoZI7Ep
552
- id: fr_AHykVrc8RYtq3K
553
- metadata: {}
554
- object: fee_refund
555
- invoice:
556
- amount_due: 0
557
- application_fee: 0
558
- attempt_count: 0
559
- attempted: false
560
- billing: ''
561
- charge: ''
562
- closed: false
563
- currency: usd
564
- customer: cus_AHykWO1tNrvBO2
565
- date: 1234567890
566
- description: ''
567
- discount: {}
568
- due_date: 1234567890
569
- ending_balance: 0
570
- forgiven: false
571
- id: in_19xOmZA6KsQaPpsxpXZEk0Jl
572
- lines:
573
- data:
574
- - amount: 2000
575
- currency: usd
576
- description:
577
- discountable: true
578
- id: sub_AHyk2EXaU2gAEV
579
- livemode: true
580
- metadata: {}
581
- object: line_item
582
- period:
583
- end: 1494803422
584
- start: 1492211422
585
- plan:
586
- amount: 2000
587
- created: 1489533023
588
- currency: usd
589
- id: gold
590
- interval: month
591
- interval_count: 1
592
- livemode: false
593
- metadata: {}
594
- name: Gold Special
595
- object: plan
596
- statement_descriptor:
597
- trial_period_days:
598
- proration: false
599
- quantity: 1
600
- subscription:
601
- subscription_item: si_19xOmYB4YnRyKoofnPXr05OV
602
- type: subscription
603
- object: list
604
- total_count: 1
605
- url: "/v1/invoices/in_19xOmZA6KsQaPpsxpXZEk0Jl/lines"
606
- livemode: false
607
- metadata: {}
608
- next_payment_attempt: 1234567890
609
- number: ''
610
- object: invoice
611
- paid: false
612
- period_end: 1234567890
613
- period_start: 1234567890
614
- receipt_number: ''
615
- starting_balance: 0
616
- statement_descriptor: ''
617
- subscription: ''
618
- subscription_proration_date: 0
619
- subtotal: 0
620
- tax: 0
621
- tax_percent: 0.0
622
- total: 0
623
- webhooks_delivered_at: 1234567890
624
- invoice_item:
625
- amount: 1000
626
- currency: usd
627
- customer: cus_AHykWO1tNrvBO2
628
- date: 1234567890
629
- description: My First Invoice Item (created for API docs)
630
- discountable: true
631
- id: ii_19xOmZA6KsQaPpsxw92LOZet
632
- invoice: ''
633
- livemode: false
634
- metadata: {}
635
- object: invoiceitem
636
- period:
637
- end: 1489533023
638
- start: 1489533023
639
- plan: {}
640
- proration: false
641
- quantity: 0
642
- subscription: ''
643
- subscription_item: ''
644
- invoice_line_item:
645
- amount: 1000
646
- currency: usd
647
- description: My First Invoice Item (created for API docs)
648
- discountable: true
649
- id: ii_19xOmZA6KsQaPpsxw92LOZet
650
- livemode: false
651
- metadata: {}
652
- object: line_item
653
- period:
654
- end: 1489533023
655
- start: 1489533023
656
- plan: {}
657
- proration: false
658
- quantity: 0
659
- subscription: ''
660
- subscription_item: ''
661
- type: invoiceitem
662
- legacy_transfer:
663
- amount: 1100
664
- amount_reversed: 0
665
- application_fee: ''
666
- auto: false
667
- balance_transaction: ''
668
- bank_account: {}
669
- card: {}
670
- created: 1234567890
671
- currency: usd
672
- date: 1234567890
673
- delay_reason: ''
674
- description: Transfer to test@example.com
675
- destination: ba_19xOmZA6KsQaPpsxBhLhCCLJ
676
- destination_payment: ''
677
- failure_code: ''
678
- failure_message: ''
679
- id: tr_19xOmZA6KsQaPpsxxTnirGHq
680
- legacy_date: 1234567890
681
- livemode: false
682
- metadata: {}
683
- method: standard
684
- object: transfer
685
- recipient: ''
686
- reversals:
687
- data: []
688
- has_more: false
689
- object: list
690
- total_count: 0
691
- url: "/v1/transfers/tr_19xOmZA6KsQaPpsxxTnirGHq/reversals"
692
- reversed: false
693
- source_transaction: ''
694
- source_type: card
695
- statement_descriptor: ''
696
- status: in_transit
697
- transfer_group: ''
698
- type: bank_account
699
- user_visible_date: 1234567890
700
- order:
701
- amount: 1500
702
- amount_returned: 0
703
- application: ''
704
- application_fee: 0
705
- charge: ''
706
- created: 1234567890
707
- currency: usd
708
- customer: ''
709
- email: ''
710
- external_coupon_code: ''
711
- external_sku_ids: []
712
- id: or_19xOmbA6KsQaPpsxdJuNEqnx
713
- items:
714
- - amount: 1500
715
- currency: usd
716
- description: T-shirt
717
- object: order_item
718
- parent: sk_19xOmbA6KsQaPpsx0niGDfiM
719
- quantity:
720
- type: sku
721
- livemode: false
722
- metadata: {}
723
- object: order
724
- returns:
725
- data: []
726
- has_more: false
727
- object: list
728
- total_count: 0
729
- url: "/v1/order_returns?order=or_19xOmbA6KsQaPpsxdJuNEqnx"
730
- selected_shipping_method: ''
731
- shipping:
732
- address:
733
- city: Anytown
734
- country: US
735
- line1: 1234 Main street
736
- line2:
737
- postal_code: '123456'
738
- state:
739
- carrier:
740
- name: Jenny Rosen
741
- phone:
742
- tracking_number:
743
- shipping_methods: {}
744
- signature: ''
745
- status: created
746
- status_transitions: {}
747
- updated: 1234567890
748
- upstream_id: ''
749
- order_return:
750
- amount: 1500
751
- created: 1234567890
752
- currency: usd
753
- id: orret_19xOmbA6KsQaPpsxFhO0lEnm
754
- items:
755
- - amount: 1500
756
- currency: usd
757
- description: T-shirt
758
- object: order_item
759
- parent: sk_19xOmbA6KsQaPpsx0niGDfiM
760
- quantity:
761
- type: sku
762
- livemode: false
763
- object: order_return
764
- order: or_19xOmbA6KsQaPpsxcibE2Kys
765
- refund: re_19xOmbA6KsQaPpsxweFlRcU7
766
- plan:
767
- amount: 2000
768
- created: 1234567890
769
- currency: usd
770
- id: gold
771
- interval: month
772
- interval_count: 1
773
- livemode: false
774
- metadata: {}
775
- name: Gold Special
776
- object: plan
777
- statement_descriptor: ''
778
- trial_period_days: 0
779
- platform_earning:
780
- account: acct_19xOmSA6KsQaPpsx
781
- amount: 100
782
- amount_refunded: 0
783
- application: ca_AHykjKaDnL4KjnMmmkLzuwqk9hkgJA5M
784
- balance_transaction: txn_19xOmYA6KsQaPpsxgSCbKQ3d
785
- charge: ch_19xOmYA6KsQaPpsxRpMRzREK
786
- created: 1234567890
787
- currency: usd
788
- id: fee_19xOmZA6KsQaPpsxZCoZI7Ep
789
- livemode: false
790
- object: application_fee
791
- originating_transaction: ''
792
- refunded: false
793
- refunds:
794
- data: []
795
- has_more: false
796
- object: list
797
- total_count: 0
798
- url: "/v1/application_fees/fee_19xOmZA6KsQaPpsxZCoZI7Ep/refunds"
799
- product:
800
- active: true
801
- attributes:
802
- - gender
803
- - size
804
- caption: ''
805
- created: 1234567890
806
- deactivate_on: []
807
- description: Comfortable gray cotton t-shirts
808
- donation: false
809
- id: prod_AHyk8gTS1wCWqa
810
- images: []
811
- livemode: false
812
- metadata: {}
813
- name: T-shirt
814
- object: product
815
- package_dimensions: {}
816
- reason_product_not_tweetable: ''
817
- shippable: true
818
- skus:
819
- data: []
820
- has_more: false
821
- object: list
822
- total_count: 0
823
- url: "/v1/skus?product=prod_AHyk8gTS1wCWqa&active=true"
824
- tweetable_url: ''
825
- updated: 1234567890
826
- url: ''
827
- refund:
828
- amount: 100
829
- balance_transaction: ''
830
- charge: ch_19xOmYA6KsQaPpsxRpMRzREK
831
- created: 1234567890
832
- currency: usd
833
- description: ''
834
- fee_balance_transactions: {}
835
- id: re_19xOmYA6KsQaPpsxnI34WZGS
836
- metadata: {}
837
- object: refund
838
- reason: ''
839
- receipt_number: ''
840
- status: succeeded
841
- type: ''
842
- sku:
843
- active: true
844
- attributes:
845
- gender: Unisex
846
- size: Medium
847
- created: 1234567890
848
- currency: usd
849
- id: sku_AHyktKapJTzgmX
850
- image: ''
851
- inventory:
852
- quantity: 50
853
- type: finite
854
- value:
855
- livemode: false
856
- metadata: {}
857
- object: sku
858
- package_dimensions: {}
859
- price: 1500
860
- product: prod_AHyk8gTS1wCWqa
861
- updated: 1234567890
862
- source:
863
- amount: 0
864
- client_secret: ''
865
- code_verification: {}
866
- created: 1234567890
867
- currency: ''
868
- customer: ''
869
- flow: ''
870
- id: card_19xOmYA6KsQaPpsx93IwBRHM
871
- livemode: false
872
- metadata: {}
873
- object: card
874
- order: ''
875
- owner: {}
876
- receiver: {}
877
- redirect: {}
878
- status: ''
879
- type: ''
880
- usage: ''
881
- subscription:
882
- account_balance: 0
883
- application_fee_percent: 0.0
884
- billing: ''
885
- cancel_at_period_end: false
886
- canceled_at: 1234567890
887
- created: 1234567890
888
- current_period_end: 1234567890
889
- current_period_start: 1234567890
890
- customer: cus_AHykJG3Ru2BgKh
891
- days_until_due: 0
892
- discount: {}
893
- ended_at: 1234567890
894
- id: sub_AHyk2EXaU2gAEV
895
- items:
896
- data:
897
- - created: 1489533023
898
- id: si_19xOmYB4YnRyKoofnPXr05OV
899
- object: subscription_item
900
- plan:
901
- amount: 2000
902
- created: 1489533022
903
- currency: usd
904
- id: gold
905
- interval: month
906
- interval_count: 1
907
- livemode: false
908
- metadata: {}
909
- name: Gold Special
910
- object: plan
911
- statement_descriptor:
912
- trial_period_days:
913
- quantity: 1
914
- has_more: false
915
- object: list
916
- total_count: 1
917
- url: "/v1/subscription_items?subscription=sub_AHyk2EXaU2gAEV"
918
- livemode: false
919
- max_occurrences: 0
920
- metadata: {}
921
- object: subscription
922
- on_behalf_of: ''
923
- plan:
924
- amount: 2000
925
- created: 1489533022
926
- currency: usd
927
- id: gold
928
- interval: month
929
- interval_count: 1
930
- livemode: false
931
- metadata: {}
932
- name: Gold Special
933
- object: plan
934
- statement_descriptor:
935
- trial_period_days:
936
- quantity: 1
937
- retains_own_balance: false
938
- start: 1234567890
939
- status: active
940
- tax_percent: 0.0
941
- trial_end: 1234567890
942
- trial_start: 1234567890
943
- subscription_item:
944
- created: 1489533023
945
- id: si_19xOmZB4YnRyKoofmmqQD542
946
- object: subscription_item
947
- plan:
948
- amount: 2000
949
- created: 1489533022
950
- currency: usd
951
- id: gold
952
- interval: month
953
- interval_count: 1
954
- livemode: false
955
- metadata: {}
956
- name: Gold Special
957
- object: plan
958
- statement_descriptor:
959
- trial_period_days:
960
- quantity: 1
961
- three_d_secure:
962
- amount: 1500
963
- authenticated: false
964
- card:
965
- address_city:
966
- address_country:
967
- address_line1:
968
- address_line1_check:
969
- address_line2:
970
- address_state:
971
- address_zip:
972
- address_zip_check:
973
- brand: Visa
974
- country:
975
- customer:
976
- cvc_check:
977
- dynamic_last4:
978
- exp_month: 8
979
- exp_year: 2018
980
- funding: unknown
981
- id: card_19xOmZA6KsQaPpsx1TPW9v1Z
982
- last4: '4242'
983
- metadata: {}
984
- name:
985
- object: card
986
- tokenization_method:
987
- created: 1234567890
988
- currency: usd
989
- id: tdsrc_AHyk0Ny8jTjJoy
990
- livemode: false
991
- object: three_d_secure
992
- redirect_url: http://127.0.0.1:6080/3d_secure/authenticate/tdsrc_AHyk0Ny8jTjJoy
993
- status: redirect_pending
994
- token:
995
- account_details: {}
996
- alipay_account: {}
997
- bank_account: {}
998
- card:
999
- address_city:
1000
- address_country:
1001
- address_line1:
1002
- address_line1_check:
1003
- address_line2:
1004
- address_state:
1005
- address_zip:
1006
- address_zip_check:
1007
- brand: Visa
1008
- country:
1009
- cvc_check:
1010
- dynamic_last4:
1011
- exp_month: 8
1012
- exp_year: 2018
1013
- funding: unknown
1014
- id: card_19xOmZA6KsQaPpsx1TPW9v1Z
1015
- last4: '4242'
1016
- metadata: {}
1017
- name:
1018
- object: card
1019
- tokenization_method:
1020
- client_ip: ''
1021
- created: 1234567890
1022
- description: ''
1023
- email: ''
1024
- id: tok_19xOmZA6KsQaPpsxwCla8HhZ
1025
- livemode: false
1026
- object: token
1027
- type: card
1028
- usage: ''
1029
- used: false
1030
- transfer:
1031
- amount: 1100
1032
- amount_reversed: 0
1033
- balance_transaction: txn_19xOmYA6KsQaPpsxgSCbKQ3d
1034
- created: 1234567890
1035
- currency: usd
1036
- destination: ba_19xOmZA6KsQaPpsxBhLhCCLJ
1037
- destination_payment: ''
1038
- id: tr_19xOmZA6KsQaPpsxxTnirGHq
1039
- livemode: false
1040
- metadata: {}
1041
- object: transfer
1042
- reversals:
1043
- data: []
1044
- has_more: false
1045
- object: list
1046
- total_count: 0
1047
- url: "/v1/transfers/tr_19xOmZA6KsQaPpsxxTnirGHq/reversals"
1048
- reversed: false
1049
- transfer_group: ''
1050
- transfer_recipient:
1051
- active_account: {}
1052
- address_city: ''
1053
- address_country: ''
1054
- address_line1: ''
1055
- address_line2: ''
1056
- address_state: ''
1057
- address_zip: ''
1058
- cards:
1059
- data: []
1060
- has_more: false
1061
- object: list
1062
- total_count: 0
1063
- url: "/v1/recipients/rp_19xOmZA6KsQaPpsxz5JlUIpQ/cards"
1064
- country: ''
1065
- created: 1234567890
1066
- default_card: ''
1067
- description: Recipient for John Doe
1068
- dob_day: ''
1069
- dob_month: ''
1070
- dob_year: ''
1071
- email: test@example.com
1072
- id: rp_19xOmZA6KsQaPpsxz5JlUIpQ
1073
- livemode: false
1074
- metadata: {}
1075
- migrated_to: ''
1076
- name: John Doe
1077
- object: recipient
1078
- tin: ''
1079
- tin_verification_pending: false
1080
- type: individual
1081
- verified: false
1082
- transfer_reversal:
1083
- amount: 1100
1084
- balance_transaction: ''
1085
- created: 1234567890
1086
- currency: usd
1087
- id: trr_19xOmZA6KsQaPpsxg8vF5JSH
1088
- metadata: {}
1089
- object: transfer_reversal
1090
- transfer: tr_19xOmZA6KsQaPpsxxTnirGHq
1091
- upcoming_invoice:
1092
- amount_due: 0
1093
- application_fee: 0
1094
- attempt_count: 0
1095
- attempted: false
1096
- billing: ''
1097
- charge: ''
1098
- closed: false
1099
- currency: usd
1100
- customer: cus_AHykWO1tNrvBO2
1101
- date: 1234567890
1102
- description: ''
1103
- discount: {}
1104
- due_date: 1234567890
1105
- ending_balance: 0
1106
- forgiven: false
1107
- lines:
1108
- data: []
1109
- has_more: false
1110
- object: list
1111
- total_count: 0
1112
- url: "/v1/invoices/in_19xOmZA6KsQaPpsxpXZEk0Jl/lines"
1113
- livemode: false
1114
- metadata: {}
1115
- next_payment_attempt: 1234567890
1116
- number: ''
1117
- object: invoice
1118
- paid: false
1119
- period_end: 1234567890
1120
- period_start: 1234567890
1121
- receipt_number: ''
1122
- starting_balance: 0
1123
- statement_descriptor: ''
1124
- subscription: ''
1125
- subscription_proration_date: 0
1126
- subtotal: 0
1127
- tax: 0
1128
- tax_percent: 0.0
1129
- total: 0
1130
- webhooks_delivered_at: 1234567890