Module: AvaTax::Client::Customers
- Included in:
- AvaTax::Client
- Defined in:
- lib/avatax/client/customers.rb
Instance Method Summary collapse
-
#add_ship_to_states_for_customer(companyId, customerCode, model) ⇒ FetchResult
Add ship-to states to a customer.
-
#create_customers(companyId, model) ⇒ CustomerModel[]
Create customers for this company.
-
#delete_custom_fields(companyId, customerCode, model) ⇒ Object
Delete custom fields.
-
#delete_customer(companyId, customerCode) ⇒ Object
Delete a customer record.
-
#get_customer(companyId, customerCode, options = {}) ⇒ Object
Retrieve a single customer.
-
#link_attributes_to_customer(companyId, customerCode, model) ⇒ FetchResult
Link attributes to a customer.
-
#link_certificates_to_customer(companyId, customerCode, model) ⇒ FetchResult
Link certificates to a customer.
-
#link_ship_to_customers_to_bill_customer(companyId, code, model) ⇒ Object
Link two customer records together.
-
#list_active_certificates_for_customer(companyId, customerCode) ⇒ Object
Retrieves a list of active certificates for a specified customer within a company.
-
#list_attributes_for_customer(companyId, customerCode) ⇒ FetchResult
Retrieve a customer's attributes.
-
#list_certificates_for_customer(companyId, customerCode, options = {}) ⇒ FetchResult
List certificates linked to a customer.
-
#list_custom_fields_for_customer(companyId, customerCode) ⇒ Object
Retrieves a list of custom fields for a specified customer within a company.
-
#list_in_active_certificates_for_customer(companyId, customerCode) ⇒ Object
Retrieves a list of inactive certificates for a specified customer within a company.
-
#list_ship_to_states_for_customer(companyId, customerCode) ⇒ FetchResult
List ship-to states linked to a customer.
-
#list_valid_certificates_for_customer(companyId, customerCode, country, region) ⇒ Object
List valid certificates for a location.
-
#query_customers(companyId, options = {}) ⇒ FetchResult
List all customers for this company.
-
#remove_ship_to_states_for_customer(companyId, customerCode, model) ⇒ FetchResult
Remove ship-to states from a customer.
-
#unlink_attributes_from_customer(companyId, customerCode, model) ⇒ FetchResult
Unlink attributes from a customer.
-
#unlink_certificates_from_customer(companyId, customerCode, model) ⇒ FetchResult
Unlink certificates from a customer.
-
#update_custom_fields(companyId, customerCode, model) ⇒ Object
Update custom fields.
-
#update_customer(companyId, customerCode, model) ⇒ Object
Update a single customer.
Instance Method Details
#add_ship_to_states_for_customer(companyId, customerCode, model) ⇒ FetchResult
Add ship-to states to a customer
Adds one or more ship-to states to the specified customer.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
24 25 |
# File 'lib/avatax/client/customers.rb', line 24 def add_ship_to_states_for_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/shiptostate" post(path, model, {}, AvaTax::VERSION) end |
#create_customers(companyId, model) ⇒ CustomerModel[]
Create customers for this company
Create one or more customers for this company.
A customer object defines information about a person or business that purchases products from your
company. When you create a tax transaction in AvaTax, you can use the customerCode from this
record in your CreateTransaction API call. AvaTax will search for this customerCode value and
identify any certificates linked to this customer object. If any certificate applies to the transaction,
AvaTax will record the appropriate elements of the transaction as exempt and link it to the certificate.
A nested object such as CustomFields could be specified and created along with the customer object. To fetch the nested object, please call 'GetCustomer' API with appropriate $include parameters.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
53 54 |
# File 'lib/avatax/client/customers.rb', line 53 def create_customers(companyId, model) path = "/api/v2/companies/#{companyId}/customers" post(path, model, {}, AvaTax::VERSION) end |
#delete_custom_fields(companyId, customerCode, model) ⇒ Object
Delete custom fields
Deletes the value of the custom field.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
100 101 |
# File 'lib/avatax/client/customers.rb', line 100 def delete_custom_fields(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/custom-fields" delete(path, model, {}, AvaTax::VERSION) end |
#delete_customer(companyId, customerCode) ⇒ Object
Delete a customer record
Deletes the customer object referenced by this URL.
A customer object defines information about a person or business that purchases products from your
company. When you create a tax transaction in AvaTax, you can use the customerCode from this
record in your CreateTransaction API call. AvaTax will search for this customerCode value and
identify any certificates linked to this customer object. If any certificate applies to the transaction,
AvaTax will record the appropriate elements of the transaction as exempt and link it to the certificate.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
79 80 |
# File 'lib/avatax/client/customers.rb', line 79 def delete_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}" delete(path, {}, AvaTax::VERSION) end |
#get_customer(companyId, customerCode, options = {}) ⇒ Object
Retrieve a single customer
Retrieve the customer identified by this URL.
A customer object defines information about a person or business that purchases products from your
company. When you create a tax transaction in AvaTax, you can use the customerCode from this
record in your CreateTransaction API call. AvaTax will search for this customerCode value and
identify any certificates linked to this customer object. If any certificate applies to the transaction,
AvaTax will record the appropriate elements of the transaction as exempt and link it to the certificate.
You can use the $include parameter to fetch the following additional objects for expansion:
- certificates - Fetch a list of certificates linked to this customer.
- attributes - Retrieves all attributes applied to the customer.
- active_certificates - Retrieves all the active certificates linked to this customer
- histories - Retrieves the update history for this customer
- logs - Retrieves customer logs
- jobs - Retrieves customer jobs
- billTos - Retrieves bill-tos linked with this customer
- shipTos - Retrieves ship-tos linked with this customer
- shipToStates - Retrieves ship-to states for this customer
- custom_fields - Retrieves custom fields set for this customer
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
140 141 |
# File 'lib/avatax/client/customers.rb', line 140 def get_customer(companyId, customerCode, ={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}" get(path, , AvaTax::VERSION) end |
#link_attributes_to_customer(companyId, customerCode, model) ⇒ FetchResult
Link attributes to a customer
Link one or many attributes to a customer.
A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
customer at any time. The full list of defined attributes may be found using QueryCompanyCustomerAttributes API.
A customer object defines information about a person or business that purchases products from your
company. When you create a tax transaction in AvaTax, you can use the customerCode from this
record in your CreateTransaction API call. AvaTax will search for this customerCode value and
identify any certificates linked to this customer object. If any certificate applies to the transaction,
AvaTax will record the appropriate elements of the transaction as exempt and link it to the certificate.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
170 171 |
# File 'lib/avatax/client/customers.rb', line 170 def link_attributes_to_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/link" put(path, model, {}, AvaTax::VERSION) end |
#link_certificates_to_customer(companyId, customerCode, model) ⇒ FetchResult
Link certificates to a customer
Link one or more certificates to a customer.
A customer object defines information about a person or business that purchases products from your
company. When you create a tax transaction in AvaTax, you can use the customerCode from this
record in your CreateTransaction API call. AvaTax will search for this customerCode value and
identify any certificates linked to this customer object. If any certificate applies to the transaction,
AvaTax will record the appropriate elements of the transaction as exempt and link it to the certificate.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
197 198 |
# File 'lib/avatax/client/customers.rb', line 197 def link_certificates_to_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/link" post(path, model, {}, AvaTax::VERSION) end |
#link_ship_to_customers_to_bill_customer(companyId, code, model) ⇒ Object
Link two customer records together
Links a Ship-To customer record with a Bill-To customer record.
Customer records represent businesses or individuals who can provide exemption certificates. Some customers may have certificates that are linked to their shipping address or their billing address. To group these customer records together, you may link multiple bill-to and ship-to addresses together to represent a single entity that has multiple different addresses of different kinds.
In general, a customer will have only one primary billing address and multiple ship-to addresses, representing all of the different locations where they receive goods. To facilitate this type of customer, you can send in one bill-to customer code and multiple ship-to customer codes in a single API call.
Note that you can only link a ship-to customer record to a bill-to customer record. You may not link two customers of the same kind together.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
225 226 |
# File 'lib/avatax/client/customers.rb', line 225 def link_ship_to_customers_to_bill_customer(companyId, code, model) path = "/api/v2/companies/#{companyId}/customers/billto/#{code}/shipto/link" post(path, model, {}, AvaTax::VERSION) end |
#list_active_certificates_for_customer(companyId, customerCode) ⇒ Object
Retrieves a list of active certificates for a specified customer within a company.
This API is intended to identify whether a customer has any active certificates.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
245 246 |
# File 'lib/avatax/client/customers.rb', line 245 def list_active_certificates_for_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/active" get(path, {}, AvaTax::VERSION) end |
#list_attributes_for_customer(companyId, customerCode) ⇒ FetchResult
Retrieve a customer's attributes
Retrieve the attributes linked to the customer identified by this URL.
A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
customer at any time. The full list of defined attributes may be found using QueryCompanyCustomerAttributes API.
A customer object defines information about a person or business that purchases products from your
company. When you create a tax transaction in AvaTax, you can use the customerCode from this
record in your CreateTransaction API call. AvaTax will search for this customerCode value and
identify any certificates linked to this customer object. If any certificate applies to the transaction,
AvaTax will record the appropriate elements of the transaction as exempt and link it to the certificate.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
274 275 |
# File 'lib/avatax/client/customers.rb', line 274 def list_attributes_for_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes" get(path, {}, AvaTax::VERSION) end |
#list_certificates_for_customer(companyId, customerCode, options = {}) ⇒ FetchResult
List certificates linked to a customer
List all certificates linked to a customer.
A customer object defines information about a person or business that purchases products from your
company. When you create a tax transaction in AvaTax, you can use the customerCode from this
record in your CreateTransaction API call. AvaTax will search for this customerCode value and
identify any certificates linked to this customer object. If any certificate applies to the transaction,
AvaTax will record the appropriate elements of the transaction as exempt and link it to the certificate.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
305 306 |
# File 'lib/avatax/client/customers.rb', line 305 def list_certificates_for_customer(companyId, customerCode, ={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates" get(path, , AvaTax::VERSION) end |
#list_custom_fields_for_customer(companyId, customerCode) ⇒ Object
Retrieves a list of custom fields for a specified customer within a company.
This API is used to retrieve custom field for a customer.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
324 325 |
# File 'lib/avatax/client/customers.rb', line 324 def list_custom_fields_for_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/custom-fields" get(path, {}, AvaTax::VERSION) end |
#list_in_active_certificates_for_customer(companyId, customerCode) ⇒ Object
Retrieves a list of inactive certificates for a specified customer within a company.
This API is used to retrieve inactive certificates for a customer. Inactive certificates may include expired, revoked, or otherwise non-compliant certificates.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
345 346 |
# File 'lib/avatax/client/customers.rb', line 345 def list_in_active_certificates_for_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/inactive" get(path, {}, AvaTax::VERSION) end |
#list_ship_to_states_for_customer(companyId, customerCode) ⇒ FetchResult
List ship-to states linked to a customer
Retrieves the ship-to states associated with the specified customer.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
365 366 |
# File 'lib/avatax/client/customers.rb', line 365 def list_ship_to_states_for_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/shiptostate" get(path, {}, AvaTax::VERSION) end |
#list_valid_certificates_for_customer(companyId, customerCode, country, region) ⇒ Object
List valid certificates for a location
List valid certificates linked to a customer in a particular country and region.
This API is intended to help identify whether a customer has already provided a certificate that applies to a particular country and region. This API is intended to help you remind a customer when they have or have not provided copies of their exemption certificates to you during the sales order process.
If a customer does not have a certificate on file and they wish to provide one, you should send the customer
a CertExpress invitation link so that the customer can upload proof of their exemption certificate. Please
see the CreateCertExpressInvitation API to create an invitation link for this customer.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
396 397 |
# File 'lib/avatax/client/customers.rb', line 396 def list_valid_certificates_for_customer(companyId, customerCode, country, region) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/#{country}/#{region}" get(path, {}, AvaTax::VERSION) end |
#query_customers(companyId, options = {}) ⇒ FetchResult
List all customers for this company
List all customers recorded by this company matching the specified criteria.
A customer object defines information about a person or business that purchases products from your
company. When you create a tax transaction in AvaTax, you can use the customerCode from this
record in your CreateTransaction API call. AvaTax will search for this customerCode value and
identify any certificates linked to this customer object. If any certificate applies to the transaction,
AvaTax will record the appropriate elements of the transaction as exempt and link it to the certificate.
You can use the $include parameter to fetch the following additional objects for expansion:
- certificates - Fetch a list of certificates linked to this customer.
- attributes - Retrieves all attributes applied to the customer.
- active_certificates - Retrieves all the active certificates linked to this customer
- histories - Retrieves the update history for this customer
- logs - Retrieves customer logs
- jobs - Retrieves customer jobs
- billTos - Retrieves bill-tos linked with this customer
- shipTos - Retrieves ship-tos linked with this customer
- shipToStates - Retrieves ship-to states for this customer
- custom_fields - Retrieves custom fields set for this customer
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
439 440 |
# File 'lib/avatax/client/customers.rb', line 439 def query_customers(companyId, ={}) path = "/api/v2/companies/#{companyId}/customers" get(path, , AvaTax::VERSION) end |
#remove_ship_to_states_for_customer(companyId, customerCode, model) ⇒ FetchResult
Remove ship-to states from a customer
Removes one or more ship-to states from the specified customer.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
460 461 |
# File 'lib/avatax/client/customers.rb', line 460 def remove_ship_to_states_for_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/shiptostate" delete(path, model, {}, AvaTax::VERSION) end |
#unlink_attributes_from_customer(companyId, customerCode, model) ⇒ FetchResult
Unlink attributes from a customer
Unlink one or many attributes from a customer.
A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
customer at any time. The full list of defined attributes may be found using QueryCompanyCustomerAttributes API.
A customer object defines information about a person or business that purchases products from your
company. When you create a tax transaction in AvaTax, you can use the customerCode from this
record in your CreateTransaction API call. AvaTax will search for this customerCode value and
identify any certificates linked to this customer object. If any certificate applies to the transaction,
AvaTax will record the appropriate elements of the transaction as exempt and link it to the certificate.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
490 491 |
# File 'lib/avatax/client/customers.rb', line 490 def unlink_attributes_from_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/unlink" put(path, model, {}, AvaTax::VERSION) end |
#unlink_certificates_from_customer(companyId, customerCode, model) ⇒ FetchResult
Unlink certificates from a customer
Remove one or more certificates to a customer.
A customer object defines information about a person or business that purchases products from your
company. When you create a tax transaction in AvaTax, you can use the customerCode from this
record in your CreateTransaction API call. AvaTax will search for this customerCode value and
identify any certificates linked to this customer object. If any certificate applies to the transaction,
AvaTax will record the appropriate elements of the transaction as exempt and link it to the certificate.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
517 518 |
# File 'lib/avatax/client/customers.rb', line 517 def unlink_certificates_from_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/unlink" post(path, model, {}, AvaTax::VERSION) end |
#update_custom_fields(companyId, customerCode, model) ⇒ Object
Update custom fields
Update the value of the custom field.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
565 566 |
# File 'lib/avatax/client/customers.rb', line 565 def update_custom_fields(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/custom-fields" put(path, model, {}, AvaTax::VERSION) end |
#update_customer(companyId, customerCode, model) ⇒ Object
Update a single customer
Replace the customer object at this URL with a new record.
A customer object defines information about a person or business that purchases products from your
company. When you create a tax transaction in AvaTax, you can use the customerCode from this
record in your CreateTransaction API call. AvaTax will search for this customerCode value and
identify any certificates linked to this customer object. If any certificate applies to the transaction,
AvaTax will record the appropriate elements of the transaction as exempt and link it to the certificate.
Before you can use any exemption certificates endpoints, you must set up your company for exemption certificate data storage.
Companies that do not have this storage system set up will see CertCaptureNotConfiguredError when they call exemption
certificate related APIs. To check if this is set up for a company, call GetCertificateSetup. To request setup of exemption
certificate storage for this company, call RequestCertificateSetup.
Security Policies
- This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
- This API depends on the following active services:Required (all): AvaTaxPro, ECMEssentials, ECMPro, ECMPremium, VEMPro, VEMPremium, ECMProComms, ECMPremiumComms. Swagger Name: AvaTaxClient
544 545 |
# File 'lib/avatax/client/customers.rb', line 544 def update_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}" put(path, model, {}, AvaTax::VERSION) end |