Class: Orb::Models::Customer
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::Customer
- Defined in:
- lib/orb/models/customer.rb,
sig/orb/models/customer.rbs
Overview
Defined Under Namespace
Modules: PaymentProvider Classes: AccountingSyncConfiguration, DefaultPaymentMethod, Hierarchy, PaymentConfiguration, ReportingConfiguration
Instance Attribute Summary collapse
- #accounting_sync_configuration ⇒ Orb::Models::Customer::AccountingSyncConfiguration?
- #additional_emails ⇒ Array<String>
- #auto_collection ⇒ Boolean
-
#auto_issuance ⇒ Boolean?
Whether invoices for this customer should be automatically issued.
-
#automatic_tax_enabled ⇒ Boolean?
Whether automatic tax calculation is enabled for this customer.
-
#balance ⇒ String
The customer's current balance in their currency.
- #billing_address ⇒ Orb::Models::Address?
- #created_at ⇒ Time
- #currency ⇒ String?
-
#default_payment_method ⇒ Orb::Models::Customer::DefaultPaymentMethod?
A payment method represents a customer's stored payment instrument held with an external payment provider (such as Adyen or Stripe).
-
#email ⇒ String
A valid customer email, to be used for notifications.
- #email_delivery ⇒ Boolean
- #exempt_from_automated_tax ⇒ Boolean?
-
#external_customer_id ⇒ String?
An optional user-defined ID for this customer resource, used throughout the system as an alias for this Customer.
-
#hierarchy ⇒ Orb::Models::Customer::Hierarchy
The hierarchical relationships for this customer.
- #id ⇒ String
-
#metadata ⇒ Hash{Symbol=>String}
User specified key-value pairs for the resource.
-
#name ⇒ String
The full name of the customer.
-
#payment_configuration ⇒ Orb::Models::Customer::PaymentConfiguration?
Payment configuration for the customer, applicable when using Orb Invoicing with a supported payment provider such as Stripe.
-
#payment_provider ⇒ Symbol, ...
This is used for creating charges or invoices in an external system via Orb.
-
#payment_provider_id ⇒ String?
The ID of this customer in an external payments solution, such as Stripe.
-
#portal_url ⇒ String?
Deprecated.
- #reporting_configuration ⇒ Orb::Models::Customer::ReportingConfiguration?
- #shipping_address ⇒ Orb::Models::Address?
-
#tax_id ⇒ Orb::Models::CustomerTaxID?
Tax IDs are commonly required to be displayed on customer invoices, which are added to the headers of invoices.
-
#timezone ⇒ String
A timezone identifier from the IANA timezone database, such as "America/Los_Angeles".
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(children:, parent:) ⇒ Object
constructor
The hierarchical relationships for this customer.
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(children:, parent:) ⇒ Object
The hierarchical relationships for this customer.
|
|
# File 'lib/orb/models/customer.rb', line 324
|
Instance Attribute Details
#accounting_sync_configuration ⇒ Orb::Models::Customer::AccountingSyncConfiguration?
293 |
# File 'lib/orb/models/customer.rb', line 293 optional :accounting_sync_configuration, -> { Orb::Customer::AccountingSyncConfiguration }, nil?: true |
#additional_emails ⇒ Array<String>
15 |
# File 'lib/orb/models/customer.rb', line 15 required :additional_emails, Orb::Internal::Type::ArrayOf[String] |
#auto_collection ⇒ Boolean
20 |
# File 'lib/orb/models/customer.rb', line 20 required :auto_collection, Orb::Internal::Type::Boolean |
#auto_issuance ⇒ Boolean?
Whether invoices for this customer should be automatically issued. If true, invoices will be automatically issued. If false, invoices will require manual approval. If null, inherits the account-level setting.
28 |
# File 'lib/orb/models/customer.rb', line 28 required :auto_issuance, Orb::Internal::Type::Boolean, nil?: true |
#automatic_tax_enabled ⇒ Boolean?
Whether automatic tax calculation is enabled for this customer. This field is nullable for backwards compatibility but will always return a boolean value.
300 |
# File 'lib/orb/models/customer.rb', line 300 optional :automatic_tax_enabled, Orb::Internal::Type::Boolean, nil?: true |
#balance ⇒ String
The customer's current balance in their currency.
34 |
# File 'lib/orb/models/customer.rb', line 34 required :balance, String |
#billing_address ⇒ Orb::Models::Address?
39 |
# File 'lib/orb/models/customer.rb', line 39 required :billing_address, -> { Orb::Address }, nil?: true |
#created_at ⇒ Time
44 |
# File 'lib/orb/models/customer.rb', line 44 required :created_at, Time |
#currency ⇒ String?
49 |
# File 'lib/orb/models/customer.rb', line 49 required :currency, String, nil?: true |
#default_payment_method ⇒ Orb::Models::Customer::DefaultPaymentMethod?
A payment method represents a customer's stored payment instrument held with an external payment provider (such as Adyen or Stripe).
The serialization is intentionally minimal for now; provider-pulled details (e.g. card display metadata) will be added over time.
310 |
# File 'lib/orb/models/customer.rb', line 310 optional :default_payment_method, -> { Orb::Customer::DefaultPaymentMethod }, nil?: true |
#email ⇒ String
A valid customer email, to be used for notifications. When Orb triggers payment through a payment gateway, this email will be used for any automatically issued receipts.
57 |
# File 'lib/orb/models/customer.rb', line 57 required :email, String |
#email_delivery ⇒ Boolean
62 |
# File 'lib/orb/models/customer.rb', line 62 required :email_delivery, Orb::Internal::Type::Boolean |
#exempt_from_automated_tax ⇒ Boolean?
67 |
# File 'lib/orb/models/customer.rb', line 67 required :exempt_from_automated_tax, Orb::Internal::Type::Boolean, nil?: true |
#external_customer_id ⇒ String?
An optional user-defined ID for this customer resource, used throughout the system as an alias for this Customer. Use this field to identify a customer by an existing identifier in your system.
75 |
# File 'lib/orb/models/customer.rb', line 75 required :external_customer_id, String, nil?: true |
#hierarchy ⇒ Orb::Models::Customer::Hierarchy
The hierarchical relationships for this customer.
81 |
# File 'lib/orb/models/customer.rb', line 81 required :hierarchy, -> { Orb::Customer::Hierarchy } |
#id ⇒ String
10 |
# File 'lib/orb/models/customer.rb', line 10 required :id, String |
#metadata ⇒ Hash{Symbol=>String}
User specified key-value pairs for the resource. If not present, this defaults
to an empty dictionary. Individual keys can be removed by setting the value to
null, and the entire metadata mapping can be cleared by setting metadata to
null.
90 |
# File 'lib/orb/models/customer.rb', line 90 required :metadata, Orb::Internal::Type::HashOf[String] |
#name ⇒ String
The full name of the customer
96 |
# File 'lib/orb/models/customer.rb', line 96 required :name, String |
#payment_configuration ⇒ Orb::Models::Customer::PaymentConfiguration?
Payment configuration for the customer, applicable when using Orb Invoicing with a supported payment provider such as Stripe.
317 |
# File 'lib/orb/models/customer.rb', line 317 optional :payment_configuration, -> { Orb::Customer::PaymentConfiguration }, nil?: true |
#payment_provider ⇒ Symbol, ...
This is used for creating charges or invoices in an external system via Orb. When not in test mode, the connection must first be configured in the Orb webapp.
104 |
# File 'lib/orb/models/customer.rb', line 104 required :payment_provider, enum: -> { Orb::Customer::PaymentProvider }, nil?: true |
#payment_provider_id ⇒ String?
The ID of this customer in an external payments solution, such as Stripe. This is used for creating charges or invoices in the external system via Orb.
111 |
# File 'lib/orb/models/customer.rb', line 111 required :payment_provider_id, String, nil?: true |
#portal_url ⇒ String?
Deprecated. Returns the URL of the most recent non-expired portal link, or null. When the account has opted into customer portal sessions, this field always returns null. Use POST /v1/customers/#id/portal_sessions to mint short-lived portal session URLs.
120 |
# File 'lib/orb/models/customer.rb', line 120 required :portal_url, String, nil?: true |
#reporting_configuration ⇒ Orb::Models::Customer::ReportingConfiguration?
322 |
# File 'lib/orb/models/customer.rb', line 322 optional :reporting_configuration, -> { Orb::Customer::ReportingConfiguration }, nil?: true |
#shipping_address ⇒ Orb::Models::Address?
125 |
# File 'lib/orb/models/customer.rb', line 125 required :shipping_address, -> { Orb::Address }, nil?: true |
#tax_id ⇒ Orb::Models::CustomerTaxID?
Tax IDs are commonly required to be displayed on customer invoices, which are added to the headers of invoices.
Supported Tax ID Countries and Types
| Country | Type | Description |
|---|---|---|
| Albania | al_tin |
Albania Tax Identification Number |
| Andorra | ad_nrt |
Andorran NRT Number |
| Angola | ao_tin |
Angola Tax Identification Number |
| Argentina | ar_cuit |
Argentinian Tax ID Number |
| Armenia | am_tin |
Armenia Tax Identification Number |
| Aruba | aw_tin |
Aruba Tax Identification Number |
| Australia | au_abn |
Australian Business Number (AU ABN) |
| Australia | au_arn |
Australian Taxation Office Reference Number |
| Austria | eu_vat |
European VAT Number |
| Azerbaijan | az_tin |
Azerbaijan Tax Identification Number |
| Bahamas | bs_tin |
Bahamas Tax Identification Number |
| Bahrain | bh_vat |
Bahraini VAT Number |
| Bangladesh | bd_bin |
Bangladesh Business Identification Number |
| Barbados | bb_tin |
Barbados Tax Identification Number |
| Belarus | by_tin |
Belarus TIN Number |
| Belgium | eu_vat |
European VAT Number |
| Benin | bj_ifu |
Benin Tax Identification Number (Identifiant Fiscal Unique) |
| Bolivia | bo_tin |
Bolivian Tax ID |
| Bosnia and Herzegovina | ba_tin |
Bosnia and Herzegovina Tax Identification Number |
| Brazil | br_cnpj |
Brazilian CNPJ Number |
| Brazil | br_cpf |
Brazilian CPF Number |
| Bulgaria | bg_uic |
Bulgaria Unified Identification Code |
| Bulgaria | eu_vat |
European VAT Number |
| Burkina Faso | bf_ifu |
Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique) |
| Cambodia | kh_tin |
Cambodia Tax Identification Number |
| Cameroon | cm_niu |
Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique) |
| Canada | ca_bn |
Canadian BN |
| Canada | ca_gst_hst |
Canadian GST/HST Number |
| Canada | ca_pst_bc |
Canadian PST Number (British Columbia) |
| Canada | ca_pst_mb |
Canadian PST Number (Manitoba) |
| Canada | ca_pst_sk |
Canadian PST Number (Saskatchewan) |
| Canada | ca_qst |
Canadian QST Number (Québec) |
| Cape Verde | cv_nif |
Cape Verde Tax Identification Number (Número de Identificação Fiscal) |
| Chile | cl_tin |
Chilean TIN |
| China | cn_tin |
Chinese Tax ID |
| Colombia | co_nit |
Colombian NIT Number |
| Congo-Kinshasa | cd_nif |
Congo (DR) Tax Identification Number (Número de Identificação Fiscal) |
| Costa Rica | cr_tin |
Costa Rican Tax ID |
| Croatia | eu_vat |
European VAT Number |
| Croatia | hr_oib |
Croatian Personal Identification Number (OIB) |
| Cyprus | eu_vat |
European VAT Number |
| Czech Republic | eu_vat |
European VAT Number |
| Denmark | eu_vat |
European VAT Number |
| Dominican Republic | do_rcn |
Dominican RCN Number |
| Ecuador | ec_ruc |
Ecuadorian RUC Number |
| Egypt | eg_tin |
Egyptian Tax Identification Number |
| El Salvador | sv_nit |
El Salvadorian NIT Number |
| Estonia | eu_vat |
European VAT Number |
| Ethiopia | et_tin |
Ethiopia Tax Identification Number |
| European Union | eu_oss_vat |
European One Stop Shop VAT Number for non-Union scheme |
| Faroe Islands | fo_vat |
Faroe Islands VAT Number |
| Finland | eu_vat |
European VAT Number |
| France | eu_vat |
European VAT Number |
| Georgia | ge_vat |
Georgian VAT |
| Germany | de_stn |
German Tax Number (Steuernummer) |
| Germany | eu_vat |
European VAT Number |
| Gibraltar | gi_tin |
Gibraltar Tax Identification Number |
| Greece | eu_vat |
European VAT Number |
| Guinea | gn_nif |
Guinea Tax Identification Number (Número de Identificação Fiscal) |
| Hong Kong | hk_br |
Hong Kong BR Number |
| Hungary | eu_vat |
European VAT Number |
| Hungary | hu_tin |
Hungary Tax Number (adószám) |
| Iceland | is_vat |
Icelandic VAT |
| India | in_gst |
Indian GST Number |
| Indonesia | id_npwp |
Indonesian NPWP Number |
| Ireland | eu_vat |
European VAT Number |
| Israel | il_vat |
Israel VAT |
| Italy | eu_vat |
European VAT Number |
| Italy | it_cf |
Italian Codice Fiscale Number |
| Japan | jp_cn |
Japanese Corporate Number (Hōjin Bangō) |
| Japan | jp_rn |
Japanese Registered Foreign Businesses' Registration Number (Tōroku Kokugai Jigyōsha no Tōroku Bangō) |
| Japan | jp_trn |
Japanese Tax Registration Number (Tōroku Bangō) |
| Kazakhstan | kz_bin |
Kazakhstani Business Identification Number |
| Kenya | ke_pin |
Kenya Revenue Authority Personal Identification Number |
| Kyrgyzstan | kg_tin |
Kyrgyzstan Tax Identification Number |
| Laos | la_tin |
Laos Tax Identification Number |
| Latvia | eu_vat |
European VAT Number |
| Liechtenstein | li_uid |
Liechtensteinian UID Number |
| Liechtenstein | li_vat |
Liechtenstein VAT Number |
| Lithuania | eu_vat |
European VAT Number |
| Luxembourg | eu_vat |
European VAT Number |
| Malaysia | my_frp |
Malaysian FRP Number |
| Malaysia | my_itn |
Malaysian ITN |
| Malaysia | my_sst |
Malaysian SST Number |
| Malta | eu_vat |
European VAT Number |
| Mauritania | mr_nif |
Mauritania Tax Identification Number (Número de Identificação Fiscal) |
| Mexico | mx_rfc |
Mexican RFC Number |
| Moldova | md_vat |
Moldova VAT Number |
| Montenegro | me_pib |
Montenegro PIB Number |
| Morocco | ma_vat |
Morocco VAT Number |
| Nepal | np_pan |
Nepal PAN Number |
| Netherlands | eu_vat |
European VAT Number |
| New Zealand | nz_gst |
New Zealand GST Number |
| Nigeria | ng_tin |
Nigerian Tax Identification Number |
| North Macedonia | mk_vat |
North Macedonia VAT Number |
| Northern Ireland | eu_vat |
Northern Ireland VAT Number |
| Norway | no_vat |
Norwegian VAT Number |
| Norway | no_voec |
Norwegian VAT on e-commerce Number |
| Oman | om_vat |
Omani VAT Number |
| Paraguay | py_ruc |
Paraguayan RUC Number |
| Peru | pe_ruc |
Peruvian RUC Number |
| Philippines | ph_tin |
Philippines Tax Identification Number |
| Poland | eu_vat |
European VAT Number |
| Poland | pl_nip |
Polish Tax ID Number |
| Portugal | eu_vat |
European VAT Number |
| Romania | eu_vat |
European VAT Number |
| Romania | ro_tin |
Romanian Tax ID Number |
| Russia | ru_inn |
Russian INN |
| Russia | ru_kpp |
Russian KPP |
| Saudi Arabia | sa_vat |
Saudi Arabia VAT |
| Senegal | sn_ninea |
Senegal NINEA Number |
| Serbia | rs_pib |
Serbian PIB Number |
| Singapore | sg_gst |
Singaporean GST |
| Singapore | sg_uen |
Singaporean UEN |
| Slovakia | eu_vat |
European VAT Number |
| Slovenia | eu_vat |
European VAT Number |
| Slovenia | si_tin |
Slovenia Tax Number (davčna številka) |
| South Africa | za_vat |
South African VAT Number |
| South Korea | kr_brn |
Korean BRN |
| Spain | es_cif |
Spanish NIF Number (previously Spanish CIF Number) |
| Spain | eu_vat |
European VAT Number |
| Sri Lanka | lk_vat |
Sri Lanka VAT Number |
| Suriname | sr_fin |
Suriname FIN Number |
| Sweden | eu_vat |
European VAT Number |
| Switzerland | ch_uid |
Switzerland UID Number |
| Switzerland | ch_vat |
Switzerland VAT Number |
| Taiwan | tw_vat |
Taiwanese VAT |
| Tajikistan | tj_tin |
Tajikistan Tax Identification Number |
| Tanzania | tz_vat |
Tanzania VAT Number |
| Thailand | th_vat |
Thai VAT |
| Turkey | tr_tin |
Turkish Tax Identification Number |
| Uganda | ug_tin |
Uganda Tax Identification Number |
| Ukraine | ua_vat |
Ukrainian VAT |
| United Arab Emirates | ae_trn |
United Arab Emirates TRN |
| United Kingdom | gb_vat |
United Kingdom VAT Number |
| United States | us_ein |
United States EIN |
| Uruguay | uy_ruc |
Uruguayan RUC Number |
| Uzbekistan | uz_tin |
Uzbekistan TIN Number |
| Uzbekistan | uz_vat |
Uzbekistan VAT Number |
| Venezuela | ve_rif |
Venezuelan RIF Number |
| Vietnam | vn_tin |
Vietnamese Tax ID Number |
| Zambia | zm_tin |
Zambia Tax Identification Number |
| Zimbabwe | zw_tin |
Zimbabwe Tax Identification Number |
280 |
# File 'lib/orb/models/customer.rb', line 280 required :tax_id, -> { Orb::CustomerTaxID }, nil?: true |
#timezone ⇒ String
A timezone identifier from the IANA timezone database, such as "America/Los_Angeles". This "defaults to your account's timezone if not set. This cannot be changed after customer creation.
288 |
# File 'lib/orb/models/customer.rb', line 288 required :timezone, String |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/orb/models/customer.rb', line 433
|
Instance Method Details
#to_hash ⇒ {
115 |
# File 'sig/orb/models/customer.rbs', line 115
def to_hash: -> {
|