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 |
SubscriptionsApi | create_webhook_subscription | POST /webhooks/subscriptions | Create a subscription to events |
SubscriptionsApi | delete_webhook_subscription | DELETE /webhooks/subscriptions/{subscription-id} | Unsubscribe from events |
SubscriptionsApi | get_webhook_subscription | GET /webhooks/subscriptions/{subscription-id} | Get details of a subscription |
SubscriptionsApi | list_webhook_subscriptions | GET /webhooks/subscriptions | List all subscriptions |
TaxIdentifiersApi | tax_identifier_schema_by_country | GET /tax-identifiers/schema | Returns the tax identifier request & response schema for a specific country. |
TaxIdentifiersApi | validate_tax_identifier | POST /tax-identifiers/validate | Validates a tax identifier. |
TradingPartnersApi | batch_search_participants | POST /trading-partners/batch-searches | Handles batch search requests by uploading a file containing search parameters. |
TradingPartnersApi | create_trading_partner | POST /trading-partners | Creates a new trading partner. |
TradingPartnersApi | create_trading_partners_batch | POST /trading-partners/batch | Creates a batch of multiple trading partners. |
TradingPartnersApi | delete_trading_partner | DELETE /trading-partners/{id} | Deletes a trading partner using ID. |
TradingPartnersApi | download_batch_search_report | GET /trading-partners/batch-searches/{id}/$download-results | Downloads batch search results in a csv file. |
TradingPartnersApi | get_batch_search_detail | GET /trading-partners/batch-searches/{id} | Returns the batch search details using ID. |
TradingPartnersApi | list_batch_searches | GET /trading-partners/batch-searches | Lists all batch searches that were previously submitted. |
TradingPartnersApi | search_participants | GET /trading-partners | Returns a list of participants matching the input query. |
TradingPartnersApi | update_trading_partner | PUT /trading-partners/{id} | Updates a trading partner using ID. |
Class | Method | HTTP request | Description |
---|---|---|---|
CompaniesW9Api | create_company | POST /w9/companies | Create a company |
CompaniesW9Api | delete_company | DELETE /w9/companies/{id} | Delete a company |
CompaniesW9Api | get_companies | GET /w9/companies | List companies |
CompaniesW9Api | get_company | GET /w9/companies/{id} | Retrieve a company |
CompaniesW9Api | update_company | PUT /w9/companies/{id} | Update a company |
Forms1099Api | bulk_upsert1099_forms | POST /1099/forms/$bulk-upsert | Create or update multiple 1099/1095/W2/1042S forms |
Forms1099Api | create1099_form | POST /1099/forms | Create a 1099/1095/W2/1042S form |
Forms1099Api | delete1099_form | DELETE /1099/forms/{id} | Delete a 1099/1095/W2/1042S form |
Forms1099Api | get1099_form | GET /1099/forms/{id} | Retrieve a 1099/1095/W2/1042S form |
Forms1099Api | get1099_form_pdf | GET /1099/forms/{id}/pdf | Retrieve the PDF file for a 1099/1095/W2/1042S form |
Forms1099Api | list1099_forms | GET /1099/forms | List 1099/1095/W2/1042S forms |
Forms1099Api | update1099_form | PUT /1099/forms/{id} | Update a 1099/1095/W2/1042S form |
FormsW9Api | create_w9_form | POST /w9/forms | Create a W9/W4/W8 form |
FormsW9Api | delete_w9_form | DELETE /w9/forms/{id} | Delete a W9/W4/W8 form |
FormsW9Api | get_w9_form | GET /w9/forms/{id} | Retrieve a W9/W4/W8 form |
FormsW9Api | list_w9_forms | GET /w9/forms | List W9/W4/W8 forms |
FormsW9Api | send_w9_form_email | POST /w9/forms/{id}/$send-email | Send an email to the vendor/payee requesting they fill out a W9/W4/W8 form |
FormsW9Api | update_w9_form | PUT /w9/forms/{id} | Update a W9/W4/W8 form |
FormsW9Api | upload_w9_files | POST /w9/forms/{id}/attachment | Replace the PDF file for a W9/W4/W8 form |
Issuers1099Api | create_issuer | POST /1099/issuers | Create an issuer |
Issuers1099Api | delete_issuer | DELETE /1099/issuers/{id} | Delete an issuer |
Issuers1099Api | get_issuer | GET /1099/issuers/{id} | Retrieve an issuer |
Issuers1099Api | get_issuers | GET /1099/issuers | List issuers |
Issuers1099Api | update_issuer | PUT /1099/issuers/{id} | Update an issuer |
Jobs1099Api | get_job | GET /1099/jobs/{id} | Retrieves information about the job |
- models.Address
- models.BadDownloadRequest
- models.BadRequest
- models.BatchErrorDetail
- models.BatchSearch
- models.BatchSearchListResponse
- models.BatchSearchParticipants202Response
- models.ConditionalForField
- models.Consents
- models.CreateTradingPartner201Response
- models.CreateTradingPartnersBatch200Response
- models.CreateTradingPartnersBatch200ResponseValueInner
- models.CreateTradingPartnersBatchRequest
- models.DataInputField
- models.DataInputFieldNotUsedFor
- models.DataInputFieldOptionalFor
- models.DataInputFieldRequiredFor
- models.DataInputFieldsResponse
- models.DocumentFetch
- models.DocumentListResponse
- models.DocumentStatusResponse
- models.DocumentSubmissionError
- models.DocumentSubmitResponse
- models.DocumentSummary
- models.ErrorResponse
- models.EventId
- models.EventMessage
- models.EventPayload
- models.EventSubscription
- models.Extension
- models.FetchDocumentsRequest
- models.FetchDocumentsRequestDataInner
- models.FetchDocumentsRequestMetadata
- models.ForbiddenError
- models.HmacSignature
- models.HmacSignatureValue
- models.Id
- models.Identifier
- models.InputDataFormats
- models.InternalServerError
- models.Mandate
- models.MandateDataInputField
- models.MandateDataInputFieldNamespace
- models.MandatesResponse
- models.NotFoundError
- models.NotUsedForField
- models.OutputDataFormats
- models.Pagination
- models.RequiredWhenField
- models.SearchParticipants200Response
- models.Signature
- models.SignatureSignature
- models.SignatureValue
- models.SignatureValueSignature
- models.StatusEvent
- models.SubmitDocumentMetadata
- models.SubmitInteropDocument202Response
- models.SubscriptionCommon
- models.SubscriptionDetail
- models.SubscriptionListResponse
- models.SubscriptionRegistration
- models.SuccessResponse
- models.SupportedDocumentTypes
- models.TaxIdentifierRequest
- models.TaxIdentifierResponse
- models.TaxIdentifierResponseValue
- models.TaxIdentifierSchemaByCountry200Response
- models.TradingPartner
- models.UpdateTradingPartner200Response
- models.ValidationError
- models.WebhookInvocation
- models.WebhooksErrorInfo
- models.WebhooksErrorResponse
- models.WorkflowIds
- models.Attribute
- models.AuthorizedApiRequestModel
- models.AuthorizedApiRequestV2DataModel
- models.BaseCompanyModel
- models.BaseFormListRequest
- models.BulkUpsert1099FormsRequest
- models.CompanyCreateUpdateRequestModel
- models.CompanyModel
- models.CompanyResponse
- models.CompanyResponseModel
- models.CoveredIndividualReferenceResponse
- models.CoveredIndividualRequest
- models.Create1099Form201Response
- models.CreateW9Form201Response
- models.CreateW9FormRequest
- models.Data
- models.ErrorModel
- models.ErrorResponse
- models.ErrorResponseErrorsInner
- models.Form1042SList
- models.Form1042SListItem
- models.Form1042SListItemResponse
- models.Form1042SRequest
- models.Form1042SResponse
- models.Form1095BList
- models.Form1095BListItem
- models.Form1095BListItemResponse
- models.Form1095BRequest
- models.Form1099BaseResponse
- models.Form1099DivList
- models.Form1099DivListItem
- models.Form1099DivRequest
- models.Form1099DivResponse
- models.Form1099KList
- models.Form1099KListItem
- models.Form1099KListItemResponse
- models.Form1099KRequest
- models.Form1099ListResponse
- models.Form1099ListResponseValueInner
- models.Form1099MiscList
- models.Form1099MiscListItem
- models.Form1099MiscListItemResponse
- models.Form1099MiscRequest
- models.Form1099MiscResponse
- models.Form1099NecList
- models.Form1099NecListItem
- models.Form1099NecListItemResponse
- models.Form1099NecRequest
- models.Form1099NecResponse
- models.Form1099ProccessResult
- models.Form1099RList
- models.Form1099RListItem
- models.Form1099RListItemResponse
- models.Form1099RRequest
- models.Form1099StatusDetailResponse
- models.FormRequestBase
- models.FormRequestListItemBase
- models.FormResponseBase
- models.FormSingleRequestBase
- models.Get1099Form200Response
- models.HttpValidationProblemDetails
- models.ICreateForm1099Request
- models.IUpdateForm1099Request
- models.IW9FormDataModelsOneOf
- models.IntermediaryOrFlowThrough
- models.IntermediaryOrFlowThroughRequest
- models.IntermediaryOrFlowThroughResponse
- models.IssuerCommand
- models.IssuerResponse
- models.JobResult
- models.Link
- models.PaginatedQueryResultModel
- models.PaginatedQueryResultModelCompanyResponse
- models.PaginatedQueryResultModelIssuerResponse
- models.PaginatedW9FormsModel
- models.PrimaryWithholdingAgent
- models.PrimaryWithholdingAgentRequest
- models.PrimaryWithholdingAgentResponse
- models.ProblemDetails
- models.StateAndLocalWithholdingRequest
- models.StateAndLocalWithholdingResponse
- models.StateEfileStatusDetailResponse
- models.StatusDetail
- models.SubstantialUsOwnerRequest
- models.SubstantialUsOwnerResponse
- models.Update1099Form200Response
- models.ValidationErrorResponse
- models.W4FormDataModel
- models.W4FormRequest
- models.W4FormResponse
- models.W8BenEFormRequest
- models.W8BenEFormResponse
- models.W8BenESubstantialUsOwnerDataModel
- models.W8BenFormDataModel
- models.W8BenFormRequest
- models.W8BenFormResponse
- models.W8BeneFormDataModel
- models.W8ImyFormDataModel
- models.W8ImyFormRequest
- models.W8ImyFormResponse
- models.W9FormBaseRequest
- models.W9FormBaseResponse
- models.W9FormDataModel
- models.W9FormRequest
- models.W9FormResponse