stripe-openapi[bot] 8a996da054
Update generated code (#1219)
* Update generated code for v328

* Update generated code for v330

* Update generated code for v344

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
2023-05-19 08:11:22 -07:00

32 lines
1.0 KiB
Ruby

# File generated from our OpenAPI spec
# frozen_string_literal: true
module Stripe
# You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers).
# A customer's tax IDs are displayed on invoices and credit notes issued for the customer.
#
# Related guide: [Customer tax identification numbers](https://stripe.com/docs/billing/taxes/tax-ids)
class TaxId < APIResource
include Stripe::APIOperations::Delete
extend Stripe::APIOperations::List
OBJECT_NAME = "tax_id"
def resource_url
if !respond_to?(:customer) || customer.nil?
raise NotImplementedError,
"Tax IDs cannot be accessed without a customer ID."
end
"#{Customer.resource_url}/#{CGI.escape(customer)}/tax_ids" \
"/#{CGI.escape(id)}"
end
def self.retrieve(_id, _opts = {})
raise NotImplementedError,
"Tax IDs cannot be retrieved without a customer ID. Retrieve a " \
"tax ID using `Customer.retrieve_tax_id('customer_id', " \
"'tax_id_id')`"
end
end
end