mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-06 00:02:18 -04:00
Update generated code (new) (#1197)
* Update generated code for v275 * Update generated code for v276 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
This commit is contained in:
parent
980b7b011f
commit
57f61c09ce
@ -1 +1 @@
|
||||
v232
|
||||
v276
|
@ -89,6 +89,8 @@ module Stripe
|
||||
Subscription::OBJECT_NAME => Subscription,
|
||||
SubscriptionItem::OBJECT_NAME => SubscriptionItem,
|
||||
SubscriptionSchedule::OBJECT_NAME => SubscriptionSchedule,
|
||||
Tax::Calculation::OBJECT_NAME => Tax::Calculation,
|
||||
Tax::Transaction::OBJECT_NAME => Tax::Transaction,
|
||||
TaxCode::OBJECT_NAME => TaxCode,
|
||||
TaxId::OBJECT_NAME => TaxId,
|
||||
TaxRate::OBJECT_NAME => TaxRate,
|
||||
|
@ -76,6 +76,8 @@ require "stripe/resources/source_transaction"
|
||||
require "stripe/resources/subscription"
|
||||
require "stripe/resources/subscription_item"
|
||||
require "stripe/resources/subscription_schedule"
|
||||
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"
|
||||
|
31
lib/stripe/resources/tax/calculation.rb
Normal file
31
lib/stripe/resources/tax/calculation.rb
Normal file
@ -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
|
49
lib/stripe/resources/tax/transaction.rb
Normal file
49
lib/stripe/resources/tax/transaction.rb
Normal file
@ -0,0 +1,49 @@
|
||||
# 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 list_line_items(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :get,
|
||||
path: format("/v1/tax/transactions/%<transaction>s/line_items", { transaction: CGI.escape(self["id"]) }),
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
def self.create_from_calculation(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: "/v1/tax/transactions/create_from_calculation",
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
def self.create_reversal(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: "/v1/tax/transactions/create_reversal",
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
def self.list_line_items(transaction, params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :get,
|
||||
path: format("/v1/tax/transactions/%<transaction>s/line_items", { transaction: CGI.escape(transaction) }),
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user