stripe 9.3.0.pre.beta.1 → 9.4.0.pre.beta.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9752761603256d405fad6cea0dbc96f8cf08d7704033f917a045f6fb301a8cf
4
- data.tar.gz: 01cca74212d9d7cb3bba662707348b40632b0187387d8bcb2e6b77d2f3ea7efa
3
+ metadata.gz: acaa38ac9227b2bbeb35f775891aa433f592e386a6924e2279e2d7c00df88c58
4
+ data.tar.gz: 4a799ee0da412a49465356ee68034bf01ec98974bbe6be89a9daad1f4617d237
5
5
  SHA512:
6
- metadata.gz: 6dd1779363837f24176fb5e0e5c33403cbbfe02b7409f47d3a6d3450cde0d1caf1ed15bb873721c57e38e240ce836721420689bb65320a2a75bc4ab7422be5ce
7
- data.tar.gz: ac2d58d95617a3d4a71405f94de41766c0a14b350db59db5633c4aa9ced5da42347984c1e81e9be1beaf79aace0de1f53146b2a962b67c01060a549dca1a392c
6
+ metadata.gz: f41d9e48617dc6b932cd4d65fb05e676a6b44232bd5b03bcdc6e7d1e05839ae216b94835d5209f39573f0dbff3b09c228ef600dd392ce46f0324ea1a34243df0
7
+ data.tar.gz: 31803f0b63b9e2e6f3c574b58c7f35fcfe2894f40ece52d897c12a2ad2f4e18b72d2922c8a92a84a1c8a6479331b733c8320a6ea0524537310621c542507ed78
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 9.4.0-beta.1 - 2023-09-14
4
+ * Updated stable APIs to the latest version
5
+
6
+ ## 9.3.0 - 2023-09-14
7
+ * [#1272](https://github.com/stripe/stripe-ruby/pull/1272) Update generated code
8
+ * Add support for new resource `PaymentMethodConfiguration`
9
+ * Add support for `create`, `list`, `retrieve`, and `update` methods on resource `PaymentMethodConfiguration`
10
+ * [#1271](https://github.com/stripe/stripe-ruby/pull/1271) Update generated code
11
+ * Add support for `capture`, `create`, `expire`, `increment`, and `reverse` test helper methods on resource `Issuing.Authorization`
12
+ * Add support for `create_force_capture`, `create_unlinked_refund`, and `refund` test helper methods on resource `Issuing.Transaction`
13
+
3
14
  ## 9.3.0-beta.1 - 2023-09-07
4
15
  * [#1269](https://github.com/stripe/stripe-ruby/pull/1269) Update generated code for beta
5
16
  * Release specs are identical.
data/OPENAPI_VERSION CHANGED
@@ -1 +1 @@
1
- v515
1
+ v532
data/VERSION CHANGED
@@ -1 +1 @@
1
- 9.3.0-beta.1
1
+ 9.4.0-beta.1
@@ -32,6 +32,7 @@ module Stripe
32
32
  CashBalance::OBJECT_NAME => CashBalance,
33
33
  Charge::OBJECT_NAME => Charge,
34
34
  Checkout::Session::OBJECT_NAME => Checkout::Session,
35
+ ConfirmationToken::OBJECT_NAME => ConfirmationToken,
35
36
  CountrySpec::OBJECT_NAME => CountrySpec,
36
37
  Coupon::OBJECT_NAME => Coupon,
37
38
  CreditNote::OBJECT_NAME => CreditNote,
@@ -23,8 +23,7 @@ module Stripe
23
23
  nested_resource_class_methods :capability,
24
24
  operations: %i[retrieve update list],
25
25
  resource_plural: "capabilities"
26
- nested_resource_class_methods :person,
27
- operations: %i[create retrieve update delete list]
26
+ nested_resource_class_methods :person, operations: %i[create retrieve update delete list]
28
27
 
29
28
  def persons(params = {}, opts = {})
30
29
  request_stripe_object(
@@ -8,7 +8,6 @@ module Stripe
8
8
 
9
9
  OBJECT_NAME = "application_fee"
10
10
 
11
- nested_resource_class_methods :refund,
12
- operations: %i[create retrieve update list]
11
+ nested_resource_class_methods :refund, operations: %i[create retrieve update list]
13
12
  end
14
13
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  # Balance transactions represent funds moving through your Stripe account.
6
- # They're created for every type of transaction that comes into or flows out of your Stripe account balance.
6
+ # Stripe creates them for every type of transaction that enters or leaves your Stripe account balance.
7
7
  #
8
8
  # Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types)
9
9
  class BalanceTransaction < APIResource
@@ -0,0 +1,11 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ # ConfirmationTokens help transport client side data collected by Stripe JS over
6
+ # to your server for confirming a PaymentIntent or SetupIntent. If the confirmation
7
+ # is successful, values present on the ConfirmationToken are written onto the Intent.
8
+ class ConfirmationToken < APIResource
9
+ OBJECT_NAME = "confirmation_token"
10
+ end
11
+ end
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
- # This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer.
5
+ # This object represents a customer of your business. Use it to create recurring charges and track payments that belong to the same customer.
6
6
  #
7
7
  # Related guide: [Save a card during payment](https://stripe.com/docs/payments/save-during-payment)
8
8
  class Customer < APIResource
@@ -15,12 +15,9 @@ module Stripe
15
15
 
16
16
  OBJECT_NAME = "customer"
17
17
 
18
- nested_resource_class_methods :balance_transaction,
19
- operations: %i[create retrieve update list]
20
- nested_resource_class_methods :cash_balance_transaction,
21
- operations: %i[retrieve list]
22
- nested_resource_class_methods :tax_id,
23
- operations: %i[create retrieve delete list]
18
+ nested_resource_class_methods :balance_transaction, operations: %i[create retrieve update list]
19
+ nested_resource_class_methods :cash_balance_transaction, operations: %i[retrieve list]
20
+ nested_resource_class_methods :tax_id, operations: %i[create retrieve delete list]
24
21
 
25
22
  def create_funding_instructions(params = {}, opts = {})
26
23
  request_stripe_object(
@@ -85,12 +82,7 @@ module Stripe
85
82
  )
86
83
  end
87
84
 
88
- def self.retrieve_payment_method(
89
- customer,
90
- payment_method,
91
- params = {},
92
- opts = {}
93
- )
85
+ def self.retrieve_payment_method(customer, payment_method, params = {}, opts = {})
94
86
  request_stripe_object(
95
87
  method: :get,
96
88
  path: format("/v1/customers/%<customer>s/payment_methods/%<payment_method>s", { customer: CGI.escape(customer), payment_method: CGI.escape(payment_method) }),
@@ -3,10 +3,8 @@
3
3
 
4
4
  module Stripe
5
5
  # A dispute occurs when a customer questions your charge with their card issuer.
6
- # When this happens, you're given the opportunity to respond to the dispute with
7
- # evidence that shows that the charge is legitimate. You can find more
8
- # information about the dispute process in our [Disputes and
9
- # Fraud](https://stripe.com/docs/disputes) documentation.
6
+ # When this happens, you have the opportunity to respond to the dispute with
7
+ # evidence that shows that the charge is legitimate.
10
8
  #
11
9
  # Related guide: [Disputes and fraud](https://stripe.com/docs/disputes)
12
10
  class Dispute < APIResource
@@ -5,32 +5,33 @@ module Stripe
5
5
  # Events are our way of letting you know when something interesting happens in
6
6
  # your account. When an interesting event occurs, we create a new `Event`
7
7
  # object. For example, when a charge succeeds, we create a `charge.succeeded`
8
- # event; and when an invoice payment attempt fails, we create an
9
- # `invoice.payment_failed` event. Note that many API requests may cause multiple
10
- # events to be created. For example, if you create a new subscription for a
11
- # customer, you will receive both a `customer.subscription.created` event and a
8
+ # event, and when an invoice payment attempt fails, we create an
9
+ # `invoice.payment_failed` event. Certain API requests might create multiple
10
+ # events. For example, if you create a new subscription for a
11
+ # customer, you receive both a `customer.subscription.created` event and a
12
12
  # `charge.succeeded` event.
13
13
  #
14
- # Events occur when the state of another API resource changes. The state of that
15
- # resource at the time of the change is embedded in the event's data field. For
16
- # example, a `charge.succeeded` event will contain a charge, and an
17
- # `invoice.payment_failed` event will contain an invoice.
14
+ # Events occur when the state of another API resource changes. The event's data
15
+ # field embeds the resource's state at the time of the change. For
16
+ # example, a `charge.succeeded` event contains a charge, and an
17
+ # `invoice.payment_failed` event contains an invoice.
18
18
  #
19
19
  # As with other API resources, you can use endpoints to retrieve an
20
20
  # [individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)
21
21
  # from the API. We also have a separate
22
22
  # [webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the
23
- # `Event` objects directly to an endpoint on your server. Webhooks are managed
24
- # in your
25
- # [account settings](https://dashboard.stripe.com/account/webhooks),
26
- # and our [Using Webhooks](https://stripe.com/docs/webhooks) guide will help you get set up.
23
+ # `Event` objects directly to an endpoint on your server. You can manage
24
+ # webhooks in your
25
+ # [account settings](https://dashboard.stripe.com/account/webhooks). Learn how
26
+ # to [listen for events]
27
+ # (/docs/webhooks) so that your integration can automatically trigger reactions.
27
28
  #
28
- # When using [Connect](https://stripe.com/docs/connect), you can also receive notifications of
29
- # events that occur in connected accounts. For these events, there will be an
29
+ # When using [Connect](https://stripe.com/docs/connect), you can also receive event notifications
30
+ # that occur in connected accounts. For these events, there's an
30
31
  # additional `account` attribute in the received `Event` object.
31
32
  #
32
- # **NOTE:** Right now, access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event) is
33
- # guaranteed only for 30 days.
33
+ # We only guarantee access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event)
34
+ # for 30 days.
34
35
  class Event < APIResource
35
36
  extend Stripe::APIOperations::List
36
37
 
@@ -134,12 +134,7 @@ module Stripe
134
134
  end
135
135
 
136
136
  def self.upcoming(params = {}, opts = {})
137
- request_stripe_object(
138
- method: :get,
139
- path: "/v1/invoices/upcoming",
140
- params: params,
141
- opts: opts
142
- )
137
+ request_stripe_object(method: :get, path: "/v1/invoices/upcoming", params: params, opts: opts)
143
138
  end
144
139
 
145
140
  def self.void_invoice(invoice, params = {}, opts = {})
@@ -49,6 +49,95 @@ module Stripe
49
49
  opts: opts
50
50
  )
51
51
  end
52
+
53
+ def test_helpers
54
+ TestHelpers.new(self)
55
+ end
56
+
57
+ class TestHelpers < APIResourceTestHelpers
58
+ RESOURCE_CLASS = Authorization
59
+
60
+ def self.capture(authorization, params = {}, opts = {})
61
+ request_stripe_object(
62
+ method: :post,
63
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/capture", { authorization: CGI.escape(authorization) }),
64
+ params: params,
65
+ opts: opts
66
+ )
67
+ end
68
+
69
+ def self.create(params = {}, opts = {})
70
+ request_stripe_object(
71
+ method: :post,
72
+ path: "/v1/test_helpers/issuing/authorizations",
73
+ params: params,
74
+ opts: opts
75
+ )
76
+ end
77
+
78
+ def self.expire(authorization, params = {}, opts = {})
79
+ request_stripe_object(
80
+ method: :post,
81
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/expire", { authorization: CGI.escape(authorization) }),
82
+ params: params,
83
+ opts: opts
84
+ )
85
+ end
86
+
87
+ def self.increment(authorization, params = {}, opts = {})
88
+ request_stripe_object(
89
+ method: :post,
90
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape(authorization) }),
91
+ params: params,
92
+ opts: opts
93
+ )
94
+ end
95
+
96
+ def self.reverse(authorization, params = {}, opts = {})
97
+ request_stripe_object(
98
+ method: :post,
99
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/reverse", { authorization: CGI.escape(authorization) }),
100
+ params: params,
101
+ opts: opts
102
+ )
103
+ end
104
+
105
+ def capture(params = {}, opts = {})
106
+ @resource.request_stripe_object(
107
+ method: :post,
108
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/capture", { authorization: CGI.escape(@resource["id"]) }),
109
+ params: params,
110
+ opts: opts
111
+ )
112
+ end
113
+
114
+ def expire(params = {}, opts = {})
115
+ @resource.request_stripe_object(
116
+ method: :post,
117
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/expire", { authorization: CGI.escape(@resource["id"]) }),
118
+ params: params,
119
+ opts: opts
120
+ )
121
+ end
122
+
123
+ def increment(params = {}, opts = {})
124
+ @resource.request_stripe_object(
125
+ method: :post,
126
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape(@resource["id"]) }),
127
+ params: params,
128
+ opts: opts
129
+ )
130
+ end
131
+
132
+ def reverse(params = {}, opts = {})
133
+ @resource.request_stripe_object(
134
+ method: :post,
135
+ path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/reverse", { authorization: CGI.escape(@resource["id"]) }),
136
+ params: params,
137
+ opts: opts
138
+ )
139
+ end
140
+ end
52
141
  end
53
142
  end
54
143
  end
@@ -5,6 +5,7 @@ module Stripe
5
5
  module Issuing
6
6
  # A Card Design is a logical grouping of a Card Bundle, card logo, and carrier text that represents a product line.
7
7
  class CardDesign < APIResource
8
+ extend Stripe::APIOperations::Create
8
9
  extend Stripe::APIOperations::List
9
10
  include Stripe::APIOperations::Save
10
11
 
@@ -35,6 +36,15 @@ module Stripe
35
36
  )
36
37
  end
37
38
 
39
+ def self.reject_testmode(card_design, params = {}, opts = {})
40
+ request_stripe_object(
41
+ method: :post,
42
+ path: format("/v1/test_helpers/issuing/card_designs/%<card_design>s/status/reject", { card_design: CGI.escape(card_design) }),
43
+ params: params,
44
+ opts: opts
45
+ )
46
+ end
47
+
38
48
  def activate_testmode(params = {}, opts = {})
39
49
  @resource.request_stripe_object(
40
50
  method: :post,
@@ -52,6 +62,15 @@ module Stripe
52
62
  opts: opts
53
63
  )
54
64
  end
65
+
66
+ def reject_testmode(params = {}, opts = {})
67
+ @resource.request_stripe_object(
68
+ method: :post,
69
+ path: format("/v1/test_helpers/issuing/card_designs/%<card_design>s/status/reject", { card_design: CGI.escape(@resource["id"]) }),
70
+ params: params,
71
+ opts: opts
72
+ )
73
+ end
55
74
  end
56
75
  end
57
76
  end
@@ -13,6 +13,50 @@ module Stripe
13
13
  include Stripe::APIOperations::Save
14
14
 
15
15
  OBJECT_NAME = "issuing.transaction"
16
+
17
+ def test_helpers
18
+ TestHelpers.new(self)
19
+ end
20
+
21
+ class TestHelpers < APIResourceTestHelpers
22
+ RESOURCE_CLASS = Transaction
23
+
24
+ def self.create_force_capture(params = {}, opts = {})
25
+ request_stripe_object(
26
+ method: :post,
27
+ path: "/v1/test_helpers/issuing/transactions/create_force_capture",
28
+ params: params,
29
+ opts: opts
30
+ )
31
+ end
32
+
33
+ def self.create_unlinked_refund(params = {}, opts = {})
34
+ request_stripe_object(
35
+ method: :post,
36
+ path: "/v1/test_helpers/issuing/transactions/create_unlinked_refund",
37
+ params: params,
38
+ opts: opts
39
+ )
40
+ end
41
+
42
+ def self.refund(transaction, params = {}, opts = {})
43
+ request_stripe_object(
44
+ method: :post,
45
+ path: format("/v1/test_helpers/issuing/transactions/%<transaction>s/refund", { transaction: CGI.escape(transaction) }),
46
+ params: params,
47
+ opts: opts
48
+ )
49
+ end
50
+
51
+ def refund(params = {}, opts = {})
52
+ @resource.request_stripe_object(
53
+ method: :post,
54
+ path: format("/v1/test_helpers/issuing/transactions/%<transaction>s/refund", { transaction: CGI.escape(@resource["id"]) }),
55
+ params: params,
56
+ opts: opts
57
+ )
58
+ end
59
+ end
16
60
  end
17
61
  end
18
62
  end
@@ -13,8 +13,7 @@ module Stripe
13
13
  OBJECT_NAME = "quote"
14
14
 
15
15
  nested_resource_class_methods :preview_invoice, operations: %i[list]
16
- nested_resource_class_methods :preview_subscription_schedule,
17
- operations: %i[list]
16
+ nested_resource_class_methods :preview_subscription_schedule, operations: %i[list]
18
17
 
19
18
  def accept(params = {}, opts = {})
20
19
  request_stripe_object(
@@ -202,12 +201,7 @@ module Stripe
202
201
  )
203
202
  end
204
203
 
205
- def self.preview_invoice_lines(
206
- quote,
207
- preview_invoice,
208
- params = {},
209
- opts = {}
210
- )
204
+ def self.preview_invoice_lines(quote, preview_invoice, params = {}, opts = {})
211
205
  request_stripe_object(
212
206
  method: :get,
213
207
  path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(quote), preview_invoice: CGI.escape(preview_invoice) }),
@@ -19,8 +19,7 @@ module Stripe
19
19
 
20
20
  OBJECT_NAME = "source"
21
21
 
22
- nested_resource_class_methods :source_transaction,
23
- operations: %i[retrieve list]
22
+ nested_resource_class_methods :source_transaction, operations: %i[retrieve list]
24
23
 
25
24
  def verify(params = {}, opts = {})
26
25
  request_stripe_object(
@@ -20,7 +20,6 @@ module Stripe
20
20
 
21
21
  OBJECT_NAME = "transfer"
22
22
 
23
- nested_resource_class_methods :reversal,
24
- operations: %i[create retrieve update list]
23
+ nested_resource_class_methods :reversal, operations: %i[create retrieve update list]
25
24
  end
26
25
  end
@@ -55,11 +55,7 @@ module Stripe
55
55
  )
56
56
  end
57
57
 
58
- def self.return_outbound_transfer(
59
- outbound_transfer,
60
- params = {},
61
- opts = {}
62
- )
58
+ def self.return_outbound_transfer(outbound_transfer, params = {}, opts = {})
63
59
  request_stripe_object(
64
60
  method: :post,
65
61
  path: format("/v1/test_helpers/treasury/outbound_transfers/%<outbound_transfer>s/return", { outbound_transfer: CGI.escape(outbound_transfer) }),
@@ -21,6 +21,7 @@ require "stripe/resources/card"
21
21
  require "stripe/resources/cash_balance"
22
22
  require "stripe/resources/charge"
23
23
  require "stripe/resources/checkout/session"
24
+ require "stripe/resources/confirmation_token"
24
25
  require "stripe/resources/country_spec"
25
26
  require "stripe/resources/coupon"
26
27
  require "stripe/resources/credit_note"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "9.3.0-beta.1"
4
+ VERSION = "9.4.0-beta.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.3.0.pre.beta.1
4
+ version: 9.4.0.pre.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-07 00:00:00.000000000 Z
11
+ date: 2023-09-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Stripe is the easiest way to accept payments online. See https://stripe.com
14
14
  for details.
@@ -73,6 +73,7 @@ files:
73
73
  - lib/stripe/resources/cash_balance.rb
74
74
  - lib/stripe/resources/charge.rb
75
75
  - lib/stripe/resources/checkout/session.rb
76
+ - lib/stripe/resources/confirmation_token.rb
76
77
  - lib/stripe/resources/country_spec.rb
77
78
  - lib/stripe/resources/coupon.rb
78
79
  - lib/stripe/resources/credit_note.rb