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)
Defined Under Namespace
Classes: CreateParams, DeleteParams, ListParams, Owner, Verification
Constant Summary collapse
- OBJECT_NAME =
"tax_id"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#country ⇒ Object
readonly
Two-letter ISO code representing the country of the tax ID.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#customer ⇒ Object
readonly
ID of the customer.
-
#customer_account ⇒ Object
readonly
ID of the account.
-
#deleted ⇒ Object
readonly
Always true for a deleted object.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#owner ⇒ Object
readonly
The account or customer the tax ID belongs to.
-
#type ⇒ Object
readonly
Type of the tax ID, one of ‘ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`.
-
#value ⇒ Object
readonly
Value of the tax ID.
-
#verification ⇒ Object
readonly
Tax ID verification information.
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(params = {}, 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
Instance Attribute Details
#country ⇒ Object (readonly)
Two-letter ISO code representing the country of the tax ID.
117 118 119 |
# File 'lib/stripe/resources/tax_id.rb', line 117 def country @country end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
119 120 121 |
# File 'lib/stripe/resources/tax_id.rb', line 119 def created @created end |
#customer ⇒ Object (readonly)
ID of the customer.
121 122 123 |
# File 'lib/stripe/resources/tax_id.rb', line 121 def customer @customer end |
#customer_account ⇒ Object (readonly)
ID of the account.
123 124 125 |
# File 'lib/stripe/resources/tax_id.rb', line 123 def customer_account @customer_account end |
#deleted ⇒ Object (readonly)
Always true for a deleted object
139 140 141 |
# File 'lib/stripe/resources/tax_id.rb', line 139 def deleted @deleted end |
#id ⇒ Object (readonly)
Unique identifier for the object.
125 126 127 |
# File 'lib/stripe/resources/tax_id.rb', line 125 def id @id end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
127 128 129 |
# File 'lib/stripe/resources/tax_id.rb', line 127 def livemode @livemode end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
129 130 131 |
# File 'lib/stripe/resources/tax_id.rb', line 129 def object @object end |
#owner ⇒ Object (readonly)
The account or customer the tax ID belongs to.
131 132 133 |
# File 'lib/stripe/resources/tax_id.rb', line 131 def owner @owner end |
#type ⇒ Object (readonly)
Type of the tax ID, one of ‘ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown`
133 134 135 |
# File 'lib/stripe/resources/tax_id.rb', line 133 def type @type end |
#value ⇒ Object (readonly)
Value of the tax ID.
135 136 137 |
# File 'lib/stripe/resources/tax_id.rb', line 135 def value @value end |
#verification ⇒ Object (readonly)
Tax ID verification information.
137 138 139 |
# File 'lib/stripe/resources/tax_id.rb', line 137 def verification @verification end |
Class Method Details
.create(params = {}, opts = {}) ⇒ Object
Creates a new account or customer tax_id object.
142 143 144 |
# File 'lib/stripe/resources/tax_id.rb', line 142 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.
147 148 149 150 151 152 153 154 |
# File 'lib/stripe/resources/tax_id.rb', line 147 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(params = {}, opts = {}) ⇒ Object
Returns a list of tax IDs.
167 168 169 |
# File 'lib/stripe/resources/tax_id.rb', line 167 def self.list(params = {}, opts = {}) request_stripe_object(method: :get, path: "/v1/tax_ids", params: params, 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.
157 158 159 160 161 162 163 164 |
# File 'lib/stripe/resources/tax_id.rb', line 157 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 |