stripe 10.8.0 → 10.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Gemfile +3 -0
  4. data/Makefile +7 -0
  5. data/OPENAPI_VERSION +1 -1
  6. data/VERSION +1 -1
  7. data/bin/tapioca +27 -0
  8. data/lib/stripe/api_resource.rb +10 -1
  9. data/lib/stripe/api_resource_test_helpers.rb +6 -2
  10. data/lib/stripe/list_object.rb +3 -0
  11. data/lib/stripe/object_types.rb +120 -118
  12. data/lib/stripe/resources/account.rb +6 -4
  13. data/lib/stripe/resources/account_link.rb +3 -0
  14. data/lib/stripe/resources/account_session.rb +3 -0
  15. data/lib/stripe/resources/apple_pay_domain.rb +3 -0
  16. data/lib/stripe/resources/application_fee.rb +3 -0
  17. data/lib/stripe/resources/application_fee_refund.rb +3 -0
  18. data/lib/stripe/resources/apps/secret.rb +3 -0
  19. data/lib/stripe/resources/balance.rb +3 -0
  20. data/lib/stripe/resources/balance_transaction.rb +3 -0
  21. data/lib/stripe/resources/bank_account.rb +3 -0
  22. data/lib/stripe/resources/billing_portal/configuration.rb +3 -0
  23. data/lib/stripe/resources/billing_portal/session.rb +3 -0
  24. data/lib/stripe/resources/capability.rb +3 -0
  25. data/lib/stripe/resources/card.rb +3 -0
  26. data/lib/stripe/resources/cash_balance.rb +3 -0
  27. data/lib/stripe/resources/charge.rb +3 -0
  28. data/lib/stripe/resources/checkout/session.rb +3 -0
  29. data/lib/stripe/resources/climate/order.rb +3 -0
  30. data/lib/stripe/resources/climate/product.rb +3 -0
  31. data/lib/stripe/resources/climate/supplier.rb +3 -0
  32. data/lib/stripe/resources/country_spec.rb +3 -0
  33. data/lib/stripe/resources/coupon.rb +3 -0
  34. data/lib/stripe/resources/credit_note.rb +3 -0
  35. data/lib/stripe/resources/credit_note_line_item.rb +3 -0
  36. data/lib/stripe/resources/customer.rb +7 -2
  37. data/lib/stripe/resources/customer_balance_transaction.rb +3 -0
  38. data/lib/stripe/resources/customer_cash_balance_transaction.rb +3 -0
  39. data/lib/stripe/resources/customer_session.rb +3 -0
  40. data/lib/stripe/resources/discount.rb +3 -0
  41. data/lib/stripe/resources/dispute.rb +3 -0
  42. data/lib/stripe/resources/ephemeral_key.rb +3 -0
  43. data/lib/stripe/resources/event.rb +3 -0
  44. data/lib/stripe/resources/exchange_rate.rb +3 -0
  45. data/lib/stripe/resources/file.rb +6 -0
  46. data/lib/stripe/resources/file_link.rb +3 -0
  47. data/lib/stripe/resources/financial_connections/account.rb +3 -0
  48. data/lib/stripe/resources/financial_connections/account_owner.rb +3 -0
  49. data/lib/stripe/resources/financial_connections/account_ownership.rb +3 -0
  50. data/lib/stripe/resources/financial_connections/session.rb +3 -0
  51. data/lib/stripe/resources/financial_connections/transaction.rb +3 -0
  52. data/lib/stripe/resources/funding_instructions.rb +3 -0
  53. data/lib/stripe/resources/identity/verification_report.rb +3 -0
  54. data/lib/stripe/resources/identity/verification_session.rb +3 -0
  55. data/lib/stripe/resources/invoice.rb +3 -0
  56. data/lib/stripe/resources/invoice_item.rb +3 -0
  57. data/lib/stripe/resources/invoice_line_item.rb +3 -0
  58. data/lib/stripe/resources/issuing/authorization.rb +6 -0
  59. data/lib/stripe/resources/issuing/card.rb +6 -0
  60. data/lib/stripe/resources/issuing/cardholder.rb +3 -0
  61. data/lib/stripe/resources/issuing/dispute.rb +3 -0
  62. data/lib/stripe/resources/issuing/token.rb +3 -0
  63. data/lib/stripe/resources/issuing/transaction.rb +6 -0
  64. data/lib/stripe/resources/line_item.rb +3 -0
  65. data/lib/stripe/resources/login_link.rb +3 -0
  66. data/lib/stripe/resources/mandate.rb +3 -0
  67. data/lib/stripe/resources/payment_intent.rb +5 -4
  68. data/lib/stripe/resources/payment_link.rb +3 -0
  69. data/lib/stripe/resources/payment_method.rb +3 -0
  70. data/lib/stripe/resources/payment_method_configuration.rb +3 -0
  71. data/lib/stripe/resources/payment_method_domain.rb +3 -0
  72. data/lib/stripe/resources/payout.rb +3 -0
  73. data/lib/stripe/resources/person.rb +3 -0
  74. data/lib/stripe/resources/plan.rb +3 -0
  75. data/lib/stripe/resources/price.rb +3 -0
  76. data/lib/stripe/resources/product.rb +3 -0
  77. data/lib/stripe/resources/promotion_code.rb +3 -0
  78. data/lib/stripe/resources/quote.rb +3 -0
  79. data/lib/stripe/resources/radar/early_fraud_warning.rb +3 -0
  80. data/lib/stripe/resources/radar/value_list.rb +3 -0
  81. data/lib/stripe/resources/radar/value_list_item.rb +3 -0
  82. data/lib/stripe/resources/refund.rb +6 -0
  83. data/lib/stripe/resources/reporting/report_run.rb +3 -0
  84. data/lib/stripe/resources/reporting/report_type.rb +3 -0
  85. data/lib/stripe/resources/reversal.rb +3 -0
  86. data/lib/stripe/resources/review.rb +3 -0
  87. data/lib/stripe/resources/setup_attempt.rb +3 -0
  88. data/lib/stripe/resources/setup_intent.rb +3 -0
  89. data/lib/stripe/resources/shipping_rate.rb +3 -0
  90. data/lib/stripe/resources/sigma/scheduled_query_run.rb +3 -0
  91. data/lib/stripe/resources/source.rb +3 -0
  92. data/lib/stripe/resources/source_transaction.rb +3 -0
  93. data/lib/stripe/resources/subscription.rb +3 -0
  94. data/lib/stripe/resources/subscription_item.rb +3 -0
  95. data/lib/stripe/resources/subscription_schedule.rb +3 -0
  96. data/lib/stripe/resources/tax/calculation.rb +3 -0
  97. data/lib/stripe/resources/tax/calculation_line_item.rb +3 -0
  98. data/lib/stripe/resources/tax/registration.rb +3 -0
  99. data/lib/stripe/resources/tax/settings.rb +3 -0
  100. data/lib/stripe/resources/tax/transaction.rb +3 -0
  101. data/lib/stripe/resources/tax/transaction_line_item.rb +3 -0
  102. data/lib/stripe/resources/tax_code.rb +3 -0
  103. data/lib/stripe/resources/tax_id.rb +5 -4
  104. data/lib/stripe/resources/tax_rate.rb +3 -0
  105. data/lib/stripe/resources/terminal/configuration.rb +3 -0
  106. data/lib/stripe/resources/terminal/connection_token.rb +3 -0
  107. data/lib/stripe/resources/terminal/location.rb +3 -0
  108. data/lib/stripe/resources/terminal/reader.rb +6 -0
  109. data/lib/stripe/resources/test_helpers/test_clock.rb +3 -0
  110. data/lib/stripe/resources/token.rb +3 -0
  111. data/lib/stripe/resources/topup.rb +3 -0
  112. data/lib/stripe/resources/transfer.rb +3 -0
  113. data/lib/stripe/resources/treasury/credit_reversal.rb +3 -0
  114. data/lib/stripe/resources/treasury/debit_reversal.rb +3 -0
  115. data/lib/stripe/resources/treasury/financial_account.rb +3 -0
  116. data/lib/stripe/resources/treasury/financial_account_features.rb +3 -0
  117. data/lib/stripe/resources/treasury/inbound_transfer.rb +6 -0
  118. data/lib/stripe/resources/treasury/outbound_payment.rb +6 -0
  119. data/lib/stripe/resources/treasury/outbound_transfer.rb +6 -0
  120. data/lib/stripe/resources/treasury/received_credit.rb +6 -0
  121. data/lib/stripe/resources/treasury/received_debit.rb +6 -0
  122. data/lib/stripe/resources/treasury/transaction.rb +3 -0
  123. data/lib/stripe/resources/treasury/transaction_entry.rb +3 -0
  124. data/lib/stripe/resources/usage_record.rb +3 -0
  125. data/lib/stripe/resources/usage_record_summary.rb +3 -0
  126. data/lib/stripe/resources/webhook_endpoint.rb +3 -0
  127. data/lib/stripe/search_result_object.rb +3 -0
  128. data/lib/stripe/singleton_api_resource.rb +1 -1
  129. data/lib/stripe/version.rb +1 -1
  130. data/sorbet/config +4 -0
  131. data/sorbet/rbi/annotations/.gitattributes +1 -0
  132. data/sorbet/rbi/annotations/coveralls_reborn.rbi +3 -0
  133. data/sorbet/rbi/gems/.gitattributes +1 -0
  134. data/sorbet/rbi/gems/addressable@2.8.6.rbi +1993 -0
  135. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  136. data/sorbet/rbi/gems/byebug@11.1.3.rbi +3606 -0
  137. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3437 -0
  138. data/sorbet/rbi/gems/coveralls_reborn@0.25.0.rbi +8 -0
  139. data/sorbet/rbi/gems/crack@0.4.5.rbi +144 -0
  140. data/sorbet/rbi/gems/docile@1.4.0.rbi +8 -0
  141. data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
  142. data/sorbet/rbi/gems/hashdiff@1.1.0.rbi +352 -0
  143. data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +19 -0
  144. data/sorbet/rbi/gems/json@2.7.1.rbi +1561 -0
  145. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
  146. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  147. data/sorbet/rbi/gems/mocha@1.16.1.rbi +11 -0
  148. data/sorbet/rbi/gems/netrc@0.11.0.rbi +161 -0
  149. data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
  150. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +9454 -0
  151. data/sorbet/rbi/gems/power_assert@2.0.3.rbi +414 -0
  152. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
  153. data/sorbet/rbi/gems/prism@0.19.0.rbi +29883 -0
  154. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +1150 -0
  155. data/sorbet/rbi/gems/pry@0.14.2.rbi +10085 -0
  156. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +931 -0
  157. data/sorbet/rbi/gems/racc@1.7.3.rbi +161 -0
  158. data/sorbet/rbi/gems/rack@3.0.8.rbi +5193 -0
  159. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
  160. data/sorbet/rbi/gems/rake@13.1.0.rbi +2884 -0
  161. data/sorbet/rbi/gems/rbi@0.1.6.rbi +2922 -0
  162. data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +3766 -0
  163. data/sorbet/rbi/gems/rexml@3.2.6.rbi +4887 -0
  164. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7004 -0
  165. data/sorbet/rbi/gems/rubocop@1.57.2.rbi +56919 -0
  166. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
  167. data/sorbet/rbi/gems/shoulda-context@2.0.0.rbi +555 -0
  168. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +8 -0
  169. data/sorbet/rbi/gems/simplecov@0.21.2.rbi +8 -0
  170. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
  171. data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
  172. data/sorbet/rbi/gems/sync@0.5.0.rbi +8 -0
  173. data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23136 -0
  174. data/sorbet/rbi/gems/tapioca@0.11.17.rbi +3503 -0
  175. data/sorbet/rbi/gems/term-ansicolor@1.7.1.rbi +8 -0
  176. data/sorbet/rbi/gems/test-unit@3.6.1.rbi +4403 -0
  177. data/sorbet/rbi/gems/thor@1.3.0.rbi +4345 -0
  178. data/sorbet/rbi/gems/tins@1.32.1.rbi +8 -0
  179. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -0
  180. data/sorbet/rbi/gems/webmock@3.19.1.rbi +1740 -0
  181. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
  182. data/sorbet/rbi/gems/yard@0.9.34.rbi +18219 -0
  183. data/sorbet/tapioca/config.yml +13 -0
  184. data/sorbet/tapioca/require.rb +4 -0
  185. metadata +59 -2
@@ -13,6 +13,9 @@ module Stripe
13
13
  include Stripe::APIOperations::Save
14
14
 
15
15
  OBJECT_NAME = "refund"
16
+ def self.object_name
17
+ "refund"
18
+ end
16
19
 
17
20
  # Cancels a refund with a status of requires_action.
18
21
  #
@@ -80,6 +83,9 @@ module Stripe
80
83
 
81
84
  class TestHelpers < APIResourceTestHelpers
82
85
  RESOURCE_CLASS = Refund
86
+ def self.resource_class
87
+ "Refund"
88
+ end
83
89
 
84
90
  # Expire a refund with a status of requires_action.
85
91
  def self.expire(refund, params = {}, opts = {})
@@ -16,6 +16,9 @@ module Stripe
16
16
  extend Stripe::APIOperations::List
17
17
 
18
18
  OBJECT_NAME = "reporting.report_run"
19
+ def self.object_name
20
+ "reporting.report_run"
21
+ end
19
22
 
20
23
  # Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
21
24
  def self.create(params = {}, opts = {})
@@ -15,6 +15,9 @@ module Stripe
15
15
  extend Stripe::APIOperations::List
16
16
 
17
17
  OBJECT_NAME = "reporting.report_type"
18
+ def self.object_name
19
+ "reporting.report_type"
20
+ end
18
21
 
19
22
  # Returns a full list of Report Types.
20
23
  def self.list(filters = {}, opts = {})
@@ -19,6 +19,9 @@ module Stripe
19
19
  include Stripe::APIOperations::Save
20
20
 
21
21
  OBJECT_NAME = "transfer_reversal"
22
+ def self.object_name
23
+ "transfer_reversal"
24
+ end
22
25
 
23
26
  def resource_url
24
27
  "#{Transfer.resource_url}/#{CGI.escape(transfer)}/reversals" \
@@ -10,6 +10,9 @@ module Stripe
10
10
  extend Stripe::APIOperations::List
11
11
 
12
12
  OBJECT_NAME = "review"
13
+ def self.object_name
14
+ "review"
15
+ end
13
16
 
14
17
  # Approves a Review object, closing it and removing it from the list of reviews.
15
18
  def approve(params = {}, opts = {})
@@ -10,6 +10,9 @@ module Stripe
10
10
  extend Stripe::APIOperations::List
11
11
 
12
12
  OBJECT_NAME = "setup_attempt"
13
+ def self.object_name
14
+ "setup_attempt"
15
+ end
13
16
 
14
17
  # Returns a list of SetupAttempts that associate with a provided SetupIntent.
15
18
  def self.list(filters = {}, opts = {})
@@ -29,6 +29,9 @@ module Stripe
29
29
  include Stripe::APIOperations::Save
30
30
 
31
31
  OBJECT_NAME = "setup_intent"
32
+ def self.object_name
33
+ "setup_intent"
34
+ end
32
35
 
33
36
  # You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
34
37
  #
@@ -10,6 +10,9 @@ module Stripe
10
10
  include Stripe::APIOperations::Save
11
11
 
12
12
  OBJECT_NAME = "shipping_rate"
13
+ def self.object_name
14
+ "shipping_rate"
15
+ end
13
16
 
14
17
  # Creates a new shipping rate object.
15
18
  def self.create(params = {}, opts = {})
@@ -11,6 +11,9 @@ module Stripe
11
11
  extend Stripe::APIOperations::List
12
12
 
13
13
  OBJECT_NAME = "scheduled_query_run"
14
+ def self.object_name
15
+ "scheduled_query_run"
16
+ end
14
17
 
15
18
  def self.resource_url
16
19
  "/v1/sigma/scheduled_query_runs"
@@ -18,6 +18,9 @@ module Stripe
18
18
  extend Stripe::APIOperations::NestedResource
19
19
 
20
20
  OBJECT_NAME = "source"
21
+ def self.object_name
22
+ "source"
23
+ end
21
24
 
22
25
  nested_resource_class_methods :source_transaction, operations: %i[retrieve list]
23
26
 
@@ -8,5 +8,8 @@ module Stripe
8
8
  # transactions.
9
9
  class SourceTransaction < StripeObject
10
10
  OBJECT_NAME = "source_transaction"
11
+ def self.object_name
12
+ "source_transaction"
13
+ end
11
14
  end
12
15
  end
@@ -12,6 +12,9 @@ module Stripe
12
12
  include Stripe::APIOperations::Save
13
13
 
14
14
  OBJECT_NAME = "subscription"
15
+ def self.object_name
16
+ "subscription"
17
+ end
15
18
 
16
19
  # Cancels a customer's subscription immediately. The customer will not be charged again for the subscription.
17
20
  #
@@ -12,6 +12,9 @@ module Stripe
12
12
  extend Stripe::APIOperations::NestedResource
13
13
 
14
14
  OBJECT_NAME = "subscription_item"
15
+ def self.object_name
16
+ "subscription_item"
17
+ end
15
18
 
16
19
  nested_resource_class_methods :usage_record, operations: %i[create]
17
20
  nested_resource_class_methods :usage_record_summary,
@@ -11,6 +11,9 @@ module Stripe
11
11
  include Stripe::APIOperations::Save
12
12
 
13
13
  OBJECT_NAME = "subscription_schedule"
14
+ def self.object_name
15
+ "subscription_schedule"
16
+ end
14
17
 
15
18
  # Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
16
19
  def cancel(params = {}, opts = {})
@@ -10,6 +10,9 @@ module Stripe
10
10
  extend Stripe::APIOperations::Create
11
11
 
12
12
  OBJECT_NAME = "tax.calculation"
13
+ def self.object_name
14
+ "tax.calculation"
15
+ end
13
16
 
14
17
  # Retrieves the line items of a persisted tax calculation as a collection.
15
18
  def list_line_items(params = {}, opts = {})
@@ -5,6 +5,9 @@ module Stripe
5
5
  module Tax
6
6
  class CalculationLineItem < APIResource
7
7
  OBJECT_NAME = "tax.calculation_line_item"
8
+ def self.object_name
9
+ "tax.calculation_line_item"
10
+ end
8
11
  end
9
12
  end
10
13
  end
@@ -14,6 +14,9 @@ module Stripe
14
14
  include Stripe::APIOperations::Save
15
15
 
16
16
  OBJECT_NAME = "tax.registration"
17
+ def self.object_name
18
+ "tax.registration"
19
+ end
17
20
 
18
21
  # Creates a new Tax Registration object.
19
22
  def self.create(params = {}, opts = {})
@@ -10,6 +10,9 @@ module Stripe
10
10
  include Stripe::APIOperations::SingletonSave
11
11
 
12
12
  OBJECT_NAME = "tax.settings"
13
+ def self.object_name
14
+ "tax.settings"
15
+ end
13
16
  end
14
17
  end
15
18
  end
@@ -8,6 +8,9 @@ module Stripe
8
8
  # Related guide: [Calculate tax in your custom payment flow](https://stripe.com/docs/tax/custom#tax-transaction)
9
9
  class Transaction < APIResource
10
10
  OBJECT_NAME = "tax.transaction"
11
+ def self.object_name
12
+ "tax.transaction"
13
+ end
11
14
 
12
15
  # Retrieves the line items of a committed standalone transaction as a collection.
13
16
  def list_line_items(params = {}, opts = {})
@@ -5,6 +5,9 @@ module Stripe
5
5
  module Tax
6
6
  class TransactionLineItem < APIResource
7
7
  OBJECT_NAME = "tax.transaction_line_item"
8
+ def self.object_name
9
+ "tax.transaction_line_item"
10
+ end
8
11
  end
9
12
  end
10
13
  end
@@ -7,6 +7,9 @@ module Stripe
7
7
  extend Stripe::APIOperations::List
8
8
 
9
9
  OBJECT_NAME = "tax_code"
10
+ def self.object_name
11
+ "tax_code"
12
+ end
10
13
 
11
14
  # A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations.
12
15
  def self.list(filters = {}, opts = {})
@@ -10,6 +10,9 @@ module Stripe
10
10
  include Stripe::APIOperations::Delete
11
11
 
12
12
  OBJECT_NAME = "tax_id"
13
+ def self.object_name
14
+ "tax_id"
15
+ end
13
16
 
14
17
  def resource_url
15
18
  if !respond_to?(:customer) || customer.nil?
@@ -27,21 +30,19 @@ module Stripe
27
30
  "'tax_id_id')`"
28
31
  end
29
32
 
30
- # Deletes an existing tax_id object.
31
33
  def self.delete(id, params = {}, opts = {})
32
34
  request_stripe_object(
33
35
  method: :delete,
34
- path: format("/v1/customers/%<customer>s/tax_ids/%<id>s", { customer: CGI.escape(customer), id: CGI.escape(id) }),
36
+ path: "#{resource_url}/#{id}",
35
37
  params: params,
36
38
  opts: opts
37
39
  )
38
40
  end
39
41
 
40
- # Deletes an existing tax_id object.
41
42
  def delete(params = {}, opts = {})
42
43
  request_stripe_object(
43
44
  method: :delete,
44
- path: format("/v1/customers/%<customer>s/tax_ids/%<id>s", { customer: CGI.escape(self["id"]), id: CGI.escape(id) }),
45
+ path: resource_url.to_s,
45
46
  params: params,
46
47
  opts: opts
47
48
  )
@@ -11,6 +11,9 @@ module Stripe
11
11
  include Stripe::APIOperations::Save
12
12
 
13
13
  OBJECT_NAME = "tax_rate"
14
+ def self.object_name
15
+ "tax_rate"
16
+ end
14
17
 
15
18
  # Creates a new tax rate.
16
19
  def self.create(params = {}, opts = {})
@@ -11,6 +11,9 @@ module Stripe
11
11
  include Stripe::APIOperations::Save
12
12
 
13
13
  OBJECT_NAME = "terminal.configuration"
14
+ def self.object_name
15
+ "terminal.configuration"
16
+ end
14
17
 
15
18
  # Creates a new Configuration object.
16
19
  def self.create(params = {}, opts = {})
@@ -10,6 +10,9 @@ module Stripe
10
10
  extend Stripe::APIOperations::Create
11
11
 
12
12
  OBJECT_NAME = "terminal.connection_token"
13
+ def self.object_name
14
+ "terminal.connection_token"
15
+ end
13
16
 
14
17
  # To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.
15
18
  def self.create(params = {}, opts = {})
@@ -13,6 +13,9 @@ module Stripe
13
13
  include Stripe::APIOperations::Save
14
14
 
15
15
  OBJECT_NAME = "terminal.location"
16
+ def self.object_name
17
+ "terminal.location"
18
+ end
16
19
 
17
20
  # Creates a new Location object.
18
21
  # For further details, including which address fields are required in each country, see the [Manage locations](https://stripe.com/docs/terminal/fleet/locations) guide.
@@ -13,6 +13,9 @@ module Stripe
13
13
  include Stripe::APIOperations::Save
14
14
 
15
15
  OBJECT_NAME = "terminal.reader"
16
+ def self.object_name
17
+ "terminal.reader"
18
+ end
16
19
 
17
20
  # Cancels the current reader action.
18
21
  def cancel_action(params = {}, opts = {})
@@ -170,6 +173,9 @@ module Stripe
170
173
 
171
174
  class TestHelpers < APIResourceTestHelpers
172
175
  RESOURCE_CLASS = Reader
176
+ def self.resource_class
177
+ "Reader"
178
+ end
173
179
 
174
180
  # Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.
175
181
  def self.present_payment_method(reader, params = {}, opts = {})
@@ -12,6 +12,9 @@ module Stripe
12
12
  extend Stripe::APIOperations::List
13
13
 
14
14
  OBJECT_NAME = "test_helpers.test_clock"
15
+ def self.object_name
16
+ "test_helpers.test_clock"
17
+ end
15
18
 
16
19
  # Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.
17
20
  def advance(params = {}, opts = {})
@@ -26,6 +26,9 @@ module Stripe
26
26
  extend Stripe::APIOperations::Create
27
27
 
28
28
  OBJECT_NAME = "token"
29
+ def self.object_name
30
+ "token"
31
+ end
29
32
 
30
33
  # Creates a single-use token that represents a bank account's details.
31
34
  # You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [Custom account](https://stripe.com/docs/api#accounts).
@@ -13,6 +13,9 @@ module Stripe
13
13
  include Stripe::APIOperations::Save
14
14
 
15
15
  OBJECT_NAME = "topup"
16
+ def self.object_name
17
+ "topup"
18
+ end
16
19
 
17
20
  # Cancels a top-up. Only pending top-ups can be canceled.
18
21
  def cancel(params = {}, opts = {})
@@ -19,6 +19,9 @@ module Stripe
19
19
  extend Stripe::APIOperations::NestedResource
20
20
 
21
21
  OBJECT_NAME = "transfer"
22
+ def self.object_name
23
+ "transfer"
24
+ end
22
25
 
23
26
  nested_resource_class_methods :reversal, operations: %i[create retrieve update list]
24
27
 
@@ -9,6 +9,9 @@ module Stripe
9
9
  extend Stripe::APIOperations::List
10
10
 
11
11
  OBJECT_NAME = "treasury.credit_reversal"
12
+ def self.object_name
13
+ "treasury.credit_reversal"
14
+ end
12
15
 
13
16
  # Reverses a ReceivedCredit and creates a CreditReversal object.
14
17
  def self.create(params = {}, opts = {})
@@ -9,6 +9,9 @@ module Stripe
9
9
  extend Stripe::APIOperations::List
10
10
 
11
11
  OBJECT_NAME = "treasury.debit_reversal"
12
+ def self.object_name
13
+ "treasury.debit_reversal"
14
+ end
12
15
 
13
16
  # Reverses a ReceivedDebit and creates a DebitReversal object.
14
17
  def self.create(params = {}, opts = {})
@@ -11,6 +11,9 @@ module Stripe
11
11
  include Stripe::APIOperations::Save
12
12
 
13
13
  OBJECT_NAME = "treasury.financial_account"
14
+ def self.object_name
15
+ "treasury.financial_account"
16
+ end
14
17
 
15
18
  # Retrieves Features information associated with the FinancialAccount.
16
19
  def retrieve_features(params = {}, opts = {})
@@ -7,6 +7,9 @@ module Stripe
7
7
  # Stripe or the platform can control Features via the requested field.
8
8
  class FinancialAccountFeatures < APIResource
9
9
  OBJECT_NAME = "treasury.financial_account_features"
10
+ def self.object_name
11
+ "treasury.financial_account_features"
12
+ end
10
13
  end
11
14
  end
12
15
  end
@@ -9,6 +9,9 @@ module Stripe
9
9
  extend Stripe::APIOperations::List
10
10
 
11
11
  OBJECT_NAME = "treasury.inbound_transfer"
12
+ def self.object_name
13
+ "treasury.inbound_transfer"
14
+ end
12
15
 
13
16
  # Cancels an InboundTransfer.
14
17
  def cancel(params = {}, opts = {})
@@ -56,6 +59,9 @@ module Stripe
56
59
 
57
60
  class TestHelpers < APIResourceTestHelpers
58
61
  RESOURCE_CLASS = InboundTransfer
62
+ def self.resource_class
63
+ "InboundTransfer"
64
+ end
59
65
 
60
66
  # Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
61
67
  def self.fail(id, params = {}, opts = {})
@@ -11,6 +11,9 @@ module Stripe
11
11
  extend Stripe::APIOperations::List
12
12
 
13
13
  OBJECT_NAME = "treasury.outbound_payment"
14
+ def self.object_name
15
+ "treasury.outbound_payment"
16
+ end
14
17
 
15
18
  # Cancel an OutboundPayment.
16
19
  def cancel(params = {}, opts = {})
@@ -58,6 +61,9 @@ module Stripe
58
61
 
59
62
  class TestHelpers < APIResourceTestHelpers
60
63
  RESOURCE_CLASS = OutboundPayment
64
+ def self.resource_class
65
+ "OutboundPayment"
66
+ end
61
67
 
62
68
  # Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
63
69
  def self.fail(id, params = {}, opts = {})
@@ -11,6 +11,9 @@ module Stripe
11
11
  extend Stripe::APIOperations::List
12
12
 
13
13
  OBJECT_NAME = "treasury.outbound_transfer"
14
+ def self.object_name
15
+ "treasury.outbound_transfer"
16
+ end
14
17
 
15
18
  # An OutboundTransfer can be canceled if the funds have not yet been paid out.
16
19
  def cancel(params = {}, opts = {})
@@ -58,6 +61,9 @@ module Stripe
58
61
 
59
62
  class TestHelpers < APIResourceTestHelpers
60
63
  RESOURCE_CLASS = OutboundTransfer
64
+ def self.resource_class
65
+ "OutboundTransfer"
66
+ end
61
67
 
62
68
  # Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
63
69
  def self.fail(outbound_transfer, params = {}, opts = {})
@@ -8,6 +8,9 @@ module Stripe
8
8
  extend Stripe::APIOperations::List
9
9
 
10
10
  OBJECT_NAME = "treasury.received_credit"
11
+ def self.object_name
12
+ "treasury.received_credit"
13
+ end
11
14
 
12
15
  # Returns a list of ReceivedCredits.
13
16
  def self.list(filters = {}, opts = {})
@@ -25,6 +28,9 @@ module Stripe
25
28
 
26
29
  class TestHelpers < APIResourceTestHelpers
27
30
  RESOURCE_CLASS = ReceivedCredit
31
+ def self.resource_class
32
+ "ReceivedCredit"
33
+ end
28
34
 
29
35
  # Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties.
30
36
  def self.create(params = {}, opts = {})
@@ -8,6 +8,9 @@ module Stripe
8
8
  extend Stripe::APIOperations::List
9
9
 
10
10
  OBJECT_NAME = "treasury.received_debit"
11
+ def self.object_name
12
+ "treasury.received_debit"
13
+ end
11
14
 
12
15
  # Returns a list of ReceivedDebits.
13
16
  def self.list(filters = {}, opts = {})
@@ -25,6 +28,9 @@ module Stripe
25
28
 
26
29
  class TestHelpers < APIResourceTestHelpers
27
30
  RESOURCE_CLASS = ReceivedDebit
31
+ def self.resource_class
32
+ "ReceivedDebit"
33
+ end
28
34
 
29
35
  # Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties.
30
36
  def self.create(params = {}, opts = {})
@@ -8,6 +8,9 @@ module Stripe
8
8
  extend Stripe::APIOperations::List
9
9
 
10
10
  OBJECT_NAME = "treasury.transaction"
11
+ def self.object_name
12
+ "treasury.transaction"
13
+ end
11
14
 
12
15
  # Retrieves a list of Transaction objects.
13
16
  def self.list(filters = {}, opts = {})
@@ -8,6 +8,9 @@ module Stripe
8
8
  extend Stripe::APIOperations::List
9
9
 
10
10
  OBJECT_NAME = "treasury.transaction_entry"
11
+ def self.object_name
12
+ "treasury.transaction_entry"
13
+ end
11
14
 
12
15
  def self.resource_url
13
16
  "/v1/treasury/transaction_entries"
@@ -8,5 +8,8 @@ module Stripe
8
8
  # Related guide: [Metered billing](https://stripe.com/docs/billing/subscriptions/metered-billing)
9
9
  class UsageRecord < APIResource
10
10
  OBJECT_NAME = "usage_record"
11
+ def self.object_name
12
+ "usage_record"
13
+ end
11
14
  end
12
15
  end
@@ -4,5 +4,8 @@
4
4
  module Stripe
5
5
  class UsageRecordSummary < StripeObject
6
6
  OBJECT_NAME = "usage_record_summary"
7
+ def self.object_name
8
+ "usage_record_summary"
9
+ end
7
10
  end
8
11
  end
@@ -16,6 +16,9 @@ module Stripe
16
16
  include Stripe::APIOperations::Save
17
17
 
18
18
  OBJECT_NAME = "webhook_endpoint"
19
+ def self.object_name
20
+ "webhook_endpoint"
21
+ end
19
22
 
20
23
  # A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard.
21
24
  def self.create(params = {}, opts = {})
@@ -7,6 +7,9 @@ module Stripe
7
7
  include Stripe::APIOperations::Request
8
8
 
9
9
  OBJECT_NAME = "search_result"
10
+ def self.object_name
11
+ "search_result"
12
+ end
10
13
 
11
14
  # This accessor allows a `SearchResultObject` to inherit various filters
12
15
  # that were given to a predecessor. This allows for things like consistent
@@ -10,7 +10,7 @@ module Stripe
10
10
  end
11
11
  # Namespaces are separated in object names with periods (.) and in URLs
12
12
  # with forward slashes (/), so replace the former with the latter.
13
- "/v1/#{self::OBJECT_NAME.downcase.tr('.', '/')}"
13
+ "/v1/#{object_name.downcase.tr('.', '/')}"
14
14
  end
15
15
 
16
16
  def resource_url
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "10.8.0"
4
+ VERSION = "10.9.0"
5
5
  end
data/sorbet/config ADDED
@@ -0,0 +1,4 @@
1
+ --dir
2
+ .
3
+ --ignore=tmp/
4
+ --ignore=vendor/
@@ -0,0 +1 @@
1
+ **/*.rbi linguist-vendored=true
@@ -0,0 +1,3 @@
1
+ module Coveralls
2
+ def wear; end
3
+ end
@@ -0,0 +1 @@
1
+ **/*.rbi linguist-generated=true