avatax 21.8.0 → 22.2.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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +55 -55
  3. data/.rspec +1 -1
  4. data/.travis.yml +18 -18
  5. data/.vs/VSWorkspaceState.json +5 -5
  6. data/.yardopts +4 -4
  7. data/Gemfile +2 -2
  8. data/LICENSE +201 -201
  9. data/README.md +98 -98
  10. data/Rakefile +9 -9
  11. data/avatax.gemspec +38 -38
  12. data/example/avatax.rb +47 -47
  13. data/example/credentials.example.yaml +5 -5
  14. data/lib/avatax/api.rb +27 -27
  15. data/lib/avatax/client/accounts.rb +94 -83
  16. data/lib/avatax/client/addresses.rb +22 -20
  17. data/lib/avatax/client/advancedrules.rb +46 -41
  18. data/lib/avatax/client/ageverification.rb +29 -0
  19. data/lib/avatax/client/avafileforms.rb +46 -41
  20. data/lib/avatax/client/batches.rb +70 -62
  21. data/lib/avatax/client/certexpressinvites.rb +30 -27
  22. data/lib/avatax/client/certificates.rb +126 -111
  23. data/lib/avatax/client/companies.rb +192 -152
  24. data/lib/avatax/client/compliance.rb +25 -14
  25. data/lib/avatax/client/contacts.rb +54 -48
  26. data/lib/avatax/client/customers.rb +110 -97
  27. data/lib/avatax/client/datasources.rb +54 -48
  28. data/lib/avatax/client/definitions.rb +620 -446
  29. data/lib/avatax/client/distancethresholds.rb +54 -48
  30. data/lib/avatax/client/ecms.rb +73 -73
  31. data/lib/avatax/client/ecommercetoken.rb +20 -18
  32. data/lib/avatax/client/errortransactions.rb +61 -61
  33. data/lib/avatax/client/filingcalendars.rb +44 -20
  34. data/lib/avatax/client/filings.rb +24 -20
  35. data/lib/avatax/client/firmclientlinkages.rb +78 -69
  36. data/lib/avatax/client/free.rb +14 -13
  37. data/lib/avatax/client/fundingrequests.rb +22 -20
  38. data/lib/avatax/client/items.rb +206 -181
  39. data/lib/avatax/client/jurisdictionoverrides.rb +54 -48
  40. data/lib/avatax/client/locations.rb +102 -90
  41. data/lib/avatax/client/multidocument.rb +86 -76
  42. data/lib/avatax/client/nexus.rb +146 -103
  43. data/lib/avatax/client/notices.rb +30 -26
  44. data/lib/avatax/client/notifications.rb +30 -27
  45. data/lib/avatax/client/onboarding.rb +55 -55
  46. data/lib/avatax/client/pointofsale.rb +21 -21
  47. data/lib/avatax/client/provisioning.rb +22 -20
  48. data/lib/avatax/client/registrar.rb +94 -83
  49. data/lib/avatax/client/reports.rb +38 -34
  50. data/lib/avatax/client/settings.rb +54 -48
  51. data/lib/avatax/client/shippingverification.rb +66 -0
  52. data/lib/avatax/client/subscriptions.rb +30 -27
  53. data/lib/avatax/client/taxcodes.rb +54 -48
  54. data/lib/avatax/client/taxcontent.rb +46 -41
  55. data/lib/avatax/client/taxprofiles.rb +42 -42
  56. data/lib/avatax/client/taxrules.rb +56 -50
  57. data/lib/avatax/client/transactions.rb +174 -153
  58. data/lib/avatax/client/upcs.rb +54 -48
  59. data/lib/avatax/client/userdefinedfields.rb +52 -0
  60. data/lib/avatax/client/users.rb +70 -62
  61. data/lib/avatax/client/utilities.rb +30 -27
  62. data/lib/avatax/client.rb +37 -35
  63. data/lib/avatax/configuration.rb +76 -76
  64. data/lib/avatax/connection.rb +49 -49
  65. data/lib/avatax/request.rb +51 -42
  66. data/lib/avatax/version.rb +3 -3
  67. data/lib/avatax.rb +26 -26
  68. data/spec/avatax/client/accounts_spec.rb +13 -13
  69. data/spec/avatax/client/transactions_spec.rb +80 -80
  70. data/spec/avatax/request_spec.rb +25 -25
  71. data/spec/avatax_spec.rb +45 -45
  72. data/spec/credentials.yaml.example +4 -4
  73. data/spec/fixtures/accounts.json +15 -15
  74. data/spec/spec_helper.rb +27 -27
  75. metadata +9 -13
@@ -1,53 +1,56 @@
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
+ # Swagger Name: AvaTaxClient
15
16
  # @param companyId [Integer] The ID of the company that owns this contact.
16
17
  # @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
- #
18
+ # @return [ContactModel[]]
19
+ def create_contacts(companyId, model) path = "/api/v2/companies/#{companyId}/contacts"
20
+ post(path, model, {}, "22.2.0") end
21
+
22
+ # Delete a single contact
23
+ #
23
24
  # Mark the existing contact object at this URL as deleted.
24
25
  #
25
26
  # ### Security Policies
26
27
  #
27
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
28
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
29
+ # Swagger Name: AvaTaxClient
28
30
  # @param companyId [Integer] The ID of the company that owns this contact.
29
31
  # @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
- #
32
+ # @return [ErrorDetail[]]
33
+ def delete_contact(companyId, id) path = "/api/v2/companies/#{companyId}/contacts/#{id}"
34
+ delete(path, {}, "22.2.0") end
35
+
36
+ # Retrieve a single contact
37
+ #
36
38
  # Get the contact object identified by this URL.
37
39
  # A 'contact' is a person associated with a company who is designated to handle certain responsibilities of
38
40
  # a tax collecting and filing entity.
39
41
  #
40
42
  # ### Security Policies
41
43
  #
42
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
44
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
45
+ # Swagger Name: AvaTaxClient
43
46
  # @param companyId [Integer] The ID of the company for this contact
44
47
  # @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
- #
48
+ # @return [Object]
49
+ def get_contact(companyId, id) path = "/api/v2/companies/#{companyId}/contacts/#{id}"
50
+ get(path, {}, "22.2.0") end
51
+
52
+ # Retrieve contacts for this company
53
+ #
51
54
  # List all contact objects assigned to this company.
52
55
  #
53
56
  # 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 +58,19 @@ module AvaTax
55
58
  #
56
59
  # ### Security Policies
57
60
  #
58
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
61
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
62
+ # Swagger Name: AvaTaxClient
59
63
  # @param companyId [Integer] The ID of the company that owns these contacts
60
64
  # @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
65
  # @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
66
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
63
67
  # @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
- #
68
+ # @return [FetchResult]
69
+ def list_contacts_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/contacts"
70
+ get(path, options, "22.2.0") end
71
+
72
+ # Retrieve all contacts
73
+ #
70
74
  # Get multiple contact objects across all companies.
71
75
  # A 'contact' is a person associated with a company who is designated to handle certain responsibilities of
72
76
  # a tax collecting and filing entity.
@@ -76,17 +80,18 @@ module AvaTax
76
80
  #
77
81
  # ### Security Policies
78
82
  #
79
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
83
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
84
+ # Swagger Name: AvaTaxClient
80
85
  # @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
86
  # @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
87
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
83
88
  # @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
- #
89
+ # @return [FetchResult]
90
+ def query_contacts(options={}) path = "/api/v2/contacts"
91
+ get(path, options, "22.2.0") end
92
+
93
+ # Update a single contact
94
+ #
90
95
  # Replace the existing contact object at this URL with an updated object.
91
96
  # A 'contact' is a person associated with a company who is designated to handle certain responsibilities of
92
97
  # a tax collecting and filing entity.
@@ -95,13 +100,14 @@ module AvaTax
95
100
  #
96
101
  # ### Security Policies
97
102
  #
98
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
103
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin.
104
+ # Swagger Name: AvaTaxClient
99
105
  # @param companyId [Integer] The ID of the company that this contact belongs to.
100
106
  # @param id [Integer] The ID of the contact you wish to update
101
107
  # @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
108
+ # @return [Object]
109
+ def update_contact(companyId, id, model) path = "/api/v2/companies/#{companyId}/contacts/#{id}"
110
+ put(path, model, {}, "22.2.0") end
111
+ end
112
+ end
107
113
  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,16 @@ 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:*Required* (all): AvaTaxPro.
27
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
28
+ # Swagger Name: AvaTaxClient
28
29
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
29
30
  # @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
- #
31
+ # @return [CustomerModel[]]
32
+ def create_customers(companyId, model) path = "/api/v2/companies/#{companyId}/customers"
33
+ post(path, model, {}, "22.2.0") end
34
+
35
+ # Delete a customer record
36
+ #
36
37
  # Deletes the customer object referenced by this URL.
37
38
  #
38
39
  # A customer object defines information about a person or business that purchases products from your
@@ -49,15 +50,16 @@ module AvaTax
49
50
  # ### Security Policies
50
51
  #
51
52
  # * 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:*Required* (all): AvaTaxPro.
53
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
54
+ # Swagger Name: AvaTaxClient
53
55
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
54
56
  # @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
- #
57
+ # @return [Object]
58
+ def delete_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
59
+ delete(path, {}, "22.2.0") end
60
+
61
+ # Retrieve a single customer
62
+ #
61
63
  # Retrieve the customer identified by this URL.
62
64
  #
63
65
  # A customer object defines information about a person or business that purchases products from your
@@ -80,16 +82,17 @@ module AvaTax
80
82
  # ### Security Policies
81
83
  #
82
84
  # * 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:*Required* (all): AvaTaxPro.
85
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
86
+ # Swagger Name: AvaTaxClient
84
87
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
85
88
  # @param customerCode [String] The unique code representing this customer
86
89
  # @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
- #
90
+ # @return [Object]
91
+ def get_customer(companyId, customerCode, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
92
+ get(path, options, "22.2.0") end
93
+
94
+ # Link attributes to a customer
95
+ #
93
96
  # Link one or many attributes to a customer.
94
97
  #
95
98
  # A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
@@ -109,16 +112,17 @@ module AvaTax
109
112
  # ### Security Policies
110
113
  #
111
114
  # * 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:*Required* (all): AvaTaxPro.
115
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
116
+ # Swagger Name: AvaTaxClient
113
117
  # @param companyId [Integer] The unique ID number of the company that recorded the provided customer
114
118
  # @param customerCode [String] The unique code representing the current customer
115
119
  # @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
- #
120
+ # @return [FetchResult]
121
+ def link_attributes_to_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/link"
122
+ put(path, model, {}, "22.2.0") end
123
+
124
+ # Link certificates to a customer
125
+ #
122
126
  # Link one or more certificates to a customer.
123
127
  #
124
128
  # A customer object defines information about a person or business that purchases products from your
@@ -135,16 +139,17 @@ module AvaTax
135
139
  # ### Security Policies
136
140
  #
137
141
  # * 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:*Required* (all): AvaTaxPro.
142
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
143
+ # Swagger Name: AvaTaxClient
139
144
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
140
145
  # @param customerCode [String] The unique code representing this customer
141
146
  # @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
- #
147
+ # @return [FetchResult]
148
+ def link_certificates_to_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/link"
149
+ post(path, model, {}, "22.2.0") end
150
+
151
+ # Link two customer records together
152
+ #
148
153
  # Links a Ship-To customer record with a Bill-To customer record.
149
154
  #
150
155
  # Customer records represent businesses or individuals who can provide exemption certificates. Some customers
@@ -162,16 +167,17 @@ module AvaTax
162
167
  # ### Security Policies
163
168
  #
164
169
  # * 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:*Required* (all): AvaTaxPro.
170
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
171
+ # Swagger Name: AvaTaxClient
166
172
  # @param companyId [Integer] The unique ID number of the company defining customers.
167
173
  # @param code [String] The code of the bill-to customer to link.
168
174
  # @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
- #
175
+ # @return [Object]
176
+ def link_ship_to_customers_to_bill_customer(companyId, code, model) path = "/api/v2/companies/#{companyId}/customers/billto/#{code}/shipto/link"
177
+ post(path, model, {}, "22.2.0") end
178
+
179
+ # Retrieve a customer's attributes
180
+ #
175
181
  # Retrieve the attributes linked to the customer identified by this URL.
176
182
  #
177
183
  # A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
@@ -191,15 +197,16 @@ module AvaTax
191
197
  # ### Security Policies
192
198
  #
193
199
  # * 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:*Required* (all): AvaTaxPro.
200
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
201
+ # Swagger Name: AvaTaxClient
195
202
  # @param companyId [Integer] The unique ID number of the company that recorded the provided customer
196
203
  # @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
- #
204
+ # @return [FetchResult]
205
+ def list_attributes_for_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes"
206
+ get(path, {}, "22.2.0") end
207
+
208
+ # List certificates linked to a customer
209
+ #
203
210
  # List all certificates linked to a customer.
204
211
  #
205
212
  # A customer object defines information about a person or business that purchases products from your
@@ -216,7 +223,8 @@ module AvaTax
216
223
  # ### Security Policies
217
224
  #
218
225
  # * 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:*Required* (all): AvaTaxPro.
226
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
227
+ # Swagger Name: AvaTaxClient
220
228
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
221
229
  # @param customerCode [String] The unique code representing this customer
222
230
  # @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 +232,12 @@ module AvaTax
224
232
  # @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
233
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
226
234
  # @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
- #
235
+ # @return [FetchResult]
236
+ def list_certificates_for_customer(companyId, customerCode, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates"
237
+ get(path, options, "22.2.0") end
238
+
239
+ # List valid certificates for a location
240
+ #
233
241
  # List valid certificates linked to a customer in a particular country and region.
234
242
  #
235
243
  # This API is intended to help identify whether a customer has already provided a certificate that
@@ -249,17 +257,18 @@ module AvaTax
249
257
  # ### Security Policies
250
258
  #
251
259
  # * 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:*Required* (all): AvaTaxPro.
260
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
261
+ # Swagger Name: AvaTaxClient
253
262
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
254
263
  # @param customerCode [String] The unique code representing this customer
255
264
  # @param country [String] Search for certificates matching this country. Uses the ISO 3166 two character country code.
256
265
  # @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
- #
266
+ # @return [Object]
267
+ def list_valid_certificates_for_customer(companyId, customerCode, country, region) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/#{country}/#{region}"
268
+ get(path, {}, "22.2.0") end
269
+
270
+ # List all customers for this company
271
+ #
263
272
  # List all customers recorded by this company matching the specified criteria.
264
273
  #
265
274
  # A customer object defines information about a person or business that purchases products from your
@@ -281,19 +290,20 @@ module AvaTax
281
290
  # ### Security Policies
282
291
  #
283
292
  # * 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:*Required* (all): AvaTaxPro.
293
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
294
+ # Swagger Name: AvaTaxClient
285
295
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
286
296
  # @param include [String] OPTIONAL - You can specify the value `certificates` to fetch information about certificates linked to the customer.
287
297
  # @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
298
  # @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
299
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
290
300
  # @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
- #
301
+ # @return [FetchResult]
302
+ def query_customers(companyId, options={}) path = "/api/v2/companies/#{companyId}/customers"
303
+ get(path, options, "22.2.0") end
304
+
305
+ # Unlink attributes from a customer
306
+ #
297
307
  # Unlink one or many attributes from a customer.
298
308
  #
299
309
  # A customer may have multiple attributes that control its behavior. You may link or unlink attributes to a
@@ -313,16 +323,17 @@ module AvaTax
313
323
  # ### Security Policies
314
324
  #
315
325
  # * 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:*Required* (all): AvaTaxPro.
326
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
327
+ # Swagger Name: AvaTaxClient
317
328
  # @param companyId [Integer] The unique ID number of the company that recorded the customer
318
329
  # @param customerCode [String] The unique code representing the current customer
319
330
  # @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
- #
331
+ # @return [FetchResult]
332
+ def unlink_attributes_from_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/unlink"
333
+ put(path, model, {}, "22.2.0") end
334
+
335
+ # Unlink certificates from a customer
336
+ #
326
337
  # Remove one or more certificates to a customer.
327
338
  #
328
339
  # A customer object defines information about a person or business that purchases products from your
@@ -339,16 +350,17 @@ module AvaTax
339
350
  # ### Security Policies
340
351
  #
341
352
  # * 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:*Required* (all): AvaTaxPro.
353
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
354
+ # Swagger Name: AvaTaxClient
343
355
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
344
356
  # @param customerCode [String] The unique code representing this customer
345
357
  # @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
- #
358
+ # @return [FetchResult]
359
+ def unlink_certificates_from_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/unlink"
360
+ post(path, model, {}, "22.2.0") end
361
+
362
+ # Update a single customer
363
+ #
352
364
  # Replace the customer object at this URL with a new record.
353
365
  #
354
366
  # A customer object defines information about a person or business that purchases products from your
@@ -365,13 +377,14 @@ module AvaTax
365
377
  # ### Security Policies
366
378
  #
367
379
  # * 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:*Required* (all): AvaTaxPro.
380
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro.
381
+ # Swagger Name: AvaTaxClient
369
382
  # @param companyId [Integer] The unique ID number of the company that recorded this customer
370
383
  # @param customerCode [String] The unique code representing this customer
371
384
  # @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
385
+ # @return [Object]
386
+ def update_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}"
387
+ put(path, model, {}, "22.2.0") end
388
+ end
389
+ end
377
390
  end