Class: Stripe::TaxId
- Inherits:
 - 
      APIResource
      
        
- Object
 - StripeObject
 - APIResource
 - Stripe::TaxId
 
 
- Extended by:
 - APIOperations::Create, 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
Attributes inherited from StripeObject
Class Method Summary collapse
- 
  
    
      .create(params = {}, opts = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Creates a new account or customer tax_id object.
 - 
  
    
      .delete(id, params = {}, opts = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Deletes an existing account or customer tax_id object.
 - 
  
    
      .list(filters = {}, opts = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Returns a list of tax IDs.
 - .object_name ⇒ Object
 
Instance Method Summary collapse
- 
  
    
      #delete(params = {}, opts = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Deletes an existing account or customer tax_id object.
 
Methods included from APIOperations::Create
Methods included from APIOperations::List
Methods included from APIOperations::Delete
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, 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
.create(params = {}, opts = {}) ⇒ Object
Creates a new account or customer tax_id object.
      20 21 22  | 
    
      # File 'lib/stripe/resources/tax_id.rb', line 20 def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/tax_ids", params: params, opts: opts) end  | 
  
.delete(id, params = {}, opts = {}) ⇒ Object
Deletes an existing account or customer tax_id object.
      25 26 27 28 29 30 31 32  | 
    
      # File 'lib/stripe/resources/tax_id.rb', line 25 def self.delete(id, params = {}, opts = {}) request_stripe_object( method: :delete, path: format("/v1/tax_ids/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts ) end  | 
  
.list(filters = {}, opts = {}) ⇒ Object
Returns a list of tax IDs.
      45 46 47  | 
    
      # File 'lib/stripe/resources/tax_id.rb', line 45 def self.list(filters = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/tax_ids", params: filters, opts: opts) end  | 
  
.object_name ⇒ Object
      15 16 17  | 
    
      # File 'lib/stripe/resources/tax_id.rb', line 15 def self.object_name "tax_id" end  | 
  
Instance Method Details
#delete(params = {}, opts = {}) ⇒ Object
Deletes an existing account or customer tax_id object.
      35 36 37 38 39 40 41 42  | 
    
      # File 'lib/stripe/resources/tax_id.rb', line 35 def delete(params = {}, opts = {}) request_stripe_object( method: :delete, path: format("/v1/tax_ids/%<id>s", { id: CGI.escape(self["id"]) }), params: params, opts: opts ) end  |