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,69 +1,73 @@
1
- module AvaTax
2
- class Client
3
- module DataSources
4
-
5
-
6
- # Create and store new datasources for the respective companies.
7
- #
1
+ module AvaTax
2
+ class Client
3
+ module DataSources
4
+
5
+
6
+ # Create and store new datasources for the respective companies.
7
+ #
8
8
  # Create one or more datasource objects.
9
9
  #
10
10
  # ### Security Policies
11
11
  #
12
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.
13
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
14
+ # Swagger Name: AvaTaxClient
14
15
  # @param companyId [Integer] The id of the company you which to create the datasources
15
16
  # @param model [DataSourceModel[]]
16
- # @return [DataSourceModel[]]
17
- def create_data_sources(companyId, model) path = "/api/v2/companies/#{companyId}/datasources"
18
- post(path, model) end
19
-
20
- # Delete a datasource by datasource id for a company.
21
- #
17
+ # @return [DataSourceModel[]]
18
+ def create_data_sources(companyId, model) path = "/api/v2/companies/#{companyId}/datasources"
19
+ post(path, model, {}, "22.2.0") end
20
+
21
+ # Delete a datasource by datasource id for a company.
22
+ #
22
23
  # Marks the existing datasource for a company as deleted.
23
24
  #
24
25
  # ### Security Policies
25
26
  #
26
27
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
27
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
28
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
29
+ # Swagger Name: AvaTaxClient
28
30
  # @param companyId [Integer] The id of the company the datasource belongs to.
29
31
  # @param id [Integer] The id of the datasource you wish to delete.
30
- # @return [ErrorDetail[]]
31
- def delete_data_source(companyId, id) path = "/api/v2/companies/#{companyId}/datasources/#{id}"
32
- delete(path) end
33
-
34
- # Get data source by data source id
35
- #
32
+ # @return [ErrorDetail[]]
33
+ def delete_data_source(companyId, id) path = "/api/v2/companies/#{companyId}/datasources/#{id}"
34
+ delete(path, {}, "22.2.0") end
35
+
36
+ # Get data source by data source id
37
+ #
36
38
  # Retrieve the data source by its unique ID number.
37
39
  #
38
40
  # ### Security Policies
39
41
  #
40
42
  # * 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.
41
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
43
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
44
+ # Swagger Name: AvaTaxClient
42
45
  # @param companyId [Integer]
43
46
  # @param id [Integer] data source id
44
- # @return [Object]
45
- def get_data_source_by_id(companyId, id) path = "/api/v2/companies/#{companyId}/datasources/#{id}"
46
- get(path) end
47
-
48
- # Retrieve all datasources for this company
49
- #
47
+ # @return [Object]
48
+ def get_data_source_by_id(companyId, id) path = "/api/v2/companies/#{companyId}/datasources/#{id}"
49
+ get(path, {}, "22.2.0") end
50
+
51
+ # Retrieve all datasources for this company
52
+ #
50
53
  # Gets multiple datasource objects for a given company.
51
54
  #
52
55
  # ### Security Policies
53
56
  #
54
57
  # * 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.
55
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
58
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
59
+ # Swagger Name: AvaTaxClient
56
60
  # @param companyId [Integer] The id of the company you wish to retrieve the datasources.
57
61
  # @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:* isEnabled, isSynced, isAuthorized, name, externalState
58
62
  # @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.
59
63
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
60
64
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
61
- # @return [FetchResult]
62
- def list_data_sources(companyId, options={}) path = "/api/v2/companies/#{companyId}/datasources"
63
- get(path, options) end
64
-
65
- # Retrieve all datasources
66
- #
65
+ # @return [FetchResult]
66
+ def list_data_sources(companyId, options={}) path = "/api/v2/companies/#{companyId}/datasources"
67
+ get(path, options, "22.2.0") end
68
+
69
+ # Retrieve all datasources
70
+ #
67
71
  # Get multiple datasource objects across all companies.
68
72
  #
69
73
  # 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/) .
@@ -72,29 +76,31 @@ module AvaTax
72
76
  # ### Security Policies
73
77
  #
74
78
  # * 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.
75
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
79
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
80
+ # Swagger Name: AvaTaxClient
76
81
  # @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:* isEnabled, isSynced, isAuthorized, name, externalState
77
82
  # @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.
78
83
  # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
79
84
  # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
80
- # @return [FetchResult]
81
- def query_data_sources(options={}) path = "/api/v2/datasources"
82
- get(path, options) end
83
-
84
- # Update a datasource identified by id for a company
85
- #
85
+ # @return [FetchResult]
86
+ def query_data_sources(options={}) path = "/api/v2/datasources"
87
+ get(path, options, "22.2.0") end
88
+
89
+ # Update a datasource identified by id for a company
90
+ #
86
91
  # Updates a datasource for a company.
87
92
  #
88
93
  # ### Security Policies
89
94
  #
90
95
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
91
- # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
96
+ # * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
97
+ # Swagger Name: AvaTaxClient
92
98
  # @param companyId [Integer] The id of the company the datasource belongs to.
93
99
  # @param id [Integer] The id of the datasource you wish to delete.
94
100
  # @param model [Object]
95
- # @return [Object]
96
- def update_data_source(companyId, id, model) path = "/api/v2/companies/#{companyId}/datasources/#{id}"
97
- put(path, model) end
98
- end
99
- end
101
+ # @return [Object]
102
+ def update_data_source(companyId, id, model) path = "/api/v2/companies/#{companyId}/datasources/#{id}"
103
+ put(path, model, {}, "22.2.0") end
104
+ end
105
+ end
100
106
  end