From 9b0de780dbabbf9661cb6166bcdc20454316523d Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Thu, 22 Dec 2022 14:26:00 -0600 Subject: [PATCH 1/3] Set version to 8.0.0 to simplify merge --- VERSION | 2 +- lib/stripe/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 1ab9b49dc..ae9a76b92 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.1.0-beta.2 +8.0.0 diff --git a/lib/stripe/version.rb b/lib/stripe/version.rb index 1cf8fc914..853117803 100644 --- a/lib/stripe/version.rb +++ b/lib/stripe/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Stripe - VERSION = "8.1.0-beta.2" + VERSION = "8.0.0" end From 88a174442b2ce388ee2d4aeadcc9f9293e81daac Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Thu, 22 Dec 2022 14:26:01 -0600 Subject: [PATCH 2/3] Reset version to 8.1.0-beta.2 --- VERSION | 2 +- lib/stripe/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index ae9a76b92..1ab9b49dc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.0.0 +8.1.0-beta.2 diff --git a/lib/stripe/version.rb b/lib/stripe/version.rb index 853117803..1cf8fc914 100644 --- a/lib/stripe/version.rb +++ b/lib/stripe/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Stripe - VERSION = "8.0.0" + VERSION = "8.1.0-beta.2" end From 768972e4cb38838516804f12bd1aa042d29b930b Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Thu, 22 Dec 2022 14:26:18 -0600 Subject: [PATCH 3/3] Codegen for openapi v216 --- OPENAPI_VERSION | 2 +- lib/stripe/object_types.rb | 4 ++-- lib/stripe/resources.rb | 4 ++-- lib/stripe/resources/tax/calculation.rb | 31 +++++++++++++++++++++++++ lib/stripe/resources/tax/transaction.rb | 22 ++++++++++++++++++ lib/stripe/resources/tax_calculation.rb | 29 ----------------------- lib/stripe/resources/tax_transaction.rb | 20 ---------------- 7 files changed, 58 insertions(+), 54 deletions(-) create mode 100644 lib/stripe/resources/tax/calculation.rb create mode 100644 lib/stripe/resources/tax/transaction.rb delete mode 100644 lib/stripe/resources/tax_calculation.rb delete mode 100644 lib/stripe/resources/tax_transaction.rb diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 10dc28aef..a75e729f5 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v215 \ No newline at end of file +v216 \ No newline at end of file diff --git a/lib/stripe/object_types.rb b/lib/stripe/object_types.rb index 14774183f..c5a30548e 100644 --- a/lib/stripe/object_types.rb +++ b/lib/stripe/object_types.rb @@ -97,11 +97,11 @@ def self.object_names_to_classes Subscription::OBJECT_NAME => Subscription, SubscriptionItem::OBJECT_NAME => SubscriptionItem, SubscriptionSchedule::OBJECT_NAME => SubscriptionSchedule, - TaxCalculation::OBJECT_NAME => TaxCalculation, + Tax::Calculation::OBJECT_NAME => Tax::Calculation, + Tax::Transaction::OBJECT_NAME => Tax::Transaction, TaxCode::OBJECT_NAME => TaxCode, TaxId::OBJECT_NAME => TaxId, TaxRate::OBJECT_NAME => TaxRate, - TaxTransaction::OBJECT_NAME => TaxTransaction, Terminal::Configuration::OBJECT_NAME => Terminal::Configuration, Terminal::ConnectionToken::OBJECT_NAME => Terminal::ConnectionToken, Terminal::Location::OBJECT_NAME => Terminal::Location, diff --git a/lib/stripe/resources.rb b/lib/stripe/resources.rb index 3cf4652e7..41c4880e1 100644 --- a/lib/stripe/resources.rb +++ b/lib/stripe/resources.rb @@ -84,11 +84,11 @@ require "stripe/resources/subscription" require "stripe/resources/subscription_item" require "stripe/resources/subscription_schedule" -require "stripe/resources/tax_calculation" +require "stripe/resources/tax/calculation" +require "stripe/resources/tax/transaction" require "stripe/resources/tax_code" require "stripe/resources/tax_id" require "stripe/resources/tax_rate" -require "stripe/resources/tax_transaction" require "stripe/resources/terminal/configuration" require "stripe/resources/terminal/connection_token" require "stripe/resources/terminal/location" diff --git a/lib/stripe/resources/tax/calculation.rb b/lib/stripe/resources/tax/calculation.rb new file mode 100644 index 000000000..19e00fe08 --- /dev/null +++ b/lib/stripe/resources/tax/calculation.rb @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Tax + # A Tax `Calculation` allows you to calculate the tax to collect from your customer. + class Calculation < APIResource + extend Stripe::APIOperations::Create + + OBJECT_NAME = "tax.calculation" + + def list_line_items(params = {}, opts = {}) + request_stripe_object( + method: :get, + path: format("/v1/tax/calculations/%s/line_items", { calculation: CGI.escape(self["id"]) }), + params: params, + opts: opts + ) + end + + def self.list_line_items(calculation, params = {}, opts = {}) + request_stripe_object( + method: :get, + path: format("/v1/tax/calculations/%s/line_items", { calculation: CGI.escape(calculation) }), + params: params, + opts: opts + ) + end + end + end +end diff --git a/lib/stripe/resources/tax/transaction.rb b/lib/stripe/resources/tax/transaction.rb new file mode 100644 index 000000000..feca8576f --- /dev/null +++ b/lib/stripe/resources/tax/transaction.rb @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Tax + # A Tax `Transaction` records the tax collected from or refunded to your customer. + class Transaction < APIResource + extend Stripe::APIOperations::Create + + OBJECT_NAME = "tax.transaction" + + def self.create_reversal(params = {}, opts = {}) + request_stripe_object( + method: :post, + path: "/v1/tax/transactions/create_reversal", + params: params, + opts: opts + ) + end + end + end +end diff --git a/lib/stripe/resources/tax_calculation.rb b/lib/stripe/resources/tax_calculation.rb deleted file mode 100644 index af3e47fa0..000000000 --- a/lib/stripe/resources/tax_calculation.rb +++ /dev/null @@ -1,29 +0,0 @@ -# File generated from our OpenAPI spec -# frozen_string_literal: true - -module Stripe - # A Tax `Calculation` allows you to calculate the tax to collect from your customer. - class TaxCalculation < APIResource - extend Stripe::APIOperations::Create - - OBJECT_NAME = "tax.calculation" - - def list_line_items(params = {}, opts = {}) - request_stripe_object( - method: :get, - path: format("/v1/tax/calculations/%s/line_items", { calculation: CGI.escape(self["id"]) }), - params: params, - opts: opts - ) - end - - def self.list_line_items(calculation, params = {}, opts = {}) - request_stripe_object( - method: :get, - path: format("/v1/tax/calculations/%s/line_items", { calculation: CGI.escape(calculation) }), - params: params, - opts: opts - ) - end - end -end diff --git a/lib/stripe/resources/tax_transaction.rb b/lib/stripe/resources/tax_transaction.rb deleted file mode 100644 index bacde2cd0..000000000 --- a/lib/stripe/resources/tax_transaction.rb +++ /dev/null @@ -1,20 +0,0 @@ -# File generated from our OpenAPI spec -# frozen_string_literal: true - -module Stripe - # A Tax `Transaction` records the tax collected from or refunded to your customer. - class TaxTransaction < APIResource - extend Stripe::APIOperations::Create - - OBJECT_NAME = "tax.transaction" - - def self.create_reversal(params = {}, opts = {}) - request_stripe_object( - method: :post, - path: "/v1/tax/transactions/create_reversal", - params: params, - opts: opts - ) - end - end -end