avatax 20.1.0 → 20.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avatax/client/accounts.rb +180 -116
- data/lib/avatax/client/addresses.rb +34 -34
- data/lib/avatax/client/advancedrules.rb +33 -142
- data/lib/avatax/client/avafileforms.rb +37 -37
- data/lib/avatax/client/batches.rb +122 -122
- data/lib/avatax/client/certexpressinvites.rb +70 -70
- data/lib/avatax/client/certificates.rb +313 -313
- data/lib/avatax/client/companies.rb +234 -232
- data/lib/avatax/client/compliance.rb +2 -2
- data/lib/avatax/client/contacts.rb +58 -58
- data/lib/avatax/client/customers.rb +279 -279
- data/lib/avatax/client/datasources.rb +51 -51
- data/lib/avatax/client/definitions.rb +448 -435
- data/lib/avatax/client/distancethresholds.rb +74 -74
- data/lib/avatax/client/filingcalendars.rb +10 -498
- data/lib/avatax/client/filings.rb +13 -13
- data/lib/avatax/client/firmclientlinkages.rb +54 -54
- data/lib/avatax/client/free.rb +73 -73
- data/lib/avatax/client/fundingrequests.rb +32 -32
- data/lib/avatax/client/items.rb +284 -284
- data/lib/avatax/client/jurisdictionoverrides.rb +70 -70
- data/lib/avatax/client/locations.rb +87 -84
- data/lib/avatax/client/multidocument.rb +294 -234
- data/lib/avatax/client/nexus.rb +283 -143
- data/lib/avatax/client/notifications.rb +48 -48
- data/lib/avatax/client/provisioning.rb +29 -29
- data/lib/avatax/client/registrar.rb +122 -122
- data/lib/avatax/client/reports.rb +63 -63
- data/lib/avatax/client/settings.rb +108 -108
- data/lib/avatax/client/subscriptions.rb +35 -35
- data/lib/avatax/client/taxcodes.rb +72 -72
- data/lib/avatax/client/taxcontent.rb +106 -106
- data/lib/avatax/client/taxrules.rb +122 -122
- data/lib/avatax/client/transactions.rb +654 -639
- data/lib/avatax/client/upcs.rb +63 -63
- data/lib/avatax/client/users.rb +121 -121
- data/lib/avatax/client/utilities.rb +34 -34
- data/lib/avatax/connection.rb +1 -1
- data/lib/avatax/request.rb +2 -0
- data/lib/avatax/version.rb +1 -1
- metadata +3 -3
@@ -6,8 +6,8 @@ module AvaTax
|
|
6
6
|
# API to modify the reference fields at the document and the line level.
|
7
7
|
#
|
8
8
|
#
|
9
|
-
# @param companyId [Integer]
|
10
|
-
# @param model [TransactionReferenceFieldModel[]]
|
9
|
+
# @param companyId [Integer]
|
10
|
+
# @param model [TransactionReferenceFieldModel[]]
|
11
11
|
# @return [FetchResult]
|
12
12
|
def tag_transaction(companyId, model) path = "/api/v2/companies/#{companyId}/transactions/tag"
|
13
13
|
put(path, model) end
|
@@ -5,100 +5,100 @@ module AvaTax
|
|
5
5
|
|
6
6
|
# Create a new contact
|
7
7
|
#
|
8
|
-
# Create one or more new contact objects.
|
9
|
-
# A 'contact' is a person associated with a company who is designated to handle certain responsibilities of
|
10
|
-
# a tax collecting and filing entity.
|
11
|
-
#
|
12
|
-
# ### Security Policies
|
13
|
-
#
|
8
|
+
# Create one or more new contact objects.
|
9
|
+
# A 'contact' is a person associated with a company who is designated to handle certain responsibilities of
|
10
|
+
# a tax collecting and filing entity.
|
11
|
+
#
|
12
|
+
# ### Security Policies
|
13
|
+
#
|
14
14
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
|
15
|
-
# @param companyId [Integer] The ID of the company that owns this contact.
|
16
|
-
# @param model [ContactModel[]] The contacts you wish to create.
|
15
|
+
# @param companyId [Integer] The ID of the company that owns this contact.
|
16
|
+
# @param model [ContactModel[]] The contacts you wish to create.
|
17
17
|
# @return [ContactModel[]]
|
18
18
|
def create_contacts(companyId, model) path = "/api/v2/companies/#{companyId}/contacts"
|
19
19
|
post(path, model) end
|
20
20
|
|
21
21
|
# Delete a single contact
|
22
22
|
#
|
23
|
-
# Mark the existing contact object at this URL as deleted.
|
24
|
-
#
|
25
|
-
# ### Security Policies
|
26
|
-
#
|
23
|
+
# Mark the existing contact object at this URL as deleted.
|
24
|
+
#
|
25
|
+
# ### Security Policies
|
26
|
+
#
|
27
27
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
|
28
|
-
# @param companyId [Integer] The ID of the company that owns this contact.
|
29
|
-
# @param id [Integer] The ID of the contact you wish to delete.
|
28
|
+
# @param companyId [Integer] The ID of the company that owns this contact.
|
29
|
+
# @param id [Integer] The ID of the contact you wish to delete.
|
30
30
|
# @return [ErrorDetail[]]
|
31
31
|
def delete_contact(companyId, id) path = "/api/v2/companies/#{companyId}/contacts/#{id}"
|
32
32
|
delete(path) end
|
33
33
|
|
34
34
|
# Retrieve a single contact
|
35
35
|
#
|
36
|
-
# Get the contact object identified by this URL.
|
37
|
-
# A 'contact' is a person associated with a company who is designated to handle certain responsibilities of
|
38
|
-
# a tax collecting and filing entity.
|
39
|
-
#
|
40
|
-
# ### Security Policies
|
41
|
-
#
|
36
|
+
# Get the contact object identified by this URL.
|
37
|
+
# A 'contact' is a person associated with a company who is designated to handle certain responsibilities of
|
38
|
+
# a tax collecting and filing entity.
|
39
|
+
#
|
40
|
+
# ### Security Policies
|
41
|
+
#
|
42
42
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
43
|
-
# @param companyId [Integer] The ID of the company for this contact
|
44
|
-
# @param id [Integer] The primary key of this contact
|
43
|
+
# @param companyId [Integer] The ID of the company for this contact
|
44
|
+
# @param id [Integer] The primary key of this contact
|
45
45
|
# @return [Object]
|
46
46
|
def get_contact(companyId, id) path = "/api/v2/companies/#{companyId}/contacts/#{id}"
|
47
47
|
get(path) end
|
48
48
|
|
49
49
|
# Retrieve contacts for this company
|
50
50
|
#
|
51
|
-
# List all contact objects assigned to this company.
|
52
|
-
#
|
53
|
-
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
54
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
55
|
-
#
|
56
|
-
# ### Security Policies
|
57
|
-
#
|
51
|
+
# List all contact objects assigned to this company.
|
52
|
+
#
|
53
|
+
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
54
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
55
|
+
#
|
56
|
+
# ### Security Policies
|
57
|
+
#
|
58
58
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
59
|
-
# @param companyId [Integer] The ID of the company that owns these contacts
|
60
|
-
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
|
61
|
-
# @param top [Integer] 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.
|
62
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
63
|
-
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
59
|
+
# @param companyId [Integer] The ID of the company that owns these contacts
|
60
|
+
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
|
61
|
+
# @param top [Integer] 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.
|
62
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
63
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
64
64
|
# @return [FetchResult]
|
65
65
|
def list_contacts_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/contacts"
|
66
66
|
get(path, options) end
|
67
67
|
|
68
68
|
# Retrieve all contacts
|
69
69
|
#
|
70
|
-
# Get multiple contact objects across all companies.
|
71
|
-
# A 'contact' is a person associated with a company who is designated to handle certain responsibilities of
|
72
|
-
# a tax collecting and filing entity.
|
73
|
-
#
|
74
|
-
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
75
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
76
|
-
#
|
77
|
-
# ### Security Policies
|
78
|
-
#
|
70
|
+
# Get multiple contact objects across all companies.
|
71
|
+
# A 'contact' is a person associated with a company who is designated to handle certain responsibilities of
|
72
|
+
# a tax collecting and filing entity.
|
73
|
+
#
|
74
|
+
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
75
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
76
|
+
#
|
77
|
+
# ### Security Policies
|
78
|
+
#
|
79
79
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
80
|
-
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
|
81
|
-
# @param top [Integer] 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.
|
82
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
83
|
-
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
80
|
+
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
|
81
|
+
# @param top [Integer] 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.
|
82
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
83
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
84
84
|
# @return [FetchResult]
|
85
85
|
def query_contacts(options={}) path = "/api/v2/contacts"
|
86
86
|
get(path, options) end
|
87
87
|
|
88
88
|
# Update a single contact
|
89
89
|
#
|
90
|
-
# Replace the existing contact object at this URL with an updated object.
|
91
|
-
# A 'contact' is a person associated with a company who is designated to handle certain responsibilities of
|
92
|
-
# a tax collecting and filing entity.
|
93
|
-
# All data from the existing object will be replaced with data in the object you PUT.
|
94
|
-
# 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.
|
95
|
-
#
|
96
|
-
# ### Security Policies
|
97
|
-
#
|
90
|
+
# Replace the existing contact object at this URL with an updated object.
|
91
|
+
# A 'contact' is a person associated with a company who is designated to handle certain responsibilities of
|
92
|
+
# a tax collecting and filing entity.
|
93
|
+
# All data from the existing object will be replaced with data in the object you PUT.
|
94
|
+
# 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.
|
95
|
+
#
|
96
|
+
# ### Security Policies
|
97
|
+
#
|
98
98
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
|
99
|
-
# @param companyId [Integer] The ID of the company that this contact belongs to.
|
100
|
-
# @param id [Integer] The ID of the contact you wish to update
|
101
|
-
# @param model [Object] The contact you wish to update.
|
99
|
+
# @param companyId [Integer] The ID of the company that this contact belongs to.
|
100
|
+
# @param id [Integer] The ID of the contact you wish to update
|
101
|
+
# @param model [Object] The contact you wish to update.
|
102
102
|
# @return [Object]
|
103
103
|
def update_contact(companyId, id, model) path = "/api/v2/companies/#{companyId}/contacts/#{id}"
|
104
104
|
put(path, model) end
|
@@ -5,370 +5,370 @@ module AvaTax
|
|
5
5
|
|
6
6
|
# Create customers for this company
|
7
7
|
#
|
8
|
-
# Create one or more customers for this company.
|
9
|
-
#
|
10
|
-
# A customer object defines information about a person or business that purchases products from your
|
11
|
-
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
12
|
-
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
13
|
-
# identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
|
14
|
-
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
15
|
-
#
|
16
|
-
# A nested object such as CustomFields could be specified and created along with the customer object. To fetch the
|
17
|
-
# nested object, please call 'GetCustomer' API with appropriate $include parameters.
|
18
|
-
#
|
19
|
-
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
20
|
-
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
21
|
-
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
22
|
-
# storage for this company, call `RequestCertificateSetup`.
|
23
|
-
#
|
24
|
-
# ### Security Policies
|
25
|
-
#
|
26
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
8
|
+
# Create one or more customers for this company.
|
9
|
+
#
|
10
|
+
# A customer object defines information about a person or business that purchases products from your
|
11
|
+
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
12
|
+
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
13
|
+
# identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
|
14
|
+
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
15
|
+
#
|
16
|
+
# A nested object such as CustomFields could be specified and created along with the customer object. To fetch the
|
17
|
+
# nested object, please call 'GetCustomer' API with appropriate $include parameters.
|
18
|
+
#
|
19
|
+
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
20
|
+
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
21
|
+
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
22
|
+
# storage for this company, call `RequestCertificateSetup`.
|
23
|
+
#
|
24
|
+
# ### Security Policies
|
25
|
+
#
|
26
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
27
27
|
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
28
|
-
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
29
|
-
# @param model [CustomerModel[]] The list of customer objects to be created
|
28
|
+
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
29
|
+
# @param model [CustomerModel[]] The list of customer objects to be created
|
30
30
|
# @return [CustomerModel[]]
|
31
31
|
def create_customers(companyId, model) path = "/api/v2/companies/#{companyId}/customers"
|
32
32
|
post(path, model) end
|
33
33
|
|
34
34
|
# Delete a customer record
|
35
35
|
#
|
36
|
-
# Deletes the customer object referenced by this URL.
|
37
|
-
#
|
38
|
-
# A customer object defines information about a person or business that purchases products from your
|
39
|
-
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
40
|
-
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
41
|
-
# identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
|
42
|
-
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
43
|
-
#
|
44
|
-
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
45
|
-
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
46
|
-
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
47
|
-
# storage for this company, call `RequestCertificateSetup`.
|
48
|
-
#
|
49
|
-
# ### Security Policies
|
50
|
-
#
|
51
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
36
|
+
# Deletes the customer object referenced by this URL.
|
37
|
+
#
|
38
|
+
# A customer object defines information about a person or business that purchases products from your
|
39
|
+
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
40
|
+
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
41
|
+
# identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
|
42
|
+
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
43
|
+
#
|
44
|
+
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
45
|
+
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
46
|
+
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
47
|
+
# storage for this company, call `RequestCertificateSetup`.
|
48
|
+
#
|
49
|
+
# ### Security Policies
|
50
|
+
#
|
51
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
52
52
|
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
53
|
-
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
54
|
-
# @param customerCode [String] The unique code representing this customer
|
53
|
+
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
54
|
+
# @param customerCode [String] The unique code representing this customer
|
55
55
|
# @return [Object]
|
56
56
|
def delete_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
|
57
57
|
delete(path) end
|
58
58
|
|
59
59
|
# Retrieve a single customer
|
60
60
|
#
|
61
|
-
# Retrieve the customer identified by this URL.
|
62
|
-
#
|
63
|
-
# A customer object defines information about a person or business that purchases products from your
|
64
|
-
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
65
|
-
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
66
|
-
# identify any certificates linked to this customer object. If any certificate applies to the transaction,
|
67
|
-
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
68
|
-
#
|
69
|
-
# You can use the `$include` parameter to fetch the following additional objects for expansion:
|
70
|
-
#
|
71
|
-
# * Certificates - Fetch a list of certificates linked to this customer.
|
72
|
-
# * CustomFields - Fetch a list of custom fields associated to this customer.
|
73
|
-
# * attributes - Retrieves all attributes applied to the customer.
|
74
|
-
#
|
75
|
-
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
76
|
-
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
77
|
-
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
78
|
-
# storage for this company, call `RequestCertificateSetup`.
|
79
|
-
#
|
80
|
-
# ### Security Policies
|
81
|
-
#
|
82
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
61
|
+
# Retrieve the customer identified by this URL.
|
62
|
+
#
|
63
|
+
# A customer object defines information about a person or business that purchases products from your
|
64
|
+
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
65
|
+
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
66
|
+
# identify any certificates linked to this customer object. If any certificate applies to the transaction,
|
67
|
+
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
68
|
+
#
|
69
|
+
# You can use the `$include` parameter to fetch the following additional objects for expansion:
|
70
|
+
#
|
71
|
+
# * Certificates - Fetch a list of certificates linked to this customer.
|
72
|
+
# * CustomFields - Fetch a list of custom fields associated to this customer.
|
73
|
+
# * attributes - Retrieves all attributes applied to the customer.
|
74
|
+
#
|
75
|
+
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
76
|
+
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
77
|
+
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
78
|
+
# storage for this company, call `RequestCertificateSetup`.
|
79
|
+
#
|
80
|
+
# ### Security Policies
|
81
|
+
#
|
82
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
83
83
|
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
84
|
-
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
85
|
-
# @param customerCode [String] The unique code representing this customer
|
86
|
-
# @param include [String] Specify optional additional objects to include in this fetch request
|
84
|
+
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
85
|
+
# @param customerCode [String] The unique code representing this customer
|
86
|
+
# @param include [String] Specify optional additional objects to include in this fetch request
|
87
87
|
# @return [Object]
|
88
88
|
def get_customer(companyId, customerCode, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
|
89
89
|
get(path, options) end
|
90
90
|
|
91
91
|
# Link attributes to a customer
|
92
92
|
#
|
93
|
-
# Link one or many attributes to a customer.
|
94
|
-
#
|
95
|
-
# A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
|
96
|
-
# customer at any time. The full list of defined attributes may be found using `QueryCompanyCustomerAttributes` API.
|
97
|
-
#
|
98
|
-
# A customer object defines information about a person or business that purchases products from your
|
99
|
-
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
100
|
-
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
101
|
-
# identify any certificates linked to this customer object. If any certificate applies to the transaction,
|
102
|
-
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
103
|
-
#
|
104
|
-
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
105
|
-
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
106
|
-
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
107
|
-
# storage for this company, call `RequestCertificateSetup`.
|
108
|
-
#
|
109
|
-
# ### Security Policies
|
110
|
-
#
|
111
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
93
|
+
# Link one or many attributes to a customer.
|
94
|
+
#
|
95
|
+
# A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
|
96
|
+
# customer at any time. The full list of defined attributes may be found using `QueryCompanyCustomerAttributes` API.
|
97
|
+
#
|
98
|
+
# A customer object defines information about a person or business that purchases products from your
|
99
|
+
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
100
|
+
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
101
|
+
# identify any certificates linked to this customer object. If any certificate applies to the transaction,
|
102
|
+
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
103
|
+
#
|
104
|
+
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
105
|
+
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
106
|
+
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
107
|
+
# storage for this company, call `RequestCertificateSetup`.
|
108
|
+
#
|
109
|
+
# ### Security Policies
|
110
|
+
#
|
111
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
112
112
|
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
113
|
-
# @param companyId [Integer] The unique ID number of the company that recorded the provided customer
|
114
|
-
# @param customerCode [String] The unique code representing the current customer
|
115
|
-
# @param model [CustomerAttributeModel[]] The list of attributes to link to the customer.
|
113
|
+
# @param companyId [Integer] The unique ID number of the company that recorded the provided customer
|
114
|
+
# @param customerCode [String] The unique code representing the current customer
|
115
|
+
# @param model [CustomerAttributeModel[]] The list of attributes to link to the customer.
|
116
116
|
# @return [FetchResult]
|
117
117
|
def link_attributes_to_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/link"
|
118
118
|
put(path, model) end
|
119
119
|
|
120
120
|
# Link certificates to a customer
|
121
121
|
#
|
122
|
-
# Link one or more certificates to a customer.
|
123
|
-
#
|
124
|
-
# A customer object defines information about a person or business that purchases products from your
|
125
|
-
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
126
|
-
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
127
|
-
# identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
|
128
|
-
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
129
|
-
#
|
130
|
-
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
131
|
-
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
132
|
-
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
133
|
-
# storage for this company, call `RequestCertificateSetup`.
|
134
|
-
#
|
135
|
-
# ### Security Policies
|
136
|
-
#
|
137
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
122
|
+
# Link one or more certificates to a customer.
|
123
|
+
#
|
124
|
+
# A customer object defines information about a person or business that purchases products from your
|
125
|
+
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
126
|
+
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
127
|
+
# identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
|
128
|
+
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
129
|
+
#
|
130
|
+
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
131
|
+
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
132
|
+
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
133
|
+
# storage for this company, call `RequestCertificateSetup`.
|
134
|
+
#
|
135
|
+
# ### Security Policies
|
136
|
+
#
|
137
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
138
138
|
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
139
|
-
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
140
|
-
# @param customerCode [String] The unique code representing this customer
|
141
|
-
# @param model [Object] The list of certificates to link to this customer
|
139
|
+
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
140
|
+
# @param customerCode [String] The unique code representing this customer
|
141
|
+
# @param model [Object] The list of certificates to link to this customer
|
142
142
|
# @return [FetchResult]
|
143
143
|
def link_certificates_to_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/link"
|
144
144
|
post(path, model) end
|
145
145
|
|
146
146
|
# Link two customer records together
|
147
147
|
#
|
148
|
-
# Links a Ship-To customer record with a Bill-To customer record.
|
149
|
-
#
|
150
|
-
# Customer records represent businesses or individuals who can provide exemption certificates. Some customers
|
151
|
-
# may have certificates that are linked to their shipping address or their billing address. To group these
|
152
|
-
# customer records together, you may link multiple bill-to and ship-to addresses together to represent a single
|
153
|
-
# entity that has multiple different addresses of different kinds.
|
154
|
-
#
|
155
|
-
# In general, a customer will have only one primary billing address and multiple ship-to addresses, representing
|
156
|
-
# all of the different locations where they receive goods. To facilitate this type of customer, you can send in
|
157
|
-
# one bill-to customer code and multiple ship-to customer codes in a single API call.
|
158
|
-
#
|
159
|
-
# Note that you can only link a ship-to customer record to a bill-to customer record. You may not link two customers
|
160
|
-
# of the same kind together.
|
161
|
-
#
|
162
|
-
# ### Security Policies
|
163
|
-
#
|
164
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
148
|
+
# Links a Ship-To customer record with a Bill-To customer record.
|
149
|
+
#
|
150
|
+
# Customer records represent businesses or individuals who can provide exemption certificates. Some customers
|
151
|
+
# may have certificates that are linked to their shipping address or their billing address. To group these
|
152
|
+
# customer records together, you may link multiple bill-to and ship-to addresses together to represent a single
|
153
|
+
# entity that has multiple different addresses of different kinds.
|
154
|
+
#
|
155
|
+
# In general, a customer will have only one primary billing address and multiple ship-to addresses, representing
|
156
|
+
# all of the different locations where they receive goods. To facilitate this type of customer, you can send in
|
157
|
+
# one bill-to customer code and multiple ship-to customer codes in a single API call.
|
158
|
+
#
|
159
|
+
# Note that you can only link a ship-to customer record to a bill-to customer record. You may not link two customers
|
160
|
+
# of the same kind together.
|
161
|
+
#
|
162
|
+
# ### Security Policies
|
163
|
+
#
|
164
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
165
165
|
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
166
|
-
# @param companyId [Integer] The unique ID number of the company defining customers.
|
167
|
-
# @param code [String] The code of the bill-to customer to link.
|
168
|
-
# @param model [Object] A list of information about ship-to customers to link to this bill-to customer.
|
166
|
+
# @param companyId [Integer] The unique ID number of the company defining customers.
|
167
|
+
# @param code [String] The code of the bill-to customer to link.
|
168
|
+
# @param model [Object] A list of information about ship-to customers to link to this bill-to customer.
|
169
169
|
# @return [Object]
|
170
170
|
def link_ship_to_customers_to_bill_customer(companyId, code, model) path = "/api/v2/companies/#{companyId}/customers/billto/#{code}/shipto/link"
|
171
171
|
post(path, model) end
|
172
172
|
|
173
173
|
# Retrieve a customer's attributes
|
174
174
|
#
|
175
|
-
# Retrieve the attributes linked to the customer identified by this URL.
|
176
|
-
#
|
177
|
-
# A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
|
178
|
-
# customer at any time. The full list of defined attributes may be found using `QueryCompanyCustomerAttributes` API.
|
179
|
-
#
|
180
|
-
# A customer object defines information about a person or business that purchases products from your
|
181
|
-
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
182
|
-
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
183
|
-
# identify any certificates linked to this customer object. If any certificate applies to the transaction,
|
184
|
-
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
185
|
-
#
|
186
|
-
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
187
|
-
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
188
|
-
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
189
|
-
# storage for this company, call `RequestCertificateSetup`.
|
190
|
-
#
|
191
|
-
# ### Security Policies
|
192
|
-
#
|
193
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
175
|
+
# Retrieve the attributes linked to the customer identified by this URL.
|
176
|
+
#
|
177
|
+
# A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
|
178
|
+
# customer at any time. The full list of defined attributes may be found using `QueryCompanyCustomerAttributes` API.
|
179
|
+
#
|
180
|
+
# A customer object defines information about a person or business that purchases products from your
|
181
|
+
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
182
|
+
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
183
|
+
# identify any certificates linked to this customer object. If any certificate applies to the transaction,
|
184
|
+
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
185
|
+
#
|
186
|
+
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
187
|
+
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
188
|
+
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
189
|
+
# storage for this company, call `RequestCertificateSetup`.
|
190
|
+
#
|
191
|
+
# ### Security Policies
|
192
|
+
#
|
193
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
194
194
|
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
195
|
-
# @param companyId [Integer] The unique ID number of the company that recorded the provided customer
|
196
|
-
# @param customerCode [String] The unique code representing the current customer
|
195
|
+
# @param companyId [Integer] The unique ID number of the company that recorded the provided customer
|
196
|
+
# @param customerCode [String] The unique code representing the current customer
|
197
197
|
# @return [FetchResult]
|
198
198
|
def list_attributes_for_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes"
|
199
199
|
get(path) end
|
200
200
|
|
201
201
|
# List certificates linked to a customer
|
202
202
|
#
|
203
|
-
# List all certificates linked to a customer.
|
204
|
-
#
|
205
|
-
# A customer object defines information about a person or business that purchases products from your
|
206
|
-
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
207
|
-
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
208
|
-
# identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
|
209
|
-
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
210
|
-
#
|
211
|
-
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
212
|
-
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
213
|
-
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
214
|
-
# storage for this company, call `RequestCertificateSetup`.
|
215
|
-
#
|
216
|
-
# ### Security Policies
|
217
|
-
#
|
218
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
203
|
+
# List all certificates linked to a customer.
|
204
|
+
#
|
205
|
+
# A customer object defines information about a person or business that purchases products from your
|
206
|
+
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
207
|
+
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
208
|
+
# identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
|
209
|
+
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
210
|
+
#
|
211
|
+
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
212
|
+
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
213
|
+
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
214
|
+
# storage for this company, call `RequestCertificateSetup`.
|
215
|
+
#
|
216
|
+
# ### Security Policies
|
217
|
+
#
|
218
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
219
219
|
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
220
|
-
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
221
|
-
# @param customerCode [String] The unique code representing this customer
|
222
|
-
# @param include [String] OPTIONAL: A comma separated list of special fetch options. You can specify one or more of the following: * customers - Retrieves the list of customers linked to the certificate. * po_numbers - Retrieves all PO numbers tied to the certificate. * attributes - Retrieves all attributes applied to the certificate.
|
223
|
-
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* exemptionNumber, status, ecmsId, ecmsStatus, pdf, pages
|
224
|
-
# @param top [Integer] 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.
|
225
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
226
|
-
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
220
|
+
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
221
|
+
# @param customerCode [String] The unique code representing this customer
|
222
|
+
# @param include [String] OPTIONAL: A comma separated list of special fetch options. You can specify one or more of the following: * customers - Retrieves the list of customers linked to the certificate. * po_numbers - Retrieves all PO numbers tied to the certificate. * attributes - Retrieves all attributes applied to the certificate.
|
223
|
+
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* exemptionNumber, status, ecmsId, ecmsStatus, pdf, pages
|
224
|
+
# @param top [Integer] 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.
|
225
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
226
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
227
227
|
# @return [FetchResult]
|
228
228
|
def list_certificates_for_customer(companyId, customerCode, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates"
|
229
229
|
get(path, options) end
|
230
230
|
|
231
231
|
# List valid certificates for a location
|
232
232
|
#
|
233
|
-
# List valid certificates linked to a customer in a particular country and region.
|
234
|
-
#
|
235
|
-
# This API is intended to help identify whether a customer has already provided a certificate that
|
236
|
-
# applies to a particular country and region. This API is intended to help you remind a customer
|
237
|
-
# when they have or have not provided copies of their exemption certificates to you during the sales
|
238
|
-
# order process.
|
239
|
-
#
|
240
|
-
# If a customer does not have a certificate on file and they wish to provide one, you should send the customer
|
241
|
-
# a CertExpress invitation link so that the customer can upload proof of their exemption certificate. Please
|
242
|
-
# see the `CreateCertExpressInvitation` API to create an invitation link for this customer.
|
243
|
-
#
|
244
|
-
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
245
|
-
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
246
|
-
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
247
|
-
# storage for this company, call `RequestCertificateSetup`.
|
248
|
-
#
|
249
|
-
# ### Security Policies
|
250
|
-
#
|
251
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
233
|
+
# List valid certificates linked to a customer in a particular country and region.
|
234
|
+
#
|
235
|
+
# This API is intended to help identify whether a customer has already provided a certificate that
|
236
|
+
# applies to a particular country and region. This API is intended to help you remind a customer
|
237
|
+
# when they have or have not provided copies of their exemption certificates to you during the sales
|
238
|
+
# order process.
|
239
|
+
#
|
240
|
+
# If a customer does not have a certificate on file and they wish to provide one, you should send the customer
|
241
|
+
# a CertExpress invitation link so that the customer can upload proof of their exemption certificate. Please
|
242
|
+
# see the `CreateCertExpressInvitation` API to create an invitation link for this customer.
|
243
|
+
#
|
244
|
+
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
245
|
+
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
246
|
+
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
247
|
+
# storage for this company, call `RequestCertificateSetup`.
|
248
|
+
#
|
249
|
+
# ### Security Policies
|
250
|
+
#
|
251
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
252
252
|
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
253
|
-
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
254
|
-
# @param customerCode [String] The unique code representing this customer
|
255
|
-
# @param country [String] Search for certificates matching this country. Uses the ISO 3166 two character country code.
|
256
|
-
# @param region [String] Search for certificates matching this region. Uses the ISO 3166 two or three character state, region, or province code.
|
253
|
+
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
254
|
+
# @param customerCode [String] The unique code representing this customer
|
255
|
+
# @param country [String] Search for certificates matching this country. Uses the ISO 3166 two character country code.
|
256
|
+
# @param region [String] Search for certificates matching this region. Uses the ISO 3166 two or three character state, region, or province code.
|
257
257
|
# @return [Object]
|
258
258
|
def list_valid_certificates_for_customer(companyId, customerCode, country, region) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/#{country}/#{region}"
|
259
259
|
get(path) end
|
260
260
|
|
261
261
|
# List all customers for this company
|
262
262
|
#
|
263
|
-
# List all customers recorded by this company matching the specified criteria.
|
264
|
-
#
|
265
|
-
# A customer object defines information about a person or business that purchases products from your
|
266
|
-
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
267
|
-
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
268
|
-
# identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
|
269
|
-
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
270
|
-
#
|
271
|
-
# You can use the `$include` parameter to fetch the following additional objects for expansion:
|
272
|
-
#
|
273
|
-
# * Certificates - Fetch a list of certificates linked to this customer.
|
274
|
-
# * attributes - Retrieves all attributes applied to the customer.
|
275
|
-
#
|
276
|
-
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
277
|
-
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
278
|
-
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
279
|
-
# storage for this company, call `RequestCertificateSetup`.
|
280
|
-
#
|
281
|
-
# ### Security Policies
|
282
|
-
#
|
283
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
263
|
+
# List all customers recorded by this company matching the specified criteria.
|
264
|
+
#
|
265
|
+
# A customer object defines information about a person or business that purchases products from your
|
266
|
+
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
267
|
+
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
268
|
+
# identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
|
269
|
+
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
270
|
+
#
|
271
|
+
# You can use the `$include` parameter to fetch the following additional objects for expansion:
|
272
|
+
#
|
273
|
+
# * Certificates - Fetch a list of certificates linked to this customer.
|
274
|
+
# * attributes - Retrieves all attributes applied to the customer.
|
275
|
+
#
|
276
|
+
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
277
|
+
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
278
|
+
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
279
|
+
# storage for this company, call `RequestCertificateSetup`.
|
280
|
+
#
|
281
|
+
# ### Security Policies
|
282
|
+
#
|
283
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
284
284
|
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
285
|
-
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
286
|
-
# @param include [String] OPTIONAL - You can specify the value `certificates` to fetch information about certificates linked to the customer.
|
287
|
-
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* shipTos
|
288
|
-
# @param top [Integer] 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.
|
289
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
290
|
-
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
285
|
+
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
286
|
+
# @param include [String] OPTIONAL - You can specify the value `certificates` to fetch information about certificates linked to the customer.
|
287
|
+
# @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).<br />*Not filterable:* shipTos
|
288
|
+
# @param top [Integer] 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.
|
289
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
290
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
291
291
|
# @return [FetchResult]
|
292
292
|
def query_customers(companyId, options={}) path = "/api/v2/companies/#{companyId}/customers"
|
293
293
|
get(path, options) end
|
294
294
|
|
295
295
|
# Unlink attributes from a customer
|
296
296
|
#
|
297
|
-
# Unlink one or many attributes from a customer.
|
298
|
-
#
|
299
|
-
# A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
|
300
|
-
# customer at any time. The full list of defined attributes may be found using `QueryCompanyCustomerAttributes` API.
|
301
|
-
#
|
302
|
-
# A customer object defines information about a person or business that purchases products from your
|
303
|
-
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
304
|
-
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
305
|
-
# identify any certificates linked to this customer object. If any certificate applies to the transaction,
|
306
|
-
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
307
|
-
#
|
308
|
-
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
309
|
-
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
310
|
-
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
311
|
-
# storage for this company, call `RequestCertificateSetup`.
|
312
|
-
#
|
313
|
-
# ### Security Policies
|
314
|
-
#
|
315
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
297
|
+
# Unlink one or many attributes from a customer.
|
298
|
+
#
|
299
|
+
# A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
|
300
|
+
# customer at any time. The full list of defined attributes may be found using `QueryCompanyCustomerAttributes` API.
|
301
|
+
#
|
302
|
+
# A customer object defines information about a person or business that purchases products from your
|
303
|
+
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
304
|
+
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
305
|
+
# identify any certificates linked to this customer object. If any certificate applies to the transaction,
|
306
|
+
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
307
|
+
#
|
308
|
+
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
309
|
+
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
310
|
+
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
311
|
+
# storage for this company, call `RequestCertificateSetup`.
|
312
|
+
#
|
313
|
+
# ### Security Policies
|
314
|
+
#
|
315
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
316
316
|
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
317
|
-
# @param companyId [Integer] The unique ID number of the company that recorded the customer
|
318
|
-
# @param customerCode [String] The unique code representing the current customer
|
319
|
-
# @param model [CustomerAttributeModel[]] The list of attributes to unlink from the customer.
|
317
|
+
# @param companyId [Integer] The unique ID number of the company that recorded the customer
|
318
|
+
# @param customerCode [String] The unique code representing the current customer
|
319
|
+
# @param model [CustomerAttributeModel[]] The list of attributes to unlink from the customer.
|
320
320
|
# @return [FetchResult]
|
321
321
|
def unlink_attributes_from_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/unlink"
|
322
322
|
put(path, model) end
|
323
323
|
|
324
324
|
# Unlink certificates from a customer
|
325
325
|
#
|
326
|
-
# Remove one or more certificates to a customer.
|
327
|
-
#
|
328
|
-
# A customer object defines information about a person or business that purchases products from your
|
329
|
-
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
330
|
-
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
331
|
-
# identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
|
332
|
-
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
333
|
-
#
|
334
|
-
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
335
|
-
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
336
|
-
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
337
|
-
# storage for this company, call `RequestCertificateSetup`.
|
338
|
-
#
|
339
|
-
# ### Security Policies
|
340
|
-
#
|
341
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
326
|
+
# Remove one or more certificates to a customer.
|
327
|
+
#
|
328
|
+
# A customer object defines information about a person or business that purchases products from your
|
329
|
+
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
330
|
+
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
331
|
+
# identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
|
332
|
+
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
333
|
+
#
|
334
|
+
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
335
|
+
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
336
|
+
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
337
|
+
# storage for this company, call `RequestCertificateSetup`.
|
338
|
+
#
|
339
|
+
# ### Security Policies
|
340
|
+
#
|
341
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
342
342
|
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
343
|
-
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
344
|
-
# @param customerCode [String] The unique code representing this customer
|
345
|
-
# @param model [Object] The list of certificates to link to this customer
|
343
|
+
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
344
|
+
# @param customerCode [String] The unique code representing this customer
|
345
|
+
# @param model [Object] The list of certificates to link to this customer
|
346
346
|
# @return [FetchResult]
|
347
347
|
def unlink_certificates_from_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/unlink"
|
348
348
|
post(path, model) end
|
349
349
|
|
350
350
|
# Update a single customer
|
351
351
|
#
|
352
|
-
# Replace the customer object at this URL with a new record.
|
353
|
-
#
|
354
|
-
# A customer object defines information about a person or business that purchases products from your
|
355
|
-
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
356
|
-
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
357
|
-
# identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
|
358
|
-
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
359
|
-
#
|
360
|
-
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
361
|
-
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
362
|
-
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
363
|
-
# storage for this company, call `RequestCertificateSetup`.
|
364
|
-
#
|
365
|
-
# ### Security Policies
|
366
|
-
#
|
367
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
352
|
+
# Replace the customer object at this URL with a new record.
|
353
|
+
#
|
354
|
+
# A customer object defines information about a person or business that purchases products from your
|
355
|
+
# company. When you create a tax transaction in AvaTax, you can use the `customerCode` from this
|
356
|
+
# record in your `CreateTransaction` API call. AvaTax will search for this `customerCode` value and
|
357
|
+
# identify any certificates linked to this `customer` object. If any certificate applies to the transaction,
|
358
|
+
# AvaTax will record the appropriate elements of the transaction as exempt and link it to the `certificate`.
|
359
|
+
#
|
360
|
+
# Using exemption certificates endpoints requires setup of an auditable document storage for each company that will use certificates.
|
361
|
+
# Companies that do not have this storage system set up will receive the error `CertCaptureNotConfiguredError` when they call exemption
|
362
|
+
# certificate related APIs. To check if this company is set up, call `GetCertificateSetup`. To request setup of the auditable document
|
363
|
+
# storage for this company, call `RequestCertificateSetup`.
|
364
|
+
#
|
365
|
+
# ### Security Policies
|
366
|
+
#
|
367
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
368
368
|
# * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
|
369
|
-
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
370
|
-
# @param customerCode [String] The unique code representing this customer
|
371
|
-
# @param model [Object] The new customer model that will replace the existing record at this URL
|
369
|
+
# @param companyId [Integer] The unique ID number of the company that recorded this customer
|
370
|
+
# @param customerCode [String] The unique code representing this customer
|
371
|
+
# @param model [Object] The new customer model that will replace the existing record at this URL
|
372
372
|
# @return [Object]
|
373
373
|
def update_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
|
374
374
|
put(path, model) end
|