stripe 8.6.0 → 8.7.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: dfcf23587dbf38e28cab0b74cbb9419e67356cec27138393a6112e41ebad55b5
4
- data.tar.gz: 7b8859429ac9fcadca1af8d6085f0cae63fb33dc95755c66bac128cf592efe38
3
+ metadata.gz: ff2d744f7713eb43a337ea7069114c02fa4a9ec886efc5e69332661ff9b90f7d
4
+ data.tar.gz: a81af3893eb05270691d307ed0caa132a2ce5fa6b50497840f7d35606dbb7b45
5
5
  SHA512:
6
- metadata.gz: 50336f3cc9ce1acf8bf863057aae31293f27f6e2ed45abb0b1be75ddb48082f963eaf3ba9fa0fb8226244fc82d7ed94daef9c9740ed1e724281c4ddecb3f6dda
7
- data.tar.gz: 5cd44c495b8c3eeba5d3db29f187c1d145684e3074324f38373b4ce87428c5ece7fe219250730c7c46846b54fe367c17409f37e7e7a08d8feb3677c38147aec9
6
+ metadata.gz: 951d8c44a5ed2d161946b139980de3290731d58fecd3ec3118604df28e88ca4a0d30c015fef53990a7cef665e3529b129cee34862f6c05e42865184c249966ef
7
+ data.tar.gz: 7aacbdc98ce6c65b9f345d1f28aed3bcc149d6e2422f8688e2de89dd6b874884a2426018bb391fdb262bac77bd910e4bd896fdfbe83a707ddafd29c82e0d66f6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 8.7.0 - 2023-08-10
4
+ * [#1256](https://github.com/stripe/stripe-ruby/pull/1256) Update generated code
5
+ Add resources `Tax::CalculationLineItem`, `Tax::TransactionLineItem`, and `Treasury::FinancialAccountFeatures`. These resources have no methods on them, but do represent the return type of methods elsewhere.
6
+
3
7
  ## 8.6.0 - 2023-07-13
4
8
  * [#1244](https://github.com/stripe/stripe-ruby/pull/1244) Update generated code
5
9
  * Add support for new resource `Tax.Settings`
data/OPENAPI_VERSION CHANGED
@@ -1 +1 @@
1
- v413
1
+ v457
data/VERSION CHANGED
@@ -1 +1 @@
1
- 8.6.0
1
+ 8.7.0
@@ -90,8 +90,10 @@ module Stripe
90
90
  SubscriptionItem::OBJECT_NAME => SubscriptionItem,
91
91
  SubscriptionSchedule::OBJECT_NAME => SubscriptionSchedule,
92
92
  Tax::Calculation::OBJECT_NAME => Tax::Calculation,
93
+ Tax::CalculationLineItem::OBJECT_NAME => Tax::CalculationLineItem,
93
94
  Tax::Settings::OBJECT_NAME => Tax::Settings,
94
95
  Tax::Transaction::OBJECT_NAME => Tax::Transaction,
96
+ Tax::TransactionLineItem::OBJECT_NAME => Tax::TransactionLineItem,
95
97
  TaxCode::OBJECT_NAME => TaxCode,
96
98
  TaxId::OBJECT_NAME => TaxId,
97
99
  TaxRate::OBJECT_NAME => TaxRate,
@@ -106,6 +108,7 @@ module Stripe
106
108
  Treasury::CreditReversal::OBJECT_NAME => Treasury::CreditReversal,
107
109
  Treasury::DebitReversal::OBJECT_NAME => Treasury::DebitReversal,
108
110
  Treasury::FinancialAccount::OBJECT_NAME => Treasury::FinancialAccount,
111
+ Treasury::FinancialAccountFeatures::OBJECT_NAME => Treasury::FinancialAccountFeatures,
109
112
  Treasury::InboundTransfer::OBJECT_NAME => Treasury::InboundTransfer,
110
113
  Treasury::OutboundPayment::OBJECT_NAME => Treasury::OutboundPayment,
111
114
  Treasury::OutboundTransfer::OBJECT_NAME => Treasury::OutboundTransfer,
@@ -2,6 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
+ # The credit note line item object
5
6
  class CreditNoteLineItem < StripeObject
6
7
  OBJECT_NAME = "credit_note_line_item"
7
8
  end
@@ -5,7 +5,7 @@ module Stripe
5
5
  # This is an object representing a person associated with a Stripe account.
6
6
  #
7
7
  # A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account.
8
- # See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps.
8
+ # See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform prefilling and account onboarding steps.
9
9
  #
10
10
  # Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information)
11
11
  class Person < APIResource
@@ -56,6 +56,18 @@ module Stripe
56
56
  )
57
57
  end
58
58
 
59
+ def pdf(params = {}, opts = {}, &read_body_chunk_block)
60
+ config = opts[:client]&.config || Stripe.config
61
+ opts = { api_base: config.uploads_base }.merge(opts)
62
+ request_stream(
63
+ method: :get,
64
+ path: format("/v1/quotes/%<quote>s/pdf", { quote: CGI.escape(self["id"]) }),
65
+ params: params,
66
+ opts: opts,
67
+ &read_body_chunk_block
68
+ )
69
+ end
70
+
59
71
  def self.accept(quote, params = {}, opts = {})
60
72
  request_stripe_object(
61
73
  method: :post,
@@ -101,46 +113,16 @@ module Stripe
101
113
  )
102
114
  end
103
115
 
104
- def pdf(params = {}, opts = {}, &read_body_chunk_block)
105
- unless block_given?
106
- raise ArgumentError, "A read_body_chunk_block block parameter is required when calling the pdf method."
107
- end
108
-
116
+ def self.pdf(quote, params = {}, opts = {}, &read_body_chunk_block)
109
117
  config = opts[:client]&.config || Stripe.config
110
-
111
- request_stream(
112
- method: :get,
113
- path: resource_url + "/pdf",
114
- params: params,
115
- opts: {
116
- api_base: config.uploads_base,
117
- }.merge(opts),
118
- &read_body_chunk_block
119
- )
120
- end
121
-
122
- def self.pdf(id, params = {}, opts = {}, &read_body_chunk_block)
123
- unless id.is_a?(String)
124
- raise ArgumentError,
125
- "id should be a string representing the ID of an API resource"
126
- end
127
-
128
- unless block_given?
129
- raise ArgumentError, "A read_body_chunk_block block parameter is required when calling the pdf method."
130
- end
131
-
132
- config = opts[:client]&.config || Stripe.config
133
-
134
- resp = execute_resource_request_stream(
118
+ opts = { api_base: config.uploads_base }.merge(opts)
119
+ execute_resource_request_stream(
135
120
  :get,
136
- "#{resource_url}/#{CGI.escape(id)}/pdf",
121
+ format("/v1/quotes/%<quote>s/pdf", { quote: CGI.escape(quote) }),
137
122
  params,
138
- {
139
- api_base: config.uploads_base,
140
- }.merge(opts),
123
+ opts,
141
124
  &read_body_chunk_block
142
125
  )
143
- resp
144
126
  end
145
127
  end
146
128
  end
@@ -2,9 +2,8 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
- # Shipping rates describe the price of shipping presented to your customers and can be
6
- # applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping)
7
- # and [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs.
5
+ # Shipping rates describe the price of shipping presented to your customers and
6
+ # applied to a purchase. For more information, see [Charge for shipping](https://stripe.com/docs/payments/during-payment/charge-shipping).
8
7
  class ShippingRate < APIResource
9
8
  extend Stripe::APIOperations::Create
10
9
  extend Stripe::APIOperations::List
@@ -0,0 +1,10 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Tax
6
+ class CalculationLineItem < APIResource
7
+ OBJECT_NAME = "tax.calculation_line_item"
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Tax
6
+ class TransactionLineItem < APIResource
7
+ OBJECT_NAME = "tax.transaction_line_item"
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Treasury
6
+ # Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`.
7
+ # Stripe or the platform can control Features via the requested field.
8
+ class FinancialAccountFeatures < APIResource
9
+ OBJECT_NAME = "treasury.financial_account_features"
10
+ end
11
+ end
12
+ end
@@ -77,8 +77,10 @@ require "stripe/resources/subscription"
77
77
  require "stripe/resources/subscription_item"
78
78
  require "stripe/resources/subscription_schedule"
79
79
  require "stripe/resources/tax/calculation"
80
+ require "stripe/resources/tax/calculation_line_item"
80
81
  require "stripe/resources/tax/settings"
81
82
  require "stripe/resources/tax/transaction"
83
+ require "stripe/resources/tax/transaction_line_item"
82
84
  require "stripe/resources/tax_code"
83
85
  require "stripe/resources/tax_id"
84
86
  require "stripe/resources/tax_rate"
@@ -93,6 +95,7 @@ require "stripe/resources/transfer"
93
95
  require "stripe/resources/treasury/credit_reversal"
94
96
  require "stripe/resources/treasury/debit_reversal"
95
97
  require "stripe/resources/treasury/financial_account"
98
+ require "stripe/resources/treasury/financial_account_features"
96
99
  require "stripe/resources/treasury/inbound_transfer"
97
100
  require "stripe/resources/treasury/outbound_payment"
98
101
  require "stripe/resources/treasury/outbound_transfer"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "8.6.0"
4
+ VERSION = "8.7.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: 8.6.0
4
+ version: 8.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-13 00:00:00.000000000 Z
11
+ date: 2023-08-11 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.
@@ -129,8 +129,10 @@ files:
129
129
  - lib/stripe/resources/subscription_item.rb
130
130
  - lib/stripe/resources/subscription_schedule.rb
131
131
  - lib/stripe/resources/tax/calculation.rb
132
+ - lib/stripe/resources/tax/calculation_line_item.rb
132
133
  - lib/stripe/resources/tax/settings.rb
133
134
  - lib/stripe/resources/tax/transaction.rb
135
+ - lib/stripe/resources/tax/transaction_line_item.rb
134
136
  - lib/stripe/resources/tax_code.rb
135
137
  - lib/stripe/resources/tax_id.rb
136
138
  - lib/stripe/resources/tax_rate.rb
@@ -145,6 +147,7 @@ files:
145
147
  - lib/stripe/resources/treasury/credit_reversal.rb
146
148
  - lib/stripe/resources/treasury/debit_reversal.rb
147
149
  - lib/stripe/resources/treasury/financial_account.rb
150
+ - lib/stripe/resources/treasury/financial_account_features.rb
148
151
  - lib/stripe/resources/treasury/inbound_transfer.rb
149
152
  - lib/stripe/resources/treasury/outbound_payment.rb
150
153
  - lib/stripe/resources/treasury/outbound_transfer.rb