Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Updates for beta branch #1158

Merged
merged 3 commits into from
Dec 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v215
v216
4 changes: 2 additions & 2 deletions lib/stripe/object_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions lib/stripe/resources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
31 changes: 31 additions & 0 deletions lib/stripe/resources/tax/calculation.rb
Original file line number Diff line number Diff line change
@@ -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/%<calculation>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/%<calculation>s/line_items", { calculation: CGI.escape(calculation) }),
params: params,
opts: opts
)
end
end
end
end
22 changes: 22 additions & 0 deletions lib/stripe/resources/tax/transaction.rb
Original file line number Diff line number Diff line change
@@ -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
29 changes: 0 additions & 29 deletions lib/stripe/resources/tax_calculation.rb

This file was deleted.

20 changes: 0 additions & 20 deletions lib/stripe/resources/tax_transaction.rb

This file was deleted.