Class: Stripe::TaxId
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::TaxId
- Extended by:
- APIOperations::List
- Includes:
- APIOperations::Delete
- Defined in:
- lib/stripe/resources/tax_id.rb
Overview
You can add one or multiple tax IDs to a [customer](stripe.com/docs/api/customers) or account. Customer and account tax IDs get displayed on related invoices and credit notes.
Related guides: [Customer tax identification numbers](stripe.com/docs/billing/taxes/tax-ids), [Account tax IDs](stripe.com/docs/invoicing/connect#account-tax-ids)
Constant Summary collapse
- OBJECT_NAME =
"tax_id"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary
Attributes inherited from APIResource
Class Method Summary collapse
Instance Method Summary collapse
Methods included from APIOperations::List
Methods included from APIOperations::Delete
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Class Method Details
.retrieve(_id, _opts = {}) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/stripe/resources/tax_id.rb', line 24 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 |
Instance Method Details
#resource_url ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/stripe/resources/tax_id.rb', line 15 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 |