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,54 +1,57 @@
1
- module AvaTax
2
- class Client
3
- module Upcs
4
-
5
-
6
- # Create a new UPC
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Upcs
4
+
5
+
6
+ # Create a new UPC
7
+ #
8
8
  # Create one or more new UPC objects attached to this company.
9
9
  # A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
10
10
  #
11
11
  # ### Security Policies
12
12
  #
13
13
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
14
- # * This API depends on the following active services:*Required* (all): AvaUpc.
14
+ # * This API depends on the following active services:*Required* (all): AvaUpc.
15
+ # Swagger Name: AvaTaxClient
15
16
  # @param companyId [Integer] The ID of the company that owns this UPC.
16
17
  # @param model [UPCModel[]] The UPC you wish to create.
17
- # @return [UPCModel[]]
18
- def create_u_p_cs(companyId, model) path = "/api/v2/companies/#{companyId}/upcs"
19
- post(path, model) end
20
-
21
- # Delete a single UPC
22
- #
18
+ # @return [UPCModel[]]
19
+ def create_u_p_cs(companyId, model) path = "/api/v2/companies/#{companyId}/upcs"
20
+ post(path, model, {}, "22.2.0") end
21
+
22
+ # Delete a single UPC
23
+ #
23
24
  # Marks the UPC object identified by this URL as deleted.
24
25
  #
25
26
  # ### Security Policies
26
27
  #
27
28
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
28
- # * This API depends on the following active services:*Required* (all): AvaUpc.
29
+ # * This API depends on the following active services:*Required* (all): AvaUpc.
30
+ # Swagger Name: AvaTaxClient
29
31
  # @param companyId [Integer] The ID of the company that owns this UPC.
30
32
  # @param id [Integer] The ID of the UPC you wish to delete.
31
- # @return [ErrorDetail[]]
32
- def delete_u_p_c(companyId, id) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
33
- delete(path) end
34
-
35
- # Retrieve a single UPC
36
- #
33
+ # @return [ErrorDetail[]]
34
+ def delete_u_p_c(companyId, id) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
35
+ delete(path, {}, "22.2.0") end
36
+
37
+ # Retrieve a single UPC
38
+ #
37
39
  # Get the UPC object identified by this URL.
38
40
  # A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
39
41
  #
40
42
  # ### Security Policies
41
43
  #
42
44
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
43
- # * This API depends on the following active services:*Required* (all): AvaUpc.
45
+ # * This API depends on the following active services:*Required* (all): AvaUpc.
46
+ # Swagger Name: AvaTaxClient
44
47
  # @param companyId [Integer] The ID of the company that owns this UPC
45
48
  # @param id [Integer] The primary key of this UPC
46
- # @return [Object]
47
- def get_u_p_c(companyId, id) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
48
- get(path) end
49
-
50
- # Retrieve UPCs for this company
51
- #
49
+ # @return [Object]
50
+ def get_u_p_c(companyId, id) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
51
+ get(path, {}, "22.2.0") end
52
+
53
+ # Retrieve UPCs for this company
54
+ #
52
55
  # List all UPC objects attached to this company.
53
56
  # A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
54
57
  #
@@ -58,19 +61,20 @@ module AvaTax
58
61
  # ### Security Policies
59
62
  #
60
63
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
61
- # * This API depends on the following active services:*Required* (all): AvaUpc.
64
+ # * This API depends on the following active services:*Required* (all): AvaUpc.
65
+ # Swagger Name: AvaTaxClient
62
66
  # @param companyId [Integer] The ID of the company that owns these UPCs
63
67
  # @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/).
64
68
  # @param include [String] A comma separated list of additional data to retrieve.
65
69
  # @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.
66
70
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
67
71
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
68
- # @return [FetchResult]
69
- def list_u_p_cs_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/upcs"
70
- get(path, options) end
71
-
72
- # Retrieve all UPCs
73
- #
72
+ # @return [FetchResult]
73
+ def list_u_p_cs_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/upcs"
74
+ get(path, options, "22.2.0") end
75
+
76
+ # Retrieve all UPCs
77
+ #
74
78
  # Get multiple UPC objects across all companies.
75
79
  # A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
76
80
  #
@@ -80,18 +84,19 @@ module AvaTax
80
84
  # ### Security Policies
81
85
  #
82
86
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
83
- # * This API depends on the following active services:*Required* (all): AvaUpc.
87
+ # * This API depends on the following active services:*Required* (all): AvaUpc.
88
+ # Swagger Name: AvaTaxClient
84
89
  # @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/).
85
90
  # @param include [String] A comma separated list of additional data to retrieve.
86
91
  # @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.
87
92
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
88
93
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
89
- # @return [FetchResult]
90
- def query_u_p_cs(options={}) path = "/api/v2/upcs"
91
- get(path, options) end
92
-
93
- # Update a single UPC
94
- #
94
+ # @return [FetchResult]
95
+ def query_u_p_cs(options={}) path = "/api/v2/upcs"
96
+ get(path, options, "22.2.0") end
97
+
98
+ # Update a single UPC
99
+ #
95
100
  # Replace the existing UPC object at this URL with an updated object.
96
101
  # A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
97
102
  # All data from the existing object will be replaced with data in the object you PUT.
@@ -100,13 +105,14 @@ module AvaTax
100
105
  # ### Security Policies
101
106
  #
102
107
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
103
- # * This API depends on the following active services:*Required* (all): AvaUpc.
108
+ # * This API depends on the following active services:*Required* (all): AvaUpc.
109
+ # Swagger Name: AvaTaxClient
104
110
  # @param companyId [Integer] The ID of the company that this UPC belongs to.
105
111
  # @param id [Integer] The ID of the UPC you wish to update
106
112
  # @param model [Object] The UPC you wish to update.
107
- # @return [Object]
108
- def update_u_p_c(companyId, id, model) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
109
- put(path, model) end
110
- end
111
- end
113
+ # @return [Object]
114
+ def update_u_p_c(companyId, id, model) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
115
+ put(path, model, {}, "22.2.0") end
116
+ end
117
+ end
112
118
  end
@@ -0,0 +1,52 @@
1
+ module AvaTax
2
+ class Client
3
+ module UserDefinedFields
4
+
5
+
6
+ # Delete a User Defined Field by User Defined Field id for a company.
7
+ #
8
+ # Marks the existing user defined field for a company as deleted.
9
+ #
10
+ # ### Security Policies
11
+ #
12
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
13
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
14
+ # Swagger Name: AvaTaxClient
15
+ # @param companyId [Integer] The id of the company the User Defined Field belongs to.
16
+ # @param id [Integer] The id of the User Defined Field you wish to delete.
17
+ # @return [ErrorDetail[]]
18
+ def delete_user_defined_field(companyId, id) path = "/api/v2/companies/#{companyId}/userdefinedfields/#{id}"
19
+ delete(path, {}, "22.2.0") end
20
+
21
+ #
22
+ #
23
+ # ### Security Policies
24
+ #
25
+ # * 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.
26
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
27
+ # Swagger Name: AvaTaxClient
28
+ # @param companyId [Integer]
29
+ # @param udfType [String] Document or Line level UDF (See UserDefinedFieldType::* for a list of allowable values)
30
+ # @param allowDefaults [Boolean] If true this will add defaulted UDFs to the list that are not named yet
31
+ # @return [FetchResult]
32
+ def list_user_defined_fields_by_company_id(companyId, options={}) path = "/api/v2/companies/#{companyId}/userdefinedfields"
33
+ get(path, options, "22.2.0") end
34
+
35
+ # Update a User Defined Field identified by id for a company
36
+ #
37
+ # Updates a User Defined Field for a company.
38
+ #
39
+ # ### Security Policies
40
+ #
41
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
42
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
43
+ # Swagger Name: AvaTaxClient
44
+ # @param companyId [Integer] The id of the company the user defined field belongs to.
45
+ # @param id [Integer]
46
+ # @param model [Object]
47
+ # @return [Object]
48
+ def update_user_defined_field(companyId, model, options={}) path = "/api/v2/companies/#{companyId}/userdefinedfields"
49
+ post(path, model, options, "22.2.0") end
50
+ end
51
+ end
52
+ end
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module Users
4
-
5
-
6
- # Change Password
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Users
4
+
5
+
6
+ # Change Password
7
+ #
8
8
  # Allows a user to change their password via an API call.
9
9
  #
10
10
  # This API allows an authenticated user to change their password via an API call. This feature is only available
@@ -15,14 +15,15 @@ module AvaTax
15
15
  #
16
16
  # ### Security Policies
17
17
  #
18
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
18
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
19
+ # Swagger Name: AvaTaxClient
19
20
  # @param model [Object] An object containing your current password and the new password.
20
- # @return [String]
21
- def change_password(model) path = "/api/v2/passwords"
22
- put(path, model) end
23
-
24
- # Create new users
25
- #
21
+ # @return [String]
22
+ def change_password(model) path = "/api/v2/passwords"
23
+ put(path, model, {}, "22.2.0") end
24
+
25
+ # Create new users
26
+ #
26
27
  # Create one or more new user objects attached to this account.
27
28
  #
28
29
  # A user represents one person with access privileges to make API calls and work with a specific account.
@@ -35,15 +36,16 @@ module AvaTax
35
36
  #
36
37
  # ### Security Policies
37
38
  #
38
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
39
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
40
+ # Swagger Name: AvaTaxClient
39
41
  # @param accountId [Integer] The unique ID number of the account where these users will be created.
40
42
  # @param model [UserModel[]] The user or array of users you wish to create.
41
- # @return [UserModel[]]
42
- def create_users(accountId, model) path = "/api/v2/accounts/#{accountId}/users"
43
- post(path, model) end
44
-
45
- # Delete a single user
46
- #
43
+ # @return [UserModel[]]
44
+ def create_users(accountId, model) path = "/api/v2/accounts/#{accountId}/users"
45
+ post(path, model, {}, "22.2.0") end
46
+
47
+ # Delete a single user
48
+ #
47
49
  # Mark the user object identified by this URL as deleted.
48
50
  #
49
51
  # This API is available for use by account and company administrators only.
@@ -53,15 +55,16 @@ module AvaTax
53
55
  #
54
56
  # ### Security Policies
55
57
  #
56
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, CSPTester, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TreasuryAdmin.
58
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, CSPTester, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TreasuryAdmin.
59
+ # Swagger Name: AvaTaxClient
57
60
  # @param id [Integer] The ID of the user you wish to delete.
58
61
  # @param accountId [Integer] The accountID of the user you wish to delete.
59
- # @return [ErrorDetail[]]
60
- def delete_user(id, accountId) path = "/api/v2/accounts/#{accountId}/users/#{id}"
61
- delete(path) end
62
-
63
- # Retrieve a single user
64
- #
62
+ # @return [ErrorDetail[]]
63
+ def delete_user(id, accountId) path = "/api/v2/accounts/#{accountId}/users/#{id}"
64
+ delete(path, {}, "22.2.0") end
65
+
66
+ # Retrieve a single user
67
+ #
65
68
  # Get the user object identified by this URL.
66
69
  # A user represents one person with access privileges to make API calls and work with a specific account.
67
70
  #
@@ -71,16 +74,17 @@ module AvaTax
71
74
  #
72
75
  # ### Security Policies
73
76
  #
74
- # * 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, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
77
+ # * 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, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
78
+ # Swagger Name: AvaTaxClient
75
79
  # @param id [Integer] The ID of the user to retrieve.
76
80
  # @param accountId [Integer] The accountID of the user you wish to get.
77
81
  # @param include [String] Optional fetch commands.
78
- # @return [Object]
79
- def get_user(id, accountId, options={}) path = "/api/v2/accounts/#{accountId}/users/#{id}"
80
- get(path, options) end
81
-
82
- # Retrieve all entitlements for a single user
83
- #
82
+ # @return [Object]
83
+ def get_user(id, accountId, options={}) path = "/api/v2/accounts/#{accountId}/users/#{id}"
84
+ get(path, options, "22.2.0") end
85
+
86
+ # Retrieve all entitlements for a single user
87
+ #
84
88
  # Return a list of all entitlements to which this user has rights to access.
85
89
  # Entitlements are a list of specified API calls the user is permitted to make, a list of identifier numbers for companies the user is
86
90
  # allowed to use, and an access level identifier that indicates what types of access roles the user is allowed to use.
@@ -99,15 +103,16 @@ module AvaTax
99
103
  #
100
104
  # ### Security Policies
101
105
  #
102
- # * 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, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
106
+ # * 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, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
107
+ # Swagger Name: AvaTaxClient
103
108
  # @param id [Integer] The ID of the user to retrieve.
104
109
  # @param accountId [Integer] The accountID of the user you wish to get.
105
- # @return [Object]
106
- def get_user_entitlements(id, accountId) path = "/api/v2/accounts/#{accountId}/users/#{id}/entitlements"
107
- get(path) end
108
-
109
- # Retrieve users for this account
110
- #
110
+ # @return [Object]
111
+ def get_user_entitlements(id, accountId) path = "/api/v2/accounts/#{accountId}/users/#{id}/entitlements"
112
+ get(path, {}, "22.2.0") end
113
+
114
+ # Retrieve users for this account
115
+ #
111
116
  # List all user objects attached to this account.
112
117
  # A user represents one person with access privileges to make API calls and work with a specific account.
113
118
  #
@@ -123,19 +128,20 @@ module AvaTax
123
128
  #
124
129
  # ### Security Policies
125
130
  #
126
- # * 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, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
131
+ # * 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, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
132
+ # Swagger Name: AvaTaxClient
127
133
  # @param accountId [Integer] The accountID of the user you wish to list.
128
134
  # @param include [String] Optional fetch commands.
129
135
  # @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:* SuppressNewUserEmail
130
136
  # @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.
131
137
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
132
138
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
133
- # @return [FetchResult]
134
- def list_users_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/users"
135
- get(path, options) end
136
-
137
- # Retrieve all users
138
- #
139
+ # @return [FetchResult]
140
+ def list_users_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/users"
141
+ get(path, options, "22.2.0") end
142
+
143
+ # Retrieve all users
144
+ #
139
145
  # Get multiple user objects across all accounts.
140
146
  #
141
147
  # A user represents one person or set of credentials with access privileges to make API calls and work with a specific account. A user can be authenticated
@@ -153,18 +159,19 @@ module AvaTax
153
159
  #
154
160
  # ### Security Policies
155
161
  #
156
- # * 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, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
162
+ # * 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, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
163
+ # Swagger Name: AvaTaxClient
157
164
  # @param include [String] Optional fetch commands.
158
165
  # @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:* SuppressNewUserEmail
159
166
  # @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.
160
167
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
161
168
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
162
- # @return [FetchResult]
163
- def query_users(options={}) path = "/api/v2/users"
164
- get(path, options) end
165
-
166
- # Update a single user
167
- #
169
+ # @return [FetchResult]
170
+ def query_users(options={}) path = "/api/v2/users"
171
+ get(path, options, "22.2.0") end
172
+
173
+ # Update a single user
174
+ #
168
175
  # Replace the existing user object at this URL with an updated object.
169
176
  # A user represents one person with access privileges to make API calls and work with a specific account.
170
177
  # All data from the existing object will be replaced with data in the object you PUT.
@@ -172,13 +179,14 @@ module AvaTax
172
179
  #
173
180
  # ### Security Policies
174
181
  #
175
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
182
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
183
+ # Swagger Name: AvaTaxClient
176
184
  # @param id [Integer] The ID of the user you wish to update.
177
185
  # @param accountId [Integer] The accountID of the user you wish to update.
178
186
  # @param model [Object] The user object you wish to update.
179
- # @return [Object]
180
- def update_user(id, accountId, model) path = "/api/v2/accounts/#{accountId}/users/#{id}"
181
- put(path, model) end
182
- end
183
- end
187
+ # @return [Object]
188
+ def update_user(id, accountId, model) path = "/api/v2/accounts/#{accountId}/users/#{id}"
189
+ put(path, model, {}, "22.2.0") end
190
+ end
191
+ end
184
192
  end
@@ -1,10 +1,10 @@
1
- module AvaTax
2
- class Client
3
- module Utilities
4
-
5
-
6
- # Checks if the current user is subscribed to a specific service
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module Utilities
4
+
5
+
6
+ # Checks if the current user is subscribed to a specific service
7
+ #
8
8
  # Returns a subscription object for the current account, or 404 Not Found if this subscription is not enabled for this account.
9
9
  #
10
10
  # This API will return an error if it is called with invalid authentication credentials.
@@ -12,14 +12,15 @@ module AvaTax
12
12
  # This API is intended to help you determine whether you have the necessary subscription to use certain API calls
13
13
  # within AvaTax. You can examine the subscriptions returned from this API call to look for a particular product
14
14
  # or subscription to provide useful information to the current user as to whether they are entitled to use
15
- # specific features of AvaTax.
15
+ # specific features of AvaTax.
16
+ # Swagger Name: AvaTaxClient
16
17
  # @param serviceTypeId [String] The service to check
17
- # @return [Object]
18
- def get_my_subscription(serviceTypeId) path = "/api/v2/utilities/subscriptions/#{serviceTypeId}"
19
- get(path) end
20
-
21
- # List all services to which the current user is subscribed
22
- #
18
+ # @return [Object]
19
+ def get_my_subscription(serviceTypeId) path = "/api/v2/utilities/subscriptions/#{serviceTypeId}"
20
+ get(path, {}, "22.2.0") end
21
+
22
+ # List all services to which the current user is subscribed
23
+ #
23
24
  # Returns the list of all subscriptions enabled for the currently logged in user.
24
25
  #
25
26
  # This API will return an error if it is called with invalid authentication credentials.
@@ -27,13 +28,14 @@ module AvaTax
27
28
  # This API is intended to help you determine whether you have the necessary subscription to use certain API calls
28
29
  # within AvaTax. You can examine the subscriptions returned from this API call to look for a particular product
29
30
  # or subscription to provide useful information to the current user as to whether they are entitled to use
30
- # specific features of AvaTax.
31
- # @return [FetchResult]
32
- def list_my_subscriptions() path = "/api/v2/utilities/subscriptions"
33
- get(path) end
34
-
35
- # Tests connectivity and version of the service
36
- #
31
+ # specific features of AvaTax.
32
+ # Swagger Name: AvaTaxClient
33
+ # @return [FetchResult]
34
+ def list_my_subscriptions() path = "/api/v2/utilities/subscriptions"
35
+ get(path, {}, "22.2.0") end
36
+
37
+ # Tests connectivity and version of the service
38
+ #
37
39
  # Check connectivity to AvaTax and return information about the AvaTax API server.
38
40
  #
39
41
  # This API is intended to help you verify that your connection is working. This API will always succeed and will
@@ -53,10 +55,11 @@ module AvaTax
53
55
  #
54
56
  # ### Security Policies
55
57
  #
56
- # * This API may be called without providing authentication credentials.
57
- # @return [Object]
58
- def ping() path = "/api/v2/utilities/ping"
59
- get(path) end
60
- end
61
- end
58
+ # * This API may be called without providing authentication credentials.
59
+ # Swagger Name: AvaTaxClient
60
+ # @return [Object]
61
+ def ping() path = "/api/v2/utilities/ping"
62
+ get(path, {}, "22.2.0") end
63
+ end
64
+ end
62
65
  end
data/lib/avatax/client.rb CHANGED
@@ -1,35 +1,37 @@
1
- module AvaTax
2
- class Client < API
3
- Dir[File.expand_path('../client/*.rb', __FILE__)].each{|f| require f}
4
-
5
- include AvaTax::Client::Accounts
6
- include AvaTax::Client::Addresses
7
- include AvaTax::Client::Batches
8
- include AvaTax::Client::CertExpressInvites
9
- include AvaTax::Client::Companies
10
- include AvaTax::Client::Contacts
11
- include AvaTax::Client::Customers
12
- include AvaTax::Client::Definitions
13
- include AvaTax::Client::FilingCalendars
14
- include AvaTax::Client::Filings
15
- include AvaTax::Client::Free
16
- include AvaTax::Client::FundingRequests
17
- include AvaTax::Client::Items
18
- include AvaTax::Client::JurisdictionOverrides
19
- include AvaTax::Client::Locations
20
- include AvaTax::Client::Nexus
21
- include AvaTax::Client::Notices
22
- include AvaTax::Client::Onboarding
23
- include AvaTax::Client::PointOfSale
24
- include AvaTax::Client::Registrar
25
- include AvaTax::Client::Settings
26
- include AvaTax::Client::Subscriptions
27
- include AvaTax::Client::TaxCodes
28
- include AvaTax::Client::TaxContent
29
- include AvaTax::Client::TaxRules
30
- include AvaTax::Client::Transactions
31
- include AvaTax::Client::Upcs
32
- include AvaTax::Client::Users
33
- include AvaTax::Client::Utilities
34
- end
35
- end
1
+ module AvaTax
2
+ class Client < API
3
+ Dir[File.expand_path('../client/*.rb', __FILE__)].each{|f| require f}
4
+
5
+ include AvaTax::Client::Accounts
6
+ include AvaTax::Client::Addresses
7
+ include AvaTax::Client::Batches
8
+ include AvaTax::Client::CertExpressInvites
9
+ include AvaTax::Client::Companies
10
+ include AvaTax::Client::Contacts
11
+ include AvaTax::Client::Customers
12
+ include AvaTax::Client::Definitions
13
+ include AvaTax::Client::FilingCalendars
14
+ include AvaTax::Client::Filings
15
+ include AvaTax::Client::Free
16
+ include AvaTax::Client::FundingRequests
17
+ include AvaTax::Client::Items
18
+ include AvaTax::Client::JurisdictionOverrides
19
+ include AvaTax::Client::Locations
20
+ include AvaTax::Client::Nexus
21
+ include AvaTax::Client::Notices
22
+ include AvaTax::Client::Onboarding
23
+ include AvaTax::Client::PointOfSale
24
+ include AvaTax::Client::Registrar
25
+ include AvaTax::Client::Settings
26
+ include AvaTax::Client::Subscriptions
27
+ include AvaTax::Client::TaxCodes
28
+ include AvaTax::Client::TaxContent
29
+ include AvaTax::Client::TaxRules
30
+ include AvaTax::Client::Transactions
31
+ include AvaTax::Client::Upcs
32
+ include AvaTax::Client::Users
33
+ include AvaTax::Client::Utilities
34
+ include AvaTax::Client::ShippingVerification
35
+ include AvaTax::Client::AgeVerification
36
+ end
37
+ end