Module: AvaTax::Client::Vendors
- Defined in:
- lib/avatax/client/vendors.rb
Instance Method Summary collapse
-
#create_vendors(companyId, model) ⇒ VendorModel[]
Create vendors for this company.
-
#delete_vendor(companyId, vendorCode) ⇒ Object
Delete a vendor record.
-
#get_vendor(companyId, vendorCode, options = {}) ⇒ Object
Retrieve a single vendor.
-
#list_certificates_for_vendor(companyId, vendorCode, options = {}) ⇒ FetchResult
List certificates linked to a vendor.
-
#query_vendors(companyId, options = {}) ⇒ FetchResult
List all vendors for this company.
-
#update_vendor(companyId, vendorCode, model) ⇒ Object
Update a single vendor.
Instance Method Details
#create_vendors(companyId, model) ⇒ VendorModel[]
Create vendors for this company
Create one or more vendors for this company.
A vendor 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 vendorCode from this
record in your CreateTransaction API call. AvaTax will search for this vendorCode value and
identify any certificates linked to this vendor 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 vendor object. To fetch the nested object, please call 'GetVendor' 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
32 33 |
# File 'lib/avatax/client/vendors.rb', line 32 def create_vendors(companyId, model) path = "/api/v2/companies/#{companyId}/vendors" post(path, model, {}, AvaTax::VERSION) end |
#delete_vendor(companyId, vendorCode) ⇒ Object
Delete a vendor record
Deletes the vendor object referenced by this URL.
A vendor object defines information about a person or business that you purchase products from. The same CertCapture customer resource is used for vendors (isVendor flag). Deleting removes the record.
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
55 56 |
# File 'lib/avatax/client/vendors.rb', line 55 def delete_vendor(companyId, vendorCode) path = "/api/v2/companies/#{companyId}/vendors/#{vendorCode}" delete(path, {}, AvaTax::VERSION) end |
#get_vendor(companyId, vendorCode, options = {}) ⇒ Object
Retrieve a single vendor
Retrieve the vendor identified by this URL.
A vendor 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 vendor 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 vendor.
- attributes - Retrieves all attributes applied to the vendor.
- active_certificates - Retrieves all the active certificates linked to this vendor
- histories - Retrieves the update history for this vendor
- logs - Retrieves vendor logs
- jobs - Retrieves vendor jobs
- billTos - Retrieves bill-tos linked with this vendor
- shipTos - Retrieves ship-tos linked with this vendor
- shipToStates - Retrieves ship-to states for this vendor
- custom_fields - Retrieves custom fields set for this vendor
- vendorAdditionalInfo - Retrieves vendorAdditionalInfo for this vendor
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
CertCaptureNotConfiguredErrorwhen they call exemption certificate related APIs. To check if this is set up for a company, callGetCertificateSetup. To request setup of exemption certificate storage for this company, callRequestCertificateSetup.
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
95 96 |
# File 'lib/avatax/client/vendors.rb', line 95 def get_vendor(companyId, vendorCode, ={}) path = "/api/v2/companies/#{companyId}/vendors/#{vendorCode}" get(path, , AvaTax::VERSION) end |
#list_certificates_for_vendor(companyId, vendorCode, options = {}) ⇒ FetchResult
List certificates linked to a vendor
List all certificates linked to a vendor.
A vendor 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 vendorCode from this
record in your CreateTransaction API call. AvaTax will search for this vendorCode value and
identify any certificates linked to this vendor 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.
You can filter certificates by exposure zone name using the $filter parameter with the syntax:
$filter=exposureZoneName eq 'ZoneName' or $filter=contains(exposureZoneName,'PartialName')
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
129 130 |
# File 'lib/avatax/client/vendors.rb', line 129 def list_certificates_for_vendor(companyId, vendorCode, ={}) path = "/api/v2/companies/#{companyId}/vendors/#{vendorCode}/certificates" get(path, , AvaTax::VERSION) end |
#query_vendors(companyId, options = {}) ⇒ FetchResult
List all vendors for this company
List all vendors recorded by this company matching the specified criteria.
A vendor 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 vendorCode from this
record in your CreateTransaction API call. AvaTax will search for this vendorCode value and
identify any certificates linked to this vendor 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 vendor.
- attributes - Retrieves all attributes applied to the vendor.
- active_certificates - Retrieves all the active certificates linked to this vendor
- histories - Retrieves the update history for this vendor
- logs - Retrieves vendor logs
- jobs - Retrieves vendor jobs
- billTos - Retrieves bill-tos linked with this vendor
- shipTos - Retrieves ship-tos linked with this vendor
- shipToStates - Retrieves ship-to states for this vendor
- custom_fields - Retrieves custom fields set for this vendor
- vendorAdditionalInfo - Retrieves vendorAdditionalInfo for vendors
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.
Note* Filtering not supported for isVendor field.
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
175 176 |
# File 'lib/avatax/client/vendors.rb', line 175 def query_vendors(companyId, ={}) path = "/api/v2/companies/#{companyId}/vendors" get(path, , AvaTax::VERSION) end |
#update_vendor(companyId, vendorCode, model) ⇒ Object
Update a single vendor
Replace the vendor object with a new record.
A vendor object defines information about a person or business that you purchase products from.
When you create a tax transaction in AvaTax, you can use the vendorCode from this
record. AvaTax will search for this vendorCode value and identify any certificates
linked to this vendor object.
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
201 202 |
# File 'lib/avatax/client/vendors.rb', line 201 def update_vendor(companyId, vendorCode, model) path = "/api/v2/companies/#{companyId}/vendors/#{vendorCode}" put(path, model, {}, AvaTax::VERSION) end |