avatax 17.5.0 → 17.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e68966052154ce258501a8c039997122fff63ac2
4
- data.tar.gz: 9d1228766e7416ba62d996181cb83dbf30dbd00b
3
+ metadata.gz: d024291daa0229f26ee75f83545a01c700dd1927
4
+ data.tar.gz: be58b1cb99c75e3a66b541b85252660ad3892573
5
5
  SHA512:
6
- metadata.gz: fcf13c01588c96c59a6296ba9aca6d9e2103b7f6304eea00c8941d40d340a2fd48193fb3d35a6988f668452808f916ff9f1aa12f0b6113b5950b069034180fb1
7
- data.tar.gz: f4a63d2c384e59b11d8d7f3d7296705b2f66526f5adcbd7fffd74ced8b7122c6693aa8202cf0aa3c56b3284bd37ac476b4739c14efc891324b6bdd6b0721a2ec
6
+ metadata.gz: 00f33c72ce25f9a0050371362695909e6f8222cef7f6edf27b4df9eb06be2baf1fd29dab70c4198e119c6e5fb208742b2f090c9186511c386d91eb5f301930ad
7
+ data.tar.gz: 86c779153a8aa1520b5a745691ebbca58123686d5d7ca59ef93fd7b15aabe74071a4b0012f96602496a67926d98dcccfeb28c9226fc05ad56aa850d76364b612
data/README.md CHANGED
@@ -4,12 +4,13 @@ A Ruby wrapper for the AvaTax REST V2 APIs
4
4
 
5
5
  Installation
6
6
  ------------
7
- gem install avatax (coming soon)
7
+ gem install avatax
8
8
 
9
9
  AvaTax REST and Search APIs
10
10
  ------------------------------
11
11
  Our [developer site](https://developer.avalara.com/) documents all the AvaTax REST and other APIs. Subscribe to the [RSS feed](developer.avalara.com/feed.xml) to stay up to date on the lates news and announcements.
12
12
 
13
+ [API docs](http://www.rubydoc.info/github/avadev/AvaTax-REST-V2-Ruby-SDK/)
13
14
 
14
15
  Blog
15
16
  ----------------------------
@@ -4,104 +4,94 @@ module AvaTax
4
4
 
5
5
 
6
6
  # Reset this account's license key
7
- #
7
+ #
8
8
  # Resets the existing license key for this account to a new key.
9
9
  # To reset your account, you must specify the ID of the account you wish to reset and confirm the action.
10
10
  # Resetting a license key cannot be undone. Any previous license keys will immediately cease to work when a new key is created.
11
- #
12
- # @param int id The ID of the account you wish to update.
13
- # @param ResetLicenseKeyModel model A request confirming that you wish to reset the license key of this account.
14
- # @return LicenseKeyModel
11
+ # @param id [Integer] The ID of the account you wish to update.
12
+ # @param model [Object] A request confirming that you wish to reset the license key of this account.
13
+ # @return [Object]
15
14
  def account_reset_license_key(id, model)
16
15
  path = "/api/v2/accounts/#{id}/resetlicensekey"
17
-
18
16
  post(path, model)
19
17
  end
20
18
 
21
19
 
22
20
  # Activate an account by accepting terms and conditions
23
- #
21
+ #
24
22
  # Activate the account specified by the unique accountId number.
25
- #
26
- # This activation request can only be called by account administrators. You must indicate
23
+ #
24
+ # This activation request can only be called by account administrators. You must indicate
27
25
  # that you have read and accepted Avalara's terms and conditions to call this API.
28
- #
26
+ #
29
27
  # If you have not read or accepted the terms and conditions, this API call will return the
30
28
  # unchanged account model.
31
- #
32
- # @param int id The ID of the account to activate
33
- # @param ActivateAccountModel model The activation request
34
- # @return AccountModel
29
+ # @param id [Integer] The ID of the account to activate
30
+ # @param model [Object] The activation request
31
+ # @return [Object]
35
32
  def activate_account(id, model)
36
33
  path = "/api/v2/accounts/#{id}/activate"
37
-
38
34
  post(path, model)
39
35
  end
40
36
 
41
37
 
42
38
  # Retrieve a single account
43
- #
39
+ #
44
40
  # Get the account object identified by this URL.
45
41
  # You may use the '$include' parameter to fetch additional nested data:
46
- #
42
+ #
47
43
  # * Subscriptions
48
44
  # * Users
49
- #
50
- # @param int id The ID of the account to retrieve
51
- # @param string include A comma separated list of child objects to return underneath the primary object.
52
- # @return AccountModel
45
+ # @param id [Integer] The ID of the account to retrieve
46
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
47
+ # @return [Object]
53
48
  def get_account(id, options={})
54
49
  path = "/api/v2/accounts/#{id}"
55
-
56
50
  get(path, options)
57
51
  end
58
52
 
59
53
 
60
54
  # Get configuration settings for this account
61
- #
55
+ #
62
56
  # Retrieve a list of all configuration settings tied to this account.
63
- #
57
+ #
64
58
  # Configuration settings provide you with the ability to control features of your account and of your
65
59
  # tax software. The category names `TaxServiceConfig` and `AddressServiceConfig` are reserved for
66
60
  # Avalara internal software configuration values; to store your own account-level settings, please
67
61
  # create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
68
- #
62
+ #
69
63
  # Account settings are permanent settings that cannot be deleted. You can set the value of an
70
64
  # account setting to null if desired.
71
- #
65
+ #
72
66
  # Avalara-based account settings for `TaxServiceConfig` and `AddressServiceConfig` affect your account's
73
67
  # tax calculation and address resolution, and should only be changed with care.
74
- #
75
- # @param int id
76
- # @return AccountConfigurationModel[]
68
+ # @param id [Integer]
69
+ # @return [object[]]
77
70
  def get_account_configuration(id)
78
71
  path = "/api/v2/accounts/#{id}/configuration"
79
-
80
72
  get(path)
81
73
  end
82
74
 
83
75
 
84
76
  # Change configuration settings for this account
85
- #
77
+ #
86
78
  # Update configuration settings tied to this account.
87
- #
79
+ #
88
80
  # Configuration settings provide you with the ability to control features of your account and of your
89
81
  # tax software. The category names `TaxServiceConfig` and `AddressServiceConfig` are reserved for
90
82
  # Avalara internal software configuration values; to store your own account-level settings, please
91
83
  # create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
92
- #
84
+ #
93
85
  # Account settings are permanent settings that cannot be deleted. You can set the value of an
94
86
  # account setting to null if desired.
95
- #
87
+ #
96
88
  # Avalara-based account settings for `TaxServiceConfig` and `AddressServiceConfig` affect your account's
97
89
  # tax calculation and address resolution, and should only be changed with care.
98
- #
99
- # @param int id
100
- # @param AccountConfigurationModel[] model
101
- # @return AccountConfigurationModel[]
90
+ # @param id [Integer]
91
+ # @param model [object[]]
92
+ # @return [object[]]
102
93
  def set_account_configuration(id, model)
103
94
  path = "/api/v2/accounts/#{id}/configuration"
104
-
105
95
  post(path, model)
106
96
  end
107
97
 
@@ -4,46 +4,42 @@ module AvaTax
4
4
 
5
5
 
6
6
  # Retrieve geolocation information for a specified address
7
- #
8
- # Resolve an address against Avalara's address-validation system. If the address can be resolved, this API
9
- # provides the latitude and longitude of the resolved location. The value 'resolutionQuality' can be used
10
- # to identify how closely this address can be located. If the address cannot be clearly located, use the
7
+ #
8
+ # Resolve an address against Avalara's address-validation system. If the address can be resolved, this API
9
+ # provides the latitude and longitude of the resolved location. The value 'resolutionQuality' can be used
10
+ # to identify how closely this address can be located. If the address cannot be clearly located, use the
11
11
  # 'messages' structure to learn more about problems with this address.
12
12
  # This is the same API as the POST /api/v2/addresses/resolve endpoint.
13
13
  # Both verbs are supported to provide for flexible implementation.
14
- #
15
- # @param string line1 Line 1
16
- # @param string line2 Line 2
17
- # @param string line3 Line 3
18
- # @param string city City
19
- # @param string region State / Province / Region
20
- # @param string postalCode Postal Code / Zip Code
21
- # @param string country Two character ISO 3166 Country Code (see /api/v2/definitions/countries for a full list)
22
- # @param string textCase selectable text case for address validation (See TextCase::* for a list of allowable values)
23
- # @param float latitude Geospatial latitude measurement
24
- # @param float longitude Geospatial longitude measurement
25
- # @return AddressResolutionModel
14
+ # @param line1 [String] Line 1
15
+ # @param line2 [String] Line 2
16
+ # @param line3 [String] Line 3
17
+ # @param city [String] City
18
+ # @param region [String] State / Province / Region
19
+ # @param postalCode [String] Postal Code / Zip Code
20
+ # @param country [String] Two character ISO 3166 Country Code (see /api/v2/definitions/countries for a full list)
21
+ # @param textCase [String] selectable text case for address validation (See TextCase::* for a list of allowable values)
22
+ # @param latitude [BigDecimal] Geospatial latitude measurement
23
+ # @param longitude [BigDecimal] Geospatial longitude measurement
24
+ # @return [Object]
26
25
  def resolve_address(options={})
27
26
  path = "/api/v2/addresses/resolve"
28
-
29
27
  get(path, options)
30
28
  end
31
29
 
32
30
 
33
31
  # Retrieve geolocation information for a specified address
34
- #
35
- # Resolve an address against Avalara's address-validation system. If the address can be resolved, this API
36
- # provides the latitude and longitude of the resolved location. The value 'resolutionQuality' can be used
37
- # to identify how closely this address can be located. If the address cannot be clearly located, use the
32
+ #
33
+ # Resolve an address against Avalara's address-validation system. If the address can be resolved, this API
34
+ # provides the latitude and longitude of the resolved location. The value 'resolutionQuality' can be used
35
+ # to identify how closely this address can be located. If the address cannot be clearly located, use the
38
36
  # 'messages' structure to learn more about problems with this address.
39
37
  # This is the same API as the GET /api/v2/addresses/resolve endpoint.
40
38
  # Both verbs are supported to provide for flexible implementation.
41
- #
42
- # @param AddressValidationInfo model The address to resolve
43
- # @return AddressResolutionModel
39
+ # @param model [Object] The address to resolve
40
+ # @return [Object]
44
41
  def resolve_address_post(model)
45
42
  path = "/api/v2/addresses/resolve"
46
-
47
43
  post(path, model)
48
44
  end
49
45
 
@@ -4,111 +4,99 @@ module AvaTax
4
4
 
5
5
 
6
6
  # Create a new batch
7
- #
7
+ #
8
8
  # Create one or more new batch objects attached to this company.
9
9
  # A batch object is a large collection of API calls stored in a compact file.
10
10
  # When you create a batch, it is added to the AvaTax Batch Queue and will be processed in the order it was received.
11
11
  # You may fetch a batch to check on its status and retrieve the results of the batch operation.
12
12
  # Each batch object may have one or more file objects attached.
13
- #
14
- # @param int companyId The ID of the company that owns this batch.
15
- # @param BatchModel[] model The batch you wish to create.
16
- # @return BatchModel[]
13
+ # @param companyId [Integer] The ID of the company that owns this batch.
14
+ # @param model [object[]] The batch you wish to create.
15
+ # @return [object[]]
17
16
  def create_batches(companyId, model)
18
17
  path = "/api/v2/companies/#{companyId}/batches"
19
-
20
18
  post(path, model)
21
19
  end
22
20
 
23
21
 
24
22
  # Delete a single batch
25
- #
23
+ #
26
24
  # Mark the existing batch object at this URL as deleted.
27
- #
28
- # @param int companyId The ID of the company that owns this batch.
29
- # @param int id The ID of the batch you wish to delete.
30
- # @return ErrorDetail[]
25
+ # @param companyId [Integer] The ID of the company that owns this batch.
26
+ # @param id [Integer] The ID of the batch you wish to delete.
27
+ # @return [object[]]
31
28
  def delete_batch(companyId, id)
32
29
  path = "/api/v2/companies/#{companyId}/batches/#{id}"
33
-
34
30
  delete(path)
35
31
  end
36
32
 
37
33
 
38
34
  # Download a single batch file
39
- #
35
+ #
40
36
  # Download a single batch file identified by this URL.
41
- #
42
- # @param int companyId The ID of the company that owns this batch
43
- # @param int batchId The ID of the batch object
44
- # @param int id The primary key of this batch file object
45
- # @return FileResult
37
+ # @param companyId [Integer] The ID of the company that owns this batch
38
+ # @param batchId [Integer] The ID of the batch object
39
+ # @param id [Integer] The primary key of this batch file object
40
+ # @return [Object]
46
41
  def download_batch(companyId, batchId, id)
47
42
  path = "/api/v2/companies/#{companyId}/batches/#{batchId}/files/#{id}/attachment"
48
-
49
43
  get(path)
50
44
  end
51
45
 
52
46
 
53
47
  # Retrieve a single batch
54
- #
48
+ #
55
49
  # Get the batch object identified by this URL.
56
50
  # A batch object is a large collection of API calls stored in a compact file.
57
51
  # When you create a batch, it is added to the AvaTax Batch Queue and will be processed in the order it was received.
58
52
  # You may fetch a batch to check on its status and retrieve the results of the batch operation.
59
- #
60
- # @param int companyId The ID of the company that owns this batch
61
- # @param int id The primary key of this batch
62
- # @return BatchModel
53
+ # @param companyId [Integer] The ID of the company that owns this batch
54
+ # @param id [Integer] The primary key of this batch
55
+ # @return [Object]
63
56
  def get_batch(companyId, id)
64
57
  path = "/api/v2/companies/#{companyId}/batches/#{id}"
65
-
66
58
  get(path)
67
59
  end
68
60
 
69
61
 
70
62
  # Retrieve all batches for this company
71
- #
63
+ #
72
64
  # List all batch objects attached to the specified company.
73
65
  # A batch object is a large collection of API calls stored in a compact file.
74
66
  # When you create a batch, it is added to the AvaTax Batch Queue and will be processed in the order it was received.
75
67
  # You may fetch a batch to check on its status and retrieve the results of the batch operation.
76
68
  # 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/) .
77
69
  # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
78
- #
79
- # @param int companyId The ID of the company that owns these batches
80
- # @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/) .
81
- # @param string include A comma separated list of child objects to return underneath the primary object.
82
- # @param int top If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
83
- # @param int skip If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
84
- # @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
85
- # @return FetchResult
70
+ # @param companyId [Integer] The ID of the company that owns these batches
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/) .
72
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
73
+ # @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
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
+ # @return [FetchResult]
86
77
  def list_batches_by_company(companyId, options={})
87
78
  path = "/api/v2/companies/#{companyId}/batches"
88
-
89
79
  get(path, options)
90
80
  end
91
81
 
92
82
 
93
83
  # Retrieve all batches
94
- #
84
+ #
95
85
  # Get multiple batch objects across all companies.
96
86
  # A batch object is a large collection of API calls stored in a compact file.
97
87
  # When you create a batch, it is added to the AvaTax Batch Queue and will be processed in the order it was received.
98
88
  # You may fetch a batch to check on its status and retrieve the results of the batch operation.
99
- #
89
+ #
100
90
  # 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/) .
101
91
  # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
102
- #
103
- # @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/) .
104
- # @param string include A comma separated list of child objects to return underneath the primary object.
105
- # @param int top If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
106
- # @param int skip If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
107
- # @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
108
- # @return FetchResult
92
+ # @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/) .
93
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
94
+ # @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
95
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
96
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
97
+ # @return [FetchResult]
109
98
  def query_batches(options={})
110
99
  path = "/api/v2/batches"
111
-
112
100
  get(path, options)
113
101
  end
114
102
 
@@ -3,49 +3,69 @@ module AvaTax
3
3
  module Companies
4
4
 
5
5
 
6
+ # Change the filing status of this company
7
+ #
8
+ # Changes the current filing status of this company.
9
+ #
10
+ # For customers using Avalara's Managed Returns Service, each company within their account can request
11
+ # for Avalara to file tax returns on their behalf. Avalara compliance team members will review all
12
+ # requested filing calendars prior to beginning filing tax returns on behalf of this company.
13
+ #
14
+ # The following changes may be requested through this API:
15
+ #
16
+ # * If a company is in `NotYetFiling` status, the customer may request this be changed to `FilingRequested`.
17
+ # * Avalara compliance team members may change a company from `FilingRequested` to `FirstFiling`.
18
+ # * Avalara compliance team members may change a company from `FirstFiling` to `Active`.
19
+ #
20
+ # All other status changes must be requested through the Avalara customer support team.
21
+ # @param id [Integer]
22
+ # @param model [Object]
23
+ # @return [String]
24
+ def change_filing_status(id, model)
25
+ path = "/api/v2/companies/#{id}/filingstatus"
26
+ post(path, model)
27
+ end
28
+
29
+
6
30
  # Quick setup for a company with a single physical address
7
- #
31
+ #
8
32
  # Shortcut to quickly setup a single-physical-location company with critical information and activate it.
9
33
  # This API provides quick and simple company setup functionality and does the following things:
10
- #
34
+ #
11
35
  # * Create a company object with its own tax profile
12
36
  # * Add a key contact person for the company
13
37
  # * Set up one physical location for the main office
14
38
  # * Declare nexus in all taxing jurisdictions for that main office address
15
39
  # * Activate the company
16
- #
17
- # This API only provides a limited subset of functionality compared to the 'Create Company' API call.
40
+ #
41
+ # This API only provides a limited subset of functionality compared to the 'Create Company' API call.
18
42
  # If you need additional features or options not present in this 'Quick Setup' API call, please use the full 'Create Company' call instead.
19
- #
20
- # @param CompanyInitializationModel model Information about the company you wish to create.
21
- # @return CompanyModel
43
+ # @param model [Object] Information about the company you wish to create.
44
+ # @return [Object]
22
45
  def company_initialize(model)
23
46
  path = "/api/v2/companies/initialize"
24
-
25
47
  post(path, model)
26
48
  end
27
49
 
28
50
 
29
51
  # Create new companies
30
- #
52
+ #
31
53
  # Create one or more new company objects.
32
54
  # A 'company' represents a single corporation or individual that is registered to handle transactional taxes.
33
55
  # You may attach nested data objects such as contacts, locations, and nexus with this CREATE call, and those objects will be created with the company.
34
- #
35
- # @param CompanyModel[] model Either a single company object or an array of companies to create
36
- # @return CompanyModel[]
56
+ # @param model [object[]] Either a single company object or an array of companies to create
57
+ # @return [object[]]
37
58
  def create_companies(model)
38
59
  path = "/api/v2/companies"
39
-
40
60
  post(path, model)
41
61
  end
42
62
 
43
63
 
44
64
  # Request managed returns funding setup for a company
45
- #
65
+ #
46
66
  # This API is available by invitation only.
47
- # Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are
48
- # required to setup their funding configuration before Avalara can begin filing tax returns on their
67
+ # Companies that use the Avalara Managed Returns or the SST Certified Service Provider services are
68
+ # required to setup their funding configuration before Avalara can begin filing tax returns on their
49
69
  # behalf.
50
70
  # Funding configuration for each company is set up by submitting a funding setup request, which can
51
71
  # be sent either via email or via an embedded HTML widget.
@@ -53,36 +73,32 @@ module AvaTax
53
73
  # before approval.
54
74
  # This API records that an ambedded HTML funding setup widget was activated.
55
75
  # This API requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
56
- #
57
- # @param int id The unique identifier of the company
58
- # @param FundingInitiateModel model The funding initialization request
59
- # @return FundingStatusModel
76
+ # @param id [Integer] The unique identifier of the company
77
+ # @param model [Object] The funding initialization request
78
+ # @return [Object]
60
79
  def create_funding_request(id, model)
61
80
  path = "/api/v2/companies/#{id}/funding/setup"
62
-
63
81
  post(path, model)
64
82
  end
65
83
 
66
84
 
67
85
  # Delete a single company
68
- #
86
+ #
69
87
  # Deleting a company will delete all child companies, and all users attached to this company.
70
- #
71
- # @param int id The ID of the company you wish to delete.
72
- # @return ErrorDetail[]
88
+ # @param id [Integer] The ID of the company you wish to delete.
89
+ # @return [object[]]
73
90
  def delete_company(id)
74
91
  path = "/api/v2/companies/#{id}"
75
-
76
92
  delete(path)
77
93
  end
78
94
 
79
95
 
80
96
  # Retrieve a single company
81
- #
97
+ #
82
98
  # Get the company object identified by this URL.
83
99
  # A 'company' represents a single corporation or individual that is registered to handle transactional taxes.
84
100
  # 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:
85
- #
101
+ #
86
102
  # * Contacts
87
103
  # * Items
88
104
  # * Locations
@@ -91,65 +107,83 @@ module AvaTax
91
107
  # * TaxCodes
92
108
  # * TaxRules
93
109
  # * UPC
94
- #
95
- # @param int id The ID of the company to retrieve.
96
- # @param string include A comma separated list of child objects to return underneath the primary object.
97
- # @return CompanyModel
110
+ # * ECMS
111
+ # @param id [Integer] The ID of the company to retrieve.
112
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
113
+ # @return [Object]
98
114
  def get_company(id, options={})
99
115
  path = "/api/v2/companies/#{id}"
100
-
101
116
  get(path, options)
102
117
  end
103
118
 
104
119
 
105
120
  # Get configuration settings for this company
106
- #
121
+ #
107
122
  # Retrieve a list of all configuration settings tied to this company.
108
- #
123
+ #
109
124
  # Configuration settings provide you with the ability to control features of your account and of your
110
125
  # tax software. The category names `AvaCertServiceConfig` is reserved for
111
126
  # Avalara internal software configuration values; to store your own account-level settings, please
112
127
  # create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
113
- #
128
+ #
114
129
  # Company settings are permanent settings that cannot be deleted. You can set the value of a
115
130
  # company setting to null if desired.
116
- #
131
+ #
117
132
  # Avalara-based account settings for `AvaCertServiceConfig` affect your account's exemption certificate
118
133
  # processing, and should only be changed with care.
119
- #
120
- # @param int id
121
- # @return CompanyConfigurationModel[]
134
+ # @param id [Integer]
135
+ # @return [object[]]
122
136
  def get_company_configuration(id)
123
137
  path = "/api/v2/companies/#{id}/configuration"
124
-
138
+ get(path)
139
+ end
140
+
141
+
142
+ # Get this company's filing status
143
+ #
144
+ # Retrieve the current filing status of this company.
145
+ #
146
+ # For customers using Avalara's Managed Returns Service, each company within their account can request
147
+ # for Avalara to file tax returns on their behalf. Avalara compliance team members will review all
148
+ # requested filing calendars prior to beginning filing tax returns on behalf of this company.
149
+ #
150
+ # A company's filing status can be one of the following values:
151
+ #
152
+ # * `NoReporting` - This company is not configured to report tax returns; instead, it reports through a parent company.
153
+ # * `NotYetFiling` - This company has not yet begun filing tax returns through Avalara's Managed Returns Service.
154
+ # * `FilingRequested` - The company has requested to begin filing tax returns, but Avalara's compliance team has not yet begun filing.
155
+ # * `FirstFiling` - The company has recently filing tax returns and is in a new status.
156
+ # * `Active` - The company is currently active and is filing tax returns via Avalara Managed Returns.
157
+ # @param id [Integer]
158
+ # @return [String]
159
+ def get_filing_status(id)
160
+ path = "/api/v2/companies/#{id}/filingstatus"
125
161
  get(path)
126
162
  end
127
163
 
128
164
 
129
165
  # Check managed returns funding configuration for a company
130
- #
166
+ #
131
167
  # This API is available by invitation only.
132
168
  # Requires a subscription to Avalara Managed Returns or SST Certified Service Provider.
133
169
  # Returns a list of funding setup requests and their current status.
134
170
  # Each object in the result is a request that was made to setup or adjust funding configuration for this company.
135
- #
136
- # @param int id The unique identifier of the company
137
- # @return FundingStatusModel[]
171
+ # @param id [Integer] The unique identifier of the company
172
+ # @return [object[]]
138
173
  def list_funding_requests_by_company(id)
139
174
  path = "/api/v2/companies/#{id}/funding"
140
-
141
175
  get(path)
142
176
  end
143
177
 
144
178
 
145
179
  # Retrieve all companies
146
- #
180
+ #
147
181
  # Get multiple company objects.
148
182
  # A 'company' represents a single corporation or individual that is registered to handle transactional taxes.
149
183
  # 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/) .
150
184
  # Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
151
185
  # 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:
152
- #
186
+ #
153
187
  # * Contacts
154
188
  # * Items
155
189
  # * Locations
@@ -158,58 +192,53 @@ module AvaTax
158
192
  # * TaxCodes
159
193
  # * TaxRules
160
194
  # * UPC
161
- #
162
- # @param string include A comma separated list of child objects to return underneath the primary object.
163
- # @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/) .
164
- # @param int top If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
165
- # @param int skip If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
166
- # @param string orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
167
- # @return FetchResult
195
+ # * ECMS
196
+ # @param include [String] A comma separated list of child objects to return underneath the primary object.
197
+ # @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/) .
198
+ # @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
199
+ # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
200
+ # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
201
+ # @return [FetchResult]
168
202
  def query_companies(options={})
169
203
  path = "/api/v2/companies"
170
-
171
204
  get(path, options)
172
205
  end
173
206
 
174
207
 
175
208
  # Change configuration settings for this account
176
- #
209
+ #
177
210
  # Update configuration settings tied to this account.
178
- #
211
+ #
179
212
  # Configuration settings provide you with the ability to control features of your account and of your
180
213
  # tax software. The category names `AvaCertServiceConfig` is reserved for
181
214
  # Avalara internal software configuration values; to store your own account-level settings, please
182
215
  # create a new category name that begins with `X-`, for example, `X-MyCustomCategory`.
183
- #
216
+ #
184
217
  # Company settings are permanent settings that cannot be deleted. You can set the value of a
185
218
  # company setting to null if desired.
186
- #
219
+ #
187
220
  # Avalara-based account settings for `AvaCertServiceConfig` affect your account's exemption certificate
188
221
  # processing, and should only be changed with care.
189
- #
190
- # @param int id
191
- # @param CompanyConfigurationModel[] model
192
- # @return CompanyConfigurationModel[]
222
+ # @param id [Integer]
223
+ # @param model [object[]]
224
+ # @return [object[]]
193
225
  def set_company_configuration(id, model)
194
226
  path = "/api/v2/companies/#{id}/configuration"
195
-
196
227
  post(path, model)
197
228
  end
198
229
 
199
230
 
200
231
  # Update a single company
201
- #
232
+ #
202
233
  # Replace the existing company object at this URL with an updated object.
203
234
  # A 'company' represents a single corporation or individual that is registered to handle transactional taxes.
204
- # All data from the existing object will be replaced with data in the object you PUT.
235
+ # All data from the existing object will be replaced with data in the object you PUT.
205
236
  # 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.
206
- #
207
- # @param int id The ID of the company you wish to update.
208
- # @param CompanyModel model The company object you wish to update.
209
- # @return CompanyModel
237
+ # @param id [Integer] The ID of the company you wish to update.
238
+ # @param model [Object] The company object you wish to update.
239
+ # @return [Object]
210
240
  def update_company(id, model)
211
241
  path = "/api/v2/companies/#{id}"
212
-
213
242
  put(path, model)
214
243
  end
215
244