avatax 20.5.0 → 20.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avatax/client/accounts.rb +116 -83
  3. data/lib/avatax/client/addresses.rb +26 -20
  4. data/lib/avatax/client/advancedrules.rb +56 -41
  5. data/lib/avatax/client/avafileforms.rb +56 -41
  6. data/lib/avatax/client/batches.rb +125 -48
  7. data/lib/avatax/client/certexpressinvites.rb +36 -27
  8. data/lib/avatax/client/certificates.rb +156 -111
  9. data/lib/avatax/client/companies.rb +166 -118
  10. data/lib/avatax/client/compliance.rb +16 -13
  11. data/lib/avatax/client/contacts.rb +66 -48
  12. data/lib/avatax/client/customers.rb +136 -97
  13. data/lib/avatax/client/datasources.rb +66 -48
  14. data/lib/avatax/client/definitions.rb +596 -419
  15. data/lib/avatax/client/distancethresholds.rb +66 -48
  16. data/lib/avatax/client/filingcalendars.rb +16 -13
  17. data/lib/avatax/client/filings.rb +16 -13
  18. data/lib/avatax/client/firmclientlinkages.rb +96 -69
  19. data/lib/avatax/client/free.rb +36 -27
  20. data/lib/avatax/client/fundingrequests.rb +26 -20
  21. data/lib/avatax/client/items.rb +196 -139
  22. data/lib/avatax/client/jurisdictionoverrides.rb +66 -48
  23. data/lib/avatax/client/locations.rb +76 -55
  24. data/lib/avatax/client/multidocument.rb +106 -76
  25. data/lib/avatax/client/nexus.rb +82 -183
  26. data/lib/avatax/client/notifications.rb +36 -27
  27. data/lib/avatax/client/provisioning.rb +26 -20
  28. data/lib/avatax/client/registrar.rb +106 -76
  29. data/lib/avatax/client/reports.rb +46 -34
  30. data/lib/avatax/client/settings.rb +66 -48
  31. data/lib/avatax/client/subscriptions.rb +36 -27
  32. data/lib/avatax/client/taxcodes.rb +66 -48
  33. data/lib/avatax/client/taxcontent.rb +36 -27
  34. data/lib/avatax/client/taxrules.rb +66 -48
  35. data/lib/avatax/client/transactions.rb +216 -153
  36. data/lib/avatax/client/upcs.rb +66 -48
  37. data/lib/avatax/client/users.rb +86 -62
  38. data/lib/avatax/client/utilities.rb +36 -27
  39. data/lib/avatax/version.rb +1 -1
  40. metadata +2 -2
@@ -1,16 +1,19 @@
1
- module AvaTax
2
- class Client
3
- module Compliance
4
-
5
-
6
- # API to modify the reference fields at the document and the line level.
7
- #
8
- #
1
+ module AvaTax
2
+ class Client
3
+ module Compliance
4
+
5
+
6
+ # API to modify the reference fields at the document and the line level.
7
+ #
8
+ #
9
9
  # @param companyId [Integer]
10
10
  # @param model [TransactionReferenceFieldModel[]]
11
- # @return [FetchResult]
12
- def tag_transaction(companyId, model) path = "/api/v2/companies/#{companyId}/transactions/tag"
13
- put(path, model) end
14
- end
15
- end
11
+ # @return [FetchResult]
12
+ def tag_transaction(companyId, model)
13
+ path = "/api/v2/companies/#{companyId}/transactions/tag"
14
+ put(path, model)
15
+ end
16
+
17
+ end
18
+ end
16
19
  end
@@ -1,53 +1,62 @@
1
- module AvaTax
2
- class Client
3
- module Contacts
4
-
5
-
6
- # Create a new contact
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Contacts
4
+
5
+
6
+ # Create a new contact
7
+ #
8
8
  # Create one or more new contact objects.
9
9
  # A 'contact' is a person associated with a company who is designated to handle certain responsibilities of
10
10
  # a tax collecting and filing entity.
11
11
  #
12
12
  # ### Security Policies
13
13
  #
14
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
14
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
15
15
  # @param companyId [Integer] The ID of the company that owns this contact.
16
16
  # @param model [ContactModel[]] The contacts you wish to create.
17
- # @return [ContactModel[]]
18
- def create_contacts(companyId, model) path = "/api/v2/companies/#{companyId}/contacts"
19
- post(path, model) end
20
-
21
- # Delete a single contact
22
- #
17
+ # @return [ContactModel[]]
18
+ def create_contacts(companyId, model)
19
+ path = "/api/v2/companies/#{companyId}/contacts"
20
+ post(path, model)
21
+ end
22
+
23
+
24
+ # Delete a single contact
25
+ #
23
26
  # Mark the existing contact object at this URL as deleted.
24
27
  #
25
28
  # ### Security Policies
26
29
  #
27
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
30
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
28
31
  # @param companyId [Integer] The ID of the company that owns this contact.
29
32
  # @param id [Integer] The ID of the contact you wish to delete.
30
- # @return [ErrorDetail[]]
31
- def delete_contact(companyId, id) path = "/api/v2/companies/#{companyId}/contacts/#{id}"
32
- delete(path) end
33
-
34
- # Retrieve a single contact
35
- #
33
+ # @return [ErrorDetail[]]
34
+ def delete_contact(companyId, id)
35
+ path = "/api/v2/companies/#{companyId}/contacts/#{id}"
36
+ delete(path)
37
+ end
38
+
39
+
40
+ # Retrieve a single contact
41
+ #
36
42
  # Get the contact object identified by this URL.
37
43
  # A 'contact' is a person associated with a company who is designated to handle certain responsibilities of
38
44
  # a tax collecting and filing entity.
39
45
  #
40
46
  # ### Security Policies
41
47
  #
42
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
48
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
43
49
  # @param companyId [Integer] The ID of the company for this contact
44
50
  # @param id [Integer] The primary key of this contact
45
- # @return [Object]
46
- def get_contact(companyId, id) path = "/api/v2/companies/#{companyId}/contacts/#{id}"
47
- get(path) end
48
-
49
- # Retrieve contacts for this company
50
- #
51
+ # @return [Object]
52
+ def get_contact(companyId, id)
53
+ path = "/api/v2/companies/#{companyId}/contacts/#{id}"
54
+ get(path)
55
+ end
56
+
57
+
58
+ # Retrieve contacts for this company
59
+ #
51
60
  # List all contact objects assigned to this company.
52
61
  #
53
62
  # 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/) .
@@ -55,18 +64,21 @@ module AvaTax
55
64
  #
56
65
  # ### Security Policies
57
66
  #
58
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
67
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
59
68
  # @param companyId [Integer] The ID of the company that owns these contacts
60
69
  # @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
70
  # @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
71
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
63
72
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
64
- # @return [FetchResult]
65
- def list_contacts_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/contacts"
66
- get(path, options) end
67
-
68
- # Retrieve all contacts
69
- #
73
+ # @return [FetchResult]
74
+ def list_contacts_by_company(companyId, options={})
75
+ path = "/api/v2/companies/#{companyId}/contacts"
76
+ get(path, options)
77
+ end
78
+
79
+
80
+ # Retrieve all contacts
81
+ #
70
82
  # Get multiple contact objects across all companies.
71
83
  # A 'contact' is a person associated with a company who is designated to handle certain responsibilities of
72
84
  # a tax collecting and filing entity.
@@ -76,17 +88,20 @@ module AvaTax
76
88
  #
77
89
  # ### Security Policies
78
90
  #
79
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
91
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
80
92
  # @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
93
  # @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
94
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
83
95
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
84
- # @return [FetchResult]
85
- def query_contacts(options={}) path = "/api/v2/contacts"
86
- get(path, options) end
87
-
88
- # Update a single contact
89
- #
96
+ # @return [FetchResult]
97
+ def query_contacts(options={})
98
+ path = "/api/v2/contacts"
99
+ get(path, options)
100
+ end
101
+
102
+
103
+ # Update a single contact
104
+ #
90
105
  # Replace the existing contact object at this URL with an updated object.
91
106
  # A 'contact' is a person associated with a company who is designated to handle certain responsibilities of
92
107
  # a tax collecting and filing entity.
@@ -95,13 +110,16 @@ module AvaTax
95
110
  #
96
111
  # ### Security Policies
97
112
  #
98
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
113
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
99
114
  # @param companyId [Integer] The ID of the company that this contact belongs to.
100
115
  # @param id [Integer] The ID of the contact you wish to update
101
116
  # @param model [Object] The contact you wish to update.
102
- # @return [Object]
103
- def update_contact(companyId, id, model) path = "/api/v2/companies/#{companyId}/contacts/#{id}"
104
- put(path, model) end
105
- end
106
- end
117
+ # @return [Object]
118
+ def update_contact(companyId, id, model)
119
+ path = "/api/v2/companies/#{companyId}/contacts/#{id}"
120
+ put(path, model)
121
+ end
122
+
123
+ end
124
+ end
107
125
  end
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module Customers
4
-
5
-
6
- # Create customers for this company
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Customers
4
+
5
+
6
+ # Create customers for this company
7
+ #
8
8
  # Create one or more customers for this company.
9
9
  #
10
10
  # A customer object defines information about a person or business that purchases products from your
@@ -24,15 +24,18 @@ module AvaTax
24
24
  # ### Security Policies
25
25
  #
26
26
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
27
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
27
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
28
28
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
29
29
  # @param model [CustomerModel[]] The list of customer objects to be created
30
- # @return [CustomerModel[]]
31
- def create_customers(companyId, model) path = "/api/v2/companies/#{companyId}/customers"
32
- post(path, model) end
33
-
34
- # Delete a customer record
35
- #
30
+ # @return [CustomerModel[]]
31
+ def create_customers(companyId, model)
32
+ path = "/api/v2/companies/#{companyId}/customers"
33
+ post(path, model)
34
+ end
35
+
36
+
37
+ # Delete a customer record
38
+ #
36
39
  # Deletes the customer object referenced by this URL.
37
40
  #
38
41
  # A customer object defines information about a person or business that purchases products from your
@@ -49,15 +52,18 @@ module AvaTax
49
52
  # ### Security Policies
50
53
  #
51
54
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
52
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
55
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
53
56
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
54
57
  # @param customerCode [String] The unique code representing this customer
55
- # @return [Object]
56
- def delete_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
57
- delete(path) end
58
-
59
- # Retrieve a single customer
60
- #
58
+ # @return [Object]
59
+ def delete_customer(companyId, customerCode)
60
+ path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
61
+ delete(path)
62
+ end
63
+
64
+
65
+ # Retrieve a single customer
66
+ #
61
67
  # Retrieve the customer identified by this URL.
62
68
  #
63
69
  # A customer object defines information about a person or business that purchases products from your
@@ -80,16 +86,19 @@ module AvaTax
80
86
  # ### Security Policies
81
87
  #
82
88
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
83
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
89
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
84
90
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
85
91
  # @param customerCode [String] The unique code representing this customer
86
92
  # @param include [String] Specify optional additional objects to include in this fetch request
87
- # @return [Object]
88
- def get_customer(companyId, customerCode, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
89
- get(path, options) end
90
-
91
- # Link attributes to a customer
92
- #
93
+ # @return [Object]
94
+ def get_customer(companyId, customerCode, options={})
95
+ path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
96
+ get(path, options)
97
+ end
98
+
99
+
100
+ # Link attributes to a customer
101
+ #
93
102
  # Link one or many attributes to a customer.
94
103
  #
95
104
  # A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
@@ -109,16 +118,19 @@ module AvaTax
109
118
  # ### Security Policies
110
119
  #
111
120
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
112
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
121
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
113
122
  # @param companyId [Integer] The unique ID number of the company that recorded the provided customer
114
123
  # @param customerCode [String] The unique code representing the current customer
115
124
  # @param model [CustomerAttributeModel[]] The list of attributes to link to the customer.
116
- # @return [FetchResult]
117
- def link_attributes_to_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/link"
118
- put(path, model) end
119
-
120
- # Link certificates to a customer
121
- #
125
+ # @return [FetchResult]
126
+ def link_attributes_to_customer(companyId, customerCode, model)
127
+ path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/link"
128
+ put(path, model)
129
+ end
130
+
131
+
132
+ # Link certificates to a customer
133
+ #
122
134
  # Link one or more certificates to a customer.
123
135
  #
124
136
  # A customer object defines information about a person or business that purchases products from your
@@ -135,16 +147,19 @@ module AvaTax
135
147
  # ### Security Policies
136
148
  #
137
149
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
138
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
150
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
139
151
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
140
152
  # @param customerCode [String] The unique code representing this customer
141
153
  # @param model [Object] The list of certificates to link to this customer
142
- # @return [FetchResult]
143
- def link_certificates_to_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/link"
144
- post(path, model) end
145
-
146
- # Link two customer records together
147
- #
154
+ # @return [FetchResult]
155
+ def link_certificates_to_customer(companyId, customerCode, model)
156
+ path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/link"
157
+ post(path, model)
158
+ end
159
+
160
+
161
+ # Link two customer records together
162
+ #
148
163
  # Links a Ship-To customer record with a Bill-To customer record.
149
164
  #
150
165
  # Customer records represent businesses or individuals who can provide exemption certificates. Some customers
@@ -162,16 +177,19 @@ module AvaTax
162
177
  # ### Security Policies
163
178
  #
164
179
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
165
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
180
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
166
181
  # @param companyId [Integer] The unique ID number of the company defining customers.
167
182
  # @param code [String] The code of the bill-to customer to link.
168
183
  # @param model [Object] A list of information about ship-to customers to link to this bill-to customer.
169
- # @return [Object]
170
- def link_ship_to_customers_to_bill_customer(companyId, code, model) path = "/api/v2/companies/#{companyId}/customers/billto/#{code}/shipto/link"
171
- post(path, model) end
172
-
173
- # Retrieve a customer's attributes
174
- #
184
+ # @return [Object]
185
+ def link_ship_to_customers_to_bill_customer(companyId, code, model)
186
+ path = "/api/v2/companies/#{companyId}/customers/billto/#{code}/shipto/link"
187
+ post(path, model)
188
+ end
189
+
190
+
191
+ # Retrieve a customer's attributes
192
+ #
175
193
  # Retrieve the attributes linked to the customer identified by this URL.
176
194
  #
177
195
  # A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
@@ -191,15 +209,18 @@ module AvaTax
191
209
  # ### Security Policies
192
210
  #
193
211
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
194
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
212
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
195
213
  # @param companyId [Integer] The unique ID number of the company that recorded the provided customer
196
214
  # @param customerCode [String] The unique code representing the current customer
197
- # @return [FetchResult]
198
- def list_attributes_for_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes"
199
- get(path) end
200
-
201
- # List certificates linked to a customer
202
- #
215
+ # @return [FetchResult]
216
+ def list_attributes_for_customer(companyId, customerCode)
217
+ path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes"
218
+ get(path)
219
+ end
220
+
221
+
222
+ # List certificates linked to a customer
223
+ #
203
224
  # List all certificates linked to a customer.
204
225
  #
205
226
  # A customer object defines information about a person or business that purchases products from your
@@ -216,7 +237,7 @@ module AvaTax
216
237
  # ### Security Policies
217
238
  #
218
239
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
219
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
240
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
220
241
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
221
242
  # @param customerCode [String] The unique code representing this customer
222
243
  # @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.
@@ -224,12 +245,15 @@ module AvaTax
224
245
  # @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
246
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
226
247
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
227
- # @return [FetchResult]
228
- def list_certificates_for_customer(companyId, customerCode, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates"
229
- get(path, options) end
230
-
231
- # List valid certificates for a location
232
- #
248
+ # @return [FetchResult]
249
+ def list_certificates_for_customer(companyId, customerCode, options={})
250
+ path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates"
251
+ get(path, options)
252
+ end
253
+
254
+
255
+ # List valid certificates for a location
256
+ #
233
257
  # List valid certificates linked to a customer in a particular country and region.
234
258
  #
235
259
  # This API is intended to help identify whether a customer has already provided a certificate that
@@ -249,17 +273,20 @@ module AvaTax
249
273
  # ### Security Policies
250
274
  #
251
275
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
252
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
276
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
253
277
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
254
278
  # @param customerCode [String] The unique code representing this customer
255
279
  # @param country [String] Search for certificates matching this country. Uses the ISO 3166 two character country code.
256
280
  # @param region [String] Search for certificates matching this region. Uses the ISO 3166 two or three character state, region, or province code.
257
- # @return [Object]
258
- def list_valid_certificates_for_customer(companyId, customerCode, country, region) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/#{country}/#{region}"
259
- get(path) end
260
-
261
- # List all customers for this company
262
- #
281
+ # @return [Object]
282
+ def list_valid_certificates_for_customer(companyId, customerCode, country, region)
283
+ path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/#{country}/#{region}"
284
+ get(path)
285
+ end
286
+
287
+
288
+ # List all customers for this company
289
+ #
263
290
  # List all customers recorded by this company matching the specified criteria.
264
291
  #
265
292
  # A customer object defines information about a person or business that purchases products from your
@@ -281,19 +308,22 @@ module AvaTax
281
308
  # ### Security Policies
282
309
  #
283
310
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
284
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
311
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
285
312
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
286
313
  # @param include [String] OPTIONAL - You can specify the value `certificates` to fetch information about certificates linked to the customer.
287
314
  # @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
315
  # @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
316
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
290
317
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
291
- # @return [FetchResult]
292
- def query_customers(companyId, options={}) path = "/api/v2/companies/#{companyId}/customers"
293
- get(path, options) end
294
-
295
- # Unlink attributes from a customer
296
- #
318
+ # @return [FetchResult]
319
+ def query_customers(companyId, options={})
320
+ path = "/api/v2/companies/#{companyId}/customers"
321
+ get(path, options)
322
+ end
323
+
324
+
325
+ # Unlink attributes from a customer
326
+ #
297
327
  # Unlink one or many attributes from a customer.
298
328
  #
299
329
  # A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
@@ -313,16 +343,19 @@ module AvaTax
313
343
  # ### Security Policies
314
344
  #
315
345
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
316
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
346
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
317
347
  # @param companyId [Integer] The unique ID number of the company that recorded the customer
318
348
  # @param customerCode [String] The unique code representing the current customer
319
349
  # @param model [CustomerAttributeModel[]] The list of attributes to unlink from the customer.
320
- # @return [FetchResult]
321
- def unlink_attributes_from_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/unlink"
322
- put(path, model) end
323
-
324
- # Unlink certificates from a customer
325
- #
350
+ # @return [FetchResult]
351
+ def unlink_attributes_from_customer(companyId, customerCode, model)
352
+ path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/unlink"
353
+ put(path, model)
354
+ end
355
+
356
+
357
+ # Unlink certificates from a customer
358
+ #
326
359
  # Remove one or more certificates to a customer.
327
360
  #
328
361
  # A customer object defines information about a person or business that purchases products from your
@@ -339,16 +372,19 @@ module AvaTax
339
372
  # ### Security Policies
340
373
  #
341
374
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
342
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
375
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
343
376
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
344
377
  # @param customerCode [String] The unique code representing this customer
345
378
  # @param model [Object] The list of certificates to link to this customer
346
- # @return [FetchResult]
347
- def unlink_certificates_from_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/unlink"
348
- post(path, model) end
349
-
350
- # Update a single customer
351
- #
379
+ # @return [FetchResult]
380
+ def unlink_certificates_from_customer(companyId, customerCode, model)
381
+ path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/unlink"
382
+ post(path, model)
383
+ end
384
+
385
+
386
+ # Update a single customer
387
+ #
352
388
  # Replace the customer object at this URL with a new record.
353
389
  #
354
390
  # A customer object defines information about a person or business that purchases products from your
@@ -365,13 +401,16 @@ module AvaTax
365
401
  # ### Security Policies
366
402
  #
367
403
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin.
368
- # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
404
+ # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
369
405
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
370
406
  # @param customerCode [String] The unique code representing this customer
371
407
  # @param model [Object] The new customer model that will replace the existing record at this URL
372
- # @return [Object]
373
- def update_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
374
- put(path, model) end
375
- end
376
- end
408
+ # @return [Object]
409
+ def update_customer(companyId, customerCode, model)
410
+ path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
411
+ put(path, model)
412
+ end
413
+
414
+ end
415
+ end
377
416
  end