avatax 20.1.0 → 20.9.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 (44) hide show
  1. checksums.yaml +4 -4
  2. data/avatax.gemspec +0 -1
  3. data/lib/avatax/client/accounts.rb +236 -172
  4. data/lib/avatax/client/addresses.rb +54 -54
  5. data/lib/avatax/client/advancedrules.rb +63 -162
  6. data/lib/avatax/client/avafileforms.rb +78 -78
  7. data/lib/avatax/client/batches.rb +223 -170
  8. data/lib/avatax/client/certexpressinvites.rb +97 -97
  9. data/lib/avatax/client/certificates.rb +424 -424
  10. data/lib/avatax/client/companies.rb +457 -350
  11. data/lib/avatax/client/compliance.rb +15 -15
  12. data/lib/avatax/client/contacts.rb +106 -106
  13. data/lib/avatax/client/customers.rb +376 -376
  14. data/lib/avatax/client/datasources.rb +99 -99
  15. data/lib/avatax/client/definitions.rb +862 -847
  16. data/lib/avatax/client/distancethresholds.rb +122 -122
  17. data/lib/avatax/client/ecommercetoken.rb +37 -0
  18. data/lib/avatax/client/filingcalendars.rb +20 -508
  19. data/lib/avatax/client/filings.rb +37 -26
  20. data/lib/avatax/client/firmclientlinkages.rb +123 -123
  21. data/lib/avatax/client/free.rb +100 -100
  22. data/lib/avatax/client/fundingrequests.rb +52 -52
  23. data/lib/avatax/client/items.rb +423 -423
  24. data/lib/avatax/client/jurisdictionoverrides.rb +118 -118
  25. data/lib/avatax/client/locations.rb +253 -139
  26. data/lib/avatax/client/multidocument.rb +390 -310
  27. data/lib/avatax/client/nexus.rb +341 -201
  28. data/lib/avatax/client/notifications.rb +75 -75
  29. data/lib/avatax/client/provisioning.rb +49 -49
  30. data/lib/avatax/client/registrar.rb +198 -198
  31. data/lib/avatax/client/reports.rb +97 -97
  32. data/lib/avatax/client/settings.rb +156 -156
  33. data/lib/avatax/client/subscriptions.rb +62 -62
  34. data/lib/avatax/client/taxcodes.rb +120 -120
  35. data/lib/avatax/client/taxcontent.rb +133 -133
  36. data/lib/avatax/client/taxrules.rb +170 -170
  37. data/lib/avatax/client/transactions.rb +836 -791
  38. data/lib/avatax/client/upcs.rb +111 -111
  39. data/lib/avatax/client/users.rb +183 -183
  40. data/lib/avatax/client/utilities.rb +61 -61
  41. data/lib/avatax/connection.rb +3 -3
  42. data/lib/avatax/request.rb +2 -0
  43. data/lib/avatax/version.rb +1 -1
  44. metadata +4 -17
@@ -1,27 +1,38 @@
1
- module AvaTax
2
- class Client
3
- module Filings
4
-
5
-
6
- # Retrieve a list of filed returns for the specified company in the year and month of a given filing period.
7
- #
8
- # ### Security Policies
9
- #
10
- # * 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.
11
- # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser, CompanyUser, AccountUser, CompanyAdmin, AccountAdmin.
12
- # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
13
- # @param companyId [Integer] The ID of the company that owns these batches
14
- # @param endPeriodMonth [Integer] The month of the period you are trying to retrieve
15
- # @param endPeriodYear [Integer] The year of the period you are trying to retrieve
16
- # @param frequency [String] The frequency of the return you are trying to retrieve (See FilingFrequencyId::* for a list of allowable values)
17
- # @param status [String] The status of the return(s) you are trying to retrieve (See FilingStatusId::* for a list of allowable values)
18
- # @param country [String] The country of the return(s) you are trying to retrieve
19
- # @param region [String] The region of the return(s) you are trying to retrieve
20
- # @param filingCalendarId [Integer] The filing calendar id of the return you are trying to retrieve
21
- # @param taxformCode [String] The unique tax form code of the form.
22
- # @return [FetchResult]
23
- def get_filed_returns(companyId, options={}) path = "/api/v2/companies/#{companyId}/filings/returns/filed"
24
- get(path, options) end
25
- end
26
- end
1
+ module AvaTax
2
+ class Client
3
+ module Filings
4
+
5
+
6
+ # Retrieve a filing containing the return and all its accrual returns.
7
+ #
8
+ # ### Security Policies
9
+ #
10
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
11
+ # @param companyId [Integer] The ID of the company that owns these returns
12
+ # @param filingReturnId [Integer] The ID of the filing return
13
+ # @return [FetchResult]
14
+ def get_accrual_filings(companyId, filingReturnId) path = "/api/v2/companies/#{companyId}/filings/accrual/#{filingReturnId}"
15
+ get(path) end
16
+
17
+ # Retrieve a list of filed returns for the specified company in the year and month of a given filing period.
18
+ #
19
+ # ### Security Policies
20
+ #
21
+ # * 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.
22
+ # * This API is available by invitation only.<br />*Exempt security roles*: ComplianceRootUser, ComplianceAdmin, ComplianceUser, TechnicalSupportAdmin, TechnicalSupportUser, CompanyUser, AccountUser, CompanyAdmin, AccountAdmin.
23
+ # * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
24
+ # @param companyId [Integer] The ID of the company that owns these batches
25
+ # @param endPeriodMonth [Integer] The month of the period you are trying to retrieve
26
+ # @param endPeriodYear [Integer] The year of the period you are trying to retrieve
27
+ # @param frequency [String] The frequency of the return you are trying to retrieve (See FilingFrequencyId::* for a list of allowable values)
28
+ # @param status [String] The status of the return(s) you are trying to retrieve (See FilingStatusId::* for a list of allowable values)
29
+ # @param country [String] The country of the return(s) you are trying to retrieve
30
+ # @param region [String] The region of the return(s) you are trying to retrieve
31
+ # @param filingCalendarId [Integer] The filing calendar id of the return you are trying to retrieve
32
+ # @param taxformCode [String] The unique tax form code of the form.
33
+ # @return [FetchResult]
34
+ def get_filed_returns(companyId, options={}) path = "/api/v2/companies/#{companyId}/filings/returns/filed"
35
+ get(path, options) end
36
+ end
37
+ end
27
38
  end
@@ -1,124 +1,124 @@
1
- module AvaTax
2
- class Client
3
- module FirmClientLinkages
4
-
5
-
6
- # Approves linkage to a firm for a client account
7
- #
8
- # This API enables the account admin of a client account to approve linkage request by a firm.
9
- #
10
- # ### Security Policies
11
- #
12
- # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
13
- # @param id [Integer]
14
- # @return [Object]
15
- def approve_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/approve"
16
- post(path) end
17
-
18
- # Request a new FirmClient account and create an approved linkage to it
19
- #
20
- # This API is for use by Firms only.
21
- #
22
- # Avalara allows firms to manage returns for clients without the clients needing to use AvaTax service.
23
- # Firms can create accounts of FirmClient for customers they are managing using this API.
24
- #
25
- # Calling this API creates an account with the specified product subscriptions, but without a new user for account.
26
- # Account is then linked to the Firm so they can managed their returns.
27
- # You should call this API when a customer does not have an AvaTax account and is to be managed only by the firm.
28
- #
29
- # The created account will be created in `Active` status but there will be no user or license key associated with account.
30
- #
31
- # ### Security Policies
32
- #
33
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SystemAdmin.
34
- # @param model [Object] Information about the account you wish to create.
35
- # @return [Object]
36
- def create_and_link_new_firm_client_account(model) path = "/api/v2/firmclientlinkages/createandlinkclient"
37
- post(path, model) end
38
-
39
- # Links a firm account with the client account
40
- #
41
- # This API enables the firm admins/firm users to request the linkage of a firm account and a client account.
42
- #
43
- # ### Security Policies
44
- #
45
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
46
- # @param model [Object] FirmClientLinkageInputModel
47
- # @return [Object]
48
- def create_firm_client_linkage(model) path = "/api/v2/firmclientlinkages"
49
- post(path, model) end
50
-
51
- # Delete a linkage
52
- #
53
- # This API marks a linkage between a firm and client as deleted.
54
- #
55
- # ### Security Policies
56
- #
57
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
58
- # @param id [Integer]
59
- # @return [ErrorDetail[]]
60
- def delete_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}"
61
- delete(path) end
62
-
63
- # Get linkage between a firm and client by id
64
- #
65
- # This API enables the firm admins/firm users to request the linkage of a firm account and a client account.
66
- #
67
- # ### Security Policies
68
- #
69
- # * 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.
70
- # @param id [Integer]
71
- # @return [Object]
72
- def get_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}"
73
- get(path) end
74
-
75
- # List client linkages for a firm or client
76
- #
77
- # This API enables the firm or account users to request the associated linkages to the account.
78
- #
79
- # ### Security Policies
80
- #
81
- # * 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.
82
- # @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:* firmAccountName, clientAccountName
83
- # @return [FetchResult]
84
- def list_firm_client_linkage(options={}) path = "/api/v2/firmclientlinkages"
85
- get(path, options) end
86
-
87
- # Rejects linkage to a firm for a client account
88
- #
89
- # This API enables the account admin of a client account to reject linkage request by a firm.
90
- #
91
- # ### Security Policies
92
- #
93
- # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
94
- # @param id [Integer]
95
- # @return [Object]
96
- def reject_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/reject"
97
- post(path) end
98
-
99
- # Reset linkage status between a client and firm back to requested
100
- #
101
- # This API enables the firm admin of a client account to reset a previously created linkage request by a firm.
102
- #
103
- # ### Security Policies
104
- #
105
- # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
106
- # @param id [Integer]
107
- # @return [Object]
108
- def reset_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/reset"
109
- post(path) end
110
-
111
- # Revokes previously approved linkage to a firm for a client account
112
- #
113
- # This API enables the account admin of a client account to revoke a previously approved linkage request by a firm.
114
- #
115
- # ### Security Policies
116
- #
117
- # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
118
- # @param id [Integer]
119
- # @return [Object]
120
- def revoke_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/revoke"
121
- post(path) end
122
- end
123
- end
1
+ module AvaTax
2
+ class Client
3
+ module FirmClientLinkages
4
+
5
+
6
+ # Approves linkage to a firm for a client account
7
+ #
8
+ # This API enables the account admin of a client account to approve linkage request by a firm.
9
+ #
10
+ # ### Security Policies
11
+ #
12
+ # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
13
+ # @param id [Integer]
14
+ # @return [Object]
15
+ def approve_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/approve"
16
+ post(path) end
17
+
18
+ # Request a new FirmClient account and create an approved linkage to it
19
+ #
20
+ # This API is for use by Firms only.
21
+ #
22
+ # Avalara allows firms to manage returns for clients without the clients needing to use AvaTax service.
23
+ # Firms can create accounts of FirmClient for customers they are managing using this API.
24
+ #
25
+ # Calling this API creates an account with the specified product subscriptions, but without a new user for account.
26
+ # Account is then linked to the Firm so they can managed their returns.
27
+ # You should call this API when a customer does not have an AvaTax account and is to be managed only by the firm.
28
+ #
29
+ # The created account will be created in `Active` status but there will be no user or license key associated with account.
30
+ #
31
+ # ### Security Policies
32
+ #
33
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SystemAdmin.
34
+ # @param model [Object] Information about the account you wish to create.
35
+ # @return [Object]
36
+ def create_and_link_new_firm_client_account(model) path = "/api/v2/firmclientlinkages/createandlinkclient"
37
+ post(path, model) end
38
+
39
+ # Links a firm account with the client account
40
+ #
41
+ # This API enables the firm admins/firm users to request the linkage of a firm account and a client account.
42
+ #
43
+ # ### Security Policies
44
+ #
45
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
46
+ # @param model [Object] FirmClientLinkageInputModel
47
+ # @return [Object]
48
+ def create_firm_client_linkage(model) path = "/api/v2/firmclientlinkages"
49
+ post(path, model) end
50
+
51
+ # Delete a linkage
52
+ #
53
+ # This API marks a linkage between a firm and client as deleted.
54
+ #
55
+ # ### Security Policies
56
+ #
57
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
58
+ # @param id [Integer]
59
+ # @return [ErrorDetail[]]
60
+ def delete_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}"
61
+ delete(path) end
62
+
63
+ # Get linkage between a firm and client by id
64
+ #
65
+ # This API enables the firm admins/firm users to request the linkage of a firm account and a client account.
66
+ #
67
+ # ### Security Policies
68
+ #
69
+ # * 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.
70
+ # @param id [Integer]
71
+ # @return [Object]
72
+ def get_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}"
73
+ get(path) end
74
+
75
+ # List client linkages for a firm or client
76
+ #
77
+ # This API enables the firm or account users to request the associated linkages to the account.
78
+ #
79
+ # ### Security Policies
80
+ #
81
+ # * 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.
82
+ # @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:* firmAccountName, clientAccountName
83
+ # @return [FetchResult]
84
+ def list_firm_client_linkage(options={}) path = "/api/v2/firmclientlinkages"
85
+ get(path, options) end
86
+
87
+ # Rejects linkage to a firm for a client account
88
+ #
89
+ # This API enables the account admin of a client account to reject linkage request by a firm.
90
+ #
91
+ # ### Security Policies
92
+ #
93
+ # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
94
+ # @param id [Integer]
95
+ # @return [Object]
96
+ def reject_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/reject"
97
+ post(path) end
98
+
99
+ # Reset linkage status between a client and firm back to requested
100
+ #
101
+ # This API enables the firm admin of a client account to reset a previously created linkage request by a firm.
102
+ #
103
+ # ### Security Policies
104
+ #
105
+ # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
106
+ # @param id [Integer]
107
+ # @return [Object]
108
+ def reset_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/reset"
109
+ post(path) end
110
+
111
+ # Revokes previously approved linkage to a firm for a client account
112
+ #
113
+ # This API enables the account admin of a client account to revoke a previously approved linkage request by a firm.
114
+ #
115
+ # ### Security Policies
116
+ #
117
+ # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
118
+ # @param id [Integer]
119
+ # @return [Object]
120
+ def revoke_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/revoke"
121
+ post(path) end
122
+ end
123
+ end
124
124
  end
@@ -1,101 +1,101 @@
1
- module AvaTax
2
- class Client
3
- module Free
4
-
5
-
6
- # FREE API - Request a free trial of AvaTax
7
- #
8
- # Call this API to obtain a free AvaTax account.
9
- #
10
- # This API is free to use. No authentication credentials are required to call this API. You must read and
11
- # accept [Avalara's terms and conditions](https://www1.avalara.com/us/en/legal/terms.html) for the account to be
12
- # created.
13
- #
14
- # If all conditions are met, this API will grant a free trial version of AvaTax. For a list of functionality
15
- # available in the free trial and its limitations, please see the [AvaTax Developer Website Free Trial page](https://developer.avalara.com/avatax/signup/).
16
- #
17
- # After your free trial concludes, you will still be able to use the [Free AvaTax API Suite](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Free/).
18
- #
19
- # ### Security Policies
20
- #
21
- # * This API may be called without providing authentication credentials.
22
- # @param model [Object] Required information to provision a free trial account.
23
- # @return [Object]
24
- def request_free_trial(model) path = "/api/v2/accounts/freetrials/request"
25
- post(path, model) end
26
-
27
- # FREE API - Sales tax rates for a specified address
28
- #
29
- # # Free-To-Use
30
- #
31
- # The TaxRates API is a free-to-use, no cost option for estimating sales tax rates.
32
- # Any customer can request a free AvaTax account and make use of the TaxRates API.
33
- #
34
- # Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
35
- # response code 429 - `Too Many Requests`.
36
- #
37
- # This API assumes that you are selling general tangible personal property at a retail point-of-sale
38
- # location in the United States only.
39
- #
40
- # For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
41
- # which supports features including, but not limited to:
42
- #
43
- # * Nexus declarations
44
- # * Taxability based on product/service type
45
- # * Sourcing rules affecting origin/destination states
46
- # * Customers who are exempt from certain taxes
47
- # * States that have dollar value thresholds for tax amounts
48
- # * Refunds for products purchased on a different date
49
- # * Detailed jurisdiction names and state assigned codes
50
- # * And more!
51
- #
52
- # Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
53
- # for information on how to upgrade to the full AvaTax CreateTransaction API.
54
- # @param line1 [String] The street address of the location.
55
- # @param line2 [String] The street address of the location.
56
- # @param line3 [String] The street address of the location.
57
- # @param city [String] The city name of the location.
58
- # @param region [String] Name or ISO 3166 code identifying the region within the country. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`.
59
- # @param postalCode [String] The postal code of the location.
60
- # @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`.
61
- # @return [Object]
62
- def tax_rates_by_address(options={}) path = "/api/v2/taxrates/byaddress"
63
- get(path, options) end
64
-
65
- # FREE API - Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
66
- #
67
- # # Free-To-Use
68
- #
69
- # This API is only available for a US postal codes.
70
- #
71
- # The TaxRates API is a free-to-use, no cost option for estimating sales tax rates.
72
- # Any customer can request a free AvaTax account and make use of the TaxRates API.
73
- #
74
- # Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
75
- # response code 429 - `Too Many Requests`.
76
- #
77
- # This API assumes that you are selling general tangible personal property at a retail point-of-sale
78
- # location in the United States only.
79
- #
80
- # For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
81
- # which supports features including, but not limited to:
82
- #
83
- # * Nexus declarations
84
- # * Taxability based on product/service type
85
- # * Sourcing rules affecting origin/destination states
86
- # * Customers who are exempt from certain taxes
87
- # * States that have dollar value thresholds for tax amounts
88
- # * Refunds for products purchased on a different date
89
- # * Detailed jurisdiction names and state assigned codes
90
- # * And more!
91
- #
92
- # Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
93
- # for information on how to upgrade to the full AvaTax CreateTransaction API.
94
- # @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`.
95
- # @param postalCode [String] The postal code of the location.
96
- # @return [Object]
97
- def tax_rates_by_postal_code(options={}) path = "/api/v2/taxrates/bypostalcode"
98
- get(path, options) end
99
- end
100
- end
1
+ module AvaTax
2
+ class Client
3
+ module Free
4
+
5
+
6
+ # FREE API - Request a free trial of AvaTax
7
+ #
8
+ # Call this API to obtain a free AvaTax account.
9
+ #
10
+ # This API is free to use. No authentication credentials are required to call this API. You must read and
11
+ # accept [Avalara's terms and conditions](https://www1.avalara.com/us/en/legal/terms.html) for the account to be
12
+ # created.
13
+ #
14
+ # If all conditions are met, this API will grant a free trial version of AvaTax. For a list of functionality
15
+ # available in the free trial and its limitations, please see the [AvaTax Developer Website Free Trial page](https://developer.avalara.com/avatax/signup/).
16
+ #
17
+ # After your free trial concludes, you will still be able to use the [Free AvaTax API Suite](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Free/).
18
+ #
19
+ # ### Security Policies
20
+ #
21
+ # * This API may be called without providing authentication credentials.
22
+ # @param model [Object] Required information to provision a free trial account.
23
+ # @return [Object]
24
+ def request_free_trial(model) path = "/api/v2/accounts/freetrials/request"
25
+ post(path, model) end
26
+
27
+ # FREE API - Sales tax rates for a specified address
28
+ #
29
+ # # Free-To-Use
30
+ #
31
+ # The TaxRates API is a free-to-use, no cost option for estimating sales tax rates.
32
+ # Any customer can request a free AvaTax account and make use of the TaxRates API.
33
+ #
34
+ # Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
35
+ # response code 429 - `Too Many Requests`.
36
+ #
37
+ # This API assumes that you are selling general tangible personal property at a retail point-of-sale
38
+ # location in the United States only.
39
+ #
40
+ # For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
41
+ # which supports features including, but not limited to:
42
+ #
43
+ # * Nexus declarations
44
+ # * Taxability based on product/service type
45
+ # * Sourcing rules affecting origin/destination states
46
+ # * Customers who are exempt from certain taxes
47
+ # * States that have dollar value thresholds for tax amounts
48
+ # * Refunds for products purchased on a different date
49
+ # * Detailed jurisdiction names and state assigned codes
50
+ # * And more!
51
+ #
52
+ # Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
53
+ # for information on how to upgrade to the full AvaTax CreateTransaction API.
54
+ # @param line1 [String] The street address of the location.
55
+ # @param line2 [String] The street address of the location.
56
+ # @param line3 [String] The street address of the location.
57
+ # @param city [String] The city name of the location.
58
+ # @param region [String] Name or ISO 3166 code identifying the region within the country. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`.
59
+ # @param postalCode [String] The postal code of the location.
60
+ # @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`.
61
+ # @return [Object]
62
+ def tax_rates_by_address(options={}) path = "/api/v2/taxrates/byaddress"
63
+ get(path, options) end
64
+
65
+ # FREE API - Sales tax rates for a specified country and postal code. This API is only available for US postal codes.
66
+ #
67
+ # # Free-To-Use
68
+ #
69
+ # This API is only available for a US postal codes.
70
+ #
71
+ # The TaxRates API is a free-to-use, no cost option for estimating sales tax rates.
72
+ # Any customer can request a free AvaTax account and make use of the TaxRates API.
73
+ #
74
+ # Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP
75
+ # response code 429 - `Too Many Requests`.
76
+ #
77
+ # This API assumes that you are selling general tangible personal property at a retail point-of-sale
78
+ # location in the United States only.
79
+ #
80
+ # For more powerful tax calculation, please consider upgrading to the `CreateTransaction` API,
81
+ # which supports features including, but not limited to:
82
+ #
83
+ # * Nexus declarations
84
+ # * Taxability based on product/service type
85
+ # * Sourcing rules affecting origin/destination states
86
+ # * Customers who are exempt from certain taxes
87
+ # * States that have dollar value thresholds for tax amounts
88
+ # * Refunds for products purchased on a different date
89
+ # * Detailed jurisdiction names and state assigned codes
90
+ # * And more!
91
+ #
92
+ # Please see [Estimating Tax with REST v2](http://developer.avalara.com/blog/2016/11/04/estimating-tax-with-rest-v2/)
93
+ # for information on how to upgrade to the full AvaTax CreateTransaction API.
94
+ # @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`.
95
+ # @param postalCode [String] The postal code of the location.
96
+ # @return [Object]
97
+ def tax_rates_by_postal_code(options={}) path = "/api/v2/taxrates/bypostalcode"
98
+ get(path, options) end
99
+ end
100
+ end
101
101
  end