stripe 12.5.0 → 12.6.0

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: '0769dc1b2a67c8d52fd3a68fcf23d81ebbe66f172d5e32967419935bc2d8069b'
4
- data.tar.gz: 812292719086f586103b3ac2a48a7d1203e3dd67916cedf77c136e834d45252a
3
+ metadata.gz: cec3b48108a6e34b1ebda0be0cfb3ed6eb9aa124d71577b99fdb4b6b2407e0ad
4
+ data.tar.gz: 11d1823bf601fd83aa44cd8262af329eb0ce1a52885c982f6a58466837a1d89a
5
5
  SHA512:
6
- metadata.gz: b5f9326aa0c29bf3ef6cee7c36ca82f3f70e33b60d0813d35707bc27c533b3e6af1de89a8dc7864b6b130a419bc05be97258754a7099ee95681303679df36885
7
- data.tar.gz: 10b2f9759e1d3ac6b5e1e5dec555b6b819f2f82f466d504e9b44c3772e09dbe2bdb2986a63051f7e7850ade6eace7caeacfb8042c5cd6ca67f510c1413284041
6
+ metadata.gz: 5b3931f9c3637f350e0590ad6fce034cb8449e20e5c37da258971b9e6577ea9be65cab45196798b6ae88ac04d4cf1ad99c85caa18c315c1be17ea3808133c57c
7
+ data.tar.gz: 94d11382678b989b6cd8dc9e81219e9a07338bc83ae704b8bcf7c1a410e7fa6e13d0aa4e22eb4256975218b20ed469ce1f28de7b1b910aa44f078b37240b9172
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
1
  # Changelog
2
+ ## 12.6.0 - 2024-09-12
3
+ * [#1442](https://github.com/stripe/stripe-ruby/pull/1442) Update generated code
4
+ * Add support for new resource `InvoiceRenderingTemplate`
5
+ * Add support for `archive`, `list`, `retrieve`, and `unarchive` methods on resource `InvoiceRenderingTemplate`
6
+ * [#1443](https://github.com/stripe/stripe-ruby/pull/1443) Removed v1/files override
7
+
2
8
  ## 12.5.0 - 2024-08-08
3
9
  * [#1440](https://github.com/stripe/stripe-ruby/pull/1440) Update generated code
4
10
  * Add support for new resources `Billing.AlertTriggered` and `Billing.Alert`
data/OPENAPI_VERSION CHANGED
@@ -1 +1 @@
1
- v1187
1
+ v1255
data/VERSION CHANGED
@@ -1 +1 @@
1
- 12.5.0
1
+ 12.6.0
@@ -68,6 +68,7 @@ module Stripe
68
68
  Invoice.object_name => Invoice,
69
69
  InvoiceItem.object_name => InvoiceItem,
70
70
  InvoiceLineItem.object_name => InvoiceLineItem,
71
+ InvoiceRenderingTemplate.object_name => InvoiceRenderingTemplate,
71
72
  Issuing::Authorization.object_name => Issuing::Authorization,
72
73
  Issuing::Card.object_name => Issuing::Card,
73
74
  Issuing::Cardholder.object_name => Issuing::Cardholder,
@@ -48,7 +48,7 @@ module Stripe
48
48
  #
49
49
  # Test-mode accounts can be deleted at any time.
50
50
  #
51
- # Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero.
51
+ # Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero.
52
52
  #
53
53
  # If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
54
54
  def self.delete(id, params = {}, opts = {})
@@ -64,7 +64,7 @@ module Stripe
64
64
  #
65
65
  # Test-mode accounts can be deleted at any time.
66
66
  #
67
- # Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero.
67
+ # Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero.
68
68
  #
69
69
  # If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
70
70
  def delete(params = {}, opts = {})
@@ -4,6 +4,10 @@
4
4
  module Stripe
5
5
  # A Customer Session allows you to grant Stripe's frontend SDKs (like Stripe.js) client-side access
6
6
  # control over a Customer.
7
+ #
8
+ # Related guides: [Customer Session with the Payment Element](https://stripe.com/payments/accept-a-payment-deferred?platform=web&type=payment#save-payment-methods),
9
+ # [Customer Session with the Pricing Table](https://stripe.com/payments/checkout/pricing-table#customer-session),
10
+ # [Customer Session with the Buy Button](https://stripe.com/payment-links/buy-button#pass-an-existing-customer).
7
11
  class CustomerSession < APIResource
8
12
  extend Stripe::APIOperations::Create
9
13
 
@@ -18,6 +18,23 @@ module Stripe
18
18
  "file"
19
19
  end
20
20
 
21
+ # To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.
22
+ #
23
+ # All of Stripe's officially supported Client libraries support sending multipart/form-data.
24
+ def self.create(params = {}, opts = {})
25
+ config = opts[:client]&.config || Stripe.config
26
+ upload_base = config.uploads_base
27
+ opts = { api_base: upload_base }.merge(Util.normalize_opts(opts))
28
+
29
+ if params[:file] && !params[:file].is_a?(String) && !params[:file].respond_to?(:read)
30
+ raise ArgumentError, "file must respond to `#read`"
31
+ end
32
+
33
+ opts = { content_type: MultipartEncoder::MULTIPART_FORM_DATA }.merge(Util.normalize_opts(opts))
34
+
35
+ request_stripe_object(method: :post, path: "/v1/files", params: params, opts: opts)
36
+ end
37
+
21
38
  # 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.
22
39
  def self.list(filters = {}, opts = {})
23
40
  request_stripe_object(method: :get, path: "/v1/files", params: filters, opts: opts)
@@ -35,18 +52,5 @@ module Stripe
35
52
  def self.resource_url
36
53
  "/v1/files"
37
54
  end
38
-
39
- def self.create(params = {}, opts = {})
40
- if params[:file] && !params[:file].is_a?(String) && !params[:file].respond_to?(:read)
41
- raise ArgumentError, "file must respond to `#read`"
42
- end
43
-
44
- config = opts[:client]&.config || Stripe.config
45
- opts = {
46
- api_base: config.uploads_base,
47
- content_type: MultipartEncoder::MULTIPART_FORM_DATA,
48
- }.merge(Util.normalize_opts(opts))
49
- super
50
- end
51
55
  end
52
56
  end
@@ -2,6 +2,9 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # Invoice Line Items represent the individual lines within an [invoice](https://stripe.com/docs/api/invoices) and only exist within the context of an invoice.
6
+ #
7
+ # Each line item is backed by either an [invoice item](https://stripe.com/docs/api/invoiceitems) or a [subscription item](https://stripe.com/docs/api/subscription_items).
5
8
  class InvoiceLineItem < StripeObject
6
9
  include Stripe::APIOperations::Save
7
10
 
@@ -0,0 +1,63 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class InvoiceRenderingTemplate < APIResource
6
+ extend Stripe::APIOperations::List
7
+
8
+ OBJECT_NAME = "invoice_rendering_template"
9
+ def self.object_name
10
+ "invoice_rendering_template"
11
+ end
12
+
13
+ # Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it.
14
+ def archive(params = {}, opts = {})
15
+ request_stripe_object(
16
+ method: :post,
17
+ path: format("/v1/invoice_rendering_templates/%<template>s/archive", { template: CGI.escape(self["id"]) }),
18
+ params: params,
19
+ opts: opts
20
+ )
21
+ end
22
+
23
+ # Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it.
24
+ def self.archive(template, params = {}, opts = {})
25
+ request_stripe_object(
26
+ method: :post,
27
+ path: format("/v1/invoice_rendering_templates/%<template>s/archive", { template: CGI.escape(template) }),
28
+ params: params,
29
+ opts: opts
30
+ )
31
+ end
32
+
33
+ # List all templates, ordered by creation date, with the most recently created template appearing first.
34
+ def self.list(filters = {}, opts = {})
35
+ request_stripe_object(
36
+ method: :get,
37
+ path: "/v1/invoice_rendering_templates",
38
+ params: filters,
39
+ opts: opts
40
+ )
41
+ end
42
+
43
+ # Unarchive an invoice rendering template so it can be used on new Stripe objects again.
44
+ def unarchive(params = {}, opts = {})
45
+ request_stripe_object(
46
+ method: :post,
47
+ path: format("/v1/invoice_rendering_templates/%<template>s/unarchive", { template: CGI.escape(self["id"]) }),
48
+ params: params,
49
+ opts: opts
50
+ )
51
+ end
52
+
53
+ # Unarchive an invoice rendering template so it can be used on new Stripe objects again.
54
+ def self.unarchive(template, params = {}, opts = {})
55
+ request_stripe_object(
56
+ method: :post,
57
+ path: format("/v1/invoice_rendering_templates/%<template>s/unarchive", { template: CGI.escape(template) }),
58
+ params: params,
59
+ opts: opts
60
+ )
61
+ end
62
+ end
63
+ end
@@ -122,6 +122,9 @@ module Stripe
122
122
  # after those actions are completed. Your server needs to then
123
123
  # explicitly re-confirm the PaymentIntent to initiate the next payment
124
124
  # attempt.
125
+ # There is a variable upper limit on how many times a PaymentIntent can be confirmed.
126
+ # After this limit is reached, any further calls to this endpoint will
127
+ # transition the PaymentIntent to the canceled state.
125
128
  def confirm(params = {}, opts = {})
126
129
  request_stripe_object(
127
130
  method: :post,
@@ -153,6 +156,9 @@ module Stripe
153
156
  # after those actions are completed. Your server needs to then
154
157
  # explicitly re-confirm the PaymentIntent to initiate the next payment
155
158
  # attempt.
159
+ # There is a variable upper limit on how many times a PaymentIntent can be confirmed.
160
+ # After this limit is reached, any further calls to this endpoint will
161
+ # transition the PaymentIntent to the canceled state.
156
162
  def self.confirm(intent, params = {}, opts = {})
157
163
  request_stripe_object(
158
164
  method: :post,
@@ -124,7 +124,7 @@ module Stripe
124
124
  )
125
125
  end
126
126
 
127
- # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf)
127
+ # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
128
128
  def pdf(params = {}, opts = {}, &read_body_chunk_block)
129
129
  config = opts[:client]&.config || Stripe.config
130
130
  opts = { api_base: config.uploads_base }.merge(opts)
@@ -137,7 +137,7 @@ module Stripe
137
137
  )
138
138
  end
139
139
 
140
- # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf)
140
+ # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
141
141
  def self.pdf(quote, params = {}, opts = {}, &read_body_chunk_block)
142
142
  config = opts[:client]&.config || Stripe.config
143
143
  opts = { api_base: config.uploads_base }.merge(opts)
@@ -3,7 +3,9 @@
3
3
 
4
4
  module Stripe
5
5
  module Treasury
6
- # Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
6
+ # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit.
7
+ #
8
+ # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers)
7
9
  class InboundTransfer < APIResource
8
10
  extend Stripe::APIOperations::Create
9
11
  extend Stripe::APIOperations::List
@@ -3,9 +3,11 @@
3
3
 
4
4
  module Stripe
5
5
  module Treasury
6
- # Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
6
+ # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers).
7
7
  #
8
8
  # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects.
9
+ #
10
+ # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments)
9
11
  class OutboundPayment < APIResource
10
12
  extend Stripe::APIOperations::Create
11
13
  extend Stripe::APIOperations::List
@@ -3,9 +3,11 @@
3
3
 
4
4
  module Stripe
5
5
  module Treasury
6
- # Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
6
+ # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account.
7
7
  #
8
8
  # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects.
9
+ #
10
+ # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers)
9
11
  class OutboundTransfer < APIResource
10
12
  extend Stripe::APIOperations::Create
11
13
  extend Stripe::APIOperations::List
@@ -56,6 +56,7 @@ require "stripe/resources/identity/verification_session"
56
56
  require "stripe/resources/invoice"
57
57
  require "stripe/resources/invoice_item"
58
58
  require "stripe/resources/invoice_line_item"
59
+ require "stripe/resources/invoice_rendering_template"
59
60
  require "stripe/resources/issuing/authorization"
60
61
  require "stripe/resources/issuing/card"
61
62
  require "stripe/resources/issuing/cardholder"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "12.5.0"
4
+ VERSION = "12.6.0"
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: 12.5.0
4
+ version: 12.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-08 00:00:00.000000000 Z
11
+ date: 2024-09-12 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.
@@ -108,6 +108,7 @@ files:
108
108
  - lib/stripe/resources/invoice.rb
109
109
  - lib/stripe/resources/invoice_item.rb
110
110
  - lib/stripe/resources/invoice_line_item.rb
111
+ - lib/stripe/resources/invoice_rendering_template.rb
111
112
  - lib/stripe/resources/issuing/authorization.rb
112
113
  - lib/stripe/resources/issuing/card.rb
113
114
  - lib/stripe/resources/issuing/cardholder.rb