stripe 10.11.0 → 10.12.0.pre.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +292 -48
  3. data/OPENAPI_VERSION +1 -1
  4. data/README.md +11 -0
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_operations/request.rb +2 -1
  7. data/lib/stripe/api_version.rb +1 -0
  8. data/lib/stripe/object_types.rb +22 -0
  9. data/lib/stripe/request_signing_authenticator.rb +79 -0
  10. data/lib/stripe/resources/account.rb +69 -69
  11. data/lib/stripe/resources/account_notice.rb +32 -0
  12. data/lib/stripe/resources/apple_pay_domain.rb +4 -4
  13. data/lib/stripe/resources/apps/secret.rb +5 -5
  14. data/lib/stripe/resources/capital/financing_offer.rb +49 -0
  15. data/lib/stripe/resources/capital/financing_summary.rb +15 -0
  16. data/lib/stripe/resources/capital/financing_transaction.rb +27 -0
  17. data/lib/stripe/resources/checkout/session.rb +21 -21
  18. data/lib/stripe/resources/confirmation_token.rb +16 -0
  19. data/lib/stripe/resources/credit_note.rb +35 -35
  20. data/lib/stripe/resources/customer.rb +66 -55
  21. data/lib/stripe/resources/customer_entitlement.rb +12 -0
  22. data/lib/stripe/resources/customer_entitlement_summary.rb +12 -0
  23. data/lib/stripe/resources/entitlements/feature.rb +38 -0
  24. data/lib/stripe/resources/ephemeral_key.rb +9 -9
  25. data/lib/stripe/resources/file.rb +5 -5
  26. data/lib/stripe/resources/financial_connections/account.rb +37 -34
  27. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +14 -0
  28. data/lib/stripe/resources/gift_cards/card.rb +59 -0
  29. data/lib/stripe/resources/gift_cards/transaction.rb +93 -0
  30. data/lib/stripe/resources/identity/verification_session.rb +38 -38
  31. data/lib/stripe/resources/invoice.rb +113 -60
  32. data/lib/stripe/resources/invoice_payment.rb +12 -0
  33. data/lib/stripe/resources/issuing/authorization.rb +8 -8
  34. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +88 -0
  35. data/lib/stripe/resources/issuing/dispute.rb +16 -16
  36. data/lib/stripe/resources/issuing/personalization_design.rb +119 -0
  37. data/lib/stripe/resources/issuing/physical_bundle.rb +26 -0
  38. data/lib/stripe/resources/margin.rb +37 -0
  39. data/lib/stripe/resources/order.rb +120 -0
  40. data/lib/stripe/resources/payment_intent.rb +150 -100
  41. data/lib/stripe/resources/payment_link.rb +10 -10
  42. data/lib/stripe/resources/payment_method.rb +17 -17
  43. data/lib/stripe/resources/payment_method_domain.rb +29 -29
  44. data/lib/stripe/resources/payout.rb +22 -22
  45. data/lib/stripe/resources/quote.rb +136 -32
  46. data/lib/stripe/resources/quote_phase.rb +39 -0
  47. data/lib/stripe/resources/quote_preview_invoice.rb +43 -0
  48. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +11 -0
  49. data/lib/stripe/resources/setup_intent.rb +32 -32
  50. data/lib/stripe/resources/sigma/scheduled_query_run.rb +4 -4
  51. data/lib/stripe/resources/source.rb +17 -17
  52. data/lib/stripe/resources/subscription.rb +36 -36
  53. data/lib/stripe/resources/subscription_schedule.rb +31 -11
  54. data/lib/stripe/resources/tax/calculation.rb +10 -10
  55. data/lib/stripe/resources/tax/form.rb +49 -0
  56. data/lib/stripe/resources/tax/transaction.rb +10 -10
  57. data/lib/stripe/resources/terminal/reader.rb +101 -41
  58. data/lib/stripe/resources/treasury/financial_account.rb +25 -25
  59. data/lib/stripe/resources/treasury/transaction_entry.rb +4 -4
  60. data/lib/stripe/resources.rb +21 -0
  61. data/lib/stripe/stripe_client.rb +62 -28
  62. data/lib/stripe/stripe_configuration.rb +2 -1
  63. data/lib/stripe/util.rb +8 -1
  64. data/lib/stripe/version.rb +1 -1
  65. data/lib/stripe.rb +54 -0
  66. metadata +25 -3
@@ -15,41 +15,41 @@ module Stripe
15
15
  "subscription_schedule"
16
16
  end
17
17
 
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.
19
- def cancel(params = {}, opts = {})
18
+ # Amends an existing subscription schedule.
19
+ def amend(params = {}, opts = {})
20
20
  request_stripe_object(
21
21
  method: :post,
22
- path: format("/v1/subscription_schedules/%<schedule>s/cancel", { schedule: CGI.escape(self["id"]) }),
22
+ path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
23
23
  params: params,
24
24
  opts: opts
25
25
  )
26
26
  end
27
27
 
28
- # Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.
29
- def release(params = {}, opts = {})
28
+ # Amends an existing subscription schedule.
29
+ def self.amend(schedule, params = {}, opts = {})
30
30
  request_stripe_object(
31
31
  method: :post,
32
- path: format("/v1/subscription_schedules/%<schedule>s/release", { schedule: CGI.escape(self["id"]) }),
32
+ path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
33
33
  params: params,
34
34
  opts: opts
35
35
  )
36
36
  end
37
37
 
38
38
  # 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.
39
- def self.cancel(schedule, params = {}, opts = {})
39
+ def cancel(params = {}, opts = {})
40
40
  request_stripe_object(
41
41
  method: :post,
42
- path: format("/v1/subscription_schedules/%<schedule>s/cancel", { schedule: CGI.escape(schedule) }),
42
+ path: format("/v1/subscription_schedules/%<schedule>s/cancel", { schedule: CGI.escape(self["id"]) }),
43
43
  params: params,
44
44
  opts: opts
45
45
  )
46
46
  end
47
47
 
48
- # Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.
49
- def self.release(schedule, params = {}, opts = {})
48
+ # 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.
49
+ def self.cancel(schedule, params = {}, opts = {})
50
50
  request_stripe_object(
51
51
  method: :post,
52
- path: format("/v1/subscription_schedules/%<schedule>s/release", { schedule: CGI.escape(schedule) }),
52
+ path: format("/v1/subscription_schedules/%<schedule>s/cancel", { schedule: CGI.escape(schedule) }),
53
53
  params: params,
54
54
  opts: opts
55
55
  )
@@ -75,6 +75,26 @@ module Stripe
75
75
  )
76
76
  end
77
77
 
78
+ # Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.
79
+ def release(params = {}, opts = {})
80
+ request_stripe_object(
81
+ method: :post,
82
+ path: format("/v1/subscription_schedules/%<schedule>s/release", { schedule: CGI.escape(self["id"]) }),
83
+ params: params,
84
+ opts: opts
85
+ )
86
+ end
87
+
88
+ # Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.
89
+ def self.release(schedule, params = {}, opts = {})
90
+ request_stripe_object(
91
+ method: :post,
92
+ path: format("/v1/subscription_schedules/%<schedule>s/release", { schedule: CGI.escape(schedule) }),
93
+ params: params,
94
+ opts: opts
95
+ )
96
+ end
97
+
78
98
  # Updates an existing subscription schedule.
79
99
  def self.update(id, params = {}, opts = {})
80
100
  request_stripe_object(
@@ -14,31 +14,31 @@ module Stripe
14
14
  "tax.calculation"
15
15
  end
16
16
 
17
- # Retrieves the line items of a persisted tax calculation as a collection.
18
- def list_line_items(params = {}, opts = {})
17
+ # Calculates tax based on input and returns a Tax Calculation object.
18
+ def self.create(params = {}, opts = {})
19
19
  request_stripe_object(
20
- method: :get,
21
- path: format("/v1/tax/calculations/%<calculation>s/line_items", { calculation: CGI.escape(self["id"]) }),
20
+ method: :post,
21
+ path: "/v1/tax/calculations",
22
22
  params: params,
23
23
  opts: opts
24
24
  )
25
25
  end
26
26
 
27
27
  # Retrieves the line items of a persisted tax calculation as a collection.
28
- def self.list_line_items(calculation, params = {}, opts = {})
28
+ def list_line_items(params = {}, opts = {})
29
29
  request_stripe_object(
30
30
  method: :get,
31
- path: format("/v1/tax/calculations/%<calculation>s/line_items", { calculation: CGI.escape(calculation) }),
31
+ path: format("/v1/tax/calculations/%<calculation>s/line_items", { calculation: CGI.escape(self["id"]) }),
32
32
  params: params,
33
33
  opts: opts
34
34
  )
35
35
  end
36
36
 
37
- # Calculates tax based on input and returns a Tax Calculation object.
38
- def self.create(params = {}, opts = {})
37
+ # Retrieves the line items of a persisted tax calculation as a collection.
38
+ def self.list_line_items(calculation, params = {}, opts = {})
39
39
  request_stripe_object(
40
- method: :post,
41
- path: "/v1/tax/calculations",
40
+ method: :get,
41
+ path: format("/v1/tax/calculations/%<calculation>s/line_items", { calculation: CGI.escape(calculation) }),
42
42
  params: params,
43
43
  opts: opts
44
44
  )
@@ -0,0 +1,49 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Tax
6
+ # Tax forms are legal documents which are delivered to one or more tax authorities for information reporting purposes.
7
+ #
8
+ # Related guide: [US tax reporting for Connect platforms](https://stripe.com/docs/connect/tax-reporting)
9
+ class Form < APIResource
10
+ extend Stripe::APIOperations::List
11
+
12
+ OBJECT_NAME = "tax.form"
13
+ def self.object_name
14
+ "tax.form"
15
+ end
16
+
17
+ # Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first.
18
+ def self.list(filters = {}, opts = {})
19
+ request_stripe_object(method: :get, path: "/v1/tax/forms", params: filters, opts: opts)
20
+ end
21
+
22
+ # Download the PDF for a tax form.
23
+ def pdf(params = {}, opts = {}, &read_body_chunk_block)
24
+ config = opts[:client]&.config || Stripe.config
25
+ opts = { api_base: config.uploads_base }.merge(opts)
26
+ request_stream(
27
+ method: :get,
28
+ path: format("/v1/tax/forms/%<id>s/pdf", { id: CGI.escape(self["id"]) }),
29
+ params: params,
30
+ opts: opts,
31
+ &read_body_chunk_block
32
+ )
33
+ end
34
+
35
+ # Download the PDF for a tax form.
36
+ def self.pdf(id, params = {}, opts = {}, &read_body_chunk_block)
37
+ config = opts[:client]&.config || Stripe.config
38
+ opts = { api_base: config.uploads_base }.merge(opts)
39
+ execute_resource_request_stream(
40
+ :get,
41
+ format("/v1/tax/forms/%<id>s/pdf", { id: CGI.escape(id) }),
42
+ params,
43
+ opts,
44
+ &read_body_chunk_block
45
+ )
46
+ end
47
+ end
48
+ end
49
+ end
@@ -12,16 +12,6 @@ module Stripe
12
12
  "tax.transaction"
13
13
  end
14
14
 
15
- # Retrieves the line items of a committed standalone transaction as a collection.
16
- def list_line_items(params = {}, opts = {})
17
- request_stripe_object(
18
- method: :get,
19
- path: format("/v1/tax/transactions/%<transaction>s/line_items", { transaction: CGI.escape(self["id"]) }),
20
- params: params,
21
- opts: opts
22
- )
23
- end
24
-
25
15
  # Creates a Tax Transaction from a calculation.
26
16
  def self.create_from_calculation(params = {}, opts = {})
27
17
  request_stripe_object(
@@ -42,6 +32,16 @@ module Stripe
42
32
  )
43
33
  end
44
34
 
35
+ # Retrieves the line items of a committed standalone transaction as a collection.
36
+ def list_line_items(params = {}, opts = {})
37
+ request_stripe_object(
38
+ method: :get,
39
+ path: format("/v1/tax/transactions/%<transaction>s/line_items", { transaction: CGI.escape(self["id"]) }),
40
+ params: params,
41
+ opts: opts
42
+ )
43
+ end
44
+
45
45
  # Retrieves the line items of a committed standalone transaction as a collection.
46
46
  def self.list_line_items(transaction, params = {}, opts = {})
47
47
  request_stripe_object(
@@ -27,91 +27,71 @@ module Stripe
27
27
  )
28
28
  end
29
29
 
30
- # Initiates a payment flow on a Reader.
31
- def process_payment_intent(params = {}, opts = {})
32
- request_stripe_object(
33
- method: :post,
34
- path: format("/v1/terminal/readers/%<reader>s/process_payment_intent", { reader: CGI.escape(self["id"]) }),
35
- params: params,
36
- opts: opts
37
- )
38
- end
39
-
40
- # Initiates a setup intent flow on a Reader.
41
- def process_setup_intent(params = {}, opts = {})
42
- request_stripe_object(
43
- method: :post,
44
- path: format("/v1/terminal/readers/%<reader>s/process_setup_intent", { reader: CGI.escape(self["id"]) }),
45
- params: params,
46
- opts: opts
47
- )
48
- end
49
-
50
- # Initiates a refund on a Reader
51
- def refund_payment(params = {}, opts = {})
30
+ # Cancels the current reader action.
31
+ def self.cancel_action(reader, params = {}, opts = {})
52
32
  request_stripe_object(
53
33
  method: :post,
54
- path: format("/v1/terminal/readers/%<reader>s/refund_payment", { reader: CGI.escape(self["id"]) }),
34
+ path: format("/v1/terminal/readers/%<reader>s/cancel_action", { reader: CGI.escape(reader) }),
55
35
  params: params,
56
36
  opts: opts
57
37
  )
58
38
  end
59
39
 
60
- # Sets reader display to show cart details.
61
- def set_reader_display(params = {}, opts = {})
40
+ # Initiates an input collection flow on a Reader.
41
+ def collect_inputs(params = {}, opts = {})
62
42
  request_stripe_object(
63
43
  method: :post,
64
- path: format("/v1/terminal/readers/%<reader>s/set_reader_display", { reader: CGI.escape(self["id"]) }),
44
+ path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(self["id"]) }),
65
45
  params: params,
66
46
  opts: opts
67
47
  )
68
48
  end
69
49
 
70
- # Cancels the current reader action.
71
- def self.cancel_action(reader, params = {}, opts = {})
50
+ # Initiates an input collection flow on a Reader.
51
+ def self.collect_inputs(reader, params = {}, opts = {})
72
52
  request_stripe_object(
73
53
  method: :post,
74
- path: format("/v1/terminal/readers/%<reader>s/cancel_action", { reader: CGI.escape(reader) }),
54
+ path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(reader) }),
75
55
  params: params,
76
56
  opts: opts
77
57
  )
78
58
  end
79
59
 
80
- # Initiates a payment flow on a Reader.
81
- def self.process_payment_intent(reader, params = {}, opts = {})
60
+ # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
61
+ def collect_payment_method(params = {}, opts = {})
82
62
  request_stripe_object(
83
63
  method: :post,
84
- path: format("/v1/terminal/readers/%<reader>s/process_payment_intent", { reader: CGI.escape(reader) }),
64
+ path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(self["id"]) }),
85
65
  params: params,
86
66
  opts: opts
87
67
  )
88
68
  end
89
69
 
90
- # Initiates a setup intent flow on a Reader.
91
- def self.process_setup_intent(reader, params = {}, opts = {})
70
+ # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
71
+ def self.collect_payment_method(reader, params = {}, opts = {})
92
72
  request_stripe_object(
93
73
  method: :post,
94
- path: format("/v1/terminal/readers/%<reader>s/process_setup_intent", { reader: CGI.escape(reader) }),
74
+ path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(reader) }),
95
75
  params: params,
96
76
  opts: opts
97
77
  )
98
78
  end
99
79
 
100
- # Initiates a refund on a Reader
101
- def self.refund_payment(reader, params = {}, opts = {})
80
+ # Finalizes a payment on a Reader.
81
+ def confirm_payment_intent(params = {}, opts = {})
102
82
  request_stripe_object(
103
83
  method: :post,
104
- path: format("/v1/terminal/readers/%<reader>s/refund_payment", { reader: CGI.escape(reader) }),
84
+ path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(self["id"]) }),
105
85
  params: params,
106
86
  opts: opts
107
87
  )
108
88
  end
109
89
 
110
- # Sets reader display to show cart details.
111
- def self.set_reader_display(reader, params = {}, opts = {})
90
+ # Finalizes a payment on a Reader.
91
+ def self.confirm_payment_intent(reader, params = {}, opts = {})
112
92
  request_stripe_object(
113
93
  method: :post,
114
- path: format("/v1/terminal/readers/%<reader>s/set_reader_display", { reader: CGI.escape(reader) }),
94
+ path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(reader) }),
115
95
  params: params,
116
96
  opts: opts
117
97
  )
@@ -157,6 +137,86 @@ module Stripe
157
137
  )
158
138
  end
159
139
 
140
+ # Initiates a payment flow on a Reader.
141
+ def process_payment_intent(params = {}, opts = {})
142
+ request_stripe_object(
143
+ method: :post,
144
+ path: format("/v1/terminal/readers/%<reader>s/process_payment_intent", { reader: CGI.escape(self["id"]) }),
145
+ params: params,
146
+ opts: opts
147
+ )
148
+ end
149
+
150
+ # Initiates a payment flow on a Reader.
151
+ def self.process_payment_intent(reader, params = {}, opts = {})
152
+ request_stripe_object(
153
+ method: :post,
154
+ path: format("/v1/terminal/readers/%<reader>s/process_payment_intent", { reader: CGI.escape(reader) }),
155
+ params: params,
156
+ opts: opts
157
+ )
158
+ end
159
+
160
+ # Initiates a setup intent flow on a Reader.
161
+ def process_setup_intent(params = {}, opts = {})
162
+ request_stripe_object(
163
+ method: :post,
164
+ path: format("/v1/terminal/readers/%<reader>s/process_setup_intent", { reader: CGI.escape(self["id"]) }),
165
+ params: params,
166
+ opts: opts
167
+ )
168
+ end
169
+
170
+ # Initiates a setup intent flow on a Reader.
171
+ def self.process_setup_intent(reader, params = {}, opts = {})
172
+ request_stripe_object(
173
+ method: :post,
174
+ path: format("/v1/terminal/readers/%<reader>s/process_setup_intent", { reader: CGI.escape(reader) }),
175
+ params: params,
176
+ opts: opts
177
+ )
178
+ end
179
+
180
+ # Initiates a refund on a Reader
181
+ def refund_payment(params = {}, opts = {})
182
+ request_stripe_object(
183
+ method: :post,
184
+ path: format("/v1/terminal/readers/%<reader>s/refund_payment", { reader: CGI.escape(self["id"]) }),
185
+ params: params,
186
+ opts: opts
187
+ )
188
+ end
189
+
190
+ # Initiates a refund on a Reader
191
+ def self.refund_payment(reader, params = {}, opts = {})
192
+ request_stripe_object(
193
+ method: :post,
194
+ path: format("/v1/terminal/readers/%<reader>s/refund_payment", { reader: CGI.escape(reader) }),
195
+ params: params,
196
+ opts: opts
197
+ )
198
+ end
199
+
200
+ # Sets reader display to show cart details.
201
+ def set_reader_display(params = {}, opts = {})
202
+ request_stripe_object(
203
+ method: :post,
204
+ path: format("/v1/terminal/readers/%<reader>s/set_reader_display", { reader: CGI.escape(self["id"]) }),
205
+ params: params,
206
+ opts: opts
207
+ )
208
+ end
209
+
210
+ # Sets reader display to show cart details.
211
+ def self.set_reader_display(reader, params = {}, opts = {})
212
+ request_stripe_object(
213
+ method: :post,
214
+ path: format("/v1/terminal/readers/%<reader>s/set_reader_display", { reader: CGI.escape(reader) }),
215
+ params: params,
216
+ opts: opts
217
+ )
218
+ end
219
+
160
220
  # Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
161
221
  def self.update(id, params = {}, opts = {})
162
222
  request_stripe_object(
@@ -15,71 +15,71 @@ module Stripe
15
15
  "treasury.financial_account"
16
16
  end
17
17
 
18
- # Retrieves Features information associated with the FinancialAccount.
19
- def retrieve_features(params = {}, opts = {})
18
+ # Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.
19
+ def self.create(params = {}, opts = {})
20
20
  request_stripe_object(
21
- method: :get,
22
- path: format("/v1/treasury/financial_accounts/%<financial_account>s/features", { financial_account: CGI.escape(self["id"]) }),
21
+ method: :post,
22
+ path: "/v1/treasury/financial_accounts",
23
23
  params: params,
24
24
  opts: opts
25
25
  )
26
26
  end
27
27
 
28
- # Updates the Features associated with a FinancialAccount.
29
- def update_features(params = {}, opts = {})
28
+ # Returns a list of FinancialAccounts.
29
+ def self.list(filters = {}, opts = {})
30
30
  request_stripe_object(
31
- method: :post,
32
- path: format("/v1/treasury/financial_accounts/%<financial_account>s/features", { financial_account: CGI.escape(self["id"]) }),
33
- params: params,
31
+ method: :get,
32
+ path: "/v1/treasury/financial_accounts",
33
+ params: filters,
34
34
  opts: opts
35
35
  )
36
36
  end
37
37
 
38
38
  # Retrieves Features information associated with the FinancialAccount.
39
- def self.retrieve_features(financial_account, params = {}, opts = {})
39
+ def retrieve_features(params = {}, opts = {})
40
40
  request_stripe_object(
41
41
  method: :get,
42
- path: format("/v1/treasury/financial_accounts/%<financial_account>s/features", { financial_account: CGI.escape(financial_account) }),
42
+ path: format("/v1/treasury/financial_accounts/%<financial_account>s/features", { financial_account: CGI.escape(self["id"]) }),
43
43
  params: params,
44
44
  opts: opts
45
45
  )
46
46
  end
47
47
 
48
- # Updates the Features associated with a FinancialAccount.
49
- def self.update_features(financial_account, params = {}, opts = {})
48
+ # Retrieves Features information associated with the FinancialAccount.
49
+ def self.retrieve_features(financial_account, params = {}, opts = {})
50
50
  request_stripe_object(
51
- method: :post,
51
+ method: :get,
52
52
  path: format("/v1/treasury/financial_accounts/%<financial_account>s/features", { financial_account: CGI.escape(financial_account) }),
53
53
  params: params,
54
54
  opts: opts
55
55
  )
56
56
  end
57
57
 
58
- # Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.
59
- def self.create(params = {}, opts = {})
58
+ # Updates the details of a FinancialAccount.
59
+ def self.update(id, params = {}, opts = {})
60
60
  request_stripe_object(
61
61
  method: :post,
62
- path: "/v1/treasury/financial_accounts",
62
+ path: format("/v1/treasury/financial_accounts/%<id>s", { id: CGI.escape(id) }),
63
63
  params: params,
64
64
  opts: opts
65
65
  )
66
66
  end
67
67
 
68
- # Returns a list of FinancialAccounts.
69
- def self.list(filters = {}, opts = {})
68
+ # Updates the Features associated with a FinancialAccount.
69
+ def update_features(params = {}, opts = {})
70
70
  request_stripe_object(
71
- method: :get,
72
- path: "/v1/treasury/financial_accounts",
73
- params: filters,
71
+ method: :post,
72
+ path: format("/v1/treasury/financial_accounts/%<financial_account>s/features", { financial_account: CGI.escape(self["id"]) }),
73
+ params: params,
74
74
  opts: opts
75
75
  )
76
76
  end
77
77
 
78
- # Updates the details of a FinancialAccount.
79
- def self.update(id, params = {}, opts = {})
78
+ # Updates the Features associated with a FinancialAccount.
79
+ def self.update_features(financial_account, params = {}, opts = {})
80
80
  request_stripe_object(
81
81
  method: :post,
82
- path: format("/v1/treasury/financial_accounts/%<id>s", { id: CGI.escape(id) }),
82
+ path: format("/v1/treasury/financial_accounts/%<financial_account>s/features", { financial_account: CGI.escape(financial_account) }),
83
83
  params: params,
84
84
  opts: opts
85
85
  )
@@ -12,10 +12,6 @@ module Stripe
12
12
  "treasury.transaction_entry"
13
13
  end
14
14
 
15
- def self.resource_url
16
- "/v1/treasury/transaction_entries"
17
- end
18
-
19
15
  # Retrieves a list of TransactionEntry objects.
20
16
  def self.list(filters = {}, opts = {})
21
17
  request_stripe_object(
@@ -25,6 +21,10 @@ module Stripe
25
21
  opts: opts
26
22
  )
27
23
  end
24
+
25
+ def self.resource_url
26
+ "/v1/treasury/transaction_entries"
27
+ end
28
28
  end
29
29
  end
30
30
  end
@@ -3,6 +3,7 @@
3
3
 
4
4
  require "stripe/resources/account"
5
5
  require "stripe/resources/account_link"
6
+ require "stripe/resources/account_notice"
6
7
  require "stripe/resources/account_session"
7
8
  require "stripe/resources/apple_pay_domain"
8
9
  require "stripe/resources/application_fee"
@@ -14,6 +15,9 @@ require "stripe/resources/bank_account"
14
15
  require "stripe/resources/billing_portal/configuration"
15
16
  require "stripe/resources/billing_portal/session"
16
17
  require "stripe/resources/capability"
18
+ require "stripe/resources/capital/financing_offer"
19
+ require "stripe/resources/capital/financing_summary"
20
+ require "stripe/resources/capital/financing_transaction"
17
21
  require "stripe/resources/card"
18
22
  require "stripe/resources/cash_balance"
19
23
  require "stripe/resources/charge"
@@ -21,6 +25,7 @@ require "stripe/resources/checkout/session"
21
25
  require "stripe/resources/climate/order"
22
26
  require "stripe/resources/climate/product"
23
27
  require "stripe/resources/climate/supplier"
28
+ require "stripe/resources/confirmation_token"
24
29
  require "stripe/resources/country_spec"
25
30
  require "stripe/resources/coupon"
26
31
  require "stripe/resources/credit_note"
@@ -28,34 +33,46 @@ require "stripe/resources/credit_note_line_item"
28
33
  require "stripe/resources/customer"
29
34
  require "stripe/resources/customer_balance_transaction"
30
35
  require "stripe/resources/customer_cash_balance_transaction"
36
+ require "stripe/resources/customer_entitlement"
37
+ require "stripe/resources/customer_entitlement_summary"
31
38
  require "stripe/resources/customer_session"
32
39
  require "stripe/resources/discount"
33
40
  require "stripe/resources/dispute"
41
+ require "stripe/resources/entitlements/feature"
34
42
  require "stripe/resources/ephemeral_key"
35
43
  require "stripe/resources/event"
36
44
  require "stripe/resources/exchange_rate"
37
45
  require "stripe/resources/file"
38
46
  require "stripe/resources/file_link"
39
47
  require "stripe/resources/financial_connections/account"
48
+ require "stripe/resources/financial_connections/account_inferred_balance"
40
49
  require "stripe/resources/financial_connections/account_owner"
41
50
  require "stripe/resources/financial_connections/account_ownership"
42
51
  require "stripe/resources/financial_connections/session"
43
52
  require "stripe/resources/financial_connections/transaction"
44
53
  require "stripe/resources/funding_instructions"
54
+ require "stripe/resources/gift_cards/card"
55
+ require "stripe/resources/gift_cards/transaction"
45
56
  require "stripe/resources/identity/verification_report"
46
57
  require "stripe/resources/identity/verification_session"
47
58
  require "stripe/resources/invoice"
48
59
  require "stripe/resources/invoice_item"
49
60
  require "stripe/resources/invoice_line_item"
61
+ require "stripe/resources/invoice_payment"
50
62
  require "stripe/resources/issuing/authorization"
51
63
  require "stripe/resources/issuing/card"
52
64
  require "stripe/resources/issuing/cardholder"
65
+ require "stripe/resources/issuing/credit_underwriting_record"
53
66
  require "stripe/resources/issuing/dispute"
67
+ require "stripe/resources/issuing/personalization_design"
68
+ require "stripe/resources/issuing/physical_bundle"
54
69
  require "stripe/resources/issuing/token"
55
70
  require "stripe/resources/issuing/transaction"
56
71
  require "stripe/resources/line_item"
57
72
  require "stripe/resources/login_link"
58
73
  require "stripe/resources/mandate"
74
+ require "stripe/resources/margin"
75
+ require "stripe/resources/order"
59
76
  require "stripe/resources/payment_intent"
60
77
  require "stripe/resources/payment_link"
61
78
  require "stripe/resources/payment_method"
@@ -68,6 +85,9 @@ require "stripe/resources/price"
68
85
  require "stripe/resources/product"
69
86
  require "stripe/resources/promotion_code"
70
87
  require "stripe/resources/quote"
88
+ require "stripe/resources/quote_phase"
89
+ require "stripe/resources/quote_preview_invoice"
90
+ require "stripe/resources/quote_preview_subscription_schedule"
71
91
  require "stripe/resources/radar/early_fraud_warning"
72
92
  require "stripe/resources/radar/value_list"
73
93
  require "stripe/resources/radar/value_list_item"
@@ -87,6 +107,7 @@ require "stripe/resources/subscription_item"
87
107
  require "stripe/resources/subscription_schedule"
88
108
  require "stripe/resources/tax/calculation"
89
109
  require "stripe/resources/tax/calculation_line_item"
110
+ require "stripe/resources/tax/form"
90
111
  require "stripe/resources/tax/registration"
91
112
  require "stripe/resources/tax/settings"
92
113
  require "stripe/resources/tax/transaction"