stripe 10.7.1 → 10.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Gemfile +1 -1
  4. data/OPENAPI_VERSION +1 -1
  5. data/VERSION +1 -1
  6. data/lib/stripe/resources/account.rb +61 -1
  7. data/lib/stripe/resources/account_link.rb +5 -0
  8. data/lib/stripe/resources/account_session.rb +5 -0
  9. data/lib/stripe/resources/apple_pay_domain.rb +40 -0
  10. data/lib/stripe/resources/application_fee.rb +5 -0
  11. data/lib/stripe/resources/apps/secret.rb +10 -0
  12. data/lib/stripe/resources/balance_transaction.rb +12 -0
  13. data/lib/stripe/resources/bank_account.rb +27 -0
  14. data/lib/stripe/resources/billing_portal/configuration.rb +30 -0
  15. data/lib/stripe/resources/billing_portal/session.rb +10 -0
  16. data/lib/stripe/resources/card.rb +27 -0
  17. data/lib/stripe/resources/charge.rb +22 -0
  18. data/lib/stripe/resources/checkout/session.rb +20 -0
  19. data/lib/stripe/resources/climate/order.rb +22 -0
  20. data/lib/stripe/resources/climate/product.rb +10 -0
  21. data/lib/stripe/resources/climate/supplier.rb +10 -0
  22. data/lib/stripe/resources/country_spec.rb +5 -0
  23. data/lib/stripe/resources/coupon.rb +42 -0
  24. data/lib/stripe/resources/credit_note.rb +33 -0
  25. data/lib/stripe/resources/customer.rb +42 -0
  26. data/lib/stripe/resources/customer_session.rb +10 -0
  27. data/lib/stripe/resources/dispute.rb +17 -0
  28. data/lib/stripe/resources/ephemeral_key.rb +20 -0
  29. data/lib/stripe/resources/event.rb +5 -0
  30. data/lib/stripe/resources/exchange_rate.rb +5 -0
  31. data/lib/stripe/resources/file.rb +5 -0
  32. data/lib/stripe/resources/file_link.rb +20 -0
  33. data/lib/stripe/resources/financial_connections/account.rb +10 -0
  34. data/lib/stripe/resources/financial_connections/session.rb +10 -0
  35. data/lib/stripe/resources/financial_connections/transaction.rb +10 -0
  36. data/lib/stripe/resources/identity/verification_report.rb +10 -0
  37. data/lib/stripe/resources/identity/verification_session.rb +39 -0
  38. data/lib/stripe/resources/invoice.rb +45 -0
  39. data/lib/stripe/resources/invoice_item.rb +40 -0
  40. data/lib/stripe/resources/issuing/authorization.rb +20 -0
  41. data/lib/stripe/resources/issuing/card.rb +20 -0
  42. data/lib/stripe/resources/issuing/cardholder.rb +30 -0
  43. data/lib/stripe/resources/issuing/dispute.rb +30 -0
  44. data/lib/stripe/resources/issuing/token.rb +15 -0
  45. data/lib/stripe/resources/issuing/transaction.rb +20 -0
  46. data/lib/stripe/resources/payment_intent.rb +35 -0
  47. data/lib/stripe/resources/payment_link.rb +20 -0
  48. data/lib/stripe/resources/payment_method.rb +22 -0
  49. data/lib/stripe/resources/payment_method_configuration.rb +30 -0
  50. data/lib/stripe/resources/payment_method_domain.rb +30 -0
  51. data/lib/stripe/resources/payout.rb +24 -0
  52. data/lib/stripe/resources/plan.rb +40 -0
  53. data/lib/stripe/resources/price.rb +20 -0
  54. data/lib/stripe/resources/product.rb +40 -0
  55. data/lib/stripe/resources/promotion_code.rb +20 -0
  56. data/lib/stripe/resources/quote.rb +20 -0
  57. data/lib/stripe/resources/radar/early_fraud_warning.rb +10 -0
  58. data/lib/stripe/resources/radar/value_list.rb +50 -0
  59. data/lib/stripe/resources/radar/value_list_item.rb +40 -0
  60. data/lib/stripe/resources/refund.rb +36 -0
  61. data/lib/stripe/resources/reporting/report_run.rb +20 -0
  62. data/lib/stripe/resources/reporting/report_type.rb +10 -0
  63. data/lib/stripe/resources/review.rb +5 -0
  64. data/lib/stripe/resources/setup_attempt.rb +5 -0
  65. data/lib/stripe/resources/setup_intent.rb +23 -0
  66. data/lib/stripe/resources/shipping_rate.rb +20 -0
  67. data/lib/stripe/resources/sigma/scheduled_query_run.rb +10 -0
  68. data/lib/stripe/resources/source.rb +17 -0
  69. data/lib/stripe/resources/subscription.rb +46 -0
  70. data/lib/stripe/resources/subscription_item.rb +50 -0
  71. data/lib/stripe/resources/subscription_schedule.rb +30 -0
  72. data/lib/stripe/resources/tax/calculation.rb +10 -0
  73. data/lib/stripe/resources/tax/registration.rb +32 -0
  74. data/lib/stripe/resources/tax_code.rb +5 -0
  75. data/lib/stripe/resources/tax_id.rb +20 -0
  76. data/lib/stripe/resources/tax_rate.rb +20 -0
  77. data/lib/stripe/resources/terminal/configuration.rb +50 -0
  78. data/lib/stripe/resources/terminal/connection_token.rb +10 -0
  79. data/lib/stripe/resources/terminal/location.rb +51 -0
  80. data/lib/stripe/resources/terminal/reader.rb +50 -0
  81. data/lib/stripe/resources/test_helpers/test_clock.rb +40 -0
  82. data/lib/stripe/resources/token.rb +6 -0
  83. data/lib/stripe/resources/topup.rb +20 -0
  84. data/lib/stripe/resources/transfer.rb +22 -0
  85. data/lib/stripe/resources/treasury/credit_reversal.rb +20 -0
  86. data/lib/stripe/resources/treasury/debit_reversal.rb +20 -0
  87. data/lib/stripe/resources/treasury/financial_account.rb +30 -0
  88. data/lib/stripe/resources/treasury/inbound_transfer.rb +20 -0
  89. data/lib/stripe/resources/treasury/outbound_payment.rb +20 -0
  90. data/lib/stripe/resources/treasury/outbound_transfer.rb +20 -0
  91. data/lib/stripe/resources/treasury/received_credit.rb +10 -0
  92. data/lib/stripe/resources/treasury/received_debit.rb +10 -0
  93. data/lib/stripe/resources/treasury/transaction.rb +10 -0
  94. data/lib/stripe/resources/treasury/transaction_entry.rb +10 -0
  95. data/lib/stripe/resources/webhook_endpoint.rb +50 -0
  96. data/lib/stripe/version.rb +1 -1
  97. metadata +2 -2
@@ -36,5 +36,22 @@ module Stripe
36
36
  opts: opts
37
37
  )
38
38
  end
39
+
40
+ # Returns a list of your disputes.
41
+ def self.list(filters = {}, opts = {})
42
+ request_stripe_object(method: :get, path: "/v1/disputes", params: filters, opts: opts)
43
+ end
44
+
45
+ # When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically.
46
+ #
47
+ # Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our [guide to dispute types](https://stripe.com/docs/disputes/categories).
48
+ def self.update(id, params = {}, opts = {})
49
+ request_stripe_object(
50
+ method: :post,
51
+ path: format("/v1/disputes/%<id>s", { id: CGI.escape(id) }),
52
+ params: params,
53
+ opts: opts
54
+ )
55
+ end
39
56
  end
40
57
  end
@@ -16,5 +16,25 @@ module Stripe
16
16
  end
17
17
  super
18
18
  end
19
+
20
+ # Invalidates a short-lived API key for a given resource.
21
+ def self.delete(id, params = {}, opts = {})
22
+ request_stripe_object(
23
+ method: :delete,
24
+ path: format("/v1/ephemeral_keys/%<id>s", { id: CGI.escape(id) }),
25
+ params: params,
26
+ opts: opts
27
+ )
28
+ end
29
+
30
+ # Invalidates a short-lived API key for a given resource.
31
+ def delete(params = {}, opts = {})
32
+ request_stripe_object(
33
+ method: :delete,
34
+ path: format("/v1/ephemeral_keys/%<key>s", { key: CGI.escape(self["id"]) }),
35
+ params: params,
36
+ opts: opts
37
+ )
38
+ end
19
39
  end
20
40
  end
@@ -36,5 +36,10 @@ module Stripe
36
36
  extend Stripe::APIOperations::List
37
37
 
38
38
  OBJECT_NAME = "event"
39
+
40
+ # List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://stripe.com/docs/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
41
+ def self.list(filters = {}, opts = {})
42
+ request_stripe_object(method: :get, path: "/v1/events", params: filters, opts: opts)
43
+ end
39
44
  end
40
45
  end
@@ -32,5 +32,10 @@ module Stripe
32
32
  extend Stripe::APIOperations::List
33
33
 
34
34
  OBJECT_NAME = "exchange_rate"
35
+
36
+ # Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.
37
+ def self.list(filters = {}, opts = {})
38
+ request_stripe_object(method: :get, path: "/v1/exchange_rates", params: filters, opts: opts)
39
+ end
35
40
  end
36
41
  end
@@ -37,5 +37,10 @@ module Stripe
37
37
  }.merge(Util.normalize_opts(opts))
38
38
  super
39
39
  end
40
+
41
+ # Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top.
42
+ def self.list(filters = {}, opts = {})
43
+ request_stripe_object(method: :get, path: "/v1/files", params: filters, opts: opts)
44
+ end
40
45
  end
41
46
  end
@@ -11,5 +11,25 @@ module Stripe
11
11
  include Stripe::APIOperations::Save
12
12
 
13
13
  OBJECT_NAME = "file_link"
14
+
15
+ # Creates a new file link object.
16
+ def self.create(params = {}, opts = {})
17
+ request_stripe_object(method: :post, path: "/v1/file_links", params: params, opts: opts)
18
+ end
19
+
20
+ # Returns a list of file links.
21
+ def self.list(filters = {}, opts = {})
22
+ request_stripe_object(method: :get, path: "/v1/file_links", params: filters, opts: opts)
23
+ end
24
+
25
+ # Updates an existing file link object. Expired links can no longer be updated.
26
+ def self.update(id, params = {}, opts = {})
27
+ request_stripe_object(
28
+ method: :post,
29
+ path: format("/v1/file_links/%<id>s", { id: CGI.escape(id) }),
30
+ params: params,
31
+ opts: opts
32
+ )
33
+ end
14
34
  end
15
35
  end
@@ -108,6 +108,16 @@ module Stripe
108
108
  opts: opts
109
109
  )
110
110
  end
111
+
112
+ # Returns a list of Financial Connections Account objects.
113
+ def self.list(filters = {}, opts = {})
114
+ request_stripe_object(
115
+ method: :get,
116
+ path: "/v1/financial_connections/accounts",
117
+ params: filters,
118
+ opts: opts
119
+ )
120
+ end
111
121
  end
112
122
  end
113
123
  end
@@ -8,6 +8,16 @@ module Stripe
8
8
  extend Stripe::APIOperations::Create
9
9
 
10
10
  OBJECT_NAME = "financial_connections.session"
11
+
12
+ # To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js.
13
+ def self.create(params = {}, opts = {})
14
+ request_stripe_object(
15
+ method: :post,
16
+ path: "/v1/financial_connections/sessions",
17
+ params: params,
18
+ opts: opts
19
+ )
20
+ end
11
21
  end
12
22
  end
13
23
  end
@@ -8,6 +8,16 @@ module Stripe
8
8
  extend Stripe::APIOperations::List
9
9
 
10
10
  OBJECT_NAME = "financial_connections.transaction"
11
+
12
+ # Returns a list of Financial Connections Transaction objects.
13
+ def self.list(filters = {}, opts = {})
14
+ request_stripe_object(
15
+ method: :get,
16
+ path: "/v1/financial_connections/transactions",
17
+ params: filters,
18
+ opts: opts
19
+ )
20
+ end
11
21
  end
12
22
  end
13
23
  end
@@ -18,6 +18,16 @@ module Stripe
18
18
  extend Stripe::APIOperations::List
19
19
 
20
20
  OBJECT_NAME = "identity.verification_report"
21
+
22
+ # List all verification reports.
23
+ def self.list(filters = {}, opts = {})
24
+ request_stripe_object(
25
+ method: :get,
26
+ path: "/v1/identity/verification_reports",
27
+ params: filters,
28
+ opts: opts
29
+ )
30
+ end
21
31
  end
22
32
  end
23
33
  end
@@ -100,6 +100,45 @@ module Stripe
100
100
  opts: opts
101
101
  )
102
102
  end
103
+
104
+ # Creates a VerificationSession object.
105
+ #
106
+ # After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session's url.
107
+ #
108
+ # If your API key is in test mode, verification checks won't actually process, though everything else will occur as if in live mode.
109
+ #
110
+ # Related guide: [Verify your users' identity documents](https://stripe.com/docs/identity/verify-identity-documents)
111
+ def self.create(params = {}, opts = {})
112
+ request_stripe_object(
113
+ method: :post,
114
+ path: "/v1/identity/verification_sessions",
115
+ params: params,
116
+ opts: opts
117
+ )
118
+ end
119
+
120
+ # Returns a list of VerificationSessions
121
+ def self.list(filters = {}, opts = {})
122
+ request_stripe_object(
123
+ method: :get,
124
+ path: "/v1/identity/verification_sessions",
125
+ params: filters,
126
+ opts: opts
127
+ )
128
+ end
129
+
130
+ # Updates a VerificationSession object.
131
+ #
132
+ # When the session status is requires_input, you can use this method to update the
133
+ # verification check and options.
134
+ def self.update(id, params = {}, opts = {})
135
+ request_stripe_object(
136
+ method: :post,
137
+ path: format("/v1/identity/verification_sessions/%<id>s", { id: CGI.escape(id) }),
138
+ params: params,
139
+ opts: opts
140
+ )
141
+ end
103
142
  end
104
143
  end
105
144
  end
@@ -166,6 +166,36 @@ module Stripe
166
166
  )
167
167
  end
168
168
 
169
+ # This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or <a href="#send_invoice">send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
170
+ def self.create(params = {}, opts = {})
171
+ request_stripe_object(method: :post, path: "/v1/invoices", params: params, opts: opts)
172
+ end
173
+
174
+ # Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice).
175
+ def self.delete(id, params = {}, opts = {})
176
+ request_stripe_object(
177
+ method: :delete,
178
+ path: format("/v1/invoices/%<id>s", { id: CGI.escape(id) }),
179
+ params: params,
180
+ opts: opts
181
+ )
182
+ end
183
+
184
+ # Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice).
185
+ def delete(params = {}, opts = {})
186
+ request_stripe_object(
187
+ method: :delete,
188
+ path: format("/v1/invoices/%<invoice>s", { invoice: CGI.escape(self["id"]) }),
189
+ params: params,
190
+ opts: opts
191
+ )
192
+ end
193
+
194
+ # You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.
195
+ def self.list(filters = {}, opts = {})
196
+ request_stripe_object(method: :get, path: "/v1/invoices", params: filters, opts: opts)
197
+ end
198
+
169
199
  def self.search(params = {}, opts = {})
170
200
  request_stripe_object(method: :get, path: "/v1/invoices/search", params: params, opts: opts)
171
201
  end
@@ -173,5 +203,20 @@ module Stripe
173
203
  def self.search_auto_paging_each(params = {}, opts = {}, &blk)
174
204
  search(params, opts).auto_paging_each(&blk)
175
205
  end
206
+
207
+ # Draft invoices are fully editable. Once an invoice is [finalized](https://stripe.com/docs/billing/invoices/workflow#finalized),
208
+ # monetary values, as well as collection_method, become uneditable.
209
+ #
210
+ # If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on,
211
+ # sending reminders for, or [automatically reconciling](https://stripe.com/docs/billing/invoices/reconciliation) invoices, pass
212
+ # auto_advance=false.
213
+ def self.update(id, params = {}, opts = {})
214
+ request_stripe_object(
215
+ method: :post,
216
+ path: format("/v1/invoices/%<id>s", { id: CGI.escape(id) }),
217
+ params: params,
218
+ opts: opts
219
+ )
220
+ end
176
221
  end
177
222
  end
@@ -20,5 +20,45 @@ module Stripe
20
20
  include Stripe::APIOperations::Save
21
21
 
22
22
  OBJECT_NAME = "invoiceitem"
23
+
24
+ # Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.
25
+ def self.create(params = {}, opts = {})
26
+ request_stripe_object(method: :post, path: "/v1/invoiceitems", params: params, opts: opts)
27
+ end
28
+
29
+ # Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice.
30
+ def self.delete(id, params = {}, opts = {})
31
+ request_stripe_object(
32
+ method: :delete,
33
+ path: format("/v1/invoiceitems/%<id>s", { id: CGI.escape(id) }),
34
+ params: params,
35
+ opts: opts
36
+ )
37
+ end
38
+
39
+ # Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice.
40
+ def delete(params = {}, opts = {})
41
+ request_stripe_object(
42
+ method: :delete,
43
+ path: format("/v1/invoiceitems/%<invoiceitem>s", { invoiceitem: CGI.escape(self["id"]) }),
44
+ params: params,
45
+ opts: opts
46
+ )
47
+ end
48
+
49
+ # Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.
50
+ def self.list(filters = {}, opts = {})
51
+ request_stripe_object(method: :get, path: "/v1/invoiceitems", params: filters, opts: opts)
52
+ end
53
+
54
+ # Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it's attached to is closed.
55
+ def self.update(id, params = {}, opts = {})
56
+ request_stripe_object(
57
+ method: :post,
58
+ path: format("/v1/invoiceitems/%<id>s", { id: CGI.escape(id) }),
59
+ params: params,
60
+ opts: opts
61
+ )
62
+ end
23
63
  end
24
64
  end
@@ -58,6 +58,26 @@ module Stripe
58
58
  )
59
59
  end
60
60
 
61
+ # Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
62
+ def self.list(filters = {}, opts = {})
63
+ request_stripe_object(
64
+ method: :get,
65
+ path: "/v1/issuing/authorizations",
66
+ params: filters,
67
+ opts: opts
68
+ )
69
+ end
70
+
71
+ # Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
72
+ def self.update(id, params = {}, opts = {})
73
+ request_stripe_object(
74
+ method: :post,
75
+ path: format("/v1/issuing/authorizations/%<id>s", { id: CGI.escape(id) }),
76
+ params: params,
77
+ opts: opts
78
+ )
79
+ end
80
+
61
81
  def test_helpers
62
82
  TestHelpers.new(self)
63
83
  end
@@ -11,6 +11,26 @@ module Stripe
11
11
 
12
12
  OBJECT_NAME = "issuing.card"
13
13
 
14
+ # Creates an Issuing Card object.
15
+ def self.create(params = {}, opts = {})
16
+ request_stripe_object(method: :post, path: "/v1/issuing/cards", params: params, opts: opts)
17
+ end
18
+
19
+ # Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
20
+ def self.list(filters = {}, opts = {})
21
+ request_stripe_object(method: :get, path: "/v1/issuing/cards", params: filters, opts: opts)
22
+ end
23
+
24
+ # Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
25
+ def self.update(id, params = {}, opts = {})
26
+ request_stripe_object(
27
+ method: :post,
28
+ path: format("/v1/issuing/cards/%<id>s", { id: CGI.escape(id) }),
29
+ params: params,
30
+ opts: opts
31
+ )
32
+ end
33
+
14
34
  def test_helpers
15
35
  TestHelpers.new(self)
16
36
  end
@@ -12,6 +12,36 @@ module Stripe
12
12
  include Stripe::APIOperations::Save
13
13
 
14
14
  OBJECT_NAME = "issuing.cardholder"
15
+
16
+ # Creates a new Issuing Cardholder object that can be issued cards.
17
+ def self.create(params = {}, opts = {})
18
+ request_stripe_object(
19
+ method: :post,
20
+ path: "/v1/issuing/cardholders",
21
+ params: params,
22
+ opts: opts
23
+ )
24
+ end
25
+
26
+ # Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
27
+ def self.list(filters = {}, opts = {})
28
+ request_stripe_object(
29
+ method: :get,
30
+ path: "/v1/issuing/cardholders",
31
+ params: filters,
32
+ opts: opts
33
+ )
34
+ end
35
+
36
+ # Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
37
+ def self.update(id, params = {}, opts = {})
38
+ request_stripe_object(
39
+ method: :post,
40
+ path: format("/v1/issuing/cardholders/%<id>s", { id: CGI.escape(id) }),
41
+ params: params,
42
+ opts: opts
43
+ )
44
+ end
15
45
  end
16
46
  end
17
47
  end
@@ -32,6 +32,36 @@ module Stripe
32
32
  opts: opts
33
33
  )
34
34
  end
35
+
36
+ # Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
37
+ def self.create(params = {}, opts = {})
38
+ request_stripe_object(
39
+ method: :post,
40
+ path: "/v1/issuing/disputes",
41
+ params: params,
42
+ opts: opts
43
+ )
44
+ end
45
+
46
+ # Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
47
+ def self.list(filters = {}, opts = {})
48
+ request_stripe_object(
49
+ method: :get,
50
+ path: "/v1/issuing/disputes",
51
+ params: filters,
52
+ opts: opts
53
+ )
54
+ end
55
+
56
+ # Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.
57
+ def self.update(id, params = {}, opts = {})
58
+ request_stripe_object(
59
+ method: :post,
60
+ path: format("/v1/issuing/disputes/%<id>s", { id: CGI.escape(id) }),
61
+ params: params,
62
+ opts: opts
63
+ )
64
+ end
35
65
  end
36
66
  end
37
67
  end
@@ -9,6 +9,21 @@ module Stripe
9
9
  include Stripe::APIOperations::Save
10
10
 
11
11
  OBJECT_NAME = "issuing.token"
12
+
13
+ # Lists all Issuing Token objects for a given card.
14
+ def self.list(filters = {}, opts = {})
15
+ request_stripe_object(method: :get, path: "/v1/issuing/tokens", params: filters, opts: opts)
16
+ end
17
+
18
+ # Attempts to update the specified Issuing Token object to the status specified.
19
+ def self.update(id, params = {}, opts = {})
20
+ request_stripe_object(
21
+ method: :post,
22
+ path: format("/v1/issuing/tokens/%<id>s", { id: CGI.escape(id) }),
23
+ params: params,
24
+ opts: opts
25
+ )
26
+ end
12
27
  end
13
28
  end
14
29
  end
@@ -14,6 +14,26 @@ module Stripe
14
14
 
15
15
  OBJECT_NAME = "issuing.transaction"
16
16
 
17
+ # Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
18
+ def self.list(filters = {}, opts = {})
19
+ request_stripe_object(
20
+ method: :get,
21
+ path: "/v1/issuing/transactions",
22
+ params: filters,
23
+ opts: opts
24
+ )
25
+ end
26
+
27
+ # Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
28
+ def self.update(id, params = {}, opts = {})
29
+ request_stripe_object(
30
+ method: :post,
31
+ path: format("/v1/issuing/transactions/%<id>s", { id: CGI.escape(id) }),
32
+ params: params,
33
+ opts: opts
34
+ )
35
+ end
36
+
17
37
  def test_helpers
18
38
  TestHelpers.new(self)
19
39
  end
@@ -247,6 +247,25 @@ module Stripe
247
247
  )
248
248
  end
249
249
 
250
+ # Creates a PaymentIntent object.
251
+ #
252
+ # After the PaymentIntent is created, attach a payment method and [confirm](https://stripe.com/docs/api/payment_intents/confirm)
253
+ # to continue the payment. Learn more about <a href="/docs/payments/payment-intents">the available payment flows
254
+ # with the Payment Intents API.
255
+ #
256
+ # When you use confirm=true during creation, it's equivalent to creating
257
+ # and confirming the PaymentIntent in the same call. You can use any parameters
258
+ # available in the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) when you supply
259
+ # confirm=true.
260
+ def self.create(params = {}, opts = {})
261
+ request_stripe_object(method: :post, path: "/v1/payment_intents", params: params, opts: opts)
262
+ end
263
+
264
+ # Returns a list of PaymentIntents.
265
+ def self.list(filters = {}, opts = {})
266
+ request_stripe_object(method: :get, path: "/v1/payment_intents", params: filters, opts: opts)
267
+ end
268
+
250
269
  def self.search(params = {}, opts = {})
251
270
  request_stripe_object(
252
271
  method: :get,
@@ -259,5 +278,21 @@ module Stripe
259
278
  def self.search_auto_paging_each(params = {}, opts = {}, &blk)
260
279
  search(params, opts).auto_paging_each(&blk)
261
280
  end
281
+
282
+ # Updates properties on a PaymentIntent object without confirming.
283
+ #
284
+ # Depending on which properties you update, you might need to confirm the
285
+ # PaymentIntent again. For example, updating the payment_method
286
+ # always requires you to confirm the PaymentIntent again. If you prefer to
287
+ # update and confirm at the same time, we recommend updating properties through
288
+ # the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) instead.
289
+ def self.update(id, params = {}, opts = {})
290
+ request_stripe_object(
291
+ method: :post,
292
+ path: format("/v1/payment_intents/%<id>s", { id: CGI.escape(id) }),
293
+ params: params,
294
+ opts: opts
295
+ )
296
+ end
262
297
  end
263
298
  end
@@ -33,5 +33,25 @@ module Stripe
33
33
  opts: opts
34
34
  )
35
35
  end
36
+
37
+ # Creates a payment link.
38
+ def self.create(params = {}, opts = {})
39
+ request_stripe_object(method: :post, path: "/v1/payment_links", params: params, opts: opts)
40
+ end
41
+
42
+ # Returns a list of your payment links.
43
+ def self.list(filters = {}, opts = {})
44
+ request_stripe_object(method: :get, path: "/v1/payment_links", params: filters, opts: opts)
45
+ end
46
+
47
+ # Updates a payment link.
48
+ def self.update(id, params = {}, opts = {})
49
+ request_stripe_object(
50
+ method: :post,
51
+ path: format("/v1/payment_links/%<id>s", { id: CGI.escape(id) }),
52
+ params: params,
53
+ opts: opts
54
+ )
55
+ end
36
56
  end
37
57
  end
@@ -77,5 +77,27 @@ module Stripe
77
77
  opts: opts
78
78
  )
79
79
  end
80
+
81
+ # Creates a PaymentMethod object. Read the [Stripe.js reference](https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js.
82
+ #
83
+ # Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents API to accept a payment immediately or the <a href="/docs/payments/save-and-reuse">SetupIntent](https://stripe.com/docs/payments/accept-a-payment) API to collect payment method details ahead of a future payment.
84
+ def self.create(params = {}, opts = {})
85
+ request_stripe_object(method: :post, path: "/v1/payment_methods", params: params, opts: opts)
86
+ end
87
+
88
+ # Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer_list) API instead.
89
+ def self.list(filters = {}, opts = {})
90
+ request_stripe_object(method: :get, path: "/v1/payment_methods", params: filters, opts: opts)
91
+ end
92
+
93
+ # Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.
94
+ def self.update(id, params = {}, opts = {})
95
+ request_stripe_object(
96
+ method: :post,
97
+ path: format("/v1/payment_methods/%<id>s", { id: CGI.escape(id) }),
98
+ params: params,
99
+ opts: opts
100
+ )
101
+ end
80
102
  end
81
103
  end
@@ -22,5 +22,35 @@ module Stripe
22
22
  include Stripe::APIOperations::Save
23
23
 
24
24
  OBJECT_NAME = "payment_method_configuration"
25
+
26
+ # Creates a payment method configuration
27
+ def self.create(params = {}, opts = {})
28
+ request_stripe_object(
29
+ method: :post,
30
+ path: "/v1/payment_method_configurations",
31
+ params: params,
32
+ opts: opts
33
+ )
34
+ end
35
+
36
+ # List payment method configurations
37
+ def self.list(filters = {}, opts = {})
38
+ request_stripe_object(
39
+ method: :get,
40
+ path: "/v1/payment_method_configurations",
41
+ params: filters,
42
+ opts: opts
43
+ )
44
+ end
45
+
46
+ # Update payment method configuration
47
+ def self.update(id, params = {}, opts = {})
48
+ request_stripe_object(
49
+ method: :post,
50
+ path: format("/v1/payment_method_configurations/%<id>s", { id: CGI.escape(id) }),
51
+ params: params,
52
+ opts: opts
53
+ )
54
+ end
25
55
  end
26
56
  end