stripe 4.18.1 → 5.42.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +232 -1
  3. data/CODE_OF_CONDUCT.md +77 -0
  4. data/Gemfile +10 -16
  5. data/README.md +168 -63
  6. data/Rakefile +8 -7
  7. data/VERSION +1 -1
  8. data/lib/stripe/api_operations/create.rb +1 -1
  9. data/lib/stripe/api_operations/delete.rb +7 -3
  10. data/lib/stripe/api_operations/list.rb +1 -12
  11. data/lib/stripe/api_operations/nested_resource.rb +29 -26
  12. data/lib/stripe/api_operations/request.rb +82 -6
  13. data/lib/stripe/api_operations/save.rb +7 -4
  14. data/lib/stripe/api_resource.rb +27 -2
  15. data/lib/stripe/connection_manager.rb +200 -0
  16. data/lib/stripe/error_object.rb +93 -0
  17. data/lib/stripe/errors.rb +24 -3
  18. data/lib/stripe/instrumentation.rb +84 -0
  19. data/lib/stripe/list_object.rb +34 -5
  20. data/lib/stripe/multipart_encoder.rb +131 -0
  21. data/lib/stripe/oauth.rb +8 -6
  22. data/lib/stripe/object_types.rb +108 -0
  23. data/lib/stripe/{account.rb → resources/account.rb} +23 -26
  24. data/lib/stripe/{account_link.rb → resources/account_link.rb} +2 -1
  25. data/lib/stripe/{alipay_account.rb → resources/alipay_account.rb} +1 -1
  26. data/lib/stripe/{apple_pay_domain.rb → resources/apple_pay_domain.rb} +2 -1
  27. data/lib/stripe/resources/application_fee.rb +14 -0
  28. data/lib/stripe/{application_fee_refund.rb → resources/application_fee_refund.rb} +3 -2
  29. data/lib/stripe/{balance.rb → resources/balance.rb} +2 -1
  30. data/lib/stripe/{balance_transaction.rb → resources/balance_transaction.rb} +2 -5
  31. data/lib/stripe/{bank_account.rb → resources/bank_account.rb} +5 -6
  32. data/lib/stripe/{issuing/dispute.rb → resources/billing_portal/configuration.rb} +4 -3
  33. data/lib/stripe/{checkout → resources/billing_portal}/session.rb +3 -2
  34. data/lib/stripe/{bitcoin_receiver.rb → resources/bitcoin_receiver.rb} +5 -5
  35. data/lib/stripe/resources/bitcoin_transaction.rb +16 -0
  36. data/lib/stripe/{capability.rb → resources/capability.rb} +3 -2
  37. data/lib/stripe/{card.rb → resources/card.rb} +5 -7
  38. data/lib/stripe/resources/charge.rb +23 -0
  39. data/lib/stripe/resources/checkout/session.rb +27 -0
  40. data/lib/stripe/{country_spec.rb → resources/country_spec.rb} +2 -1
  41. data/lib/stripe/{coupon.rb → resources/coupon.rb} +2 -1
  42. data/lib/stripe/resources/credit_note.rb +33 -0
  43. data/lib/stripe/resources/credit_note_line_item.rb +8 -0
  44. data/lib/stripe/resources/customer.rb +52 -0
  45. data/lib/stripe/resources/customer_balance_transaction.rb +31 -0
  46. data/lib/stripe/{discount.rb → resources/discount.rb} +2 -1
  47. data/lib/stripe/resources/dispute.rb +22 -0
  48. data/lib/stripe/{ephemeral_key.rb → resources/ephemeral_key.rb} +2 -1
  49. data/lib/stripe/{event.rb → resources/event.rb} +2 -1
  50. data/lib/stripe/{exchange_rate.rb → resources/exchange_rate.rb} +2 -1
  51. data/lib/stripe/{file.rb → resources/file.rb} +7 -12
  52. data/lib/stripe/{file_link.rb → resources/file_link.rb} +2 -1
  53. data/lib/stripe/resources/identity/verification_report.rb +12 -0
  54. data/lib/stripe/resources/identity/verification_session.rb +35 -0
  55. data/lib/stripe/resources/invoice.rb +74 -0
  56. data/lib/stripe/{invoice_item.rb → resources/invoice_item.rb} +2 -1
  57. data/lib/stripe/{invoice_line_item.rb → resources/invoice_line_item.rb} +2 -1
  58. data/lib/stripe/{issuing → resources/issuing}/authorization.rb +14 -5
  59. data/lib/stripe/{issuing → resources/issuing}/card.rb +8 -3
  60. data/lib/stripe/resources/issuing/card_details.rb +10 -0
  61. data/lib/stripe/{issuing → resources/issuing}/cardholder.rb +2 -1
  62. data/lib/stripe/resources/issuing/dispute.rb +25 -0
  63. data/lib/stripe/{issuing → resources/issuing}/transaction.rb +2 -1
  64. data/lib/stripe/resources/line_item.rb +8 -0
  65. data/lib/stripe/{login_link.rb → resources/login_link.rb} +2 -1
  66. data/lib/stripe/resources/mandate.rb +8 -0
  67. data/lib/stripe/resources/order.rb +33 -0
  68. data/lib/stripe/{order_return.rb → resources/order_return.rb} +2 -1
  69. data/lib/stripe/resources/payment_intent.rb +43 -0
  70. data/lib/stripe/{payment_method.rb → resources/payment_method.rb} +14 -5
  71. data/lib/stripe/resources/payout.rb +33 -0
  72. data/lib/stripe/{person.rb → resources/person.rb} +2 -1
  73. data/lib/stripe/{plan.rb → resources/plan.rb} +2 -1
  74. data/lib/stripe/resources/price.rb +12 -0
  75. data/lib/stripe/{product.rb → resources/product.rb} +2 -1
  76. data/lib/stripe/resources/promotion_code.rb +12 -0
  77. data/lib/stripe/resources/quote.rb +105 -0
  78. data/lib/stripe/{radar → resources/radar}/early_fraud_warning.rb +2 -1
  79. data/lib/stripe/{radar → resources/radar}/value_list.rb +2 -1
  80. data/lib/stripe/{radar → resources/radar}/value_list_item.rb +2 -1
  81. data/lib/stripe/{recipient.rb → resources/recipient.rb} +2 -5
  82. data/lib/stripe/{recipient_transfer.rb → resources/recipient_transfer.rb} +1 -1
  83. data/lib/stripe/{refund.rb → resources/refund.rb} +2 -1
  84. data/lib/stripe/{reporting → resources/reporting}/report_run.rb +2 -1
  85. data/lib/stripe/{reporting → resources/reporting}/report_type.rb +2 -1
  86. data/lib/stripe/{reversal.rb → resources/reversal.rb} +4 -3
  87. data/lib/stripe/{review.rb → resources/review.rb} +8 -3
  88. data/lib/stripe/resources/setup_attempt.rb +10 -0
  89. data/lib/stripe/resources/setup_intent.rb +33 -0
  90. data/lib/stripe/resources/shipping_rate.rb +12 -0
  91. data/lib/stripe/{sigma → resources/sigma}/scheduled_query_run.rb +2 -1
  92. data/lib/stripe/{sku.rb → resources/sku.rb} +2 -1
  93. data/lib/stripe/{source.rb → resources/source.rb} +20 -15
  94. data/lib/stripe/{source_transaction.rb → resources/source_transaction.rb} +2 -1
  95. data/lib/stripe/{subscription.rb → resources/subscription.rb} +12 -11
  96. data/lib/stripe/resources/subscription_item.rb +26 -0
  97. data/lib/stripe/resources/subscription_schedule.rb +33 -0
  98. data/lib/stripe/resources/tax_code.rb +10 -0
  99. data/lib/stripe/{tax_id.rb → resources/tax_id.rb} +2 -1
  100. data/lib/stripe/{tax_rate.rb → resources/tax_rate.rb} +2 -1
  101. data/lib/stripe/{terminal → resources/terminal}/connection_token.rb +2 -1
  102. data/lib/stripe/{terminal → resources/terminal}/location.rb +2 -1
  103. data/lib/stripe/{terminal → resources/terminal}/reader.rb +2 -1
  104. data/lib/stripe/{three_d_secure.rb → resources/three_d_secure.rb} +2 -1
  105. data/lib/stripe/{token.rb → resources/token.rb} +2 -1
  106. data/lib/stripe/{topup.rb → resources/topup.rb} +8 -3
  107. data/lib/stripe/{transfer.rb → resources/transfer.rb} +9 -8
  108. data/lib/stripe/resources/usage_record.rb +8 -0
  109. data/lib/stripe/{usage_record_summary.rb → resources/usage_record_summary.rb} +2 -1
  110. data/lib/stripe/{webhook_endpoint.rb → resources/webhook_endpoint.rb} +2 -1
  111. data/lib/stripe/resources.rb +91 -0
  112. data/lib/stripe/stripe_client.rb +617 -243
  113. data/lib/stripe/stripe_configuration.rb +194 -0
  114. data/lib/stripe/stripe_object.rb +30 -25
  115. data/lib/stripe/stripe_response.rb +87 -27
  116. data/lib/stripe/util.rb +43 -103
  117. data/lib/stripe/version.rb +1 -1
  118. data/lib/stripe/webhook.rb +39 -8
  119. data/lib/stripe.rb +41 -205
  120. data/stripe.gemspec +19 -5
  121. metadata +109 -287
  122. data/.editorconfig +0 -10
  123. data/.gitattributes +0 -4
  124. data/.github/ISSUE_TEMPLATE.md +0 -5
  125. data/.gitignore +0 -8
  126. data/.rubocop.yml +0 -42
  127. data/.rubocop_todo.yml +0 -38
  128. data/.travis.yml +0 -43
  129. data/.vscode/extensions.json +0 -7
  130. data/.vscode/settings.json +0 -8
  131. data/lib/stripe/application_fee.rb +0 -24
  132. data/lib/stripe/bitcoin_transaction.rb +0 -15
  133. data/lib/stripe/charge.rb +0 -84
  134. data/lib/stripe/credit_note.rb +0 -18
  135. data/lib/stripe/customer.rb +0 -93
  136. data/lib/stripe/dispute.rb +0 -23
  137. data/lib/stripe/invoice.rb +0 -49
  138. data/lib/stripe/issuer_fraud_record.rb +0 -9
  139. data/lib/stripe/issuing/card_details.rb +0 -9
  140. data/lib/stripe/order.rb +0 -32
  141. data/lib/stripe/payment_intent.rb +0 -30
  142. data/lib/stripe/payout.rb +0 -24
  143. data/lib/stripe/subscription_item.rb +0 -18
  144. data/lib/stripe/subscription_schedule.rb +0 -35
  145. data/lib/stripe/subscription_schedule_revision.rb +0 -34
  146. data/lib/stripe/usage_record.rb +0 -23
  147. data/test/api_stub_helpers.rb +0 -1
  148. data/test/openapi/README.md +0 -9
  149. data/test/stripe/account_link_test.rb +0 -18
  150. data/test/stripe/account_test.rb +0 -428
  151. data/test/stripe/alipay_account_test.rb +0 -37
  152. data/test/stripe/api_operations_test.rb +0 -80
  153. data/test/stripe/api_resource_test.rb +0 -523
  154. data/test/stripe/apple_pay_domain_test.rb +0 -46
  155. data/test/stripe/application_fee_refund_test.rb +0 -37
  156. data/test/stripe/application_fee_test.rb +0 -58
  157. data/test/stripe/balance_test.rb +0 -13
  158. data/test/stripe/bank_account_test.rb +0 -36
  159. data/test/stripe/capability_test.rb +0 -45
  160. data/test/stripe/charge_test.rb +0 -80
  161. data/test/stripe/checkout/session_test.rb +0 -41
  162. data/test/stripe/country_spec_test.rb +0 -20
  163. data/test/stripe/coupon_test.rb +0 -61
  164. data/test/stripe/credit_note_test.rb +0 -61
  165. data/test/stripe/customer_card_test.rb +0 -42
  166. data/test/stripe/customer_test.rb +0 -226
  167. data/test/stripe/dispute_test.rb +0 -51
  168. data/test/stripe/ephemeral_key_test.rb +0 -93
  169. data/test/stripe/errors_test.rb +0 -20
  170. data/test/stripe/exchange_rate_test.rb +0 -20
  171. data/test/stripe/file_link_test.rb +0 -41
  172. data/test/stripe/file_test.rb +0 -97
  173. data/test/stripe/file_upload_test.rb +0 -79
  174. data/test/stripe/invoice_item_test.rb +0 -66
  175. data/test/stripe/invoice_line_item_test.rb +0 -8
  176. data/test/stripe/invoice_test.rb +0 -213
  177. data/test/stripe/issuer_fraud_record_test.rb +0 -20
  178. data/test/stripe/issuing/authorization_test.rb +0 -72
  179. data/test/stripe/issuing/card_test.rb +0 -62
  180. data/test/stripe/issuing/cardholder_test.rb +0 -53
  181. data/test/stripe/issuing/dispute_test.rb +0 -45
  182. data/test/stripe/issuing/transaction_test.rb +0 -48
  183. data/test/stripe/list_object_test.rb +0 -156
  184. data/test/stripe/login_link_test.rb +0 -37
  185. data/test/stripe/oauth_test.rb +0 -88
  186. data/test/stripe/order_return_test.rb +0 -21
  187. data/test/stripe/order_test.rb +0 -82
  188. data/test/stripe/payment_intent_test.rb +0 -107
  189. data/test/stripe/payment_method_test.rb +0 -84
  190. data/test/stripe/payout_test.rb +0 -57
  191. data/test/stripe/person_test.rb +0 -46
  192. data/test/stripe/plan_test.rb +0 -98
  193. data/test/stripe/product_test.rb +0 -59
  194. data/test/stripe/radar/early_fraud_warning_test.rb +0 -22
  195. data/test/stripe/radar/value_list_item_test.rb +0 -48
  196. data/test/stripe/radar/value_list_test.rb +0 -61
  197. data/test/stripe/recipient_test.rb +0 -62
  198. data/test/stripe/refund_test.rb +0 -39
  199. data/test/stripe/reporting/report_run_test.rb +0 -33
  200. data/test/stripe/reporting/report_type_test.rb +0 -22
  201. data/test/stripe/reversal_test.rb +0 -43
  202. data/test/stripe/review_test.rb +0 -27
  203. data/test/stripe/sigma/scheduled_query_run_test.rb +0 -22
  204. data/test/stripe/sku_test.rb +0 -60
  205. data/test/stripe/source_test.rb +0 -99
  206. data/test/stripe/source_transaction_test.rb +0 -19
  207. data/test/stripe/stripe_client_test.rb +0 -842
  208. data/test/stripe/stripe_object_test.rb +0 -525
  209. data/test/stripe/stripe_response_test.rb +0 -49
  210. data/test/stripe/subscription_item_test.rb +0 -63
  211. data/test/stripe/subscription_schedule_revision_test.rb +0 -37
  212. data/test/stripe/subscription_schedule_test.rb +0 -116
  213. data/test/stripe/subscription_test.rb +0 -80
  214. data/test/stripe/tax_id_test.rb +0 -31
  215. data/test/stripe/tax_rate_test.rb +0 -43
  216. data/test/stripe/terminal/connection_token_test.rb +0 -16
  217. data/test/stripe/terminal/location_test.rb +0 -68
  218. data/test/stripe/terminal/reader_test.rb +0 -62
  219. data/test/stripe/three_d_secure_test.rb +0 -23
  220. data/test/stripe/topup_test.rb +0 -62
  221. data/test/stripe/transfer_test.rb +0 -88
  222. data/test/stripe/usage_record_summary_test.rb +0 -19
  223. data/test/stripe/usage_record_test.rb +0 -28
  224. data/test/stripe/util_test.rb +0 -402
  225. data/test/stripe/webhook_endpoint_test.rb +0 -59
  226. data/test/stripe/webhook_test.rb +0 -96
  227. data/test/stripe_mock.rb +0 -77
  228. data/test/stripe_test.rb +0 -63
  229. data/test/test_data.rb +0 -61
  230. data/test/test_helper.rb +0 -71
metadata CHANGED
@@ -1,43 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.18.1
4
+ version: 5.42.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-28 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: faraday
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '0.13'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '0.13'
27
- - !ruby/object:Gem::Dependency
28
- name: net-http-persistent
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '3.0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '3.0'
11
+ date: 2021-12-13 00:00:00.000000000 Z
12
+ dependencies: []
41
13
  description: Stripe is the easiest way to accept payments online. See https://stripe.com
42
14
  for details.
43
15
  email: support@stripe.com
@@ -46,16 +18,8 @@ executables:
46
18
  extensions: []
47
19
  extra_rdoc_files: []
48
20
  files:
49
- - ".editorconfig"
50
- - ".gitattributes"
51
- - ".github/ISSUE_TEMPLATE.md"
52
- - ".gitignore"
53
- - ".rubocop.yml"
54
- - ".rubocop_todo.yml"
55
- - ".travis.yml"
56
- - ".vscode/extensions.json"
57
- - ".vscode/settings.json"
58
21
  - CHANGELOG.md
22
+ - CODE_OF_CONDUCT.md
59
23
  - CONTRIBUTORS
60
24
  - Gemfile
61
25
  - History.txt
@@ -66,9 +30,6 @@ files:
66
30
  - bin/stripe-console
67
31
  - lib/data/ca-certificates.crt
68
32
  - lib/stripe.rb
69
- - lib/stripe/account.rb
70
- - lib/stripe/account_link.rb
71
- - lib/stripe/alipay_account.rb
72
33
  - lib/stripe/api_operations/create.rb
73
34
  - lib/stripe/api_operations/delete.rb
74
35
  - lib/stripe/api_operations/list.rb
@@ -76,177 +37,122 @@ files:
76
37
  - lib/stripe/api_operations/request.rb
77
38
  - lib/stripe/api_operations/save.rb
78
39
  - lib/stripe/api_resource.rb
79
- - lib/stripe/apple_pay_domain.rb
80
- - lib/stripe/application_fee.rb
81
- - lib/stripe/application_fee_refund.rb
82
- - lib/stripe/balance.rb
83
- - lib/stripe/balance_transaction.rb
84
- - lib/stripe/bank_account.rb
85
- - lib/stripe/bitcoin_receiver.rb
86
- - lib/stripe/bitcoin_transaction.rb
87
- - lib/stripe/capability.rb
88
- - lib/stripe/card.rb
89
- - lib/stripe/charge.rb
90
- - lib/stripe/checkout/session.rb
91
- - lib/stripe/country_spec.rb
92
- - lib/stripe/coupon.rb
93
- - lib/stripe/credit_note.rb
94
- - lib/stripe/customer.rb
95
- - lib/stripe/discount.rb
96
- - lib/stripe/dispute.rb
97
- - lib/stripe/ephemeral_key.rb
40
+ - lib/stripe/connection_manager.rb
41
+ - lib/stripe/error_object.rb
98
42
  - lib/stripe/errors.rb
99
- - lib/stripe/event.rb
100
- - lib/stripe/exchange_rate.rb
101
- - lib/stripe/file.rb
102
- - lib/stripe/file_link.rb
103
- - lib/stripe/invoice.rb
104
- - lib/stripe/invoice_item.rb
105
- - lib/stripe/invoice_line_item.rb
106
- - lib/stripe/issuer_fraud_record.rb
107
- - lib/stripe/issuing/authorization.rb
108
- - lib/stripe/issuing/card.rb
109
- - lib/stripe/issuing/card_details.rb
110
- - lib/stripe/issuing/cardholder.rb
111
- - lib/stripe/issuing/dispute.rb
112
- - lib/stripe/issuing/transaction.rb
43
+ - lib/stripe/instrumentation.rb
113
44
  - lib/stripe/list_object.rb
114
- - lib/stripe/login_link.rb
45
+ - lib/stripe/multipart_encoder.rb
115
46
  - lib/stripe/oauth.rb
116
- - lib/stripe/order.rb
117
- - lib/stripe/order_return.rb
118
- - lib/stripe/payment_intent.rb
119
- - lib/stripe/payment_method.rb
120
- - lib/stripe/payout.rb
121
- - lib/stripe/person.rb
122
- - lib/stripe/plan.rb
123
- - lib/stripe/product.rb
124
- - lib/stripe/radar/early_fraud_warning.rb
125
- - lib/stripe/radar/value_list.rb
126
- - lib/stripe/radar/value_list_item.rb
127
- - lib/stripe/recipient.rb
128
- - lib/stripe/recipient_transfer.rb
129
- - lib/stripe/refund.rb
130
- - lib/stripe/reporting/report_run.rb
131
- - lib/stripe/reporting/report_type.rb
132
- - lib/stripe/reversal.rb
133
- - lib/stripe/review.rb
134
- - lib/stripe/sigma/scheduled_query_run.rb
47
+ - lib/stripe/object_types.rb
48
+ - lib/stripe/resources.rb
49
+ - lib/stripe/resources/account.rb
50
+ - lib/stripe/resources/account_link.rb
51
+ - lib/stripe/resources/alipay_account.rb
52
+ - lib/stripe/resources/apple_pay_domain.rb
53
+ - lib/stripe/resources/application_fee.rb
54
+ - lib/stripe/resources/application_fee_refund.rb
55
+ - lib/stripe/resources/balance.rb
56
+ - lib/stripe/resources/balance_transaction.rb
57
+ - lib/stripe/resources/bank_account.rb
58
+ - lib/stripe/resources/billing_portal/configuration.rb
59
+ - lib/stripe/resources/billing_portal/session.rb
60
+ - lib/stripe/resources/bitcoin_receiver.rb
61
+ - lib/stripe/resources/bitcoin_transaction.rb
62
+ - lib/stripe/resources/capability.rb
63
+ - lib/stripe/resources/card.rb
64
+ - lib/stripe/resources/charge.rb
65
+ - lib/stripe/resources/checkout/session.rb
66
+ - lib/stripe/resources/country_spec.rb
67
+ - lib/stripe/resources/coupon.rb
68
+ - lib/stripe/resources/credit_note.rb
69
+ - lib/stripe/resources/credit_note_line_item.rb
70
+ - lib/stripe/resources/customer.rb
71
+ - lib/stripe/resources/customer_balance_transaction.rb
72
+ - lib/stripe/resources/discount.rb
73
+ - lib/stripe/resources/dispute.rb
74
+ - lib/stripe/resources/ephemeral_key.rb
75
+ - lib/stripe/resources/event.rb
76
+ - lib/stripe/resources/exchange_rate.rb
77
+ - lib/stripe/resources/file.rb
78
+ - lib/stripe/resources/file_link.rb
79
+ - lib/stripe/resources/identity/verification_report.rb
80
+ - lib/stripe/resources/identity/verification_session.rb
81
+ - lib/stripe/resources/invoice.rb
82
+ - lib/stripe/resources/invoice_item.rb
83
+ - lib/stripe/resources/invoice_line_item.rb
84
+ - lib/stripe/resources/issuing/authorization.rb
85
+ - lib/stripe/resources/issuing/card.rb
86
+ - lib/stripe/resources/issuing/card_details.rb
87
+ - lib/stripe/resources/issuing/cardholder.rb
88
+ - lib/stripe/resources/issuing/dispute.rb
89
+ - lib/stripe/resources/issuing/transaction.rb
90
+ - lib/stripe/resources/line_item.rb
91
+ - lib/stripe/resources/login_link.rb
92
+ - lib/stripe/resources/mandate.rb
93
+ - lib/stripe/resources/order.rb
94
+ - lib/stripe/resources/order_return.rb
95
+ - lib/stripe/resources/payment_intent.rb
96
+ - lib/stripe/resources/payment_method.rb
97
+ - lib/stripe/resources/payout.rb
98
+ - lib/stripe/resources/person.rb
99
+ - lib/stripe/resources/plan.rb
100
+ - lib/stripe/resources/price.rb
101
+ - lib/stripe/resources/product.rb
102
+ - lib/stripe/resources/promotion_code.rb
103
+ - lib/stripe/resources/quote.rb
104
+ - lib/stripe/resources/radar/early_fraud_warning.rb
105
+ - lib/stripe/resources/radar/value_list.rb
106
+ - lib/stripe/resources/radar/value_list_item.rb
107
+ - lib/stripe/resources/recipient.rb
108
+ - lib/stripe/resources/recipient_transfer.rb
109
+ - lib/stripe/resources/refund.rb
110
+ - lib/stripe/resources/reporting/report_run.rb
111
+ - lib/stripe/resources/reporting/report_type.rb
112
+ - lib/stripe/resources/reversal.rb
113
+ - lib/stripe/resources/review.rb
114
+ - lib/stripe/resources/setup_attempt.rb
115
+ - lib/stripe/resources/setup_intent.rb
116
+ - lib/stripe/resources/shipping_rate.rb
117
+ - lib/stripe/resources/sigma/scheduled_query_run.rb
118
+ - lib/stripe/resources/sku.rb
119
+ - lib/stripe/resources/source.rb
120
+ - lib/stripe/resources/source_transaction.rb
121
+ - lib/stripe/resources/subscription.rb
122
+ - lib/stripe/resources/subscription_item.rb
123
+ - lib/stripe/resources/subscription_schedule.rb
124
+ - lib/stripe/resources/tax_code.rb
125
+ - lib/stripe/resources/tax_id.rb
126
+ - lib/stripe/resources/tax_rate.rb
127
+ - lib/stripe/resources/terminal/connection_token.rb
128
+ - lib/stripe/resources/terminal/location.rb
129
+ - lib/stripe/resources/terminal/reader.rb
130
+ - lib/stripe/resources/three_d_secure.rb
131
+ - lib/stripe/resources/token.rb
132
+ - lib/stripe/resources/topup.rb
133
+ - lib/stripe/resources/transfer.rb
134
+ - lib/stripe/resources/usage_record.rb
135
+ - lib/stripe/resources/usage_record_summary.rb
136
+ - lib/stripe/resources/webhook_endpoint.rb
135
137
  - lib/stripe/singleton_api_resource.rb
136
- - lib/stripe/sku.rb
137
- - lib/stripe/source.rb
138
- - lib/stripe/source_transaction.rb
139
138
  - lib/stripe/stripe_client.rb
139
+ - lib/stripe/stripe_configuration.rb
140
140
  - lib/stripe/stripe_object.rb
141
141
  - lib/stripe/stripe_response.rb
142
- - lib/stripe/subscription.rb
143
- - lib/stripe/subscription_item.rb
144
- - lib/stripe/subscription_schedule.rb
145
- - lib/stripe/subscription_schedule_revision.rb
146
- - lib/stripe/tax_id.rb
147
- - lib/stripe/tax_rate.rb
148
- - lib/stripe/terminal/connection_token.rb
149
- - lib/stripe/terminal/location.rb
150
- - lib/stripe/terminal/reader.rb
151
- - lib/stripe/three_d_secure.rb
152
- - lib/stripe/token.rb
153
- - lib/stripe/topup.rb
154
- - lib/stripe/transfer.rb
155
- - lib/stripe/usage_record.rb
156
- - lib/stripe/usage_record_summary.rb
157
142
  - lib/stripe/util.rb
158
143
  - lib/stripe/version.rb
159
144
  - lib/stripe/webhook.rb
160
- - lib/stripe/webhook_endpoint.rb
161
145
  - stripe.gemspec
162
- - test/api_stub_helpers.rb
163
- - test/openapi/README.md
164
- - test/stripe/account_link_test.rb
165
- - test/stripe/account_test.rb
166
- - test/stripe/alipay_account_test.rb
167
- - test/stripe/api_operations_test.rb
168
- - test/stripe/api_resource_test.rb
169
- - test/stripe/apple_pay_domain_test.rb
170
- - test/stripe/application_fee_refund_test.rb
171
- - test/stripe/application_fee_test.rb
172
- - test/stripe/balance_test.rb
173
- - test/stripe/bank_account_test.rb
174
- - test/stripe/capability_test.rb
175
- - test/stripe/charge_test.rb
176
- - test/stripe/checkout/session_test.rb
177
- - test/stripe/country_spec_test.rb
178
- - test/stripe/coupon_test.rb
179
- - test/stripe/credit_note_test.rb
180
- - test/stripe/customer_card_test.rb
181
- - test/stripe/customer_test.rb
182
- - test/stripe/dispute_test.rb
183
- - test/stripe/ephemeral_key_test.rb
184
- - test/stripe/errors_test.rb
185
- - test/stripe/exchange_rate_test.rb
186
- - test/stripe/file_link_test.rb
187
- - test/stripe/file_test.rb
188
- - test/stripe/file_upload_test.rb
189
- - test/stripe/invoice_item_test.rb
190
- - test/stripe/invoice_line_item_test.rb
191
- - test/stripe/invoice_test.rb
192
- - test/stripe/issuer_fraud_record_test.rb
193
- - test/stripe/issuing/authorization_test.rb
194
- - test/stripe/issuing/card_test.rb
195
- - test/stripe/issuing/cardholder_test.rb
196
- - test/stripe/issuing/dispute_test.rb
197
- - test/stripe/issuing/transaction_test.rb
198
- - test/stripe/list_object_test.rb
199
- - test/stripe/login_link_test.rb
200
- - test/stripe/oauth_test.rb
201
- - test/stripe/order_return_test.rb
202
- - test/stripe/order_test.rb
203
- - test/stripe/payment_intent_test.rb
204
- - test/stripe/payment_method_test.rb
205
- - test/stripe/payout_test.rb
206
- - test/stripe/person_test.rb
207
- - test/stripe/plan_test.rb
208
- - test/stripe/product_test.rb
209
- - test/stripe/radar/early_fraud_warning_test.rb
210
- - test/stripe/radar/value_list_item_test.rb
211
- - test/stripe/radar/value_list_test.rb
212
- - test/stripe/recipient_test.rb
213
- - test/stripe/refund_test.rb
214
- - test/stripe/reporting/report_run_test.rb
215
- - test/stripe/reporting/report_type_test.rb
216
- - test/stripe/reversal_test.rb
217
- - test/stripe/review_test.rb
218
- - test/stripe/sigma/scheduled_query_run_test.rb
219
- - test/stripe/sku_test.rb
220
- - test/stripe/source_test.rb
221
- - test/stripe/source_transaction_test.rb
222
- - test/stripe/stripe_client_test.rb
223
- - test/stripe/stripe_object_test.rb
224
- - test/stripe/stripe_response_test.rb
225
- - test/stripe/subscription_item_test.rb
226
- - test/stripe/subscription_schedule_revision_test.rb
227
- - test/stripe/subscription_schedule_test.rb
228
- - test/stripe/subscription_test.rb
229
- - test/stripe/tax_id_test.rb
230
- - test/stripe/tax_rate_test.rb
231
- - test/stripe/terminal/connection_token_test.rb
232
- - test/stripe/terminal/location_test.rb
233
- - test/stripe/terminal/reader_test.rb
234
- - test/stripe/three_d_secure_test.rb
235
- - test/stripe/topup_test.rb
236
- - test/stripe/transfer_test.rb
237
- - test/stripe/usage_record_summary_test.rb
238
- - test/stripe/usage_record_test.rb
239
- - test/stripe/util_test.rb
240
- - test/stripe/webhook_endpoint_test.rb
241
- - test/stripe/webhook_test.rb
242
- - test/stripe_mock.rb
243
- - test/stripe_test.rb
244
- - test/test_data.rb
245
- - test/test_helper.rb
246
146
  homepage: https://stripe.com/docs/api/ruby
247
147
  licenses:
248
148
  - MIT
249
- metadata: {}
149
+ metadata:
150
+ bug_tracker_uri: https://github.com/stripe/stripe-ruby/issues
151
+ changelog_uri: https://github.com/stripe/stripe-ruby/blob/master/CHANGELOG.md
152
+ documentation_uri: https://stripe.com/docs/api/ruby
153
+ github_repo: ssh://github.com/stripe/stripe-ruby
154
+ homepage_uri: https://stripe.com/docs/api/ruby
155
+ source_code_uri: https://github.com/stripe/stripe-ruby
250
156
  post_install_message:
251
157
  rdoc_options: []
252
158
  require_paths:
@@ -255,99 +161,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
255
161
  requirements:
256
162
  - - ">="
257
163
  - !ruby/object:Gem::Version
258
- version: 2.1.0
164
+ version: 2.3.0
259
165
  required_rubygems_version: !ruby/object:Gem::Requirement
260
166
  requirements:
261
167
  - - ">="
262
168
  - !ruby/object:Gem::Version
263
169
  version: '0'
264
170
  requirements: []
265
- rubygems_version: 3.0.3
171
+ rubygems_version: 3.1.2
266
172
  signing_key:
267
173
  specification_version: 4
268
174
  summary: Ruby bindings for the Stripe API
269
- test_files:
270
- - test/api_stub_helpers.rb
271
- - test/openapi/README.md
272
- - test/stripe/account_link_test.rb
273
- - test/stripe/account_test.rb
274
- - test/stripe/alipay_account_test.rb
275
- - test/stripe/api_operations_test.rb
276
- - test/stripe/api_resource_test.rb
277
- - test/stripe/apple_pay_domain_test.rb
278
- - test/stripe/application_fee_refund_test.rb
279
- - test/stripe/application_fee_test.rb
280
- - test/stripe/balance_test.rb
281
- - test/stripe/bank_account_test.rb
282
- - test/stripe/capability_test.rb
283
- - test/stripe/charge_test.rb
284
- - test/stripe/checkout/session_test.rb
285
- - test/stripe/country_spec_test.rb
286
- - test/stripe/coupon_test.rb
287
- - test/stripe/credit_note_test.rb
288
- - test/stripe/customer_card_test.rb
289
- - test/stripe/customer_test.rb
290
- - test/stripe/dispute_test.rb
291
- - test/stripe/ephemeral_key_test.rb
292
- - test/stripe/errors_test.rb
293
- - test/stripe/exchange_rate_test.rb
294
- - test/stripe/file_link_test.rb
295
- - test/stripe/file_test.rb
296
- - test/stripe/file_upload_test.rb
297
- - test/stripe/invoice_item_test.rb
298
- - test/stripe/invoice_line_item_test.rb
299
- - test/stripe/invoice_test.rb
300
- - test/stripe/issuer_fraud_record_test.rb
301
- - test/stripe/issuing/authorization_test.rb
302
- - test/stripe/issuing/card_test.rb
303
- - test/stripe/issuing/cardholder_test.rb
304
- - test/stripe/issuing/dispute_test.rb
305
- - test/stripe/issuing/transaction_test.rb
306
- - test/stripe/list_object_test.rb
307
- - test/stripe/login_link_test.rb
308
- - test/stripe/oauth_test.rb
309
- - test/stripe/order_return_test.rb
310
- - test/stripe/order_test.rb
311
- - test/stripe/payment_intent_test.rb
312
- - test/stripe/payment_method_test.rb
313
- - test/stripe/payout_test.rb
314
- - test/stripe/person_test.rb
315
- - test/stripe/plan_test.rb
316
- - test/stripe/product_test.rb
317
- - test/stripe/radar/early_fraud_warning_test.rb
318
- - test/stripe/radar/value_list_item_test.rb
319
- - test/stripe/radar/value_list_test.rb
320
- - test/stripe/recipient_test.rb
321
- - test/stripe/refund_test.rb
322
- - test/stripe/reporting/report_run_test.rb
323
- - test/stripe/reporting/report_type_test.rb
324
- - test/stripe/reversal_test.rb
325
- - test/stripe/review_test.rb
326
- - test/stripe/sigma/scheduled_query_run_test.rb
327
- - test/stripe/sku_test.rb
328
- - test/stripe/source_test.rb
329
- - test/stripe/source_transaction_test.rb
330
- - test/stripe/stripe_client_test.rb
331
- - test/stripe/stripe_object_test.rb
332
- - test/stripe/stripe_response_test.rb
333
- - test/stripe/subscription_item_test.rb
334
- - test/stripe/subscription_schedule_revision_test.rb
335
- - test/stripe/subscription_schedule_test.rb
336
- - test/stripe/subscription_test.rb
337
- - test/stripe/tax_id_test.rb
338
- - test/stripe/tax_rate_test.rb
339
- - test/stripe/terminal/connection_token_test.rb
340
- - test/stripe/terminal/location_test.rb
341
- - test/stripe/terminal/reader_test.rb
342
- - test/stripe/three_d_secure_test.rb
343
- - test/stripe/topup_test.rb
344
- - test/stripe/transfer_test.rb
345
- - test/stripe/usage_record_summary_test.rb
346
- - test/stripe/usage_record_test.rb
347
- - test/stripe/util_test.rb
348
- - test/stripe/webhook_endpoint_test.rb
349
- - test/stripe/webhook_test.rb
350
- - test/stripe_mock.rb
351
- - test/stripe_test.rb
352
- - test/test_data.rb
353
- - test/test_helper.rb
175
+ test_files: []
data/.editorconfig DELETED
@@ -1,10 +0,0 @@
1
- # see http://editorconfig.org/
2
-
3
- root = true
4
-
5
- [*]
6
- indent_style = space
7
- indent_size = 2
8
- end_of_line = lf
9
- charset = utf-8
10
- insert_final_newline = true
data/.gitattributes DELETED
@@ -1,4 +0,0 @@
1
- # may be useful in hiding large schema changes in pull request diffs (but not
2
- # using it for now)
3
- spec/*.json binary
4
- spec/*.yaml binary
@@ -1,5 +0,0 @@
1
- Please only file issues here that you believe represent actual bugs or feature requests for the Stripe Ruby library.
2
-
3
- If you're having general trouble with your Stripe integration, please reach out to support using the form at https://support.stripe.com/ (preferred) or via email to support@stripe.com.
4
-
5
- If you are reporting a bug, please include your Ruby version and the version of the Stripe Ruby library you're using, as well as any other details that may be helpful in reproducing the problem.
data/.gitignore DELETED
@@ -1,8 +0,0 @@
1
- /stripe-*.gem
2
- /Gemfile.lock
3
- .rvmrc
4
- Gemfile.lock
5
- tags
6
- /.bundle/
7
- coverage/
8
- .idea/
data/.rubocop.yml DELETED
@@ -1,42 +0,0 @@
1
- inherit_from: .rubocop_todo.yml
2
-
3
- AllCops:
4
- DisplayCopNames: true
5
- TargetRubyVersion: 2.1
6
-
7
- Layout/CaseIndentation:
8
- EnforcedStyle: end
9
-
10
- Layout/IndentArray:
11
- EnforcedStyle: consistent
12
-
13
- Layout/IndentHash:
14
- EnforcedStyle: consistent
15
-
16
- Metrics/LineLength:
17
- Exclude:
18
- - "test/**/*.rb"
19
-
20
- Metrics/MethodLength:
21
- # There's ~2 long methods in `StripeClient`. If we want to truncate those a
22
- # little, we could move this to be closer to ~30 (but the default of 10 is
23
- # probably too short).
24
- Max: 50
25
-
26
- Metrics/ModuleLength:
27
- Enabled: false
28
-
29
- Style/AccessModifierDeclarations:
30
- EnforcedStyle: inline
31
-
32
- Style/FrozenStringLiteralComment:
33
- EnforcedStyle: always
34
-
35
- Style/StringLiterals:
36
- EnforcedStyle: double_quotes
37
-
38
- Style/TrailingCommaInArrayLiteral:
39
- EnforcedStyleForMultiline: consistent_comma
40
-
41
- Style/TrailingCommaInHashLiteral:
42
- EnforcedStyleForMultiline: consistent_comma
data/.rubocop_todo.yml DELETED
@@ -1,38 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2019-05-24 10:18:48 -0700 using RuboCop version 0.57.2.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 20
10
- Metrics/AbcSize:
11
- Max: 53
12
-
13
- # Offense count: 31
14
- # Configuration parameters: CountComments, ExcludedMethods.
15
- Metrics/BlockLength:
16
- Max: 498
17
-
18
- # Offense count: 11
19
- # Configuration parameters: CountComments.
20
- Metrics/ClassLength:
21
- Max: 673
22
-
23
- # Offense count: 12
24
- Metrics/CyclomaticComplexity:
25
- Max: 15
26
-
27
- # Offense count: 6
28
- # Configuration parameters: CountKeywordArgs.
29
- Metrics/ParameterLists:
30
- Max: 7
31
-
32
- # Offense count: 7
33
- Metrics/PerceivedComplexity:
34
- Max: 17
35
-
36
- # Offense count: 84
37
- Style/Documentation:
38
- Enabled: false
data/.travis.yml DELETED
@@ -1,43 +0,0 @@
1
- language: ruby
2
-
3
- rvm:
4
- - 2.1
5
- - 2.2
6
- - 2.3
7
- - 2.4
8
- - 2.5
9
- - 2.6
10
- - jruby-9.0.5.0
11
-
12
- notifications:
13
- email:
14
- on_success: never
15
-
16
- sudo: false
17
-
18
- env:
19
- global:
20
- # If changing this number, please also change it in `test/test_helper.rb`.
21
- - STRIPE_MOCK_VERSION=0.57.0
22
-
23
- cache:
24
- directories:
25
- - stripe-mock
26
-
27
- before_install:
28
- # Install bundler 1.x, because we need to support Ruby 2.1 for now
29
- - gem install bundler -v "~> 1.0"
30
- # Unpack and start stripe-mock so that the test suite can talk to it
31
- - |
32
- if [ ! -d "stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}" ]; then
33
- mkdir -p stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}/
34
- curl -L "https://github.com/stripe/stripe-mock/releases/download/v${STRIPE_MOCK_VERSION}/stripe-mock_${STRIPE_MOCK_VERSION}_linux_amd64.tar.gz" -o "stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}_linux_amd64.tar.gz"
35
- tar -zxf "stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}_linux_amd64.tar.gz" -C "stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}/"
36
- fi
37
- - |
38
- stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}/stripe-mock > /dev/null &
39
- STRIPE_MOCK_PID=$!
40
- - export PATH="${PATH}:${PWD}/stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}"
41
-
42
- script:
43
- - bundle exec rake
@@ -1,7 +0,0 @@
1
- {
2
- "recommendations": [
3
- "rebornix.ruby",
4
- "misogi.ruby-rubocop",
5
- "EditorConfig.editorconfig"
6
- ]
7
- }
@@ -1,8 +0,0 @@
1
- {
2
- "editor.formatOnSave": true,
3
- "files.trimTrailingWhitespace": true,
4
-
5
- // Rubocop settings
6
- "ruby.rubocop.configFilePath": ".rubocop.yml",
7
- "ruby.rubocop.onSave": true
8
- }
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Stripe
4
- class ApplicationFee < APIResource
5
- extend Stripe::APIOperations::List
6
- extend Stripe::APIOperations::NestedResource
7
-
8
- OBJECT_NAME = "application_fee".freeze
9
-
10
- nested_resource_class_methods :refund,
11
- operations: %i[create retrieve update list]
12
-
13
- # If you don't need access to an updated fee object after the refund, it's
14
- # more performant to just call `fee.refunds.create` directly.
15
- def refund(params = {}, opts = {})
16
- refunds.create(params, opts)
17
-
18
- # now that a refund has been created, we expect the state of this object
19
- # to change as well (i.e. `refunded` will now be `true`) so refresh it
20
- # from the server
21
- refresh
22
- end
23
- end
24
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Stripe
4
- class BitcoinTransaction < APIResource
5
- # Directly retrieving BitcoinTransactions is deprecated. Please use the
6
- # Sources API instead: https://stripe.com/docs/sources/bitcoin
7
- extend Stripe::APIOperations::List
8
-
9
- OBJECT_NAME = "bitcoin_transaction".freeze
10
-
11
- def self.resource_url
12
- "/v1/bitcoin/transactions"
13
- end
14
- end
15
- end