Skip to content

Commit

Permalink
20-7-update update
Browse files Browse the repository at this point in the history
  • Loading branch information
contygm committed Jul 17, 2020
1 parent fc91942 commit 6e9b653
Show file tree
Hide file tree
Showing 37 changed files with 608 additions and 1,520 deletions.
77 changes: 22 additions & 55 deletions lib/avatax/client/accounts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ module Accounts
# @param id [Integer] The ID of the account you wish to update.
# @param model [Object] A request confirming that you wish to reset the license key of this account.
# @return [Object]
def account_reset_license_key(id, model)
path = "/api/v2/accounts/#{id}/resetlicensekey"
post(path, model)
end

def account_reset_license_key(id, model) path = "/api/v2/accounts/#{id}/resetlicensekey"
post(path, model) end

# Activate an account by accepting terms and conditions
#
Expand All @@ -51,11 +48,8 @@ def account_reset_license_key(id, model)
# @param id [Integer] The ID of the account to activate
# @param model [Object] The activation request
# @return [Object]
def activate_account(id, model)
path = "/api/v2/accounts/#{id}/activate"
post(path, model)
end

def activate_account(id, model) path = "/api/v2/accounts/#{id}/activate"
post(path, model) end

# Retrieve audit history for an account.
#
Expand Down Expand Up @@ -83,11 +77,8 @@ def activate_account(id, model)
# @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.
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
# @return [FetchResult]
def audit_account(id, options={})
path = "/api/v2/accounts/#{id}/audit"
get(path, options)
end

def audit_account(id, options={}) path = "/api/v2/accounts/#{id}/audit"
get(path, options) end

# Create license key for this account
#
Expand All @@ -108,11 +99,8 @@ def audit_account(id, options={})
# @param id [Integer] The ID of the account you wish to update.
# @param model [Object]
# @return [Object]
def create_license_key(id, model)
path = "/api/v2/accounts/#{id}/licensekey"
post(path, model)
end

def create_license_key(id, model) path = "/api/v2/accounts/#{id}/licensekey"
post(path, model) end

# Delete license key for this account by license key name
#
Expand All @@ -128,11 +116,8 @@ def create_license_key(id, model)
# @param id [Integer] The ID of the account you wish to update.
# @param licensekeyname [String] The license key name you wish to update.
# @return [ErrorDetail[]]
def delete_license_key(id, licensekeyname)
path = "/api/v2/accounts/#{id}/licensekey/#{licensekeyname}"
delete(path)
end

def delete_license_key(id, licensekeyname) path = "/api/v2/accounts/#{id}/licensekey/#{licensekeyname}"
delete(path) end

# Retrieve a single account
#
Expand All @@ -148,11 +133,8 @@ def delete_license_key(id, licensekeyname)
# @param id [Integer] The ID of the account to retrieve
# @param include [String] A comma separated list of special fetch options
# @return [Object]
def get_account(id, options={})
path = "/api/v2/accounts/#{id}"
get(path, options)
end

def get_account(id, options={}) path = "/api/v2/accounts/#{id}"
get(path, options) end

# Get configuration settings for this account
#
Expand All @@ -174,11 +156,8 @@ def get_account(id, options={})
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
# @param id [Integer]
# @return [AccountConfigurationModel[]]
def get_account_configuration(id)
path = "/api/v2/accounts/#{id}/configuration"
get(path)
end

def get_account_configuration(id) path = "/api/v2/accounts/#{id}/configuration"
get(path) end

# Retrieve license key by license key name
#
Expand All @@ -188,11 +167,8 @@ def get_account_configuration(id)
# @param id [Integer] The ID of the account to retrieve
# @param licensekeyname [String] The ID of the account to retrieve
# @return [Object]
def get_license_key(id, licensekeyname)
path = "/api/v2/accounts/#{id}/licensekey/#{licensekeyname}"
get(path)
end

def get_license_key(id, licensekeyname) path = "/api/v2/accounts/#{id}/licensekey/#{licensekeyname}"
get(path) end

# Retrieve all license keys for this account
#
Expand All @@ -203,11 +179,8 @@ def get_license_key(id, licensekeyname)
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
# @param id [Integer] The ID of the account to retrieve
# @return [AccountLicenseKeyModel[]]
def get_license_keys(id)
path = "/api/v2/accounts/#{id}/licensekeys"
get(path)
end

def get_license_keys(id) path = "/api/v2/accounts/#{id}/licensekeys"
get(path) end

# Retrieve all accounts
#
Expand All @@ -233,11 +206,8 @@ def get_license_keys(id)
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
# @return [FetchResult]
def query_accounts(options={})
path = "/api/v2/accounts"
get(path, options)
end

def query_accounts(options={}) path = "/api/v2/accounts"
get(path, options) end

# Change configuration settings for this account
#
Expand All @@ -260,11 +230,8 @@ def query_accounts(options={})
# @param id [Integer]
# @param model [AccountConfigurationModel[]]
# @return [AccountConfigurationModel[]]
def set_account_configuration(id, model)
path = "/api/v2/accounts/#{id}/configuration"
post(path, model)
end

def set_account_configuration(id, model) path = "/api/v2/accounts/#{id}/configuration"
post(path, model) end
end
end
end
14 changes: 4 additions & 10 deletions lib/avatax/client/addresses.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@ module Addresses
# @param country [String] Two character ISO 3166 Country Code (see /api/v2/definitions/countries for a full list)
# @param textCase [String] selectable text case for address validation (See TextCase::* for a list of allowable values)
# @return [Object]
def resolve_address(options={})
path = "/api/v2/addresses/resolve"
get(path, options)
end

def resolve_address(options={}) path = "/api/v2/addresses/resolve"
get(path, options) end

# Retrieve geolocation information for a specified address
#
Expand All @@ -51,11 +48,8 @@ def resolve_address(options={})
# * This API depends on the following active services<br />*Required* (all): AutoAddress.
# @param model [Object] The address to resolve
# @return [Object]
def resolve_address_post(model)
path = "/api/v2/addresses/resolve"
post(path, model)
end

def resolve_address_post(model) path = "/api/v2/addresses/resolve"
post(path, model) end
end
end
end
42 changes: 12 additions & 30 deletions lib/avatax/client/advancedrules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,17 @@ module AdvancedRules
# @param companyId [Integer] The ID of the company for which the lookup file is to be created
# @param model [Object] The lookup file you wish to create
# @return [Object]
def create_company_lookup_file(accountId, companyId, model)
path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/lookupFiles"
post(path, model)
end

def create_company_lookup_file(accountId, companyId, model) path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/lookupFiles"
post(path, model) end

# Delete a lookup file
#
#
# @param accountId [Integer] The ID of the account for the company the lookup file is for
# @param id [String] The unique ID/GUID for the company lookup file to be deleted
# @return [ErrorDetail[]]
def delete_lookup_file(accountId, id)
path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
delete(path)
end

def delete_lookup_file(accountId, id) path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
delete(path) end

# Get audit records by account id and date range.
#
Expand All @@ -35,35 +29,26 @@ def delete_lookup_file(accountId, id)
# @param fromDate [String] Date
# @param toDate [String] Date
# @return [Object]
def get_audit_records(accountId, fromDate, toDate)
path = "/api/v2/advancedrules/audits/accounts/#{accountId}/from/#{fromDate}/to/#{toDate}"
get(path)
end

def get_audit_records(accountId, fromDate, toDate) path = "/api/v2/advancedrules/audits/accounts/#{accountId}/from/#{fromDate}/to/#{toDate}"
get(path) end

# Get the lookup files for a company
#
#
# @param accountId [Integer] The account ID for the company
# @param companyId [Integer] The ID of the company for which to retrieve lookup files
# @return [FetchResult]
def get_company_lookup_files(accountId, companyId)
path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/lookupFiles"
get(path)
end

def get_company_lookup_files(accountId, companyId) path = "/api/v2/advancedrules/accounts/#{accountId}/companies/#{companyId}/lookupFiles"
get(path) end

# Get a lookup file for an accountId and companyLookupFileId
#
#
# @param accountId [Integer] The ID of the account for the lookup file
# @param id [String] The unique ID/GUID of the company lookup file to return
# @return [Object]
def get_lookup_file(accountId, id)
path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
get(path)
end

def get_lookup_file(accountId, id) path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
get(path) end

# Update a lookup file
#
Expand All @@ -72,11 +57,8 @@ def get_lookup_file(accountId, id)
# @param id [String] The unique ID/GUID of the company lookup file to be updated
# @param model [Object] The new values to update the lookup file
# @return [Object]
def update_lookup_file(accountId, id, model)
path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
put(path, model)
end

def update_lookup_file(accountId, id, model) path = "/api/v2/advancedrules/accounts/#{accountId}/lookupFiles/#{id}"
put(path, model) end
end
end
end
35 changes: 10 additions & 25 deletions lib/avatax/client/avafileforms.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ module AvaFileForms
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
# @param model [AvaFileFormModel[]] The AvaFileForm you wish to create.
# @return [AvaFileFormModel[]]
def create_ava_file_forms(model)
path = "/api/v2/avafileforms"
post(path, model)
end

def create_ava_file_forms(model) path = "/api/v2/avafileforms"
post(path, model) end

# Delete a single AvaFileForm
#
Expand All @@ -30,11 +27,8 @@ def create_ava_file_forms(model)
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
# @param id [Integer] The ID of the AvaFileForm you wish to delete.
# @return [ErrorDetail[]]
def delete_ava_file_form(id)
path = "/api/v2/avafileforms/#{id}"
delete(path)
end

def delete_ava_file_form(id) path = "/api/v2/avafileforms/#{id}"
delete(path) end

# Retrieve a single AvaFileForm
#
Expand All @@ -46,11 +40,8 @@ def delete_ava_file_form(id)
# * This API depends on the following active services<br />*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.<br />*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged.
# @param id [Integer] The primary key of this AvaFileForm
# @return [Object]
def get_ava_file_form(id)
path = "/api/v2/avafileforms/#{id}"
get(path)
end

def get_ava_file_form(id) path = "/api/v2/avafileforms/#{id}"
get(path) end

# Retrieve all AvaFileForms
#
Expand All @@ -66,11 +57,8 @@ def get_ava_file_form(id)
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
# @return [FetchResult]
def query_ava_file_forms(options={})
path = "/api/v2/avafileforms"
get(path, options)
end

def query_ava_file_forms(options={}) path = "/api/v2/avafileforms"
get(path, options) end

# Update a AvaFileForm
#
Expand All @@ -84,11 +72,8 @@ def query_ava_file_forms(options={})
# @param id [Integer] The ID of the AvaFileForm you wish to update
# @param model [Object] The AvaFileForm model you wish to update.
# @return [Object]
def update_ava_file_form(id, model)
path = "/api/v2/avafileforms/#{id}"
put(path, model)
end

def update_ava_file_form(id, model) path = "/api/v2/avafileforms/#{id}"
put(path, model) end
end
end
end
Loading

0 comments on commit 6e9b653

Please sign in to comment.