avatax 19.12.0 → 20.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +5 -5
  2. data/avatax.gemspec +0 -1
  3. data/lib/avatax/client/accounts.rb +269 -193
  4. data/lib/avatax/client/addresses.rb +60 -60
  5. data/lib/avatax/client/advancedrules.rb +81 -162
  6. data/lib/avatax/client/avafileforms.rb +93 -93
  7. data/lib/avatax/client/batches.rb +247 -188
  8. data/lib/avatax/client/certexpressinvites.rb +106 -106
  9. data/lib/avatax/client/certificates.rb +469 -469
  10. data/lib/avatax/client/companies.rb +400 -398
  11. data/lib/avatax/client/compliance.rb +18 -18
  12. data/lib/avatax/client/contacts.rb +124 -124
  13. data/lib/avatax/client/customers.rb +415 -415
  14. data/lib/avatax/client/datasources.rb +117 -117
  15. data/lib/avatax/client/definitions.rb +1039 -1007
  16. data/lib/avatax/client/distancethresholds.rb +140 -140
  17. data/lib/avatax/client/filingcalendars.rb +23 -508
  18. data/lib/avatax/client/filings.rb +29 -29
  19. data/lib/avatax/client/firmclientlinkages.rb +150 -150
  20. data/lib/avatax/client/free.rb +109 -109
  21. data/lib/avatax/client/fundingrequests.rb +58 -58
  22. data/lib/avatax/client/items.rb +480 -480
  23. data/lib/avatax/client/jurisdictionoverrides.rb +136 -136
  24. data/lib/avatax/client/locations.rb +163 -160
  25. data/lib/avatax/client/multidocument.rb +420 -340
  26. data/lib/avatax/client/nexus.rb +240 -225
  27. data/lib/avatax/client/notifications.rb +84 -84
  28. data/lib/avatax/client/provisioning.rb +55 -55
  29. data/lib/avatax/client/registrar.rb +228 -228
  30. data/lib/avatax/client/reports.rb +109 -109
  31. data/lib/avatax/client/settings.rb +174 -174
  32. data/lib/avatax/client/subscriptions.rb +71 -71
  33. data/lib/avatax/client/taxcodes.rb +138 -138
  34. data/lib/avatax/client/taxcontent.rb +142 -142
  35. data/lib/avatax/client/taxrules.rb +188 -188
  36. data/lib/avatax/client/transactions.rb +899 -854
  37. data/lib/avatax/client/upcs.rb +129 -129
  38. data/lib/avatax/client/users.rb +207 -207
  39. data/lib/avatax/client/utilities.rb +70 -70
  40. data/lib/avatax/connection.rb +3 -3
  41. data/lib/avatax/request.rb +2 -0
  42. data/lib/avatax/version.rb +1 -1
  43. metadata +4 -25
@@ -1,110 +1,110 @@
1
- module AvaTax
2
- class Client
3
- module Reports
4
-
5
-
6
- # Download a report
7
- #
8
- # This API downloads the file associated with a report.
9
- #
10
- # If the report is not yet complete, you will receive a `ReportNotFinished` error. To check if a report is complete,
11
- # use the `GetReport` API.
12
- #
13
- # Reports are run as asynchronous report tasks on the server. When complete, the report file will be available for download
14
- # for up to 30 days after completion. To run an asynchronous report, you should follow these steps:
15
- #
16
- # * Begin a report by calling the report's Initiate API. There is a separate initiate API call for each report type.
17
- # * In the result of the Initiate API, you receive back a report's `id` value.
18
- # * Check the status of a report by calling `GetReport` and passing in the report's `id` value.
19
- # * When a report's status is `Completed`, call `DownloadReport` to retrieve the file.
20
- #
21
- # This API works for all report types.
22
- #
23
- # ### Security Policies
24
- #
25
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
26
- # @param id [Integer] The unique ID number of this report
27
- # @return [Object]
28
- def download_report(id)
29
- path = "/api/v2/reports/#{id}/attachment"
30
- get(path)
31
- end
32
-
33
-
34
- # Retrieve a single report
35
- #
36
- # Retrieve a single report by its unique ID number.
37
- #
38
- # Reports are run as asynchronous report tasks on the server. When complete, the report file will be available for download
39
- # for up to 30 days after completion. To run an asynchronous report, you should follow these steps:
40
- #
41
- # * Begin a report by calling the report's Initiate API. There is a separate initiate API call for each report type.
42
- # * In the result of the Initiate API, you receive back a report's `id` value.
43
- # * Check the status of a report by calling `GetReport` and passing in the report's `id` value.
44
- # * When a report's status is `Completed`, call `DownloadReport` to retrieve the file.
45
- #
46
- # This API call returns information about any report type.
47
- # @param id [Integer] The unique ID number of the report to retrieve
48
- # @return [Object]
49
- def get_report(id)
50
- path = "/api/v2/reports/#{id}"
51
- get(path)
52
- end
53
-
54
-
55
- # Initiate an ExportDocumentLine report task
56
- #
57
- # Begins running an `ExportDocumentLine` report task and returns the identity of the report.
58
- #
59
- # Reports are run as asynchronous report tasks on the server. When complete, the report file will be available for download
60
- # for up to 30 days after completion. To run an asynchronous report, you should follow these steps:
61
- #
62
- # * Begin a report by calling the report's Initiate API. There is a separate initiate API call for each report type.
63
- # * In the result of the Initiate API, you receive back a report's `id` value.
64
- # * Check the status of a report by calling `GetReport` and passing in the report's `id` value.
65
- # * When a report's status is `Completed`, call `DownloadReport` to retrieve the file.
66
- #
67
- # The `ExportDocumentLine` report produces information about invoice lines recorded within your account.
68
- #
69
- # ### Security Policies
70
- #
71
- # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
72
- # @param companyId [Integer] The unique ID number of the company to report on.
73
- # @param model [Object] Options that may be configured to customize the report.
74
- # @return [ReportModel[]]
75
- def initiate_export_document_line_report(companyId, model)
76
- path = "/api/v2/companies/#{companyId}/reports/exportdocumentline/initiate"
77
- post(path, model)
78
- end
79
-
80
-
81
- # List all report tasks for account
82
- #
83
- # List all report tasks for your account.
84
- #
85
- # Reports are run as asynchronous report tasks on the server. When complete, the report file will be available for download
86
- # for up to 30 days after completion. To run an asynchronous report, you should follow these steps:
87
- #
88
- # * Begin a report by calling the report's Initiate API. There is a separate initiate API call for each report type.
89
- # * In the result of the Initiate API, you receive back a report's `id` value.
90
- # * Check the status of a report by calling `GetReport` and passing in the report's `id` value.
91
- # * When a report's status is `Completed`, call `DownloadReport` to retrieve the file.
92
- #
93
- # This API call returns information about all report types across your entire account.
94
- #
95
- # ### Security Policies
96
- #
97
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
98
- # @param companyId [Integer] The id of the company for which to get reports.
99
- # @param pageKey [String] Provide a page key to retrieve the next page of results.
100
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
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
- # @return [FetchResult]
103
- def list_reports(options={})
104
- path = "/api/v2/reports"
105
- get(path, options)
106
- end
107
-
108
- end
109
- end
1
+ module AvaTax
2
+ class Client
3
+ module Reports
4
+
5
+
6
+ # Download a report
7
+ #
8
+ # This API downloads the file associated with a report.
9
+ #
10
+ # If the report is not yet complete, you will receive a `ReportNotFinished` error. To check if a report is complete,
11
+ # use the `GetReport` API.
12
+ #
13
+ # Reports are run as asynchronous report tasks on the server. When complete, the report file will be available for download
14
+ # for up to 30 days after completion. To run an asynchronous report, you should follow these steps:
15
+ #
16
+ # * Begin a report by calling the report's Initiate API. There is a separate initiate API call for each report type.
17
+ # * In the result of the Initiate API, you receive back a report's `id` value.
18
+ # * Check the status of a report by calling `GetReport` and passing in the report's `id` value.
19
+ # * When a report's status is `Completed`, call `DownloadReport` to retrieve the file.
20
+ #
21
+ # This API works for all report types.
22
+ #
23
+ # ### Security Policies
24
+ #
25
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
26
+ # @param id [Integer] The unique ID number of this report
27
+ # @return [Object]
28
+ def download_report(id)
29
+ path = "/api/v2/reports/#{id}/attachment"
30
+ get(path)
31
+ end
32
+
33
+
34
+ # Retrieve a single report
35
+ #
36
+ # Retrieve a single report by its unique ID number.
37
+ #
38
+ # Reports are run as asynchronous report tasks on the server. When complete, the report file will be available for download
39
+ # for up to 30 days after completion. To run an asynchronous report, you should follow these steps:
40
+ #
41
+ # * Begin a report by calling the report's Initiate API. There is a separate initiate API call for each report type.
42
+ # * In the result of the Initiate API, you receive back a report's `id` value.
43
+ # * Check the status of a report by calling `GetReport` and passing in the report's `id` value.
44
+ # * When a report's status is `Completed`, call `DownloadReport` to retrieve the file.
45
+ #
46
+ # This API call returns information about any report type.
47
+ # @param id [Integer] The unique ID number of the report to retrieve
48
+ # @return [Object]
49
+ def get_report(id)
50
+ path = "/api/v2/reports/#{id}"
51
+ get(path)
52
+ end
53
+
54
+
55
+ # Initiate an ExportDocumentLine report task
56
+ #
57
+ # Begins running an `ExportDocumentLine` report task and returns the identity of the report.
58
+ #
59
+ # Reports are run as asynchronous report tasks on the server. When complete, the report file will be available for download
60
+ # for up to 30 days after completion. To run an asynchronous report, you should follow these steps:
61
+ #
62
+ # * Begin a report by calling the report's Initiate API. There is a separate initiate API call for each report type.
63
+ # * In the result of the Initiate API, you receive back a report's `id` value.
64
+ # * Check the status of a report by calling `GetReport` and passing in the report's `id` value.
65
+ # * When a report's status is `Completed`, call `DownloadReport` to retrieve the file.
66
+ #
67
+ # The `ExportDocumentLine` report produces information about invoice lines recorded within your account.
68
+ #
69
+ # ### Security Policies
70
+ #
71
+ # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, CSPTester, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
72
+ # @param companyId [Integer] The unique ID number of the company to report on.
73
+ # @param model [Object] Options that may be configured to customize the report.
74
+ # @return [ReportModel[]]
75
+ def initiate_export_document_line_report(companyId, model)
76
+ path = "/api/v2/companies/#{companyId}/reports/exportdocumentline/initiate"
77
+ post(path, model)
78
+ end
79
+
80
+
81
+ # List all report tasks for account
82
+ #
83
+ # List all report tasks for your account.
84
+ #
85
+ # Reports are run as asynchronous report tasks on the server. When complete, the report file will be available for download
86
+ # for up to 30 days after completion. To run an asynchronous report, you should follow these steps:
87
+ #
88
+ # * Begin a report by calling the report's Initiate API. There is a separate initiate API call for each report type.
89
+ # * In the result of the Initiate API, you receive back a report's `id` value.
90
+ # * Check the status of a report by calling `GetReport` and passing in the report's `id` value.
91
+ # * When a report's status is `Completed`, call `DownloadReport` to retrieve the file.
92
+ #
93
+ # This API call returns information about all report types across your entire account.
94
+ #
95
+ # ### Security Policies
96
+ #
97
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
98
+ # @param companyId [Integer] The id of the company for which to get reports.
99
+ # @param pageKey [String] Provide a page key to retrieve the next page of results.
100
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
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
+ # @return [FetchResult]
103
+ def list_reports(options={})
104
+ path = "/api/v2/reports"
105
+ get(path, options)
106
+ end
107
+
108
+ end
109
+ end
110
110
  end
@@ -1,175 +1,175 @@
1
- module AvaTax
2
- class Client
3
- module Settings
4
-
5
-
6
- # Create a new setting
7
- #
8
- # Create one or more new setting objects attached to this company.
9
- #
10
- # The company settings system is a metadata system that you can use to store extra information
11
- # about a company. Your integration or connector could use this data storage to keep track of
12
- # preference information, reminders, or any other storage that would need to persist even if
13
- # the customer uninstalls your application.
14
- #
15
- # A setting can refer to any type of data you need to remember about this company object.
16
- # When creating this object, you may define your own `set`, `name`, and `value` parameters.
17
- # To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
18
- #
19
- # ### Security Policies
20
- #
21
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
22
- # @param companyId [Integer] The ID of the company that owns this setting.
23
- # @param model [SettingModel[]] The setting you wish to create.
24
- # @return [SettingModel[]]
25
- def create_settings(companyId, model)
26
- path = "/api/v2/companies/#{companyId}/settings"
27
- post(path, model)
28
- end
29
-
30
-
31
- # Delete a single setting
32
- #
33
- # Mark the setting object at this URL as deleted.
34
- #
35
- # The company settings system is a metadata system that you can use to store extra information
36
- # about a company. Your integration or connector could use this data storage to keep track of
37
- # preference information, reminders, or any other storage that would need to persist even if
38
- # the customer uninstalls your application.
39
- #
40
- # A setting can refer to any type of data you need to remember about this company object.
41
- # When creating this object, you may define your own `set`, `name`, and `value` parameters.
42
- # To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
43
- #
44
- # ### Security Policies
45
- #
46
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
47
- # @param companyId [Integer] The ID of the company that owns this setting.
48
- # @param id [Integer] The ID of the setting you wish to delete.
49
- # @return [ErrorDetail[]]
50
- def delete_setting(companyId, id)
51
- path = "/api/v2/companies/#{companyId}/settings/#{id}"
52
- delete(path)
53
- end
54
-
55
-
56
- # Retrieve a single setting
57
- #
58
- # Get a single setting object by its unique ID.
59
- #
60
- # The company settings system is a metadata system that you can use to store extra information
61
- # about a company. Your integration or connector could use this data storage to keep track of
62
- # preference information, reminders, or any other storage that would need to persist even if
63
- # the customer uninstalls your application.
64
- #
65
- # A setting can refer to any type of data you need to remember about this company object.
66
- # When creating this object, you may define your own `set`, `name`, and `value` parameters.
67
- # To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
68
- #
69
- # ### Security Policies
70
- #
71
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
72
- # @param companyId [Integer] The ID of the company that owns this setting
73
- # @param id [Integer] The primary key of this setting
74
- # @return [Object]
75
- def get_setting(companyId, id)
76
- path = "/api/v2/companies/#{companyId}/settings/#{id}"
77
- get(path)
78
- end
79
-
80
-
81
- # Retrieve all settings for this company
82
- #
83
- # List all setting objects attached to this company.
84
- #
85
- # The company settings system is a metadata system that you can use to store extra information
86
- # about a company. Your integration or connector could use this data storage to keep track of
87
- # preference information, reminders, or any other storage that would need to persist even if
88
- # the customer uninstalls your application.
89
- #
90
- # A setting can refer to any type of data you need to remember about this company object.
91
- # When creating this object, you may define your own `set`, `name`, and `value` parameters.
92
- # To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
93
- #
94
- # 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/) .
95
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
96
- #
97
- # ### Security Policies
98
- #
99
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
100
- # @param companyId [Integer] The ID of the company that owns these settings
101
- # @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/).
102
- # @param include [String] A comma separated list of additional data to retrieve.
103
- # @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.
104
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
105
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
106
- # @return [FetchResult]
107
- def list_settings_by_company(companyId, options={})
108
- path = "/api/v2/companies/#{companyId}/settings"
109
- get(path, options)
110
- end
111
-
112
-
113
- # Retrieve all settings
114
- #
115
- # Get multiple setting objects across all companies.
116
- #
117
- # The company settings system is a metadata system that you can use to store extra information
118
- # about a company. Your integration or connector could use this data storage to keep track of
119
- # preference information, reminders, or any other storage that would need to persist even if
120
- # the customer uninstalls your application.
121
- #
122
- # A setting can refer to any type of data you need to remember about this company object.
123
- # When creating this object, you may define your own `set`, `name`, and `value` parameters.
124
- # To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
125
- #
126
- # 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/) .
127
- # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
128
- #
129
- # ### Security Policies
130
- #
131
- # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
132
- # @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/).
133
- # @param include [String] A comma separated list of additional data to retrieve.
134
- # @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.
135
- # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
136
- # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
137
- # @return [FetchResult]
138
- def query_settings(options={})
139
- path = "/api/v2/settings"
140
- get(path, options)
141
- end
142
-
143
-
144
- # Update a single setting
145
- #
146
- # Replace the existing setting object at this URL with an updated object.
147
- #
148
- # The company settings system is a metadata system that you can use to store extra information
149
- # about a company. Your integration or connector could use this data storage to keep track of
150
- # preference information, reminders, or any other storage that would need to persist even if
151
- # the customer uninstalls your application.
152
- #
153
- # A setting can refer to any type of data you need to remember about this company object.
154
- # When creating this object, you may define your own `set`, `name`, and `value` parameters.
155
- # To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
156
- #
157
- # All data from the existing object will be replaced with data in the object you `PUT`.
158
- #
159
- # To set a field's value to `null`, you may either set its value to `null` or omit that field from the object when calling update.
160
- #
161
- # ### Security Policies
162
- #
163
- # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
164
- # @param companyId [Integer] The ID of the company that this setting belongs to.
165
- # @param id [Integer] The ID of the setting you wish to update
166
- # @param model [Object] The setting you wish to update.
167
- # @return [Object]
168
- def update_setting(companyId, id, model)
169
- path = "/api/v2/companies/#{companyId}/settings/#{id}"
170
- put(path, model)
171
- end
172
-
173
- end
174
- end
1
+ module AvaTax
2
+ class Client
3
+ module Settings
4
+
5
+
6
+ # Create a new setting
7
+ #
8
+ # Create one or more new setting objects attached to this company.
9
+ #
10
+ # The company settings system is a metadata system that you can use to store extra information
11
+ # about a company. Your integration or connector could use this data storage to keep track of
12
+ # preference information, reminders, or any other storage that would need to persist even if
13
+ # the customer uninstalls your application.
14
+ #
15
+ # A setting can refer to any type of data you need to remember about this company object.
16
+ # When creating this object, you may define your own `set`, `name`, and `value` parameters.
17
+ # To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
18
+ #
19
+ # ### Security Policies
20
+ #
21
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
22
+ # @param companyId [Integer] The ID of the company that owns this setting.
23
+ # @param model [SettingModel[]] The setting you wish to create.
24
+ # @return [SettingModel[]]
25
+ def create_settings(companyId, model)
26
+ path = "/api/v2/companies/#{companyId}/settings"
27
+ post(path, model)
28
+ end
29
+
30
+
31
+ # Delete a single setting
32
+ #
33
+ # Mark the setting object at this URL as deleted.
34
+ #
35
+ # The company settings system is a metadata system that you can use to store extra information
36
+ # about a company. Your integration or connector could use this data storage to keep track of
37
+ # preference information, reminders, or any other storage that would need to persist even if
38
+ # the customer uninstalls your application.
39
+ #
40
+ # A setting can refer to any type of data you need to remember about this company object.
41
+ # When creating this object, you may define your own `set`, `name`, and `value` parameters.
42
+ # To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
43
+ #
44
+ # ### Security Policies
45
+ #
46
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
47
+ # @param companyId [Integer] The ID of the company that owns this setting.
48
+ # @param id [Integer] The ID of the setting you wish to delete.
49
+ # @return [ErrorDetail[]]
50
+ def delete_setting(companyId, id)
51
+ path = "/api/v2/companies/#{companyId}/settings/#{id}"
52
+ delete(path)
53
+ end
54
+
55
+
56
+ # Retrieve a single setting
57
+ #
58
+ # Get a single setting object by its unique ID.
59
+ #
60
+ # The company settings system is a metadata system that you can use to store extra information
61
+ # about a company. Your integration or connector could use this data storage to keep track of
62
+ # preference information, reminders, or any other storage that would need to persist even if
63
+ # the customer uninstalls your application.
64
+ #
65
+ # A setting can refer to any type of data you need to remember about this company object.
66
+ # When creating this object, you may define your own `set`, `name`, and `value` parameters.
67
+ # To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
68
+ #
69
+ # ### Security Policies
70
+ #
71
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
72
+ # @param companyId [Integer] The ID of the company that owns this setting
73
+ # @param id [Integer] The primary key of this setting
74
+ # @return [Object]
75
+ def get_setting(companyId, id)
76
+ path = "/api/v2/companies/#{companyId}/settings/#{id}"
77
+ get(path)
78
+ end
79
+
80
+
81
+ # Retrieve all settings for this company
82
+ #
83
+ # List all setting objects attached to this company.
84
+ #
85
+ # The company settings system is a metadata system that you can use to store extra information
86
+ # about a company. Your integration or connector could use this data storage to keep track of
87
+ # preference information, reminders, or any other storage that would need to persist even if
88
+ # the customer uninstalls your application.
89
+ #
90
+ # A setting can refer to any type of data you need to remember about this company object.
91
+ # When creating this object, you may define your own `set`, `name`, and `value` parameters.
92
+ # To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
93
+ #
94
+ # 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/) .
95
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
96
+ #
97
+ # ### Security Policies
98
+ #
99
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
100
+ # @param companyId [Integer] The ID of the company that owns these settings
101
+ # @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/).
102
+ # @param include [String] A comma separated list of additional data to retrieve.
103
+ # @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.
104
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
105
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
106
+ # @return [FetchResult]
107
+ def list_settings_by_company(companyId, options={})
108
+ path = "/api/v2/companies/#{companyId}/settings"
109
+ get(path, options)
110
+ end
111
+
112
+
113
+ # Retrieve all settings
114
+ #
115
+ # Get multiple setting objects across all companies.
116
+ #
117
+ # The company settings system is a metadata system that you can use to store extra information
118
+ # about a company. Your integration or connector could use this data storage to keep track of
119
+ # preference information, reminders, or any other storage that would need to persist even if
120
+ # the customer uninstalls your application.
121
+ #
122
+ # A setting can refer to any type of data you need to remember about this company object.
123
+ # When creating this object, you may define your own `set`, `name`, and `value` parameters.
124
+ # To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
125
+ #
126
+ # 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/) .
127
+ # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
128
+ #
129
+ # ### Security Policies
130
+ #
131
+ # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
132
+ # @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/).
133
+ # @param include [String] A comma separated list of additional data to retrieve.
134
+ # @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.
135
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
136
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
137
+ # @return [FetchResult]
138
+ def query_settings(options={})
139
+ path = "/api/v2/settings"
140
+ get(path, options)
141
+ end
142
+
143
+
144
+ # Update a single setting
145
+ #
146
+ # Replace the existing setting object at this URL with an updated object.
147
+ #
148
+ # The company settings system is a metadata system that you can use to store extra information
149
+ # about a company. Your integration or connector could use this data storage to keep track of
150
+ # preference information, reminders, or any other storage that would need to persist even if
151
+ # the customer uninstalls your application.
152
+ #
153
+ # A setting can refer to any type of data you need to remember about this company object.
154
+ # When creating this object, you may define your own `set`, `name`, and `value` parameters.
155
+ # To define your own values, please choose a `set` name that begins with `X-` to indicate an extension.
156
+ #
157
+ # All data from the existing object will be replaced with data in the object you `PUT`.
158
+ #
159
+ # To set a field's value to `null`, you may either set its value to `null` or omit that field from the object when calling update.
160
+ #
161
+ # ### Security Policies
162
+ #
163
+ # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
164
+ # @param companyId [Integer] The ID of the company that this setting belongs to.
165
+ # @param id [Integer] The ID of the setting you wish to update
166
+ # @param model [Object] The setting you wish to update.
167
+ # @return [Object]
168
+ def update_setting(companyId, id, model)
169
+ path = "/api/v2/companies/#{companyId}/settings/#{id}"
170
+ put(path, model)
171
+ end
172
+
173
+ end
174
+ end
175
175
  end