avatax 20.1.0 → 20.5.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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/avatax/client/accounts.rb +180 -116
  3. data/lib/avatax/client/addresses.rb +34 -34
  4. data/lib/avatax/client/advancedrules.rb +33 -142
  5. data/lib/avatax/client/avafileforms.rb +37 -37
  6. data/lib/avatax/client/batches.rb +122 -122
  7. data/lib/avatax/client/certexpressinvites.rb +70 -70
  8. data/lib/avatax/client/certificates.rb +313 -313
  9. data/lib/avatax/client/companies.rb +234 -232
  10. data/lib/avatax/client/compliance.rb +2 -2
  11. data/lib/avatax/client/contacts.rb +58 -58
  12. data/lib/avatax/client/customers.rb +279 -279
  13. data/lib/avatax/client/datasources.rb +51 -51
  14. data/lib/avatax/client/definitions.rb +448 -435
  15. data/lib/avatax/client/distancethresholds.rb +74 -74
  16. data/lib/avatax/client/filingcalendars.rb +10 -498
  17. data/lib/avatax/client/filings.rb +13 -13
  18. data/lib/avatax/client/firmclientlinkages.rb +54 -54
  19. data/lib/avatax/client/free.rb +73 -73
  20. data/lib/avatax/client/fundingrequests.rb +32 -32
  21. data/lib/avatax/client/items.rb +284 -284
  22. data/lib/avatax/client/jurisdictionoverrides.rb +70 -70
  23. data/lib/avatax/client/locations.rb +87 -84
  24. data/lib/avatax/client/multidocument.rb +294 -234
  25. data/lib/avatax/client/nexus.rb +283 -143
  26. data/lib/avatax/client/notifications.rb +48 -48
  27. data/lib/avatax/client/provisioning.rb +29 -29
  28. data/lib/avatax/client/registrar.rb +122 -122
  29. data/lib/avatax/client/reports.rb +63 -63
  30. data/lib/avatax/client/settings.rb +108 -108
  31. data/lib/avatax/client/subscriptions.rb +35 -35
  32. data/lib/avatax/client/taxcodes.rb +72 -72
  33. data/lib/avatax/client/taxcontent.rb +106 -106
  34. data/lib/avatax/client/taxrules.rb +122 -122
  35. data/lib/avatax/client/transactions.rb +654 -639
  36. data/lib/avatax/client/upcs.rb +63 -63
  37. data/lib/avatax/client/users.rb +121 -121
  38. data/lib/avatax/client/utilities.rb +34 -34
  39. data/lib/avatax/connection.rb +1 -1
  40. data/lib/avatax/request.rb +2 -0
  41. data/lib/avatax/version.rb +1 -1
  42. metadata +3 -3
@@ -5,112 +5,112 @@ module AvaTax
5
5
 
6
6
  # Create one or more overrides
7
7
  #
8
- # Creates one or more jurisdiction override objects for this account.
9
- #
10
- # A Jurisdiction Override is a configuration setting that allows you to select the taxing
11
- # jurisdiction for a specific address. If you encounter an address that is on the boundary
12
- # between two different jurisdictions, you can choose to set up a jurisdiction override
13
- # to switch this address to use different taxing jurisdictions.
14
- #
15
- # ### Security Policies
16
- #
8
+ # Creates one or more jurisdiction override objects for this account.
9
+ #
10
+ # A Jurisdiction Override is a configuration setting that allows you to select the taxing
11
+ # jurisdiction for a specific address. If you encounter an address that is on the boundary
12
+ # between two different jurisdictions, you can choose to set up a jurisdiction override
13
+ # to switch this address to use different taxing jurisdictions.
14
+ #
15
+ # ### Security Policies
16
+ #
17
17
  # * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
18
- # @param accountId [Integer] The ID of the account that owns this override
19
- # @param model [JurisdictionOverrideModel[]] The jurisdiction override objects to create
18
+ # @param accountId [Integer] The ID of the account that owns this override
19
+ # @param model [JurisdictionOverrideModel[]] The jurisdiction override objects to create
20
20
  # @return [JurisdictionOverrideModel[]]
21
21
  def create_jurisdiction_overrides(accountId, model) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides"
22
22
  post(path, model) end
23
23
 
24
24
  # Delete a single override
25
25
  #
26
- # Marks the item object at this URL as deleted.
27
- #
28
- # ### Security Policies
29
- #
26
+ # Marks the item object at this URL as deleted.
27
+ #
28
+ # ### Security Policies
29
+ #
30
30
  # * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
31
- # @param accountId [Integer] The ID of the account that owns this override
32
- # @param id [Integer] The ID of the override you wish to delete
31
+ # @param accountId [Integer] The ID of the account that owns this override
32
+ # @param id [Integer] The ID of the override you wish to delete
33
33
  # @return [ErrorDetail[]]
34
34
  def delete_jurisdiction_override(accountId, id) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
35
35
  delete(path) end
36
36
 
37
37
  # Retrieve a single override
38
38
  #
39
- # Get the item object identified by this URL.
40
- #
41
- # A Jurisdiction Override is a configuration setting that allows you to select the taxing
42
- # jurisdiction for a specific address. If you encounter an address that is on the boundary
43
- # between two different jurisdictions, you can choose to set up a jurisdiction override
44
- # to switch this address to use different taxing jurisdictions.
45
- #
46
- # ### Security Policies
47
- #
39
+ # Get the item object identified by this URL.
40
+ #
41
+ # A Jurisdiction Override is a configuration setting that allows you to select the taxing
42
+ # jurisdiction for a specific address. If you encounter an address that is on the boundary
43
+ # between two different jurisdictions, you can choose to set up a jurisdiction override
44
+ # to switch this address to use different taxing jurisdictions.
45
+ #
46
+ # ### Security Policies
47
+ #
48
48
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
49
- # @param accountId [Integer] The ID of the account that owns this override
50
- # @param id [Integer] The primary key of this override
49
+ # @param accountId [Integer] The ID of the account that owns this override
50
+ # @param id [Integer] The primary key of this override
51
51
  # @return [Object]
52
52
  def get_jurisdiction_override(accountId, id) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
53
53
  get(path) end
54
54
 
55
55
  # Retrieve overrides for this account
56
56
  #
57
- # List all jurisdiction override objects defined for this account.
58
- #
59
- # A Jurisdiction Override is a configuration setting that allows you to select the taxing
60
- # jurisdiction for a specific address. If you encounter an address that is on the boundary
61
- # between two different jurisdictions, you can choose to set up a jurisdiction override
62
- # to switch this address to use different taxing jurisdictions.
63
- #
64
- # 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/) .
65
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
66
- #
67
- # ### Security Policies
68
- #
57
+ # List all jurisdiction override objects defined for this account.
58
+ #
59
+ # A Jurisdiction Override is a configuration setting that allows you to select the taxing
60
+ # jurisdiction for a specific address. If you encounter an address that is on the boundary
61
+ # between two different jurisdictions, you can choose to set up a jurisdiction override
62
+ # to switch this address to use different taxing jurisdictions.
63
+ #
64
+ # 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/) .
65
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
66
+ #
67
+ # ### Security Policies
68
+ #
69
69
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
70
- # @param accountId [Integer] The ID of the account that owns this override
71
- # @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:* country, Jurisdictions
72
- # @param include [String] A comma separated list of additional data to retrieve.
73
- # @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.
74
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
75
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
70
+ # @param accountId [Integer] The ID of the account that owns this override
71
+ # @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:* country, Jurisdictions
72
+ # @param include [String] A comma separated list of additional data to retrieve.
73
+ # @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.
74
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
75
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
76
76
  # @return [FetchResult]
77
77
  def list_jurisdiction_overrides_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides"
78
78
  get(path, options) end
79
79
 
80
80
  # Retrieve all overrides
81
81
  #
82
- # Get multiple jurisdiction override objects across all companies.
83
- #
84
- # A Jurisdiction Override is a configuration setting that allows you to select the taxing
85
- # jurisdiction for a specific address. If you encounter an address that is on the boundary
86
- # between two different jurisdictions, you can choose to set up a jurisdiction override
87
- # to switch this address to use different taxing jurisdictions.
88
- #
89
- # 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/) .
90
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
91
- #
92
- # ### Security Policies
93
- #
82
+ # Get multiple jurisdiction override objects across all companies.
83
+ #
84
+ # A Jurisdiction Override is a configuration setting that allows you to select the taxing
85
+ # jurisdiction for a specific address. If you encounter an address that is on the boundary
86
+ # between two different jurisdictions, you can choose to set up a jurisdiction override
87
+ # to switch this address to use different taxing jurisdictions.
88
+ #
89
+ # 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/) .
90
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
91
+ #
92
+ # ### Security Policies
93
+ #
94
94
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
95
- # @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:* country, Jurisdictions
96
- # @param include [String] A comma separated list of additional data to retrieve.
97
- # @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.
98
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
99
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
95
+ # @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:* country, Jurisdictions
96
+ # @param include [String] A comma separated list of additional data to retrieve.
97
+ # @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.
98
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
99
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
100
100
  # @return [FetchResult]
101
101
  def query_jurisdiction_overrides(options={}) path = "/api/v2/jurisdictionoverrides"
102
102
  get(path, options) end
103
103
 
104
104
  # Update a single jurisdictionoverride
105
105
  #
106
- # Replace the existing jurisdictionoverride object at this URL with an updated object.
107
- #
108
- # ### Security Policies
109
- #
106
+ # Replace the existing jurisdictionoverride object at this URL with an updated object.
107
+ #
108
+ # ### Security Policies
109
+ #
110
110
  # * This API requires one of the following user roles: AccountAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
111
- # @param accountId [Integer] The ID of the account that this jurisdictionoverride belongs to.
112
- # @param id [Integer] The ID of the jurisdictionoverride you wish to update
113
- # @param model [Object] The jurisdictionoverride object you wish to update.
111
+ # @param accountId [Integer] The ID of the account that this jurisdictionoverride belongs to.
112
+ # @param id [Integer] The ID of the jurisdictionoverride you wish to update
113
+ # @param model [Object] The jurisdictionoverride object you wish to update.
114
114
  # @return [Object]
115
115
  def update_jurisdiction_override(accountId, id, model) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}"
116
116
  put(path, model) end
@@ -5,133 +5,136 @@ module AvaTax
5
5
 
6
6
  # Create a new location
7
7
  #
8
- # Create one or more new location objects attached to this company.
9
- #
10
- # ### Security Policies
11
- #
8
+ # Create one or more new location objects attached to this company.
9
+ #
10
+ # ### Security Policies
11
+ #
12
12
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
13
- # @param companyId [Integer] The ID of the company that owns this location.
14
- # @param model [LocationModel[]] The location you wish to create.
13
+ # @param companyId [Integer] The ID of the company that owns this location.
14
+ # @param model [LocationModel[]] The location you wish to create.
15
15
  # @return [LocationModel[]]
16
16
  def create_locations(companyId, model) path = "/api/v2/companies/#{companyId}/locations"
17
17
  post(path, model) end
18
18
 
19
19
  # Delete a single location
20
20
  #
21
- # Mark the location object at this URL as deleted.
22
- #
23
- # ### Security Policies
24
- #
21
+ # Mark the location object at this URL as deleted.
22
+ #
23
+ # ### Security Policies
24
+ #
25
25
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
26
- # @param companyId [Integer] The ID of the company that owns this location.
27
- # @param id [Integer] The ID of the location you wish to delete.
26
+ # @param companyId [Integer] The ID of the company that owns this location.
27
+ # @param id [Integer] The ID of the location you wish to delete.
28
28
  # @return [ErrorDetail[]]
29
29
  def delete_location(companyId, id) path = "/api/v2/companies/#{companyId}/locations/#{id}"
30
30
  delete(path) end
31
31
 
32
32
  # Retrieve a single location
33
33
  #
34
- # Get the location object identified by this URL.
35
- # An 'Location' represents a physical address where a company does business.
36
- # Many taxing authorities require that you define a list of all locations where your company does business.
37
- # These locations may require additional custom configuration or tax registration with these authorities.
38
- # For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
39
- #
40
- # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
41
- #
42
- # * LocationSettings
43
- #
44
- # ### Security Policies
45
- #
34
+ # Get the location object identified by this URL.
35
+ # An 'Location' represents a physical address where a company does business.
36
+ # Many taxing authorities require that you define a list of all locations where your company does business.
37
+ # These locations may require additional custom configuration or tax registration with these authorities.
38
+ # For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
39
+ #
40
+ # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
41
+ #
42
+ # * LocationSettings
43
+ # * parameters
44
+ #
45
+ # ### Security Policies
46
+ #
46
47
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
47
- # @param companyId [Integer] The ID of the company that owns this location
48
- # @param id [Integer] The primary key of this location
49
- # @param include [String] A comma separated list of additional data to retrieve. You may specify `LocationSettings` to retrieve location settings.
48
+ # @param companyId [Integer] The ID of the company that owns this location
49
+ # @param id [Integer] The primary key of this location
50
+ # @param include [String] A comma separated list of additional data to retrieve.
50
51
  # @return [Object]
51
52
  def get_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}"
52
53
  get(path, options) end
53
54
 
54
55
  # Retrieve locations for this company
55
56
  #
56
- # List all location objects defined for this company.
57
- # An 'Location' represents a physical address where a company does business.
58
- # Many taxing authorities require that you define a list of all locations where your company does business.
59
- # These locations may require additional custom configuration or tax registration with these authorities.
60
- # For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
61
- #
62
- # 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/) .
63
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
64
- # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
65
- #
66
- # * LocationSettings
67
- #
68
- # ### Security Policies
69
- #
57
+ # List all location objects defined for this company.
58
+ # An 'Location' represents a physical address where a company does business.
59
+ # Many taxing authorities require that you define a list of all locations where your company does business.
60
+ # These locations may require additional custom configuration or tax registration with these authorities.
61
+ # For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
62
+ #
63
+ # 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/) .
64
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
65
+ # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
66
+ #
67
+ # * LocationSettings
68
+ # * parameters
69
+ #
70
+ # ### Security Policies
71
+ #
70
72
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
71
- # @param companyId [Integer] The ID of the company that owns these locations
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/).<br />*Not filterable:* settings
73
- # @param include [String] A comma separated list of additional data to retrieve. You may specify `LocationSettings` to retrieve location settings.
74
- # @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.
75
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
76
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
73
+ # @param companyId [Integer] The ID of the company that owns these locations
74
+ # @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:* settings, parameters
75
+ # @param include [String] A comma separated list of additional data to retrieve.
76
+ # @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.
77
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
78
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
77
79
  # @return [FetchResult]
78
80
  def list_locations_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/locations"
79
81
  get(path, options) end
80
82
 
81
83
  # Retrieve all locations
82
84
  #
83
- # Get multiple location objects across all companies.
84
- # An 'Location' represents a physical address where a company does business.
85
- # Many taxing authorities require that you define a list of all locations where your company does business.
86
- # These locations may require additional custom configuration or tax registration with these authorities.
87
- # For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
88
- #
89
- # 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/) .
90
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
91
- #
92
- # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
93
- #
94
- # * LocationSettings
95
- #
96
- # ### Security Policies
97
- #
85
+ # Get multiple location objects across all companies.
86
+ # An 'Location' represents a physical address where a company does business.
87
+ # Many taxing authorities require that you define a list of all locations where your company does business.
88
+ # These locations may require additional custom configuration or tax registration with these authorities.
89
+ # For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
90
+ #
91
+ # 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/) .
92
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
93
+ #
94
+ # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
95
+ #
96
+ # * LocationSettings
97
+ # * parameters
98
+ #
99
+ # ### Security Policies
100
+ #
98
101
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
99
- # @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:* settings
100
- # @param include [String] A comma separated list of additional data to retrieve. You may specify `LocationSettings` to retrieve location settings.
101
- # @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
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
103
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
102
+ # @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:* settings, parameters
103
+ # @param include [String] A comma separated list of additional data to retrieve. You may specify `LocationSettings` to retrieve location settings.
104
+ # @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.
105
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
106
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
104
107
  # @return [FetchResult]
105
108
  def query_locations(options={}) path = "/api/v2/locations"
106
109
  get(path, options) end
107
110
 
108
111
  # Update a single location
109
112
  #
110
- # Replace the existing location object at this URL with an updated object.
111
- # All data from the existing object will be replaced with data in the object you PUT.
112
- # To set a field's value to null, you may either set its value to null or omit that field from the object you post.
113
- #
114
- # ### Security Policies
115
- #
113
+ # Replace the existing location object at this URL with an updated object.
114
+ # All data from the existing object will be replaced with data in the object you PUT.
115
+ # To set a field's value to null, you may either set its value to null or omit that field from the object you post.
116
+ #
117
+ # ### Security Policies
118
+ #
116
119
  # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
117
- # @param companyId [Integer] The ID of the company that this location belongs to.
118
- # @param id [Integer] The ID of the location you wish to update
119
- # @param model [Object] The location you wish to update.
120
+ # @param companyId [Integer] The ID of the company that this location belongs to.
121
+ # @param id [Integer] The ID of the location you wish to update
122
+ # @param model [Object] The location you wish to update.
120
123
  # @return [Object]
121
124
  def update_location(companyId, id, model) path = "/api/v2/companies/#{companyId}/locations/#{id}"
122
125
  put(path, model) end
123
126
 
124
127
  # Validate the location against local requirements
125
128
  #
126
- # Returns validation information for this location.
127
- # This API call is intended to compare this location against the currently known taxing authority rules and regulations,
128
- # and provide information about what additional work is required to completely setup this location.
129
- #
130
- # ### Security Policies
131
- #
129
+ # Returns validation information for this location.
130
+ # This API call is intended to compare this location against the currently known taxing authority rules and regulations,
131
+ # and provide information about what additional work is required to completely setup this location.
132
+ #
133
+ # ### Security Policies
134
+ #
132
135
  # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, FirmAdmin, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
133
- # @param companyId [Integer] The ID of the company that owns this location
134
- # @param id [Integer] The primary key of this location
136
+ # @param companyId [Integer] The ID of the company that owns this location
137
+ # @param id [Integer] The primary key of this location
135
138
  # @return [Object]
136
139
  def validate_location(companyId, id) path = "/api/v2/companies/#{companyId}/locations/#{id}/validate"
137
140
  get(path) end
@@ -5,304 +5,364 @@ module AvaTax
5
5
 
6
6
  # Adjust a MultiDocument transaction
7
7
  #
8
- # Adjusts the current MultiDocument transaction uniquely identified by this URL.
9
- #
10
- # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
11
- # sales, purchases, inventory transfer, and returns (also called refunds).
12
- #
13
- # When you adjust a transaction, that transaction's status is recorded as `Adjusted`.
14
- #
15
- # Both the revisions will be available for retrieval based on their code and ID numbers. Only transactions in Committed status can be reported on a tax filing by Avalara's Managed Returns Service.
16
- #
17
- # Transactions that have been previously reported to a tax authority by Avalara Managed Returns are considered locked and are no longer available for adjustments.
18
- #
19
- # ### Security Policies
20
- #
21
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
8
+ # Adjusts the current MultiDocument transaction uniquely identified by this URL.
9
+ #
10
+ # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
11
+ # sales, purchases, inventory transfer, and returns (also called refunds).
12
+ #
13
+ # When you adjust a transaction, that transaction's status is recorded as `Adjusted`.
14
+ #
15
+ # Both the revisions will be available for retrieval based on their code and ID numbers. Only transactions in Committed status can be reported on a tax filing by Avalara's Managed Returns Service.
16
+ #
17
+ # Transactions that have been previously reported to a tax authority by Avalara Managed Returns are considered locked and are no longer available for adjustments.
18
+ #
19
+ # NOTE: If your companyCode or transactionCode contains any of these characters /, +, ? or a space please use the following encoding before making a request:
20
+ # * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
21
+ # * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
22
+ # * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
23
+ # * Replace ' ' with '%20' For example: document Code becomes document%20Code
24
+ #
25
+ # ### Security Policies
26
+ #
27
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
22
28
  # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
23
- # @param code [String] The transaction code for this MultiDocument transaction
24
- # @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
25
- # @param include [String] Specifies objects to include in this fetch call
26
- # @param model [Object] The adjust request you wish to execute
29
+ # @param code [String] The transaction code for this MultiDocument transaction
30
+ # @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
31
+ # @param include [String] Specifies objects to include in this fetch call
32
+ # @param model [Object] The adjust request you wish to execute
27
33
  # @return [Object]
28
34
  def adjust_multi_document_transaction(code, type, model, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/adjust"
29
35
  post(path, model, options) end
30
36
 
31
37
  # Get audit information about a MultiDocument transaction
32
38
  #
33
- # Retrieve audit information about a MultiDocument transaction stored in AvaTax.
34
- #
35
- # The audit API retrieves audit information related to a specific MultiDocument transaction. This audit
36
- # information includes the following:
37
- #
38
- # * The `code` of the MultiDocument transaction
39
- # * The `type` of the MultiDocument transaction
40
- # * The server timestamp representing the exact server time when the transaction was created
41
- # * The server duration - how long it took to process this transaction
42
- # * Whether exact API call details were logged
43
- # * A reconstructed API call showing what the original create call looked like
44
- #
45
- # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
46
- # sales, purchases, inventory transfer, and returns (also called refunds).
47
- #
48
- # ### Security Policies
49
- #
50
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
39
+ # Retrieve audit information about a MultiDocument transaction stored in AvaTax.
40
+ #
41
+ # The audit API retrieves audit information related to a specific MultiDocument transaction. This audit
42
+ # information includes the following:
43
+ #
44
+ # * The `code` of the MultiDocument transaction
45
+ # * The `type` of the MultiDocument transaction
46
+ # * The server timestamp representing the exact server time when the transaction was created
47
+ # * The server duration - how long it took to process this transaction
48
+ # * Whether exact API call details were logged
49
+ # * A reconstructed API call showing what the original create call looked like
50
+ #
51
+ # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
52
+ # sales, purchases, inventory transfer, and returns (also called refunds).
53
+ #
54
+ # NOTE: If your companyCode or transactionCode contains any of these characters /, +, ? or a space please use the following encoding before making a request:
55
+ # * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
56
+ # * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
57
+ # * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
58
+ # * Replace ' ' with '%20' For example: document Code becomes document%20Code
59
+ #
60
+ # ### Security Policies
61
+ #
62
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
51
63
  # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
52
- # @param code [String] The transaction code for this MultiDocument transaction
53
- # @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
64
+ # @param code [String] The transaction code for this MultiDocument transaction
65
+ # @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
54
66
  # @return [Object]
55
67
  def audit_multi_document_transaction(code, type) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/audit"
56
68
  get(path) end
57
69
 
58
70
  # Commit a MultiDocument transaction
59
71
  #
60
- # Marks a list of transactions by changing its status to `Committed`.
61
- #
62
- # Transactions that are committed are available to be reported to a tax authority by Avalara Managed Returns.
63
- #
64
- # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
65
- # sales, purchases, inventory transfer, and returns (also called refunds).
66
- #
67
- # Any changes made to a committed transaction will generate a transaction history.
68
- #
69
- # ### Security Policies
70
- #
71
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
72
+ # Marks a list of transactions by changing its status to `Committed`.
73
+ #
74
+ # Transactions that are committed are available to be reported to a tax authority by Avalara Managed Returns.
75
+ #
76
+ # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
77
+ # sales, purchases, inventory transfer, and returns (also called refunds).
78
+ #
79
+ # Any changes made to a committed transaction will generate a transaction history.
80
+ #
81
+ # NOTE: If your companyCode or transactionCode contains any of these characters /, +, ? or a space please use the following encoding before making a request:
82
+ # * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
83
+ # * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
84
+ # * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
85
+ # * Replace ' ' with '%20' For example: document Code becomes document%20Code
86
+ #
87
+ # ### Security Policies
88
+ #
89
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
72
90
  # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
73
- # @param model [Object] The commit request you wish to execute
91
+ # @param model [Object] The commit request you wish to execute
74
92
  # @return [Object]
75
93
  def commit_multi_document_transaction(model) path = "/api/v2/transactions/multidocument/commit"
76
94
  post(path, model) end
77
95
 
78
96
  # Create a new MultiDocument transaction
79
97
  #
80
- # Records a new MultiDocument transaction in AvaTax.
81
- #
82
- # A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can
83
- # involve a marketplace of vendors, each of which contributes some portion of the final transaction. Within
84
- # a MultiDocument transaction, each individual buyer and seller pair are matched up and converted to a separate
85
- # document. This separation of documents allows each seller to file their taxes separately.
86
- #
87
- # This API will report an error if you attempt to create a transaction when one already exists with the specified `code`.
88
- # If you would like the API to automatically update the transaction when it already exists, please set the `allowAdjust`
89
- # value to `true`.
90
- #
91
- # To generate a refund for a transaction, use the `RefundTransaction` API.
92
- #
93
- # The field `type` identifies the kind of transaction - for example, a sale, purchase, or refund. If you do not specify
94
- # a `type` value, you will receive an estimate of type `SalesOrder`, which will not be recorded.
95
- #
96
- # The origin and destination locations for a transaction must be identified by either address or geocode. For address-based transactions, please
97
- # provide addresses in the fields `line`, `city`, `region`, `country` and `postalCode`. For geocode-based transactions, please provide the geocode
98
- # information in the fields `latitude` and `longitude`. If either `latitude` or `longitude` or both are null, the transaction will be calculated
99
- # using the best available address location information.
100
- #
101
- # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
102
- #
103
- # * Lines
104
- # * Details (implies lines)
105
- # * Summary (implies details)
106
- # * Addresses
107
- # * SummaryOnly (omit lines and details - reduces API response size)
108
- # * LinesOnly (omit details - reduces API response size)
109
- # * ForceTimeout - Simulates a timeout. This adds a 30 second delay and error to your API call. This can be used to test your code to ensure it can respond correctly in the case of a dropped connection.
110
- #
111
- # If you omit the `$include` parameter, the API will assume you want `Summary,Addresses`.
112
- #
113
- # ### Security Policies
114
- #
115
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
98
+ # Records a new MultiDocument transaction in AvaTax.
99
+ #
100
+ # A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can
101
+ # involve a marketplace of vendors, each of which contributes some portion of the final transaction. Within
102
+ # a MultiDocument transaction, each individual buyer and seller pair are matched up and converted to a separate
103
+ # document. This separation of documents allows each seller to file their taxes separately.
104
+ #
105
+ # This API will report an error if you attempt to create a transaction when one already exists with the specified `code`.
106
+ # If you would like the API to automatically update the transaction when it already exists, please set the `allowAdjust`
107
+ # value to `true`.
108
+ #
109
+ # To generate a refund for a transaction, use the `RefundTransaction` API.
110
+ #
111
+ # The field `type` identifies the kind of transaction - for example, a sale, purchase, or refund. If you do not specify
112
+ # a `type` value, you will receive an estimate of type `SalesOrder`, which will not be recorded.
113
+ #
114
+ # The origin and destination locations for a transaction must be identified by either address or geocode. For address-based transactions, please
115
+ # provide addresses in the fields `line`, `city`, `region`, `country` and `postalCode`. For geocode-based transactions, please provide the geocode
116
+ # information in the fields `latitude` and `longitude`. If either `latitude` or `longitude` or both are null, the transaction will be calculated
117
+ # using the best available address location information.
118
+ #
119
+ # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
120
+ #
121
+ # * Lines
122
+ # * Details (implies lines)
123
+ # * Summary (implies details)
124
+ # * Addresses
125
+ # * SummaryOnly (omit lines and details - reduces API response size)
126
+ # * LinesOnly (omit details - reduces API response size)
127
+ # * ForceTimeout - Simulates a timeout. This adds a 30 second delay and error to your API call. This can be used to test your code to ensure it can respond correctly in the case of a dropped connection.
128
+ #
129
+ # If you omit the `$include` parameter, the API will assume you want `Summary,Addresses`.
130
+ #
131
+ # NOTE: If your companyCode or transactionCode contains any of these characters /, +, ? or a space please use the following encoding before making a request:
132
+ # * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
133
+ # * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
134
+ # * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
135
+ # * Replace ' ' with '%20' For example: document Code becomes document%20Code
136
+ #
137
+ # ### Security Policies
138
+ #
139
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
116
140
  # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
117
- # @param include [String] Specifies objects to include in the response after transaction is created
118
- # @param model [Object] the multi document transaction model
141
+ # @param include [String] Specifies objects to include in the response after transaction is created
142
+ # @param model [Object] the multi document transaction model
119
143
  # @return [Object]
120
144
  def create_multi_document_transaction(model, options={}) path = "/api/v2/transactions/multidocument"
121
145
  post(path, model, options) end
122
146
 
123
147
  # Retrieve a MultiDocument transaction
124
148
  #
125
- # Get the current MultiDocument transaction identified by this URL.
126
- #
127
- # If this transaction was adjusted, the return value of this API will be the current transaction with this code.
128
- #
129
- # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
130
- #
131
- # * Lines
132
- # * Details (implies lines)
133
- # * Summary (implies details)
134
- # * Addresses
135
- # * SummaryOnly (omit lines and details - reduces API response size)
136
- # * LinesOnly (omit details - reduces API response size)
137
- #
138
- # ### Security Policies
139
- #
140
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
149
+ # Get the current MultiDocument transaction identified by this URL.
150
+ #
151
+ # If this transaction was adjusted, the return value of this API will be the current transaction with this code.
152
+ #
153
+ # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
154
+ #
155
+ # * Lines
156
+ # * Details (implies lines)
157
+ # * Summary (implies details)
158
+ # * Addresses
159
+ # * SummaryOnly (omit lines and details - reduces API response size)
160
+ # * LinesOnly (omit details - reduces API response size)
161
+ #
162
+ # NOTE: If your companyCode or transactionCode contains any of these characters /, +, ? or a space please use the following encoding before making a request:
163
+ # * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
164
+ # * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
165
+ # * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
166
+ # * Replace ' ' with '%20' For example: document Code becomes document%20Code
167
+ #
168
+ # ### Security Policies
169
+ #
170
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
141
171
  # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
142
- # @param code [String]
143
- # @param type [String] (See DocumentType::* for a list of allowable values)
144
- # @param include [String] Specifies objects to include in the response after transaction is created
172
+ # @param code [String]
173
+ # @param type [String] (See DocumentType::* for a list of allowable values)
174
+ # @param include [String] Specifies objects to include in the response after transaction is created
145
175
  # @return [Object]
146
176
  def get_multi_document_transaction_by_code_and_type(code, type, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}"
147
177
  get(path, options) end
148
178
 
149
179
  # Retrieve a MultiDocument transaction by ID
150
180
  #
151
- # Get the unique MultiDocument transaction identified by this URL.
152
- #
153
- # A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can
154
- # involve a marketplace of vendors, each of which contributes some portion of the final transaction. Within
155
- # a MultiDocument transaction, each individual buyer and seller pair are matched up and converted to a separate
156
- # document. This separation of documents allows each seller to file their taxes separately.
157
- #
158
- # This endpoint retrieves the exact transaction identified by this ID number even if that transaction was later adjusted
159
- # by using the `AdjustTransaction` endpoint.
160
- #
161
- # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
162
- # sales, purchases, inventory transfer, and returns (also called refunds).
163
- #
164
- # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
165
- #
166
- # * Lines
167
- # * Details (implies lines)
168
- # * Summary (implies details)
169
- # * Addresses
170
- # * SummaryOnly (omit lines and details - reduces API response size)
171
- # * LinesOnly (omit details - reduces API response size)
172
- #
173
- # ### Security Policies
174
- #
175
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
181
+ # Get the unique MultiDocument transaction identified by this URL.
182
+ #
183
+ # A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can
184
+ # involve a marketplace of vendors, each of which contributes some portion of the final transaction. Within
185
+ # a MultiDocument transaction, each individual buyer and seller pair are matched up and converted to a separate
186
+ # document. This separation of documents allows each seller to file their taxes separately.
187
+ #
188
+ # This endpoint retrieves the exact transaction identified by this ID number even if that transaction was later adjusted
189
+ # by using the `AdjustTransaction` endpoint.
190
+ #
191
+ # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
192
+ # sales, purchases, inventory transfer, and returns (also called refunds).
193
+ #
194
+ # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
195
+ #
196
+ # * Lines
197
+ # * Details (implies lines)
198
+ # * Summary (implies details)
199
+ # * Addresses
200
+ # * SummaryOnly (omit lines and details - reduces API response size)
201
+ # * LinesOnly (omit details - reduces API response size)
202
+ #
203
+ # NOTE: If your companyCode or transactionCode contains any of these characters /, +, ? or a space please use the following encoding before making a request:
204
+ # * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
205
+ # * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
206
+ # * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
207
+ # * Replace ' ' with '%20' For example: document Code becomes document%20Code
208
+ #
209
+ # ### Security Policies
210
+ #
211
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
176
212
  # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
177
- # @param id [Integer] The unique ID number of the MultiDocument transaction to retrieve
178
- # @param include [String] Specifies objects to include in the response after transaction is created
213
+ # @param id [Integer] The unique ID number of the MultiDocument transaction to retrieve
214
+ # @param include [String] Specifies objects to include in the response after transaction is created
179
215
  # @return [Object]
180
216
  def get_multi_document_transaction_by_id(id, options={}) path = "/api/v2/transactions/multidocument/#{id}"
181
217
  get(path, options) end
182
218
 
183
219
  # Retrieve all MultiDocument transactions
184
220
  #
185
- # List all MultiDocument transactions within this account.
186
- #
187
- # This endpoint is limited to returning 1,000 MultiDocument transactions at a time. To retrieve more than 1,000 MultiDocument
188
- # transactions, please use the pagination features of the API.
189
- #
190
- # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
191
- # sales, purchases, inventory transfer, and returns (also called refunds).
192
- #
193
- # 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/) .
194
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
195
- #
196
- # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
197
- #
198
- # * Lines
199
- # * Details (implies lines)
200
- # * Summary (implies details)
201
- # * Addresses
202
- # * SummaryOnly (omit lines and details - reduces API response size)
203
- # * LinesOnly (omit details - reduces API response size)
204
- #
205
- # ### Security Policies
206
- #
207
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
221
+ # List all MultiDocument transactions within this account.
222
+ #
223
+ # This endpoint is limited to returning 1,000 MultiDocument transactions at a time. To retrieve more than 1,000 MultiDocument
224
+ # transactions, please use the pagination features of the API.
225
+ #
226
+ # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
227
+ # sales, purchases, inventory transfer, and returns (also called refunds).
228
+ #
229
+ # 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/) .
230
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
231
+ #
232
+ # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
233
+ #
234
+ # * Lines
235
+ # * Details (implies lines)
236
+ # * Summary (implies details)
237
+ # * Addresses
238
+ # * SummaryOnly (omit lines and details - reduces API response size)
239
+ # * LinesOnly (omit details - reduces API response size)
240
+ #
241
+ # NOTE: If your companyCode or transactionCode contains any of these characters /, +, ? or a space please use the following encoding before making a request:
242
+ # * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
243
+ # * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
244
+ # * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
245
+ # * Replace ' ' with '%20' For example: document Code becomes document%20Code
246
+ #
247
+ # ### Security Policies
248
+ #
249
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
208
250
  # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
209
- # @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:* documents
210
- # @param include [String] Specifies objects to include in the response after transaction is created
211
- # @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.
212
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
213
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
251
+ # @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:* documents
252
+ # @param include [String] Specifies objects to include in the response after transaction is created
253
+ # @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.
254
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
255
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
214
256
  # @return [FetchResult]
215
257
  def list_multi_document_transactions(options={}) path = "/api/v2/transactions/multidocument"
216
258
  get(path, options) end
217
259
 
218
260
  # Create a refund for a MultiDocument transaction
219
261
  #
220
- # Create a refund for a MultiDocument transaction.
221
- #
222
- # A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can
223
- # involve a marketplace of vendors, each of which contributes some portion of the final transaction. Within
224
- # a MultiDocument transaction, each individual buyer and seller pair are matched up and converted to a separate
225
- # document. This separation of documents allows each seller to file their taxes separately.
226
- #
227
- # The `RefundTransaction` API allows you to quickly and easily create a `ReturnInvoice` representing a refund
228
- # for a previously created `SalesInvoice` transaction. You can choose to create a full or partial refund, and
229
- # specify individual line items from the original sale for refund.
230
- #
231
- # The `RefundTransaction` API ensures that the tax amount you refund to the customer exactly matches the tax that
232
- # was calculated during the original transaction, regardless of any changes to your company's configuration, rules,
233
- # nexus, or any other setting.
234
- #
235
- # This API is intended to be a shortcut to allow you to quickly and accurately generate a refund for the following
236
- # common refund scenarios:
237
- #
238
- # * A full refund of a previous sale
239
- # * Refunding the tax that was charged on a previous sale, when the customer provides an exemption certificate after the purchase
240
- # * Refunding one or more items (lines) from a previous sale
241
- # * Granting a customer a percentage refund of a previous sale
242
- #
243
- # For more complex scenarios than the ones above, please use `CreateTransaction` with document type `ReturnInvoice` to
244
- # create a custom refund transaction.
245
- #
246
- # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
247
- #
248
- # * Lines
249
- # * Details (implies lines)
250
- # * Summary (implies details)
251
- # * Addresses
252
- # * SummaryOnly (omit lines and details - reduces API response size)
253
- # * LinesOnly (omit details - reduces API response size)
254
- #
255
- # If you omit the `$include` parameter, the API will assume you want `Summary,Addresses`.
256
- #
257
- # ### Security Policies
258
- #
259
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
262
+ # Create a refund for a MultiDocument transaction.
263
+ #
264
+ # A traditional transaction requires exactly two parties: a seller and a buyer. MultiDocument transactions can
265
+ # involve a marketplace of vendors, each of which contributes some portion of the final transaction. Within
266
+ # a MultiDocument transaction, each individual buyer and seller pair are matched up and converted to a separate
267
+ # document. This separation of documents allows each seller to file their taxes separately.
268
+ #
269
+ # The `RefundTransaction` API allows you to quickly and easily create a `ReturnInvoice` representing a refund
270
+ # for a previously created `SalesInvoice` transaction. You can choose to create a full or partial refund, and
271
+ # specify individual line items from the original sale for refund.
272
+ #
273
+ # The `RefundTransaction` API ensures that the tax amount you refund to the customer exactly matches the tax that
274
+ # was calculated during the original transaction, regardless of any changes to your company's configuration, rules,
275
+ # nexus, or any other setting.
276
+ #
277
+ # This API is intended to be a shortcut to allow you to quickly and accurately generate a refund for the following
278
+ # common refund scenarios:
279
+ #
280
+ # * A full refund of a previous sale
281
+ # * Refunding the tax that was charged on a previous sale, when the customer provides an exemption certificate after the purchase
282
+ # * Refunding one or more items (lines) from a previous sale
283
+ # * Granting a customer a percentage refund of a previous sale
284
+ #
285
+ # For more complex scenarios than the ones above, please use `CreateTransaction` with document type `ReturnInvoice` to
286
+ # create a custom refund transaction.
287
+ #
288
+ # You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
289
+ #
290
+ # * Lines
291
+ # * Details (implies lines)
292
+ # * Summary (implies details)
293
+ # * Addresses
294
+ # * SummaryOnly (omit lines and details - reduces API response size)
295
+ # * LinesOnly (omit details - reduces API response size)
296
+ #
297
+ # If you omit the `$include` parameter, the API will assume you want `Summary,Addresses`.
298
+ #
299
+ # NOTE: If your companyCode or transactionCode contains any of these characters /, +, ? or a space please use the following encoding before making a request:
300
+ # * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
301
+ # * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
302
+ # * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
303
+ # * Replace ' ' with '%20' For example: document Code becomes document%20Code
304
+ #
305
+ # ### Security Policies
306
+ #
307
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
260
308
  # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
261
- # @param code [String] The code of this MultiDocument transaction
262
- # @param type [String] The type of this MultiDocument transaction (See DocumentType::* for a list of allowable values)
263
- # @param include [String] Specifies objects to include in the response after transaction is created
264
- # @param model [Object] Information about the refund to create
309
+ # @param code [String] The code of this MultiDocument transaction
310
+ # @param type [String] The type of this MultiDocument transaction (See DocumentType::* for a list of allowable values)
311
+ # @param include [String] Specifies objects to include in the response after transaction is created
312
+ # @param model [Object] Information about the refund to create
265
313
  # @return [Object]
266
314
  def refund_multi_document_transaction(code, type, model, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/refund"
267
315
  post(path, model, options) end
268
316
 
269
317
  # Verify a MultiDocument transaction
270
318
  #
271
- # Verifies that the MultiDocument transaction uniquely identified by this URL matches certain expected values.
272
- #
273
- # If the transaction does not match these expected values, this API will return an error code indicating which value did not match.
274
- #
275
- # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
276
- # sales, purchases, inventory transfer, and returns (also called refunds).
277
- #
278
- # ### Security Policies
279
- #
280
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
319
+ # Verifies that the MultiDocument transaction uniquely identified by this URL matches certain expected values.
320
+ #
321
+ # If the transaction does not match these expected values, this API will return an error code indicating which value did not match.
322
+ #
323
+ # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
324
+ # sales, purchases, inventory transfer, and returns (also called refunds).
325
+ #
326
+ # NOTE: If your companyCode or transactionCode contains any of these characters /, +, ? or a space please use the following encoding before making a request:
327
+ # * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
328
+ # * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
329
+ # * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
330
+ # * Replace ' ' with '%20' For example: document Code becomes document%20Code
331
+ #
332
+ # ### Security Policies
333
+ #
334
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
281
335
  # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
282
- # @param model [Object] Information from your accounting system to verify against this MultiDocument transaction as it is stored in AvaTax
336
+ # @param model [Object] Information from your accounting system to verify against this MultiDocument transaction as it is stored in AvaTax
283
337
  # @return [Object]
284
338
  def verify_multi_document_transaction(model) path = "/api/v2/transactions/multidocument/verify"
285
339
  post(path, model) end
286
340
 
287
341
  # Void a MultiDocument transaction
288
342
  #
289
- # Voids the current transaction uniquely identified by this URL.
290
- #
291
- # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
292
- # sales, purchases, inventory transfer, and returns (also called refunds).
293
- #
294
- # When you void a transaction, that transaction's status is recorded as `DocVoided`.
295
- #
296
- # Transactions that have been previously reported to a tax authority by Avalara Managed Returns Service are considered `locked`,
297
- # and they are no longer available to be voided.
298
- #
299
- # ### Security Policies
300
- #
301
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
343
+ # Voids the current transaction uniquely identified by this URL.
344
+ #
345
+ # A transaction represents a unique potentially taxable action that your company has recorded, and transactions include actions like
346
+ # sales, purchases, inventory transfer, and returns (also called refunds).
347
+ #
348
+ # When you void a transaction, that transaction's status is recorded as `DocVoided`.
349
+ #
350
+ # Transactions that have been previously reported to a tax authority by Avalara Managed Returns Service are considered `locked`,
351
+ # and they are no longer available to be voided.
352
+ #
353
+ # NOTE: If your companyCode or transactionCode contains any of these characters /, +, ? or a space please use the following encoding before making a request:
354
+ # * Replace '/' with '\_-ava2f-\_' For example: document/Code becomes document_-ava2f-_Code
355
+ # * Replace '+' with '\_-ava2b-\_' For example: document+Code becomes document_-ava2b-_Code
356
+ # * Replace '?' with '\_-ava3f-\_' For example: document?Code becomes document_-ava3f-_Code
357
+ # * Replace ' ' with '%20' For example: document Code becomes document%20Code
358
+ #
359
+ # ### Security Policies
360
+ #
361
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, CompanyAdmin, CSPTester, ProStoresOperator, SSTAdmin, TechnicalSupportAdmin.
302
362
  # * This API depends on the following active services<br />*Required* (all): AvaTaxPro.
303
- # @param code [String] The transaction code for this MultiDocument transaction
304
- # @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
305
- # @param model [Object] The void request you wish to execute
363
+ # @param code [String] The transaction code for this MultiDocument transaction
364
+ # @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values)
365
+ # @param model [Object] The void request you wish to execute
306
366
  # @return [Object]
307
367
  def void_multi_document_transaction(code, type, model) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/void"
308
368
  post(path, model) end