Unified SDK consists of services on top of which the Avalara Compliance Cloud platform is built. These services are foundational and provide functionality such as einvoicing.
- Package version: 24.12.0
gem install avalara_sdk
Please follow the installation procedure and then run the following code:
require 'time'
require 'avalara_sdk'
# setup authorization
config = AvalaraSdk::Configuration.new
config.environment = 'sandbox' # Set the environment (sandbox, production, etc.)
config.app_name = 'testApp' # Set your application name
config.app_version = '1.2.3' # Set your application version
config.machine_name = 'testMachine' # Set your machine name
config.bearer_token = 'Your_Bearer_token' # Set your OAuth2 Bearer Token (replace with actual token)
api_client = AvalaraSdk::ApiClient.new config
api_instance = AvalaraSdk::EInvoicing::V1::MandatesApi.new api_client
get_mandates_request = AvalaraSdk::EInvoicing::V1::GetMandatesRequest.new
get_mandates_request.set_x_avalara_client('x_avalara_client_example')
begin
# Retrieve geolocation information for a specified address
result = api_instance.get_mandates(get_mandates_request)
p result
rescue AvalaraSdk::ApiError => e
puts "Error when calling MandatesApi->get_mandates: #{e}"
end
Class | Method | HTTP request | Description |
---|---|---|---|
DataInputFieldsApi | get_data_input_fields | GET /data-input-fields | Returns the optionality of document fields for different country mandates |
DocumentsApi | download_document | GET /documents/{documentId}/$download | Returns a copy of the document |
DocumentsApi | fetch_documents | POST /documents/$fetch | Fetch the inbound document from a tax authority |
DocumentsApi | get_document_list | GET /documents | Returns a summary of documents for a date range |
DocumentsApi | get_document_status | GET /documents/{documentId}/status | Checks the status of a document |
DocumentsApi | submit_document | POST /documents | Submits a document to Avalara E-Invoicing API |
InteropApi | submit_interop_document | POST /interop/documents | Submit a document |
MandatesApi | get_mandate_data_input_fields | GET /mandates/{mandateId}/data-input-fields | Returns document field information for a country mandate, a selected document type, and its version |
MandatesApi | get_mandates | GET /mandates | List country mandates that are supported by the Avalara E-Invoicing platform |
TradingPartnersApi | batch_search_participants | POST /trading-partners/batch-searches | Creates a batch search and performs a batch search in the directory for participants in the background. |
TradingPartnersApi | download_batch_search_report | GET /trading-partners/batch-searches/{id}/$download-results | Download batch search results in a csv file. |
TradingPartnersApi | get_batch_search_detail | GET /trading-partners/batch-searches/{id} | Get the batch search details for a given id. |
TradingPartnersApi | list_batch_searches | GET /trading-partners/batch-searches | List all batch searches that were previously submitted. |
TradingPartnersApi | search_participants | GET /trading-partners | Returns a list of participants matching the input query. |
- models.BadDownloadRequest
- models.BadRequest
- models.BatchSearch
- models.BatchSearchListResponse
- models.ConditionalForField
- models.DataInputField
- models.DataInputFieldNotUsedFor
- models.DataInputFieldOptionalFor
- models.DataInputFieldRequiredFor
- models.DataInputFieldsResponse
- models.DirectorySearchResponse
- models.DirectorySearchResponseValueInner
- models.DirectorySearchResponseValueInnerAddressesInner
- models.DirectorySearchResponseValueInnerIdentifiersInner
- models.DirectorySearchResponseValueInnerSupportedDocumentTypesInner
- models.DocumentFetch
- models.DocumentFetchRequest
- models.DocumentFetchRequestDataInner
- models.DocumentFetchRequestMetadata
- models.DocumentListResponse
- models.DocumentStatusResponse
- models.DocumentSubmissionError
- models.DocumentSubmitResponse
- models.DocumentSummary
- models.ErrorResponse
- models.ForbiddenError
- models.InputDataFormats
- models.InternalServerError
- models.Mandate
- models.MandateDataInputField
- models.MandateDataInputFieldNamespace
- models.MandatesResponse
- models.NotFoundError
- models.NotUsedForField
- models.RequiredWhenField
- models.StatusEvent
- models.SubmitDocumentMetadata
- models.SubmitInteropDocument202Response
- models.WorkflowIds