Module: AvaTax::Client::Contacts

Included in:
AvaTax::Client
Defined in:
lib/avatax/client/contacts.rb

Instance Method Summary collapse

Instance Method Details

#create_contacts(companyId, model) ⇒ ContactModel[]

Create a new contact

Create one or more new contact objects. A 'contact' is a person associated with a company who is designated to handle certain responsibilities of a tax collecting and filing entity.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, ReturnsOnlyAccountAdmin, ReturnsOnlyCompanyAdmin, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • The ID of the company that owns this contact.

  • The contacts you wish to create.

Returns:



19
20
# File 'lib/avatax/client/contacts.rb', line 19

def create_contacts(companyId, model)        path = "/api/v2/companies/#{companyId}/contacts"
post(path, model, {}, AvaTax::VERSION)      end

#delete_contact(companyId, id) ⇒ ErrorDetail[]

Delete a single contact

Mark the existing contact object at this URL as deleted.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, ReturnsOnlyAccountAdmin, ReturnsOnlyCompanyAdmin, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • The ID of the company that owns this contact.

  • The ID of the contact you wish to delete.

Returns:



33
34
# File 'lib/avatax/client/contacts.rb', line 33

def delete_contact(companyId, id)        path = "/api/v2/companies/#{companyId}/contacts/#{id}"
delete(path, {}, AvaTax::VERSION)      end

#get_contact(companyId, id) ⇒ Object

Retrieve a single contact

Get the contact object identified by this URL. A 'contact' is a person associated with a company who is designated to handle certain responsibilities of a tax collecting and filing entity.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient

Parameters:

  • The ID of the company for this contact

  • The primary key of this contact

Returns:



49
50
# File 'lib/avatax/client/contacts.rb', line 49

def get_contact(companyId, id)        path = "/api/v2/companies/#{companyId}/contacts/#{id}"
get(path, {}, AvaTax::VERSION)      end

#list_contacts_by_company(companyId, options = {}) ⇒ FetchResult

Retrieve contacts for this company

List all contact objects assigned to this company.

Search for specific objects using the criteria in the $filter parameter; full documentation is available on Filtering in REST . Paginate your results using the $top, $skip, and $orderby parameters.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient

Parameters:

  • The ID of the company that owns these contacts

  • A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST.
    Not filterable: scsContactId

  • If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.

  • If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.

  • A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC.

Returns:



69
70
# File 'lib/avatax/client/contacts.rb', line 69

def list_contacts_by_company(companyId, options={})        path = "/api/v2/companies/#{companyId}/contacts"
get(path, options, AvaTax::VERSION)      end

#query_contacts(options = {}) ⇒ FetchResult

Retrieve all contacts

Get multiple contact objects across all companies. A 'contact' is a person associated with a company who is designated to handle certain responsibilities of a tax collecting and filing entity.

Search for specific objects using the criteria in the $filter parameter; full documentation is available on Filtering in REST . Paginate your results using the $top, $skip, and $orderby parameters.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AccountUser, AvaTaxOnlyAccountAdmin, AvaTaxOnlyAccountUser, AvaTaxOnlyCompanyAdmin, AvaTaxOnlyCompanyUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ECMAccountUser, ECMCompanyUser, FirmAdmin, ReturnsOnlyAccountAdmin, ReturnsOnlyAccountUser, ReturnsOnlyCompanyAdmin, ReturnsOnlyCompanyUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. Swagger Name: AvaTaxClient

Parameters:

  • A filter statement to identify specific records to retrieve. For more information on filtering, see Filtering in REST.
    Not filterable: scsContactId

  • If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records.

  • If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.

  • A comma separated list of sort statements in the format (fieldname) [ASC|DESC], for example id ASC.

Returns:



90
91
# File 'lib/avatax/client/contacts.rb', line 90

def query_contacts(options={})        path = "/api/v2/contacts"
get(path, options, AvaTax::VERSION)      end

#update_contact(companyId, id, model) ⇒ Object

Update a single contact

Replace the existing contact object at this URL with an updated object. A 'contact' is a person associated with a company who is designated to handle certain responsibilities of a tax collecting and filing entity. All data from the existing object will be replaced with data in the object you PUT. To set a field's value to null, you may either set its value to null or omit that field from the object you post.

Security Policies

  • This API requires one of the following user roles: AccountAdmin, AvaTaxOnlyAccountAdmin, AvaTaxOnlyCompanyAdmin, BatchServiceAdmin, CompanyAdmin, CSPTester, FirmAdmin, ReturnsOnlyAccountAdmin, ReturnsOnlyCompanyAdmin, SSTAdmin, TechnicalSupportAdmin. Swagger Name: AvaTaxClient

Parameters:

  • The ID of the company that this contact belongs to.

  • The ID of the contact you wish to update

  • The contact you wish to update.

Returns:



109
110
# File 'lib/avatax/client/contacts.rb', line 109

def update_contact(companyId, id, model)        path = "/api/v2/companies/#{companyId}/contacts/#{id}"
put(path, model, {}, AvaTax::VERSION)      end