From 6e9b653bce5f53df1a33062ecbc4a43cc4b17d97 Mon Sep 17 00:00:00 2001 From: contygm Date: Fri, 17 Jul 2020 21:10:38 +0000 Subject: [PATCH 1/2] 20-7-update update --- lib/avatax/client/accounts.rb | 77 ++-- lib/avatax/client/addresses.rb | 14 +- lib/avatax/client/advancedrules.rb | 42 +-- lib/avatax/client/avafileforms.rb | 35 +- lib/avatax/client/batches.rb | 56 +-- lib/avatax/client/certexpressinvites.rb | 21 +- lib/avatax/client/certificates.rb | 105 ++---- lib/avatax/client/companies.rb | 112 ++---- lib/avatax/client/compliance.rb | 7 +- lib/avatax/client/contacts.rb | 42 +-- lib/avatax/client/customers.rb | 91 ++--- lib/avatax/client/datasources.rb | 42 +-- lib/avatax/client/definitions.rb | 413 ++++++--------------- lib/avatax/client/distancethresholds.rb | 42 +-- lib/avatax/client/filingcalendars.rb | 7 +- lib/avatax/client/filings.rb | 7 +- lib/avatax/client/firmclientlinkages.rb | 63 +--- lib/avatax/client/free.rb | 21 +- lib/avatax/client/fundingrequests.rb | 14 +- lib/avatax/client/items.rb | 133 ++----- lib/avatax/client/jurisdictionoverrides.rb | 42 +-- lib/avatax/client/locations.rb | 49 +-- lib/avatax/client/multidocument.rb | 70 +--- lib/avatax/client/nexus.rb | 56 +-- lib/avatax/client/notifications.rb | 21 +- lib/avatax/client/provisioning.rb | 14 +- lib/avatax/client/registrar.rb | 70 +--- lib/avatax/client/reports.rb | 28 +- lib/avatax/client/settings.rb | 42 +-- lib/avatax/client/subscriptions.rb | 21 +- lib/avatax/client/taxcodes.rb | 42 +-- lib/avatax/client/taxcontent.rb | 21 +- lib/avatax/client/taxrules.rb | 42 +-- lib/avatax/client/transactions.rb | 147 +++----- lib/avatax/client/upcs.rb | 42 +-- lib/avatax/client/users.rb | 56 +-- lib/avatax/client/utilities.rb | 21 +- 37 files changed, 608 insertions(+), 1520 deletions(-) diff --git a/lib/avatax/client/accounts.rb b/lib/avatax/client/accounts.rb index 820d74d..06eb243 100644 --- a/lib/avatax/client/accounts.rb +++ b/lib/avatax/client/accounts.rb @@ -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 # @@ -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. # @@ -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 # @@ -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 # @@ -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 # @@ -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 # @@ -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 # @@ -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 # @@ -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 # @@ -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 # @@ -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 \ No newline at end of file diff --git a/lib/avatax/client/addresses.rb b/lib/avatax/client/addresses.rb index d5e451a..f33ffc9 100644 --- a/lib/avatax/client/addresses.rb +++ b/lib/avatax/client/addresses.rb @@ -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 # @@ -51,11 +48,8 @@ def resolve_address(options={}) # * This API depends on the following active services
*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 \ No newline at end of file diff --git a/lib/avatax/client/advancedrules.rb b/lib/avatax/client/advancedrules.rb index 002c2ca..bd0c6aa 100644 --- a/lib/avatax/client/advancedrules.rb +++ b/lib/avatax/client/advancedrules.rb @@ -10,11 +10,8 @@ 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 # @@ -22,11 +19,8 @@ def create_company_lookup_file(accountId, companyId, model) # @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. # @@ -35,11 +29,8 @@ 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 # @@ -47,11 +38,8 @@ def get_audit_records(accountId, fromDate, toDate) # @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 # @@ -59,11 +47,8 @@ def get_company_lookup_files(accountId, companyId) # @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 # @@ -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 \ No newline at end of file diff --git a/lib/avatax/client/avafileforms.rb b/lib/avatax/client/avafileforms.rb index 7e4822f..594d9cf 100644 --- a/lib/avatax/client/avafileforms.rb +++ b/lib/avatax/client/avafileforms.rb @@ -14,11 +14,8 @@ module AvaFileForms # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*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 # @@ -30,11 +27,8 @@ def create_ava_file_forms(model) # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*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 # @@ -46,11 +40,8 @@ def delete_ava_file_form(id) # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*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 # @@ -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 # @@ -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 \ No newline at end of file diff --git a/lib/avatax/client/batches.rb b/lib/avatax/client/batches.rb index b248936..4e0ff6a 100644 --- a/lib/avatax/client/batches.rb +++ b/lib/avatax/client/batches.rb @@ -24,11 +24,8 @@ module Batches # @param companyId [Integer] The ID of the company that owns this batch. # @param id [Integer] The ID of the batch to cancel. # @return [Object] - def cancel_batch(companyId, id) - path = "/api/v2/companies/#{companyId}/batches/#{id}/cancel" - post(path) - end - + def cancel_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}/cancel" + post(path) end # Create a new batch # @@ -58,11 +55,8 @@ def cancel_batch(companyId, id) # @param companyId [Integer] The ID of the company that owns this batch. # @param model [BatchModel[]] The batch you wish to create. # @return [BatchModel[]] - def create_batches(companyId, model) - path = "/api/v2/companies/#{companyId}/batches" - post(path, model) - end - + def create_batches(companyId, model) path = "/api/v2/companies/#{companyId}/batches" + post(path, model) end # Create a new transaction batch # @@ -90,11 +84,8 @@ def create_batches(companyId, model) # @param companyId [Integer] The ID of the company that owns this batch. # @param model [Object] The transaction batch you wish to create. # @return [Object] - def create_transaction_batch(companyId, model) - path = "/api/v2/companies/#{companyId}/batches/transactions" - post(path, model) - end - + def create_transaction_batch(companyId, model) path = "/api/v2/companies/#{companyId}/batches/transactions" + post(path, model) end # Delete a single batch # @@ -115,11 +106,8 @@ def create_transaction_batch(companyId, model) # @param companyId [Integer] The ID of the company that owns this batch. # @param id [Integer] The ID of the batch to delete. # @return [ErrorDetail[]] - def delete_batch(companyId, id) - path = "/api/v2/companies/#{companyId}/batches/#{id}" - delete(path) - end - + def delete_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}" + delete(path) end # Download a single batch file # @@ -132,11 +120,8 @@ def delete_batch(companyId, id) # @param batchId [Integer] The ID of the batch object # @param id [Integer] The primary key of this batch file object # @return [Object] - def download_batch(companyId, batchId, id) - path = "/api/v2/companies/#{companyId}/batches/#{batchId}/files/#{id}/attachment" - get(path) - end - + def download_batch(companyId, batchId, id) path = "/api/v2/companies/#{companyId}/batches/#{batchId}/files/#{id}/attachment" + get(path) end # Retrieve a single batch # @@ -162,11 +147,8 @@ def download_batch(companyId, batchId, id) # @param companyId [Integer] The ID of the company that owns this batch # @param id [Integer] The primary key of this batch # @return [Object] - def get_batch(companyId, id) - path = "/api/v2/companies/#{companyId}/batches/#{id}" - get(path) - end - + def get_batch(companyId, id) path = "/api/v2/companies/#{companyId}/batches/#{id}" + get(path) end # Retrieve all batches for this company # @@ -202,11 +184,8 @@ def get_batch(companyId, 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 list_batches_by_company(companyId, options={}) - path = "/api/v2/companies/#{companyId}/batches" - get(path, options) - end - + def list_batches_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/batches" + get(path, options) end # Retrieve all batches # @@ -238,11 +217,8 @@ def list_batches_by_company(companyId, options={}) # @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_batches(options={}) - path = "/api/v2/batches" - get(path, options) - end - + def query_batches(options={}) path = "/api/v2/batches" + get(path, options) end end end end \ No newline at end of file diff --git a/lib/avatax/client/certexpressinvites.rb b/lib/avatax/client/certexpressinvites.rb index 4970b9c..0976c07 100644 --- a/lib/avatax/client/certexpressinvites.rb +++ b/lib/avatax/client/certexpressinvites.rb @@ -29,11 +29,8 @@ module CertExpressInvites # @param customerCode [String] The number of the customer where the request is sent to # @param model [CreateCertExpressInvitationModel[]] the requests to send out to customers # @return [CertExpressInvitationStatusModel[]] - def create_cert_express_invitation(companyId, customerCode, model) - path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certexpressinvites" - post(path, model) - end - + def create_cert_express_invitation(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certexpressinvites" + post(path, model) end # Retrieve a single CertExpress invitation # @@ -62,11 +59,8 @@ def create_cert_express_invitation(companyId, customerCode, model) # @param id [Integer] The unique ID number of this CertExpress invitation # @param include [String] OPTIONAL: A comma separated list of special fetch options. No options are defined at this time. # @return [Object] - def get_cert_express_invitation(companyId, customerCode, id, options={}) - path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certexpressinvites/#{id}" - get(path, options) - end - + def get_cert_express_invitation(companyId, customerCode, id, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certexpressinvites/#{id}" + get(path, options) end # List CertExpress invitations # @@ -97,11 +91,8 @@ def get_cert_express_invitation(companyId, customerCode, id, options={}) # @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 list_cert_express_invitations(companyId, options={}) - path = "/api/v2/companies/#{companyId}/certexpressinvites" - get(path, options) - end - + def list_cert_express_invitations(companyId, options={}) path = "/api/v2/companies/#{companyId}/certexpressinvites" + get(path, options) end end end end \ No newline at end of file diff --git a/lib/avatax/client/certificates.rb b/lib/avatax/client/certificates.rb index b5a3021..20e83ed 100644 --- a/lib/avatax/client/certificates.rb +++ b/lib/avatax/client/certificates.rb @@ -35,11 +35,8 @@ module Certificates # @param preValidatedExemptionReason [Boolean] If set to true, the certificate will bypass the human verification process. # @param model [CertificateModel[]] Certificates to be created # @return [CertificateModel[]] - def create_certificates(companyId, model, options={}) - path = "/api/v2/companies/#{companyId}/certificates" - post(path, model, options) - end - + def create_certificates(companyId, model, options={}) path = "/api/v2/companies/#{companyId}/certificates" + post(path, model, options) end # Revoke and delete a certificate # @@ -64,11 +61,8 @@ def create_certificates(companyId, model, options={}) # @param companyId [Integer] The unique ID number of the company that recorded this certificate # @param id [Integer] The unique ID number of this certificate # @return [ErrorDetail[]] - def delete_certificate(companyId, id) - path = "/api/v2/companies/#{companyId}/certificates/#{id}" - delete(path) - end - + def delete_certificate(companyId, id) path = "/api/v2/companies/#{companyId}/certificates/#{id}" + delete(path) end # Download an image for this certificate # @@ -96,11 +90,8 @@ def delete_certificate(companyId, id) # @param page [Integer] If you choose `$type`=`Jpeg`, you must specify which page number to retrieve. # @param type [String] The data format in which to retrieve the certificate image (See CertificatePreviewType::* for a list of allowable values) # @return [Object] - def download_certificate_image(companyId, id, options={}) - path = "/api/v2/companies/#{companyId}/certificates/#{id}/attachment" - get(path, options) - end - + def download_certificate_image(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/certificates/#{id}/attachment" + get(path, options) end # Retrieve a single certificate # @@ -130,11 +121,8 @@ def download_certificate_image(companyId, id, options={}) # @param id [Integer] The unique ID number of this certificate # @param include [String] OPTIONAL: A comma separated list of special fetch options. You can specify one or more of the following: * customers - Retrieves the list of customers linked to the certificate. * po_numbers - Retrieves all PO numbers tied to the certificate. * attributes - Retrieves all attributes applied to the certificate. # @return [Object] - def get_certificate(companyId, id, options={}) - path = "/api/v2/companies/#{companyId}/certificates/#{id}" - get(path, options) - end - + def get_certificate(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/certificates/#{id}" + get(path, options) end # Check a company's exemption certificate status. # @@ -152,11 +140,8 @@ def get_certificate(companyId, id, options={}) # * This API depends on the following active services
*Required* (all): AvaTaxPro. # @param companyId [Integer] The company ID to check # @return [Object] - def get_certificate_setup(companyId) - path = "/api/v2/companies/#{companyId}/certificates/setup" - get(path) - end - + def get_certificate_setup(companyId) path = "/api/v2/companies/#{companyId}/certificates/setup" + get(path) end # Link attributes to a certificate # @@ -183,11 +168,8 @@ def get_certificate_setup(companyId) # @param id [Integer] The unique ID number of this certificate # @param model [CertificateAttributeModel[]] The list of attributes to link to this certificate. # @return [FetchResult] - def link_attributes_to_certificate(companyId, id, model) - path = "/api/v2/companies/#{companyId}/certificates/#{id}/attributes/link" - post(path, model) - end - + def link_attributes_to_certificate(companyId, id, model) path = "/api/v2/companies/#{companyId}/certificates/#{id}/attributes/link" + post(path, model) end # Link customers to a certificate # @@ -215,11 +197,8 @@ def link_attributes_to_certificate(companyId, id, model) # @param id [Integer] The unique ID number of this certificate # @param model [Object] The list of customers needed be added to the Certificate for exemption # @return [FetchResult] - def link_customers_to_certificate(companyId, id, model) - path = "/api/v2/companies/#{companyId}/certificates/#{id}/customers/link" - post(path, model) - end - + def link_customers_to_certificate(companyId, id, model) path = "/api/v2/companies/#{companyId}/certificates/#{id}/customers/link" + post(path, model) end # List all attributes applied to this certificate # @@ -245,11 +224,8 @@ def link_customers_to_certificate(companyId, id, model) # @param companyId [Integer] The unique ID number of the company that recorded this certificate # @param id [Integer] The unique ID number of this certificate # @return [FetchResult] - def list_attributes_for_certificate(companyId, id) - path = "/api/v2/companies/#{companyId}/certificates/#{id}/attributes" - get(path) - end - + def list_attributes_for_certificate(companyId, id) path = "/api/v2/companies/#{companyId}/certificates/#{id}/attributes" + get(path) end # List customers linked to this certificate # @@ -276,11 +252,8 @@ def list_attributes_for_certificate(companyId, id) # @param id [Integer] The unique ID number of this certificate # @param include [String] OPTIONAL: A comma separated list of special fetch options. No options are currently available when fetching customers. # @return [FetchResult] - def list_customers_for_certificate(companyId, id, options={}) - path = "/api/v2/companies/#{companyId}/certificates/#{id}/customers" - get(path, options) - end - + def list_customers_for_certificate(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/certificates/#{id}/customers" + get(path, options) end # List all certificates for a company # @@ -313,11 +286,8 @@ def list_customers_for_certificate(companyId, id, options={}) # @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_certificates(companyId, options={}) - path = "/api/v2/companies/#{companyId}/certificates" - get(path, options) - end - + def query_certificates(companyId, options={}) path = "/api/v2/companies/#{companyId}/certificates" + get(path, options) end # Request setup of exemption certificates for this company. # @@ -337,11 +307,8 @@ def query_certificates(companyId, options={}) # * This API depends on the following active services
*Required* (all): AvaTaxPro. # @param companyId [Integer] # @return [Object] - def request_certificate_setup(companyId) - path = "/api/v2/companies/#{companyId}/certificates/setup" - post(path) - end - + def request_certificate_setup(companyId) path = "/api/v2/companies/#{companyId}/certificates/setup" + post(path) end # Unlink attributes from a certificate # @@ -368,11 +335,8 @@ def request_certificate_setup(companyId) # @param id [Integer] The unique ID number of this certificate # @param model [CertificateAttributeModel[]] The list of attributes to unlink from this certificate. # @return [FetchResult] - def unlink_attributes_from_certificate(companyId, id, model) - path = "/api/v2/companies/#{companyId}/certificates/#{id}/attributes/unlink" - post(path, model) - end - + def unlink_attributes_from_certificate(companyId, id, model) path = "/api/v2/companies/#{companyId}/certificates/#{id}/attributes/unlink" + post(path, model) end # Unlink customers from a certificate # @@ -401,11 +365,8 @@ def unlink_attributes_from_certificate(companyId, id, model) # @param id [Integer] The unique ID number of this certificate # @param model [Object] The list of customers to unlink from this certificate # @return [FetchResult] - def unlink_customers_from_certificate(companyId, id, model) - path = "/api/v2/companies/#{companyId}/certificates/#{id}/customers/unlink" - post(path, model) - end - + def unlink_customers_from_certificate(companyId, id, model) path = "/api/v2/companies/#{companyId}/certificates/#{id}/customers/unlink" + post(path, model) end # Update a single certificate # @@ -429,11 +390,8 @@ def unlink_customers_from_certificate(companyId, id, model) # @param id [Integer] The unique ID number of this certificate # @param model [Object] The new certificate object that will replace the existing one # @return [Object] - def update_certificate(companyId, id, model) - path = "/api/v2/companies/#{companyId}/certificates/#{id}" - put(path, model) - end - + def update_certificate(companyId, id, model) path = "/api/v2/companies/#{companyId}/certificates/#{id}" + put(path, model) end # Upload an image or PDF attachment for this certificate # @@ -460,11 +418,8 @@ def update_certificate(companyId, id, model) # @param id [Integer] The unique ID number of this certificate # @param file [Object] The exemption certificate file you wanted to upload. Accepted formats are: PDF, JPEG, TIFF, PNG. # @return [String] - def upload_certificate_image(companyId, id) - path = "/api/v2/companies/#{companyId}/certificates/#{id}/attachment" - post(path) - end - + def upload_certificate_image(companyId, id) path = "/api/v2/companies/#{companyId}/certificates/#{id}/attachment" + post(path) end end end end \ No newline at end of file diff --git a/lib/avatax/client/companies.rb b/lib/avatax/client/companies.rb index 7860d82..8762006 100644 --- a/lib/avatax/client/companies.rb +++ b/lib/avatax/client/companies.rb @@ -34,11 +34,8 @@ module Companies # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # @param id [Integer] The ID of the company to check if its integration is certified. # @return [String] - def certify_integration(id) - path = "/api/v2/companies/#{id}/certify" - get(path) - end - + def certify_integration(id) path = "/api/v2/companies/#{id}/certify" + get(path) end # Change the filing status of this company # @@ -62,11 +59,8 @@ def certify_integration(id) # @param id [Integer] # @param model [Object] # @return [String] - def change_filing_status(id, model) - path = "/api/v2/companies/#{id}/filingstatus" - post(path, model) - end - + def change_filing_status(id, model) path = "/api/v2/companies/#{id}/filingstatus" + post(path, model) end # Quick setup for a company with a single physical address # @@ -88,11 +82,8 @@ def change_filing_status(id, model) # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. # @param model [Object] Information about the company you wish to create. # @return [Object] - def company_initialize(model) - path = "/api/v2/companies/initialize" - post(path, model) - end - + def company_initialize(model) path = "/api/v2/companies/initialize" + post(path, model) end # Create new companies # @@ -107,11 +98,8 @@ def company_initialize(model) # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. # @param model [CompanyModel[]] Either a single company object or an array of companies to create # @return [CompanyModel[]] - def create_companies(model) - path = "/api/v2/companies" - post(path, model) - end - + def create_companies(model) path = "/api/v2/companies" + post(path, model) end # Request managed returns funding setup for a company # @@ -133,11 +121,8 @@ def create_companies(model) # @param id [Integer] The unique identifier of the company # @param model [Object] The funding initialization request # @return [Object] - def create_funding_request(id, model) - path = "/api/v2/companies/#{id}/funding/setup" - post(path, model) - end - + def create_funding_request(id, model) path = "/api/v2/companies/#{id}/funding/setup" + post(path, model) end # Delete a single company # @@ -148,11 +133,8 @@ def create_funding_request(id, model) # * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, SSTAdmin, TechnicalSupportAdmin. # @param id [Integer] The ID of the company you wish to delete. # @return [ErrorDetail[]] - def delete_company(id) - path = "/api/v2/companies/#{id}" - delete(path) - end - + def delete_company(id) path = "/api/v2/companies/#{id}" + delete(path) end # Check the funding configuration of a company # @@ -167,11 +149,8 @@ def delete_company(id) # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. # @param companyId [Integer] The unique identifier of the company # @return [Object] - def funding_configuration_by_company(companyId) - path = "/api/v2/companies/#{companyId}/funding/configuration" - get(path) - end - + def funding_configuration_by_company(companyId) path = "/api/v2/companies/#{companyId}/funding/configuration" + get(path) end # Check the funding configuration of a company # @@ -187,11 +166,8 @@ def funding_configuration_by_company(companyId) # @param companyId [Integer] The unique identifier of the company # @param currency [String] The currency of the funding. USD and CAD are the only valid currencies # @return [FundingConfigurationModel[]] - def funding_configurations_by_company_and_currency(companyId, options={}) - path = "/api/v2/companies/#{companyId}/funding/configurations" - get(path, options) - end - + def funding_configurations_by_company_and_currency(companyId, options={}) path = "/api/v2/companies/#{companyId}/funding/configurations" + get(path, options) end # Retrieve a single company # @@ -215,11 +191,8 @@ def funding_configurations_by_company_and_currency(companyId, options={}) # @param id [Integer] The ID of the company to retrieve. # @param include [String] OPTIONAL: A comma separated list of special fetch options. * Child objects - Specify one or more of the following to retrieve objects related to each company: "Contacts", "FilingCalendars", "Items", "Locations", "Nexus", "TaxCodes", "NonReportingChildren" or "TaxRules". * Deleted objects - Specify "FetchDeleted" to retrieve information about previously deleted objects. # @return [Object] - def get_company(id, options={}) - path = "/api/v2/companies/#{id}" - get(path, options) - end - + def get_company(id, options={}) path = "/api/v2/companies/#{id}" + get(path, options) end # Get configuration settings for this company # @@ -241,11 +214,8 @@ def get_company(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 [CompanyConfigurationModel[]] - def get_company_configuration(id) - path = "/api/v2/companies/#{id}/configuration" - get(path) - end - + def get_company_configuration(id) path = "/api/v2/companies/#{id}/configuration" + get(path) end # Get this company's filing status # @@ -268,11 +238,8 @@ def get_company_configuration(id) # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # @param id [Integer] # @return [String] - def get_filing_status(id) - path = "/api/v2/companies/#{id}/filingstatus" - get(path) - end - + def get_filing_status(id) path = "/api/v2/companies/#{id}/filingstatus" + get(path) end # Check managed returns funding status for a company # @@ -287,11 +254,8 @@ def get_filing_status(id) # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # @param id [Integer] The unique identifier of the company # @return [FundingStatusModel[]] - def list_funding_requests_by_company(id) - path = "/api/v2/companies/#{id}/funding" - get(path) - end - + def list_funding_requests_by_company(id) path = "/api/v2/companies/#{id}/funding" + get(path) end # Retrieve a list of MRS Companies with account # @@ -303,11 +267,8 @@ def list_funding_requests_by_company(id) # # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # @return [FetchResult] - def list_mrs_companies() - path = "/api/v2/companies/mrs" - get(path) - end - + def list_mrs_companies() path = "/api/v2/companies/mrs" + get(path) end # Retrieve all companies # @@ -338,11 +299,8 @@ def list_mrs_companies() # @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_companies(options={}) - path = "/api/v2/companies" - get(path, options) - end - + def query_companies(options={}) path = "/api/v2/companies" + get(path, options) end # Change configuration settings for this company # @@ -365,11 +323,8 @@ def query_companies(options={}) # @param id [Integer] # @param model [CompanyConfigurationModel[]] # @return [CompanyConfigurationModel[]] - def set_company_configuration(id, model) - path = "/api/v2/companies/#{id}/configuration" - post(path, model) - end - + def set_company_configuration(id, model) path = "/api/v2/companies/#{id}/configuration" + post(path, model) end # Update a single company # @@ -391,11 +346,8 @@ def set_company_configuration(id, model) # @param id [Integer] The ID of the company you wish to update. # @param model [Object] The company object you wish to update. # @return [Object] - def update_company(id, model) - path = "/api/v2/companies/#{id}" - put(path, model) - end - + def update_company(id, model) path = "/api/v2/companies/#{id}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/compliance.rb b/lib/avatax/client/compliance.rb index 912bb6b..1f42dc7 100644 --- a/lib/avatax/client/compliance.rb +++ b/lib/avatax/client/compliance.rb @@ -9,11 +9,8 @@ module Compliance # @param companyId [Integer] # @param model [TransactionReferenceFieldModel[]] # @return [FetchResult] - def tag_transaction(companyId, model) - path = "/api/v2/companies/#{companyId}/transactions/tag" - put(path, model) - end - + def tag_transaction(companyId, model) path = "/api/v2/companies/#{companyId}/transactions/tag" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/contacts.rb b/lib/avatax/client/contacts.rb index 9450ea6..b82de2c 100644 --- a/lib/avatax/client/contacts.rb +++ b/lib/avatax/client/contacts.rb @@ -15,11 +15,8 @@ module Contacts # @param companyId [Integer] The ID of the company that owns this contact. # @param model [ContactModel[]] The contacts you wish to create. # @return [ContactModel[]] - def create_contacts(companyId, model) - path = "/api/v2/companies/#{companyId}/contacts" - post(path, model) - end - + def create_contacts(companyId, model) path = "/api/v2/companies/#{companyId}/contacts" + post(path, model) end # Delete a single contact # @@ -31,11 +28,8 @@ def create_contacts(companyId, model) # @param companyId [Integer] The ID of the company that owns this contact. # @param id [Integer] The ID of the contact you wish to delete. # @return [ErrorDetail[]] - def delete_contact(companyId, id) - path = "/api/v2/companies/#{companyId}/contacts/#{id}" - delete(path) - end - + def delete_contact(companyId, id) path = "/api/v2/companies/#{companyId}/contacts/#{id}" + delete(path) end # Retrieve a single contact # @@ -49,11 +43,8 @@ def delete_contact(companyId, id) # @param companyId [Integer] The ID of the company for this contact # @param id [Integer] The primary key of this contact # @return [Object] - def get_contact(companyId, id) - path = "/api/v2/companies/#{companyId}/contacts/#{id}" - get(path) - end - + def get_contact(companyId, id) path = "/api/v2/companies/#{companyId}/contacts/#{id}" + get(path) end # Retrieve contacts for this company # @@ -71,11 +62,8 @@ def get_contact(companyId, 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 list_contacts_by_company(companyId, options={}) - path = "/api/v2/companies/#{companyId}/contacts" - get(path, options) - end - + def list_contacts_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/contacts" + get(path, options) end # Retrieve all contacts # @@ -94,11 +82,8 @@ def list_contacts_by_company(companyId, options={}) # @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_contacts(options={}) - path = "/api/v2/contacts" - get(path, options) - end - + def query_contacts(options={}) path = "/api/v2/contacts" + get(path, options) end # Update a single contact # @@ -115,11 +100,8 @@ def query_contacts(options={}) # @param id [Integer] The ID of the contact you wish to update # @param model [Object] The contact you wish to update. # @return [Object] - def update_contact(companyId, id, model) - path = "/api/v2/companies/#{companyId}/contacts/#{id}" - put(path, model) - end - + def update_contact(companyId, id, model) path = "/api/v2/companies/#{companyId}/contacts/#{id}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/customers.rb b/lib/avatax/client/customers.rb index 9bcfb31..bc0acc7 100644 --- a/lib/avatax/client/customers.rb +++ b/lib/avatax/client/customers.rb @@ -28,11 +28,8 @@ module Customers # @param companyId [Integer] The unique ID number of the company that recorded this customer # @param model [CustomerModel[]] The list of customer objects to be created # @return [CustomerModel[]] - def create_customers(companyId, model) - path = "/api/v2/companies/#{companyId}/customers" - post(path, model) - end - + def create_customers(companyId, model) path = "/api/v2/companies/#{companyId}/customers" + post(path, model) end # Delete a customer record # @@ -56,11 +53,8 @@ def create_customers(companyId, model) # @param companyId [Integer] The unique ID number of the company that recorded this customer # @param customerCode [String] The unique code representing this customer # @return [Object] - def delete_customer(companyId, customerCode) - path = "/api/v2/companies/#{companyId}/customers/#{customerCode}" - delete(path) - end - + def delete_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}" + delete(path) end # Retrieve a single customer # @@ -91,11 +85,8 @@ def delete_customer(companyId, customerCode) # @param customerCode [String] The unique code representing this customer # @param include [String] Specify optional additional objects to include in this fetch request # @return [Object] - def get_customer(companyId, customerCode, options={}) - path = "/api/v2/companies/#{companyId}/customers/#{customerCode}" - get(path, options) - end - + def get_customer(companyId, customerCode, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}" + get(path, options) end # Link attributes to a customer # @@ -123,11 +114,8 @@ def get_customer(companyId, customerCode, options={}) # @param customerCode [String] The unique code representing the current customer # @param model [CustomerAttributeModel[]] The list of attributes to link to the customer. # @return [FetchResult] - def link_attributes_to_customer(companyId, customerCode, model) - path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/link" - put(path, model) - end - + def link_attributes_to_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/link" + put(path, model) end # Link certificates to a customer # @@ -152,11 +140,8 @@ def link_attributes_to_customer(companyId, customerCode, model) # @param customerCode [String] The unique code representing this customer # @param model [Object] The list of certificates to link to this customer # @return [FetchResult] - def link_certificates_to_customer(companyId, customerCode, model) - path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/link" - post(path, model) - end - + def link_certificates_to_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/link" + post(path, model) end # Link two customer records together # @@ -182,11 +167,8 @@ def link_certificates_to_customer(companyId, customerCode, model) # @param code [String] The code of the bill-to customer to link. # @param model [Object] A list of information about ship-to customers to link to this bill-to customer. # @return [Object] - def link_ship_to_customers_to_bill_customer(companyId, code, model) - path = "/api/v2/companies/#{companyId}/customers/billto/#{code}/shipto/link" - post(path, model) - end - + def link_ship_to_customers_to_bill_customer(companyId, code, model) path = "/api/v2/companies/#{companyId}/customers/billto/#{code}/shipto/link" + post(path, model) end # Retrieve a customer's attributes # @@ -213,11 +195,8 @@ def link_ship_to_customers_to_bill_customer(companyId, code, model) # @param companyId [Integer] The unique ID number of the company that recorded the provided customer # @param customerCode [String] The unique code representing the current customer # @return [FetchResult] - def list_attributes_for_customer(companyId, customerCode) - path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes" - get(path) - end - + def list_attributes_for_customer(companyId, customerCode) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes" + get(path) end # List certificates linked to a customer # @@ -246,11 +225,8 @@ def list_attributes_for_customer(companyId, customerCode) # @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 list_certificates_for_customer(companyId, customerCode, options={}) - path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates" - get(path, options) - end - + def list_certificates_for_customer(companyId, customerCode, options={}) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates" + get(path, options) end # List valid certificates for a location # @@ -279,11 +255,8 @@ def list_certificates_for_customer(companyId, customerCode, options={}) # @param country [String] Search for certificates matching this country. Uses the ISO 3166 two character country code. # @param region [String] Search for certificates matching this region. Uses the ISO 3166 two or three character state, region, or province code. # @return [Object] - def list_valid_certificates_for_customer(companyId, customerCode, country, region) - path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/#{country}/#{region}" - get(path) - end - + def list_valid_certificates_for_customer(companyId, customerCode, country, region) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/#{country}/#{region}" + get(path) end # List all customers for this company # @@ -316,11 +289,8 @@ def list_valid_certificates_for_customer(companyId, customerCode, country, regio # @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_customers(companyId, options={}) - path = "/api/v2/companies/#{companyId}/customers" - get(path, options) - end - + def query_customers(companyId, options={}) path = "/api/v2/companies/#{companyId}/customers" + get(path, options) end # Unlink attributes from a customer # @@ -348,11 +318,8 @@ def query_customers(companyId, options={}) # @param customerCode [String] The unique code representing the current customer # @param model [CustomerAttributeModel[]] The list of attributes to unlink from the customer. # @return [FetchResult] - def unlink_attributes_from_customer(companyId, customerCode, model) - path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/unlink" - put(path, model) - end - + def unlink_attributes_from_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/attributes/unlink" + put(path, model) end # Unlink certificates from a customer # @@ -377,11 +344,8 @@ def unlink_attributes_from_customer(companyId, customerCode, model) # @param customerCode [String] The unique code representing this customer # @param model [Object] The list of certificates to link to this customer # @return [FetchResult] - def unlink_certificates_from_customer(companyId, customerCode, model) - path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/unlink" - post(path, model) - end - + def unlink_certificates_from_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}/certificates/unlink" + post(path, model) end # Update a single customer # @@ -406,11 +370,8 @@ def unlink_certificates_from_customer(companyId, customerCode, model) # @param customerCode [String] The unique code representing this customer # @param model [Object] The new customer model that will replace the existing record at this URL # @return [Object] - def update_customer(companyId, customerCode, model) - path = "/api/v2/companies/#{companyId}/customers/#{customerCode}" - put(path, model) - end - + def update_customer(companyId, customerCode, model) path = "/api/v2/companies/#{companyId}/customers/#{customerCode}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/datasources.rb b/lib/avatax/client/datasources.rb index fde76e3..d50ed68 100644 --- a/lib/avatax/client/datasources.rb +++ b/lib/avatax/client/datasources.rb @@ -14,11 +14,8 @@ module DataSources # @param companyId [Integer] The id of the company you which to create the datasources # @param model [DataSourceModel[]] # @return [DataSourceModel[]] - def create_data_sources(companyId, model) - path = "/api/v2/companies/#{companyId}/datasources" - post(path, model) - end - + def create_data_sources(companyId, model) path = "/api/v2/companies/#{companyId}/datasources" + post(path, model) end # Delete a datasource by datasource id for a company. # @@ -31,11 +28,8 @@ def create_data_sources(companyId, model) # @param companyId [Integer] The id of the company the datasource belongs to. # @param id [Integer] The id of the datasource you wish to delete. # @return [ErrorDetail[]] - def delete_data_source(companyId, id) - path = "/api/v2/companies/#{companyId}/datasources/#{id}" - delete(path) - end - + def delete_data_source(companyId, id) path = "/api/v2/companies/#{companyId}/datasources/#{id}" + delete(path) end # Get data source by data source id # @@ -48,11 +42,8 @@ def delete_data_source(companyId, id) # @param companyId [Integer] # @param id [Integer] data source id # @return [Object] - def get_data_source_by_id(companyId, id) - path = "/api/v2/companies/#{companyId}/datasources/#{id}" - get(path) - end - + def get_data_source_by_id(companyId, id) path = "/api/v2/companies/#{companyId}/datasources/#{id}" + get(path) end # Retrieve all datasources for this company # @@ -68,11 +59,8 @@ def get_data_source_by_id(companyId, 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 list_data_sources(companyId, options={}) - path = "/api/v2/companies/#{companyId}/datasources" - get(path, options) - end - + def list_data_sources(companyId, options={}) path = "/api/v2/companies/#{companyId}/datasources" + get(path, options) end # Retrieve all datasources # @@ -90,11 +78,8 @@ def list_data_sources(companyId, options={}) # @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_data_sources(options={}) - path = "/api/v2/datasources" - get(path, options) - end - + def query_data_sources(options={}) path = "/api/v2/datasources" + get(path, options) end # Update a datasource identified by id for a company # @@ -108,11 +93,8 @@ def query_data_sources(options={}) # @param id [Integer] The id of the datasource you wish to delete. # @param model [Object] # @return [Object] - def update_data_source(companyId, id, model) - path = "/api/v2/companies/#{companyId}/datasources/#{id}" - put(path, model) - end - + def update_data_source(companyId, id, model) path = "/api/v2/companies/#{companyId}/datasources/#{id}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/definitions.rb b/lib/avatax/client/definitions.rb index a213239..3f5c2d7 100644 --- a/lib/avatax/client/definitions.rb +++ b/lib/avatax/client/definitions.rb @@ -22,11 +22,8 @@ module Definitions # @param country [String] The name or code of the destination country. # @param hsCode [String] The partial or full HS Code for which you would like to view all of the parents. # @return [FetchResult] - def get_cross_border_code(country, hsCode) - path = "/api/v2/definitions/crossborder/#{country}/#{hsCode}/hierarchy" - get(path) - end - + def get_cross_border_code(country, hsCode) path = "/api/v2/definitions/crossborder/#{country}/#{hsCode}/hierarchy" + get(path) end # Test whether a form supports online login verification # @@ -38,11 +35,8 @@ def get_cross_border_code(country, hsCode) # @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 get_login_verifier_by_form(form, options={}) - path = "/api/v2/definitions/filingcalendars/loginverifiers/#{form}" - get(path, options) - end - + def get_login_verifier_by_form(form, options={}) path = "/api/v2/definitions/filingcalendars/loginverifiers/#{form}" + get(path, options) end # Retrieve the full list of the AvaFile Forms available # @@ -57,11 +51,8 @@ def get_login_verifier_by_form(form, options={}) # @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 list_ava_file_forms(options={}) - path = "/api/v2/definitions/avafileforms" - get(path, options) - end - + def list_ava_file_forms(options={}) path = "/api/v2/definitions/avafileforms" + get(path, options) end # List certificate attributes used by a company # @@ -78,11 +69,8 @@ def list_ava_file_forms(options={}) # @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 list_certificate_attributes(options={}) - path = "/api/v2/definitions/certificateattributes" - get(path, options) - end - + def list_certificate_attributes(options={}) path = "/api/v2/definitions/certificateattributes" + get(path, options) end # List the certificate exempt reasons defined by a company # @@ -98,11 +86,8 @@ def list_certificate_attributes(options={}) # @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 list_certificate_exempt_reasons(options={}) - path = "/api/v2/definitions/certificateexemptreasons" - get(path, options) - end - + def list_certificate_exempt_reasons(options={}) path = "/api/v2/definitions/certificateexemptreasons" + get(path, options) end # List certificate exposure zones used by a company # @@ -118,11 +103,8 @@ def list_certificate_exempt_reasons(options={}) # @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 list_certificate_exposure_zones(options={}) - path = "/api/v2/definitions/certificateexposurezones" - get(path, options) - end - + def list_certificate_exposure_zones(options={}) path = "/api/v2/definitions/certificateexposurezones" + get(path, options) end # Retrieve the full list of communications service types # @@ -133,11 +115,8 @@ def list_certificate_exposure_zones(options={}) # @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 list_communications_service_types(id, options={}) - path = "/api/v2/definitions/communications/transactiontypes/#{id}/servicetypes" - get(path, options) - end - + def list_communications_service_types(id, options={}) path = "/api/v2/definitions/communications/transactiontypes/#{id}/servicetypes" + get(path, options) end # Retrieve the full list of communications transactiontypes # @@ -148,11 +127,8 @@ def list_communications_service_types(id, options={}) # @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 list_communications_transaction_types(options={}) - path = "/api/v2/definitions/communications/transactiontypes" - get(path, options) - end - + def list_communications_transaction_types(options={}) path = "/api/v2/definitions/communications/transactiontypes" + get(path, options) end # Retrieve the full list of communications transaction/service type pairs # @@ -163,11 +139,8 @@ def list_communications_transaction_types(options={}) # @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 list_communications_t_s_pairs(options={}) - path = "/api/v2/definitions/communications/tspairs" - get(path, options) - end - + def list_communications_t_s_pairs(options={}) path = "/api/v2/definitions/communications/tspairs" + get(path, options) end # List all ISO 3166 countries # @@ -179,11 +152,8 @@ def list_communications_t_s_pairs(options={}) # @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 list_countries(options={}) - path = "/api/v2/definitions/countries" - get(path, options) - end - + def list_countries(options={}) path = "/api/v2/definitions/countries" + get(path, options) end # List certificate exposure zones used by a company # @@ -200,11 +170,8 @@ def list_countries(options={}) # @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 list_cover_letters(options={}) - path = "/api/v2/definitions/coverletters" - get(path, options) - end - + def list_cover_letters(options={}) path = "/api/v2/definitions/coverletters" + get(path, options) end # Lists the next level of HS Codes given a destination country and HS Code prefix. # @@ -227,11 +194,8 @@ def list_cover_letters(options={}) # @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 list_cross_border_codes(country, hsCode, options={}) - path = "/api/v2/definitions/crossborder/#{country}/#{hsCode}" - get(path, options) - end - + def list_cross_border_codes(country, hsCode, options={}) path = "/api/v2/definitions/crossborder/#{country}/#{hsCode}" + get(path, options) end # List top level HS Code Sections. # @@ -246,11 +210,8 @@ def list_cross_border_codes(country, hsCode, options={}) # # * This API depends on the following active services
*Required* (all): AvaTaxGlobal. # @return [FetchResult] - def list_cross_border_sections() - path = "/api/v2/definitions/crossborder/sections" - get(path) - end - + def list_cross_border_sections() path = "/api/v2/definitions/crossborder/sections" + get(path) end # List all ISO 4217 currencies supported by AvaTax. # @@ -263,11 +224,8 @@ def list_cross_border_sections() # @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 list_currencies(options={}) - path = "/api/v2/definitions/currencies" - get(path, options) - end - + def list_currencies(options={}) path = "/api/v2/definitions/currencies" + get(path, options) end # Retrieve the full list of Avalara-supported entity use codes # @@ -281,11 +239,8 @@ def list_currencies(options={}) # @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 list_entity_use_codes(options={}) - path = "/api/v2/definitions/entityusecodes" - get(path, options) - end - + def list_entity_use_codes(options={}) path = "/api/v2/definitions/entityusecodes" + get(path, options) end # Retrieve the full list of Avalara-supported filing frequencies. # @@ -296,11 +251,8 @@ def list_entity_use_codes(options={}) # @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 list_filing_frequencies(options={}) - path = "/api/v2/definitions/filingfrequencies" - get(path, options) - end - + def list_filing_frequencies(options={}) path = "/api/v2/definitions/filingfrequencies" + get(path, options) end # List jurisdictions based on the filter provided # @@ -315,11 +267,8 @@ def list_filing_frequencies(options={}) # @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 list_jurisdictions(options={}) - path = "/api/v2/definitions/jurisdictions" - get(path, options) - end - + def list_jurisdictions(options={}) path = "/api/v2/definitions/jurisdictions" + get(path, options) end # List jurisdictions near a specific address # @@ -342,11 +291,8 @@ def list_jurisdictions(options={}) # @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 list_jurisdictions_by_address(options={}) - path = "/api/v2/definitions/jurisdictionsnearaddress" - get(path, options) - end - + def list_jurisdictions_by_address(options={}) path = "/api/v2/definitions/jurisdictionsnearaddress" + get(path, options) end # Retrieve the list of questions that are required for a tax location # @@ -370,11 +316,8 @@ def list_jurisdictions_by_address(options={}) # @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 list_location_questions_by_address(options={}) - path = "/api/v2/definitions/locationquestions" - get(path, options) - end - + def list_location_questions_by_address(options={}) path = "/api/v2/definitions/locationquestions" + get(path, options) end # List all forms where logins can be verified automatically # @@ -386,11 +329,8 @@ def list_location_questions_by_address(options={}) # @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 list_login_verifiers(options={}) - path = "/api/v2/definitions/filingcalendars/loginverifiers" - get(path, options) - end - + def list_login_verifiers(options={}) path = "/api/v2/definitions/filingcalendars/loginverifiers" + get(path, options) end # Retrieve the list of locations for a marketplace. # @@ -400,11 +340,8 @@ def list_login_verifiers(options={}) # @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 list_marketplace_locations(options={}) - path = "/api/v2/definitions/marketplacelocations" - get(path, options) - end - + def list_marketplace_locations(options={}) path = "/api/v2/definitions/marketplacelocations" + get(path, options) end # Retrieve the full list of Avalara-supported nexus for all countries and regions. # @@ -416,11 +353,8 @@ def list_marketplace_locations(options={}) # @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 list_nexus(options={}) - path = "/api/v2/definitions/nexus" - get(path, options) - end - + def list_nexus(options={}) path = "/api/v2/definitions/nexus" + get(path, options) end # List all nexus that apply to a specific address. # @@ -441,11 +375,8 @@ def list_nexus(options={}) # @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 list_nexus_by_address(options={}) - path = "/api/v2/definitions/nexus/byaddress" - get(path, options) - end - + def list_nexus_by_address(options={}) path = "/api/v2/definitions/nexus/byaddress" + get(path, options) end # Retrieve the full list of Avalara-supported nexus for a country. # @@ -458,11 +389,8 @@ def list_nexus_by_address(options={}) # @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 list_nexus_by_country(country, options={}) - path = "/api/v2/definitions/nexus/#{country}" - get(path, options) - end - + def list_nexus_by_country(country, options={}) path = "/api/v2/definitions/nexus/#{country}" + get(path, options) end # Retrieve the full list of Avalara-supported nexus for a country and region. # @@ -476,11 +404,8 @@ def list_nexus_by_country(country, options={}) # @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 list_nexus_by_country_and_region(country, region, options={}) - path = "/api/v2/definitions/nexus/#{country}/#{region}" - get(path, options) - end - + def list_nexus_by_country_and_region(country, region, options={}) path = "/api/v2/definitions/nexus/#{country}/#{region}" + get(path, options) end # List nexus related to a tax form # @@ -501,11 +426,8 @@ def list_nexus_by_country_and_region(country, region, options={}) # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. # @param formCode [String] The form code that we are looking up the nexus for # @return [Object] - def list_nexus_by_form_code(formCode) - path = "/api/v2/definitions/nexus/byform/#{formCode}" - get(path) - end - + def list_nexus_by_form_code(formCode) path = "/api/v2/definitions/nexus/byform/#{formCode}" + get(path) end # Retrieve the full list of nexus tax type groups # @@ -516,11 +438,8 @@ def list_nexus_by_form_code(formCode) # @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 list_nexus_tax_type_groups(options={}) - path = "/api/v2/definitions/nexustaxtypegroups" - get(path, options) - end - + def list_nexus_tax_type_groups(options={}) path = "/api/v2/definitions/nexustaxtypegroups" + get(path, options) end # Retrieve the full list of Avalara-supported tax notice customer funding options. # @@ -531,11 +450,8 @@ def list_nexus_tax_type_groups(options={}) # @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 list_notice_customer_funding_options(options={}) - path = "/api/v2/definitions/noticecustomerfundingoptions" - get(path, options) - end - + def list_notice_customer_funding_options(options={}) path = "/api/v2/definitions/noticecustomerfundingoptions" + get(path, options) end # Retrieve the full list of Avalara-supported tax notice customer types. # @@ -546,11 +462,8 @@ def list_notice_customer_funding_options(options={}) # @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 list_notice_customer_types(options={}) - path = "/api/v2/definitions/noticecustomertypes" - get(path, options) - end - + def list_notice_customer_types(options={}) path = "/api/v2/definitions/noticecustomertypes" + get(path, options) end # Retrieve the full list of Avalara-supported tax notice filing types. # @@ -561,11 +474,8 @@ def list_notice_customer_types(options={}) # @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 list_notice_filingtypes(options={}) - path = "/api/v2/definitions/noticefilingtypes" - get(path, options) - end - + def list_notice_filingtypes(options={}) path = "/api/v2/definitions/noticefilingtypes" + get(path, options) end # Retrieve the full list of Avalara-supported tax notice priorities. # @@ -576,11 +486,8 @@ def list_notice_filingtypes(options={}) # @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 list_notice_priorities(options={}) - path = "/api/v2/definitions/noticepriorities" - get(path, options) - end - + def list_notice_priorities(options={}) path = "/api/v2/definitions/noticepriorities" + get(path, options) end # Retrieve the full list of Avalara-supported tax notice reasons. # @@ -591,11 +498,8 @@ def list_notice_priorities(options={}) # @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 list_notice_reasons(options={}) - path = "/api/v2/definitions/noticereasons" - get(path, options) - end - + def list_notice_reasons(options={}) path = "/api/v2/definitions/noticereasons" + get(path, options) end # Retrieve the full list of Avalara-supported tax notice responsibility ids # @@ -606,11 +510,8 @@ def list_notice_reasons(options={}) # @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 list_notice_responsibilities(options={}) - path = "/api/v2/definitions/noticeresponsibilities" - get(path, options) - end - + def list_notice_responsibilities(options={}) path = "/api/v2/definitions/noticeresponsibilities" + get(path, options) end # Retrieve the full list of Avalara-supported tax notice root causes # @@ -621,11 +522,8 @@ def list_notice_responsibilities(options={}) # @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 list_notice_root_causes(options={}) - path = "/api/v2/definitions/noticerootcauses" - get(path, options) - end - + def list_notice_root_causes(options={}) path = "/api/v2/definitions/noticerootcauses" + get(path, options) end # Retrieve the full list of Avalara-supported tax notice statuses. # @@ -636,11 +534,8 @@ def list_notice_root_causes(options={}) # @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 list_notice_statuses(options={}) - path = "/api/v2/definitions/noticestatuses" - get(path, options) - end - + def list_notice_statuses(options={}) path = "/api/v2/definitions/noticestatuses" + get(path, options) end # Retrieve the full list of Avalara-supported tax notice types. # @@ -651,11 +546,8 @@ def list_notice_statuses(options={}) # @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 list_notice_types(options={}) - path = "/api/v2/definitions/noticetypes" - get(path, options) - end - + def list_notice_types(options={}) path = "/api/v2/definitions/noticetypes" + get(path, options) end # Retrieve the full list of Avalara-supported extra parameters for creating transactions. # @@ -667,11 +559,8 @@ def list_notice_types(options={}) # @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 list_parameters(options={}) - path = "/api/v2/definitions/parameters" - get(path, options) - end - + def list_parameters(options={}) path = "/api/v2/definitions/parameters" + get(path, options) end # Retrieve the parameters by companyCode and itemCode. # @@ -687,11 +576,8 @@ def list_parameters(options={}) # @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 list_parameters_by_item(companyCode, itemCode, options={}) - path = "/api/v2/definitions/parameters/byitem/#{companyCode}/#{itemCode}" - get(path, options) - end - + def list_parameters_by_item(companyCode, itemCode, options={}) path = "/api/v2/definitions/parameters/byitem/#{companyCode}/#{itemCode}" + get(path, options) end # Retrieve the full list of Avalara-supported usage of extra parameters for creating transactions. # @@ -703,11 +589,8 @@ def list_parameters_by_item(companyCode, itemCode, options={}) # @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 list_parameters_usage(options={}) - path = "/api/v2/definitions/parametersusage" - get(path, options) - end - + def list_parameters_usage(options={}) path = "/api/v2/definitions/parametersusage" + get(path, options) end # Retrieve the full list of Avalara-supported permissions # @@ -716,11 +599,8 @@ def list_parameters_usage(options={}) # @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 list_permissions(options={}) - path = "/api/v2/definitions/permissions" - get(path, options) - end - + def list_permissions(options={}) path = "/api/v2/definitions/permissions" + get(path, options) end # Retrieve the full list of Avalara-supported postal codes. # @@ -730,11 +610,8 @@ def list_permissions(options={}) # @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 list_postal_codes(options={}) - path = "/api/v2/definitions/postalcodes" - get(path, options) - end - + def list_postal_codes(options={}) path = "/api/v2/definitions/postalcodes" + get(path, options) end # List all customs duty programs recognized by AvaTax # @@ -752,11 +629,8 @@ def list_postal_codes(options={}) # @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 list_preferred_programs(options={}) - path = "/api/v2/definitions/preferredprograms" - get(path, options) - end - + def list_preferred_programs(options={}) path = "/api/v2/definitions/preferredprograms" + get(path, options) end # List all available product classification systems. # @@ -770,11 +644,8 @@ def list_preferred_programs(options={}) # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. # @param countryCode [String] If not null, return all records with this code. # @return [FetchResult] - def list_product_classification_systems(options={}) - path = "/api/v2/definitions/productclassificationsystems" - get(path, options) - end - + def list_product_classification_systems(options={}) path = "/api/v2/definitions/productclassificationsystems" + get(path, options) end # List all product classification systems available to a company based on its nexus. # @@ -789,11 +660,8 @@ def list_product_classification_systems(options={}) # @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. # @param countryCode [String] If not null, return all records with this code. # @return [FetchResult] - def list_product_classification_systems_by_company(companyCode, options={}) - path = "/api/v2/definitions/productclassificationsystems/bycompany/#{companyCode}" - get(path, options) - end - + def list_product_classification_systems_by_company(companyCode, options={}) path = "/api/v2/definitions/productclassificationsystems/bycompany/#{companyCode}" + get(path, options) end # Retrieve the full list of rate types for each country # @@ -805,11 +673,8 @@ def list_product_classification_systems_by_company(companyCode, options={}) # @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 list_rate_types_by_country(country, options={}) - path = "/api/v2/definitions/countries/#{country}/ratetypes" - get(path, options) - end - + def list_rate_types_by_country(country, options={}) path = "/api/v2/definitions/countries/#{country}/ratetypes" + get(path, options) end # List all ISO 3166 regions # @@ -821,11 +686,8 @@ def list_rate_types_by_country(country, options={}) # @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 list_regions(options={}) - path = "/api/v2/definitions/regions" - get(path, options) - end - + def list_regions(options={}) path = "/api/v2/definitions/regions" + get(path, options) end # List all ISO 3166 regions for a country # @@ -838,11 +700,8 @@ def list_regions(options={}) # @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 list_regions_by_country(country, options={}) - path = "/api/v2/definitions/countries/#{country}/regions" - get(path, options) - end - + def list_regions_by_country(country, options={}) path = "/api/v2/definitions/countries/#{country}/regions" + get(path, options) end # Retrieve the full list of Avalara-supported resource file types # @@ -853,11 +712,8 @@ def list_regions_by_country(country, options={}) # @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 list_resource_file_types(options={}) - path = "/api/v2/definitions/resourcefiletypes" - get(path, options) - end - + def list_resource_file_types(options={}) path = "/api/v2/definitions/resourcefiletypes" + get(path, options) end # Retrieve the full list of Avalara-supported permissions # @@ -869,11 +725,8 @@ def list_resource_file_types(options={}) # @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 list_security_roles(options={}) - path = "/api/v2/definitions/securityroles" - get(path, options) - end - + def list_security_roles(options={}) path = "/api/v2/definitions/securityroles" + get(path, options) end # Retrieve the full list of Avalara-supported subscription types # @@ -886,11 +739,8 @@ def list_security_roles(options={}) # @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 list_subscription_types(options={}) - path = "/api/v2/definitions/subscriptiontypes" - get(path, options) - end - + def list_subscription_types(options={}) path = "/api/v2/definitions/subscriptiontypes" + get(path, options) end # Retrieve the full list of Avalara-supported tax authorities. # @@ -901,11 +751,8 @@ def list_subscription_types(options={}) # @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 list_tax_authorities(options={}) - path = "/api/v2/definitions/taxauthorities" - get(path, options) - end - + def list_tax_authorities(options={}) path = "/api/v2/definitions/taxauthorities" + get(path, options) end # Retrieve the full list of Avalara-supported forms for each tax authority. # @@ -918,11 +765,8 @@ def list_tax_authorities(options={}) # @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 list_tax_authority_forms(options={}) - path = "/api/v2/definitions/taxauthorityforms" - get(path, options) - end - + def list_tax_authority_forms(options={}) path = "/api/v2/definitions/taxauthorityforms" + get(path, options) end # Retrieve the full list of Avalara-supported tax authority types. # @@ -933,11 +777,8 @@ def list_tax_authority_forms(options={}) # @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 list_tax_authority_types(options={}) - path = "/api/v2/definitions/taxauthoritytypes" - get(path, options) - end - + def list_tax_authority_types(options={}) path = "/api/v2/definitions/taxauthoritytypes" + get(path, options) end # Retrieve the full list of Avalara-supported tax codes. # @@ -955,11 +796,8 @@ def list_tax_authority_types(options={}) # @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 list_tax_codes(options={}) - path = "/api/v2/definitions/taxcodes" - get(path, options) - end - + def list_tax_codes(options={}) path = "/api/v2/definitions/taxcodes" + get(path, options) end # Retrieve the full list of Avalara-supported tax code types. # @@ -969,11 +807,8 @@ def list_tax_codes(options={}) # @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 [Object] - def list_tax_code_types(options={}) - path = "/api/v2/definitions/taxcodetypes" - get(path, options) - end - + def list_tax_code_types(options={}) path = "/api/v2/definitions/taxcodetypes" + get(path, options) end # Retrieve the full list of the Tax Forms available # @@ -984,11 +819,8 @@ def list_tax_code_types(options={}) # @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 list_tax_forms(options={}) - path = "/api/v2/definitions/taxforms" - get(path, options) - end - + def list_tax_forms(options={}) path = "/api/v2/definitions/taxforms" + get(path, options) end # Retrieve the full list of tax sub types # @@ -999,11 +831,8 @@ def list_tax_forms(options={}) # @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 list_tax_sub_types(options={}) - path = "/api/v2/definitions/taxsubtypes" - get(path, options) - end - + def list_tax_sub_types(options={}) path = "/api/v2/definitions/taxsubtypes" + get(path, options) end # Retrieve the full list of tax type groups # @@ -1014,11 +843,8 @@ def list_tax_sub_types(options={}) # @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 list_tax_type_groups(options={}) - path = "/api/v2/definitions/taxtypegroups" - get(path, options) - end - + def list_tax_type_groups(options={}) path = "/api/v2/definitions/taxtypegroups" + get(path, options) end # List all defined units of measurement # @@ -1030,11 +856,8 @@ def list_tax_type_groups(options={}) # @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 list_unit_of_measurement(options={}) - path = "/api/v2/definitions/unitofmeasurements" - get(path, options) - end - + def list_unit_of_measurement(options={}) path = "/api/v2/definitions/unitofmeasurements" + get(path, options) end end end end \ No newline at end of file diff --git a/lib/avatax/client/distancethresholds.rb b/lib/avatax/client/distancethresholds.rb index 592b64f..cac15bb 100644 --- a/lib/avatax/client/distancethresholds.rb +++ b/lib/avatax/client/distancethresholds.rb @@ -17,11 +17,8 @@ module DistanceThresholds # @param companyId [Integer] The unique ID number of the company that owns this DistanceThreshold # @param model [CompanyDistanceThresholdModel[]] The DistanceThreshold object or objects you wish to create. # @return [CompanyDistanceThresholdModel[]] - def create_distance_threshold(companyId, model) - path = "/api/v2/companies/#{companyId}/distancethresholds" - post(path, model) - end - + def create_distance_threshold(companyId, model) path = "/api/v2/companies/#{companyId}/distancethresholds" + post(path, model) end # Delete a single DistanceThreshold object # @@ -37,11 +34,8 @@ def create_distance_threshold(companyId, model) # @param companyId [Integer] The unique ID number of the company that owns this DistanceThreshold # @param id [Integer] The unique ID number of the DistanceThreshold object you wish to delete. # @return [ErrorDetail[]] - def delete_distance_threshold(companyId, id) - path = "/api/v2/companies/#{companyId}/distancethresholds/#{id}" - delete(path) - end - + def delete_distance_threshold(companyId, id) path = "/api/v2/companies/#{companyId}/distancethresholds/#{id}" + delete(path) end # Retrieve a single DistanceThreshold # @@ -57,11 +51,8 @@ def delete_distance_threshold(companyId, id) # @param companyId [Integer] The ID of the company that owns this DistanceThreshold object # @param id [Integer] The unique ID number referring to this DistanceThreshold object # @return [Object] - def get_distance_threshold(companyId, id) - path = "/api/v2/companies/#{companyId}/distancethresholds/#{id}" - get(path) - end - + def get_distance_threshold(companyId, id) path = "/api/v2/companies/#{companyId}/distancethresholds/#{id}" + get(path) end # Retrieve all DistanceThresholds for this company. # @@ -81,11 +72,8 @@ def get_distance_threshold(companyId, 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 list_distance_thresholds(companyId, options={}) - path = "/api/v2/companies/#{companyId}/distancethresholds" - get(path, options) - end - + def list_distance_thresholds(companyId, options={}) path = "/api/v2/companies/#{companyId}/distancethresholds" + get(path, options) end # Retrieve all DistanceThreshold objects # @@ -107,11 +95,8 @@ def list_distance_thresholds(companyId, options={}) # @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_distance_thresholds(options={}) - path = "/api/v2/distancethresholds" - get(path, options) - end - + def query_distance_thresholds(options={}) path = "/api/v2/distancethresholds" + get(path, options) end # Update a DistanceThreshold object # @@ -131,11 +116,8 @@ def query_distance_thresholds(options={}) # @param id [Integer] The unique ID number of the DistanceThreshold object to replace. # @param model [Object] The new DistanceThreshold object to store. # @return [Object] - def update_distance_threshold(companyId, id, model) - path = "/api/v2/companies/#{companyId}/distancethresholds/#{id}" - put(path, model) - end - + def update_distance_threshold(companyId, id, model) path = "/api/v2/companies/#{companyId}/distancethresholds/#{id}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/filingcalendars.rb b/lib/avatax/client/filingcalendars.rb index af7edae..716b66b 100644 --- a/lib/avatax/client/filingcalendars.rb +++ b/lib/avatax/client/filingcalendars.rb @@ -14,11 +14,8 @@ module FilingCalendars # @param filingCalendarId [Integer] The unique ID of the filing calendar that will remove setting # @param companyReturnSettingId [Integer] The unique ID of the company return setting that will be deleted from the filing calendar # @return [CompanyReturnSettingModel[]] - def delete_company_return_settings(companyId, filingCalendarId, companyReturnSettingId) - path = "/api/v2/companies/#{companyId}/filingcalendars/#{filingCalendarId}/setting/#{companyReturnSettingId}" - delete(path) - end - + def delete_company_return_settings(companyId, filingCalendarId, companyReturnSettingId) path = "/api/v2/companies/#{companyId}/filingcalendars/#{filingCalendarId}/setting/#{companyReturnSettingId}" + delete(path) end end end end \ No newline at end of file diff --git a/lib/avatax/client/filings.rb b/lib/avatax/client/filings.rb index 397737d..d5e3aae 100644 --- a/lib/avatax/client/filings.rb +++ b/lib/avatax/client/filings.rb @@ -20,11 +20,8 @@ module Filings # @param filingCalendarId [Integer] The filing calendar id of the return you are trying to retrieve # @param taxformCode [String] The unique tax form code of the form. # @return [FetchResult] - def get_filed_returns(companyId, options={}) - path = "/api/v2/companies/#{companyId}/filings/returns/filed" - get(path, options) - end - + def get_filed_returns(companyId, options={}) path = "/api/v2/companies/#{companyId}/filings/returns/filed" + get(path, options) end end end end \ No newline at end of file diff --git a/lib/avatax/client/firmclientlinkages.rb b/lib/avatax/client/firmclientlinkages.rb index 65ba78d..600425c 100644 --- a/lib/avatax/client/firmclientlinkages.rb +++ b/lib/avatax/client/firmclientlinkages.rb @@ -12,11 +12,8 @@ module FirmClientLinkages # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. # @param id [Integer] # @return [Object] - def approve_firm_client_linkage(id) - path = "/api/v2/firmclientlinkages/#{id}/approve" - post(path) - end - + def approve_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/approve" + post(path) end # Request a new FirmClient account and create an approved linkage to it # @@ -36,11 +33,8 @@ def approve_firm_client_linkage(id) # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SystemAdmin. # @param model [Object] Information about the account you wish to create. # @return [Object] - def create_and_link_new_firm_client_account(model) - path = "/api/v2/firmclientlinkages/createandlinkclient" - post(path, model) - end - + def create_and_link_new_firm_client_account(model) path = "/api/v2/firmclientlinkages/createandlinkclient" + post(path, model) end # Links a firm account with the client account # @@ -51,11 +45,8 @@ def create_and_link_new_firm_client_account(model) # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. # @param model [Object] FirmClientLinkageInputModel # @return [Object] - def create_firm_client_linkage(model) - path = "/api/v2/firmclientlinkages" - post(path, model) - end - + def create_firm_client_linkage(model) path = "/api/v2/firmclientlinkages" + post(path, model) end # Delete a linkage # @@ -66,11 +57,8 @@ def create_firm_client_linkage(model) # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. # @param id [Integer] # @return [ErrorDetail[]] - def delete_firm_client_linkage(id) - path = "/api/v2/firmclientlinkages/#{id}" - delete(path) - end - + def delete_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}" + delete(path) end # Get linkage between a firm and client by id # @@ -81,11 +69,8 @@ def delete_firm_client_linkage(id) # * 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] # @return [Object] - def get_firm_client_linkage(id) - path = "/api/v2/firmclientlinkages/#{id}" - get(path) - end - + def get_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}" + get(path) end # List client linkages for a firm or client # @@ -96,11 +81,8 @@ def get_firm_client_linkage(id) # * 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 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/).
*Not filterable:* firmAccountName, clientAccountName # @return [FetchResult] - def list_firm_client_linkage(options={}) - path = "/api/v2/firmclientlinkages" - get(path, options) - end - + def list_firm_client_linkage(options={}) path = "/api/v2/firmclientlinkages" + get(path, options) end # Rejects linkage to a firm for a client account # @@ -111,11 +93,8 @@ def list_firm_client_linkage(options={}) # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. # @param id [Integer] # @return [Object] - def reject_firm_client_linkage(id) - path = "/api/v2/firmclientlinkages/#{id}/reject" - post(path) - end - + def reject_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/reject" + post(path) end # Reset linkage status between a client and firm back to requested # @@ -126,11 +105,8 @@ def reject_firm_client_linkage(id) # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. # @param id [Integer] # @return [Object] - def reset_firm_client_linkage(id) - path = "/api/v2/firmclientlinkages/#{id}/reset" - post(path) - end - + def reset_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/reset" + post(path) end # Revokes previously approved linkage to a firm for a client account # @@ -141,11 +117,8 @@ def reset_firm_client_linkage(id) # * This API requires one of the following user roles: AccountAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. # @param id [Integer] # @return [Object] - def revoke_firm_client_linkage(id) - path = "/api/v2/firmclientlinkages/#{id}/revoke" - post(path) - end - + def revoke_firm_client_linkage(id) path = "/api/v2/firmclientlinkages/#{id}/revoke" + post(path) end end end end \ No newline at end of file diff --git a/lib/avatax/client/free.rb b/lib/avatax/client/free.rb index 9c62825..4c8514a 100644 --- a/lib/avatax/client/free.rb +++ b/lib/avatax/client/free.rb @@ -21,11 +21,8 @@ module Free # * This API may be called without providing authentication credentials. # @param model [Object] Required information to provision a free trial account. # @return [Object] - def request_free_trial(model) - path = "/api/v2/accounts/freetrials/request" - post(path, model) - end - + def request_free_trial(model) path = "/api/v2/accounts/freetrials/request" + post(path, model) end # FREE API - Sales tax rates for a specified address # @@ -62,11 +59,8 @@ def request_free_trial(model) # @param postalCode [String] The postal code of the location. # @param country [String] Name or ISO 3166 code identifying the country. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`. # @return [Object] - def tax_rates_by_address(options={}) - path = "/api/v2/taxrates/byaddress" - get(path, options) - end - + def tax_rates_by_address(options={}) path = "/api/v2/taxrates/byaddress" + get(path, options) end # FREE API - Sales tax rates for a specified country and postal code. This API is only available for US postal codes. # @@ -100,11 +94,8 @@ def tax_rates_by_address(options={}) # @param country [String] Name or ISO 3166 code identifying the country. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`. # @param postalCode [String] The postal code of the location. # @return [Object] - def tax_rates_by_postal_code(options={}) - path = "/api/v2/taxrates/bypostalcode" - get(path, options) - end - + def tax_rates_by_postal_code(options={}) path = "/api/v2/taxrates/bypostalcode" + get(path, options) end end end end \ No newline at end of file diff --git a/lib/avatax/client/fundingrequests.rb b/lib/avatax/client/fundingrequests.rb index f73820d..4300afe 100644 --- a/lib/avatax/client/fundingrequests.rb +++ b/lib/avatax/client/fundingrequests.rb @@ -24,11 +24,8 @@ module FundingRequests # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. # @param id [Integer] The unique ID number of this funding request # @return [Object] - def activate_funding_request(id) - path = "/api/v2/fundingrequests/#{id}/widget" - get(path) - end - + def activate_funding_request(id) path = "/api/v2/fundingrequests/#{id}/widget" + get(path) end # Retrieve status about a funding setup request # @@ -49,11 +46,8 @@ def activate_funding_request(id) # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. # @param id [Integer] The unique ID number of this funding request # @return [Object] - def funding_request_status(id) - path = "/api/v2/fundingrequests/#{id}" - get(path) - end - + def funding_request_status(id) path = "/api/v2/fundingrequests/#{id}" + get(path) end end end end \ No newline at end of file diff --git a/lib/avatax/client/items.rb b/lib/avatax/client/items.rb index 99eb9ab..3442f20 100644 --- a/lib/avatax/client/items.rb +++ b/lib/avatax/client/items.rb @@ -17,11 +17,8 @@ module Items # @param companyId [Integer] The ID of the company that owns this item. # @param itemId [Integer] The ID of the item you wish to delete the classifications. # @return [ErrorDetail[]] - def batch_delete_item_classifications(companyId, itemId) - path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications" - delete(path) - end - + def batch_delete_item_classifications(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications" + delete(path) end # Delete all parameters for an item # @@ -39,11 +36,8 @@ def batch_delete_item_classifications(companyId, itemId) # @param companyId [Integer] The ID of the company that owns this item. # @param itemId [Integer] The ID of the item you wish to delete the parameters. # @return [ErrorDetail[]] - def batch_delete_item_parameters(companyId, itemId) - path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters" - delete(path) - end - + def batch_delete_item_parameters(companyId, itemId) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters" + delete(path) end # Add classifications to an item. # @@ -62,11 +56,8 @@ def batch_delete_item_parameters(companyId, itemId) # @param itemId [Integer] The item id. # @param model [ItemClassificationInputModel[]] The item classifications you wish to create. # @return [ItemClassificationOutputModel[]] - def create_item_classifications(companyId, itemId, model) - path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications" - post(path, model) - end - + def create_item_classifications(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications" + post(path, model) end # Add parameters to an item. # @@ -89,11 +80,8 @@ def create_item_classifications(companyId, itemId, model) # @param itemId [Integer] The item id. # @param model [ItemParameterModel[]] The item parameters you wish to create. # @return [ItemParameterModel[]] - def create_item_parameters(companyId, itemId, model) - path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters" - post(path, model) - end - + def create_item_parameters(companyId, itemId, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters" + post(path, model) end # Create a new item # @@ -113,11 +101,8 @@ def create_item_parameters(companyId, itemId, model) # @param companyId [Integer] The ID of the company that owns this item. # @param model [ItemModel[]] The item you wish to create. # @return [ItemModel[]] - def create_items(companyId, model) - path = "/api/v2/companies/#{companyId}/items" - post(path, model) - end - + def create_items(companyId, model) path = "/api/v2/companies/#{companyId}/items" + post(path, model) end # Delete a single item # @@ -137,11 +122,8 @@ def create_items(companyId, model) # @param companyId [Integer] The ID of the company that owns this item. # @param id [Integer] The ID of the item you wish to delete. # @return [ErrorDetail[]] - def delete_item(companyId, id) - path = "/api/v2/companies/#{companyId}/items/#{id}" - delete(path) - end - + def delete_item(companyId, id) path = "/api/v2/companies/#{companyId}/items/#{id}" + delete(path) end # Delete a single item classification. # @@ -158,11 +140,8 @@ def delete_item(companyId, id) # @param itemId [Integer] The item id. # @param id [Integer] The item classification id. # @return [ErrorDetail[]] - def delete_item_classification(companyId, itemId, id) - path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}" - delete(path) - end - + def delete_item_classification(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}" + delete(path) end # Delete a single item parameter # @@ -181,11 +160,8 @@ def delete_item_classification(companyId, itemId, id) # @param itemId [Integer] The item id # @param id [Integer] The parameter id # @return [ErrorDetail[]] - def delete_item_parameter(companyId, itemId, id) - path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}" - delete(path) - end - + def delete_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}" + delete(path) end # Retrieve a single item # @@ -204,11 +180,8 @@ def delete_item_parameter(companyId, itemId, id) # @param id [Integer] The primary key of this item # @param include [String] A comma separated list of additional data to retrieve. # @return [Object] - def get_item(companyId, id, options={}) - path = "/api/v2/companies/#{companyId}/items/#{id}" - get(path, options) - end - + def get_item(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/items/#{id}" + get(path, options) end # Retrieve a single item classification. # @@ -225,11 +198,8 @@ def get_item(companyId, id, options={}) # @param itemId [Integer] The item id. # @param id [Integer] The item classification id. # @return [Object] - def get_item_classification(companyId, itemId, id) - path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}" - get(path) - end - + def get_item_classification(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}" + get(path) end # Retrieve a single item parameter # @@ -248,11 +218,8 @@ def get_item_classification(companyId, itemId, id) # @param itemId [Integer] The item id # @param id [Integer] The parameter id # @return [Object] - def get_item_parameter(companyId, itemId, id) - path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}" - get(path) - end - + def get_item_parameter(companyId, itemId, id) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}" + get(path) end # Retrieve classifications for an item. # @@ -275,11 +242,8 @@ def get_item_parameter(companyId, itemId, 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 list_item_classifications(companyId, itemId, options={}) - path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications" - get(path, options) - end - + def list_item_classifications(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications" + get(path, options) end # Retrieve parameters for an item # @@ -304,11 +268,8 @@ def list_item_classifications(companyId, itemId, options={}) # @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 list_item_parameters(companyId, itemId, options={}) - path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters" - get(path, options) - end - + def list_item_parameters(companyId, itemId, options={}) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters" + get(path, options) end # Retrieve items for this company # @@ -339,11 +300,8 @@ def list_item_parameters(companyId, itemId, options={}) # @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 list_items_by_company(companyId, options={}) - path = "/api/v2/companies/#{companyId}/items" - get(path, options) - end - + def list_items_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/items" + get(path, options) end # Retrieve all items # @@ -368,11 +326,8 @@ def list_items_by_company(companyId, options={}) # @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_items(options={}) - path = "/api/v2/items" - get(path, options) - end - + def query_items(options={}) path = "/api/v2/items" + get(path, options) end # Sync items from a product catalog # @@ -395,11 +350,8 @@ def query_items(options={}) # @param companyId [Integer] The ID of the company that owns this item. # @param model [Object] The request object. # @return [Object] - def sync_items(companyId, model) - path = "/api/v2/companies/#{companyId}/items/sync" - post(path, model) - end - + def sync_items(companyId, model) path = "/api/v2/companies/#{companyId}/items/sync" + post(path, model) end # Update a single item # @@ -423,11 +375,8 @@ def sync_items(companyId, model) # @param id [Integer] The ID of the item you wish to update # @param model [Object] The item object you wish to update. # @return [Object] - def update_item(companyId, id, model) - path = "/api/v2/companies/#{companyId}/items/#{id}" - put(path, model) - end - + def update_item(companyId, id, model) path = "/api/v2/companies/#{companyId}/items/#{id}" + put(path, model) end # Update an item classification. # @@ -447,11 +396,8 @@ def update_item(companyId, id, model) # @param id [Integer] The item classification id. # @param model [Object] The item object you wish to update. # @return [Object] - def update_item_classification(companyId, itemId, id, model) - path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}" - put(path, model) - end - + def update_item_classification(companyId, itemId, id, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/classifications/#{id}" + put(path, model) end # Update an item parameter # @@ -471,11 +417,8 @@ def update_item_classification(companyId, itemId, id, model) # @param id [Integer] The item parameter id # @param model [Object] The item object you wish to update. # @return [Object] - def update_item_parameter(companyId, itemId, id, model) - path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}" - put(path, model) - end - + def update_item_parameter(companyId, itemId, id, model) path = "/api/v2/companies/#{companyId}/items/#{itemId}/parameters/#{id}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/jurisdictionoverrides.rb b/lib/avatax/client/jurisdictionoverrides.rb index c5c2466..ed77794 100644 --- a/lib/avatax/client/jurisdictionoverrides.rb +++ b/lib/avatax/client/jurisdictionoverrides.rb @@ -18,11 +18,8 @@ module JurisdictionOverrides # @param accountId [Integer] The ID of the account that owns this override # @param model [JurisdictionOverrideModel[]] The jurisdiction override objects to create # @return [JurisdictionOverrideModel[]] - def create_jurisdiction_overrides(accountId, model) - path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides" - post(path, model) - end - + def create_jurisdiction_overrides(accountId, model) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides" + post(path, model) end # Delete a single override # @@ -34,11 +31,8 @@ def create_jurisdiction_overrides(accountId, model) # @param accountId [Integer] The ID of the account that owns this override # @param id [Integer] The ID of the override you wish to delete # @return [ErrorDetail[]] - def delete_jurisdiction_override(accountId, id) - path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}" - delete(path) - end - + def delete_jurisdiction_override(accountId, id) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}" + delete(path) end # Retrieve a single override # @@ -55,11 +49,8 @@ def delete_jurisdiction_override(accountId, id) # @param accountId [Integer] The ID of the account that owns this override # @param id [Integer] The primary key of this override # @return [Object] - def get_jurisdiction_override(accountId, id) - path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}" - get(path) - end - + def get_jurisdiction_override(accountId, id) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}" + get(path) end # Retrieve overrides for this account # @@ -83,11 +74,8 @@ def get_jurisdiction_override(accountId, 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 list_jurisdiction_overrides_by_account(accountId, options={}) - path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides" - get(path, options) - end - + def list_jurisdiction_overrides_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides" + get(path, options) end # Retrieve all overrides # @@ -110,11 +98,8 @@ def list_jurisdiction_overrides_by_account(accountId, options={}) # @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_jurisdiction_overrides(options={}) - path = "/api/v2/jurisdictionoverrides" - get(path, options) - end - + def query_jurisdiction_overrides(options={}) path = "/api/v2/jurisdictionoverrides" + get(path, options) end # Update a single jurisdictionoverride # @@ -127,11 +112,8 @@ def query_jurisdiction_overrides(options={}) # @param id [Integer] The ID of the jurisdictionoverride you wish to update # @param model [Object] The jurisdictionoverride object you wish to update. # @return [Object] - def update_jurisdiction_override(accountId, id, model) - path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}" - put(path, model) - end - + def update_jurisdiction_override(accountId, id, model) path = "/api/v2/accounts/#{accountId}/jurisdictionoverrides/#{id}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/locations.rb b/lib/avatax/client/locations.rb index 3247da7..445a353 100644 --- a/lib/avatax/client/locations.rb +++ b/lib/avatax/client/locations.rb @@ -13,11 +13,8 @@ module Locations # @param companyId [Integer] The ID of the company that owns this location. # @param model [LocationModel[]] The location you wish to create. # @return [LocationModel[]] - def create_locations(companyId, model) - path = "/api/v2/companies/#{companyId}/locations" - post(path, model) - end - + def create_locations(companyId, model) path = "/api/v2/companies/#{companyId}/locations" + post(path, model) end # Delete a single location # @@ -29,11 +26,8 @@ def create_locations(companyId, model) # @param companyId [Integer] The ID of the company that owns this location. # @param id [Integer] The ID of the location you wish to delete. # @return [ErrorDetail[]] - def delete_location(companyId, id) - path = "/api/v2/companies/#{companyId}/locations/#{id}" - delete(path) - end - + def delete_location(companyId, id) path = "/api/v2/companies/#{companyId}/locations/#{id}" + delete(path) end # Retrieve a single location # @@ -55,11 +49,8 @@ def delete_location(companyId, id) # @param id [Integer] The primary key of this location # @param include [String] A comma separated list of additional data to retrieve. # @return [Object] - def get_location(companyId, id, options={}) - path = "/api/v2/companies/#{companyId}/locations/#{id}" - get(path, options) - end - + def get_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}" + get(path, options) end # Retrieve locations for this company # @@ -86,11 +77,8 @@ def get_location(companyId, id, options={}) # @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 list_locations_by_company(companyId, options={}) - path = "/api/v2/companies/#{companyId}/locations" - get(path, options) - end - + def list_locations_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/locations" + get(path, options) end # Retrieve all locations # @@ -117,11 +105,8 @@ def list_locations_by_company(companyId, options={}) # @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_locations(options={}) - path = "/api/v2/locations" - get(path, options) - end - + def query_locations(options={}) path = "/api/v2/locations" + get(path, options) end # Update a single location # @@ -136,11 +121,8 @@ def query_locations(options={}) # @param id [Integer] The ID of the location you wish to update # @param model [Object] The location you wish to update. # @return [Object] - def update_location(companyId, id, model) - path = "/api/v2/companies/#{companyId}/locations/#{id}" - put(path, model) - end - + def update_location(companyId, id, model) path = "/api/v2/companies/#{companyId}/locations/#{id}" + put(path, model) end # Validate the location against local requirements # @@ -154,11 +136,8 @@ def update_location(companyId, id, model) # @param companyId [Integer] The ID of the company that owns this location # @param id [Integer] The primary key of this location # @return [Object] - def validate_location(companyId, id) - path = "/api/v2/companies/#{companyId}/locations/#{id}/validate" - get(path) - end - + def validate_location(companyId, id) path = "/api/v2/companies/#{companyId}/locations/#{id}/validate" + get(path) end end end end \ No newline at end of file diff --git a/lib/avatax/client/multidocument.rb b/lib/avatax/client/multidocument.rb index 20018e6..a366d93 100644 --- a/lib/avatax/client/multidocument.rb +++ b/lib/avatax/client/multidocument.rb @@ -33,11 +33,8 @@ module MultiDocument # @param include [String] Specifies objects to include in this fetch call # @param model [Object] The adjust request you wish to execute # @return [Object] - def adjust_multi_document_transaction(code, type, model, options={}) - path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/adjust" - post(path, model, options) - end - + def adjust_multi_document_transaction(code, type, model, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/adjust" + post(path, model, options) end # Get audit information about a MultiDocument transaction # @@ -71,11 +68,8 @@ def adjust_multi_document_transaction(code, type, model, options={}) # @param code [String] The transaction code for this MultiDocument transaction # @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values) # @return [Object] - def audit_multi_document_transaction(code, type) - path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/audit" - get(path) - end - + def audit_multi_document_transaction(code, type) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/audit" + get(path) end # Commit a MultiDocument transaction # @@ -102,11 +96,8 @@ def audit_multi_document_transaction(code, type) # * This API depends on the following active services
*Required* (all): AvaTaxPro. # @param model [Object] The commit request you wish to execute # @return [Object] - def commit_multi_document_transaction(model) - path = "/api/v2/transactions/multidocument/commit" - post(path, model) - end - + def commit_multi_document_transaction(model) path = "/api/v2/transactions/multidocument/commit" + post(path, model) end # Create a new MultiDocument transaction # @@ -158,11 +149,8 @@ def commit_multi_document_transaction(model) # @param include [String] Specifies objects to include in the response after transaction is created # @param model [Object] the multi document transaction model # @return [Object] - def create_multi_document_transaction(model, options={}) - path = "/api/v2/transactions/multidocument" - post(path, model, options) - end - + def create_multi_document_transaction(model, options={}) path = "/api/v2/transactions/multidocument" + post(path, model, options) end # Retrieve a MultiDocument transaction # @@ -195,11 +183,8 @@ def create_multi_document_transaction(model, options={}) # @param type [String] (See DocumentType::* for a list of allowable values) # @param include [String] Specifies objects to include in the response after transaction is created # @return [Object] - def get_multi_document_transaction_by_code_and_type(code, type, options={}) - path = "/api/v2/transactions/multidocument/#{code}/type/#{type}" - get(path, options) - end - + def get_multi_document_transaction_by_code_and_type(code, type, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}" + get(path, options) end # Retrieve a MultiDocument transaction by ID # @@ -240,11 +225,8 @@ def get_multi_document_transaction_by_code_and_type(code, type, options={}) # @param id [Integer] The unique ID number of the MultiDocument transaction to retrieve # @param include [String] Specifies objects to include in the response after transaction is created # @return [Object] - def get_multi_document_transaction_by_id(id, options={}) - path = "/api/v2/transactions/multidocument/#{id}" - get(path, options) - end - + def get_multi_document_transaction_by_id(id, options={}) path = "/api/v2/transactions/multidocument/#{id}" + get(path, options) end # Retrieve all MultiDocument transactions # @@ -286,11 +268,8 @@ def get_multi_document_transaction_by_id(id, options={}) # @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 list_multi_document_transactions(options={}) - path = "/api/v2/transactions/multidocument" - get(path, options) - end - + def list_multi_document_transactions(options={}) path = "/api/v2/transactions/multidocument" + get(path, options) end # Create a refund for a MultiDocument transaction # @@ -348,11 +327,8 @@ def list_multi_document_transactions(options={}) # @param include [String] Specifies objects to include in the response after transaction is created # @param model [Object] Information about the refund to create # @return [Object] - def refund_multi_document_transaction(code, type, model, options={}) - path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/refund" - post(path, model, options) - end - + def refund_multi_document_transaction(code, type, model, options={}) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/refund" + post(path, model, options) end # Verify a MultiDocument transaction # @@ -377,11 +353,8 @@ def refund_multi_document_transaction(code, type, model, options={}) # * This API depends on the following active services
*Required* (all): AvaTaxPro. # @param model [Object] Information from your accounting system to verify against this MultiDocument transaction as it is stored in AvaTax # @return [Object] - def verify_multi_document_transaction(model) - path = "/api/v2/transactions/multidocument/verify" - post(path, model) - end - + def verify_multi_document_transaction(model) path = "/api/v2/transactions/multidocument/verify" + post(path, model) end # Void a MultiDocument transaction # @@ -411,11 +384,8 @@ def verify_multi_document_transaction(model) # @param type [String] The transaction type for this MultiDocument transaction (See DocumentType::* for a list of allowable values) # @param model [Object] The void request you wish to execute # @return [Object] - def void_multi_document_transaction(code, type, model) - path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/void" - post(path, model) - end - + def void_multi_document_transaction(code, type, model) path = "/api/v2/transactions/multidocument/#{code}/type/#{type}/void" + post(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/nexus.rb b/lib/avatax/client/nexus.rb index f6ddcfe..147db03 100644 --- a/lib/avatax/client/nexus.rb +++ b/lib/avatax/client/nexus.rb @@ -31,11 +31,8 @@ module Nexus # @param companyId [Integer] The ID of the company that owns this nexus. # @param model [NexusModel[]] The nexus you wish to create. # @return [NexusModel[]] - def create_nexus(companyId, model) - path = "/api/v2/companies/#{companyId}/nexus" - post(path, model) - end - + def create_nexus(companyId, model) path = "/api/v2/companies/#{companyId}/nexus" + post(path, model) end # Creates nexus for a list of addresses. # @@ -61,11 +58,8 @@ def create_nexus(companyId, model) # @param companyId [Integer] The ID of the company that will own this nexus. # @param model [DeclareNexusByAddressModel[]] The nexus you wish to create. # @return [NexusByAddressModel[]] - def declare_nexus_by_address(companyId, model) - path = "/api/v2/companies/#{companyId}/nexus/byaddress" - post(path, model) - end - + def declare_nexus_by_address(companyId, model) path = "/api/v2/companies/#{companyId}/nexus/byaddress" + post(path, model) end # Delete a single nexus # @@ -85,11 +79,8 @@ def declare_nexus_by_address(companyId, model) # @param id [Integer] The ID of the nexus you wish to delete. # @param cascadeDelete [Boolean] If true, deletes all the child nexus if they exist along with parent nexus # @return [ErrorDetail[]] - def delete_nexus(companyId, id, options={}) - path = "/api/v2/companies/#{companyId}/nexus/#{id}" - delete(path, options) - end - + def delete_nexus(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/nexus/#{id}" + delete(path, options) end # Retrieve a single nexus # @@ -109,11 +100,8 @@ def delete_nexus(companyId, id, options={}) # @param id [Integer] The primary key of this nexus # @param include [String] # @return [Object] - def get_nexus(companyId, id, options={}) - path = "/api/v2/companies/#{companyId}/nexus/#{id}" - get(path, options) - end - + def get_nexus(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/nexus/#{id}" + get(path, options) end # List company nexus related to a tax form # @@ -137,11 +125,8 @@ def get_nexus(companyId, id, options={}) # @param formCode [String] The form code that we are looking up the nexus for # @param include [String] # @return [Object] - def get_nexus_by_form_code(companyId, formCode, options={}) - path = "/api/v2/companies/#{companyId}/nexus/byform/#{formCode}" - get(path, options) - end - + def get_nexus_by_form_code(companyId, formCode, options={}) path = "/api/v2/companies/#{companyId}/nexus/byform/#{formCode}" + get(path, options) end # Retrieve nexus for this company # @@ -167,11 +152,8 @@ def get_nexus_by_form_code(companyId, formCode, options={}) # @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 list_nexus_by_company(companyId, options={}) - path = "/api/v2/companies/#{companyId}/nexus" - get(path, options) - end - + def list_nexus_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/nexus" + get(path, options) end # Retrieve all nexus # @@ -196,11 +178,8 @@ def list_nexus_by_company(companyId, options={}) # @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_nexus(options={}) - path = "/api/v2/nexus" - get(path, options) - end - + def query_nexus(options={}) path = "/api/v2/nexus" + get(path, options) end # Update a single nexus # @@ -231,11 +210,8 @@ def query_nexus(options={}) # @param id [Integer] The ID of the nexus you wish to update # @param model [Object] The nexus object you wish to update. # @return [Object] - def update_nexus(companyId, id, model) - path = "/api/v2/companies/#{companyId}/nexus/#{id}" - put(path, model) - end - + def update_nexus(companyId, id, model) path = "/api/v2/companies/#{companyId}/nexus/#{id}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/notifications.rb b/lib/avatax/client/notifications.rb index 5b4fb79..e37b189 100644 --- a/lib/avatax/client/notifications.rb +++ b/lib/avatax/client/notifications.rb @@ -25,11 +25,8 @@ module Notifications # * 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 notification you wish to mark as dismissed. # @return [Object] - def dismiss_notification(id) - path = "/api/v2/notifications/#{id}/dismiss" - put(path) - end - + def dismiss_notification(id) path = "/api/v2/notifications/#{id}/dismiss" + put(path) end # Retrieve a single notification. # @@ -47,11 +44,8 @@ def dismiss_notification(id) # * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # @param id [Integer] The id of the notification to retrieve. # @return [Object] - def get_notification(id) - path = "/api/v2/notifications/#{id}" - get(path) - end - + def get_notification(id) path = "/api/v2/notifications/#{id}" + get(path) end # List all notifications. # @@ -75,11 +69,8 @@ def get_notification(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 list_notifications(options={}) - path = "/api/v2/notifications" - get(path, options) - end - + def list_notifications(options={}) path = "/api/v2/notifications" + get(path, options) end end end end \ No newline at end of file diff --git a/lib/avatax/client/provisioning.rb b/lib/avatax/client/provisioning.rb index a28068e..5842a5e 100644 --- a/lib/avatax/client/provisioning.rb +++ b/lib/avatax/client/provisioning.rb @@ -27,11 +27,8 @@ module Provisioning # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [Provisioning:RequestNewAccount]. # @param model [Object] Information about the account you wish to create and the selected product offerings. # @return [Object] - def request_new_account(model) - path = "/api/v2/accounts/request" - post(path, model) - end - + def request_new_account(model) path = "/api/v2/accounts/request" + post(path, model) end # Request a new entitilement to an existing customer # @@ -46,11 +43,8 @@ def request_new_account(model) # @param id [Integer] The avatax account id of the customer # @param offer [String] The offer to be added to an already existing customer # @return [Object] - def request_new_entitlement(id, offer) - path = "/api/v2/accounts/#{id}/entitlements/#{offer}" - post(path) - end - + def request_new_entitlement(id, offer) path = "/api/v2/accounts/#{id}/entitlements/#{offer}" + post(path) end end end end \ No newline at end of file diff --git a/lib/avatax/client/registrar.rb b/lib/avatax/client/registrar.rb index 324c961..a07ce55 100644 --- a/lib/avatax/client/registrar.rb +++ b/lib/avatax/client/registrar.rb @@ -16,11 +16,8 @@ module Registrar # * This API requires one of the following user roles: FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin. # @param model [Object] The account you wish to create. # @return [AccountModel[]] - def create_account(model) - path = "/api/v2/accounts" - post(path, model) - end - + def create_account(model) path = "/api/v2/accounts" + post(path, model) end # Create new notifications. # @@ -44,11 +41,8 @@ def create_account(model) # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create]. # @param model [NotificationModel[]] The notifications you wish to create. # @return [NotificationModel[]] - def create_notifications(model) - path = "/api/v2/notifications" - post(path, model) - end - + def create_notifications(model) path = "/api/v2/notifications" + post(path, model) end # Create a new subscription # @@ -64,11 +58,8 @@ def create_notifications(model) # @param accountId [Integer] The ID of the account that owns this subscription. # @param model [SubscriptionModel[]] The subscription you wish to create. # @return [SubscriptionModel[]] - def create_subscriptions(accountId, model) - path = "/api/v2/accounts/#{accountId}/subscriptions" - post(path, model) - end - + def create_subscriptions(accountId, model) path = "/api/v2/accounts/#{accountId}/subscriptions" + post(path, model) end # Delete a single account # @@ -83,11 +74,8 @@ def create_subscriptions(accountId, model) # * This API requires the user role SystemAdmin. # @param id [Integer] The ID of the account you wish to delete. # @return [ErrorDetail[]] - def delete_account(id) - path = "/api/v2/accounts/#{id}" - delete(path) - end - + def delete_account(id) path = "/api/v2/accounts/#{id}" + delete(path) end # Delete a single notification. # @@ -108,11 +96,8 @@ def delete_account(id) # * This API is available by invitation only. To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create]. # @param id [Integer] The id of the notification you wish to delete. # @return [ErrorDetail[]] - def delete_notification(id) - path = "/api/v2/notifications/#{id}" - delete(path) - end - + def delete_notification(id) path = "/api/v2/notifications/#{id}" + delete(path) end # Delete a single subscription # @@ -127,11 +112,8 @@ def delete_notification(id) # @param accountId [Integer] The ID of the account that owns this subscription. # @param id [Integer] The ID of the subscription you wish to delete. # @return [ErrorDetail[]] - def delete_subscription(accountId, id) - path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}" - delete(path) - end - + def delete_subscription(accountId, id) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}" + delete(path) end # Reset a user's password programmatically # @@ -150,11 +132,8 @@ def delete_subscription(accountId, id) # @param unmigrateFromAi [Boolean] If user's password was migrated to AI, undo this. # @param model [Object] The new password for this user # @return [String] - def reset_password(userId, model, options={}) - path = "/api/v2/passwords/#{userId}/reset" - post(path, model, options) - end - + def reset_password(userId, model, options={}) path = "/api/v2/passwords/#{userId}/reset" + post(path, model, options) end # Update a single account # @@ -169,11 +148,8 @@ def reset_password(userId, model, options={}) # @param id [Integer] The ID of the account you wish to update. # @param model [Object] The account object you wish to update. # @return [Object] - def update_account(id, model) - path = "/api/v2/accounts/#{id}" - put(path, model) - end - + def update_account(id, model) path = "/api/v2/accounts/#{id}" + put(path, model) end # Update a single notification. # @@ -195,11 +171,8 @@ def update_account(id, model) # @param id [Integer] The id of the notification you wish to update. # @param model [Object] The notification object you wish to update. # @return [Object] - def update_notification(id, model) - path = "/api/v2/notifications/#{id}" - put(path, model) - end - + def update_notification(id, model) path = "/api/v2/notifications/#{id}" + put(path, model) end # Update a single subscription # @@ -219,11 +192,8 @@ def update_notification(id, model) # @param id [Integer] The ID of the subscription you wish to update # @param model [Object] The subscription you wish to update. # @return [Object] - def update_subscription(accountId, id, model) - path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}" - put(path, model) - end - + def update_subscription(accountId, id, model) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/reports.rb b/lib/avatax/client/reports.rb index eb59cf4..1b8e28c 100644 --- a/lib/avatax/client/reports.rb +++ b/lib/avatax/client/reports.rb @@ -25,11 +25,8 @@ module Reports # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. # @param id [Integer] The unique ID number of this report # @return [Object] - def download_report(id) - path = "/api/v2/reports/#{id}/attachment" - get(path) - end - + def download_report(id) path = "/api/v2/reports/#{id}/attachment" + get(path) end # Retrieve a single report # @@ -46,11 +43,8 @@ def download_report(id) # This API call returns information about any report type. # @param id [Integer] The unique ID number of the report to retrieve # @return [Object] - def get_report(id) - path = "/api/v2/reports/#{id}" - get(path) - end - + def get_report(id) path = "/api/v2/reports/#{id}" + get(path) end # Initiate an ExportDocumentLine report task # @@ -72,11 +66,8 @@ def get_report(id) # @param companyId [Integer] The unique ID number of the company to report on. # @param model [Object] Options that may be configured to customize the report. # @return [ReportModel[]] - def initiate_export_document_line_report(companyId, model) - path = "/api/v2/companies/#{companyId}/reports/exportdocumentline/initiate" - post(path, model) - end - + def initiate_export_document_line_report(companyId, model) path = "/api/v2/companies/#{companyId}/reports/exportdocumentline/initiate" + post(path, model) end # List all report tasks for account # @@ -100,11 +91,8 @@ def initiate_export_document_line_report(companyId, model) # @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. # @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. # @return [FetchResult] - def list_reports(options={}) - path = "/api/v2/reports" - get(path, options) - end - + def list_reports(options={}) path = "/api/v2/reports" + get(path, options) end end end end \ No newline at end of file diff --git a/lib/avatax/client/settings.rb b/lib/avatax/client/settings.rb index 4cd5d6d..c3af8c5 100644 --- a/lib/avatax/client/settings.rb +++ b/lib/avatax/client/settings.rb @@ -22,11 +22,8 @@ module Settings # @param companyId [Integer] The ID of the company that owns this setting. # @param model [SettingModel[]] The setting you wish to create. # @return [SettingModel[]] - def create_settings(companyId, model) - path = "/api/v2/companies/#{companyId}/settings" - post(path, model) - end - + def create_settings(companyId, model) path = "/api/v2/companies/#{companyId}/settings" + post(path, model) end # Delete a single setting # @@ -47,11 +44,8 @@ def create_settings(companyId, model) # @param companyId [Integer] The ID of the company that owns this setting. # @param id [Integer] The ID of the setting you wish to delete. # @return [ErrorDetail[]] - def delete_setting(companyId, id) - path = "/api/v2/companies/#{companyId}/settings/#{id}" - delete(path) - end - + def delete_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}" + delete(path) end # Retrieve a single setting # @@ -72,11 +66,8 @@ def delete_setting(companyId, id) # @param companyId [Integer] The ID of the company that owns this setting # @param id [Integer] The primary key of this setting # @return [Object] - def get_setting(companyId, id) - path = "/api/v2/companies/#{companyId}/settings/#{id}" - get(path) - end - + def get_setting(companyId, id) path = "/api/v2/companies/#{companyId}/settings/#{id}" + get(path) end # Retrieve all settings for this company # @@ -104,11 +95,8 @@ def get_setting(companyId, 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 list_settings_by_company(companyId, options={}) - path = "/api/v2/companies/#{companyId}/settings" - get(path, options) - end - + def list_settings_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/settings" + get(path, options) end # Retrieve all settings # @@ -135,11 +123,8 @@ def list_settings_by_company(companyId, options={}) # @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_settings(options={}) - path = "/api/v2/settings" - get(path, options) - end - + def query_settings(options={}) path = "/api/v2/settings" + get(path, options) end # Update a single setting # @@ -165,11 +150,8 @@ def query_settings(options={}) # @param id [Integer] The ID of the setting you wish to update # @param model [Object] The setting you wish to update. # @return [Object] - def update_setting(companyId, id, model) - path = "/api/v2/companies/#{companyId}/settings/#{id}" - put(path, model) - end - + def update_setting(companyId, id, model) path = "/api/v2/companies/#{companyId}/settings/#{id}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/subscriptions.rb b/lib/avatax/client/subscriptions.rb index d97db19..994502e 100644 --- a/lib/avatax/client/subscriptions.rb +++ b/lib/avatax/client/subscriptions.rb @@ -15,11 +15,8 @@ module Subscriptions # @param accountId [Integer] The ID of the account that owns this subscription # @param id [Integer] The primary key of this subscription # @return [Object] - def get_subscription(accountId, id) - path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}" - get(path) - end - + def get_subscription(accountId, id) path = "/api/v2/accounts/#{accountId}/subscriptions/#{id}" + get(path) end # Retrieve subscriptions for this account # @@ -39,11 +36,8 @@ def get_subscription(accountId, 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 list_subscriptions_by_account(accountId, options={}) - path = "/api/v2/accounts/#{accountId}/subscriptions" - get(path, options) - end - + def list_subscriptions_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/subscriptions" + get(path, options) end # Retrieve all subscriptions # @@ -62,11 +56,8 @@ def list_subscriptions_by_account(accountId, options={}) # @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_subscriptions(options={}) - path = "/api/v2/subscriptions" - get(path, options) - end - + def query_subscriptions(options={}) path = "/api/v2/subscriptions" + get(path, options) end end end end \ No newline at end of file diff --git a/lib/avatax/client/taxcodes.rb b/lib/avatax/client/taxcodes.rb index 6f134bb..13f32c1 100644 --- a/lib/avatax/client/taxcodes.rb +++ b/lib/avatax/client/taxcodes.rb @@ -17,11 +17,8 @@ module TaxCodes # @param companyId [Integer] The ID of the company that owns this tax code. # @param model [TaxCodeModel[]] The tax code you wish to create. # @return [TaxCodeModel[]] - def create_tax_codes(companyId, model) - path = "/api/v2/companies/#{companyId}/taxcodes" - post(path, model) - end - + def create_tax_codes(companyId, model) path = "/api/v2/companies/#{companyId}/taxcodes" + post(path, model) end # Delete a single tax code # @@ -33,11 +30,8 @@ def create_tax_codes(companyId, model) # @param companyId [Integer] The ID of the company that owns this tax code. # @param id [Integer] The ID of the tax code you wish to delete. # @return [ErrorDetail[]] - def delete_tax_code(companyId, id) - path = "/api/v2/companies/#{companyId}/taxcodes/#{id}" - delete(path) - end - + def delete_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}" + delete(path) end # Retrieve a single tax code # @@ -53,11 +47,8 @@ def delete_tax_code(companyId, id) # @param companyId [Integer] The ID of the company that owns this tax code # @param id [Integer] The primary key of this tax code # @return [Object] - def get_tax_code(companyId, id) - path = "/api/v2/companies/#{companyId}/taxcodes/#{id}" - get(path) - end - + def get_tax_code(companyId, id) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}" + get(path) end # Retrieve tax codes for this company # @@ -80,11 +71,8 @@ def get_tax_code(companyId, 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 list_tax_codes_by_company(companyId, options={}) - path = "/api/v2/companies/#{companyId}/taxcodes" - get(path, options) - end - + def list_tax_codes_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxcodes" + get(path, options) end # Retrieve all tax codes # @@ -106,11 +94,8 @@ def list_tax_codes_by_company(companyId, options={}) # @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_tax_codes(options={}) - path = "/api/v2/taxcodes" - get(path, options) - end - + def query_tax_codes(options={}) path = "/api/v2/taxcodes" + get(path, options) end # Update a single tax code # @@ -129,11 +114,8 @@ def query_tax_codes(options={}) # @param id [Integer] The ID of the tax code you wish to update # @param model [Object] The tax code you wish to update. # @return [Object] - def update_tax_code(companyId, id, model) - path = "/api/v2/companies/#{companyId}/taxcodes/#{id}" - put(path, model) - end - + def update_tax_code(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxcodes/#{id}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/taxcontent.rb b/lib/avatax/client/taxcontent.rb index 9344f71..cd25a76 100644 --- a/lib/avatax/client/taxcontent.rb +++ b/lib/avatax/client/taxcontent.rb @@ -35,11 +35,8 @@ module TaxContent # * This API depends on the following active services
*Required* (all): AvaTaxPro. # @param model [Object] Parameters about the desired file format and report format, specifying which company, locations and TaxCodes to include. # @return [Object] - def build_tax_content_file(model) - path = "/api/v2/pointofsaledata/build" - post(path, model) - end - + def build_tax_content_file(model) path = "/api/v2/pointofsaledata/build" + post(path, model) end # Build a tax content file for a single location # @@ -78,11 +75,8 @@ def build_tax_content_file(model) # @param partnerId [String] If specified, requests a custom partner-formatted version of the file. (See PointOfSalePartnerId::* for a list of allowable values) # @param includeJurisCodes [Boolean] When true, the file will include jurisdiction codes in the result. # @return [Object] - def build_tax_content_file_for_location(companyId, id, options={}) - path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata" - get(path, options) - end - + def build_tax_content_file_for_location(companyId, id, options={}) path = "/api/v2/companies/#{companyId}/locations/#{id}/pointofsaledata" + get(path, options) end # Download a file listing tax rates by postal code # @@ -133,11 +127,8 @@ def build_tax_content_file_for_location(companyId, id, options={}) # @param date [DateTime] The date for which point-of-sale data would be calculated (today by default). Example input: 2016-12-31 # @param region [String] A two character region code which limits results to a specific region. # @return [Object] - def download_tax_rates_by_zip_code(date, options={}) - path = "/api/v2/taxratesbyzipcode/download/#{date}" - get(path, options) - end - + def download_tax_rates_by_zip_code(date, options={}) path = "/api/v2/taxratesbyzipcode/download/#{date}" + get(path, options) end end end end \ No newline at end of file diff --git a/lib/avatax/client/taxrules.rb b/lib/avatax/client/taxrules.rb index 8a1d23c..aacd67c 100644 --- a/lib/avatax/client/taxrules.rb +++ b/lib/avatax/client/taxrules.rb @@ -25,11 +25,8 @@ module TaxRules # @param companyId [Integer] The ID of the company that owns this tax rule. # @param model [TaxRuleModel[]] The tax rule you wish to create. # @return [TaxRuleModel[]] - def create_tax_rules(companyId, model) - path = "/api/v2/companies/#{companyId}/taxrules" - post(path, model) - end - + def create_tax_rules(companyId, model) path = "/api/v2/companies/#{companyId}/taxrules" + post(path, model) end # Delete a single tax rule # @@ -53,11 +50,8 @@ def create_tax_rules(companyId, model) # @param companyId [Integer] The ID of the company that owns this tax rule. # @param id [Integer] The ID of the tax rule you wish to delete. # @return [ErrorDetail[]] - def delete_tax_rule(companyId, id) - path = "/api/v2/companies/#{companyId}/taxrules/#{id}" - delete(path) - end - + def delete_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}" + delete(path) end # Retrieve a single tax rule # @@ -81,11 +75,8 @@ def delete_tax_rule(companyId, id) # @param companyId [Integer] The ID of the company that owns this tax rule # @param id [Integer] The primary key of this tax rule # @return [Object] - def get_tax_rule(companyId, id) - path = "/api/v2/companies/#{companyId}/taxrules/#{id}" - get(path) - end - + def get_tax_rule(companyId, id) path = "/api/v2/companies/#{companyId}/taxrules/#{id}" + get(path) end # Retrieve tax rules for this company # @@ -116,11 +107,8 @@ def get_tax_rule(companyId, 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 list_tax_rules(companyId, options={}) - path = "/api/v2/companies/#{companyId}/taxrules" - get(path, options) - end - + def list_tax_rules(companyId, options={}) path = "/api/v2/companies/#{companyId}/taxrules" + get(path, options) end # Retrieve all tax rules # @@ -150,11 +138,8 @@ def list_tax_rules(companyId, options={}) # @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_tax_rules(options={}) - path = "/api/v2/taxrules" - get(path, options) - end - + def query_tax_rules(options={}) path = "/api/v2/taxrules" + get(path, options) end # Update a single tax rule # @@ -179,11 +164,8 @@ def query_tax_rules(options={}) # @param id [Integer] The ID of the tax rule you wish to update # @param model [Object] The tax rule you wish to update. # @return [Object] - def update_tax_rule(companyId, id, model) - path = "/api/v2/companies/#{companyId}/taxrules/#{id}" - put(path, model) - end - + def update_tax_rule(companyId, id, model) path = "/api/v2/companies/#{companyId}/taxrules/#{id}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/transactions.rb b/lib/avatax/client/transactions.rb index 5ed5675..8fa054a 100644 --- a/lib/avatax/client/transactions.rb +++ b/lib/avatax/client/transactions.rb @@ -33,11 +33,8 @@ module Transactions # @param include [String] Specifies objects to include in the response after transaction is created # @param model [Object] information about the transaction and lines to be added # @return [Object] - def add_lines(model, options={}) - path = "/api/v2/companies/transactions/lines/add" - post(path, model, options) - end - + def add_lines(model, options={}) path = "/api/v2/companies/transactions/lines/add" + post(path, model, options) end # Correct a previously created transaction # @@ -81,11 +78,8 @@ def add_lines(model, options={}) # @param include [String] Specifies objects to include in this fetch call # @param model [Object] The adjustment you wish to make # @return [Object] - def adjust_transaction(companyCode, transactionCode, model, options={}) - path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/adjust" - post(path, model, options) - end - + def adjust_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/adjust" + post(path, model, options) end # Get audit information about a transaction # @@ -120,11 +114,8 @@ def adjust_transaction(companyCode, transactionCode, model, options={}) # @param companyCode [String] The code identifying the company that owns this transaction # @param transactionCode [String] The code identifying the transaction # @return [Object] - def audit_transaction(companyCode, transactionCode) - path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/audit" - get(path) - end - + def audit_transaction(companyCode, transactionCode) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/audit" + get(path) end # Get audit information about a transaction # @@ -160,11 +151,8 @@ def audit_transaction(companyCode, transactionCode) # @param transactionCode [String] The code identifying the transaction # @param documentType [String] The document type of the original transaction (See DocumentType::* for a list of allowable values) # @return [Object] - def audit_transaction_with_type(companyCode, transactionCode, documentType) - path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}/audit" - get(path) - end - + def audit_transaction_with_type(companyCode, transactionCode, documentType) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}/audit" + get(path) end # Lock a set of documents # @@ -182,11 +170,8 @@ def audit_transaction_with_type(companyCode, transactionCode, documentType) # * This API depends on the following active services
*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.
*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. # @param model [Object] bulk lock request # @return [Object] - def bulk_lock_transaction(model) - path = "/api/v2/transactions/lock" - post(path, model) - end - + def bulk_lock_transaction(model) path = "/api/v2/transactions/lock" + post(path, model) end # Change a transaction's code # @@ -230,11 +215,8 @@ def bulk_lock_transaction(model) # @param include [String] Specifies objects to include in this fetch call # @param model [Object] The code change request you wish to execute # @return [Object] - def change_transaction_code(companyCode, transactionCode, model, options={}) - path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/changecode" - post(path, model, options) - end - + def change_transaction_code(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/changecode" + post(path, model, options) end # Commit a transaction for reporting # @@ -276,11 +258,8 @@ def change_transaction_code(companyCode, transactionCode, model, options={}) # @param include [String] Specifies objects to include in this fetch call # @param model [Object] The commit request you wish to execute # @return [Object] - def commit_transaction(companyCode, transactionCode, model, options={}) - path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/commit" - post(path, model, options) - end - + def commit_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/commit" + post(path, model, options) end # Create or adjust a transaction # @@ -325,11 +304,8 @@ def commit_transaction(companyCode, transactionCode, model, options={}) # @param include [String] Specifies objects to include in the response after transaction is created # @param model [Object] The transaction you wish to create or adjust # @return [Object] - def create_or_adjust_transaction(model, options={}) - path = "/api/v2/transactions/createoradjust" - post(path, model, options) - end - + def create_or_adjust_transaction(model, options={}) path = "/api/v2/transactions/createoradjust" + post(path, model, options) end # Create a new transaction # @@ -381,11 +357,8 @@ def create_or_adjust_transaction(model, options={}) # @param include [String] Specifies objects to include in the response after transaction is created # @param model [Object] The transaction you wish to create # @return [Object] - def create_transaction(model, options={}) - path = "/api/v2/transactions/create" - post(path, model, options) - end - + def create_transaction(model, options={}) path = "/api/v2/transactions/create" + post(path, model, options) end # Remove lines from an existing unlocked transaction # @@ -414,11 +387,8 @@ def create_transaction(model, options={}) # @param include [String] Specifies objects to include in the response after transaction is created # @param model [Object] information about the transaction and lines to be removed # @return [Object] - def delete_lines(model, options={}) - path = "/api/v2/companies/transactions/lines/delete" - post(path, model, options) - end - + def delete_lines(model, options={}) path = "/api/v2/companies/transactions/lines/delete" + post(path, model, options) end # Retrieve a single transaction by code # @@ -458,11 +428,8 @@ def delete_lines(model, options={}) # @param documentType [String] (Optional): The document type of the transaction to retrieve (See DocumentType::* for a list of allowable values) # @param include [String] Specifies objects to include in this fetch call # @return [Object] - def get_transaction_by_code(companyCode, transactionCode, options={}) - path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}" - get(path, options) - end - + def get_transaction_by_code(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}" + get(path, options) end # Retrieve a single transaction by code # @@ -485,11 +452,8 @@ def get_transaction_by_code(companyCode, transactionCode, options={}) # @param documentType [String] The transaction type to retrieve (See DocumentType::* for a list of allowable values) # @param include [String] Specifies objects to include in this fetch call # @return [Object] - def get_transaction_by_code_and_type(companyCode, transactionCode, documentType, options={}) - path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}" - get(path, options) - end - + def get_transaction_by_code_and_type(companyCode, transactionCode, documentType, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/types/#{documentType}" + get(path, options) end # Retrieve a single transaction by ID # @@ -518,11 +482,8 @@ def get_transaction_by_code_and_type(companyCode, transactionCode, documentType, # @param id [Integer] The unique ID number of the transaction to retrieve # @param include [String] Specifies objects to include in this fetch call # @return [Object] - def get_transaction_by_id(id, options={}) - path = "/api/v2/transactions/#{id}" - get(path, options) - end - + def get_transaction_by_id(id, options={}) path = "/api/v2/transactions/#{id}" + get(path, options) end # Retrieve all transactions # @@ -568,11 +529,8 @@ def get_transaction_by_id(id, options={}) # @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 list_transactions_by_company(companyCode, options={}) - path = "/api/v2/companies/#{companyCode}/transactions" - get(path, options) - end - + def list_transactions_by_company(companyCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions" + get(path, options) end # Lock a single transaction # @@ -616,11 +574,8 @@ def list_transactions_by_company(companyCode, options={}) # @param include [String] Specifies objects to include in this fetch call # @param model [Object] The lock request you wish to execute # @return [Object] - def lock_transaction(companyCode, transactionCode, model, options={}) - path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/lock" - post(path, model, options) - end - + def lock_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/lock" + post(path, model, options) end # Create a refund for a transaction # @@ -675,11 +630,8 @@ def lock_transaction(companyCode, transactionCode, model, options={}) # @param useTaxDateOverride [Boolean] (Optional): If set to true, processes refund using taxDateOverride rather than taxAmountOverride (Note: taxAmountOverride is not allowed for SST states). # @param model [Object] Information about the refund to create # @return [Object] - def refund_transaction(companyCode, transactionCode, model, options={}) - path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/refund" - post(path, model, options) - end - + def refund_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/refund" + post(path, model, options) end # Perform multiple actions on a transaction # @@ -721,11 +673,8 @@ def refund_transaction(companyCode, transactionCode, model, options={}) # @param include [String] Specifies objects to include in this fetch call # @param model [Object] The data from an external system to reconcile against AvaTax # @return [Object] - def settle_transaction(companyCode, transactionCode, model, options={}) - path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/settle" - post(path, model, options) - end - + def settle_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/settle" + post(path, model, options) end # Uncommit a transaction for reporting # @@ -761,11 +710,8 @@ def settle_transaction(companyCode, transactionCode, model, options={}) # @param documentType [String] (Optional): The document type of the transaction to Uncommit. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values) # @param include [String] Specifies objects to include in this fetch call # @return [Object] - def uncommit_transaction(companyCode, transactionCode, options={}) - path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/uncommit" - post(path, options) - end - + def uncommit_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/uncommit" + post(path, options) end # Unvoids a transaction # @@ -798,11 +744,8 @@ def uncommit_transaction(companyCode, transactionCode, options={}) # @param documentType [String] (Optional): The document type of the transaction to commit. If not provided, the default is SalesInvoice. (See DocumentType::* for a list of allowable values) # @param include [String] Specifies objects to include in this fetch call # @return [Object] - def unvoid_transaction(companyCode, transactionCode, options={}) - path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/unvoid" - post(path, options) - end - + def unvoid_transaction(companyCode, transactionCode, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/unvoid" + post(path, options) end # Verify a transaction # @@ -843,11 +786,8 @@ def unvoid_transaction(companyCode, transactionCode, options={}) # @param include [String] Specifies objects to include in this fetch call # @param model [Object] The data from an external system to reconcile against AvaTax # @return [Object] - def verify_transaction(companyCode, transactionCode, model, options={}) - path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/verify" - post(path, model, options) - end - + def verify_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/verify" + post(path, model, options) end # Void a transaction # @@ -890,11 +830,8 @@ def verify_transaction(companyCode, transactionCode, model, options={}) # @param include [String] Specifies objects to include in this fetch call # @param model [Object] The void request you wish to execute. To void a transaction the code must be set to 'DocVoided' # @return [Object] - def void_transaction(companyCode, transactionCode, model, options={}) - path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/void" - post(path, model, options) - end - + def void_transaction(companyCode, transactionCode, model, options={}) path = "/api/v2/companies/#{companyCode}/transactions/#{transactionCode}/void" + post(path, model, options) end end end end \ No newline at end of file diff --git a/lib/avatax/client/upcs.rb b/lib/avatax/client/upcs.rb index c72ccce..07466ad 100644 --- a/lib/avatax/client/upcs.rb +++ b/lib/avatax/client/upcs.rb @@ -15,11 +15,8 @@ module Upcs # @param companyId [Integer] The ID of the company that owns this UPC. # @param model [UPCModel[]] The UPC you wish to create. # @return [UPCModel[]] - def create_u_p_cs(companyId, model) - path = "/api/v2/companies/#{companyId}/upcs" - post(path, model) - end - + def create_u_p_cs(companyId, model) path = "/api/v2/companies/#{companyId}/upcs" + post(path, model) end # Delete a single UPC # @@ -32,11 +29,8 @@ def create_u_p_cs(companyId, model) # @param companyId [Integer] The ID of the company that owns this UPC. # @param id [Integer] The ID of the UPC you wish to delete. # @return [ErrorDetail[]] - def delete_u_p_c(companyId, id) - path = "/api/v2/companies/#{companyId}/upcs/#{id}" - delete(path) - end - + def delete_u_p_c(companyId, id) path = "/api/v2/companies/#{companyId}/upcs/#{id}" + delete(path) end # Retrieve a single UPC # @@ -50,11 +44,8 @@ def delete_u_p_c(companyId, id) # @param companyId [Integer] The ID of the company that owns this UPC # @param id [Integer] The primary key of this UPC # @return [Object] - def get_u_p_c(companyId, id) - path = "/api/v2/companies/#{companyId}/upcs/#{id}" - get(path) - end - + def get_u_p_c(companyId, id) path = "/api/v2/companies/#{companyId}/upcs/#{id}" + get(path) end # Retrieve UPCs for this company # @@ -75,11 +66,8 @@ def get_u_p_c(companyId, 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 list_u_p_cs_by_company(companyId, options={}) - path = "/api/v2/companies/#{companyId}/upcs" - get(path, options) - end - + def list_u_p_cs_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/upcs" + get(path, options) end # Retrieve all UPCs # @@ -99,11 +87,8 @@ def list_u_p_cs_by_company(companyId, options={}) # @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_u_p_cs(options={}) - path = "/api/v2/upcs" - get(path, options) - end - + def query_u_p_cs(options={}) path = "/api/v2/upcs" + get(path, options) end # Update a single UPC # @@ -120,11 +105,8 @@ def query_u_p_cs(options={}) # @param id [Integer] The ID of the UPC you wish to update # @param model [Object] The UPC you wish to update. # @return [Object] - def update_u_p_c(companyId, id, model) - path = "/api/v2/companies/#{companyId}/upcs/#{id}" - put(path, model) - end - + def update_u_p_c(companyId, id, model) path = "/api/v2/companies/#{companyId}/upcs/#{id}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/users.rb b/lib/avatax/client/users.rb index 49f6191..44a77d4 100644 --- a/lib/avatax/client/users.rb +++ b/lib/avatax/client/users.rb @@ -18,11 +18,8 @@ module Users # * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. # @param model [Object] An object containing your current password and the new password. # @return [String] - def change_password(model) - path = "/api/v2/passwords" - put(path, model) - end - + def change_password(model) path = "/api/v2/passwords" + put(path, model) end # Create new users # @@ -42,11 +39,8 @@ def change_password(model) # @param accountId [Integer] The unique ID number of the account where these users will be created. # @param model [UserModel[]] The user or array of users you wish to create. # @return [UserModel[]] - def create_users(accountId, model) - path = "/api/v2/accounts/#{accountId}/users" - post(path, model) - end - + def create_users(accountId, model) path = "/api/v2/accounts/#{accountId}/users" + post(path, model) end # Delete a single user # @@ -63,11 +57,8 @@ def create_users(accountId, model) # @param id [Integer] The ID of the user you wish to delete. # @param accountId [Integer] The accountID of the user you wish to delete. # @return [ErrorDetail[]] - def delete_user(id, accountId) - path = "/api/v2/accounts/#{accountId}/users/#{id}" - delete(path) - end - + def delete_user(id, accountId) path = "/api/v2/accounts/#{accountId}/users/#{id}" + delete(path) end # Retrieve a single user # @@ -85,11 +76,8 @@ def delete_user(id, accountId) # @param accountId [Integer] The accountID of the user you wish to get. # @param include [String] Optional fetch commands. # @return [Object] - def get_user(id, accountId, options={}) - path = "/api/v2/accounts/#{accountId}/users/#{id}" - get(path, options) - end - + def get_user(id, accountId, options={}) path = "/api/v2/accounts/#{accountId}/users/#{id}" + get(path, options) end # Retrieve all entitlements for a single user # @@ -115,11 +103,8 @@ def get_user(id, accountId, options={}) # @param id [Integer] The ID of the user to retrieve. # @param accountId [Integer] The accountID of the user you wish to get. # @return [Object] - def get_user_entitlements(id, accountId) - path = "/api/v2/accounts/#{accountId}/users/#{id}/entitlements" - get(path) - end - + def get_user_entitlements(id, accountId) path = "/api/v2/accounts/#{accountId}/users/#{id}/entitlements" + get(path) end # Retrieve users for this account # @@ -146,11 +131,8 @@ def get_user_entitlements(id, accountId) # @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 list_users_by_account(accountId, options={}) - path = "/api/v2/accounts/#{accountId}/users" - get(path, options) - end - + def list_users_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/users" + get(path, options) end # Retrieve all users # @@ -178,11 +160,8 @@ def list_users_by_account(accountId, options={}) # @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_users(options={}) - path = "/api/v2/users" - get(path, options) - end - + def query_users(options={}) path = "/api/v2/users" + get(path, options) end # Update a single user # @@ -198,11 +177,8 @@ def query_users(options={}) # @param accountId [Integer] The accountID of the user you wish to update. # @param model [Object] The user object you wish to update. # @return [Object] - def update_user(id, accountId, model) - path = "/api/v2/accounts/#{accountId}/users/#{id}" - put(path, model) - end - + def update_user(id, accountId, model) path = "/api/v2/accounts/#{accountId}/users/#{id}" + put(path, model) end end end end \ No newline at end of file diff --git a/lib/avatax/client/utilities.rb b/lib/avatax/client/utilities.rb index f676462..1345f63 100644 --- a/lib/avatax/client/utilities.rb +++ b/lib/avatax/client/utilities.rb @@ -15,11 +15,8 @@ module Utilities # specific features of AvaTax. # @param serviceTypeId [String] The service to check # @return [Object] - def get_my_subscription(serviceTypeId) - path = "/api/v2/utilities/subscriptions/#{serviceTypeId}" - get(path) - end - + def get_my_subscription(serviceTypeId) path = "/api/v2/utilities/subscriptions/#{serviceTypeId}" + get(path) end # List all services to which the current user is subscribed # @@ -32,11 +29,8 @@ def get_my_subscription(serviceTypeId) # or subscription to provide useful information to the current user as to whether they are entitled to use # specific features of AvaTax. # @return [FetchResult] - def list_my_subscriptions() - path = "/api/v2/utilities/subscriptions" - get(path) - end - + def list_my_subscriptions() path = "/api/v2/utilities/subscriptions" + get(path) end # Tests connectivity and version of the service # @@ -61,11 +55,8 @@ def list_my_subscriptions() # # * This API may be called without providing authentication credentials. # @return [Object] - def ping() - path = "/api/v2/utilities/ping" - get(path) - end - + def ping() path = "/api/v2/utilities/ping" + get(path) end end end end \ No newline at end of file From 59c2b9b56a958e53ad14b651d4ec5d49fcf4cb84 Mon Sep 17 00:00:00 2001 From: "genevieve.conty" Date: Tue, 21 Jul 2020 13:12:53 -0700 Subject: [PATCH 2/2] 20-7-update version --- lib/avatax/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/avatax/version.rb b/lib/avatax/version.rb index b035649..0878b75 100644 --- a/lib/avatax/version.rb +++ b/lib/avatax/version.rb @@ -1,3 +1,3 @@ module AvaTax - VERSION = '20.7.0'.freeze unless defined?(::AvaTax::VERSION) + VERSION = '20.7.1'.freeze unless defined?(::AvaTax::VERSION) end