stripe 10.9.0.pre.beta.1 → 10.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +51 -275
  3. data/Gemfile +3 -0
  4. data/Makefile +7 -0
  5. data/OPENAPI_VERSION +1 -1
  6. data/README.md +0 -11
  7. data/VERSION +1 -1
  8. data/bin/tapioca +27 -0
  9. data/lib/stripe/api_operations/request.rb +1 -2
  10. data/lib/stripe/api_resource.rb +10 -1
  11. data/lib/stripe/api_resource_test_helpers.rb +6 -2
  12. data/lib/stripe/api_version.rb +0 -1
  13. data/lib/stripe/list_object.rb +3 -0
  14. data/lib/stripe/object_types.rb +120 -141
  15. data/lib/stripe/resources/account.rb +6 -4
  16. data/lib/stripe/resources/account_link.rb +3 -0
  17. data/lib/stripe/resources/account_session.rb +3 -0
  18. data/lib/stripe/resources/apple_pay_domain.rb +3 -0
  19. data/lib/stripe/resources/application_fee.rb +3 -0
  20. data/lib/stripe/resources/application_fee_refund.rb +3 -0
  21. data/lib/stripe/resources/apps/secret.rb +3 -0
  22. data/lib/stripe/resources/balance.rb +3 -0
  23. data/lib/stripe/resources/balance_transaction.rb +3 -0
  24. data/lib/stripe/resources/bank_account.rb +3 -0
  25. data/lib/stripe/resources/billing_portal/configuration.rb +3 -0
  26. data/lib/stripe/resources/billing_portal/session.rb +3 -0
  27. data/lib/stripe/resources/capability.rb +3 -0
  28. data/lib/stripe/resources/card.rb +3 -0
  29. data/lib/stripe/resources/cash_balance.rb +3 -0
  30. data/lib/stripe/resources/charge.rb +3 -0
  31. data/lib/stripe/resources/checkout/session.rb +3 -0
  32. data/lib/stripe/resources/climate/order.rb +3 -0
  33. data/lib/stripe/resources/climate/product.rb +3 -0
  34. data/lib/stripe/resources/climate/supplier.rb +3 -0
  35. data/lib/stripe/resources/country_spec.rb +3 -0
  36. data/lib/stripe/resources/coupon.rb +3 -0
  37. data/lib/stripe/resources/credit_note.rb +3 -0
  38. data/lib/stripe/resources/credit_note_line_item.rb +3 -0
  39. data/lib/stripe/resources/customer.rb +7 -13
  40. data/lib/stripe/resources/customer_balance_transaction.rb +3 -0
  41. data/lib/stripe/resources/customer_cash_balance_transaction.rb +3 -0
  42. data/lib/stripe/resources/customer_session.rb +3 -0
  43. data/lib/stripe/resources/discount.rb +3 -0
  44. data/lib/stripe/resources/dispute.rb +3 -0
  45. data/lib/stripe/resources/ephemeral_key.rb +3 -0
  46. data/lib/stripe/resources/event.rb +3 -0
  47. data/lib/stripe/resources/exchange_rate.rb +3 -0
  48. data/lib/stripe/resources/file.rb +6 -0
  49. data/lib/stripe/resources/file_link.rb +3 -0
  50. data/lib/stripe/resources/financial_connections/account.rb +3 -3
  51. data/lib/stripe/resources/financial_connections/account_owner.rb +3 -0
  52. data/lib/stripe/resources/financial_connections/account_ownership.rb +3 -0
  53. data/lib/stripe/resources/financial_connections/session.rb +3 -0
  54. data/lib/stripe/resources/financial_connections/transaction.rb +3 -0
  55. data/lib/stripe/resources/funding_instructions.rb +3 -0
  56. data/lib/stripe/resources/identity/verification_report.rb +3 -0
  57. data/lib/stripe/resources/identity/verification_session.rb +3 -0
  58. data/lib/stripe/resources/invoice.rb +2 -52
  59. data/lib/stripe/resources/invoice_item.rb +3 -0
  60. data/lib/stripe/resources/invoice_line_item.rb +3 -0
  61. data/lib/stripe/resources/issuing/authorization.rb +6 -0
  62. data/lib/stripe/resources/issuing/card.rb +6 -0
  63. data/lib/stripe/resources/issuing/cardholder.rb +3 -0
  64. data/lib/stripe/resources/issuing/dispute.rb +3 -0
  65. data/lib/stripe/resources/issuing/token.rb +3 -0
  66. data/lib/stripe/resources/issuing/transaction.rb +6 -0
  67. data/lib/stripe/resources/line_item.rb +3 -0
  68. data/lib/stripe/resources/login_link.rb +3 -0
  69. data/lib/stripe/resources/mandate.rb +3 -0
  70. data/lib/stripe/resources/payment_intent.rb +5 -4
  71. data/lib/stripe/resources/payment_link.rb +3 -0
  72. data/lib/stripe/resources/payment_method.rb +3 -0
  73. data/lib/stripe/resources/payment_method_configuration.rb +3 -0
  74. data/lib/stripe/resources/payment_method_domain.rb +3 -0
  75. data/lib/stripe/resources/payout.rb +3 -0
  76. data/lib/stripe/resources/person.rb +3 -0
  77. data/lib/stripe/resources/plan.rb +3 -0
  78. data/lib/stripe/resources/price.rb +3 -0
  79. data/lib/stripe/resources/product.rb +3 -0
  80. data/lib/stripe/resources/promotion_code.rb +3 -0
  81. data/lib/stripe/resources/quote.rb +3 -104
  82. data/lib/stripe/resources/radar/early_fraud_warning.rb +3 -0
  83. data/lib/stripe/resources/radar/value_list.rb +3 -0
  84. data/lib/stripe/resources/radar/value_list_item.rb +3 -0
  85. data/lib/stripe/resources/refund.rb +6 -0
  86. data/lib/stripe/resources/reporting/report_run.rb +3 -0
  87. data/lib/stripe/resources/reporting/report_type.rb +3 -0
  88. data/lib/stripe/resources/reversal.rb +3 -0
  89. data/lib/stripe/resources/review.rb +3 -0
  90. data/lib/stripe/resources/setup_attempt.rb +3 -0
  91. data/lib/stripe/resources/setup_intent.rb +3 -0
  92. data/lib/stripe/resources/shipping_rate.rb +3 -0
  93. data/lib/stripe/resources/sigma/scheduled_query_run.rb +3 -0
  94. data/lib/stripe/resources/source.rb +3 -0
  95. data/lib/stripe/resources/source_transaction.rb +3 -0
  96. data/lib/stripe/resources/subscription.rb +3 -0
  97. data/lib/stripe/resources/subscription_item.rb +3 -0
  98. data/lib/stripe/resources/subscription_schedule.rb +2 -19
  99. data/lib/stripe/resources/tax/calculation.rb +3 -0
  100. data/lib/stripe/resources/tax/calculation_line_item.rb +3 -0
  101. data/lib/stripe/resources/tax/registration.rb +3 -0
  102. data/lib/stripe/resources/tax/settings.rb +3 -0
  103. data/lib/stripe/resources/tax/transaction.rb +3 -0
  104. data/lib/stripe/resources/tax/transaction_line_item.rb +3 -0
  105. data/lib/stripe/resources/tax_code.rb +3 -0
  106. data/lib/stripe/resources/tax_id.rb +5 -4
  107. data/lib/stripe/resources/tax_rate.rb +3 -0
  108. data/lib/stripe/resources/terminal/configuration.rb +3 -0
  109. data/lib/stripe/resources/terminal/connection_token.rb +3 -0
  110. data/lib/stripe/resources/terminal/location.rb +3 -0
  111. data/lib/stripe/resources/terminal/reader.rb +6 -60
  112. data/lib/stripe/resources/test_helpers/test_clock.rb +3 -0
  113. data/lib/stripe/resources/token.rb +3 -0
  114. data/lib/stripe/resources/topup.rb +3 -0
  115. data/lib/stripe/resources/transfer.rb +3 -0
  116. data/lib/stripe/resources/treasury/credit_reversal.rb +3 -0
  117. data/lib/stripe/resources/treasury/debit_reversal.rb +3 -0
  118. data/lib/stripe/resources/treasury/financial_account.rb +3 -0
  119. data/lib/stripe/resources/treasury/financial_account_features.rb +3 -0
  120. data/lib/stripe/resources/treasury/inbound_transfer.rb +6 -0
  121. data/lib/stripe/resources/treasury/outbound_payment.rb +6 -0
  122. data/lib/stripe/resources/treasury/outbound_transfer.rb +6 -0
  123. data/lib/stripe/resources/treasury/received_credit.rb +6 -0
  124. data/lib/stripe/resources/treasury/received_debit.rb +6 -0
  125. data/lib/stripe/resources/treasury/transaction.rb +3 -0
  126. data/lib/stripe/resources/treasury/transaction_entry.rb +3 -0
  127. data/lib/stripe/resources/usage_record.rb +3 -0
  128. data/lib/stripe/resources/usage_record_summary.rb +3 -0
  129. data/lib/stripe/resources/webhook_endpoint.rb +3 -0
  130. data/lib/stripe/resources.rb +0 -22
  131. data/lib/stripe/search_result_object.rb +3 -0
  132. data/lib/stripe/singleton_api_resource.rb +1 -1
  133. data/lib/stripe/stripe_client.rb +28 -62
  134. data/lib/stripe/stripe_configuration.rb +1 -2
  135. data/lib/stripe/util.rb +1 -8
  136. data/lib/stripe/version.rb +1 -1
  137. data/lib/stripe.rb +0 -46
  138. data/sorbet/config +4 -0
  139. data/sorbet/rbi/annotations/.gitattributes +1 -0
  140. data/sorbet/rbi/annotations/coveralls_reborn.rbi +3 -0
  141. data/sorbet/rbi/gems/.gitattributes +1 -0
  142. data/sorbet/rbi/gems/addressable@2.8.6.rbi +1993 -0
  143. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  144. data/sorbet/rbi/gems/byebug@11.1.3.rbi +3606 -0
  145. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3437 -0
  146. data/sorbet/rbi/gems/coveralls_reborn@0.25.0.rbi +8 -0
  147. data/sorbet/rbi/gems/crack@0.4.5.rbi +144 -0
  148. data/sorbet/rbi/gems/docile@1.4.0.rbi +8 -0
  149. data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
  150. data/sorbet/rbi/gems/hashdiff@1.1.0.rbi +352 -0
  151. data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +19 -0
  152. data/sorbet/rbi/gems/json@2.7.1.rbi +1561 -0
  153. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
  154. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  155. data/sorbet/rbi/gems/mocha@1.16.1.rbi +11 -0
  156. data/sorbet/rbi/gems/netrc@0.11.0.rbi +161 -0
  157. data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
  158. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +9454 -0
  159. data/sorbet/rbi/gems/power_assert@2.0.3.rbi +414 -0
  160. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
  161. data/sorbet/rbi/gems/prism@0.19.0.rbi +29883 -0
  162. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +1150 -0
  163. data/sorbet/rbi/gems/pry@0.14.2.rbi +10085 -0
  164. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +931 -0
  165. data/sorbet/rbi/gems/racc@1.7.3.rbi +161 -0
  166. data/sorbet/rbi/gems/rack@3.0.8.rbi +5193 -0
  167. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
  168. data/sorbet/rbi/gems/rake@13.1.0.rbi +2884 -0
  169. data/sorbet/rbi/gems/rbi@0.1.6.rbi +2922 -0
  170. data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +3766 -0
  171. data/sorbet/rbi/gems/rexml@3.2.6.rbi +4887 -0
  172. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7004 -0
  173. data/sorbet/rbi/gems/rubocop@1.57.2.rbi +56919 -0
  174. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
  175. data/sorbet/rbi/gems/shoulda-context@2.0.0.rbi +555 -0
  176. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +8 -0
  177. data/sorbet/rbi/gems/simplecov@0.21.2.rbi +8 -0
  178. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
  179. data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
  180. data/sorbet/rbi/gems/sync@0.5.0.rbi +8 -0
  181. data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23136 -0
  182. data/sorbet/rbi/gems/tapioca@0.11.17.rbi +3503 -0
  183. data/sorbet/rbi/gems/term-ansicolor@1.7.1.rbi +8 -0
  184. data/sorbet/rbi/gems/test-unit@3.6.1.rbi +4403 -0
  185. data/sorbet/rbi/gems/thor@1.3.0.rbi +4345 -0
  186. data/sorbet/rbi/gems/tins@1.32.1.rbi +8 -0
  187. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -0
  188. data/sorbet/rbi/gems/webmock@3.19.1.rbi +1740 -0
  189. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
  190. data/sorbet/rbi/gems/yard@0.9.34.rbi +18219 -0
  191. data/sorbet/tapioca/config.yml +13 -0
  192. data/sorbet/tapioca/require.rb +4 -0
  193. metadata +61 -27
  194. data/lib/stripe/request_signing_authenticator.rb +0 -79
  195. data/lib/stripe/resources/account_notice.rb +0 -29
  196. data/lib/stripe/resources/capital/financing_offer.rb +0 -46
  197. data/lib/stripe/resources/capital/financing_summary.rb +0 -12
  198. data/lib/stripe/resources/capital/financing_transaction.rb +0 -24
  199. data/lib/stripe/resources/confirmation_token.rb +0 -13
  200. data/lib/stripe/resources/customer_entitlement.rb +0 -9
  201. data/lib/stripe/resources/customer_entitlement_summary.rb +0 -9
  202. data/lib/stripe/resources/entitlements/event.rb +0 -23
  203. data/lib/stripe/resources/entitlements/feature.rb +0 -35
  204. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -11
  205. data/lib/stripe/resources/gift_cards/card.rb +0 -56
  206. data/lib/stripe/resources/gift_cards/transaction.rb +0 -90
  207. data/lib/stripe/resources/invoice_payment.rb +0 -9
  208. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -85
  209. data/lib/stripe/resources/issuing/personalization_design.rb +0 -113
  210. data/lib/stripe/resources/issuing/physical_bundle.rb +0 -23
  211. data/lib/stripe/resources/margin.rb +0 -34
  212. data/lib/stripe/resources/order.rb +0 -117
  213. data/lib/stripe/resources/quote_phase.rb +0 -36
  214. data/lib/stripe/resources/quote_preview_invoice.rb +0 -40
  215. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -8
  216. data/lib/stripe/resources/tax/form.rb +0 -46
@@ -4,6 +4,5 @@
4
4
  module Stripe
5
5
  module ApiVersion
6
6
  CURRENT = "2023-10-16"
7
- PREVIEW = "2023-12-11.preview-v2"
8
7
  end
9
8
  end
@@ -8,6 +8,9 @@ module Stripe
8
8
  include Stripe::APIOperations::Create
9
9
 
10
10
  OBJECT_NAME = "list"
11
+ def self.object_name
12
+ "list"
13
+ end
11
14
 
12
15
  # This accessor allows a `ListObject` to inherit various filters that were
13
16
  # given to a predecessor. This allows for things like consistent limits,
@@ -2,159 +2,138 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  # rubocop:disable Metrics/MethodLength
5
+ # rubocop:disable Metrics/AbcSize
5
6
 
6
7
  module Stripe
7
8
  module ObjectTypes
8
9
  def self.object_names_to_classes
9
10
  {
10
11
  # data structures
11
- ListObject::OBJECT_NAME => ListObject,
12
- SearchResultObject::OBJECT_NAME => SearchResultObject,
12
+ ListObject.object_name => ListObject,
13
+ SearchResultObject.object_name => SearchResultObject,
13
14
 
14
15
  # business objects
15
- File::OBJECT_NAME_ALT => File,
16
- Account::OBJECT_NAME => Account,
17
- AccountLink::OBJECT_NAME => AccountLink,
18
- AccountNotice::OBJECT_NAME => AccountNotice,
19
- AccountSession::OBJECT_NAME => AccountSession,
20
- ApplePayDomain::OBJECT_NAME => ApplePayDomain,
21
- ApplicationFee::OBJECT_NAME => ApplicationFee,
22
- ApplicationFeeRefund::OBJECT_NAME => ApplicationFeeRefund,
23
- Apps::Secret::OBJECT_NAME => Apps::Secret,
24
- Balance::OBJECT_NAME => Balance,
25
- BalanceTransaction::OBJECT_NAME => BalanceTransaction,
26
- BankAccount::OBJECT_NAME => BankAccount,
27
- BillingPortal::Configuration::OBJECT_NAME => BillingPortal::Configuration,
28
- BillingPortal::Session::OBJECT_NAME => BillingPortal::Session,
29
- Capability::OBJECT_NAME => Capability,
30
- Capital::FinancingOffer::OBJECT_NAME => Capital::FinancingOffer,
31
- Capital::FinancingSummary::OBJECT_NAME => Capital::FinancingSummary,
32
- Capital::FinancingTransaction::OBJECT_NAME => Capital::FinancingTransaction,
33
- Card::OBJECT_NAME => Card,
34
- CashBalance::OBJECT_NAME => CashBalance,
35
- Charge::OBJECT_NAME => Charge,
36
- Checkout::Session::OBJECT_NAME => Checkout::Session,
37
- Climate::Order::OBJECT_NAME => Climate::Order,
38
- Climate::Product::OBJECT_NAME => Climate::Product,
39
- Climate::Supplier::OBJECT_NAME => Climate::Supplier,
40
- ConfirmationToken::OBJECT_NAME => ConfirmationToken,
41
- CountrySpec::OBJECT_NAME => CountrySpec,
42
- Coupon::OBJECT_NAME => Coupon,
43
- CreditNote::OBJECT_NAME => CreditNote,
44
- CreditNoteLineItem::OBJECT_NAME => CreditNoteLineItem,
45
- Customer::OBJECT_NAME => Customer,
46
- CustomerBalanceTransaction::OBJECT_NAME => CustomerBalanceTransaction,
47
- CustomerCashBalanceTransaction::OBJECT_NAME => CustomerCashBalanceTransaction,
48
- CustomerEntitlement::OBJECT_NAME => CustomerEntitlement,
49
- CustomerEntitlementSummary::OBJECT_NAME => CustomerEntitlementSummary,
50
- CustomerSession::OBJECT_NAME => CustomerSession,
51
- Discount::OBJECT_NAME => Discount,
52
- Dispute::OBJECT_NAME => Dispute,
53
- Entitlements::Event::OBJECT_NAME => Entitlements::Event,
54
- Entitlements::Feature::OBJECT_NAME => Entitlements::Feature,
55
- EphemeralKey::OBJECT_NAME => EphemeralKey,
56
- Event::OBJECT_NAME => Event,
57
- ExchangeRate::OBJECT_NAME => ExchangeRate,
58
- File::OBJECT_NAME => File,
59
- FileLink::OBJECT_NAME => FileLink,
60
- FinancialConnections::Account::OBJECT_NAME => FinancialConnections::Account,
61
- FinancialConnections::AccountInferredBalance::OBJECT_NAME =>
62
- FinancialConnections::AccountInferredBalance,
63
- FinancialConnections::AccountOwner::OBJECT_NAME => FinancialConnections::AccountOwner,
64
- FinancialConnections::AccountOwnership::OBJECT_NAME =>
16
+ File.object_name_alt => File,
17
+ Account.object_name => Account,
18
+ AccountLink.object_name => AccountLink,
19
+ AccountSession.object_name => AccountSession,
20
+ ApplePayDomain.object_name => ApplePayDomain,
21
+ ApplicationFee.object_name => ApplicationFee,
22
+ ApplicationFeeRefund.object_name => ApplicationFeeRefund,
23
+ Apps::Secret.object_name => Apps::Secret,
24
+ Balance.object_name => Balance,
25
+ BalanceTransaction.object_name => BalanceTransaction,
26
+ BankAccount.object_name => BankAccount,
27
+ BillingPortal::Configuration.object_name => BillingPortal::Configuration,
28
+ BillingPortal::Session.object_name => BillingPortal::Session,
29
+ Capability.object_name => Capability,
30
+ Card.object_name => Card,
31
+ CashBalance.object_name => CashBalance,
32
+ Charge.object_name => Charge,
33
+ Checkout::Session.object_name => Checkout::Session,
34
+ Climate::Order.object_name => Climate::Order,
35
+ Climate::Product.object_name => Climate::Product,
36
+ Climate::Supplier.object_name => Climate::Supplier,
37
+ CountrySpec.object_name => CountrySpec,
38
+ Coupon.object_name => Coupon,
39
+ CreditNote.object_name => CreditNote,
40
+ CreditNoteLineItem.object_name => CreditNoteLineItem,
41
+ Customer.object_name => Customer,
42
+ CustomerBalanceTransaction.object_name => CustomerBalanceTransaction,
43
+ CustomerCashBalanceTransaction.object_name => CustomerCashBalanceTransaction,
44
+ CustomerSession.object_name => CustomerSession,
45
+ Discount.object_name => Discount,
46
+ Dispute.object_name => Dispute,
47
+ EphemeralKey.object_name => EphemeralKey,
48
+ Event.object_name => Event,
49
+ ExchangeRate.object_name => ExchangeRate,
50
+ File.object_name => File,
51
+ FileLink.object_name => FileLink,
52
+ FinancialConnections::Account.object_name => FinancialConnections::Account,
53
+ FinancialConnections::AccountOwner.object_name => FinancialConnections::AccountOwner,
54
+ FinancialConnections::AccountOwnership.object_name =>
65
55
  FinancialConnections::AccountOwnership,
66
- FinancialConnections::Session::OBJECT_NAME => FinancialConnections::Session,
67
- FinancialConnections::Transaction::OBJECT_NAME => FinancialConnections::Transaction,
68
- FundingInstructions::OBJECT_NAME => FundingInstructions,
69
- GiftCards::Card::OBJECT_NAME => GiftCards::Card,
70
- GiftCards::Transaction::OBJECT_NAME => GiftCards::Transaction,
71
- Identity::VerificationReport::OBJECT_NAME => Identity::VerificationReport,
72
- Identity::VerificationSession::OBJECT_NAME => Identity::VerificationSession,
73
- Invoice::OBJECT_NAME => Invoice,
74
- InvoiceItem::OBJECT_NAME => InvoiceItem,
75
- InvoiceLineItem::OBJECT_NAME => InvoiceLineItem,
76
- InvoicePayment::OBJECT_NAME => InvoicePayment,
77
- Issuing::Authorization::OBJECT_NAME => Issuing::Authorization,
78
- Issuing::Card::OBJECT_NAME => Issuing::Card,
79
- Issuing::Cardholder::OBJECT_NAME => Issuing::Cardholder,
80
- Issuing::CreditUnderwritingRecord::OBJECT_NAME => Issuing::CreditUnderwritingRecord,
81
- Issuing::Dispute::OBJECT_NAME => Issuing::Dispute,
82
- Issuing::PersonalizationDesign::OBJECT_NAME => Issuing::PersonalizationDesign,
83
- Issuing::PhysicalBundle::OBJECT_NAME => Issuing::PhysicalBundle,
84
- Issuing::Token::OBJECT_NAME => Issuing::Token,
85
- Issuing::Transaction::OBJECT_NAME => Issuing::Transaction,
86
- LineItem::OBJECT_NAME => LineItem,
87
- LoginLink::OBJECT_NAME => LoginLink,
88
- Mandate::OBJECT_NAME => Mandate,
89
- Margin::OBJECT_NAME => Margin,
90
- Order::OBJECT_NAME => Order,
91
- PaymentIntent::OBJECT_NAME => PaymentIntent,
92
- PaymentLink::OBJECT_NAME => PaymentLink,
93
- PaymentMethod::OBJECT_NAME => PaymentMethod,
94
- PaymentMethodConfiguration::OBJECT_NAME => PaymentMethodConfiguration,
95
- PaymentMethodDomain::OBJECT_NAME => PaymentMethodDomain,
96
- Payout::OBJECT_NAME => Payout,
97
- Person::OBJECT_NAME => Person,
98
- Plan::OBJECT_NAME => Plan,
99
- Price::OBJECT_NAME => Price,
100
- Product::OBJECT_NAME => Product,
101
- PromotionCode::OBJECT_NAME => PromotionCode,
102
- Quote::OBJECT_NAME => Quote,
103
- QuotePhase::OBJECT_NAME => QuotePhase,
104
- QuotePreviewInvoice::OBJECT_NAME => QuotePreviewInvoice,
105
- QuotePreviewSubscriptionSchedule::OBJECT_NAME => QuotePreviewSubscriptionSchedule,
106
- Radar::EarlyFraudWarning::OBJECT_NAME => Radar::EarlyFraudWarning,
107
- Radar::ValueList::OBJECT_NAME => Radar::ValueList,
108
- Radar::ValueListItem::OBJECT_NAME => Radar::ValueListItem,
109
- Refund::OBJECT_NAME => Refund,
110
- Reporting::ReportRun::OBJECT_NAME => Reporting::ReportRun,
111
- Reporting::ReportType::OBJECT_NAME => Reporting::ReportType,
112
- Reversal::OBJECT_NAME => Reversal,
113
- Review::OBJECT_NAME => Review,
114
- SetupAttempt::OBJECT_NAME => SetupAttempt,
115
- SetupIntent::OBJECT_NAME => SetupIntent,
116
- ShippingRate::OBJECT_NAME => ShippingRate,
117
- Sigma::ScheduledQueryRun::OBJECT_NAME => Sigma::ScheduledQueryRun,
118
- Source::OBJECT_NAME => Source,
119
- SourceTransaction::OBJECT_NAME => SourceTransaction,
120
- Subscription::OBJECT_NAME => Subscription,
121
- SubscriptionItem::OBJECT_NAME => SubscriptionItem,
122
- SubscriptionSchedule::OBJECT_NAME => SubscriptionSchedule,
123
- Tax::Calculation::OBJECT_NAME => Tax::Calculation,
124
- Tax::CalculationLineItem::OBJECT_NAME => Tax::CalculationLineItem,
125
- Tax::Form::OBJECT_NAME => Tax::Form,
126
- Tax::Registration::OBJECT_NAME => Tax::Registration,
127
- Tax::Settings::OBJECT_NAME => Tax::Settings,
128
- Tax::Transaction::OBJECT_NAME => Tax::Transaction,
129
- Tax::TransactionLineItem::OBJECT_NAME => Tax::TransactionLineItem,
130
- TaxCode::OBJECT_NAME => TaxCode,
131
- TaxId::OBJECT_NAME => TaxId,
132
- TaxRate::OBJECT_NAME => TaxRate,
133
- Terminal::Configuration::OBJECT_NAME => Terminal::Configuration,
134
- Terminal::ConnectionToken::OBJECT_NAME => Terminal::ConnectionToken,
135
- Terminal::Location::OBJECT_NAME => Terminal::Location,
136
- Terminal::Reader::OBJECT_NAME => Terminal::Reader,
137
- TestHelpers::TestClock::OBJECT_NAME => TestHelpers::TestClock,
138
- Token::OBJECT_NAME => Token,
139
- Topup::OBJECT_NAME => Topup,
140
- Transfer::OBJECT_NAME => Transfer,
141
- Treasury::CreditReversal::OBJECT_NAME => Treasury::CreditReversal,
142
- Treasury::DebitReversal::OBJECT_NAME => Treasury::DebitReversal,
143
- Treasury::FinancialAccount::OBJECT_NAME => Treasury::FinancialAccount,
144
- Treasury::FinancialAccountFeatures::OBJECT_NAME => Treasury::FinancialAccountFeatures,
145
- Treasury::InboundTransfer::OBJECT_NAME => Treasury::InboundTransfer,
146
- Treasury::OutboundPayment::OBJECT_NAME => Treasury::OutboundPayment,
147
- Treasury::OutboundTransfer::OBJECT_NAME => Treasury::OutboundTransfer,
148
- Treasury::ReceivedCredit::OBJECT_NAME => Treasury::ReceivedCredit,
149
- Treasury::ReceivedDebit::OBJECT_NAME => Treasury::ReceivedDebit,
150
- Treasury::Transaction::OBJECT_NAME => Treasury::Transaction,
151
- Treasury::TransactionEntry::OBJECT_NAME => Treasury::TransactionEntry,
152
- UsageRecord::OBJECT_NAME => UsageRecord,
153
- UsageRecordSummary::OBJECT_NAME => UsageRecordSummary,
154
- WebhookEndpoint::OBJECT_NAME => WebhookEndpoint,
56
+ FinancialConnections::Session.object_name => FinancialConnections::Session,
57
+ FinancialConnections::Transaction.object_name => FinancialConnections::Transaction,
58
+ FundingInstructions.object_name => FundingInstructions,
59
+ Identity::VerificationReport.object_name => Identity::VerificationReport,
60
+ Identity::VerificationSession.object_name => Identity::VerificationSession,
61
+ Invoice.object_name => Invoice,
62
+ InvoiceItem.object_name => InvoiceItem,
63
+ InvoiceLineItem.object_name => InvoiceLineItem,
64
+ Issuing::Authorization.object_name => Issuing::Authorization,
65
+ Issuing::Card.object_name => Issuing::Card,
66
+ Issuing::Cardholder.object_name => Issuing::Cardholder,
67
+ Issuing::Dispute.object_name => Issuing::Dispute,
68
+ Issuing::Token.object_name => Issuing::Token,
69
+ Issuing::Transaction.object_name => Issuing::Transaction,
70
+ LineItem.object_name => LineItem,
71
+ LoginLink.object_name => LoginLink,
72
+ Mandate.object_name => Mandate,
73
+ PaymentIntent.object_name => PaymentIntent,
74
+ PaymentLink.object_name => PaymentLink,
75
+ PaymentMethod.object_name => PaymentMethod,
76
+ PaymentMethodConfiguration.object_name => PaymentMethodConfiguration,
77
+ PaymentMethodDomain.object_name => PaymentMethodDomain,
78
+ Payout.object_name => Payout,
79
+ Person.object_name => Person,
80
+ Plan.object_name => Plan,
81
+ Price.object_name => Price,
82
+ Product.object_name => Product,
83
+ PromotionCode.object_name => PromotionCode,
84
+ Quote.object_name => Quote,
85
+ Radar::EarlyFraudWarning.object_name => Radar::EarlyFraudWarning,
86
+ Radar::ValueList.object_name => Radar::ValueList,
87
+ Radar::ValueListItem.object_name => Radar::ValueListItem,
88
+ Refund.object_name => Refund,
89
+ Reporting::ReportRun.object_name => Reporting::ReportRun,
90
+ Reporting::ReportType.object_name => Reporting::ReportType,
91
+ Reversal.object_name => Reversal,
92
+ Review.object_name => Review,
93
+ SetupAttempt.object_name => SetupAttempt,
94
+ SetupIntent.object_name => SetupIntent,
95
+ ShippingRate.object_name => ShippingRate,
96
+ Sigma::ScheduledQueryRun.object_name => Sigma::ScheduledQueryRun,
97
+ Source.object_name => Source,
98
+ SourceTransaction.object_name => SourceTransaction,
99
+ Subscription.object_name => Subscription,
100
+ SubscriptionItem.object_name => SubscriptionItem,
101
+ SubscriptionSchedule.object_name => SubscriptionSchedule,
102
+ Tax::Calculation.object_name => Tax::Calculation,
103
+ Tax::CalculationLineItem.object_name => Tax::CalculationLineItem,
104
+ Tax::Registration.object_name => Tax::Registration,
105
+ Tax::Settings.object_name => Tax::Settings,
106
+ Tax::Transaction.object_name => Tax::Transaction,
107
+ Tax::TransactionLineItem.object_name => Tax::TransactionLineItem,
108
+ TaxCode.object_name => TaxCode,
109
+ TaxId.object_name => TaxId,
110
+ TaxRate.object_name => TaxRate,
111
+ Terminal::Configuration.object_name => Terminal::Configuration,
112
+ Terminal::ConnectionToken.object_name => Terminal::ConnectionToken,
113
+ Terminal::Location.object_name => Terminal::Location,
114
+ Terminal::Reader.object_name => Terminal::Reader,
115
+ TestHelpers::TestClock.object_name => TestHelpers::TestClock,
116
+ Token.object_name => Token,
117
+ Topup.object_name => Topup,
118
+ Transfer.object_name => Transfer,
119
+ Treasury::CreditReversal.object_name => Treasury::CreditReversal,
120
+ Treasury::DebitReversal.object_name => Treasury::DebitReversal,
121
+ Treasury::FinancialAccount.object_name => Treasury::FinancialAccount,
122
+ Treasury::FinancialAccountFeatures.object_name => Treasury::FinancialAccountFeatures,
123
+ Treasury::InboundTransfer.object_name => Treasury::InboundTransfer,
124
+ Treasury::OutboundPayment.object_name => Treasury::OutboundPayment,
125
+ Treasury::OutboundTransfer.object_name => Treasury::OutboundTransfer,
126
+ Treasury::ReceivedCredit.object_name => Treasury::ReceivedCredit,
127
+ Treasury::ReceivedDebit.object_name => Treasury::ReceivedDebit,
128
+ Treasury::Transaction.object_name => Treasury::Transaction,
129
+ Treasury::TransactionEntry.object_name => Treasury::TransactionEntry,
130
+ UsageRecord.object_name => UsageRecord,
131
+ UsageRecordSummary.object_name => UsageRecordSummary,
132
+ WebhookEndpoint.object_name => WebhookEndpoint,
155
133
  }
156
134
  end
157
135
  end
158
136
  end
159
137
 
138
+ # rubocop:enable Metrics/AbcSize
160
139
  # rubocop:enable Metrics/MethodLength
@@ -17,10 +17,16 @@ module Stripe
17
17
  extend Stripe::APIOperations::NestedResource
18
18
 
19
19
  OBJECT_NAME = "account"
20
+ def self.object_name
21
+ "account"
22
+ end
20
23
 
21
24
  nested_resource_class_methods :capability,
22
25
  operations: %i[retrieve update list],
23
26
  resource_plural: "capabilities"
27
+ nested_resource_class_methods :external_account,
28
+ operations: %i[create retrieve update delete list]
29
+ nested_resource_class_methods :login_link, operations: %i[create]
24
30
  nested_resource_class_methods :person, operations: %i[create retrieve update delete list]
25
31
 
26
32
  # Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first.
@@ -69,10 +75,6 @@ module Stripe
69
75
 
70
76
  save_nested_resource :external_account
71
77
 
72
- nested_resource_class_methods :external_account,
73
- operations: %i[create retrieve update delete list]
74
- nested_resource_class_methods :login_link, operations: %i[create]
75
-
76
78
  def resource_url
77
79
  if self["id"]
78
80
  super
@@ -10,6 +10,9 @@ module Stripe
10
10
  extend Stripe::APIOperations::Create
11
11
 
12
12
  OBJECT_NAME = "account_link"
13
+ def self.object_name
14
+ "account_link"
15
+ end
13
16
 
14
17
  # Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.
15
18
  def self.create(params = {}, opts = {})
@@ -13,6 +13,9 @@ module Stripe
13
13
  extend Stripe::APIOperations::Create
14
14
 
15
15
  OBJECT_NAME = "account_session"
16
+ def self.object_name
17
+ "account_session"
18
+ end
16
19
 
17
20
  # Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
18
21
  def self.create(params = {}, opts = {})
@@ -9,6 +9,9 @@ module Stripe
9
9
  extend Stripe::APIOperations::List
10
10
 
11
11
  OBJECT_NAME = "apple_pay_domain"
12
+ def self.object_name
13
+ "apple_pay_domain"
14
+ end
12
15
 
13
16
  def self.resource_url
14
17
  "/v1/apple_pay/domains"
@@ -7,6 +7,9 @@ module Stripe
7
7
  extend Stripe::APIOperations::NestedResource
8
8
 
9
9
  OBJECT_NAME = "application_fee"
10
+ def self.object_name
11
+ "application_fee"
12
+ end
10
13
 
11
14
  nested_resource_class_methods :refund, operations: %i[create retrieve update list]
12
15
 
@@ -11,6 +11,9 @@ module Stripe
11
11
  include Stripe::APIOperations::Save
12
12
 
13
13
  OBJECT_NAME = "fee_refund"
14
+ def self.object_name
15
+ "fee_refund"
16
+ end
14
17
 
15
18
  def resource_url
16
19
  "#{ApplicationFee.resource_url}/#{CGI.escape(fee)}/refunds" \
@@ -17,6 +17,9 @@ module Stripe
17
17
  extend Stripe::APIOperations::List
18
18
 
19
19
  OBJECT_NAME = "apps.secret"
20
+ def self.object_name
21
+ "apps.secret"
22
+ end
20
23
 
21
24
  # Deletes a secret from the secret store by name and scope.
22
25
  def self.delete_where(params = {}, opts = {})
@@ -15,5 +15,8 @@ module Stripe
15
15
  # Related guide: [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances)
16
16
  class Balance < SingletonAPIResource
17
17
  OBJECT_NAME = "balance"
18
+ def self.object_name
19
+ "balance"
20
+ end
18
21
  end
19
22
  end
@@ -10,6 +10,9 @@ module Stripe
10
10
  extend Stripe::APIOperations::List
11
11
 
12
12
  OBJECT_NAME = "balance_transaction"
13
+ def self.object_name
14
+ "balance_transaction"
15
+ end
13
16
 
14
17
  # Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.
15
18
  #
@@ -15,6 +15,9 @@ module Stripe
15
15
  include Stripe::APIOperations::Save
16
16
 
17
17
  OBJECT_NAME = "bank_account"
18
+ def self.object_name
19
+ "bank_account"
20
+ end
18
21
 
19
22
  def verify(params = {}, opts = {})
20
23
  resp, opts = execute_resource_request(:post, resource_url + "/verify", params, opts)
@@ -10,6 +10,9 @@ module Stripe
10
10
  include Stripe::APIOperations::Save
11
11
 
12
12
  OBJECT_NAME = "billing_portal.configuration"
13
+ def self.object_name
14
+ "billing_portal.configuration"
15
+ end
13
16
 
14
17
  # Creates a configuration that describes the functionality and behavior of a PortalSession
15
18
  def self.create(params = {}, opts = {})
@@ -21,6 +21,9 @@ module Stripe
21
21
  extend Stripe::APIOperations::Create
22
22
 
23
23
  OBJECT_NAME = "billing_portal.session"
24
+ def self.object_name
25
+ "billing_portal.session"
26
+ end
24
27
 
25
28
  # Creates a session of the customer portal.
26
29
  def self.create(params = {}, opts = {})
@@ -9,6 +9,9 @@ module Stripe
9
9
  include Stripe::APIOperations::Save
10
10
 
11
11
  OBJECT_NAME = "capability"
12
+ def self.object_name
13
+ "capability"
14
+ end
12
15
 
13
16
  def resource_url
14
17
  if !respond_to?(:account) || account.nil?
@@ -13,6 +13,9 @@ module Stripe
13
13
  include Stripe::APIOperations::Save
14
14
 
15
15
  OBJECT_NAME = "card"
16
+ def self.object_name
17
+ "card"
18
+ end
16
19
 
17
20
  def resource_url
18
21
  if respond_to?(:customer) && !customer.nil? && !customer.empty?
@@ -5,6 +5,9 @@ module Stripe
5
5
  # A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.
6
6
  class CashBalance < APIResource
7
7
  OBJECT_NAME = "cash_balance"
8
+ def self.object_name
9
+ "cash_balance"
10
+ end
8
11
 
9
12
  def resource_url
10
13
  if !respond_to?(:customer) || customer.nil?
@@ -13,6 +13,9 @@ module Stripe
13
13
  include Stripe::APIOperations::Save
14
14
 
15
15
  OBJECT_NAME = "charge"
16
+ def self.object_name
17
+ "charge"
18
+ end
16
19
 
17
20
  # Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
18
21
  #
@@ -22,6 +22,9 @@ module Stripe
22
22
  extend Stripe::APIOperations::List
23
23
 
24
24
  OBJECT_NAME = "checkout.session"
25
+ def self.object_name
26
+ "checkout.session"
27
+ end
25
28
 
26
29
  # A Session can be expired when it is in one of these statuses: open
27
30
  #
@@ -11,6 +11,9 @@ module Stripe
11
11
  include Stripe::APIOperations::Save
12
12
 
13
13
  OBJECT_NAME = "climate.order"
14
+ def self.object_name
15
+ "climate.order"
16
+ end
14
17
 
15
18
  # Cancels a Climate order. You can cancel an order within 30 days of creation. Stripe refunds the
16
19
  # reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier
@@ -9,6 +9,9 @@ module Stripe
9
9
  extend Stripe::APIOperations::List
10
10
 
11
11
  OBJECT_NAME = "climate.product"
12
+ def self.object_name
13
+ "climate.product"
14
+ end
12
15
 
13
16
  # Lists all available Climate product objects.
14
17
  def self.list(filters = {}, opts = {})
@@ -8,6 +8,9 @@ module Stripe
8
8
  extend Stripe::APIOperations::List
9
9
 
10
10
  OBJECT_NAME = "climate.supplier"
11
+ def self.object_name
12
+ "climate.supplier"
13
+ end
11
14
 
12
15
  # Lists all available Climate supplier objects.
13
16
  def self.list(filters = {}, opts = {})
@@ -12,6 +12,9 @@ module Stripe
12
12
  extend Stripe::APIOperations::List
13
13
 
14
14
  OBJECT_NAME = "country_spec"
15
+ def self.object_name
16
+ "country_spec"
17
+ end
15
18
 
16
19
  # Lists all Country Spec objects available in the API.
17
20
  def self.list(filters = {}, opts = {})
@@ -12,6 +12,9 @@ module Stripe
12
12
  include Stripe::APIOperations::Save
13
13
 
14
14
  OBJECT_NAME = "coupon"
15
+ def self.object_name
16
+ "coupon"
17
+ end
15
18
 
16
19
  # You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.
17
20
  #
@@ -11,6 +11,9 @@ module Stripe
11
11
  include Stripe::APIOperations::Save
12
12
 
13
13
  OBJECT_NAME = "credit_note"
14
+ def self.object_name
15
+ "credit_note"
16
+ end
14
17
 
15
18
  # Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
16
19
  def void_credit_note(params = {}, opts = {})
@@ -5,5 +5,8 @@ module Stripe
5
5
  # The credit note line item object
6
6
  class CreditNoteLineItem < StripeObject
7
7
  OBJECT_NAME = "credit_note_line_item"
8
+ def self.object_name
9
+ "credit_note_line_item"
10
+ end
8
11
  end
9
12
  end
@@ -14,10 +14,13 @@ module Stripe
14
14
  extend Stripe::APIOperations::NestedResource
15
15
 
16
16
  OBJECT_NAME = "customer"
17
+ def self.object_name
18
+ "customer"
19
+ end
17
20
 
18
21
  nested_resource_class_methods :balance_transaction, operations: %i[create retrieve update list]
19
22
  nested_resource_class_methods :cash_balance_transaction, operations: %i[retrieve list]
20
- nested_resource_class_methods :entitlement, operations: %i[list]
23
+ nested_resource_class_methods :source, operations: %i[create retrieve update delete list]
21
24
  nested_resource_class_methods :tax_id, operations: %i[create retrieve delete list]
22
25
 
23
26
  # Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new
@@ -105,8 +108,6 @@ module Stripe
105
108
  end
106
109
 
107
110
  save_nested_resource :source
108
- nested_resource_class_methods :source,
109
- operations: %i[create retrieve update delete list]
110
111
 
111
112
  # The API request for deleting a card or bank account and for detaching a
112
113
  # source object are the same.
@@ -184,22 +185,15 @@ module Stripe
184
185
  )
185
186
  end
186
187
 
187
- # Retrieve the entitlement summary for a customer
188
- def self.retrieve_entitlement_summary(customer, params = {}, opts = {})
189
- request_stripe_object(
190
- method: :get,
191
- path: format("/v1/customers/%<customer>s/entitlement_summary", { customer: CGI.escape(customer) }),
192
- params: params,
193
- opts: opts
194
- )
195
- end
196
-
197
188
  def test_helpers
198
189
  TestHelpers.new(self)
199
190
  end
200
191
 
201
192
  class TestHelpers < APIResourceTestHelpers
202
193
  RESOURCE_CLASS = Customer
194
+ def self.resource_class
195
+ "Customer"
196
+ end
203
197
 
204
198
  # Create an incoming testmode bank transfer
205
199
  def self.fund_cash_balance(customer, params = {}, opts = {})