avatax 21.10.0 → 21.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avatax/client/accounts.rb +22 -11
  3. data/lib/avatax/client/addresses.rb +4 -2
  4. data/lib/avatax/client/advancedrules.rb +10 -5
  5. data/lib/avatax/client/ageverification.rb +29 -0
  6. data/lib/avatax/client/avafileforms.rb +10 -5
  7. data/lib/avatax/client/batches.rb +16 -8
  8. data/lib/avatax/client/certexpressinvites.rb +6 -3
  9. data/lib/avatax/client/certificates.rb +30 -15
  10. data/lib/avatax/client/companies.rb +42 -21
  11. data/lib/avatax/client/compliance.rb +25 -14
  12. data/lib/avatax/client/contacts.rb +12 -6
  13. data/lib/avatax/client/customers.rb +26 -13
  14. data/lib/avatax/client/datasources.rb +12 -6
  15. data/lib/avatax/client/definitions.rb +140 -70
  16. data/lib/avatax/client/distancethresholds.rb +12 -6
  17. data/lib/avatax/client/ecommercetoken.rb +4 -2
  18. data/lib/avatax/client/filingcalendars.rb +7 -4
  19. data/lib/avatax/client/filings.rb +4 -2
  20. data/lib/avatax/client/firmclientlinkages.rb +18 -9
  21. data/lib/avatax/client/free.rb +2 -1
  22. data/lib/avatax/client/fundingrequests.rb +4 -2
  23. data/lib/avatax/client/items.rb +50 -25
  24. data/lib/avatax/client/jurisdictionoverrides.rb +12 -6
  25. data/lib/avatax/client/locations.rb +24 -12
  26. data/lib/avatax/client/multidocument.rb +20 -10
  27. data/lib/avatax/client/nexus.rb +30 -15
  28. data/lib/avatax/client/notices.rb +8 -4
  29. data/lib/avatax/client/notifications.rb +6 -3
  30. data/lib/avatax/client/provisioning.rb +4 -2
  31. data/lib/avatax/client/registrar.rb +22 -11
  32. data/lib/avatax/client/reports.rb +8 -4
  33. data/lib/avatax/client/settings.rb +12 -6
  34. data/lib/avatax/client/shippingverification.rb +66 -0
  35. data/lib/avatax/client/subscriptions.rb +6 -3
  36. data/lib/avatax/client/taxcodes.rb +12 -6
  37. data/lib/avatax/client/taxcontent.rb +10 -5
  38. data/lib/avatax/client/taxrules.rb +12 -6
  39. data/lib/avatax/client/transactions.rb +42 -21
  40. data/lib/avatax/client/upcs.rb +12 -6
  41. data/lib/avatax/client/userdefinedfields.rb +52 -0
  42. data/lib/avatax/client/users.rb +16 -8
  43. data/lib/avatax/client/utilities.rb +6 -3
  44. data/lib/avatax/client.rb +2 -0
  45. data/lib/avatax/connection.rb +1 -1
  46. data/lib/avatax/request.rb +10 -9
  47. data/lib/avatax/version.rb +1 -1
  48. metadata +5 -2
@@ -23,10 +23,11 @@ module AvaTax
23
23
  # ### Security Policies
24
24
  #
25
25
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
26
+ # Swagger Name: AvaTaxClient
26
27
  # @param id [Integer] The unique ID number of this report
27
28
  # @return [Object]
28
29
  def download_report(id) path = "/api/v2/reports/#{id}/attachment"
29
- get(path) end
30
+ get(path, {}, "21.12.0") end
30
31
 
31
32
  # Retrieve a single report
32
33
  #
@@ -41,10 +42,11 @@ module AvaTax
41
42
  # * When a report's status is `Completed`, call `DownloadReport` to retrieve the file.
42
43
  #
43
44
  # This API call returns information about any report type.
45
+ # Swagger Name: AvaTaxClient
44
46
  # @param id [Integer] The unique ID number of the report to retrieve
45
47
  # @return [Object]
46
48
  def get_report(id) path = "/api/v2/reports/#{id}"
47
- get(path) end
49
+ get(path, {}, "21.12.0") end
48
50
 
49
51
  # Initiate an ExportDocumentLine report task
50
52
  #
@@ -72,11 +74,12 @@ module AvaTax
72
74
  # ### Security Policies
73
75
  #
74
76
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
77
+ # Swagger Name: AvaTaxClient
75
78
  # @param companyId [Integer] The unique ID number of the company to report on.
76
79
  # @param model [Object] Options that may be configured to customize the report.
77
80
  # @return [ReportModel[]]
78
81
  def initiate_export_document_line_report(companyId, model) path = "/api/v2/companies/#{companyId}/reports/exportdocumentline/initiate"
79
- post(path, model) end
82
+ post(path, model, {}, "21.12.0") end
80
83
 
81
84
  # List all report tasks for account
82
85
  #
@@ -95,13 +98,14 @@ module AvaTax
95
98
  # ### Security Policies
96
99
  #
97
100
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
101
+ # Swagger Name: AvaTaxClient
98
102
  # @param companyId [Integer] The id of the company for which to get reports.
99
103
  # @param pageKey [String] Provide a page key to retrieve the next page of results.
100
104
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
101
105
  # @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.
102
106
  # @return [FetchResult]
103
107
  def list_reports(options={}) path = "/api/v2/reports"
104
- get(path, options) end
108
+ get(path, options, "21.12.0") end
105
109
  end
106
110
  end
107
111
  end
@@ -24,11 +24,12 @@ module AvaTax
24
24
  # ### Security Policies
25
25
  #
26
26
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
27
+ # Swagger Name: AvaTaxClient
27
28
  # @param companyId [Integer] The ID of the company that owns this setting.
28
29
  # @param model [SettingModel[]] The setting you wish to create.
29
30
  # @return [SettingModel[]]
30
31
  def create_settings(companyId, model) path = "/api/v2/companies/#{companyId}/settings"
31
- post(path, model) end
32
+ post(path, model, {}, "21.12.0") end
32
33
 
33
34
  # Delete a single setting
34
35
  #
@@ -46,11 +47,12 @@ module AvaTax
46
47
  # ### Security Policies
47
48
  #
48
49
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
50
+ # Swagger Name: AvaTaxClient
49
51
  # @param companyId [Integer] The ID of the company that owns this setting.
50
52
  # @param id [Integer] The ID of the setting you wish to delete.
51
53
  # @return [ErrorDetail[]]
52
54
  def delete_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
53
- delete(path) end
55
+ delete(path, {}, "21.12.0") end
54
56
 
55
57
  # Retrieve a single setting
56
58
  #
@@ -68,11 +70,12 @@ module AvaTax
68
70
  # ### Security Policies
69
71
  #
70
72
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
73
+ # Swagger Name: AvaTaxClient
71
74
  # @param companyId [Integer] The ID of the company that owns this setting
72
75
  # @param id [Integer] The primary key of this setting
73
76
  # @return [Object]
74
77
  def get_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}"
75
- get(path) end
78
+ get(path, {}, "21.12.0") end
76
79
 
77
80
  # Retrieve all settings for this company
78
81
  #
@@ -93,6 +96,7 @@ module AvaTax
93
96
  # ### Security Policies
94
97
  #
95
98
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
99
+ # Swagger Name: AvaTaxClient
96
100
  # @param companyId [Integer] The ID of the company that owns these settings
97
101
  # @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:* modifiedDate, ModifiedUserId
98
102
  # @param include [String] A comma separated list of additional data to retrieve.
@@ -101,7 +105,7 @@ module AvaTax
101
105
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
102
106
  # @return [FetchResult]
103
107
  def list_settings_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/settings"
104
- get(path, options) end
108
+ get(path, options, "21.12.0") end
105
109
 
106
110
  # Retrieve all settings
107
111
  #
@@ -122,6 +126,7 @@ module AvaTax
122
126
  # ### Security Policies
123
127
  #
124
128
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
129
+ # Swagger Name: AvaTaxClient
125
130
  # @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:* modifiedDate, ModifiedUserId
126
131
  # @param include [String] A comma separated list of additional data to retrieve.
127
132
  # @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.
@@ -129,7 +134,7 @@ module AvaTax
129
134
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
130
135
  # @return [FetchResult]
131
136
  def query_settings(options={}) path = "/api/v2/settings"
132
- get(path, options) end
137
+ get(path, options, "21.12.0") end
133
138
 
134
139
  # Update a single setting
135
140
  #
@@ -151,12 +156,13 @@ module AvaTax
151
156
  # ### Security Policies
152
157
  #
153
158
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
159
+ # Swagger Name: AvaTaxClient
154
160
  # @param companyId [Integer] The ID of the company that this setting belongs to.
155
161
  # @param id [Integer] The ID of the setting you wish to update
156
162
  # @param model [Object] The setting you wish to update.
157
163
  # @return [Object]
158
164
  def update_setting(companyId, id, model) path = "/api/v2/companies/#{companyId}/settings/#{id}"
159
- put(path, model) end
165
+ put(path, model, {}, "21.12.0") end
160
166
  end
161
167
  end
162
168
  end
@@ -0,0 +1,66 @@
1
+ module AvaTax
2
+ class Client
3
+ module ShippingVerification
4
+
5
+
6
+ # Removes the transaction from consideration when evaluating regulations that span multiple transactions.
7
+ #
8
+ #
9
+ # Swagger Name: AvaTaxBeverageClient
10
+ # @param companyCode [String] The company code of the company that recorded the transaction
11
+ # @param transactionCode [String] The transaction code to retrieve
12
+ # @param documentType [String] (Optional): The document type of the transaction to operate on. If omitted, defaults to "SalesInvoice"
13
+ # @return []
14
+ def deregister_shipment(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/shipment/registration"
15
+ delete(path, options, "") end
16
+
17
+ # Registers the transaction so that it may be included when evaluating regulations that span multiple transactions.
18
+ #
19
+ #
20
+ # Swagger Name: AvaTaxBeverageClient
21
+ # @param companyCode [String] The company code of the company that recorded the transaction
22
+ # @param transactionCode [String] The transaction code to retrieve
23
+ # @param documentType [String] (Optional): The document type of the transaction to operate on. If omitted, defaults to "SalesInvoice"
24
+ # @return []
25
+ def register_shipment(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/shipment/registration"
26
+ put(path, options, "") end
27
+
28
+ # Evaluates a transaction against a set of direct-to-consumer shipping regulations and, if compliant, registers the transaction so that it may be included when evaluating regulations that span multiple transactions.
29
+ #
30
+ #
31
+ # Swagger Name: AvaTaxBeverageClient
32
+ # @param companyCode [String] The company code of the company that recorded the transaction
33
+ # @param transactionCode [String] The transaction code to retrieve
34
+ # @param documentType [String] (Optional): The document type of the transaction to operate on. If omitted, defaults to "SalesInvoice"
35
+ # @return [Object]
36
+ def register_shipment_if_compliant(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/shipment/registerIfCompliant"
37
+ put(path, options, "") end
38
+
39
+ # Evaluates a transaction against a set of direct-to-consumer shipping regulations.
40
+ #
41
+ # The transaction and its lines must meet the following criteria in order to be evaluated:
42
+ # * The transaction must be recorded. Using a type of *SalesInvoice* is recommended.
43
+ # * A parameter with the name *AlcoholRouteType* must be specified and the value must be one of the following: '*DTC*', '*Retailer DTC*'
44
+ # * A parameter with the name *RecipientName* must be specified and the value must be the name of the recipient.
45
+ # * Each alcohol line must include a *ContainerSize* parameter that describes the volume of a single container. Use the *unit* field to specify one of the following units: '*Litre*', '*Millilitre*', '*gallon (US fluid)*', '*quart (US fluid)*', '*ounce (fluid US customary)*'
46
+ # * Each alcohol line must include a *PackSize* parameter that describes the number of containers in a pack. Specify *Count* in the *unit* field.
47
+ #
48
+ # Optionally, the transaction and its lines may use the following parameters:
49
+ # * The *ShipDate* parameter may be used if the date of shipment is different than the date of the transaction. The value should be ISO-8601 compliant (e.g. 2020-07-21).
50
+ # * The *RecipientDOB* parameter may be used to evaluate age restrictions. The value should be ISO-8601 compliant (e.g. 2020-07-21).
51
+ # * The *PurchaserDOB* parameter may be used to evaluate age restrictions. The value should be ISO-8601 compliant (e.g. 2020-07-21).
52
+ # * The *SalesLocation* parameter may be used to describe whether the sale was made *OnSite* or *OffSite*. *OffSite* is the default value.
53
+ # * The *AlcoholContent* parameter may be used to describe the alcohol percentage by volume of the item. Specify *Percentage* in the *unit* field.
54
+ #
55
+ # **Security Policies**
56
+ # This API depends on all of the following active subscriptions: *AvaAlcohol, AutoAddress, AvaTaxPro*
57
+ # Swagger Name: AvaTaxBeverageClient
58
+ # @param companyCode [String] The company code of the company that recorded the transaction
59
+ # @param transactionCode [String] The transaction code to retrieve
60
+ # @param documentType [String] (Optional): The document type of the transaction to operate on. If omitted, defaults to "SalesInvoice"
61
+ # @return [Object]
62
+ def verify_shipment(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/shipment/verify"
63
+ get(path, options, "") end
64
+ end
65
+ end
66
+ end
@@ -12,11 +12,12 @@ module AvaTax
12
12
  # ### Security Policies
13
13
  #
14
14
  # * 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.
15
+ # Swagger Name: AvaTaxClient
15
16
  # @param accountId [Integer] The ID of the account that owns this subscription
16
17
  # @param id [Integer] The primary key of this subscription
17
18
  # @return [Object]
18
19
  def get_subscription(accountId, id) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}"
19
- get(path) end
20
+ get(path, {}, "21.12.0") end
20
21
 
21
22
  # Retrieve subscriptions for this account
22
23
  #
@@ -30,6 +31,7 @@ module AvaTax
30
31
  # ### Security Policies
31
32
  #
32
33
  # * 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.
34
+ # Swagger Name: AvaTaxClient
33
35
  # @param accountId [Integer] The ID of the account that owns these subscriptions
34
36
  # @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:* subscriptionDescription
35
37
  # @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.
@@ -37,7 +39,7 @@ module AvaTax
37
39
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
38
40
  # @return [FetchResult]
39
41
  def list_subscriptions_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/subscriptions"
40
- get(path, options) end
42
+ get(path, options, "21.12.0") end
41
43
 
42
44
  # Retrieve all subscriptions
43
45
  #
@@ -51,13 +53,14 @@ module AvaTax
51
53
  # ### Security Policies
52
54
  #
53
55
  # * 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.
56
+ # Swagger Name: AvaTaxClient
54
57
  # @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:* subscriptionDescription
55
58
  # @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.
56
59
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
57
60
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
58
61
  # @return [FetchResult]
59
62
  def query_subscriptions(options={}) path = "/api/v2/subscriptions"
60
- get(path, options) end
63
+ get(path, options, "21.12.0") end
61
64
  end
62
65
  end
63
66
  end
@@ -14,11 +14,12 @@ module AvaTax
14
14
  # ### Security Policies
15
15
  #
16
16
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
17
+ # Swagger Name: AvaTaxClient
17
18
  # @param companyId [Integer] The ID of the company that owns this tax code.
18
19
  # @param model [TaxCodeModel[]] The tax code you wish to create.
19
20
  # @return [TaxCodeModel[]]
20
21
  def create_tax_codes(companyId, model) path = "/api/v2/companies/#{companyId}/taxcodes"
21
- post(path, model) end
22
+ post(path, model, {}, "21.12.0") end
22
23
 
23
24
  # Delete a single tax code
24
25
  #
@@ -27,11 +28,12 @@ module AvaTax
27
28
  # ### Security Policies
28
29
  #
29
30
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
31
+ # Swagger Name: AvaTaxClient
30
32
  # @param companyId [Integer] The ID of the company that owns this tax code.
31
33
  # @param id [Integer] The ID of the tax code you wish to delete.
32
34
  # @return [ErrorDetail[]]
33
35
  def delete_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
34
- delete(path) end
36
+ delete(path, {}, "21.12.0") end
35
37
 
36
38
  # Retrieve a single tax code
37
39
  #
@@ -44,11 +46,12 @@ module AvaTax
44
46
  # ### Security Policies
45
47
  #
46
48
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
49
+ # Swagger Name: AvaTaxClient
47
50
  # @param companyId [Integer] The ID of the company that owns this tax code
48
51
  # @param id [Integer] The primary key of this tax code
49
52
  # @return [Object]
50
53
  def get_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
51
- get(path) end
54
+ get(path, {}, "21.12.0") end
52
55
 
53
56
  # Retrieve tax codes for this company
54
57
  #
@@ -64,6 +67,7 @@ module AvaTax
64
67
  # ### Security Policies
65
68
  #
66
69
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
70
+ # Swagger Name: AvaTaxClient
67
71
  # @param companyId [Integer] The ID of the company that owns these tax codes
68
72
  # @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/).
69
73
  # @param include [String] A comma separated list of additional data to retrieve.
@@ -72,7 +76,7 @@ module AvaTax
72
76
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
73
77
  # @return [FetchResult]
74
78
  def list_tax_codes_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxcodes"
75
- get(path, options) end
79
+ get(path, options, "21.12.0") end
76
80
 
77
81
  # Retrieve all tax codes
78
82
  #
@@ -88,6 +92,7 @@ module AvaTax
88
92
  # ### Security Policies
89
93
  #
90
94
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
95
+ # Swagger Name: AvaTaxClient
91
96
  # @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/).
92
97
  # @param include [String] A comma separated list of additional data to retrieve.
93
98
  # @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.
@@ -95,7 +100,7 @@ module AvaTax
95
100
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
96
101
  # @return [FetchResult]
97
102
  def query_tax_codes(options={}) path = "/api/v2/taxcodes"
98
- get(path, options) end
103
+ get(path, options, "21.12.0") end
99
104
 
100
105
  # Update a single tax code
101
106
  #
@@ -110,12 +115,13 @@ module AvaTax
110
115
  # ### Security Policies
111
116
  #
112
117
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
118
+ # Swagger Name: AvaTaxClient
113
119
  # @param companyId [Integer] The ID of the company that this tax code belongs to.
114
120
  # @param id [Integer] The ID of the tax code you wish to update
115
121
  # @param model [Object] The tax code you wish to update.
116
122
  # @return [Object]
117
123
  def update_tax_code(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}"
118
- put(path, model) end
124
+ put(path, model, {}, "21.12.0") end
119
125
  end
120
126
  end
121
127
  end
@@ -33,10 +33,11 @@ module AvaTax
33
33
  #
34
34
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
35
35
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
36
+ # Swagger Name: AvaTaxClient
36
37
  # @param model [Object] Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include.
37
38
  # @return [Object]
38
39
  def build_tax_content_file(model) path = "/api/v2/pointofsaledata/build"
39
- post(path, model) end
40
+ post(path, model, {}, "21.12.0") end
40
41
 
41
42
  # Build a tax content file for a single location
42
43
  #
@@ -68,6 +69,7 @@ module AvaTax
68
69
  #
69
70
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
70
71
  # * This API depends on the following active services:*Required* (all): AvaTaxPro.
72
+ # Swagger Name: AvaTaxClient
71
73
  # @param companyId [Integer] The ID number of the company that owns this location.
72
74
  # @param id [Integer] The ID number of the location to retrieve point-of-sale data.
73
75
  # @param date [DateTime] The date for which point-of-sale data would be calculated (today by default)
@@ -76,7 +78,7 @@ module AvaTax
76
78
  # @param includeJurisCodes [Boolean] When true, the file will include jurisdiction codes in the result.
77
79
  # @return [Object]
78
80
  def build_tax_content_file_for_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata"
79
- get(path, options) end
81
+ get(path, options, "21.12.0") end
80
82
 
81
83
  # Download a file listing tax rates by postal code
82
84
  #
@@ -124,11 +126,12 @@ module AvaTax
124
126
  # ### Security Policies
125
127
  #
126
128
  # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
129
+ # Swagger Name: AvaTaxClient
127
130
  # @param date [DateTime] The date for which point-of-sale data would be calculated (today by default). Example input: 2016-12-31
128
131
  # @param region [String] A two character region code which limits results to a specific region.
129
132
  # @return [Object]
130
133
  def download_tax_rates_by_zip_code(date, options={}) path = "/api/v2/taxratesbyzipcode/download/#{date}"
131
- get(path, options) end
134
+ get(path, options, "21.12.0") end
132
135
 
133
136
  # Sales tax rates for a specified address
134
137
  #
@@ -152,6 +155,7 @@ module AvaTax
152
155
  #
153
156
  # Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
154
157
  # for information on how to upgrade to the full AvaTax CreateTransaction API.
158
+ # Swagger Name: AvaTaxClient
155
159
  # @param line1 [String] The street address of the location.
156
160
  # @param line2 [String] The street address of the location.
157
161
  # @param line3 [String] The street address of the location.
@@ -161,7 +165,7 @@ module AvaTax
161
165
  # @param country [String] Name or ISO 3166 code identifying the country. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
162
166
  # @return [Object]
163
167
  def tax_rates_by_address(options={}) path = "/api/v2/taxrates/byaddress"
164
- get(path, options) end
168
+ get(path, options, "21.12.0") end
165
169
 
166
170
  # Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
167
171
  #
@@ -187,11 +191,12 @@ module AvaTax
187
191
  #
188
192
  # Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
189
193
  # for information on how to upgrade to the full AvaTax CreateTransaction API.
194
+ # Swagger Name: AvaTaxClient
190
195
  # @param country [String] Name or ISO 3166 code identifying the country. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`.
191
196
  # @param postalCode [String] The postal code of the location.
192
197
  # @return [Object]
193
198
  def tax_rates_by_postal_code(options={}) path = "/api/v2/taxrates/bypostalcode"
194
- get(path, options) end
199
+ get(path, options, "21.12.0") end
195
200
  end
196
201
  end
197
202
  end
@@ -22,11 +22,12 @@ module AvaTax
22
22
  # ### Security Policies
23
23
  #
24
24
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
25
+ # Swagger Name: AvaTaxClient
25
26
  # @param companyId [Integer] The ID of the company that owns this tax rule.
26
27
  # @param model [TaxRuleModel[]] The tax rule you wish to create.
27
28
  # @return [TaxRuleModel[]]
28
29
  def create_tax_rules(companyId, model) path = "/api/v2/companies/#{companyId}/taxrules"
29
- post(path, model) end
30
+ post(path, model, {}, "21.12.0") end
30
31
 
31
32
  # Delete a single tax rule
32
33
  #
@@ -47,11 +48,12 @@ module AvaTax
47
48
  # ### Security Policies
48
49
  #
49
50
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
51
+ # Swagger Name: AvaTaxClient
50
52
  # @param companyId [Integer] The ID of the company that owns this tax rule.
51
53
  # @param id [Integer] The ID of the tax rule you wish to delete.
52
54
  # @return [ErrorDetail[]]
53
55
  def delete_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
54
- delete(path) end
56
+ delete(path, {}, "21.12.0") end
55
57
 
56
58
  # Retrieve a single tax rule
57
59
  #
@@ -72,11 +74,12 @@ module AvaTax
72
74
  # ### Security Policies
73
75
  #
74
76
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
77
+ # Swagger Name: AvaTaxClient
75
78
  # @param companyId [Integer] The ID of the company that owns this tax rule
76
79
  # @param id [Integer] The primary key of this tax rule
77
80
  # @return [Object]
78
81
  def get_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
79
- get(path) end
82
+ get(path, {}, "21.12.0") end
80
83
 
81
84
  # Retrieve tax rules for this company
82
85
  #
@@ -100,6 +103,7 @@ module AvaTax
100
103
  # ### Security Policies
101
104
  #
102
105
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
106
+ # Swagger Name: AvaTaxClient
103
107
  # @param companyId [Integer] The ID of the company that owns these tax rules
104
108
  # @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:* taxCode, taxTypeCode, taxRuleProductDetail, rateTypeCode, taxTypeGroup, taxSubType, unitOfBasis
105
109
  # @param include [String] A comma separated list of additional data to retrieve.
@@ -108,7 +112,7 @@ module AvaTax
108
112
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
109
113
  # @return [FetchResult]
110
114
  def list_tax_rules(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxrules"
111
- get(path, options) end
115
+ get(path, options, "21.12.0") end
112
116
 
113
117
  # Retrieve all tax rules
114
118
  #
@@ -132,6 +136,7 @@ module AvaTax
132
136
  # ### Security Policies
133
137
  #
134
138
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
139
+ # Swagger Name: AvaTaxClient
135
140
  # @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:* taxCode, taxTypeCode, taxRuleProductDetail, rateTypeCode, taxTypeGroup, taxSubType, unitOfBasis
136
141
  # @param include [String] A comma separated list of additional data to retrieve.
137
142
  # @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.
@@ -139,7 +144,7 @@ module AvaTax
139
144
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
140
145
  # @return [FetchResult]
141
146
  def query_tax_rules(options={}) path = "/api/v2/taxrules"
142
- get(path, options) end
147
+ get(path, options, "21.12.0") end
143
148
 
144
149
  # Update a single tax rule
145
150
  #
@@ -160,12 +165,13 @@ module AvaTax
160
165
  # ### Security Policies
161
166
  #
162
167
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
168
+ # Swagger Name: AvaTaxClient
163
169
  # @param companyId [Integer] The ID of the company that this tax rule belongs to.
164
170
  # @param id [Integer] The ID of the tax rule you wish to update
165
171
  # @param model [Object] The tax rule you wish to update.
166
172
  # @return [Object]
167
173
  def update_tax_rule(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxrules/#{id}"
168
- put(path, model) end
174
+ put(path, model, {}, "21.12.0") end
169
175
  end
170
176
  end
171
177
  end