avatax 19.12.0 → 20.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +5 -5
  2. data/avatax.gemspec +0 -1
  3. data/lib/avatax/client/accounts.rb +269 -193
  4. data/lib/avatax/client/addresses.rb +60 -60
  5. data/lib/avatax/client/advancedrules.rb +81 -162
  6. data/lib/avatax/client/avafileforms.rb +93 -93
  7. data/lib/avatax/client/batches.rb +247 -188
  8. data/lib/avatax/client/certexpressinvites.rb +106 -106
  9. data/lib/avatax/client/certificates.rb +469 -469
  10. data/lib/avatax/client/companies.rb +400 -398
  11. data/lib/avatax/client/compliance.rb +18 -18
  12. data/lib/avatax/client/contacts.rb +124 -124
  13. data/lib/avatax/client/customers.rb +415 -415
  14. data/lib/avatax/client/datasources.rb +117 -117
  15. data/lib/avatax/client/definitions.rb +1039 -1007
  16. data/lib/avatax/client/distancethresholds.rb +140 -140
  17. data/lib/avatax/client/filingcalendars.rb +23 -508
  18. data/lib/avatax/client/filings.rb +29 -29
  19. data/lib/avatax/client/firmclientlinkages.rb +150 -150
  20. data/lib/avatax/client/free.rb +109 -109
  21. data/lib/avatax/client/fundingrequests.rb +58 -58
  22. data/lib/avatax/client/items.rb +480 -480
  23. data/lib/avatax/client/jurisdictionoverrides.rb +136 -136
  24. data/lib/avatax/client/locations.rb +163 -160
  25. data/lib/avatax/client/multidocument.rb +420 -340
  26. data/lib/avatax/client/nexus.rb +240 -225
  27. data/lib/avatax/client/notifications.rb +84 -84
  28. data/lib/avatax/client/provisioning.rb +55 -55
  29. data/lib/avatax/client/registrar.rb +228 -228
  30. data/lib/avatax/client/reports.rb +109 -109
  31. data/lib/avatax/client/settings.rb +174 -174
  32. data/lib/avatax/client/subscriptions.rb +71 -71
  33. data/lib/avatax/client/taxcodes.rb +138 -138
  34. data/lib/avatax/client/taxcontent.rb +142 -142
  35. data/lib/avatax/client/taxrules.rb +188 -188
  36. data/lib/avatax/client/transactions.rb +899 -854
  37. data/lib/avatax/client/upcs.rb +129 -129
  38. data/lib/avatax/client/users.rb +207 -207
  39. data/lib/avatax/client/utilities.rb +70 -70
  40. data/lib/avatax/connection.rb +3 -3
  41. data/lib/avatax/request.rb +2 -0
  42. data/lib/avatax/version.rb +1 -1
  43. metadata +4 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b637f1dd54c97433a714609cd502c11673859c6e
4
- data.tar.gz: de3eca665f208f074a9092f871b5afe9a9c548d7
2
+ SHA256:
3
+ metadata.gz: 8a3c2015349a64ef8875c8198e04f26a6cf2c0bd631328c9a2f885e4cf8e16e4
4
+ data.tar.gz: 7d086ee2c887b48680dc53a302a7cc1c0f3e116764695518124282ca9cc2cd21
5
5
  SHA512:
6
- metadata.gz: d2e0aed918e163c4c1c165e2e8959fe5ea48adb8ebd715822fda007b3f0d19d6596ee36aa546b36cd3bf339ac092d696ab98f03a53962351944849d45301da1a
7
- data.tar.gz: f28cabe89ebab0be462d84dc5bb0831c440e38f26110216f841de9ea4341183e4f7f5123355512d13695d5e210eaa6a725dd5d8a9187088e16cabbdfa46a074d
6
+ metadata.gz: 1aae1f7fd0a836bbeb38ee880f2eee39783013d516e098cc5acdca753f3776d39693c6bd7feb345ba71526ff43380c4013723e67bb1893b6d472d1ce62122707
7
+ data.tar.gz: 355dc16e423551083fd33180ad36d7477a5cdaf593281eb580b15366689b761a3f1885675a0dc2c37da670837f65a3b6ce4bc8351ce6f756790281b454a1f996
@@ -7,7 +7,6 @@ Gem::Specification.new do |s|
7
7
  s.add_runtime_dependency('faraday', '>= 0.10')
8
8
  s.add_runtime_dependency('faraday_middleware', '>= 0.10')
9
9
  s.add_runtime_dependency('multi_json', '>= 1.0.3')
10
- s.add_runtime_dependency('faraday_middleware-parse_oj', '~> 0.3.2')
11
10
  s.authors = ["Marcus Vorwaller"]
12
11
  s.description = %q{A Ruby wrapper for the AvaTax REST and Search APIs}
13
12
  s.post_install_message =<<eos
@@ -1,194 +1,270 @@
1
- module AvaTax
2
- class Client
3
- module Accounts
4
-
5
-
6
- # Reset this account's license key
7
- #
8
- # Resets the existing license key for this account to a new key.
9
- #
10
- # To reset your account, you must specify the ID of the account you wish to reset and confirm the action.
11
- #
12
- # This API is only available to account administrators for the account in question, and may only be called after
13
- # an account has been activated by reading and accepting Avalara's terms and conditions. To activate your account
14
- # please log onto the AvaTax website or call the `ActivateAccount` API.
15
- #
16
- # Resetting a license key cannot be undone. Any previous license keys will immediately cease to work when a new key is created.
17
- #
18
- # When you call this API, all account administrators for this account will receive an email with the newly updated license key.
19
- # The email will specify which user reset the license key and it will contain the new key to use to update your connectors.
20
- #
21
- # ### Security Policies
22
- #
23
- # * This API requires one of the following user roles: AccountAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
24
- # @param id [Integer] The ID of the account you wish to update.
25
- # @param model [Object] A request confirming that you wish to reset the license key of this account.
26
- # @return [Object]
27
- def account_reset_license_key(id, model)
28
- path = "/api/v2/accounts/#{id}/resetlicensekey"
29
- post(path, model)
30
- end
31
-
32
-
33
- # Activate an account by accepting terms and conditions
34
- #
35
- # Activate the account specified by the unique accountId number.
36
- #
37
- # This activation request can only be called by account administrators. You must indicate
38
- # that you have read and accepted Avalara's terms and conditions to call this API.
39
- #
40
- # Once you have activated your account, use the `AccountResetLicenseKey` API to generate
41
- # a license key for your account.
42
- #
43
- # If you have not read or accepted the terms and conditions, this API call will return the
44
- # unchanged account model.
45
- #
46
- # ### Security Policies
47
- #
48
- # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
49
- # @param id [Integer] The ID of the account to activate
50
- # @param model [Object] The activation request
51
- # @return [Object]
52
- def activate_account(id, model)
53
- path = "/api/v2/accounts/#{id}/activate"
54
- post(path, model)
55
- end
56
-
57
-
58
- # Retrieve audit history for an account.
59
- #
60
- # Retrieve audit trace history for an account.
61
- #
62
- # Your audit trace history contains a record of all API calls made against the AvaTax REST API. You can use this API to investigate
63
- # problems and see exactly what information was sent back and forth between your code and AvaTax.
64
- #
65
- # When specifying a start and end datetime, please include a valid timezone indicator, such as the "Z" present in the examples for the start and end query parameters.
66
- # You can learn more about valid time zone designators at https://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators.
67
- #
68
- # This API enforces limits to the amount of data retrieved. These limits are subject to change.
69
- #
70
- # * You may request data from a maximum of a one-hour time period.
71
- # * The amount of data and number of API calls returned by this API are limited and may be adjusted at any time.
72
- # * Old records may be migrated out of immediately available storage. To request older data, please contact your account manager.
73
- # * New records must migrate to available storage before they can be retrieved. You may need to wait a period of time before newly created records can be fetched.
74
- #
75
- # ### Security Policies
76
- #
77
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
78
- # @param id [Integer] The ID of the account you wish to audit.
79
- # @param start [DateTime] The start datetime of audit history you with to retrieve, e.g. "2018-06-08T17:00:00Z". Defaults to the past 15 minutes.
80
- # @param end [DateTime] The end datetime of audit history you with to retrieve, e.g. "2018-06-08T17:15:00Z. Defaults to the current time. Maximum of an hour after the start time.
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
- # @return [FetchResult]
84
- def audit_account(id, options={})
85
- path = "/api/v2/accounts/#{id}/audit"
86
- get(path, options)
87
- end
88
-
89
-
90
- # Retrieve a single account
91
- #
92
- # Get the account object identified by this URL.
93
- # You may use the '$include' parameter to fetch additional nested data:
94
- #
95
- # * Subscriptions
96
- # * Users
97
- #
98
- # ### Security Policies
99
- #
100
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
101
- # @param id [Integer] The ID of the account to retrieve
102
- # @param include [String] A comma separated list of special fetch options
103
- # @return [Object]
104
- def get_account(id, options={})
105
- path = "/api/v2/accounts/#{id}"
106
- get(path, options)
107
- end
108
-
109
-
110
- # Get configuration settings for this account
111
- #
112
- # Retrieve a list of all configuration settings tied to this account.
113
- #
114
- # Configuration settings provide you with the ability to control features of your account and of your
115
- # tax software. The category names `TaxServiceConfig` and `AddressServiceConfig` are reserved for
116
- # Avalara internal software configuration values; to store your own account-level settings, please
117
- # create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
118
- #
119
- # Account settings are permanent settings that cannot be deleted. You can set the value of an
120
- # account setting to null if desired.
121
- #
122
- # Avalara-based account settings for `TaxServiceConfig` and `AddressServiceConfig` affect your account's
123
- # tax calculation and address resolution, and should only be changed with care.
124
- #
125
- # ### Security Policies
126
- #
127
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
128
- # @param id [Integer]
129
- # @return [AccountConfigurationModel[]]
130
- def get_account_configuration(id)
131
- path = "/api/v2/accounts/#{id}/configuration"
132
- get(path)
133
- end
134
-
135
-
136
- # Retrieve all accounts
137
- #
138
- # List all account objects that can be seen by the current user.
139
- #
140
- # This API lists all accounts you are allowed to see. In general, most users will only be able to see their own account.
141
- #
142
- # 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/) .
143
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
144
- # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
145
- #
146
- # * Subscriptions
147
- # * Users
148
- #
149
- # For more information about filtering in REST, please see the documentation at http://developer.avalara.com/avatax/filtering-in-rest/ .
150
- #
151
- # ### Security Policies
152
- #
153
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
154
- # @param include [String] A comma separated list of objects to fetch underneath this account. Any object with a URL path underneath this account can be fetched by specifying its name.
155
- # @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:* subscriptions, users
156
- # @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.
157
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
158
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
159
- # @return [FetchResult]
160
- def query_accounts(options={})
161
- path = "/api/v2/accounts"
162
- get(path, options)
163
- end
164
-
165
-
166
- # Change configuration settings for this account
167
- #
168
- # Update configuration settings tied to this account.
169
- #
170
- # Configuration settings provide you with the ability to control features of your account and of your
171
- # tax software. The category names `TaxServiceConfig` and `AddressServiceConfig` are reserved for
172
- # Avalara internal software configuration values; to store your own account-level settings, please
173
- # create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
174
- #
175
- # Account settings are permanent settings that cannot be deleted. You can set the value of an
176
- # account setting to null if desired.
177
- #
178
- # Avalara-based account settings for `TaxServiceConfig` and `AddressServiceConfig` affect your account's
179
- # tax calculation and address resolution, and should only be changed with care.
180
- #
181
- # ### Security Policies
182
- #
183
- # * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
184
- # @param id [Integer]
185
- # @param model [AccountConfigurationModel[]]
186
- # @return [AccountConfigurationModel[]]
187
- def set_account_configuration(id, model)
188
- path = "/api/v2/accounts/#{id}/configuration"
189
- post(path, model)
190
- end
191
-
192
- end
193
- end
1
+ module AvaTax
2
+ class Client
3
+ module Accounts
4
+
5
+
6
+ # Reset this account's license key
7
+ #
8
+ # Resets the existing license key for this account to a new key.
9
+ #
10
+ # To reset your account, you must specify the ID of the account you wish to reset and confirm the action.
11
+ #
12
+ # This API is only available to account administrators for the account in question, and may only be called after
13
+ # an account has been activated by reading and accepting Avalara's terms and conditions. To activate your account
14
+ # please log onto the AvaTax website or call the `ActivateAccount` API.
15
+ #
16
+ # You can only reset license with 'Default' license key name.
17
+ # Resetting a license key cannot be undone. Any previous license keys will immediately cease to work when a new key is created.
18
+ #
19
+ # When you call this API, all account administrators for this account will receive an email with the newly updated license key.
20
+ # The email will specify which user reset the license key and it will contain the new key to use to update your connectors.
21
+ # Note: The reset license key functionality will only be available for existing active license key i.e. when you reset license key for the account, the Default license key will be reset.The reset license key functionality is not available for newly created license keys i.e. license keys other than Default
22
+ #
23
+ # ### Security Policies
24
+ #
25
+ # * This API requires one of the following user roles: AccountAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
26
+ # @param id [Integer] The ID of the account you wish to update.
27
+ # @param model [Object] A request confirming that you wish to reset the license key of this account.
28
+ # @return [Object]
29
+ def account_reset_license_key(id, model)
30
+ path = "/api/v2/accounts/#{id}/resetlicensekey"
31
+ post(path, model)
32
+ end
33
+
34
+
35
+ # Activate an account by accepting terms and conditions
36
+ #
37
+ # Activate the account specified by the unique accountId number.
38
+ #
39
+ # This activation request can only be called by account administrators. You must indicate
40
+ # that you have read and accepted Avalara's terms and conditions to call this API.
41
+ #
42
+ # Once you have activated your account, use the `AccountResetLicenseKey` API to generate
43
+ # a license key for your account.
44
+ #
45
+ # If you have not read or accepted the terms and conditions, this API call will return the
46
+ # unchanged account model.
47
+ #
48
+ # ### Security Policies
49
+ #
50
+ # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
51
+ # @param id [Integer] The ID of the account to activate
52
+ # @param model [Object] The activation request
53
+ # @return [Object]
54
+ def activate_account(id, model)
55
+ path = "/api/v2/accounts/#{id}/activate"
56
+ post(path, model)
57
+ end
58
+
59
+
60
+ # Retrieve audit history for an account.
61
+ #
62
+ # Retrieve audit trace history for an account.
63
+ #
64
+ # Your audit trace history contains a record of all API calls made against the AvaTax REST API that returned an error. You can use this API to investigate
65
+ # problems and see exactly what information was sent back and forth between your code and AvaTax.
66
+ #
67
+ # When specifying a start and end datetime, please include a valid timezone indicator, such as the "Z" present in the examples for the start and end query parameters.
68
+ # You can learn more about valid time zone designators at https://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators.
69
+ #
70
+ # This API enforces limits to the amount of data retrieved. These limits are subject to change.
71
+ #
72
+ # * You may request data from a maximum of a one-hour time period.
73
+ # * The amount of data and number of API calls returned by this API are limited and may be adjusted at any time.
74
+ # * Old records may be migrated out of immediately available storage. To request older data, please contact your account manager.
75
+ # * New records must migrate to available storage before they can be retrieved. You may need to wait a period of time before newly created records can be fetched.
76
+ #
77
+ # ### Security Policies
78
+ #
79
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
80
+ # @param id [Integer] The ID of the account you wish to audit.
81
+ # @param start [DateTime] The start datetime of audit history you with to retrieve, e.g. "2018-06-08T17:00:00Z". Defaults to the past 15 minutes.
82
+ # @param end [DateTime] The end datetime of audit history you with to retrieve, e.g. "2018-06-08T17:15:00Z. Defaults to the current time. Maximum of an hour after the start time.
83
+ # @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.
84
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
85
+ # @return [FetchResult]
86
+ def audit_account(id, options={})
87
+ path = "/api/v2/accounts/#{id}/audit"
88
+ get(path, options)
89
+ end
90
+
91
+
92
+ # Create license key for this account
93
+ #
94
+ # Creates a new license key for this account.
95
+ #
96
+ # To create a license key for your account, you must specify the ID of the account and license key name.
97
+ #
98
+ # This API is only available to account administrators for the account in question, and may only be called after
99
+ # an account has been activated by reading and accepting Avalara's terms and conditions. To activate your account
100
+ # please log onto the AvaTax website or call the `ActivateAccount` API.
101
+ #
102
+ # You will reference this key using license key name. The existing license key will be using 'Default' as license key name.
103
+ # Hence make sure that the license key name is unique per account considering the existing license key name 'Default'
104
+ #
105
+ # ### Security Policies
106
+ #
107
+ # * This API requires one of the following user roles: AccountAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
108
+ # @param id [Integer] The ID of the account you wish to update.
109
+ # @param model [Object]
110
+ # @return [Object]
111
+ def create_license_key(id, model)
112
+ path = "/api/v2/accounts/#{id}/licensekey"
113
+ post(path, model)
114
+ end
115
+
116
+
117
+ # Delete license key for this account by license key name
118
+ #
119
+ # Deletes the license key for this account using license key name.
120
+ #
121
+ # To delete a license key for your account, you must specify the accountID of the account and license key name.
122
+ #
123
+ # This API is only available to account administrators for the account in question.
124
+ #
125
+ # ### Security Policies
126
+ #
127
+ # * This API requires one of the following user roles: AccountAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
128
+ # @param id [Integer] The ID of the account you wish to update.
129
+ # @param licensekeyname [String] The license key name you wish to update.
130
+ # @return [ErrorDetail[]]
131
+ def delete_license_key(id, licensekeyname)
132
+ path = "/api/v2/accounts/#{id}/licensekey/#{licensekeyname}"
133
+ delete(path)
134
+ end
135
+
136
+
137
+ # Retrieve a single account
138
+ #
139
+ # Get the account object identified by this URL.
140
+ # You may use the '$include' parameter to fetch additional nested data:
141
+ #
142
+ # * Subscriptions
143
+ # * Users
144
+ #
145
+ # ### Security Policies
146
+ #
147
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
148
+ # @param id [Integer] The ID of the account to retrieve
149
+ # @param include [String] A comma separated list of special fetch options
150
+ # @return [Object]
151
+ def get_account(id, options={})
152
+ path = "/api/v2/accounts/#{id}"
153
+ get(path, options)
154
+ end
155
+
156
+
157
+ # Get configuration settings for this account
158
+ #
159
+ # Retrieve a list of all configuration settings tied to this account.
160
+ #
161
+ # Configuration settings provide you with the ability to control features of your account and of your
162
+ # tax software. The category names `TaxServiceConfig` and `AddressServiceConfig` are reserved for
163
+ # Avalara internal software configuration values; to store your own account-level settings, please
164
+ # create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
165
+ #
166
+ # Account settings are permanent settings that cannot be deleted. You can set the value of an
167
+ # account setting to null if desired.
168
+ #
169
+ # Avalara-based account settings for `TaxServiceConfig` and `AddressServiceConfig` affect your account's
170
+ # tax calculation and address resolution, and should only be changed with care.
171
+ #
172
+ # ### Security Policies
173
+ #
174
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
175
+ # @param id [Integer]
176
+ # @return [AccountConfigurationModel[]]
177
+ def get_account_configuration(id)
178
+ path = "/api/v2/accounts/#{id}/configuration"
179
+ get(path)
180
+ end
181
+
182
+
183
+ # Retrieve license key by license key name
184
+ #
185
+ # ### Security Policies
186
+ #
187
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
188
+ # @param id [Integer] The ID of the account to retrieve
189
+ # @param licensekeyname [String] The ID of the account to retrieve
190
+ # @return [Object]
191
+ def get_license_key(id, licensekeyname)
192
+ path = "/api/v2/accounts/#{id}/licensekey/#{licensekeyname}"
193
+ get(path)
194
+ end
195
+
196
+
197
+ # Retrieve all license keys for this account
198
+ #
199
+ # Gets list of all the license keys used by the account.
200
+ #
201
+ # ### Security Policies
202
+ #
203
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
204
+ # @param id [Integer] The ID of the account to retrieve
205
+ # @return [AccountLicenseKeyModel[]]
206
+ def get_license_keys(id)
207
+ path = "/api/v2/accounts/#{id}/licensekeys"
208
+ get(path)
209
+ end
210
+
211
+
212
+ # Retrieve all accounts
213
+ #
214
+ # List all account objects that can be seen by the current user.
215
+ #
216
+ # This API lists all accounts you are allowed to see. In general, most users will only be able to see their own account.
217
+ #
218
+ # 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/) .
219
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
220
+ # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
221
+ #
222
+ # * Subscriptions
223
+ # * Users
224
+ #
225
+ # For more information about filtering in REST, please see the documentation at http://developer.avalara.com/avatax/filtering-in-rest/ .
226
+ #
227
+ # ### Security Policies
228
+ #
229
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
230
+ # @param include [String] A comma separated list of objects to fetch underneath this account. Any object with a URL path underneath this account can be fetched by specifying its name.
231
+ # @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:* subscriptions, users
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.
233
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
234
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
235
+ # @return [FetchResult]
236
+ def query_accounts(options={})
237
+ path = "/api/v2/accounts"
238
+ get(path, options)
239
+ end
240
+
241
+
242
+ # Change configuration settings for this account
243
+ #
244
+ # Update configuration settings tied to this account.
245
+ #
246
+ # Configuration settings provide you with the ability to control features of your account and of your
247
+ # tax software. The category names `TaxServiceConfig` and `AddressServiceConfig` are reserved for
248
+ # Avalara internal software configuration values; to store your own account-level settings, please
249
+ # create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
250
+ #
251
+ # Account settings are permanent settings that cannot be deleted. You can set the value of an
252
+ # account setting to null if desired.
253
+ #
254
+ # Avalara-based account settings for `TaxServiceConfig` and `AddressServiceConfig` affect your account's
255
+ # tax calculation and address resolution, and should only be changed with care.
256
+ #
257
+ # ### Security Policies
258
+ #
259
+ # * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
260
+ # @param id [Integer]
261
+ # @param model [AccountConfigurationModel[]]
262
+ # @return [AccountConfigurationModel[]]
263
+ def set_account_configuration(id, model)
264
+ path = "/api/v2/accounts/#{id}/configuration"
265
+ post(path, model)
266
+ end
267
+
268
+ end
269
+ end
194
270
  end