avatax 17.5.0 → 17.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,153 +3,116 @@ module AvaTax
3
3
  module Locations
4
4
 
5
5
 
6
- # Point of sale data file generation
7
- #
8
- # Builds a point-of-sale data file containing tax rates and rules for this location, containing tax rates for all
9
- # items defined for this company. This data file can be used to correctly calculate tax in the event a
10
- # point-of-sale device is not able to reach AvaTax.
11
- # This data file can be customized for specific partner devices and usage conditions.
12
- # The result of this API is the file you requested in the format you requested using the 'responseType' field.
13
- # This API builds the file on demand, and is limited to a maximum of 7500 items.
14
- #
15
- # @param int companyId The ID number of the company that owns this location.
16
- # @param int id The ID number of the location to retrieve point-of-sale data.
17
- # @param string date The date for which point-of-sale data would be calculated (today by default)
18
- # @param string format The format of the file (JSON by default) (See PointOfSaleFileType::* for a list of allowable values)
19
- # @param string partnerId If specified, requests a custom partner-formatted version of the file. (See PointOfSalePartnerId::* for a list of allowable values)
20
- # @param boolean includeJurisCodes When true, the file will include jurisdiction codes in the result.
21
- # @return FileResult
22
- def build_point_of_sale_data_for_location(companyId, id, options={})
23
- path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata"
24
-
25
- get(path, options)
26
- end
27
-
28
-
29
6
  # Create a new location
30
- #
7
+ #
31
8
  # Create one or more new location objects attached to this company.
32
- #
33
- # @param int companyId The ID of the company that owns this location.
34
- # @param LocationModel[] model The location you wish to create.
35
- # @return LocationModel[]
9
+ # @param companyId [Integer] The ID of the company that owns this location.
10
+ # @param model [object[]] The location you wish to create.
11
+ # @return [object[]]
36
12
  def create_locations(companyId, model)
37
13
  path = "/api/v2/companies/#{companyId}/locations"
38
-
39
14
  post(path, model)
40
15
  end
41
16
 
42
17
 
43
18
  # Delete a single location
44
- #
19
+ #
45
20
  # Mark the location object at this URL as deleted.
46
- #
47
- # @param int companyId The ID of the company that owns this location.
48
- # @param int id The ID of the location you wish to delete.
49
- # @return ErrorDetail[]
21
+ # @param companyId [Integer] The ID of the company that owns this location.
22
+ # @param id [Integer] The ID of the location you wish to delete.
23
+ # @return [object[]]
50
24
  def delete_location(companyId, id)
51
25
  path = "/api/v2/companies/#{companyId}/locations/#{id}"
52
-
53
26
  delete(path)
54
27
  end
55
28
 
56
29
 
57
30
  # Retrieve a single location
58
- #
31
+ #
59
32
  # Get the location object identified by this URL.
60
33
  # An 'Location' represents a physical address where a company does business.
61
34
  # Many taxing authorities require that you define a list of all locations where your company does business.
62
35
  # These locations may require additional custom configuration or tax registration with these authorities.
63
36
  # For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
64
- #
65
- # @param int companyId The ID of the company that owns this location
66
- # @param int id The primary key of this location
67
- # @return LocationModel
37
+ # @param companyId [Integer] The ID of the company that owns this location
38
+ # @param id [Integer] The primary key of this location
39
+ # @return [Object]
68
40
  def get_location(companyId, id)
69
41
  path = "/api/v2/companies/#{companyId}/locations/#{id}"
70
-
71
42
  get(path)
72
43
  end
73
44
 
74
45
 
75
46
  # Retrieve locations for this company
76
- #
47
+ #
77
48
  # List all location objects defined for this company.
78
49
  # An 'Location' represents a physical address where a company does business.
79
50
  # Many taxing authorities require that you define a list of all locations where your company does business.
80
51
  # These locations may require additional custom configuration or tax registration with these authorities.
81
52
  # For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
82
- #
53
+ #
83
54
  # 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/) .
84
55
  # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
85
- #
86
- # @param int companyId The ID of the company that owns these locations
87
- # @param string filter 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/) .
88
- # @param string include A comma separated list of child objects to return underneath the primary object.
89
- # @param int top If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
90
- # @param int skip If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
91
- # @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
92
- # @return FetchResult
56
+ # @param companyId [Integer] The ID of the company that owns these locations
57
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
58
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
59
+ # @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
60
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
61
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
62
+ # @return [FetchResult]
93
63
  def list_locations_by_company(companyId, options={})
94
64
  path = "/api/v2/companies/#{companyId}/locations"
95
-
96
65
  get(path, options)
97
66
  end
98
67
 
99
68
 
100
69
  # Retrieve all locations
101
- #
70
+ #
102
71
  # Get multiple location objects across all companies.
103
72
  # An 'Location' represents a physical address where a company does business.
104
73
  # Many taxing authorities require that you define a list of all locations where your company does business.
105
74
  # These locations may require additional custom configuration or tax registration with these authorities.
106
75
  # For more information on metadata requirements, see the '/api/v2/definitions/locationquestions' API.
107
- #
76
+ #
108
77
  # 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/) .
109
78
  # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
110
- #
111
- # @param string filter 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/) .
112
- # @param string include A comma separated list of child objects to return underneath the primary object.
113
- # @param int top If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
114
- # @param int skip If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
115
- # @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
116
- # @return FetchResult
79
+ # @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/) .
80
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
81
+ # @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
82
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
83
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
84
+ # @return [FetchResult]
117
85
  def query_locations(options={})
118
86
  path = "/api/v2/locations"
119
-
120
87
  get(path, options)
121
88
  end
122
89
 
123
90
 
124
91
  # Update a single location
125
- #
92
+ #
126
93
  # Replace the existing location object at this URL with an updated object.
127
- # All data from the existing object will be replaced with data in the object you PUT.
94
+ # All data from the existing object will be replaced with data in the object you PUT.
128
95
  # 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.
129
- #
130
- # @param int companyId The ID of the company that this location belongs to.
131
- # @param int id The ID of the location you wish to update
132
- # @param LocationModel model The location you wish to update.
133
- # @return LocationModel
96
+ # @param companyId [Integer] The ID of the company that this location belongs to.
97
+ # @param id [Integer] The ID of the location you wish to update
98
+ # @param model [Object] The location you wish to update.
99
+ # @return [Object]
134
100
  def update_location(companyId, id, model)
135
101
  path = "/api/v2/companies/#{companyId}/locations/#{id}"
136
-
137
102
  put(path, model)
138
103
  end
139
104
 
140
105
 
141
106
  # Validate the location against local requirements
142
- #
107
+ #
143
108
  # Returns validation information for this location.
144
109
  # This API call is intended to compare this location against the currently known taxing authority rules and regulations,
145
110
  # and provide information about what additional work is required to completely setup this location.
146
- #
147
- # @param int companyId The ID of the company that owns this location
148
- # @param int id The primary key of this location
149
- # @return LocationValidationModel
111
+ # @param companyId [Integer] The ID of the company that owns this location
112
+ # @param id [Integer] The primary key of this location
113
+ # @return [Object]
150
114
  def validate_location(companyId, id)
151
115
  path = "/api/v2/companies/#{companyId}/locations/#{id}/validate"
152
-
153
116
  get(path)
154
117
  end
155
118
 
@@ -4,7 +4,7 @@ module AvaTax
4
4
 
5
5
 
6
6
  # Create a new nexus
7
- #
7
+ #
8
8
  # Creates one or more new nexus objects attached to this company.
9
9
  # The concept of 'Nexus' indicates a place where your company has sufficient physical presence and is obligated
10
10
  # to collect and remit transaction-based taxes.
@@ -13,124 +13,112 @@ module AvaTax
13
13
  # Note that not all fields within a nexus can be updated; Avalara publishes a list of all defined nexus at the
14
14
  # '/api/v2/definitions/nexus' endpoint.
15
15
  # You may only define nexus matching the official list of declared nexus.
16
- #
17
- # @param int companyId The ID of the company that owns this nexus.
18
- # @param NexusModel[] model The nexus you wish to create.
19
- # @return NexusModel[]
16
+ # @param companyId [Integer] The ID of the company that owns this nexus.
17
+ # @param model [object[]] The nexus you wish to create.
18
+ # @return [object[]]
20
19
  def create_nexus(companyId, model)
21
20
  path = "/api/v2/companies/#{companyId}/nexus"
22
-
23
21
  post(path, model)
24
22
  end
25
23
 
26
24
 
27
25
  # Delete a single nexus
28
- #
26
+ #
29
27
  # Marks the existing nexus object at this URL as deleted.
30
- #
31
- # @param int companyId The ID of the company that owns this nexus.
32
- # @param int id The ID of the nexus you wish to delete.
33
- # @return ErrorDetail[]
28
+ # @param companyId [Integer] The ID of the company that owns this nexus.
29
+ # @param id [Integer] The ID of the nexus you wish to delete.
30
+ # @return [object[]]
34
31
  def delete_nexus(companyId, id)
35
32
  path = "/api/v2/companies/#{companyId}/nexus/#{id}"
36
-
37
33
  delete(path)
38
34
  end
39
35
 
40
36
 
41
37
  # Retrieve a single nexus
42
- #
38
+ #
43
39
  # Get the nexus object identified by this URL.
44
40
  # The concept of 'Nexus' indicates a place where your company has sufficient physical presence and is obligated
45
41
  # to collect and remit transaction-based taxes.
46
42
  # When defining companies in AvaTax, you must declare nexus for your company in order to correctly calculate tax
47
43
  # in all jurisdictions affected by your transactions.
48
- #
49
- # @param int companyId The ID of the company that owns this nexus object
50
- # @param int id The primary key of this nexus
51
- # @return NexusModel
44
+ # @param companyId [Integer] The ID of the company that owns this nexus object
45
+ # @param id [Integer] The primary key of this nexus
46
+ # @return [Object]
52
47
  def get_nexus(companyId, id)
53
48
  path = "/api/v2/companies/#{companyId}/nexus/#{id}"
54
-
55
49
  get(path)
56
50
  end
57
51
 
58
52
 
59
53
  # List company nexus related to a tax form
60
- #
54
+ #
61
55
  # Retrieves a list of nexus related to a tax form.
62
- #
56
+ #
63
57
  # The concept of `Nexus` indicates a place where your company has sufficient physical presence and is obligated
64
58
  # to collect and remit transaction-based taxes.
65
- #
59
+ #
66
60
  # When defining companies in AvaTax, you must declare nexus for your company in order to correctly calculate tax
67
61
  # in all jurisdictions affected by your transactions.
68
- #
62
+ #
69
63
  # This API is intended to provide useful information when examining a tax form. If you are about to begin filing
70
- # a tax form, you may want to know whether you have declared nexus in all the jurisdictions related to that tax
64
+ # a tax form, you may want to know whether you have declared nexus in all the jurisdictions related to that tax
71
65
  # form in order to better understand how the form will be filled out.
72
- #
73
- # @param int companyId The ID of the company that owns this nexus object
74
- # @param string formCode The form code that we are looking up the nexus for
75
- # @return NexusByTaxFormModel
66
+ # @param companyId [Integer] The ID of the company that owns this nexus object
67
+ # @param formCode [String] The form code that we are looking up the nexus for
68
+ # @return [Object]
76
69
  def get_nexus_by_form_code(companyId, formCode)
77
70
  path = "/api/v2/companies/#{companyId}/nexus/byform/#{formCode}"
78
-
79
71
  get(path)
80
72
  end
81
73
 
82
74
 
83
75
  # Retrieve nexus for this company
84
- #
76
+ #
85
77
  # List all nexus objects defined for this company.
86
78
  # The concept of 'Nexus' indicates a place where your company has sufficient physical presence and is obligated
87
79
  # to collect and remit transaction-based taxes.
88
80
  # When defining companies in AvaTax, you must declare nexus for your company in order to correctly calculate tax
89
81
  # in all jurisdictions affected by your transactions.
90
- #
82
+ #
91
83
  # 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
84
  # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
93
- #
94
- # @param int companyId The ID of the company that owns these nexus objects
95
- # @param string filter 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/) .
96
- # @param string include A comma separated list of child objects to return underneath the primary object.
97
- # @param int top If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
98
- # @param int skip If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
99
- # @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
100
- # @return FetchResult
85
+ # @param companyId [Integer] The ID of the company that owns these nexus objects
86
+ # @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/) .
87
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
88
+ # @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
89
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
90
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
91
+ # @return [FetchResult]
101
92
  def list_nexus_by_company(companyId, options={})
102
93
  path = "/api/v2/companies/#{companyId}/nexus"
103
-
104
94
  get(path, options)
105
95
  end
106
96
 
107
97
 
108
98
  # Retrieve all nexus
109
- #
99
+ #
110
100
  # Get multiple nexus objects across all companies.
111
101
  # The concept of 'Nexus' indicates a place where your company has sufficient physical presence and is obligated
112
102
  # to collect and remit transaction-based taxes.
113
103
  # When defining companies in AvaTax, you must declare nexus for your company in order to correctly calculate tax
114
104
  # in all jurisdictions affected by your transactions.
115
- #
105
+ #
116
106
  # 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/) .
117
107
  # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
118
- #
119
- # @param string filter 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/) .
120
- # @param string include A comma separated list of child objects to return underneath the primary object.
121
- # @param int top If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
122
- # @param int skip If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
123
- # @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
124
- # @return FetchResult
108
+ # @param filter [String] A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
109
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
110
+ # @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
111
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
112
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
113
+ # @return [FetchResult]
125
114
  def query_nexus(options={})
126
115
  path = "/api/v2/nexus"
127
-
128
116
  get(path, options)
129
117
  end
130
118
 
131
119
 
132
120
  # Update a single nexus
133
- #
121
+ #
134
122
  # Replace the existing nexus object at this URL with an updated object.
135
123
  # The concept of 'Nexus' indicates a place where your company has sufficient physical presence and is obligated
136
124
  # to collect and remit transaction-based taxes.
@@ -139,16 +127,14 @@ module AvaTax
139
127
  # Note that not all fields within a nexus can be updated; Avalara publishes a list of all defined nexus at the
140
128
  # '/api/v2/definitions/nexus' endpoint.
141
129
  # You may only define nexus matching the official list of declared nexus.
142
- # All data from the existing object will be replaced with data in the object you PUT.
130
+ # All data from the existing object will be replaced with data in the object you PUT.
143
131
  # 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.
144
- #
145
- # @param int companyId The ID of the company that this nexus belongs to.
146
- # @param int id The ID of the nexus you wish to update
147
- # @param NexusModel model The nexus object you wish to update.
148
- # @return NexusModel
132
+ # @param companyId [Integer] The ID of the company that this nexus belongs to.
133
+ # @param id [Integer] The ID of the nexus you wish to update
134
+ # @param model [Object] The nexus object you wish to update.
135
+ # @return [Object]
149
136
  def update_nexus(companyId, id, model)
150
137
  path = "/api/v2/companies/#{companyId}/nexus/#{id}"
151
-
152
138
  put(path, model)
153
139
  end
154
140
 
@@ -4,291 +4,291 @@ module AvaTax
4
4
 
5
5
 
6
6
  # Create a new notice comment.
7
- #
7
+ #
8
8
  # This API is available by invitation only.
9
9
  # 'Notice comments' are updates by the notice team on the work to be done and that has been done so far on a notice.
10
10
  # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
11
11
  # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
12
- #
13
- # @param int companyId The ID of the company that owns this notice.
14
- # @param int id The ID of the tax notice we are adding the comment for.
15
- # @param NoticeCommentModel[] model The notice comments you wish to create.
16
- # @return NoticeCommentModel[]
12
+ # @param companyId [Integer] The ID of the company that owns this notice.
13
+ # @param id [Integer] The ID of the tax notice we are adding the comment for.
14
+ # @param model [object[]] The notice comments you wish to create.
15
+ # @return [object[]]
17
16
  def create_notice_comment(companyId, id, model)
18
17
  path = "/api/v2/companies/#{companyId}/notices/#{id}/comments"
19
-
20
18
  post(path, model)
21
19
  end
22
20
 
23
21
 
24
22
  # Create a new notice finance details.
25
- #
23
+ #
26
24
  # This API is available by invitation only.
27
25
  # 'Notice finance details' is the categorical breakdown of the total charge levied by the tax authority on our customer,
28
26
  # as broken down in our "notice log" found in Workflow. Main examples of the categories are 'Tax Due', 'Interest', 'Penalty', 'Total Abated'.
29
27
  # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
30
28
  # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
31
- #
32
- # @param int companyId The ID of the company that owns this notice.
33
- # @param int id The ID of the notice added to the finance details.
34
- # @param NoticeFinanceModel[] model The notice finance details you wish to create.
35
- # @return NoticeFinanceModel[]
29
+ # @param companyId [Integer] The ID of the company that owns this notice.
30
+ # @param id [Integer] The ID of the notice added to the finance details.
31
+ # @param model [object[]] The notice finance details you wish to create.
32
+ # @return [object[]]
36
33
  def create_notice_finance_details(companyId, id, model)
37
34
  path = "/api/v2/companies/#{companyId}/notices/#{id}/financedetails"
38
-
39
35
  post(path, model)
40
36
  end
41
37
 
42
38
 
43
39
  # Create a new notice responsibility.
44
- #
40
+ #
45
41
  # This API is available by invitation only.
46
42
  # 'Notice comments' are updates by the notice team on the work to be done and that has been done so far on a notice.
47
43
  # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
48
44
  # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
49
- #
50
- # @param int companyId The ID of the company that owns this notice.
51
- # @param int id The ID of the tax notice we are adding the responsibility for.
52
- # @param NoticeResponsibilityDetailModel[] model The notice responsibilities you wish to create.
53
- # @return NoticeResponsibilityDetailModel[]
45
+ # @param companyId [Integer] The ID of the company that owns this notice.
46
+ # @param id [Integer] The ID of the tax notice we are adding the responsibility for.
47
+ # @param model [object[]] The notice responsibilities you wish to create.
48
+ # @return [object[]]
54
49
  def create_notice_responsibilities(companyId, id, model)
55
50
  path = "/api/v2/companies/#{companyId}/notices/#{id}/responsibilities"
56
-
57
51
  post(path, model)
58
52
  end
59
53
 
60
54
 
61
55
  # Create a new notice root cause.
62
- #
56
+ #
63
57
  # This API is available by invitation only.
64
58
  # 'Notice root causes' are are those who are responsible for the notice.
65
59
  # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
66
60
  # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
67
- #
68
- # @param int companyId The ID of the company that owns this notice.
69
- # @param int id The ID of the tax notice we are adding the responsibility for.
70
- # @param NoticeRootCauseDetailModel[] model The notice root causes you wish to create.
71
- # @return NoticeRootCauseDetailModel[]
61
+ # @param companyId [Integer] The ID of the company that owns this notice.
62
+ # @param id [Integer] The ID of the tax notice we are adding the responsibility for.
63
+ # @param model [object[]] The notice root causes you wish to create.
64
+ # @return [object[]]
72
65
  def create_notice_root_causes(companyId, id, model)
73
66
  path = "/api/v2/companies/#{companyId}/notices/#{id}/rootcauses"
74
-
75
67
  post(path, model)
76
68
  end
77
69
 
78
70
 
79
71
  # Create a new notice.
80
- #
72
+ #
81
73
  # This API is available by invitation only.
82
74
  # Create one or more new notice objects.
83
75
  # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
84
76
  # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
85
- #
86
- # @param int companyId The ID of the company that owns this notice.
87
- # @param NoticeModel[] model The notice object you wish to create.
88
- # @return NoticeModel[]
77
+ # @param companyId [Integer] The ID of the company that owns this notice.
78
+ # @param model [object[]] The notice object you wish to create.
79
+ # @return [object[]]
89
80
  def create_notices(companyId, model)
90
81
  path = "/api/v2/companies/#{companyId}/notices"
91
-
92
82
  post(path, model)
93
83
  end
94
84
 
95
85
 
96
86
  # Delete a single notice.
97
- #
87
+ #
98
88
  # This API is available by invitation only.
99
89
  # Mark the existing notice object at this URL as deleted.
100
90
  # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
101
91
  # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
102
- #
103
- # @param int companyId The ID of the company that owns this notice.
104
- # @param int id The ID of the notice you wish to delete.
105
- # @return ErrorDetail[]
92
+ # @param companyId [Integer] The ID of the company that owns this notice.
93
+ # @param id [Integer] The ID of the notice you wish to delete.
94
+ # @return [object[]]
106
95
  def delete_notice(companyId, id)
107
96
  path = "/api/v2/companies/#{companyId}/notices/#{id}"
108
-
97
+ delete(path)
98
+ end
99
+
100
+
101
+ # Delete a single responsibility
102
+ #
103
+ # This API is available by invitation only.
104
+ # Mark the existing notice object at this URL as deleted.
105
+ # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
106
+ # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
107
+ # @param companyId [Integer] The ID of the company that owns this notice.
108
+ # @param noticeId [Integer] The ID of the notice you wish to delete.
109
+ # @param id [Integer] The ID of the responsibility you wish to delete.
110
+ # @return [object[]]
111
+ def delete_responsibilities(companyId, noticeId, id)
112
+ path = "/api/v2/companies/#{companyId}/notices/#{noticeId}/responsibilities/#{id}"
113
+ delete(path)
114
+ end
115
+
116
+
117
+ # Delete a single root cause.
118
+ #
119
+ # This API is available by invitation only.
120
+ # Mark the existing notice object at this URL as deleted.
121
+ # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
122
+ # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
123
+ # @param companyId [Integer] The ID of the company that owns this notice.
124
+ # @param noticeId [Integer] The ID of the notice you wish to delete.
125
+ # @param id [Integer] The ID of the root cause you wish to delete.
126
+ # @return [object[]]
127
+ def delete_root_causes(companyId, noticeId, id)
128
+ path = "/api/v2/companies/#{companyId}/notices/#{noticeId}/rootcauses/#{id}"
109
129
  delete(path)
110
130
  end
111
131
 
112
132
 
113
133
  # Retrieve a single attachment
114
- #
134
+ #
115
135
  # This API is available by invitation only.
116
136
  # Get the file attachment identified by this URL.
117
- #
118
- # @param int companyId The ID of the company for this attachment.
119
- # @param int id The ResourceFileId of the attachment to download.
120
- # @return FileResult
137
+ # @param companyId [Integer] The ID of the company for this attachment.
138
+ # @param id [Integer] The ResourceFileId of the attachment to download.
139
+ # @return [Object]
121
140
  def download_notice_attachment(companyId, id)
122
141
  path = "/api/v2/companies/#{companyId}/notices/files/#{id}/attachment"
123
-
124
142
  get(path)
125
143
  end
126
144
 
127
145
 
128
146
  # Retrieve a single notice.
129
- #
147
+ #
130
148
  # This API is available by invitation only.
131
149
  # Get the tax notice object identified by this URL.
132
150
  # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
133
151
  # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
134
- #
135
- # @param int companyId The ID of the company for this notice.
136
- # @param int id The ID of this notice.
137
- # @return NoticeModel
152
+ # @param companyId [Integer] The ID of the company for this notice.
153
+ # @param id [Integer] The ID of this notice.
154
+ # @return [Object]
138
155
  def get_notice(companyId, id)
139
156
  path = "/api/v2/companies/#{companyId}/notices/#{id}"
140
-
141
157
  get(path)
142
158
  end
143
159
 
144
160
 
145
161
  # Retrieve notice comments for a specific notice.
146
- #
162
+ #
147
163
  # This API is available by invitation only.
148
164
  # 'Notice comments' are updates by the notice team on the work to be done and that has been done so far on a notice.
149
165
  # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
150
166
  # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
151
- #
152
- # @param int id The ID of the notice.
153
- # @param int companyId The ID of the company that owns these notices.
154
- # @return FetchResult
167
+ # @param id [Integer] The ID of the notice.
168
+ # @param companyId [Integer] The ID of the company that owns these notices.
169
+ # @return [FetchResult]
155
170
  def get_notice_comments(id, companyId)
156
171
  path = "/api/v2/companies/#{companyId}/notices/#{id}/comments"
157
-
158
172
  get(path)
159
173
  end
160
174
 
161
175
 
162
176
  # Retrieve notice finance details for a specific notice.
163
- #
177
+ #
164
178
  # This API is available by invitation only.
165
179
  # 'Notice finance details' is the categorical breakdown of the total charge levied by the tax authority on our customer,
166
180
  # as broken down in our "notice log" found in Workflow. Main examples of the categories are 'Tax Due', 'Interest', 'Penalty', 'Total Abated'.
167
181
  # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
168
182
  # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
169
- #
170
- # @param int id The ID of the company that owns these notices.
171
- # @param int companyId The ID of the company that owns these notices.
172
- # @return FetchResult
183
+ # @param id [Integer] The ID of the company that owns these notices.
184
+ # @param companyId [Integer] The ID of the company that owns these notices.
185
+ # @return [FetchResult]
173
186
  def get_notice_finance_details(id, companyId)
174
187
  path = "/api/v2/companies/#{companyId}/notices/#{id}/financedetails"
175
-
176
188
  get(path)
177
189
  end
178
190
 
179
191
 
180
192
  # Retrieve notice responsibilities for a specific notice.
181
- #
193
+ #
182
194
  # This API is available by invitation only.
183
195
  # 'Notice responsibilities' are are those who are responsible for the notice.
184
196
  # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
185
197
  # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
186
- #
187
- # @param int id The ID of the notice.
188
- # @param int companyId The ID of the company that owns these notices.
189
- # @return FetchResult
198
+ # @param id [Integer] The ID of the notice.
199
+ # @param companyId [Integer] The ID of the company that owns these notices.
200
+ # @return [FetchResult]
190
201
  def get_notice_responsibilities(id, companyId)
191
202
  path = "/api/v2/companies/#{companyId}/notices/#{id}/responsibilities"
192
-
193
203
  get(path)
194
204
  end
195
205
 
196
206
 
197
207
  # Retrieve notice root causes for a specific notice.
198
- #
208
+ #
199
209
  # This API is available by invitation only.
200
210
  # 'Notice root causes' are are those who are responsible for the notice.
201
211
  # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
202
212
  # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
203
- #
204
- # @param int id The ID of the notice.
205
- # @param int companyId The ID of the company that owns these notices.
206
- # @return FetchResult
213
+ # @param id [Integer] The ID of the notice.
214
+ # @param companyId [Integer] The ID of the company that owns these notices.
215
+ # @return [FetchResult]
207
216
  def get_notice_root_causes(id, companyId)
208
217
  path = "/api/v2/companies/#{companyId}/notices/#{id}/rootcauses"
209
-
210
218
  get(path)
211
219
  end
212
220
 
213
221
 
214
222
  # Retrieve notices for a company.
215
- #
223
+ #
216
224
  # This API is available by invitation only.
217
225
  # List all tax notice objects assigned to this company.
218
226
  # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
219
227
  # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
220
- #
228
+ #
221
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/) .
222
230
  # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
223
- #
224
- # @param int companyId The ID of the company that owns these notices.
225
- # @param string filter 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/) .
226
- # @param string include A comma separated list of child objects to return underneath the primary object.
227
- # @param int top If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
228
- # @param int skip If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
229
- # @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
230
- # @return FetchResult
231
+ # @param companyId [Integer] The ID of the company that owns these notices.
232
+ # @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/) .
233
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
234
+ # @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
235
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
236
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
237
+ # @return [FetchResult]
231
238
  def list_notices_by_company(companyId, options={})
232
239
  path = "/api/v2/companies/#{companyId}/notices"
233
-
234
240
  get(path, options)
235
241
  end
236
242
 
237
243
 
238
244
  # Retrieve all notices.
239
- #
245
+ #
240
246
  # This API is available by invitation only.
241
247
  # Get multiple notice objects across all companies.
242
248
  # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
243
249
  # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
244
- #
250
+ #
245
251
  # 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/) .
246
252
  # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
247
- #
248
- # @param string filter 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/) .
249
- # @param string include A comma separated list of child objects to return underneath the primary object.
250
- # @param int top If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
251
- # @param int skip If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
252
- # @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
253
- # @return FetchResult
253
+ # @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/) .
254
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
255
+ # @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
256
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
257
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
258
+ # @return [FetchResult]
254
259
  def query_notices(options={})
255
260
  path = "/api/v2/notices"
256
-
257
261
  get(path, options)
258
262
  end
259
263
 
260
264
 
261
265
  # Update a single notice.
262
- #
266
+ #
263
267
  # This API is available by invitation only.
264
268
  # Replace the existing notice object at this URL with an updated object.
265
269
  # A 'notice' represents a letter sent to a business by a tax authority regarding tax filing issues. Avalara
266
270
  # Returns customers often receive support and assistance from the Compliance Notices team in handling notices received by taxing authorities.
267
- # All data from the existing object will be replaced with data in the object you PUT.
271
+ # All data from the existing object will be replaced with data in the object you PUT.
268
272
  # 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.
269
- #
270
- # @param int companyId The ID of the company that this notice belongs to.
271
- # @param int id The ID of the notice you wish to update.
272
- # @param NoticeModel model The notice object you wish to update.
273
- # @return NoticeModel
273
+ # @param companyId [Integer] The ID of the company that this notice belongs to.
274
+ # @param id [Integer] The ID of the notice you wish to update.
275
+ # @param model [Object] The notice object you wish to update.
276
+ # @return [Object]
274
277
  def update_notice(companyId, id, model)
275
278
  path = "/api/v2/companies/#{companyId}/notices/#{id}"
276
-
277
279
  put(path, model)
278
280
  end
279
281
 
280
282
 
281
283
  # Retrieve a single attachment
282
- #
284
+ #
283
285
  # This API is available by invitation only.
284
286
  # Get the file attachment identified by this URL.
285
- #
286
- # @param int companyId The ID of the company for this attachment.
287
- # @param ResourceFileUploadRequestModel model The ResourceFileId of the attachment to download.
288
- # @return FileResult
287
+ # @param companyId [Integer] The ID of the company for this attachment.
288
+ # @param model [Object] The ResourceFileId of the attachment to download.
289
+ # @return [Object]
289
290
  def upload_attachment(companyId, model)
290
291
  path = "/api/v2/companies/#{companyId}/notices/files/attachment"
291
-
292
292
  post(path, model)
293
293
  end
294
294