stripe 4.21.3 → 5.52.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (226) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +254 -1
  3. data/CODE_OF_CONDUCT.md +77 -0
  4. data/Gemfile +10 -16
  5. data/Makefile +7 -0
  6. data/README.md +115 -47
  7. data/Rakefile +8 -7
  8. data/VERSION +1 -1
  9. data/lib/stripe/api_operations/create.rb +1 -1
  10. data/lib/stripe/api_operations/delete.rb +7 -3
  11. data/lib/stripe/api_operations/list.rb +1 -12
  12. data/lib/stripe/api_operations/nested_resource.rb +29 -26
  13. data/lib/stripe/api_operations/request.rb +82 -6
  14. data/lib/stripe/api_operations/save.rb +7 -4
  15. data/lib/stripe/api_operations/search.rb +19 -0
  16. data/lib/stripe/api_resource.rb +22 -17
  17. data/lib/stripe/api_resource_test_helpers.rb +47 -0
  18. data/lib/stripe/connection_manager.rb +200 -0
  19. data/lib/stripe/error_object.rb +93 -0
  20. data/lib/stripe/errors.rb +24 -3
  21. data/lib/stripe/instrumentation.rb +84 -0
  22. data/lib/stripe/list_object.rb +34 -5
  23. data/lib/stripe/multipart_encoder.rb +131 -0
  24. data/lib/stripe/oauth.rb +8 -6
  25. data/lib/stripe/object_types.rb +20 -5
  26. data/lib/stripe/resources/account.rb +12 -16
  27. data/lib/stripe/resources/account_link.rb +2 -1
  28. data/lib/stripe/resources/alipay_account.rb +1 -1
  29. data/lib/stripe/resources/apple_pay_domain.rb +2 -1
  30. data/lib/stripe/resources/application_fee.rb +2 -12
  31. data/lib/stripe/resources/application_fee_refund.rb +3 -2
  32. data/lib/stripe/resources/balance.rb +2 -1
  33. data/lib/stripe/resources/balance_transaction.rb +2 -5
  34. data/lib/stripe/resources/bank_account.rb +3 -2
  35. data/lib/stripe/resources/billing_portal/configuration.rb +14 -0
  36. data/lib/stripe/resources/billing_portal/session.rb +12 -0
  37. data/lib/stripe/resources/bitcoin_receiver.rb +2 -1
  38. data/lib/stripe/resources/bitcoin_transaction.rb +4 -3
  39. data/lib/stripe/resources/capability.rb +3 -2
  40. data/lib/stripe/resources/card.rb +2 -1
  41. data/lib/stripe/resources/charge.rb +13 -65
  42. data/lib/stripe/resources/checkout/session.rb +17 -1
  43. data/lib/stripe/resources/country_spec.rb +2 -1
  44. data/lib/stripe/resources/coupon.rb +2 -1
  45. data/lib/stripe/resources/credit_note.rb +18 -3
  46. data/lib/stripe/resources/credit_note_line_item.rb +8 -0
  47. data/lib/stripe/resources/customer.rb +35 -59
  48. data/lib/stripe/resources/customer_balance_transaction.rb +4 -3
  49. data/lib/stripe/resources/discount.rb +2 -1
  50. data/lib/stripe/resources/dispute.rb +8 -9
  51. data/lib/stripe/resources/ephemeral_key.rb +2 -1
  52. data/lib/stripe/resources/event.rb +2 -1
  53. data/lib/stripe/resources/exchange_rate.rb +2 -1
  54. data/lib/stripe/resources/file.rb +6 -14
  55. data/lib/stripe/resources/file_link.rb +2 -1
  56. data/lib/stripe/resources/funding_instructions.rb +16 -0
  57. data/lib/stripe/resources/identity/verification_report.rb +12 -0
  58. data/lib/stripe/resources/identity/verification_session.rb +35 -0
  59. data/lib/stripe/resources/invoice.rb +47 -12
  60. data/lib/stripe/resources/invoice_item.rb +2 -1
  61. data/lib/stripe/resources/invoice_line_item.rb +2 -1
  62. data/lib/stripe/resources/issuing/authorization.rb +14 -5
  63. data/lib/stripe/resources/issuing/card.rb +8 -3
  64. data/lib/stripe/resources/issuing/card_details.rb +3 -2
  65. data/lib/stripe/resources/issuing/cardholder.rb +2 -1
  66. data/lib/stripe/resources/issuing/dispute.rb +13 -1
  67. data/lib/stripe/resources/issuing/transaction.rb +2 -1
  68. data/lib/stripe/resources/line_item.rb +8 -0
  69. data/lib/stripe/resources/login_link.rb +2 -1
  70. data/lib/stripe/resources/mandate.rb +8 -0
  71. data/lib/stripe/resources/order.rb +14 -13
  72. data/lib/stripe/resources/order_return.rb +2 -1
  73. data/lib/stripe/resources/payment_intent.rb +59 -7
  74. data/lib/stripe/resources/payment_link.rb +23 -0
  75. data/lib/stripe/resources/payment_method.rb +14 -5
  76. data/lib/stripe/resources/payout.rb +16 -7
  77. data/lib/stripe/resources/person.rb +2 -1
  78. data/lib/stripe/resources/plan.rb +2 -1
  79. data/lib/stripe/resources/price.rb +21 -0
  80. data/lib/stripe/resources/product.rb +11 -1
  81. data/lib/stripe/resources/promotion_code.rb +12 -0
  82. data/lib/stripe/resources/quote.rb +105 -0
  83. data/lib/stripe/resources/radar/early_fraud_warning.rb +2 -1
  84. data/lib/stripe/resources/radar/value_list.rb +2 -1
  85. data/lib/stripe/resources/radar/value_list_item.rb +2 -1
  86. data/lib/stripe/resources/recipient.rb +2 -5
  87. data/lib/stripe/resources/recipient_transfer.rb +1 -1
  88. data/lib/stripe/resources/refund.rb +13 -1
  89. data/lib/stripe/resources/reporting/report_run.rb +2 -1
  90. data/lib/stripe/resources/reporting/report_type.rb +2 -1
  91. data/lib/stripe/resources/reversal.rb +4 -3
  92. data/lib/stripe/resources/review.rb +8 -3
  93. data/lib/stripe/resources/setup_attempt.rb +10 -0
  94. data/lib/stripe/resources/setup_intent.rb +24 -5
  95. data/lib/stripe/resources/shipping_rate.rb +12 -0
  96. data/lib/stripe/resources/sigma/scheduled_query_run.rb +2 -1
  97. data/lib/stripe/resources/sku.rb +2 -1
  98. data/lib/stripe/resources/source.rb +17 -12
  99. data/lib/stripe/resources/source_transaction.rb +2 -1
  100. data/lib/stripe/resources/subscription.rb +16 -6
  101. data/lib/stripe/resources/subscription_item.rb +11 -2
  102. data/lib/stripe/resources/subscription_schedule.rb +14 -13
  103. data/lib/stripe/resources/tax_code.rb +10 -0
  104. data/lib/stripe/resources/tax_id.rb +2 -1
  105. data/lib/stripe/resources/tax_rate.rb +2 -1
  106. data/lib/stripe/resources/terminal/configuration.rb +15 -0
  107. data/lib/stripe/resources/terminal/connection_token.rb +2 -1
  108. data/lib/stripe/resources/terminal/location.rb +2 -1
  109. data/lib/stripe/resources/terminal/reader.rb +62 -1
  110. data/lib/stripe/resources/test_helpers/test_clock.rb +25 -0
  111. data/lib/stripe/resources/three_d_secure.rb +2 -1
  112. data/lib/stripe/resources/token.rb +2 -1
  113. data/lib/stripe/resources/topup.rb +8 -3
  114. data/lib/stripe/resources/transfer.rb +8 -8
  115. data/lib/stripe/resources/usage_record.rb +2 -17
  116. data/lib/stripe/resources/usage_record_summary.rb +2 -1
  117. data/lib/stripe/resources/webhook_endpoint.rb +2 -1
  118. data/lib/stripe/resources.rb +18 -2
  119. data/lib/stripe/search_result_object.rb +86 -0
  120. data/lib/stripe/stripe_client.rb +617 -243
  121. data/lib/stripe/stripe_configuration.rb +194 -0
  122. data/lib/stripe/stripe_object.rb +30 -25
  123. data/lib/stripe/stripe_response.rb +87 -27
  124. data/lib/stripe/util.rb +88 -18
  125. data/lib/stripe/version.rb +1 -1
  126. data/lib/stripe/webhook.rb +39 -8
  127. data/lib/stripe.rb +43 -131
  128. data/stripe.gemspec +17 -13
  129. metadata +36 -220
  130. data/.editorconfig +0 -10
  131. data/.gitattributes +0 -4
  132. data/.github/ISSUE_TEMPLATE.md +0 -5
  133. data/.gitignore +0 -8
  134. data/.rubocop.yml +0 -43
  135. data/.rubocop_todo.yml +0 -38
  136. data/.travis.yml +0 -43
  137. data/.vscode/extensions.json +0 -7
  138. data/.vscode/settings.json +0 -8
  139. data/lib/stripe/resources/issuer_fraud_record.rb +0 -9
  140. data/lib/stripe/resources/subscription_schedule_revision.rb +0 -34
  141. data/test/api_stub_helpers.rb +0 -1
  142. data/test/openapi/README.md +0 -9
  143. data/test/stripe/account_link_test.rb +0 -18
  144. data/test/stripe/account_test.rb +0 -428
  145. data/test/stripe/alipay_account_test.rb +0 -37
  146. data/test/stripe/api_operations_test.rb +0 -80
  147. data/test/stripe/api_resource_test.rb +0 -544
  148. data/test/stripe/apple_pay_domain_test.rb +0 -46
  149. data/test/stripe/application_fee_refund_test.rb +0 -37
  150. data/test/stripe/application_fee_test.rb +0 -58
  151. data/test/stripe/balance_test.rb +0 -13
  152. data/test/stripe/bank_account_test.rb +0 -36
  153. data/test/stripe/capability_test.rb +0 -45
  154. data/test/stripe/charge_test.rb +0 -80
  155. data/test/stripe/checkout/session_test.rb +0 -41
  156. data/test/stripe/country_spec_test.rb +0 -20
  157. data/test/stripe/coupon_test.rb +0 -61
  158. data/test/stripe/credit_note_test.rb +0 -61
  159. data/test/stripe/customer_balance_transaction_test.rb +0 -37
  160. data/test/stripe/customer_card_test.rb +0 -42
  161. data/test/stripe/customer_test.rb +0 -269
  162. data/test/stripe/dispute_test.rb +0 -51
  163. data/test/stripe/ephemeral_key_test.rb +0 -93
  164. data/test/stripe/errors_test.rb +0 -20
  165. data/test/stripe/exchange_rate_test.rb +0 -20
  166. data/test/stripe/file_link_test.rb +0 -41
  167. data/test/stripe/file_test.rb +0 -97
  168. data/test/stripe/file_upload_test.rb +0 -79
  169. data/test/stripe/invoice_item_test.rb +0 -66
  170. data/test/stripe/invoice_line_item_test.rb +0 -8
  171. data/test/stripe/invoice_test.rb +0 -213
  172. data/test/stripe/issuer_fraud_record_test.rb +0 -20
  173. data/test/stripe/issuing/authorization_test.rb +0 -72
  174. data/test/stripe/issuing/card_test.rb +0 -62
  175. data/test/stripe/issuing/cardholder_test.rb +0 -53
  176. data/test/stripe/issuing/dispute_test.rb +0 -45
  177. data/test/stripe/issuing/transaction_test.rb +0 -48
  178. data/test/stripe/list_object_test.rb +0 -156
  179. data/test/stripe/login_link_test.rb +0 -37
  180. data/test/stripe/oauth_test.rb +0 -88
  181. data/test/stripe/order_return_test.rb +0 -21
  182. data/test/stripe/order_test.rb +0 -82
  183. data/test/stripe/payment_intent_test.rb +0 -107
  184. data/test/stripe/payment_method_test.rb +0 -84
  185. data/test/stripe/payout_test.rb +0 -57
  186. data/test/stripe/person_test.rb +0 -46
  187. data/test/stripe/plan_test.rb +0 -98
  188. data/test/stripe/product_test.rb +0 -59
  189. data/test/stripe/radar/early_fraud_warning_test.rb +0 -22
  190. data/test/stripe/radar/value_list_item_test.rb +0 -48
  191. data/test/stripe/radar/value_list_test.rb +0 -61
  192. data/test/stripe/recipient_test.rb +0 -62
  193. data/test/stripe/refund_test.rb +0 -39
  194. data/test/stripe/reporting/report_run_test.rb +0 -33
  195. data/test/stripe/reporting/report_type_test.rb +0 -22
  196. data/test/stripe/reversal_test.rb +0 -43
  197. data/test/stripe/review_test.rb +0 -27
  198. data/test/stripe/setup_intent_test.rb +0 -84
  199. data/test/stripe/sigma/scheduled_query_run_test.rb +0 -22
  200. data/test/stripe/sku_test.rb +0 -60
  201. data/test/stripe/source_test.rb +0 -99
  202. data/test/stripe/source_transaction_test.rb +0 -19
  203. data/test/stripe/stripe_client_test.rb +0 -842
  204. data/test/stripe/stripe_object_test.rb +0 -525
  205. data/test/stripe/stripe_response_test.rb +0 -49
  206. data/test/stripe/subscription_item_test.rb +0 -63
  207. data/test/stripe/subscription_schedule_revision_test.rb +0 -37
  208. data/test/stripe/subscription_schedule_test.rb +0 -116
  209. data/test/stripe/subscription_test.rb +0 -80
  210. data/test/stripe/tax_id_test.rb +0 -31
  211. data/test/stripe/tax_rate_test.rb +0 -43
  212. data/test/stripe/terminal/connection_token_test.rb +0 -16
  213. data/test/stripe/terminal/location_test.rb +0 -68
  214. data/test/stripe/terminal/reader_test.rb +0 -62
  215. data/test/stripe/three_d_secure_test.rb +0 -23
  216. data/test/stripe/topup_test.rb +0 -62
  217. data/test/stripe/transfer_test.rb +0 -88
  218. data/test/stripe/usage_record_summary_test.rb +0 -19
  219. data/test/stripe/usage_record_test.rb +0 -28
  220. data/test/stripe/util_test.rb +0 -402
  221. data/test/stripe/webhook_endpoint_test.rb +0 -59
  222. data/test/stripe/webhook_test.rb +0 -96
  223. data/test/stripe_mock.rb +0 -77
  224. data/test/stripe_test.rb +0 -63
  225. data/test/test_data.rb +0 -61
  226. data/test/test_helper.rb +0 -71
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9231fd56adca6e557e0e6956a115e7f969096402747e143ff7d433442146f0ac
4
- data.tar.gz: 6f2a3c7a973e5f004518a83ccac1164f7eb354fe26816aa2f39bfa67b4b661e0
3
+ metadata.gz: 4555e15aac2bf452df614b0d95bb03e130c5033fbe36c1321a072f4d57d4bb5d
4
+ data.tar.gz: 678111bc76cca09d3f57bd98d80b82a3774073280572a9c692a16c3342968da0
5
5
  SHA512:
6
- metadata.gz: 66416730e242f3e1de13937d46143cfd3c2a2f97ac6cbdf908b9a01a1f12b158a3ee983e3f1d888bfccc734b518382889ef57dff9e215e448cd3572268883b99
7
- data.tar.gz: c6ac92bcbe56e3d19cb642677f5cbcaf89afe45f5321e6016931b9fc8a86b5e203efc10f9de5db9b5df4ac443a3f539d8e4374e547f1e1f24f65d3730dbe9e91
6
+ metadata.gz: 54798bd1c0f02db07744e05d657f354fa801da8cd4f20083a8e40f99c57168afde243711abd59c6a6477a439b19d7608a03177cea99a6638498f5b619521188d
7
+ data.tar.gz: 1fab9e4bc2380ad6ae41c04300ce4a9e789e5a5244487c3e1a3b08fea6e670614820b8e490893f5328c1dad37de18267057585fdb853b3584be0c5ccb99acfd0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,258 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.52.0 - 2022-04-18
4
+ * [#1046](https://github.com/stripe/stripe-ruby/pull/1046) [#1047](https://github.com/stripe/stripe-ruby/pull/1047) API Updates
5
+ * Add support for new resources `FundingInstructions` and `Terminal.Configuration`
6
+
7
+ ## 5.51.0 - 2022-04-15
8
+ * [#1046](https://github.com/stripe/stripe-ruby/pull/1046) This release was incomplete and was yanked from RubyGems immediately after it was published.
9
+
10
+ ## 5.50.0 - 2022-04-13
11
+ * [#1045](https://github.com/stripe/stripe-ruby/pull/1045) API Updates
12
+ * Add support for `increment_authorization` method on resource `PaymentIntent`
13
+
14
+ ## 5.49.0 - 2022-04-08
15
+ * [#1043](https://github.com/stripe/stripe-ruby/pull/1043) API Updates
16
+ * Add support for `apply_customer_balance` method on resource `PaymentIntent`
17
+
18
+ ## 5.48.0 - 2022-03-30
19
+ * [#1041](https://github.com/stripe/stripe-ruby/pull/1041) API Updates
20
+ * Add support for `cancel_action`, `process_payment_intent`, `process_setup_intent`, and `set_reader_display` methods on resource `Terminal.Reader`
21
+
22
+ ## 5.47.0 - 2022-03-29
23
+ * [#1040](https://github.com/stripe/stripe-ruby/pull/1040) API Updates
24
+ * Add support for Search API
25
+ * Add support for `search` method on resources `Charge`, `Customer`, `Invoice`, `PaymentIntent`, `Price`, `Product`, and `Subscription`
26
+
27
+ * [#1034](https://github.com/stripe/stripe-ruby/pull/1034) Add supporting classes for test helper generation
28
+
29
+ ## 5.46.0 - 2022-03-23
30
+ * [#1039](https://github.com/stripe/stripe-ruby/pull/1039) API Updates
31
+ * Add support for `cancel` method on resource `Refund`
32
+ * [#992](https://github.com/stripe/stripe-ruby/pull/992) Add support for Search API
33
+
34
+ ## 5.45.0 - 2022-03-01
35
+ * [#1035](https://github.com/stripe/stripe-ruby/pull/1035) API Updates
36
+ * Add support for new resource `TestHelpers.TestClock`
37
+
38
+ ## 5.44.0 - 2022-02-16
39
+ * [#1032](https://github.com/stripe/stripe-ruby/pull/1032) API Updates
40
+ * Add support for `verify_microdeposits` method on resources `PaymentIntent` and `SetupIntent`
41
+
42
+ ## 5.43.0 - 2022-01-20
43
+ * [#1031](https://github.com/stripe/stripe-ruby/pull/1031) API Updates
44
+ * Add support for new resource `PaymentLink`
45
+
46
+ ## 5.42.0 - 2021-12-13
47
+ * [#1022](https://github.com/stripe/stripe-ruby/pull/1022) Add connection manager logging and include object IDs in logging.
48
+
49
+ ## 5.41.0 - 2021-11-16
50
+ * [#1017](https://github.com/stripe/stripe-ruby/pull/1017) API Updates
51
+ * Add support for new resource `ShippingRate`
52
+
53
+ ## 5.40.0 - 2021-11-11
54
+ * [#1015](https://github.com/stripe/stripe-ruby/pull/1015) API Updates
55
+ * Add support for `expire` method on resource `Checkout.Session`
56
+ * [#1013](https://github.com/stripe/stripe-ruby/pull/1013) Add tests for child resources.
57
+ * [#1012](https://github.com/stripe/stripe-ruby/pull/1012) Add tests for namespaced resources.
58
+ * [#1011](https://github.com/stripe/stripe-ruby/pull/1011) codegen: 3 more files
59
+
60
+ ## 5.39.0 - 2021-10-11
61
+ * [#1010](https://github.com/stripe/stripe-ruby/pull/1010) API Updates
62
+ * Add support for `list_payment_methods` method on resource `Customer`
63
+
64
+ ## 5.38.0 - 2021-08-10
65
+ * [#993](https://github.com/stripe/stripe-ruby/pull/993) Add `request_id` to RequestEndEvent
66
+ * [#991](https://github.com/stripe/stripe-ruby/pull/991) Codegen more files
67
+ * [#989](https://github.com/stripe/stripe-ruby/pull/989) Remove unused API error types from docs.
68
+
69
+ ## 5.37.0 - 2021-07-14
70
+ * [#988](https://github.com/stripe/stripe-ruby/pull/988) API Updates
71
+ * Add support for `list_computed_upfront_line_items` method on resource `Quote`
72
+
73
+ ## 5.36.0 - 2021-07-09
74
+ * [#987](https://github.com/stripe/stripe-ruby/pull/987) Add support for `Quote` API
75
+
76
+ ## 5.35.0 - 2021-06-30
77
+ * [#985](https://github.com/stripe/stripe-ruby/pull/985) Update normalize_opts to use dup instead of clone.
78
+ * [#982](https://github.com/stripe/stripe-ruby/pull/982) Deprecate travis
79
+ * [#983](https://github.com/stripe/stripe-ruby/pull/983) Add support for making a request and receiving the response as a stream.
80
+
81
+ ## 5.34.0 - 2021-06-04
82
+ * [#981](https://github.com/stripe/stripe-ruby/pull/981) API Updates
83
+ * Add support for `TaxCode` API.
84
+
85
+ ## 5.33.0 - 2021-05-19
86
+ * [#979](https://github.com/stripe/stripe-ruby/pull/979) Add support for the Identify VerificationSession and VerificationReport APIs
87
+
88
+ ## 5.32.1 - 2021-04-05
89
+ * Correct use of regexp `match` in gemspec for old versions of Ruby
90
+
91
+ ## 5.32.0 - 2021-04-05
92
+ * [#973](https://github.com/stripe/stripe-ruby/pull/973) Reduce packed gem size
93
+
94
+ ## 5.31.0 - 2021-04-02
95
+ * [#968](https://github.com/stripe/stripe-ruby/pull/968) Allow StripeClient to be configured per instance
96
+ * [#971](https://github.com/stripe/stripe-ruby/pull/971) On config change, only clear connection managers for changed config
97
+ * [#972](https://github.com/stripe/stripe-ruby/pull/972) Rename `Stripe.configuration` to `Stripe.config`
98
+ * [#970](https://github.com/stripe/stripe-ruby/pull/970) Reserve some critical field names when adding `StripeObject` accessors
99
+ * [#967](https://github.com/stripe/stripe-ruby/pull/967) CI: github actions
100
+
101
+ ## 5.30.0 - 2021-02-22
102
+ * [#965](https://github.com/stripe/stripe-ruby/pull/965) Add support for the Billing Portal Configuration API
103
+
104
+ ## 5.29.1 - 2021-02-09
105
+ * [#964](https://github.com/stripe/stripe-ruby/pull/964) Fix return value of `Customer#delete_discount`
106
+
107
+ ## 5.29.0 - 2021-01-05
108
+ * [#952](https://github.com/stripe/stripe-ruby/pull/952) Allow client_id configuration on instance config
109
+
110
+ ## 5.28.0 - 2020-10-14
111
+ * [#950](https://github.com/stripe/stripe-ruby/pull/950) Add configuration option for `write_timeout` for connections on Ruby 2.6+
112
+
113
+ ## 5.27.0 - 2020-10-14
114
+ * [#951](https://github.com/stripe/stripe-ruby/pull/951) Add support for the Payout Reverse API
115
+
116
+ ## 5.26.0 - 2020-09-29
117
+ * [#949](https://github.com/stripe/stripe-ruby/pull/949) Add support for the `SetupAttempt` resource and List API
118
+
119
+ ## 5.25.0 - 2020-09-02
120
+ * [#944](https://github.com/stripe/stripe-ruby/pull/944) Add support for the Issuing Dispute Submit API
121
+
122
+ ## 5.24.0 - 2020-08-26
123
+ * [#939](https://github.com/stripe/stripe-ruby/pull/939) Extract configurations into separate object
124
+ * [#940](https://github.com/stripe/stripe-ruby/pull/940) Fix typo in documentation of `stripe_object.rb`
125
+
126
+ ## 5.23.1 - 2020-08-05
127
+ * [#936](https://github.com/stripe/stripe-ruby/pull/936) Rename API resource's `request` method
128
+
129
+ ## 5.23.0 - 2020-08-05
130
+ * [#937](https://github.com/stripe/stripe-ruby/pull/937) Add support for the `PromotionCode` resource and APIs
131
+
132
+ ## 5.22.0 - 2020-05-11
133
+ * [#918](https://github.com/stripe/stripe-ruby/pull/918) Add support for the `LineItem` resource and APIs
134
+
135
+ ## 5.21.0 - 2020-04-29
136
+ * [#917](https://github.com/stripe/stripe-ruby/pull/917) Add support for the `Price` resource and APIs
137
+
138
+ ## 5.20.0 - 2020-04-27
139
+ * [#916](https://github.com/stripe/stripe-ruby/pull/916) Add new `.generate_header` method for webhooks
140
+
141
+ ## 5.19.0 - 2020-04-24
142
+ * [#915](https://github.com/stripe/stripe-ruby/pull/915) Expose `Stripe::Webhook.compute_signature` publicly
143
+
144
+ ## 5.18.0 - 2020-04-22
145
+ * [#911](https://github.com/stripe/stripe-ruby/pull/911) Add support for `BillingPortal` namespace and `Session` resource and APIs
146
+
147
+ ## 5.17.0 - 2020-02-26
148
+ * [#907](https://github.com/stripe/stripe-ruby/pull/907) Add `StripeError#idempotent_replayed?`
149
+
150
+ ## 5.16.0 - 2020-02-26
151
+ * [#906](https://github.com/stripe/stripe-ruby/pull/906) Add support for listing Checkout sessions
152
+ * [#903](https://github.com/stripe/stripe-ruby/pull/903) Upgrade to Rubocop 0.80
153
+
154
+ ## 5.15.0 - 2020-02-10
155
+ * [#902](https://github.com/stripe/stripe-ruby/pull/902) Add `request_begin` instrumentation callback
156
+
157
+ ## 5.14.0 - 2020-01-14
158
+ * [#896](https://github.com/stripe/stripe-ruby/pull/896) Add support for `CreditNoteLineItem`
159
+ * [#894](https://github.com/stripe/stripe-ruby/pull/894) Clean up test output by capturing `$stderr` when we expect warnings
160
+ * [#892](https://github.com/stripe/stripe-ruby/pull/892) Explicitly pass a parameter as hash to be more ruby 2.7 friendly
161
+ * [#893](https://github.com/stripe/stripe-ruby/pull/893) Upgrade Rubocop to 0.79
162
+
163
+ ## 5.13.0 - 2020-01-08
164
+ * [#891](https://github.com/stripe/stripe-ruby/pull/891) Fix most Ruby 2.7 warnings
165
+
166
+ ## 5.12.1 - 2020-01-06
167
+ * [#890](https://github.com/stripe/stripe-ruby/pull/890) Override API key with `client_secret` in `OAuth.token`
168
+
169
+ ## 5.12.0 - 2020-01-02
170
+ * [#889](https://github.com/stripe/stripe-ruby/pull/889) Add support for retrieve source transaction API method
171
+
172
+ ## 5.11.0 - 2019-11-26
173
+ * [#885](https://github.com/stripe/stripe-ruby/pull/885) Add support for `CreditNote` preview
174
+
175
+ ## 5.10.0 - 2019-11-08
176
+ * [#882](https://github.com/stripe/stripe-ruby/pull/882) Add list_usage_record_summaries and list_source_transactions
177
+
178
+ ## 5.9.0 - 2019-11-07
179
+ * [#870](https://github.com/stripe/stripe-ruby/pull/870) Add request instrumentation callback (see `README.md` for usage example)
180
+
181
+ ## 5.8.0 - 2019-11-05
182
+ * [#879](https://github.com/stripe/stripe-ruby/pull/879) Add support for `Mandate`
183
+ * [#876](https://github.com/stripe/stripe-ruby/pull/876) Add additional per-request configuration documentation
184
+ * [#874](https://github.com/stripe/stripe-ruby/pull/874) Raise an error when requests params are invalid
185
+ * [#873](https://github.com/stripe/stripe-ruby/pull/873) Contributor Covenant
186
+
187
+ ## 5.7.1 - 2019-10-15
188
+ * [#869](https://github.com/stripe/stripe-ruby/pull/869) Fixes the misnamed `connection_base=` setter to be named `connect_base=`
189
+
190
+ ## 5.7.0 - 2019-10-10
191
+ * [#865](https://github.com/stripe/stripe-ruby/pull/865) Support backwards pagination with list's `#auto_paging_each`
192
+
193
+ ## 5.6.0 - 2019-10-04
194
+ * [#861](https://github.com/stripe/stripe-ruby/pull/861) Nicer error when specifying non-nil non-string opt value
195
+
196
+ ## 5.5.0 - 2019-10-03
197
+ * [#859](https://github.com/stripe/stripe-ruby/pull/859) User-friendly messages and retries for `EOFError`, `Errno::ECONNRESET`, `Errno::ETIMEDOUT`, and `Errno::EHOSTUNREACH` network errors
198
+
199
+ ## 5.4.1 - 2019-10-01
200
+ * [#858](https://github.com/stripe/stripe-ruby/pull/858) Drop Timecop dependency
201
+
202
+ ## 5.4.0 - 2019-10-01
203
+ * [#857](https://github.com/stripe/stripe-ruby/pull/857) Move to monotonic time for duration calculations
204
+
205
+ ## 5.3.0 - 2019-10-01
206
+ * [#853](https://github.com/stripe/stripe-ruby/pull/853) Support `Stripe-Should-Retry` header
207
+
208
+ ## 5.2.0 - 2019-09-19
209
+ * [#851](https://github.com/stripe/stripe-ruby/pull/851) Introduce system for garbage collecting connection managers
210
+
211
+ ## 5.1.1 - 2019-09-04
212
+ * [#845](https://github.com/stripe/stripe-ruby/pull/845) Transfer the request_id from the http_headers to error.
213
+
214
+ ## 5.1.0 - 2019-08-27
215
+ * [#841](https://github.com/stripe/stripe-ruby/pull/841) Retry requests on a 429 that's a lock timeout
216
+
217
+ ## 5.0.1 - 2019-08-20
218
+ * [#836](https://github.com/stripe/stripe-ruby/pull/836) Increase connection keep alive timeout to 30 seconds
219
+
220
+ ## 5.0.0 - 2019-08-20
221
+ Major version release. The [migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v5) contains a detailed list of backwards-incompatible changes with upgrade instructions.
222
+
223
+ Pull requests included in this release (cf. [#815](https://github.com/stripe/stripe-ruby/pull/815)) (⚠️ = breaking changes):
224
+ * ⚠️ [#813](https://github.com/stripe/stripe-ruby/pull/813): Convert library to use built-in `Net::HTTP`
225
+ * ⚠️ [#816](https://github.com/stripe/stripe-ruby/pull/816): Make `code` argument in `CardError` named instead of positional.
226
+ * ⚠️ [#817](https://github.com/stripe/stripe-ruby/pull/817): Drop support for very old Ruby versions.
227
+ * [#818](https://github.com/stripe/stripe-ruby/pull/818): Bump Rubocop to latest version
228
+ * [#819](https://github.com/stripe/stripe-ruby/pull/819): Ruby minimum version increase followup
229
+ * ⚠️ [#820](https://github.com/stripe/stripe-ruby/pull/820): Remove old deprecated methods
230
+ * ⚠️ [#823](https://github.com/stripe/stripe-ruby/pull/823): Remove all alias for list methods
231
+ * ⚠️ [#826](https://github.com/stripe/stripe-ruby/pull/826): Remove `UsageRecord.create` method
232
+ * ⚠️ [#827](https://github.com/stripe/stripe-ruby/pull/827): Remove `IssuerFraudRecord`
233
+ * [#811](https://github.com/stripe/stripe-ruby/pull/811): Add `ErrorObject` to `StripeError` exceptions
234
+ * [#828](https://github.com/stripe/stripe-ruby/pull/828): Tweak retry logic to be a little more like stripe-node
235
+ * [#829](https://github.com/stripe/stripe-ruby/pull/829): Reset connections when connection-changing configuration changes (optional)
236
+ * [#830](https://github.com/stripe/stripe-ruby/pull/830): Fix inverted sign for 500 retries
237
+ * ⚠️[#831](https://github.com/stripe/stripe-ruby/pull/831): Remove a few more very old deprecated methods
238
+ * [#832](https://github.com/stripe/stripe-ruby/pull/832): Minor cleanup in `StripeClient`
239
+ * [#833](https://github.com/stripe/stripe-ruby/pull/833): Do better bookkeeping when tracking state in `Thread.current`
240
+ * [#834](https://github.com/stripe/stripe-ruby/pull/834): Add `Invoice.list_upcoming_line_items` method
241
+
242
+ ## 4.24.0 - 2019-08-12
243
+ * [#825](https://github.com/stripe/stripe-ruby/pull/825) Add `SubscriptionItem.create_usage_record` method
244
+ - This release also removed the `SubscriptionSchedule.revisions` method. This should have been included in the previous release (4.23.0)
245
+
246
+ ## 4.23.0 - 2019-08-09
247
+ * [#824](https://github.com/stripe/stripe-ruby/pull/824) Remove SubscriptionScheduleRevision
248
+ - This is technically a breaking change. We've chosen to release it as a minor vesion bump because the associated API is unused.
249
+
250
+ ## 4.22.1 - 2019-08-09
251
+ * [#808](https://github.com/stripe/stripe-ruby/pull/808) Unify request/response handling
252
+
253
+ ## 4.22.0 - 2019-07-30
254
+ * [#821](https://github.com/stripe/stripe-ruby/pull/821) Listing `BalanceTransaction` objects now uses `/v1/balance_transactions` instead of `/v1/balance/history`
255
+
3
256
  ## 4.21.3 - 2019-07-15
4
257
  * [#810](https://github.com/stripe/stripe-ruby/pull/810) Better error message when passing non-string to custom method
5
258
 
@@ -82,7 +335,7 @@
82
335
  * [#718](https://github.com/stripe/stripe-ruby/pull/718) Fix an error message typo
83
336
 
84
337
  ## 4.4.0 - 2018-12-21
85
- * [#716](https://github.com/stripe/stripe-ruby/pull/716) Add support for the `CheckoutSession` resource
338
+ * [#716](https://github.com/stripe/stripe-ruby/pull/716) Add support for the `CheckoutSession` resource
86
339
 
87
340
  ## 4.3.0 - 2018-12-10
88
341
  * [#711](https://github.com/stripe/stripe-ruby/pull/711) Add support for account links
@@ -0,0 +1,77 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to make participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, sex characteristics, gender identity and expression,
9
+ level of experience, education, socio-economic status, nationality, personal
10
+ appearance, race, religion, or sexual identity and orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies within all project spaces, and it also applies when
49
+ an individual is representing the project or its community in public spaces.
50
+ Examples of representing a project or community include using an official
51
+ project e-mail address, posting via an official social media account, or acting
52
+ as an appointed representative at an online or offline event. Representation of
53
+ a project may be further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at conduct@stripe.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72
+
73
+ [homepage]: https://www.contributor-covenant.org
74
+
75
+ For answers to common questions about this code of conduct, see
76
+ https://www.contributor-covenant.org/faq
77
+
data/Gemfile CHANGED
@@ -5,31 +5,25 @@ source "https://rubygems.org"
5
5
  gemspec
6
6
 
7
7
  group :development do
8
- gem "coveralls", require: false
9
8
  gem "mocha", "~> 0.13.2"
9
+ gem "rack", ">= 2.0.6"
10
10
  gem "rake"
11
- gem "shoulda-context"
11
+
12
+ # Update to 2.0.0 once it ships.
13
+ gem "shoulda-context", "2.0.0.rc4"
14
+
12
15
  gem "test-unit"
13
- gem "timecop"
14
- gem "webmock"
16
+
17
+ # Version doesn't matter that much, but this one contains some fixes for Ruby
18
+ # 2.7 warnings that add noise to the test suite.
19
+ gem "webmock", ">= 3.8.0"
15
20
 
16
21
  # Rubocop changes pretty quickly: new cops get added and old cops change
17
22
  # names or go into new namespaces. This is a library and we don't have
18
23
  # `Gemfile.lock` checked in, so to prevent good builds from suddenly going
19
24
  # bad, pin to a specific version number here. Try to keep this relatively
20
25
  # up-to-date, but it's not the end of the world if it's not.
21
- # Note that 0.57.2 is the most recent version we can use until we drop
22
- # support for Ruby 2.1.
23
- gem "rubocop", "0.57.2"
24
-
25
- # Rack 2.0+ requires Ruby >= 2.2.2 which is problematic for the test suite on
26
- # older Ruby versions. Check Ruby the version here and put a maximum
27
- # constraint on Rack if necessary.
28
- if RUBY_VERSION >= "2.2.2"
29
- gem "rack", ">= 2.0.6"
30
- else
31
- gem "rack", ">= 1.6.11", "< 2.0" # rubocop:disable Bundler/DuplicatedGem
32
- end
26
+ gem "rubocop", "0.80"
33
27
 
34
28
  platforms :mri do
35
29
  gem "byebug"
data/Makefile ADDED
@@ -0,0 +1,7 @@
1
+ .PHONY: update-version codegen-format
2
+ update-version:
3
+ @echo "$(VERSION)" > VERSION
4
+ @perl -pi -e 's|VERSION = "[.\d]+"|VERSION = "$(VERSION)"|' lib/stripe/version.rb
5
+
6
+ codegen-format:
7
+ bundle exec rubocop -o /dev/null --auto-correct