Class TaxId

All Implemented Interfaces:
HasId, StripeActiveObject, StripeObjectInterface

public class TaxId extends ApiResource implements HasId
You can add one or multiple tax IDs to a customer or account. Customer and account tax IDs get displayed on related invoices and credit notes.

Related guides: Customer tax identification numbers, Account tax IDs

  • Constructor Details

    • TaxId

      public TaxId()
  • Method Details

    • getCustomer

      public String getCustomer()
      Get ID of expandable customer object.
    • setCustomer

      public void setCustomer(String id)
    • getCustomerObject

      public Customer getCustomerObject()
      Get expanded customer.
    • setCustomerObject

      public void setCustomerObject(Customer expandableObject)
    • create

      public static TaxId create(Map<String,Object> params) throws StripeException
      Creates a new account or customer tax_id object.
      Throws:
      StripeException
    • create

      public static TaxId create(Map<String,Object> params, RequestOptions options) throws StripeException
      Creates a new account or customer tax_id object.
      Throws:
      StripeException
    • create

      public static TaxId create(TaxIdCreateParams params) throws StripeException
      Creates a new account or customer tax_id object.
      Throws:
      StripeException
    • create

      public static TaxId create(TaxIdCreateParams params, RequestOptions options) throws StripeException
      Creates a new account or customer tax_id object.
      Throws:
      StripeException
    • delete

      public TaxId delete() throws StripeException
      Deletes an existing account or customer tax_id object.
      Throws:
      StripeException
    • delete

      public TaxId delete(RequestOptions options) throws StripeException
      Deletes an existing account or customer tax_id object.
      Throws:
      StripeException
    • delete

      public TaxId delete(Map<String,Object> params) throws StripeException
      Deletes an existing account or customer tax_id object.
      Throws:
      StripeException
    • delete

      public TaxId delete(Map<String,Object> params, RequestOptions options) throws StripeException
      Deletes an existing account or customer tax_id object.
      Throws:
      StripeException
    • delete

      public static TaxId delete(String customer, String id) throws StripeException
      Deletes an existing tax_id object.
      Throws:
      StripeException
    • delete

      public static TaxId delete(String customer, String id, RequestOptions options) throws StripeException
      Deletes an existing tax_id object.
      Throws:
      StripeException
    • delete

      public static TaxId delete(String customer, String id, Map<String,Object> params) throws StripeException
      Deletes an existing tax_id object.
      Throws:
      StripeException
    • delete

      public static TaxId delete(String customer, String id, Map<String,Object> params, RequestOptions options) throws StripeException
      Deletes an existing tax_id object.
      Throws:
      StripeException
    • list

      public static TaxIdCollection list(Map<String,Object> params) throws StripeException
      Returns a list of tax IDs.
      Throws:
      StripeException
    • list

      public static TaxIdCollection list(Map<String,Object> params, RequestOptions options) throws StripeException
      Returns a list of tax IDs.
      Throws:
      StripeException
    • list

      public static TaxIdCollection list(TaxIdListParams params) throws StripeException
      Returns a list of tax IDs.
      Throws:
      StripeException
    • list

      public static TaxIdCollection list(TaxIdListParams params, RequestOptions options) throws StripeException
      Returns a list of tax IDs.
      Throws:
      StripeException
    • retrieve

      public static TaxId retrieve(String id) throws StripeException
      Retrieves an account or customer tax_id object.
      Throws:
      StripeException
    • retrieve

      public static TaxId retrieve(String id, RequestOptions options) throws StripeException
      Retrieves an account or customer tax_id object.
      Throws:
      StripeException
    • retrieve

      public static TaxId retrieve(String id, Map<String,Object> params, RequestOptions options) throws StripeException
      Retrieves an account or customer tax_id object.
      Throws:
      StripeException
    • retrieve

      public static TaxId retrieve(String id, TaxIdRetrieveParams params, RequestOptions options) throws StripeException
      Retrieves an account or customer tax_id object.
      Throws:
      StripeException
    • setResponseGetter

      public void setResponseGetter(StripeResponseGetter responseGetter)
      Description copied from interface: StripeActiveObject
      Method is used by the containing object or StripeResponseGetter implementations to set the StripeResponseGetter instance used to make further requests.
      Specified by:
      setResponseGetter in interface StripeActiveObject
      Overrides:
      setResponseGetter in class ApiResource
      Parameters:
      responseGetter - the StripeResponseGetter instance to use for making further requests.
    • getCountry

      public String getCountry()
      Two-letter ISO code representing the country of the tax ID.
    • getCreated

      public Long getCreated()
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • getDeleted

      public Boolean getDeleted()
      Always true for a deleted object.
    • getLivemode

      public Boolean getLivemode()
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • getObject

      public String getObject()
      String representing the object's type. Objects of the same type share the same value.

      Equal to tax_id.

    • getOwner

      public TaxId.Owner getOwner()
      The account or customer the tax ID belongs to.
    • getType

      public String getType()
      Type of the tax ID, one of ad_nrt, ae_trn, ar_cuit, au_abn, au_arn, bg_uic, bh_vat, bo_tin, br_cnpj, br_cpf, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, 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, hk_br, hr_oib, hu_tin, id_npwp, il_vat, in_gst, is_vat, jp_cn, jp_rn, jp_trn, ke_pin, kr_brn, kz_bin, li_uid, mx_rfc, my_frp, my_itn, my_sst, ng_tin, no_vat, no_voec, nz_gst, om_vat, pe_ruc, ph_tin, ro_tin, rs_pib, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, sv_nit, th_vat, tr_tin, tw_vat, ua_vat, us_ein, uy_ruc, ve_rif, vn_tin, or za_vat. Note that some legacy tax IDs have type unknown
    • getValue

      public String getValue()
      Value of the tax ID.
    • getVerification

      public TaxId.Verification getVerification()
      Tax ID verification information.
    • setCountry

      public void setCountry(String country)
      Two-letter ISO code representing the country of the tax ID.
    • setCreated

      public void setCreated(Long created)
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • setDeleted

      public void setDeleted(Boolean deleted)
      Always true for a deleted object.
    • setId

      public void setId(String id)
      Unique identifier for the object.
    • setLivemode

      public void setLivemode(Boolean livemode)
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • setObject

      public void setObject(String object)
      String representing the object's type. Objects of the same type share the same value.

      Equal to tax_id.

    • setOwner

      public void setOwner(TaxId.Owner owner)
      The account or customer the tax ID belongs to.
    • setType

      public void setType(String type)
      Type of the tax ID, one of ad_nrt, ae_trn, ar_cuit, au_abn, au_arn, bg_uic, bh_vat, bo_tin, br_cnpj, br_cpf, ca_bn, ca_gst_hst, ca_pst_bc, ca_pst_mb, ca_pst_sk, ca_qst, 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, hk_br, hr_oib, hu_tin, id_npwp, il_vat, in_gst, is_vat, jp_cn, jp_rn, jp_trn, ke_pin, kr_brn, kz_bin, li_uid, mx_rfc, my_frp, my_itn, my_sst, ng_tin, no_vat, no_voec, nz_gst, om_vat, pe_ruc, ph_tin, ro_tin, rs_pib, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, si_tin, sv_nit, th_vat, tr_tin, tw_vat, ua_vat, us_ein, uy_ruc, ve_rif, vn_tin, or za_vat. Note that some legacy tax IDs have type unknown
    • setValue

      public void setValue(String value)
      Value of the tax ID.
    • setVerification

      public void setVerification(TaxId.Verification verification)
      Tax ID verification information.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getId

      public String getId()
      Unique identifier for the object.
      Specified by:
      getId in interface HasId