/* * Xero Accounting API * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * Contact: api@xero.com * Generated by: https://github.com/openapitools/openapi-generator.git */ // The version of the OpenAPI document: 3.0.3 using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; using System.Linq; using System.Net; using System.Net.Mime; using Xero.NetStandard.OAuth2.Client; using Xero.NetStandard.OAuth2.Model.Accounting; using System.Threading; namespace Xero.NetStandard.OAuth2.Api { /// /// Represents a collection of functions to interact with the API endpoints /// public interface IAccountingApiAsync : IApiAccessor { #region Asynchronous Operations /// /// Creates a new chart of accounts /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Account object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Accounts System.Threading.Tasks.Task CreateAccountAsync (string accessToken, string xeroTenantId, Account account, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a new chart of accounts /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Account object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Accounts) System.Threading.Tasks.Task> CreateAccountAsyncWithHttpInfo (string accessToken, string xeroTenantId, Account account, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates an attachment on a specific account /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task CreateAccountAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid accountID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates an attachment on a specific account /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> CreateAccountAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid accountID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates an attachment for a specific bank transaction by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task CreateBankTransactionAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates an attachment for a specific bank transaction by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> CreateBankTransactionAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific bank transactions /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task CreateBankTransactionHistoryRecordAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific bank transactions /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> CreateBankTransactionHistoryRecordAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates one or more spent or received money transaction /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// BankTransactions with an array of BankTransaction objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BankTransactions System.Threading.Tasks.Task CreateBankTransactionsAsync (string accessToken, string xeroTenantId, BankTransactions bankTransactions, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates one or more spent or received money transaction /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// BankTransactions with an array of BankTransaction objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BankTransactions) System.Threading.Tasks.Task> CreateBankTransactionsAsyncWithHttpInfo (string accessToken, string xeroTenantId, BankTransactions bankTransactions, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a bank transfer /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// BankTransfers with array of BankTransfer objects in request body /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BankTransfers System.Threading.Tasks.Task CreateBankTransferAsync (string accessToken, string xeroTenantId, BankTransfers bankTransfers, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a bank transfer /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// BankTransfers with array of BankTransfer objects in request body /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BankTransfers) System.Threading.Tasks.Task> CreateBankTransferAsyncWithHttpInfo (string accessToken, string xeroTenantId, BankTransfers bankTransfers, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task CreateBankTransferAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid bankTransferID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> CreateBankTransferAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransferID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific bank transfer /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task CreateBankTransferHistoryRecordAsync (string accessToken, string xeroTenantId, Guid bankTransferID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific bank transfer /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> CreateBankTransferHistoryRecordAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransferID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates one or many batch payments for invoices /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// BatchPayments with an array of Payments in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BatchPayments System.Threading.Tasks.Task CreateBatchPaymentAsync (string accessToken, string xeroTenantId, BatchPayments batchPayments, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates one or many batch payments for invoices /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// BatchPayments with an array of Payments in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BatchPayments) System.Threading.Tasks.Task> CreateBatchPaymentAsyncWithHttpInfo (string accessToken, string xeroTenantId, BatchPayments batchPayments, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific batch payment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for BatchPayment /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task CreateBatchPaymentHistoryRecordAsync (string accessToken, string xeroTenantId, Guid batchPaymentID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific batch payment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for BatchPayment /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> CreateBatchPaymentHistoryRecordAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid batchPaymentID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a new custom payment service for a specific branding theme /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Branding Theme /// PaymentServices array with PaymentService object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PaymentServices System.Threading.Tasks.Task CreateBrandingThemePaymentServicesAsync (string accessToken, string xeroTenantId, Guid brandingThemeID, PaymentServices paymentServices, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a new custom payment service for a specific branding theme /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Branding Theme /// PaymentServices array with PaymentService object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PaymentServices) System.Threading.Tasks.Task> CreateBrandingThemePaymentServicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid brandingThemeID, PaymentServices paymentServices, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task CreateContactAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid contactID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> CreateContactAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a contact group /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// ContactGroups with an array of names in request body /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ContactGroups System.Threading.Tasks.Task CreateContactGroupAsync (string accessToken, string xeroTenantId, ContactGroups contactGroups, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a contact group /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// ContactGroups with an array of names in request body /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ContactGroups) System.Threading.Tasks.Task> CreateContactGroupAsyncWithHttpInfo (string accessToken, string xeroTenantId, ContactGroups contactGroups, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates contacts to a specific contact group /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// Contacts with array of contacts specifying the ContactID to be added to ContactGroup in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Contacts System.Threading.Tasks.Task CreateContactGroupContactsAsync (string accessToken, string xeroTenantId, Guid contactGroupID, Contacts contacts, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates contacts to a specific contact group /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// Contacts with array of contacts specifying the ContactID to be added to ContactGroup in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Contacts) System.Threading.Tasks.Task> CreateContactGroupContactsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactGroupID, Contacts contacts, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a new history record for a specific contact /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task CreateContactHistoryAsync (string accessToken, string xeroTenantId, Guid contactID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a new history record for a specific contact /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> CreateContactHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates multiple contacts (bulk) in a Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Contacts with an array of Contact objects to create in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Contacts System.Threading.Tasks.Task CreateContactsAsync (string accessToken, string xeroTenantId, Contacts contacts, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates multiple contacts (bulk) in a Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Contacts with an array of Contact objects to create in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Contacts) System.Threading.Tasks.Task> CreateContactsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Contacts contacts, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates allocation for a specific credit note /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Allocations with array of Allocation object in body of request. /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Allocations System.Threading.Tasks.Task CreateCreditNoteAllocationAsync (string accessToken, string xeroTenantId, Guid creditNoteID, Allocations allocations, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates allocation for a specific credit note /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Allocations with array of Allocation object in body of request. /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Allocations) System.Threading.Tasks.Task> CreateCreditNoteAllocationAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, Allocations allocations, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates an attachment for a specific credit note /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Name of the attachment /// Byte array of file in body of request /// Allows an attachment to be seen by the end customer within their online invoice (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task CreateCreditNoteAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid creditNoteID, string fileName, byte[] body, bool? includeOnline = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates an attachment for a specific credit note /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Name of the attachment /// Byte array of file in body of request /// Allows an attachment to be seen by the end customer within their online invoice (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> CreateCreditNoteAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, string fileName, byte[] body, bool? includeOnline = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Retrieves history records of a specific credit note /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task CreateCreditNoteHistoryAsync (string accessToken, string xeroTenantId, Guid creditNoteID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Retrieves history records of a specific credit note /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> CreateCreditNoteHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a new credit note /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Credit Notes with array of CreditNote object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of CreditNotes System.Threading.Tasks.Task CreateCreditNotesAsync (string accessToken, string xeroTenantId, CreditNotes creditNotes, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a new credit note /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Credit Notes with array of CreditNote object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (CreditNotes) System.Threading.Tasks.Task> CreateCreditNotesAsyncWithHttpInfo (string accessToken, string xeroTenantId, CreditNotes creditNotes, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Create a new currency for a Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Currency object in the body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Currencies System.Threading.Tasks.Task CreateCurrencyAsync (string accessToken, string xeroTenantId, Currency currency, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Create a new currency for a Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Currency object in the body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Currencies) System.Threading.Tasks.Task> CreateCurrencyAsyncWithHttpInfo (string accessToken, string xeroTenantId, Currency currency, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates new employees used in Xero payrun /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Employees with array of Employee object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Employees System.Threading.Tasks.Task CreateEmployeesAsync (string accessToken, string xeroTenantId, Employees employees, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates new employees used in Xero payrun /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Employees with array of Employee object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Employees) System.Threading.Tasks.Task> CreateEmployeesAsyncWithHttpInfo (string accessToken, string xeroTenantId, Employees employees, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific expense claim /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ExpenseClaim /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task CreateExpenseClaimHistoryAsync (string accessToken, string xeroTenantId, Guid expenseClaimID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific expense claim /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ExpenseClaim /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> CreateExpenseClaimHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid expenseClaimID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates expense claims /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// ExpenseClaims with array of ExpenseClaim object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ExpenseClaims System.Threading.Tasks.Task CreateExpenseClaimsAsync (string accessToken, string xeroTenantId, ExpenseClaims expenseClaims, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates expense claims /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// ExpenseClaims with array of ExpenseClaim object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ExpenseClaims) System.Threading.Tasks.Task> CreateExpenseClaimsAsyncWithHttpInfo (string accessToken, string xeroTenantId, ExpenseClaims expenseClaims, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates an attachment for a specific invoice or purchase bill by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Name of the attachment /// Byte array of file in body of request /// Allows an attachment to be seen by the end customer within their online invoice (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task CreateInvoiceAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid invoiceID, string fileName, byte[] body, bool? includeOnline = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates an attachment for a specific invoice or purchase bill by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Name of the attachment /// Byte array of file in body of request /// Allows an attachment to be seen by the end customer within their online invoice (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> CreateInvoiceAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, string fileName, byte[] body, bool? includeOnline = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific invoice /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task CreateInvoiceHistoryAsync (string accessToken, string xeroTenantId, Guid invoiceID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific invoice /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> CreateInvoiceHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates one or more sales invoices or purchase bills /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Invoices with an array of invoice objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Invoices System.Threading.Tasks.Task CreateInvoicesAsync (string accessToken, string xeroTenantId, Invoices invoices, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates one or more sales invoices or purchase bills /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Invoices with an array of invoice objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Invoices) System.Threading.Tasks.Task> CreateInvoicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, Invoices invoices, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific item /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task CreateItemHistoryAsync (string accessToken, string xeroTenantId, Guid itemID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific item /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> CreateItemHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid itemID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates one or more items /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Items with an array of Item objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Items System.Threading.Tasks.Task CreateItemsAsync (string accessToken, string xeroTenantId, Items items, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates one or more items /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Items with an array of Item objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Items) System.Threading.Tasks.Task> CreateItemsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Items items, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates linked transactions (billable expenses) /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// LinkedTransaction object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of LinkedTransactions System.Threading.Tasks.Task CreateLinkedTransactionAsync (string accessToken, string xeroTenantId, LinkedTransaction linkedTransaction, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates linked transactions (billable expenses) /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// LinkedTransaction object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (LinkedTransactions) System.Threading.Tasks.Task> CreateLinkedTransactionAsyncWithHttpInfo (string accessToken, string xeroTenantId, LinkedTransaction linkedTransaction, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a specific attachment for a specific manual journal by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task CreateManualJournalAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid manualJournalID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a specific attachment for a specific manual journal by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> CreateManualJournalAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific manual journal /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task CreateManualJournalHistoryRecordAsync (string accessToken, string xeroTenantId, Guid manualJournalID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific manual journal /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> CreateManualJournalHistoryRecordAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates one or more manual journals /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// ManualJournals array with ManualJournal object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ManualJournals System.Threading.Tasks.Task CreateManualJournalsAsync (string accessToken, string xeroTenantId, ManualJournals manualJournals, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates one or more manual journals /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// ManualJournals array with ManualJournal object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ManualJournals) System.Threading.Tasks.Task> CreateManualJournalsAsyncWithHttpInfo (string accessToken, string xeroTenantId, ManualJournals manualJournals, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a single allocation for a specific overpayment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// Allocations array with Allocation object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Allocations System.Threading.Tasks.Task CreateOverpaymentAllocationsAsync (string accessToken, string xeroTenantId, Guid overpaymentID, Allocations allocations, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a single allocation for a specific overpayment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// Allocations array with Allocation object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Allocations) System.Threading.Tasks.Task> CreateOverpaymentAllocationsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid overpaymentID, Allocations allocations, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific overpayment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task CreateOverpaymentHistoryAsync (string accessToken, string xeroTenantId, Guid overpaymentID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific overpayment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> CreateOverpaymentHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid overpaymentID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a single payment for invoice or credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Request body with a single Payment object /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Payments System.Threading.Tasks.Task CreatePaymentAsync (string accessToken, string xeroTenantId, Payment payment, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a single payment for invoice or credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Request body with a single Payment object /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Payments) System.Threading.Tasks.Task> CreatePaymentAsyncWithHttpInfo (string accessToken, string xeroTenantId, Payment payment, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific payment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Payment /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task CreatePaymentHistoryAsync (string accessToken, string xeroTenantId, Guid paymentID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific payment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Payment /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> CreatePaymentHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid paymentID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a payment service /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// PaymentServices array with PaymentService object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PaymentServices System.Threading.Tasks.Task CreatePaymentServiceAsync (string accessToken, string xeroTenantId, PaymentServices paymentServices, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a payment service /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// PaymentServices array with PaymentService object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PaymentServices) System.Threading.Tasks.Task> CreatePaymentServiceAsyncWithHttpInfo (string accessToken, string xeroTenantId, PaymentServices paymentServices, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates multiple payments for invoices or credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Payments array with Payment object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Payments System.Threading.Tasks.Task CreatePaymentsAsync (string accessToken, string xeroTenantId, Payments payments, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates multiple payments for invoices or credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Payments array with Payment object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Payments) System.Threading.Tasks.Task> CreatePaymentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Payments payments, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Allows you to create an Allocation for prepayments /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// Allocations with an array of Allocation object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Allocations System.Threading.Tasks.Task CreatePrepaymentAllocationsAsync (string accessToken, string xeroTenantId, Guid prepaymentID, Allocations allocations, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Allows you to create an Allocation for prepayments /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// Allocations with an array of Allocation object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Allocations) System.Threading.Tasks.Task> CreatePrepaymentAllocationsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid prepaymentID, Allocations allocations, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific prepayment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task CreatePrepaymentHistoryAsync (string accessToken, string xeroTenantId, Guid prepaymentID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific prepayment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> CreatePrepaymentHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid prepaymentID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates attachment for a specific purchase order /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task CreatePurchaseOrderAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates attachment for a specific purchase order /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> CreatePurchaseOrderAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific purchase orders /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task CreatePurchaseOrderHistoryAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific purchase orders /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> CreatePurchaseOrderHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates one or more purchase orders /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// PurchaseOrders with an array of PurchaseOrder object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PurchaseOrders System.Threading.Tasks.Task CreatePurchaseOrdersAsync (string accessToken, string xeroTenantId, PurchaseOrders purchaseOrders, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates one or more purchase orders /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// PurchaseOrders with an array of PurchaseOrder object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PurchaseOrders) System.Threading.Tasks.Task> CreatePurchaseOrdersAsyncWithHttpInfo (string accessToken, string xeroTenantId, PurchaseOrders purchaseOrders, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates attachment for a specific quote /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task CreateQuoteAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid quoteID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates attachment for a specific quote /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> CreateQuoteAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific quote /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task CreateQuoteHistoryAsync (string accessToken, string xeroTenantId, Guid quoteID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific quote /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> CreateQuoteHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Create one or more quotes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Quotes with an array of Quote object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Quotes System.Threading.Tasks.Task CreateQuotesAsync (string accessToken, string xeroTenantId, Quotes quotes, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Create one or more quotes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Quotes with an array of Quote object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Quotes) System.Threading.Tasks.Task> CreateQuotesAsyncWithHttpInfo (string accessToken, string xeroTenantId, Quotes quotes, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates draft expense claim receipts for any user /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Receipts with an array of Receipt object in body of request /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Receipts System.Threading.Tasks.Task CreateReceiptAsync (string accessToken, string xeroTenantId, Receipts receipts, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates draft expense claim receipts for any user /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Receipts with an array of Receipt object in body of request /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Receipts) System.Threading.Tasks.Task> CreateReceiptAsyncWithHttpInfo (string accessToken, string xeroTenantId, Receipts receipts, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates an attachment on a specific expense claim receipts by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task CreateReceiptAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid receiptID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates an attachment on a specific expense claim receipts by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> CreateReceiptAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific receipt /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task CreateReceiptHistoryAsync (string accessToken, string xeroTenantId, Guid receiptID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific receipt /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> CreateReceiptHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates an attachment from a specific repeating invoices by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task CreateRepeatingInvoiceAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates an attachment from a specific repeating invoices by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> CreateRepeatingInvoiceAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific repeating invoice /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task CreateRepeatingInvoiceHistoryAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a history record for a specific repeating invoice /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> CreateRepeatingInvoiceHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates one or more repeating invoice templates /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// RepeatingInvoices with an array of repeating invoice objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of RepeatingInvoices System.Threading.Tasks.Task CreateRepeatingInvoicesAsync (string accessToken, string xeroTenantId, RepeatingInvoices repeatingInvoices, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates one or more repeating invoice templates /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// RepeatingInvoices with an array of repeating invoice objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (RepeatingInvoices) System.Threading.Tasks.Task> CreateRepeatingInvoicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, RepeatingInvoices repeatingInvoices, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates one or more tax rates /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// TaxRates array with TaxRate object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TaxRates System.Threading.Tasks.Task CreateTaxRatesAsync (string accessToken, string xeroTenantId, TaxRates taxRates, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates one or more tax rates /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// TaxRates array with TaxRate object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TaxRates) System.Threading.Tasks.Task> CreateTaxRatesAsyncWithHttpInfo (string accessToken, string xeroTenantId, TaxRates taxRates, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Create tracking categories /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// TrackingCategory object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TrackingCategories System.Threading.Tasks.Task CreateTrackingCategoryAsync (string accessToken, string xeroTenantId, TrackingCategory trackingCategory, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Create tracking categories /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// TrackingCategory object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TrackingCategories) System.Threading.Tasks.Task> CreateTrackingCategoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, TrackingCategory trackingCategory, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates options for a specific tracking category /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// TrackingOption object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TrackingOptions System.Threading.Tasks.Task CreateTrackingOptionsAsync (string accessToken, string xeroTenantId, Guid trackingCategoryID, TrackingOption trackingOption, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates options for a specific tracking category /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// TrackingOption object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TrackingOptions) System.Threading.Tasks.Task> CreateTrackingOptionsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid trackingCategoryID, TrackingOption trackingOption, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Deletes a chart of accounts /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Accounts System.Threading.Tasks.Task DeleteAccountAsync (string accessToken, string xeroTenantId, Guid accountID, CancellationToken cancellationToken = default); /// /// Deletes a chart of accounts /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Accounts) System.Threading.Tasks.Task> DeleteAccountAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid accountID, CancellationToken cancellationToken = default); /// /// Updates a specific batch payment for invoices and credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BatchPayments System.Threading.Tasks.Task DeleteBatchPaymentAsync (string accessToken, string xeroTenantId, BatchPaymentDelete batchPaymentDelete, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific batch payment for invoices and credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BatchPayments) System.Threading.Tasks.Task> DeleteBatchPaymentAsyncWithHttpInfo (string accessToken, string xeroTenantId, BatchPaymentDelete batchPaymentDelete, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific batch payment for invoices and credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for BatchPayment /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BatchPayments System.Threading.Tasks.Task DeleteBatchPaymentByUrlParamAsync (string accessToken, string xeroTenantId, Guid batchPaymentID, BatchPaymentDeleteByUrlParam batchPaymentDeleteByUrlParam, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific batch payment for invoices and credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for BatchPayment /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BatchPayments) System.Threading.Tasks.Task> DeleteBatchPaymentByUrlParamAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid batchPaymentID, BatchPaymentDeleteByUrlParam batchPaymentDeleteByUrlParam, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Deletes a specific contact from a contact group using a unique contact Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of void System.Threading.Tasks.Task DeleteContactGroupContactAsync (string accessToken, string xeroTenantId, Guid contactGroupID, Guid contactID, CancellationToken cancellationToken = default); /// /// Deletes a specific contact from a contact group using a unique contact Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse System.Threading.Tasks.Task> DeleteContactGroupContactAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactGroupID, Guid contactID, CancellationToken cancellationToken = default); /// /// Deletes all contacts from a specific contact group /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of void System.Threading.Tasks.Task DeleteContactGroupContactsAsync (string accessToken, string xeroTenantId, Guid contactGroupID, CancellationToken cancellationToken = default); /// /// Deletes all contacts from a specific contact group /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse System.Threading.Tasks.Task> DeleteContactGroupContactsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactGroupID, CancellationToken cancellationToken = default); /// /// Deletes an Allocation from a Credit Note /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Unique identifier for Allocation object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Allocation System.Threading.Tasks.Task DeleteCreditNoteAllocationsAsync (string accessToken, string xeroTenantId, Guid creditNoteID, Guid allocationID, CancellationToken cancellationToken = default); /// /// Deletes an Allocation from a Credit Note /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Unique identifier for Allocation object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Allocation) System.Threading.Tasks.Task> DeleteCreditNoteAllocationsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, Guid allocationID, CancellationToken cancellationToken = default); /// /// Deletes a specific item /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of void System.Threading.Tasks.Task DeleteItemAsync (string accessToken, string xeroTenantId, Guid itemID, CancellationToken cancellationToken = default); /// /// Deletes a specific item /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse System.Threading.Tasks.Task> DeleteItemAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid itemID, CancellationToken cancellationToken = default); /// /// Deletes a specific linked transactions (billable expenses) /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a LinkedTransaction /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of void System.Threading.Tasks.Task DeleteLinkedTransactionAsync (string accessToken, string xeroTenantId, Guid linkedTransactionID, CancellationToken cancellationToken = default); /// /// Deletes a specific linked transactions (billable expenses) /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a LinkedTransaction /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse System.Threading.Tasks.Task> DeleteLinkedTransactionAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid linkedTransactionID, CancellationToken cancellationToken = default); /// /// Deletes an Allocation from an overpayment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// Unique identifier for Allocation object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Allocation System.Threading.Tasks.Task DeleteOverpaymentAllocationsAsync (string accessToken, string xeroTenantId, Guid overpaymentID, Guid allocationID, CancellationToken cancellationToken = default); /// /// Deletes an Allocation from an overpayment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// Unique identifier for Allocation object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Allocation) System.Threading.Tasks.Task> DeleteOverpaymentAllocationsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid overpaymentID, Guid allocationID, CancellationToken cancellationToken = default); /// /// Updates a specific payment for invoices and credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Payment /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Payments System.Threading.Tasks.Task DeletePaymentAsync (string accessToken, string xeroTenantId, Guid paymentID, PaymentDelete paymentDelete, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific payment for invoices and credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Payment /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Payments) System.Threading.Tasks.Task> DeletePaymentAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid paymentID, PaymentDelete paymentDelete, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Deletes an Allocation from a Prepayment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// Unique identifier for Allocation object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Allocation System.Threading.Tasks.Task DeletePrepaymentAllocationsAsync (string accessToken, string xeroTenantId, Guid prepaymentID, Guid allocationID, CancellationToken cancellationToken = default); /// /// Deletes an Allocation from a Prepayment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// Unique identifier for Allocation object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Allocation) System.Threading.Tasks.Task> DeletePrepaymentAllocationsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid prepaymentID, Guid allocationID, CancellationToken cancellationToken = default); /// /// Deletes a specific tracking category /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TrackingCategories System.Threading.Tasks.Task DeleteTrackingCategoryAsync (string accessToken, string xeroTenantId, Guid trackingCategoryID, CancellationToken cancellationToken = default); /// /// Deletes a specific tracking category /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TrackingCategories) System.Threading.Tasks.Task> DeleteTrackingCategoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid trackingCategoryID, CancellationToken cancellationToken = default); /// /// Deletes a specific option for a specific tracking category /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// Unique identifier for a Tracking Option /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TrackingOptions System.Threading.Tasks.Task DeleteTrackingOptionsAsync (string accessToken, string xeroTenantId, Guid trackingCategoryID, Guid trackingOptionID, CancellationToken cancellationToken = default); /// /// Deletes a specific option for a specific tracking category /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// Unique identifier for a Tracking Option /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TrackingOptions) System.Threading.Tasks.Task> DeleteTrackingOptionsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid trackingCategoryID, Guid trackingOptionID, CancellationToken cancellationToken = default); /// /// Sends a copy of a specific invoice to related contact via email /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of void System.Threading.Tasks.Task EmailInvoiceAsync (string accessToken, string xeroTenantId, Guid invoiceID, RequestEmpty requestEmpty, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Sends a copy of a specific invoice to related contact via email /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse System.Threading.Tasks.Task> EmailInvoiceAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, RequestEmpty requestEmpty, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Retrieves a single chart of accounts by using a unique account Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Accounts System.Threading.Tasks.Task GetAccountAsync (string accessToken, string xeroTenantId, Guid accountID, CancellationToken cancellationToken = default); /// /// Retrieves a single chart of accounts by using a unique account Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Accounts) System.Threading.Tasks.Task> GetAccountAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid accountID, CancellationToken cancellationToken = default); /// /// Retrieves an attachment for a specific account by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetAccountAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid accountID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves an attachment for a specific account by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetAccountAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid accountID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific account using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetAccountAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid accountID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific account using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetAccountAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid accountID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves attachments for a specific accounts by using a unique account Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task GetAccountAttachmentsAsync (string accessToken, string xeroTenantId, Guid accountID, CancellationToken cancellationToken = default); /// /// Retrieves attachments for a specific accounts by using a unique account Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> GetAccountAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid accountID, CancellationToken cancellationToken = default); /// /// Retrieves the full chart of accounts /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Accounts System.Threading.Tasks.Task GetAccountsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves the full chart of accounts /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Accounts) System.Threading.Tasks.Task> GetAccountsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves a single spent or received money transaction by using a unique bank transaction Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BankTransactions System.Threading.Tasks.Task GetBankTransactionAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves a single spent or received money transaction by using a unique bank transaction Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BankTransactions) System.Threading.Tasks.Task> GetBankTransactionAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific bank transaction by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetBankTransactionAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific bank transaction by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetBankTransactionAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves specific attachments from a specific BankTransaction using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetBankTransactionAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves specific attachments from a specific BankTransaction using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetBankTransactionAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves any attachments from a specific bank transactions /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task GetBankTransactionAttachmentsAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, CancellationToken cancellationToken = default); /// /// Retrieves any attachments from a specific bank transactions /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> GetBankTransactionAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, CancellationToken cancellationToken = default); /// /// Retrieves any spent or received money transactions /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Up to 100 bank transactions will be returned in a single API call with line items details (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BankTransactions System.Threading.Tasks.Task GetBankTransactionsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves any spent or received money transactions /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Up to 100 bank transactions will be returned in a single API call with line items details (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BankTransactions) System.Threading.Tasks.Task> GetBankTransactionsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves history from a specific bank transaction using a unique bank transaction Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task GetBankTransactionsHistoryAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, CancellationToken cancellationToken = default); /// /// Retrieves history from a specific bank transaction using a unique bank transaction Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> GetBankTransactionsHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, CancellationToken cancellationToken = default); /// /// Retrieves specific bank transfers by using a unique bank transfer Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BankTransfers System.Threading.Tasks.Task GetBankTransferAsync (string accessToken, string xeroTenantId, Guid bankTransferID, CancellationToken cancellationToken = default); /// /// Retrieves specific bank transfers by using a unique bank transfer Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BankTransfers) System.Threading.Tasks.Task> GetBankTransferAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransferID, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment on a specific bank transfer by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetBankTransferAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid bankTransferID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment on a specific bank transfer by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetBankTransferAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransferID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific bank transfer using a unique attachment ID /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetBankTransferAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid bankTransferID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific bank transfer using a unique attachment ID /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetBankTransferAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransferID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves attachments from a specific bank transfer /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task GetBankTransferAttachmentsAsync (string accessToken, string xeroTenantId, Guid bankTransferID, CancellationToken cancellationToken = default); /// /// Retrieves attachments from a specific bank transfer /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> GetBankTransferAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransferID, CancellationToken cancellationToken = default); /// /// Retrieves history from a specific bank transfer using a unique bank transfer Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task GetBankTransferHistoryAsync (string accessToken, string xeroTenantId, Guid bankTransferID, CancellationToken cancellationToken = default); /// /// Retrieves history from a specific bank transfer using a unique bank transfer Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> GetBankTransferHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransferID, CancellationToken cancellationToken = default); /// /// Retrieves all bank transfers /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BankTransfers System.Threading.Tasks.Task GetBankTransfersAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves all bank transfers /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BankTransfers) System.Threading.Tasks.Task> GetBankTransfersAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific batch payment using a unique batch payment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for BatchPayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BatchPayments System.Threading.Tasks.Task GetBatchPaymentAsync (string accessToken, string xeroTenantId, Guid batchPaymentID, CancellationToken cancellationToken = default); /// /// Retrieves a specific batch payment using a unique batch payment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for BatchPayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BatchPayments) System.Threading.Tasks.Task> GetBatchPaymentAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid batchPaymentID, CancellationToken cancellationToken = default); /// /// Retrieves history from a specific batch payment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for BatchPayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task GetBatchPaymentHistoryAsync (string accessToken, string xeroTenantId, Guid batchPaymentID, CancellationToken cancellationToken = default); /// /// Retrieves history from a specific batch payment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for BatchPayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> GetBatchPaymentHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid batchPaymentID, CancellationToken cancellationToken = default); /// /// Retrieves either one or many batch payments for invoices /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BatchPayments System.Threading.Tasks.Task GetBatchPaymentsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves either one or many batch payments for invoices /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BatchPayments) System.Threading.Tasks.Task> GetBatchPaymentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific branding theme using a unique branding theme Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Branding Theme /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BrandingThemes System.Threading.Tasks.Task GetBrandingThemeAsync (string accessToken, string xeroTenantId, Guid brandingThemeID, CancellationToken cancellationToken = default); /// /// Retrieves a specific branding theme using a unique branding theme Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Branding Theme /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BrandingThemes) System.Threading.Tasks.Task> GetBrandingThemeAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid brandingThemeID, CancellationToken cancellationToken = default); /// /// Retrieves the payment services for a specific branding theme /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Branding Theme /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PaymentServices System.Threading.Tasks.Task GetBrandingThemePaymentServicesAsync (string accessToken, string xeroTenantId, Guid brandingThemeID, CancellationToken cancellationToken = default); /// /// Retrieves the payment services for a specific branding theme /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Branding Theme /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PaymentServices) System.Threading.Tasks.Task> GetBrandingThemePaymentServicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid brandingThemeID, CancellationToken cancellationToken = default); /// /// Retrieves all the branding themes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BrandingThemes System.Threading.Tasks.Task GetBrandingThemesAsync (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default); /// /// Retrieves all the branding themes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BrandingThemes) System.Threading.Tasks.Task> GetBrandingThemesAsyncWithHttpInfo (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default); /// /// Retrieves a specific budget, which includes budget lines /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Budgets /// Filter by start date (optional) /// Filter by end date (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Budgets System.Threading.Tasks.Task GetBudgetAsync (string accessToken, string xeroTenantId, Guid budgetID, DateTime? dateTo = null, DateTime? dateFrom = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific budget, which includes budget lines /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Budgets /// Filter by start date (optional) /// Filter by end date (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Budgets) System.Threading.Tasks.Task> GetBudgetAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid budgetID, DateTime? dateTo = null, DateTime? dateFrom = null, CancellationToken cancellationToken = default); /// /// Retrieve a list of budgets /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by BudgetID. Allows you to retrieve a specific individual budget. (optional) /// Filter by start date (optional) /// Filter by end date (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Budgets System.Threading.Tasks.Task GetBudgetsAsync (string accessToken, string xeroTenantId, List iDs = null, DateTime? dateTo = null, DateTime? dateFrom = null, CancellationToken cancellationToken = default); /// /// Retrieve a list of budgets /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by BudgetID. Allows you to retrieve a specific individual budget. (optional) /// Filter by start date (optional) /// Filter by end date (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Budgets) System.Threading.Tasks.Task> GetBudgetsAsyncWithHttpInfo (string accessToken, string xeroTenantId, List iDs = null, DateTime? dateTo = null, DateTime? dateFrom = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific contacts in a Xero organisation using a unique contact Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Contacts System.Threading.Tasks.Task GetContactAsync (string accessToken, string xeroTenantId, Guid contactID, CancellationToken cancellationToken = default); /// /// Retrieves a specific contacts in a Xero organisation using a unique contact Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Contacts) System.Threading.Tasks.Task> GetContactAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific contact by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetContactAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid contactID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific contact by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetContactAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific contact using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetContactAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid contactID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific contact using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetContactAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves attachments for a specific contact in a Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task GetContactAttachmentsAsync (string accessToken, string xeroTenantId, Guid contactID, CancellationToken cancellationToken = default); /// /// Retrieves attachments for a specific contact in a Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> GetContactAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, CancellationToken cancellationToken = default); /// /// Retrieves a specific contact by contact number in a Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Contacts System.Threading.Tasks.Task GetContactByContactNumberAsync (string accessToken, string xeroTenantId, string contactNumber, CancellationToken cancellationToken = default); /// /// Retrieves a specific contact by contact number in a Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Contacts) System.Threading.Tasks.Task> GetContactByContactNumberAsyncWithHttpInfo (string accessToken, string xeroTenantId, string contactNumber, CancellationToken cancellationToken = default); /// /// Retrieves CIS settings for a specific contact in a Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of CISSettings System.Threading.Tasks.Task GetContactCISSettingsAsync (string accessToken, string xeroTenantId, Guid contactID, CancellationToken cancellationToken = default); /// /// Retrieves CIS settings for a specific contact in a Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (CISSettings) System.Threading.Tasks.Task> GetContactCISSettingsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, CancellationToken cancellationToken = default); /// /// Retrieves a specific contact group by using a unique contact group Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ContactGroups System.Threading.Tasks.Task GetContactGroupAsync (string accessToken, string xeroTenantId, Guid contactGroupID, CancellationToken cancellationToken = default); /// /// Retrieves a specific contact group by using a unique contact group Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ContactGroups) System.Threading.Tasks.Task> GetContactGroupAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactGroupID, CancellationToken cancellationToken = default); /// /// Retrieves the contact Id and name of each contact group /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ContactGroups System.Threading.Tasks.Task GetContactGroupsAsync (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves the contact Id and name of each contact group /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ContactGroups) System.Threading.Tasks.Task> GetContactGroupsAsyncWithHttpInfo (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves history records for a specific contact /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task GetContactHistoryAsync (string accessToken, string xeroTenantId, Guid contactID, CancellationToken cancellationToken = default); /// /// Retrieves history records for a specific contact /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> GetContactHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, CancellationToken cancellationToken = default); /// /// Retrieves all contacts in a Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Filter by a comma separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call. (optional) /// e.g. page=1 - Up to 100 contacts will be returned in a single API call. (optional) /// e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response (optional) /// Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. (optional, default to false) /// Search parameter that performs a case-insensitive text search across the Name, FirstName, LastName, ContactNumber and EmailAddress fields. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Contacts System.Threading.Tasks.Task GetContactsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, List iDs = null, int? page = null, bool? includeArchived = null, bool? summaryOnly = null, string searchTerm = null, CancellationToken cancellationToken = default); /// /// Retrieves all contacts in a Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Filter by a comma separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call. (optional) /// e.g. page=1 - Up to 100 contacts will be returned in a single API call. (optional) /// e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response (optional) /// Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. (optional, default to false) /// Search parameter that performs a case-insensitive text search across the Name, FirstName, LastName, ContactNumber and EmailAddress fields. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Contacts) System.Threading.Tasks.Task> GetContactsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, List iDs = null, int? page = null, bool? includeArchived = null, bool? summaryOnly = null, string searchTerm = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific credit note using a unique credit note Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of CreditNotes System.Threading.Tasks.Task GetCreditNoteAsync (string accessToken, string xeroTenantId, Guid creditNoteID, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific credit note using a unique credit note Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (CreditNotes) System.Threading.Tasks.Task> GetCreditNoteAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves credit notes as PDF files /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetCreditNoteAsPdfAsync (string accessToken, string xeroTenantId, Guid creditNoteID, CancellationToken cancellationToken = default); /// /// Retrieves credit notes as PDF files /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetCreditNoteAsPdfAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment on a specific credit note by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetCreditNoteAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid creditNoteID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment on a specific credit note by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetCreditNoteAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific credit note using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetCreditNoteAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid creditNoteID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific credit note using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetCreditNoteAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves attachments for a specific credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task GetCreditNoteAttachmentsAsync (string accessToken, string xeroTenantId, Guid creditNoteID, CancellationToken cancellationToken = default); /// /// Retrieves attachments for a specific credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> GetCreditNoteAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, CancellationToken cancellationToken = default); /// /// Retrieves history records of a specific credit note /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task GetCreditNoteHistoryAsync (string accessToken, string xeroTenantId, Guid creditNoteID, CancellationToken cancellationToken = default); /// /// Retrieves history records of a specific credit note /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> GetCreditNoteHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, CancellationToken cancellationToken = default); /// /// Retrieves any credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. page=1 – Up to 100 credit notes will be returned in a single API call with line items shown for each credit note (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of CreditNotes System.Threading.Tasks.Task GetCreditNotesAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves any credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. page=1 – Up to 100 credit notes will be returned in a single API call with line items shown for each credit note (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (CreditNotes) System.Threading.Tasks.Task> GetCreditNotesAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves currencies for your Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Currencies System.Threading.Tasks.Task GetCurrenciesAsync (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves currencies for your Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Currencies) System.Threading.Tasks.Task> GetCurrenciesAsyncWithHttpInfo (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific employee used in Xero payrun using a unique employee Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Employee /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Employees System.Threading.Tasks.Task GetEmployeeAsync (string accessToken, string xeroTenantId, Guid employeeID, CancellationToken cancellationToken = default); /// /// Retrieves a specific employee used in Xero payrun using a unique employee Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Employee /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Employees) System.Threading.Tasks.Task> GetEmployeeAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid employeeID, CancellationToken cancellationToken = default); /// /// Retrieves employees used in Xero payrun /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Employees System.Threading.Tasks.Task GetEmployeesAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves employees used in Xero payrun /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Employees) System.Threading.Tasks.Task> GetEmployeesAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific expense claim using a unique expense claim Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ExpenseClaim /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ExpenseClaims System.Threading.Tasks.Task GetExpenseClaimAsync (string accessToken, string xeroTenantId, Guid expenseClaimID, CancellationToken cancellationToken = default); /// /// Retrieves a specific expense claim using a unique expense claim Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ExpenseClaim /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ExpenseClaims) System.Threading.Tasks.Task> GetExpenseClaimAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid expenseClaimID, CancellationToken cancellationToken = default); /// /// Retrieves history records of a specific expense claim /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ExpenseClaim /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task GetExpenseClaimHistoryAsync (string accessToken, string xeroTenantId, Guid expenseClaimID, CancellationToken cancellationToken = default); /// /// Retrieves history records of a specific expense claim /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ExpenseClaim /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> GetExpenseClaimHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid expenseClaimID, CancellationToken cancellationToken = default); /// /// Retrieves expense claims /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ExpenseClaims System.Threading.Tasks.Task GetExpenseClaimsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves expense claims /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ExpenseClaims) System.Threading.Tasks.Task> GetExpenseClaimsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific sales invoice or purchase bill using a unique invoice Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Invoices System.Threading.Tasks.Task GetInvoiceAsync (string accessToken, string xeroTenantId, Guid invoiceID, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific sales invoice or purchase bill using a unique invoice Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Invoices) System.Threading.Tasks.Task> GetInvoiceAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves invoices or purchase bills as PDF files /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetInvoiceAsPdfAsync (string accessToken, string xeroTenantId, Guid invoiceID, CancellationToken cancellationToken = default); /// /// Retrieves invoices or purchase bills as PDF files /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetInvoiceAsPdfAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, CancellationToken cancellationToken = default); /// /// Retrieves an attachment from a specific invoice or purchase bill by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetInvoiceAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid invoiceID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves an attachment from a specific invoice or purchase bill by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetInvoiceAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific invoices or purchase bills by using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetInvoiceAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid invoiceID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific invoices or purchase bills by using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetInvoiceAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves attachments for a specific invoice or purchase bill /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task GetInvoiceAttachmentsAsync (string accessToken, string xeroTenantId, Guid invoiceID, CancellationToken cancellationToken = default); /// /// Retrieves attachments for a specific invoice or purchase bill /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> GetInvoiceAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, CancellationToken cancellationToken = default); /// /// Retrieves history records for a specific invoice /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task GetInvoiceHistoryAsync (string accessToken, string xeroTenantId, Guid invoiceID, CancellationToken cancellationToken = default); /// /// Retrieves history records for a specific invoice /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> GetInvoiceHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, CancellationToken cancellationToken = default); /// /// Retrieves invoice reminder settings /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of InvoiceReminders System.Threading.Tasks.Task GetInvoiceRemindersAsync (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default); /// /// Retrieves invoice reminder settings /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (InvoiceReminders) System.Threading.Tasks.Task> GetInvoiceRemindersAsyncWithHttpInfo (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default); /// /// Retrieves sales invoices or purchase bills /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Filter by a comma-separated list of InvoicesIDs. (optional) /// Filter by a comma-separated list of InvoiceNumbers. (optional) /// Filter by a comma-separated list of ContactIDs. (optional) /// Filter by a comma-separated list Statuses. For faster response times we recommend using these explicit parameters instead of passing OR conditions into the Where filter. (optional) /// e.g. page=1 – Up to 100 invoices will be returned in a single API call with line items shown for each invoice (optional) /// e.g. includeArchived=true - Invoices with a status of ARCHIVED will be included in the response (optional) /// When set to true you'll only retrieve Invoices created by your app (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. (optional, default to false) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Invoices System.Threading.Tasks.Task GetInvoicesAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, List iDs = null, List invoiceNumbers = null, List contactIDs = null, List statuses = null, int? page = null, bool? includeArchived = null, bool? createdByMyApp = null, int? unitdp = null, bool? summaryOnly = null, CancellationToken cancellationToken = default); /// /// Retrieves sales invoices or purchase bills /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Filter by a comma-separated list of InvoicesIDs. (optional) /// Filter by a comma-separated list of InvoiceNumbers. (optional) /// Filter by a comma-separated list of ContactIDs. (optional) /// Filter by a comma-separated list Statuses. For faster response times we recommend using these explicit parameters instead of passing OR conditions into the Where filter. (optional) /// e.g. page=1 – Up to 100 invoices will be returned in a single API call with line items shown for each invoice (optional) /// e.g. includeArchived=true - Invoices with a status of ARCHIVED will be included in the response (optional) /// When set to true you'll only retrieve Invoices created by your app (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. (optional, default to false) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Invoices) System.Threading.Tasks.Task> GetInvoicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, List iDs = null, List invoiceNumbers = null, List contactIDs = null, List statuses = null, int? page = null, bool? includeArchived = null, bool? createdByMyApp = null, int? unitdp = null, bool? summaryOnly = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific item using a unique item Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Items System.Threading.Tasks.Task GetItemAsync (string accessToken, string xeroTenantId, Guid itemID, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific item using a unique item Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Items) System.Threading.Tasks.Task> GetItemAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid itemID, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves history for a specific item /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task GetItemHistoryAsync (string accessToken, string xeroTenantId, Guid itemID, CancellationToken cancellationToken = default); /// /// Retrieves history for a specific item /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> GetItemHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid itemID, CancellationToken cancellationToken = default); /// /// Retrieves items /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Items System.Threading.Tasks.Task GetItemsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves items /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Items) System.Threading.Tasks.Task> GetItemsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific journal using a unique journal Id. /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Journal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Journals System.Threading.Tasks.Task GetJournalAsync (string accessToken, string xeroTenantId, Guid journalID, CancellationToken cancellationToken = default); /// /// Retrieves a specific journal using a unique journal Id. /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Journal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Journals) System.Threading.Tasks.Task> GetJournalAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid journalID, CancellationToken cancellationToken = default); /// /// Retrieves a specific journal using a unique journal number. /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Number of a Journal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Journals System.Threading.Tasks.Task GetJournalByNumberAsync (string accessToken, string xeroTenantId, int journalNumber, CancellationToken cancellationToken = default); /// /// Retrieves a specific journal using a unique journal number. /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Number of a Journal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Journals) System.Threading.Tasks.Task> GetJournalByNumberAsyncWithHttpInfo (string accessToken, string xeroTenantId, int journalNumber, CancellationToken cancellationToken = default); /// /// Retrieves journals /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Offset by a specified journal number. e.g. journals with a JournalNumber greater than the offset will be returned (optional) /// Filter to retrieve journals on a cash basis. Journals are returned on an accrual basis by default. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Journals System.Threading.Tasks.Task GetJournalsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, int? offset = null, bool? paymentsOnly = null, CancellationToken cancellationToken = default); /// /// Retrieves journals /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Offset by a specified journal number. e.g. journals with a JournalNumber greater than the offset will be returned (optional) /// Filter to retrieve journals on a cash basis. Journals are returned on an accrual basis by default. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Journals) System.Threading.Tasks.Task> GetJournalsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, int? offset = null, bool? paymentsOnly = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific linked transaction (billable expenses) using a unique linked transaction Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a LinkedTransaction /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of LinkedTransactions System.Threading.Tasks.Task GetLinkedTransactionAsync (string accessToken, string xeroTenantId, Guid linkedTransactionID, CancellationToken cancellationToken = default); /// /// Retrieves a specific linked transaction (billable expenses) using a unique linked transaction Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a LinkedTransaction /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (LinkedTransactions) System.Threading.Tasks.Task> GetLinkedTransactionAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid linkedTransactionID, CancellationToken cancellationToken = default); /// /// Retrieves linked transactions (billable expenses) /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Up to 100 linked transactions will be returned in a single API call. Use the page parameter to specify the page to be returned e.g. page=1. (optional) /// The Xero identifier for an Linked Transaction (optional) /// Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice (optional) /// Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer. (optional) /// Filter by the combination of ContactID and Status. Get the linked transactions associated to a customer and with a status (optional) /// Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of LinkedTransactions System.Threading.Tasks.Task GetLinkedTransactionsAsync (string accessToken, string xeroTenantId, int? page = null, Guid? linkedTransactionID = null, Guid? sourceTransactionID = null, Guid? contactID = null, string status = null, Guid? targetTransactionID = null, CancellationToken cancellationToken = default); /// /// Retrieves linked transactions (billable expenses) /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Up to 100 linked transactions will be returned in a single API call. Use the page parameter to specify the page to be returned e.g. page=1. (optional) /// The Xero identifier for an Linked Transaction (optional) /// Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice (optional) /// Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer. (optional) /// Filter by the combination of ContactID and Status. Get the linked transactions associated to a customer and with a status (optional) /// Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (LinkedTransactions) System.Threading.Tasks.Task> GetLinkedTransactionsAsyncWithHttpInfo (string accessToken, string xeroTenantId, int? page = null, Guid? linkedTransactionID = null, Guid? sourceTransactionID = null, Guid? contactID = null, string status = null, Guid? targetTransactionID = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific manual journal /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ManualJournals System.Threading.Tasks.Task GetManualJournalAsync (string accessToken, string xeroTenantId, Guid manualJournalID, CancellationToken cancellationToken = default); /// /// Retrieves a specific manual journal /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ManualJournals) System.Threading.Tasks.Task> GetManualJournalAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific manual journal by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetManualJournalAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid manualJournalID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific manual journal by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetManualJournalAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Allows you to retrieve a specific attachment from a specific manual journal using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetManualJournalAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid manualJournalID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Allows you to retrieve a specific attachment from a specific manual journal using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetManualJournalAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves attachment for a specific manual journal /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task GetManualJournalAttachmentsAsync (string accessToken, string xeroTenantId, Guid manualJournalID, CancellationToken cancellationToken = default); /// /// Retrieves attachment for a specific manual journal /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> GetManualJournalAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, CancellationToken cancellationToken = default); /// /// Retrieves manual journals /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. page=1 – Up to 100 manual journals will be returned in a single API call with line items shown for each overpayment (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ManualJournals System.Threading.Tasks.Task GetManualJournalsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, CancellationToken cancellationToken = default); /// /// Retrieves manual journals /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. page=1 – Up to 100 manual journals will be returned in a single API call with line items shown for each overpayment (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ManualJournals) System.Threading.Tasks.Task> GetManualJournalsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, CancellationToken cancellationToken = default); /// /// Retrieves history for a specific manual journal /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task GetManualJournalsHistoryAsync (string accessToken, string xeroTenantId, Guid manualJournalID, CancellationToken cancellationToken = default); /// /// Retrieves history for a specific manual journal /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> GetManualJournalsHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, CancellationToken cancellationToken = default); /// /// Retrieves a URL to an online invoice /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of OnlineInvoices System.Threading.Tasks.Task GetOnlineInvoiceAsync (string accessToken, string xeroTenantId, Guid invoiceID, CancellationToken cancellationToken = default); /// /// Retrieves a URL to an online invoice /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (OnlineInvoices) System.Threading.Tasks.Task> GetOnlineInvoiceAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, CancellationToken cancellationToken = default); /// /// Retrieves a list of the key actions your app has permission to perform in the connected Xero organisation. /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Actions System.Threading.Tasks.Task GetOrganisationActionsAsync (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default); /// /// Retrieves a list of the key actions your app has permission to perform in the connected Xero organisation. /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Actions) System.Threading.Tasks.Task> GetOrganisationActionsAsyncWithHttpInfo (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default); /// /// Retrieves the CIS settings for the Xero organistaion. /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The unique Xero identifier for an organisation /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of CISOrgSettings System.Threading.Tasks.Task GetOrganisationCISSettingsAsync (string accessToken, string xeroTenantId, Guid organisationID, CancellationToken cancellationToken = default); /// /// Retrieves the CIS settings for the Xero organistaion. /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The unique Xero identifier for an organisation /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (CISOrgSettings) System.Threading.Tasks.Task> GetOrganisationCISSettingsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid organisationID, CancellationToken cancellationToken = default); /// /// Retrieves Xero organisation details /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Organisations System.Threading.Tasks.Task GetOrganisationsAsync (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default); /// /// Retrieves Xero organisation details /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Organisations) System.Threading.Tasks.Task> GetOrganisationsAsyncWithHttpInfo (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default); /// /// Retrieves a specific overpayment using a unique overpayment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Overpayments System.Threading.Tasks.Task GetOverpaymentAsync (string accessToken, string xeroTenantId, Guid overpaymentID, CancellationToken cancellationToken = default); /// /// Retrieves a specific overpayment using a unique overpayment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Overpayments) System.Threading.Tasks.Task> GetOverpaymentAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid overpaymentID, CancellationToken cancellationToken = default); /// /// Retrieves history records of a specific overpayment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task GetOverpaymentHistoryAsync (string accessToken, string xeroTenantId, Guid overpaymentID, CancellationToken cancellationToken = default); /// /// Retrieves history records of a specific overpayment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> GetOverpaymentHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid overpaymentID, CancellationToken cancellationToken = default); /// /// Retrieves overpayments /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Overpayments System.Threading.Tasks.Task GetOverpaymentsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves overpayments /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Overpayments) System.Threading.Tasks.Task> GetOverpaymentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific payment for invoices and credit notes using a unique payment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Payment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Payments System.Threading.Tasks.Task GetPaymentAsync (string accessToken, string xeroTenantId, Guid paymentID, CancellationToken cancellationToken = default); /// /// Retrieves a specific payment for invoices and credit notes using a unique payment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Payment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Payments) System.Threading.Tasks.Task> GetPaymentAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid paymentID, CancellationToken cancellationToken = default); /// /// Retrieves history records of a specific payment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Payment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task GetPaymentHistoryAsync (string accessToken, string xeroTenantId, Guid paymentID, CancellationToken cancellationToken = default); /// /// Retrieves history records of a specific payment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Payment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> GetPaymentHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid paymentID, CancellationToken cancellationToken = default); /// /// Retrieves payment services /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PaymentServices System.Threading.Tasks.Task GetPaymentServicesAsync (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default); /// /// Retrieves payment services /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PaymentServices) System.Threading.Tasks.Task> GetPaymentServicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default); /// /// Retrieves payments for invoices and credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Up to 100 payments will be returned in a single API call (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Payments System.Threading.Tasks.Task GetPaymentsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, CancellationToken cancellationToken = default); /// /// Retrieves payments for invoices and credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Up to 100 payments will be returned in a single API call (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Payments) System.Threading.Tasks.Task> GetPaymentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, CancellationToken cancellationToken = default); /// /// Allows you to retrieve a specified prepayments /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Prepayments System.Threading.Tasks.Task GetPrepaymentAsync (string accessToken, string xeroTenantId, Guid prepaymentID, CancellationToken cancellationToken = default); /// /// Allows you to retrieve a specified prepayments /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Prepayments) System.Threading.Tasks.Task> GetPrepaymentAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid prepaymentID, CancellationToken cancellationToken = default); /// /// Retrieves history record for a specific prepayment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task GetPrepaymentHistoryAsync (string accessToken, string xeroTenantId, Guid prepaymentID, CancellationToken cancellationToken = default); /// /// Retrieves history record for a specific prepayment /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> GetPrepaymentHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid prepaymentID, CancellationToken cancellationToken = default); /// /// Retrieves prepayments /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Prepayments System.Threading.Tasks.Task GetPrepaymentsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves prepayments /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Prepayments) System.Threading.Tasks.Task> GetPrepaymentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific purchase order using a unique purchase order Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PurchaseOrders System.Threading.Tasks.Task GetPurchaseOrderAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, CancellationToken cancellationToken = default); /// /// Retrieves a specific purchase order using a unique purchase order Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PurchaseOrders) System.Threading.Tasks.Task> GetPurchaseOrderAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, CancellationToken cancellationToken = default); /// /// Retrieves specific purchase order as PDF files using a unique purchase order Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetPurchaseOrderAsPdfAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, CancellationToken cancellationToken = default); /// /// Retrieves specific purchase order as PDF files using a unique purchase order Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetPurchaseOrderAsPdfAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment for a specific purchase order by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetPurchaseOrderAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment for a specific purchase order by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetPurchaseOrderAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves specific attachment for a specific purchase order using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetPurchaseOrderAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves specific attachment for a specific purchase order using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetPurchaseOrderAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves attachments for a specific purchase order /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task GetPurchaseOrderAttachmentsAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, CancellationToken cancellationToken = default); /// /// Retrieves attachments for a specific purchase order /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> GetPurchaseOrderAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, CancellationToken cancellationToken = default); /// /// Retrieves a specific purchase order using purchase order number /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PurchaseOrder /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PurchaseOrders System.Threading.Tasks.Task GetPurchaseOrderByNumberAsync (string accessToken, string xeroTenantId, string purchaseOrderNumber, CancellationToken cancellationToken = default); /// /// Retrieves a specific purchase order using purchase order number /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PurchaseOrder /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PurchaseOrders) System.Threading.Tasks.Task> GetPurchaseOrderByNumberAsyncWithHttpInfo (string accessToken, string xeroTenantId, string purchaseOrderNumber, CancellationToken cancellationToken = default); /// /// Retrieves history for a specific purchase order /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task GetPurchaseOrderHistoryAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, CancellationToken cancellationToken = default); /// /// Retrieves history for a specific purchase order /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> GetPurchaseOrderHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, CancellationToken cancellationToken = default); /// /// Retrieves purchase orders /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by purchase order status (optional) /// Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) /// Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) /// Order by an any element (optional) /// To specify a page, append the page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PurchaseOrders System.Threading.Tasks.Task GetPurchaseOrdersAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string status = null, string dateFrom = null, string dateTo = null, string order = null, int? page = null, CancellationToken cancellationToken = default); /// /// Retrieves purchase orders /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by purchase order status (optional) /// Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) /// Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) /// Order by an any element (optional) /// To specify a page, append the page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PurchaseOrders) System.Threading.Tasks.Task> GetPurchaseOrdersAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string status = null, string dateFrom = null, string dateTo = null, string order = null, int? page = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific quote using a unique quote Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Quotes System.Threading.Tasks.Task GetQuoteAsync (string accessToken, string xeroTenantId, Guid quoteID, CancellationToken cancellationToken = default); /// /// Retrieves a specific quote using a unique quote Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Quotes) System.Threading.Tasks.Task> GetQuoteAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, CancellationToken cancellationToken = default); /// /// Retrieves a specific quote as a PDF file using a unique quote Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetQuoteAsPdfAsync (string accessToken, string xeroTenantId, Guid quoteID, CancellationToken cancellationToken = default); /// /// Retrieves a specific quote as a PDF file using a unique quote Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetQuoteAsPdfAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific quote by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetQuoteAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid quoteID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific quote by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetQuoteAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific quote using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetQuoteAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid quoteID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific quote using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetQuoteAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves attachments for a specific quote /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task GetQuoteAttachmentsAsync (string accessToken, string xeroTenantId, Guid quoteID, CancellationToken cancellationToken = default); /// /// Retrieves attachments for a specific quote /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> GetQuoteAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, CancellationToken cancellationToken = default); /// /// Retrieves history records of a specific quote /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task GetQuoteHistoryAsync (string accessToken, string xeroTenantId, Guid quoteID, CancellationToken cancellationToken = default); /// /// Retrieves history records of a specific quote /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> GetQuoteHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, CancellationToken cancellationToken = default); /// /// Retrieves sales quotes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter for quotes after a particular date (optional) /// Filter for quotes before a particular date (optional) /// Filter for quotes expiring after a particular date (optional) /// Filter for quotes before a particular date (optional) /// Filter for quotes belonging to a particular contact (optional) /// Filter for quotes of a particular Status (optional) /// e.g. page=1 – Up to 100 Quotes will be returned in a single API call with line items shown for each quote (optional) /// Order by an any element (optional) /// Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001) (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Quotes System.Threading.Tasks.Task GetQuotesAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, DateTime? dateFrom = null, DateTime? dateTo = null, DateTime? expiryDateFrom = null, DateTime? expiryDateTo = null, Guid? contactID = null, string status = null, int? page = null, string order = null, string quoteNumber = null, CancellationToken cancellationToken = default); /// /// Retrieves sales quotes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter for quotes after a particular date (optional) /// Filter for quotes before a particular date (optional) /// Filter for quotes expiring after a particular date (optional) /// Filter for quotes before a particular date (optional) /// Filter for quotes belonging to a particular contact (optional) /// Filter for quotes of a particular Status (optional) /// e.g. page=1 – Up to 100 Quotes will be returned in a single API call with line items shown for each quote (optional) /// Order by an any element (optional) /// Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001) (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Quotes) System.Threading.Tasks.Task> GetQuotesAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, DateTime? dateFrom = null, DateTime? dateTo = null, DateTime? expiryDateFrom = null, DateTime? expiryDateTo = null, Guid? contactID = null, string status = null, int? page = null, string order = null, string quoteNumber = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific draft expense claim receipt by using a unique receipt Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Receipts System.Threading.Tasks.Task GetReceiptAsync (string accessToken, string xeroTenantId, Guid receiptID, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific draft expense claim receipt by using a unique receipt Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Receipts) System.Threading.Tasks.Task> GetReceiptAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific expense claim receipts by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetReceiptAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid receiptID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific expense claim receipts by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetReceiptAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachments from a specific expense claim receipts by using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetReceiptAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid receiptID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachments from a specific expense claim receipts by using a unique attachment Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetReceiptAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves attachments for a specific expense claim receipt /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task GetReceiptAttachmentsAsync (string accessToken, string xeroTenantId, Guid receiptID, CancellationToken cancellationToken = default); /// /// Retrieves attachments for a specific expense claim receipt /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> GetReceiptAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, CancellationToken cancellationToken = default); /// /// Retrieves a history record for a specific receipt /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task GetReceiptHistoryAsync (string accessToken, string xeroTenantId, Guid receiptID, CancellationToken cancellationToken = default); /// /// Retrieves a history record for a specific receipt /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> GetReceiptHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, CancellationToken cancellationToken = default); /// /// Retrieves draft expense claim receipts for any user /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Receipts System.Threading.Tasks.Task GetReceiptsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves draft expense claim receipts for any user /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Receipts) System.Threading.Tasks.Task> GetReceiptsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? unitdp = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific repeating invoice by using a unique repeating invoice Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of RepeatingInvoices System.Threading.Tasks.Task GetRepeatingInvoiceAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, CancellationToken cancellationToken = default); /// /// Retrieves a specific repeating invoice by using a unique repeating invoice Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (RepeatingInvoices) System.Threading.Tasks.Task> GetRepeatingInvoiceAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific repeating invoices by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetRepeatingInvoiceAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific repeating invoices by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetRepeatingInvoiceAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, string fileName, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific repeating invoice /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream System.Threading.Tasks.Task GetRepeatingInvoiceAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves a specific attachment from a specific repeating invoice /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) System.Threading.Tasks.Task> GetRepeatingInvoiceAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default); /// /// Retrieves attachments from a specific repeating invoice /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task GetRepeatingInvoiceAttachmentsAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, CancellationToken cancellationToken = default); /// /// Retrieves attachments from a specific repeating invoice /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> GetRepeatingInvoiceAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, CancellationToken cancellationToken = default); /// /// Retrieves history record for a specific repeating invoice /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords System.Threading.Tasks.Task GetRepeatingInvoiceHistoryAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, CancellationToken cancellationToken = default); /// /// Retrieves history record for a specific repeating invoice /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) System.Threading.Tasks.Task> GetRepeatingInvoiceHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, CancellationToken cancellationToken = default); /// /// Retrieves repeating invoices /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of RepeatingInvoices System.Threading.Tasks.Task GetRepeatingInvoicesAsync (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves repeating invoices /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (RepeatingInvoices) System.Threading.Tasks.Task> GetRepeatingInvoicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves report for aged payables by contact /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// The date of the Aged Payables By Contact report (optional) /// filter by the from date of the report e.g. 2021-02-01 (optional) /// filter by the to date of the report e.g. 2021-02-28 (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows System.Threading.Tasks.Task GetReportAgedPayablesByContactAsync (string accessToken, string xeroTenantId, Guid contactId, DateTime? date = null, DateTime? fromDate = null, DateTime? toDate = null, CancellationToken cancellationToken = default); /// /// Retrieves report for aged payables by contact /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// The date of the Aged Payables By Contact report (optional) /// filter by the from date of the report e.g. 2021-02-01 (optional) /// filter by the to date of the report e.g. 2021-02-28 (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) System.Threading.Tasks.Task> GetReportAgedPayablesByContactAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactId, DateTime? date = null, DateTime? fromDate = null, DateTime? toDate = null, CancellationToken cancellationToken = default); /// /// Retrieves report for aged receivables by contact /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// The date of the Aged Receivables By Contact report (optional) /// filter by the from date of the report e.g. 2021-02-01 (optional) /// filter by the to date of the report e.g. 2021-02-28 (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows System.Threading.Tasks.Task GetReportAgedReceivablesByContactAsync (string accessToken, string xeroTenantId, Guid contactId, DateTime? date = null, DateTime? fromDate = null, DateTime? toDate = null, CancellationToken cancellationToken = default); /// /// Retrieves report for aged receivables by contact /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// The date of the Aged Receivables By Contact report (optional) /// filter by the from date of the report e.g. 2021-02-01 (optional) /// filter by the to date of the report e.g. 2021-02-28 (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) System.Threading.Tasks.Task> GetReportAgedReceivablesByContactAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactId, DateTime? date = null, DateTime? fromDate = null, DateTime? toDate = null, CancellationToken cancellationToken = default); /// /// Retrieves report for balancesheet /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The date of the Balance Sheet report (optional) /// The number of periods for the Balance Sheet report (optional) /// The period size to compare to (MONTH, QUARTER, YEAR) (optional) /// The tracking option 1 for the Balance Sheet report (optional) /// The tracking option 2 for the Balance Sheet report (optional) /// The standard layout boolean for the Balance Sheet report (optional) /// return a cash basis for the Balance Sheet report (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows System.Threading.Tasks.Task GetReportBalanceSheetAsync (string accessToken, string xeroTenantId, DateTime? date = null, int? periods = null, string timeframe = null, string trackingOptionID1 = null, string trackingOptionID2 = null, bool? standardLayout = null, bool? paymentsOnly = null, CancellationToken cancellationToken = default); /// /// Retrieves report for balancesheet /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The date of the Balance Sheet report (optional) /// The number of periods for the Balance Sheet report (optional) /// The period size to compare to (MONTH, QUARTER, YEAR) (optional) /// The tracking option 1 for the Balance Sheet report (optional) /// The tracking option 2 for the Balance Sheet report (optional) /// The standard layout boolean for the Balance Sheet report (optional) /// return a cash basis for the Balance Sheet report (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) System.Threading.Tasks.Task> GetReportBalanceSheetAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? date = null, int? periods = null, string timeframe = null, string trackingOptionID1 = null, string trackingOptionID2 = null, bool? standardLayout = null, bool? paymentsOnly = null, CancellationToken cancellationToken = default); /// /// Retrieves report for bank summary /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// filter by the from date of the report e.g. 2021-02-01 (optional) /// filter by the to date of the report e.g. 2021-02-28 (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows System.Threading.Tasks.Task GetReportBankSummaryAsync (string accessToken, string xeroTenantId, DateTime? fromDate = null, DateTime? toDate = null, CancellationToken cancellationToken = default); /// /// Retrieves report for bank summary /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// filter by the from date of the report e.g. 2021-02-01 (optional) /// filter by the to date of the report e.g. 2021-02-28 (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) System.Threading.Tasks.Task> GetReportBankSummaryAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? fromDate = null, DateTime? toDate = null, CancellationToken cancellationToken = default); /// /// Retrieves report for budget summary /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The date for the Bank Summary report e.g. 2018-03-31 (optional) /// The number of periods to compare (integer between 1 and 12) (optional) /// The period size to compare to (1=month, 3=quarter, 12=year) (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows System.Threading.Tasks.Task GetReportBudgetSummaryAsync (string accessToken, string xeroTenantId, DateTime? date = null, int? periods = null, int? timeframe = null, CancellationToken cancellationToken = default); /// /// Retrieves report for budget summary /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The date for the Bank Summary report e.g. 2018-03-31 (optional) /// The number of periods to compare (integer between 1 and 12) (optional) /// The period size to compare to (1=month, 3=quarter, 12=year) (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) System.Threading.Tasks.Task> GetReportBudgetSummaryAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? date = null, int? periods = null, int? timeframe = null, CancellationToken cancellationToken = default); /// /// Retrieves report for executive summary /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The date for the Bank Summary report e.g. 2018-03-31 (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows System.Threading.Tasks.Task GetReportExecutiveSummaryAsync (string accessToken, string xeroTenantId, DateTime? date = null, CancellationToken cancellationToken = default); /// /// Retrieves report for executive summary /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The date for the Bank Summary report e.g. 2018-03-31 (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) System.Threading.Tasks.Task> GetReportExecutiveSummaryAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? date = null, CancellationToken cancellationToken = default); /// /// Retrieves a specific report using a unique ReportID /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Report /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows System.Threading.Tasks.Task GetReportFromIdAsync (string accessToken, string xeroTenantId, string reportID, CancellationToken cancellationToken = default); /// /// Retrieves a specific report using a unique ReportID /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Report /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) System.Threading.Tasks.Task> GetReportFromIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, string reportID, CancellationToken cancellationToken = default); /// /// Retrieves report for profit and loss /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// filter by the from date of the report e.g. 2021-02-01 (optional) /// filter by the to date of the report e.g. 2021-02-28 (optional) /// The number of periods to compare (integer between 1 and 12) (optional) /// The period size to compare to (MONTH, QUARTER, YEAR) (optional) /// The trackingCategory 1 for the ProfitAndLoss report (optional) /// The trackingCategory 2 for the ProfitAndLoss report (optional) /// The tracking option 1 for the ProfitAndLoss report (optional) /// The tracking option 2 for the ProfitAndLoss report (optional) /// Return the standard layout for the ProfitAndLoss report (optional) /// Return cash only basis for the ProfitAndLoss report (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows System.Threading.Tasks.Task GetReportProfitAndLossAsync (string accessToken, string xeroTenantId, DateTime? fromDate = null, DateTime? toDate = null, int? periods = null, string timeframe = null, string trackingCategoryID = null, string trackingCategoryID2 = null, string trackingOptionID = null, string trackingOptionID2 = null, bool? standardLayout = null, bool? paymentsOnly = null, CancellationToken cancellationToken = default); /// /// Retrieves report for profit and loss /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// filter by the from date of the report e.g. 2021-02-01 (optional) /// filter by the to date of the report e.g. 2021-02-28 (optional) /// The number of periods to compare (integer between 1 and 12) (optional) /// The period size to compare to (MONTH, QUARTER, YEAR) (optional) /// The trackingCategory 1 for the ProfitAndLoss report (optional) /// The trackingCategory 2 for the ProfitAndLoss report (optional) /// The tracking option 1 for the ProfitAndLoss report (optional) /// The tracking option 2 for the ProfitAndLoss report (optional) /// Return the standard layout for the ProfitAndLoss report (optional) /// Return cash only basis for the ProfitAndLoss report (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) System.Threading.Tasks.Task> GetReportProfitAndLossAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? fromDate = null, DateTime? toDate = null, int? periods = null, string timeframe = null, string trackingCategoryID = null, string trackingCategoryID2 = null, string trackingOptionID = null, string trackingOptionID2 = null, bool? standardLayout = null, bool? paymentsOnly = null, CancellationToken cancellationToken = default); /// /// Retrieve reports for 1099 /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The year of the 1099 report (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Reports System.Threading.Tasks.Task GetReportTenNinetyNineAsync (string accessToken, string xeroTenantId, string reportYear = null, CancellationToken cancellationToken = default); /// /// Retrieve reports for 1099 /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The year of the 1099 report (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Reports) System.Threading.Tasks.Task> GetReportTenNinetyNineAsyncWithHttpInfo (string accessToken, string xeroTenantId, string reportYear = null, CancellationToken cancellationToken = default); /// /// Retrieves report for trial balance /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The date for the Trial Balance report e.g. 2018-03-31 (optional) /// Return cash only basis for the Trial Balance report (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows System.Threading.Tasks.Task GetReportTrialBalanceAsync (string accessToken, string xeroTenantId, DateTime? date = null, bool? paymentsOnly = null, CancellationToken cancellationToken = default); /// /// Retrieves report for trial balance /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The date for the Trial Balance report e.g. 2018-03-31 (optional) /// Return cash only basis for the Trial Balance report (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) System.Threading.Tasks.Task> GetReportTrialBalanceAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? date = null, bool? paymentsOnly = null, CancellationToken cancellationToken = default); /// /// Retrieves a list of the organistaions unique reports that require a uuid to fetch /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows System.Threading.Tasks.Task GetReportsListAsync (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default); /// /// Retrieves a list of the organistaions unique reports that require a uuid to fetch /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) System.Threading.Tasks.Task> GetReportsListAsyncWithHttpInfo (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default); /// /// Retrieves a specific tax rate according to given TaxType code /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// A valid TaxType code /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TaxRates System.Threading.Tasks.Task GetTaxRateByTaxTypeAsync (string accessToken, string xeroTenantId, string taxType, CancellationToken cancellationToken = default); /// /// Retrieves a specific tax rate according to given TaxType code /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// A valid TaxType code /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TaxRates) System.Threading.Tasks.Task> GetTaxRateByTaxTypeAsyncWithHttpInfo (string accessToken, string xeroTenantId, string taxType, CancellationToken cancellationToken = default); /// /// Retrieves tax rates /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TaxRates System.Threading.Tasks.Task GetTaxRatesAsync (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves tax rates /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TaxRates) System.Threading.Tasks.Task> GetTaxRatesAsyncWithHttpInfo (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves tracking categories and options /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. includeArchived=true - Categories and options with a status of ARCHIVED will be included in the response (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TrackingCategories System.Threading.Tasks.Task GetTrackingCategoriesAsync (string accessToken, string xeroTenantId, string where = null, string order = null, bool? includeArchived = null, CancellationToken cancellationToken = default); /// /// Retrieves tracking categories and options /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. includeArchived=true - Categories and options with a status of ARCHIVED will be included in the response (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TrackingCategories) System.Threading.Tasks.Task> GetTrackingCategoriesAsyncWithHttpInfo (string accessToken, string xeroTenantId, string where = null, string order = null, bool? includeArchived = null, CancellationToken cancellationToken = default); /// /// Retrieves specific tracking categories and options using a unique tracking category Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TrackingCategories System.Threading.Tasks.Task GetTrackingCategoryAsync (string accessToken, string xeroTenantId, Guid trackingCategoryID, CancellationToken cancellationToken = default); /// /// Retrieves specific tracking categories and options using a unique tracking category Id /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TrackingCategories) System.Threading.Tasks.Task> GetTrackingCategoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid trackingCategoryID, CancellationToken cancellationToken = default); /// /// Retrieves a specific user /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a User /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Users System.Threading.Tasks.Task GetUserAsync (string accessToken, string xeroTenantId, Guid userID, CancellationToken cancellationToken = default); /// /// Retrieves a specific user /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a User /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Users) System.Threading.Tasks.Task> GetUserAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid userID, CancellationToken cancellationToken = default); /// /// Retrieves users /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Users System.Threading.Tasks.Task GetUsersAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Retrieves users /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Users) System.Threading.Tasks.Task> GetUsersAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default); /// /// Sets the chart of accounts, the conversion date and conversion balances /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Object including an accounts array, a conversion balances array and a conversion date object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ImportSummaryObject System.Threading.Tasks.Task PostSetupAsync (string accessToken, string xeroTenantId, Setup setup, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Sets the chart of accounts, the conversion date and conversion balances /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Object including an accounts array, a conversion balances array and a conversion date object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ImportSummaryObject) System.Threading.Tasks.Task> PostSetupAsyncWithHttpInfo (string accessToken, string xeroTenantId, Setup setup, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a chart of accounts /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Request of type Accounts array with one Account /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Accounts System.Threading.Tasks.Task UpdateAccountAsync (string accessToken, string xeroTenantId, Guid accountID, Accounts accounts, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a chart of accounts /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Request of type Accounts array with one Account /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Accounts) System.Threading.Tasks.Task> UpdateAccountAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid accountID, Accounts accounts, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates attachment on a specific account by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task UpdateAccountAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid accountID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates attachment on a specific account by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> UpdateAccountAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid accountID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a single spent or received money transaction /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BankTransactions System.Threading.Tasks.Task UpdateBankTransactionAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, BankTransactions bankTransactions, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a single spent or received money transaction /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BankTransactions) System.Threading.Tasks.Task> UpdateBankTransactionAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, BankTransactions bankTransactions, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific attachment from a specific bank transaction by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task UpdateBankTransactionAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific attachment from a specific bank transaction by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> UpdateBankTransactionAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task UpdateBankTransferAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid bankTransferID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> UpdateBankTransferAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransferID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific contact in a Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// an array of Contacts containing single Contact object with properties to update /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Contacts System.Threading.Tasks.Task UpdateContactAsync (string accessToken, string xeroTenantId, Guid contactID, Contacts contacts, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific contact in a Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// an array of Contacts containing single Contact object with properties to update /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Contacts) System.Threading.Tasks.Task> UpdateContactAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, Contacts contacts, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task UpdateContactAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid contactID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> UpdateContactAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific contact group /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// an array of Contact groups with Name of specific group to update /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ContactGroups System.Threading.Tasks.Task UpdateContactGroupAsync (string accessToken, string xeroTenantId, Guid contactGroupID, ContactGroups contactGroups, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific contact group /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// an array of Contact groups with Name of specific group to update /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ContactGroups) System.Threading.Tasks.Task> UpdateContactGroupAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactGroupID, ContactGroups contactGroups, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific credit note /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// an array of Credit Notes containing credit note details to update /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of CreditNotes System.Threading.Tasks.Task UpdateCreditNoteAsync (string accessToken, string xeroTenantId, Guid creditNoteID, CreditNotes creditNotes, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific credit note /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// an array of Credit Notes containing credit note details to update /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (CreditNotes) System.Threading.Tasks.Task> UpdateCreditNoteAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, CreditNotes creditNotes, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates attachments on a specific credit note by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task UpdateCreditNoteAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid creditNoteID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates attachments on a specific credit note by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> UpdateCreditNoteAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific expense claims /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ExpenseClaim /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ExpenseClaims System.Threading.Tasks.Task UpdateExpenseClaimAsync (string accessToken, string xeroTenantId, Guid expenseClaimID, ExpenseClaims expenseClaims, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific expense claims /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ExpenseClaim /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ExpenseClaims) System.Threading.Tasks.Task> UpdateExpenseClaimAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid expenseClaimID, ExpenseClaims expenseClaims, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific sales invoices or purchase bills /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Invoices System.Threading.Tasks.Task UpdateInvoiceAsync (string accessToken, string xeroTenantId, Guid invoiceID, Invoices invoices, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific sales invoices or purchase bills /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Invoices) System.Threading.Tasks.Task> UpdateInvoiceAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, Invoices invoices, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates an attachment from a specific invoices or purchase bill by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task UpdateInvoiceAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid invoiceID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates an attachment from a specific invoices or purchase bill by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> UpdateInvoiceAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific item /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Items System.Threading.Tasks.Task UpdateItemAsync (string accessToken, string xeroTenantId, Guid itemID, Items items, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific item /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Items) System.Threading.Tasks.Task> UpdateItemAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid itemID, Items items, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific linked transactions (billable expenses) /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a LinkedTransaction /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of LinkedTransactions System.Threading.Tasks.Task UpdateLinkedTransactionAsync (string accessToken, string xeroTenantId, Guid linkedTransactionID, LinkedTransactions linkedTransactions, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific linked transactions (billable expenses) /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a LinkedTransaction /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (LinkedTransactions) System.Threading.Tasks.Task> UpdateLinkedTransactionAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid linkedTransactionID, LinkedTransactions linkedTransactions, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific manual journal /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ManualJournals System.Threading.Tasks.Task UpdateManualJournalAsync (string accessToken, string xeroTenantId, Guid manualJournalID, ManualJournals manualJournals, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific manual journal /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ManualJournals) System.Threading.Tasks.Task> UpdateManualJournalAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, ManualJournals manualJournals, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific attachment from a specific manual journal by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task UpdateManualJournalAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid manualJournalID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific attachment from a specific manual journal by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> UpdateManualJournalAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates or creates one or more spent or received money transaction /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BankTransactions System.Threading.Tasks.Task UpdateOrCreateBankTransactionsAsync (string accessToken, string xeroTenantId, BankTransactions bankTransactions, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates or creates one or more spent or received money transaction /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BankTransactions) System.Threading.Tasks.Task> UpdateOrCreateBankTransactionsAsyncWithHttpInfo (string accessToken, string xeroTenantId, BankTransactions bankTransactions, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates or creates one or more contacts in a Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Contacts System.Threading.Tasks.Task UpdateOrCreateContactsAsync (string accessToken, string xeroTenantId, Contacts contacts, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates or creates one or more contacts in a Xero organisation /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Contacts) System.Threading.Tasks.Task> UpdateOrCreateContactsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Contacts contacts, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates or creates one or more credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// an array of Credit Notes with a single CreditNote object. /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of CreditNotes System.Threading.Tasks.Task UpdateOrCreateCreditNotesAsync (string accessToken, string xeroTenantId, CreditNotes creditNotes, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates or creates one or more credit notes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// an array of Credit Notes with a single CreditNote object. /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (CreditNotes) System.Threading.Tasks.Task> UpdateOrCreateCreditNotesAsyncWithHttpInfo (string accessToken, string xeroTenantId, CreditNotes creditNotes, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a single new employees used in Xero payrun /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Employees with array of Employee object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Employees System.Threading.Tasks.Task UpdateOrCreateEmployeesAsync (string accessToken, string xeroTenantId, Employees employees, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates a single new employees used in Xero payrun /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Employees with array of Employee object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Employees) System.Threading.Tasks.Task> UpdateOrCreateEmployeesAsyncWithHttpInfo (string accessToken, string xeroTenantId, Employees employees, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates or creates one or more sales invoices or purchase bills /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Invoices System.Threading.Tasks.Task UpdateOrCreateInvoicesAsync (string accessToken, string xeroTenantId, Invoices invoices, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates or creates one or more sales invoices or purchase bills /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Invoices) System.Threading.Tasks.Task> UpdateOrCreateInvoicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, Invoices invoices, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates or creates one or more items /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Items System.Threading.Tasks.Task UpdateOrCreateItemsAsync (string accessToken, string xeroTenantId, Items items, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates or creates one or more items /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Items) System.Threading.Tasks.Task> UpdateOrCreateItemsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Items items, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates or creates a single manual journal /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// ManualJournals array with ManualJournal object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ManualJournals System.Threading.Tasks.Task UpdateOrCreateManualJournalsAsync (string accessToken, string xeroTenantId, ManualJournals manualJournals, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates or creates a single manual journal /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// ManualJournals array with ManualJournal object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ManualJournals) System.Threading.Tasks.Task> UpdateOrCreateManualJournalsAsyncWithHttpInfo (string accessToken, string xeroTenantId, ManualJournals manualJournals, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates or creates one or more purchase orders /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PurchaseOrders System.Threading.Tasks.Task UpdateOrCreatePurchaseOrdersAsync (string accessToken, string xeroTenantId, PurchaseOrders purchaseOrders, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates or creates one or more purchase orders /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PurchaseOrders) System.Threading.Tasks.Task> UpdateOrCreatePurchaseOrdersAsyncWithHttpInfo (string accessToken, string xeroTenantId, PurchaseOrders purchaseOrders, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates or creates one or more quotes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Quotes System.Threading.Tasks.Task UpdateOrCreateQuotesAsync (string accessToken, string xeroTenantId, Quotes quotes, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates or creates one or more quotes /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Quotes) System.Threading.Tasks.Task> UpdateOrCreateQuotesAsyncWithHttpInfo (string accessToken, string xeroTenantId, Quotes quotes, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates or deletes one or more repeating invoice templates /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// RepeatingInvoices with an array of repeating invoice objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of RepeatingInvoices System.Threading.Tasks.Task UpdateOrCreateRepeatingInvoicesAsync (string accessToken, string xeroTenantId, RepeatingInvoices repeatingInvoices, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Creates or deletes one or more repeating invoice templates /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// RepeatingInvoices with an array of repeating invoice objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (RepeatingInvoices) System.Threading.Tasks.Task> UpdateOrCreateRepeatingInvoicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, RepeatingInvoices repeatingInvoices, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific purchase order /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PurchaseOrders System.Threading.Tasks.Task UpdatePurchaseOrderAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, PurchaseOrders purchaseOrders, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific purchase order /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PurchaseOrders) System.Threading.Tasks.Task> UpdatePurchaseOrderAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, PurchaseOrders purchaseOrders, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific attachment for a specific purchase order by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task UpdatePurchaseOrderAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific attachment for a specific purchase order by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> UpdatePurchaseOrderAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific quote /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Quotes System.Threading.Tasks.Task UpdateQuoteAsync (string accessToken, string xeroTenantId, Guid quoteID, Quotes quotes, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific quote /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Quotes) System.Threading.Tasks.Task> UpdateQuoteAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, Quotes quotes, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific attachment from a specific quote by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task UpdateQuoteAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid quoteID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific attachment from a specific quote by filename /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> UpdateQuoteAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific draft expense claim receipts /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Receipts System.Threading.Tasks.Task UpdateReceiptAsync (string accessToken, string xeroTenantId, Guid receiptID, Receipts receipts, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific draft expense claim receipts /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Receipts) System.Threading.Tasks.Task> UpdateReceiptAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, Receipts receipts, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific attachment on a specific expense claim receipts by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task UpdateReceiptAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid receiptID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific attachment on a specific expense claim receipts by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> UpdateReceiptAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Deletes a specific repeating invoice template /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of RepeatingInvoices System.Threading.Tasks.Task UpdateRepeatingInvoiceAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, RepeatingInvoices repeatingInvoices, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Deletes a specific repeating invoice template /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (RepeatingInvoices) System.Threading.Tasks.Task> UpdateRepeatingInvoiceAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, RepeatingInvoices repeatingInvoices, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific attachment from a specific repeating invoices by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments System.Threading.Tasks.Task UpdateRepeatingInvoiceAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific attachment from a specific repeating invoices by file name /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) System.Threading.Tasks.Task> UpdateRepeatingInvoiceAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates tax rates /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TaxRates System.Threading.Tasks.Task UpdateTaxRateAsync (string accessToken, string xeroTenantId, TaxRates taxRates, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates tax rates /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TaxRates) System.Threading.Tasks.Task> UpdateTaxRateAsyncWithHttpInfo (string accessToken, string xeroTenantId, TaxRates taxRates, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific tracking category /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TrackingCategories System.Threading.Tasks.Task UpdateTrackingCategoryAsync (string accessToken, string xeroTenantId, Guid trackingCategoryID, TrackingCategory trackingCategory, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific tracking category /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TrackingCategories) System.Threading.Tasks.Task> UpdateTrackingCategoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid trackingCategoryID, TrackingCategory trackingCategory, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific option for a specific tracking category /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// Unique identifier for a Tracking Option /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TrackingOptions System.Threading.Tasks.Task UpdateTrackingOptionsAsync (string accessToken, string xeroTenantId, Guid trackingCategoryID, Guid trackingOptionID, TrackingOption trackingOption, string idempotencyKey = null, CancellationToken cancellationToken = default); /// /// Updates a specific option for a specific tracking category /// /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// Unique identifier for a Tracking Option /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TrackingOptions) System.Threading.Tasks.Task> UpdateTrackingOptionsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid trackingCategoryID, Guid trackingOptionID, TrackingOption trackingOption, string idempotencyKey = null, CancellationToken cancellationToken = default); #endregion Asynchronous Operations } /// /// Represents a collection of functions to interact with the API endpoints /// public interface IAccountingApi : IAccountingApiAsync { } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class AccountingApi : IAccountingApi { private Xero.NetStandard.OAuth2.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class. /// /// public AccountingApi() : this((string) null) { this.Configuration = Xero.NetStandard.OAuth2.Client.Configuration.MergeConfigurations( Xero.NetStandard.OAuth2.Client.GlobalConfiguration.Instance, new Xero.NetStandard.OAuth2.Client.Configuration { BasePath = "https://api.xero.com/api.xro/2.0" } ); this.AsynchronousClient = new Xero.NetStandard.OAuth2.Client.ApiClient(this.Configuration.BasePath); this.ExceptionFactory = Xero.NetStandard.OAuth2.Client.Configuration.DefaultExceptionFactory; } /// /// Initializes a new instance of the class. /// /// public AccountingApi(String basePath) { this.Configuration = Xero.NetStandard.OAuth2.Client.Configuration.MergeConfigurations( Xero.NetStandard.OAuth2.Client.GlobalConfiguration.Instance, new Xero.NetStandard.OAuth2.Client.Configuration { BasePath = basePath } ); this.AsynchronousClient = new Xero.NetStandard.OAuth2.Client.ApiClient(this.Configuration.BasePath); this.ExceptionFactory = Xero.NetStandard.OAuth2.Client.Configuration.DefaultExceptionFactory; } /// /// Initializes a new instance of the class /// using Configuration object /// /// An instance of Configuration /// public AccountingApi(Xero.NetStandard.OAuth2.Client.Configuration configuration) { if (configuration == null) throw new ArgumentNullException("configuration"); this.Configuration = Xero.NetStandard.OAuth2.Client.Configuration.MergeConfigurations( Xero.NetStandard.OAuth2.Client.GlobalConfiguration.Instance, configuration ); this.AsynchronousClient = new Xero.NetStandard.OAuth2.Client.ApiClient(this.Configuration.BasePath); ExceptionFactory = Xero.NetStandard.OAuth2.Client.Configuration.DefaultExceptionFactory; } /// /// Initializes a new instance of the class /// using a Configuration object and client instance. /// /// The client interface for synchronous API access. /// The client interface for asynchronous API access. /// The configuration object. public AccountingApi(Xero.NetStandard.OAuth2.Client.ISynchronousClient client,Xero.NetStandard.OAuth2.Client.IAsynchronousClient asyncClient, Xero.NetStandard.OAuth2.Client.IReadableConfiguration configuration) { if(client == null) throw new ArgumentNullException("client"); if(asyncClient == null) throw new ArgumentNullException("asyncClient"); if(configuration == null) throw new ArgumentNullException("configuration"); this.AsynchronousClient = asyncClient; this.Configuration = configuration; this.ExceptionFactory = Xero.NetStandard.OAuth2.Client.Configuration.DefaultExceptionFactory; } /// /// The client for accessing this underlying API asynchronously. /// public Xero.NetStandard.OAuth2.Client.IAsynchronousClient AsynchronousClient { get; set; } /// /// Gets the base path of the API client. /// /// The base path public String GetBasePath() { return this.Configuration.BasePath; } /// /// Gets or sets the configuration object /// /// An instance of the Configuration public Xero.NetStandard.OAuth2.Client.IReadableConfiguration Configuration {get; set;} /// /// Provides a factory method hook for the creation of exceptions. /// public Xero.NetStandard.OAuth2.Client.ExceptionFactory ExceptionFactory { get { if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) { throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); } return _exceptionFactory; } set { _exceptionFactory = value; } } /// /// Creates a new chart of accounts /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Account object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Accounts public async System.Threading.Tasks.Task CreateAccountAsync (string accessToken, string xeroTenantId, Account account, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateAccountAsyncWithHttpInfo(accessToken, xeroTenantId, account, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a new chart of accounts /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Account object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Accounts) public async System.Threading.Tasks.Task> CreateAccountAsyncWithHttpInfo (string accessToken, string xeroTenantId, Account account, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateAccount"); // verify the required parameter 'account' is set if (account == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'account' when calling AccountingApi->CreateAccount"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = account; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Accounts", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateAccount", response); if (exception != null) throw exception; } return response; } /// /// Creates an attachment on a specific account /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task CreateAccountAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid accountID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateAccountAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, accountID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates an attachment on a specific account /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> CreateAccountAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid accountID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateAccountAttachmentByFileName"); // verify the required parameter 'accountID' is set if (accountID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'accountID' when calling AccountingApi->CreateAccountAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->CreateAccountAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->CreateAccountAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (accountID != null) requestOptions.PathParameters.Add("AccountID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(accountID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Accounts/{AccountID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateAccountAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Creates an attachment for a specific bank transaction by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task CreateBankTransactionAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateBankTransactionAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransactionID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates an attachment for a specific bank transaction by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> CreateBankTransactionAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateBankTransactionAttachmentByFileName"); // verify the required parameter 'bankTransactionID' is set if (bankTransactionID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransactionID' when calling AccountingApi->CreateBankTransactionAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->CreateBankTransactionAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->CreateBankTransactionAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (bankTransactionID != null) requestOptions.PathParameters.Add("BankTransactionID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(bankTransactionID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/BankTransactions/{BankTransactionID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateBankTransactionAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Creates a history record for a specific bank transactions /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task CreateBankTransactionHistoryRecordAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateBankTransactionHistoryRecordAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransactionID, historyRecords, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a history record for a specific bank transactions /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> CreateBankTransactionHistoryRecordAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateBankTransactionHistoryRecord"); // verify the required parameter 'bankTransactionID' is set if (bankTransactionID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransactionID' when calling AccountingApi->CreateBankTransactionHistoryRecord"); // verify the required parameter 'historyRecords' is set if (historyRecords == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'historyRecords' when calling AccountingApi->CreateBankTransactionHistoryRecord"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (bankTransactionID != null) requestOptions.PathParameters.Add("BankTransactionID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(bankTransactionID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = historyRecords; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/BankTransactions/{BankTransactionID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateBankTransactionHistoryRecord", response); if (exception != null) throw exception; } return response; } /// /// Creates one or more spent or received money transaction /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// BankTransactions with an array of BankTransaction objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BankTransactions public async System.Threading.Tasks.Task CreateBankTransactionsAsync (string accessToken, string xeroTenantId, BankTransactions bankTransactions, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateBankTransactionsAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransactions, summarizeErrors, unitdp, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates one or more spent or received money transaction /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// BankTransactions with an array of BankTransaction objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BankTransactions) public async System.Threading.Tasks.Task> CreateBankTransactionsAsyncWithHttpInfo (string accessToken, string xeroTenantId, BankTransactions bankTransactions, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateBankTransactions"); // verify the required parameter 'bankTransactions' is set if (bankTransactions == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransactions' when calling AccountingApi->CreateBankTransactions"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = bankTransactions; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/BankTransactions", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateBankTransactions", response); if (exception != null) throw exception; } return response; } /// /// Creates a bank transfer /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// BankTransfers with array of BankTransfer objects in request body /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BankTransfers public async System.Threading.Tasks.Task CreateBankTransferAsync (string accessToken, string xeroTenantId, BankTransfers bankTransfers, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateBankTransferAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransfers, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a bank transfer /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// BankTransfers with array of BankTransfer objects in request body /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BankTransfers) public async System.Threading.Tasks.Task> CreateBankTransferAsyncWithHttpInfo (string accessToken, string xeroTenantId, BankTransfers bankTransfers, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateBankTransfer"); // verify the required parameter 'bankTransfers' is set if (bankTransfers == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransfers' when calling AccountingApi->CreateBankTransfer"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = bankTransfers; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/BankTransfers", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateBankTransfer", response); if (exception != null) throw exception; } return response; } /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task CreateBankTransferAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid bankTransferID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateBankTransferAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransferID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> CreateBankTransferAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransferID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateBankTransferAttachmentByFileName"); // verify the required parameter 'bankTransferID' is set if (bankTransferID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransferID' when calling AccountingApi->CreateBankTransferAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->CreateBankTransferAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->CreateBankTransferAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (bankTransferID != null) requestOptions.PathParameters.Add("BankTransferID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(bankTransferID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/BankTransfers/{BankTransferID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateBankTransferAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Creates a history record for a specific bank transfer /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task CreateBankTransferHistoryRecordAsync (string accessToken, string xeroTenantId, Guid bankTransferID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateBankTransferHistoryRecordAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransferID, historyRecords, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a history record for a specific bank transfer /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> CreateBankTransferHistoryRecordAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransferID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateBankTransferHistoryRecord"); // verify the required parameter 'bankTransferID' is set if (bankTransferID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransferID' when calling AccountingApi->CreateBankTransferHistoryRecord"); // verify the required parameter 'historyRecords' is set if (historyRecords == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'historyRecords' when calling AccountingApi->CreateBankTransferHistoryRecord"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (bankTransferID != null) requestOptions.PathParameters.Add("BankTransferID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(bankTransferID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = historyRecords; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/BankTransfers/{BankTransferID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateBankTransferHistoryRecord", response); if (exception != null) throw exception; } return response; } /// /// Creates one or many batch payments for invoices /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// BatchPayments with an array of Payments in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BatchPayments public async System.Threading.Tasks.Task CreateBatchPaymentAsync (string accessToken, string xeroTenantId, BatchPayments batchPayments, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateBatchPaymentAsyncWithHttpInfo(accessToken, xeroTenantId, batchPayments, summarizeErrors, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates one or many batch payments for invoices /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// BatchPayments with an array of Payments in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BatchPayments) public async System.Threading.Tasks.Task> CreateBatchPaymentAsyncWithHttpInfo (string accessToken, string xeroTenantId, BatchPayments batchPayments, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateBatchPayment"); // verify the required parameter 'batchPayments' is set if (batchPayments == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'batchPayments' when calling AccountingApi->CreateBatchPayment"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = batchPayments; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/BatchPayments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateBatchPayment", response); if (exception != null) throw exception; } return response; } /// /// Creates a history record for a specific batch payment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for BatchPayment /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task CreateBatchPaymentHistoryRecordAsync (string accessToken, string xeroTenantId, Guid batchPaymentID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateBatchPaymentHistoryRecordAsyncWithHttpInfo(accessToken, xeroTenantId, batchPaymentID, historyRecords, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a history record for a specific batch payment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for BatchPayment /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> CreateBatchPaymentHistoryRecordAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid batchPaymentID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateBatchPaymentHistoryRecord"); // verify the required parameter 'batchPaymentID' is set if (batchPaymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'batchPaymentID' when calling AccountingApi->CreateBatchPaymentHistoryRecord"); // verify the required parameter 'historyRecords' is set if (historyRecords == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'historyRecords' when calling AccountingApi->CreateBatchPaymentHistoryRecord"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (batchPaymentID != null) requestOptions.PathParameters.Add("BatchPaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(batchPaymentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = historyRecords; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/BatchPayments/{BatchPaymentID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateBatchPaymentHistoryRecord", response); if (exception != null) throw exception; } return response; } /// /// Creates a new custom payment service for a specific branding theme /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Branding Theme /// PaymentServices array with PaymentService object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PaymentServices public async System.Threading.Tasks.Task CreateBrandingThemePaymentServicesAsync (string accessToken, string xeroTenantId, Guid brandingThemeID, PaymentServices paymentServices, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateBrandingThemePaymentServicesAsyncWithHttpInfo(accessToken, xeroTenantId, brandingThemeID, paymentServices, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a new custom payment service for a specific branding theme /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Branding Theme /// PaymentServices array with PaymentService object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PaymentServices) public async System.Threading.Tasks.Task> CreateBrandingThemePaymentServicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid brandingThemeID, PaymentServices paymentServices, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateBrandingThemePaymentServices"); // verify the required parameter 'brandingThemeID' is set if (brandingThemeID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'brandingThemeID' when calling AccountingApi->CreateBrandingThemePaymentServices"); // verify the required parameter 'paymentServices' is set if (paymentServices == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'paymentServices' when calling AccountingApi->CreateBrandingThemePaymentServices"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (brandingThemeID != null) requestOptions.PathParameters.Add("BrandingThemeID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(brandingThemeID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = paymentServices; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/BrandingThemes/{BrandingThemeID}/PaymentServices", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateBrandingThemePaymentServices", response); if (exception != null) throw exception; } return response; } /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task CreateContactAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid contactID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateContactAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, contactID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> CreateContactAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateContactAttachmentByFileName"); // verify the required parameter 'contactID' is set if (contactID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactID' when calling AccountingApi->CreateContactAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->CreateContactAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->CreateContactAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactID != null) requestOptions.PathParameters.Add("ContactID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Contacts/{ContactID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateContactAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Creates a contact group /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// ContactGroups with an array of names in request body /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ContactGroups public async System.Threading.Tasks.Task CreateContactGroupAsync (string accessToken, string xeroTenantId, ContactGroups contactGroups, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateContactGroupAsyncWithHttpInfo(accessToken, xeroTenantId, contactGroups, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a contact group /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// ContactGroups with an array of names in request body /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ContactGroups) public async System.Threading.Tasks.Task> CreateContactGroupAsyncWithHttpInfo (string accessToken, string xeroTenantId, ContactGroups contactGroups, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateContactGroup"); // verify the required parameter 'contactGroups' is set if (contactGroups == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactGroups' when calling AccountingApi->CreateContactGroup"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = contactGroups; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/ContactGroups", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateContactGroup", response); if (exception != null) throw exception; } return response; } /// /// Creates contacts to a specific contact group /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// Contacts with array of contacts specifying the ContactID to be added to ContactGroup in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Contacts public async System.Threading.Tasks.Task CreateContactGroupContactsAsync (string accessToken, string xeroTenantId, Guid contactGroupID, Contacts contacts, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateContactGroupContactsAsyncWithHttpInfo(accessToken, xeroTenantId, contactGroupID, contacts, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates contacts to a specific contact group /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// Contacts with array of contacts specifying the ContactID to be added to ContactGroup in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Contacts) public async System.Threading.Tasks.Task> CreateContactGroupContactsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactGroupID, Contacts contacts, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateContactGroupContacts"); // verify the required parameter 'contactGroupID' is set if (contactGroupID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactGroupID' when calling AccountingApi->CreateContactGroupContacts"); // verify the required parameter 'contacts' is set if (contacts == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contacts' when calling AccountingApi->CreateContactGroupContacts"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactGroupID != null) requestOptions.PathParameters.Add("ContactGroupID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactGroupID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = contacts; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/ContactGroups/{ContactGroupID}/Contacts", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateContactGroupContacts", response); if (exception != null) throw exception; } return response; } /// /// Creates a new history record for a specific contact /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task CreateContactHistoryAsync (string accessToken, string xeroTenantId, Guid contactID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateContactHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, contactID, historyRecords, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a new history record for a specific contact /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> CreateContactHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateContactHistory"); // verify the required parameter 'contactID' is set if (contactID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactID' when calling AccountingApi->CreateContactHistory"); // verify the required parameter 'historyRecords' is set if (historyRecords == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'historyRecords' when calling AccountingApi->CreateContactHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactID != null) requestOptions.PathParameters.Add("ContactID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = historyRecords; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Contacts/{ContactID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateContactHistory", response); if (exception != null) throw exception; } return response; } /// /// Creates multiple contacts (bulk) in a Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Contacts with an array of Contact objects to create in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Contacts public async System.Threading.Tasks.Task CreateContactsAsync (string accessToken, string xeroTenantId, Contacts contacts, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateContactsAsyncWithHttpInfo(accessToken, xeroTenantId, contacts, summarizeErrors, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates multiple contacts (bulk) in a Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Contacts with an array of Contact objects to create in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Contacts) public async System.Threading.Tasks.Task> CreateContactsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Contacts contacts, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateContacts"); // verify the required parameter 'contacts' is set if (contacts == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contacts' when calling AccountingApi->CreateContacts"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = contacts; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Contacts", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateContacts", response); if (exception != null) throw exception; } return response; } /// /// Creates allocation for a specific credit note /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Allocations with array of Allocation object in body of request. /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Allocations public async System.Threading.Tasks.Task CreateCreditNoteAllocationAsync (string accessToken, string xeroTenantId, Guid creditNoteID, Allocations allocations, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateCreditNoteAllocationAsyncWithHttpInfo(accessToken, xeroTenantId, creditNoteID, allocations, summarizeErrors, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates allocation for a specific credit note /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Allocations with array of Allocation object in body of request. /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Allocations) public async System.Threading.Tasks.Task> CreateCreditNoteAllocationAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, Allocations allocations, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateCreditNoteAllocation"); // verify the required parameter 'creditNoteID' is set if (creditNoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'creditNoteID' when calling AccountingApi->CreateCreditNoteAllocation"); // verify the required parameter 'allocations' is set if (allocations == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'allocations' when calling AccountingApi->CreateCreditNoteAllocation"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (creditNoteID != null) requestOptions.PathParameters.Add("CreditNoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(creditNoteID)); // path parameter if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = allocations; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/CreditNotes/{CreditNoteID}/Allocations", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateCreditNoteAllocation", response); if (exception != null) throw exception; } return response; } /// /// Creates an attachment for a specific credit note /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Name of the attachment /// Byte array of file in body of request /// Allows an attachment to be seen by the end customer within their online invoice (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task CreateCreditNoteAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid creditNoteID, string fileName, byte[] body, bool? includeOnline = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateCreditNoteAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, creditNoteID, fileName, body, includeOnline, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates an attachment for a specific credit note /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Name of the attachment /// Byte array of file in body of request /// Allows an attachment to be seen by the end customer within their online invoice (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> CreateCreditNoteAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, string fileName, byte[] body, bool? includeOnline = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateCreditNoteAttachmentByFileName"); // verify the required parameter 'creditNoteID' is set if (creditNoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'creditNoteID' when calling AccountingApi->CreateCreditNoteAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->CreateCreditNoteAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->CreateCreditNoteAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (creditNoteID != null) requestOptions.PathParameters.Add("CreditNoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(creditNoteID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (includeOnline != null) { requestOptions.QueryParameters.Add("IncludeOnline", includeOnline.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/CreditNotes/{CreditNoteID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateCreditNoteAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Retrieves history records of a specific credit note /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task CreateCreditNoteHistoryAsync (string accessToken, string xeroTenantId, Guid creditNoteID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateCreditNoteHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, creditNoteID, historyRecords, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Retrieves history records of a specific credit note /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> CreateCreditNoteHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateCreditNoteHistory"); // verify the required parameter 'creditNoteID' is set if (creditNoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'creditNoteID' when calling AccountingApi->CreateCreditNoteHistory"); // verify the required parameter 'historyRecords' is set if (historyRecords == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'historyRecords' when calling AccountingApi->CreateCreditNoteHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (creditNoteID != null) requestOptions.PathParameters.Add("CreditNoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(creditNoteID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = historyRecords; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/CreditNotes/{CreditNoteID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateCreditNoteHistory", response); if (exception != null) throw exception; } return response; } /// /// Creates a new credit note /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Credit Notes with array of CreditNote object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of CreditNotes public async System.Threading.Tasks.Task CreateCreditNotesAsync (string accessToken, string xeroTenantId, CreditNotes creditNotes, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateCreditNotesAsyncWithHttpInfo(accessToken, xeroTenantId, creditNotes, summarizeErrors, unitdp, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a new credit note /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Credit Notes with array of CreditNote object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (CreditNotes) public async System.Threading.Tasks.Task> CreateCreditNotesAsyncWithHttpInfo (string accessToken, string xeroTenantId, CreditNotes creditNotes, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateCreditNotes"); // verify the required parameter 'creditNotes' is set if (creditNotes == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'creditNotes' when calling AccountingApi->CreateCreditNotes"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = creditNotes; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/CreditNotes", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateCreditNotes", response); if (exception != null) throw exception; } return response; } /// /// Create a new currency for a Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Currency object in the body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Currencies public async System.Threading.Tasks.Task CreateCurrencyAsync (string accessToken, string xeroTenantId, Currency currency, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateCurrencyAsyncWithHttpInfo(accessToken, xeroTenantId, currency, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Create a new currency for a Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Currency object in the body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Currencies) public async System.Threading.Tasks.Task> CreateCurrencyAsyncWithHttpInfo (string accessToken, string xeroTenantId, Currency currency, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateCurrency"); // verify the required parameter 'currency' is set if (currency == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'currency' when calling AccountingApi->CreateCurrency"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = currency; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Currencies", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateCurrency", response); if (exception != null) throw exception; } return response; } /// /// Creates new employees used in Xero payrun /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Employees with array of Employee object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Employees public async System.Threading.Tasks.Task CreateEmployeesAsync (string accessToken, string xeroTenantId, Employees employees, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateEmployeesAsyncWithHttpInfo(accessToken, xeroTenantId, employees, summarizeErrors, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates new employees used in Xero payrun /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Employees with array of Employee object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Employees) public async System.Threading.Tasks.Task> CreateEmployeesAsyncWithHttpInfo (string accessToken, string xeroTenantId, Employees employees, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateEmployees"); // verify the required parameter 'employees' is set if (employees == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'employees' when calling AccountingApi->CreateEmployees"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = employees; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Employees", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateEmployees", response); if (exception != null) throw exception; } return response; } /// /// Creates a history record for a specific expense claim /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ExpenseClaim /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task CreateExpenseClaimHistoryAsync (string accessToken, string xeroTenantId, Guid expenseClaimID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateExpenseClaimHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, expenseClaimID, historyRecords, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a history record for a specific expense claim /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ExpenseClaim /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> CreateExpenseClaimHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid expenseClaimID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateExpenseClaimHistory"); // verify the required parameter 'expenseClaimID' is set if (expenseClaimID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'expenseClaimID' when calling AccountingApi->CreateExpenseClaimHistory"); // verify the required parameter 'historyRecords' is set if (historyRecords == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'historyRecords' when calling AccountingApi->CreateExpenseClaimHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (expenseClaimID != null) requestOptions.PathParameters.Add("ExpenseClaimID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(expenseClaimID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = historyRecords; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/ExpenseClaims/{ExpenseClaimID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateExpenseClaimHistory", response); if (exception != null) throw exception; } return response; } /// /// Creates expense claims /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// ExpenseClaims with array of ExpenseClaim object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ExpenseClaims public async System.Threading.Tasks.Task CreateExpenseClaimsAsync (string accessToken, string xeroTenantId, ExpenseClaims expenseClaims, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateExpenseClaimsAsyncWithHttpInfo(accessToken, xeroTenantId, expenseClaims, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates expense claims /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// ExpenseClaims with array of ExpenseClaim object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ExpenseClaims) public async System.Threading.Tasks.Task> CreateExpenseClaimsAsyncWithHttpInfo (string accessToken, string xeroTenantId, ExpenseClaims expenseClaims, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateExpenseClaims"); // verify the required parameter 'expenseClaims' is set if (expenseClaims == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'expenseClaims' when calling AccountingApi->CreateExpenseClaims"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = expenseClaims; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/ExpenseClaims", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateExpenseClaims", response); if (exception != null) throw exception; } return response; } /// /// Creates an attachment for a specific invoice or purchase bill by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Name of the attachment /// Byte array of file in body of request /// Allows an attachment to be seen by the end customer within their online invoice (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task CreateInvoiceAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid invoiceID, string fileName, byte[] body, bool? includeOnline = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateInvoiceAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, invoiceID, fileName, body, includeOnline, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates an attachment for a specific invoice or purchase bill by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Name of the attachment /// Byte array of file in body of request /// Allows an attachment to be seen by the end customer within their online invoice (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> CreateInvoiceAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, string fileName, byte[] body, bool? includeOnline = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateInvoiceAttachmentByFileName"); // verify the required parameter 'invoiceID' is set if (invoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'invoiceID' when calling AccountingApi->CreateInvoiceAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->CreateInvoiceAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->CreateInvoiceAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (invoiceID != null) requestOptions.PathParameters.Add("InvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(invoiceID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (includeOnline != null) { requestOptions.QueryParameters.Add("IncludeOnline", includeOnline.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Invoices/{InvoiceID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateInvoiceAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Creates a history record for a specific invoice /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task CreateInvoiceHistoryAsync (string accessToken, string xeroTenantId, Guid invoiceID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateInvoiceHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, invoiceID, historyRecords, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a history record for a specific invoice /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> CreateInvoiceHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateInvoiceHistory"); // verify the required parameter 'invoiceID' is set if (invoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'invoiceID' when calling AccountingApi->CreateInvoiceHistory"); // verify the required parameter 'historyRecords' is set if (historyRecords == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'historyRecords' when calling AccountingApi->CreateInvoiceHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (invoiceID != null) requestOptions.PathParameters.Add("InvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(invoiceID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = historyRecords; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Invoices/{InvoiceID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateInvoiceHistory", response); if (exception != null) throw exception; } return response; } /// /// Creates one or more sales invoices or purchase bills /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Invoices with an array of invoice objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Invoices public async System.Threading.Tasks.Task CreateInvoicesAsync (string accessToken, string xeroTenantId, Invoices invoices, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateInvoicesAsyncWithHttpInfo(accessToken, xeroTenantId, invoices, summarizeErrors, unitdp, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates one or more sales invoices or purchase bills /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Invoices with an array of invoice objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Invoices) public async System.Threading.Tasks.Task> CreateInvoicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, Invoices invoices, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateInvoices"); // verify the required parameter 'invoices' is set if (invoices == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'invoices' when calling AccountingApi->CreateInvoices"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = invoices; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Invoices", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateInvoices", response); if (exception != null) throw exception; } return response; } /// /// Creates a history record for a specific item /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task CreateItemHistoryAsync (string accessToken, string xeroTenantId, Guid itemID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateItemHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, itemID, historyRecords, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a history record for a specific item /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> CreateItemHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid itemID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateItemHistory"); // verify the required parameter 'itemID' is set if (itemID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'itemID' when calling AccountingApi->CreateItemHistory"); // verify the required parameter 'historyRecords' is set if (historyRecords == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'historyRecords' when calling AccountingApi->CreateItemHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (itemID != null) requestOptions.PathParameters.Add("ItemID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(itemID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = historyRecords; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Items/{ItemID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateItemHistory", response); if (exception != null) throw exception; } return response; } /// /// Creates one or more items /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Items with an array of Item objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Items public async System.Threading.Tasks.Task CreateItemsAsync (string accessToken, string xeroTenantId, Items items, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateItemsAsyncWithHttpInfo(accessToken, xeroTenantId, items, summarizeErrors, unitdp, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates one or more items /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Items with an array of Item objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Items) public async System.Threading.Tasks.Task> CreateItemsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Items items, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateItems"); // verify the required parameter 'items' is set if (items == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'items' when calling AccountingApi->CreateItems"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = items; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Items", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateItems", response); if (exception != null) throw exception; } return response; } /// /// Creates linked transactions (billable expenses) /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// LinkedTransaction object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of LinkedTransactions public async System.Threading.Tasks.Task CreateLinkedTransactionAsync (string accessToken, string xeroTenantId, LinkedTransaction linkedTransaction, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateLinkedTransactionAsyncWithHttpInfo(accessToken, xeroTenantId, linkedTransaction, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates linked transactions (billable expenses) /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// LinkedTransaction object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (LinkedTransactions) public async System.Threading.Tasks.Task> CreateLinkedTransactionAsyncWithHttpInfo (string accessToken, string xeroTenantId, LinkedTransaction linkedTransaction, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateLinkedTransaction"); // verify the required parameter 'linkedTransaction' is set if (linkedTransaction == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'linkedTransaction' when calling AccountingApi->CreateLinkedTransaction"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = linkedTransaction; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/LinkedTransactions", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateLinkedTransaction", response); if (exception != null) throw exception; } return response; } /// /// Creates a specific attachment for a specific manual journal by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task CreateManualJournalAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid manualJournalID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateManualJournalAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, manualJournalID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a specific attachment for a specific manual journal by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> CreateManualJournalAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateManualJournalAttachmentByFileName"); // verify the required parameter 'manualJournalID' is set if (manualJournalID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'manualJournalID' when calling AccountingApi->CreateManualJournalAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->CreateManualJournalAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->CreateManualJournalAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (manualJournalID != null) requestOptions.PathParameters.Add("ManualJournalID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(manualJournalID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/ManualJournals/{ManualJournalID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateManualJournalAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Creates a history record for a specific manual journal /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task CreateManualJournalHistoryRecordAsync (string accessToken, string xeroTenantId, Guid manualJournalID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateManualJournalHistoryRecordAsyncWithHttpInfo(accessToken, xeroTenantId, manualJournalID, historyRecords, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a history record for a specific manual journal /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> CreateManualJournalHistoryRecordAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateManualJournalHistoryRecord"); // verify the required parameter 'manualJournalID' is set if (manualJournalID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'manualJournalID' when calling AccountingApi->CreateManualJournalHistoryRecord"); // verify the required parameter 'historyRecords' is set if (historyRecords == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'historyRecords' when calling AccountingApi->CreateManualJournalHistoryRecord"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (manualJournalID != null) requestOptions.PathParameters.Add("ManualJournalID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(manualJournalID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = historyRecords; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/ManualJournals/{ManualJournalID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateManualJournalHistoryRecord", response); if (exception != null) throw exception; } return response; } /// /// Creates one or more manual journals /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// ManualJournals array with ManualJournal object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ManualJournals public async System.Threading.Tasks.Task CreateManualJournalsAsync (string accessToken, string xeroTenantId, ManualJournals manualJournals, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateManualJournalsAsyncWithHttpInfo(accessToken, xeroTenantId, manualJournals, summarizeErrors, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates one or more manual journals /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// ManualJournals array with ManualJournal object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ManualJournals) public async System.Threading.Tasks.Task> CreateManualJournalsAsyncWithHttpInfo (string accessToken, string xeroTenantId, ManualJournals manualJournals, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateManualJournals"); // verify the required parameter 'manualJournals' is set if (manualJournals == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'manualJournals' when calling AccountingApi->CreateManualJournals"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = manualJournals; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/ManualJournals", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateManualJournals", response); if (exception != null) throw exception; } return response; } /// /// Creates a single allocation for a specific overpayment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// Allocations array with Allocation object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Allocations public async System.Threading.Tasks.Task CreateOverpaymentAllocationsAsync (string accessToken, string xeroTenantId, Guid overpaymentID, Allocations allocations, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateOverpaymentAllocationsAsyncWithHttpInfo(accessToken, xeroTenantId, overpaymentID, allocations, summarizeErrors, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a single allocation for a specific overpayment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// Allocations array with Allocation object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Allocations) public async System.Threading.Tasks.Task> CreateOverpaymentAllocationsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid overpaymentID, Allocations allocations, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateOverpaymentAllocations"); // verify the required parameter 'overpaymentID' is set if (overpaymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'overpaymentID' when calling AccountingApi->CreateOverpaymentAllocations"); // verify the required parameter 'allocations' is set if (allocations == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'allocations' when calling AccountingApi->CreateOverpaymentAllocations"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (overpaymentID != null) requestOptions.PathParameters.Add("OverpaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(overpaymentID)); // path parameter if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = allocations; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Overpayments/{OverpaymentID}/Allocations", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateOverpaymentAllocations", response); if (exception != null) throw exception; } return response; } /// /// Creates a history record for a specific overpayment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task CreateOverpaymentHistoryAsync (string accessToken, string xeroTenantId, Guid overpaymentID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateOverpaymentHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, overpaymentID, historyRecords, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a history record for a specific overpayment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> CreateOverpaymentHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid overpaymentID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateOverpaymentHistory"); // verify the required parameter 'overpaymentID' is set if (overpaymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'overpaymentID' when calling AccountingApi->CreateOverpaymentHistory"); // verify the required parameter 'historyRecords' is set if (historyRecords == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'historyRecords' when calling AccountingApi->CreateOverpaymentHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (overpaymentID != null) requestOptions.PathParameters.Add("OverpaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(overpaymentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = historyRecords; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Overpayments/{OverpaymentID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateOverpaymentHistory", response); if (exception != null) throw exception; } return response; } /// /// Creates a single payment for invoice or credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Request body with a single Payment object /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Payments public async System.Threading.Tasks.Task CreatePaymentAsync (string accessToken, string xeroTenantId, Payment payment, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreatePaymentAsyncWithHttpInfo(accessToken, xeroTenantId, payment, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a single payment for invoice or credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Request body with a single Payment object /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Payments) public async System.Threading.Tasks.Task> CreatePaymentAsyncWithHttpInfo (string accessToken, string xeroTenantId, Payment payment, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreatePayment"); // verify the required parameter 'payment' is set if (payment == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'payment' when calling AccountingApi->CreatePayment"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = payment; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Payments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreatePayment", response); if (exception != null) throw exception; } return response; } /// /// Creates a history record for a specific payment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Payment /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task CreatePaymentHistoryAsync (string accessToken, string xeroTenantId, Guid paymentID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreatePaymentHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, paymentID, historyRecords, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a history record for a specific payment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Payment /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> CreatePaymentHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid paymentID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreatePaymentHistory"); // verify the required parameter 'paymentID' is set if (paymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'paymentID' when calling AccountingApi->CreatePaymentHistory"); // verify the required parameter 'historyRecords' is set if (historyRecords == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'historyRecords' when calling AccountingApi->CreatePaymentHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (paymentID != null) requestOptions.PathParameters.Add("PaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(paymentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = historyRecords; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Payments/{PaymentID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreatePaymentHistory", response); if (exception != null) throw exception; } return response; } /// /// Creates a payment service /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// PaymentServices array with PaymentService object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PaymentServices public async System.Threading.Tasks.Task CreatePaymentServiceAsync (string accessToken, string xeroTenantId, PaymentServices paymentServices, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreatePaymentServiceAsyncWithHttpInfo(accessToken, xeroTenantId, paymentServices, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a payment service /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// PaymentServices array with PaymentService object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PaymentServices) public async System.Threading.Tasks.Task> CreatePaymentServiceAsyncWithHttpInfo (string accessToken, string xeroTenantId, PaymentServices paymentServices, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreatePaymentService"); // verify the required parameter 'paymentServices' is set if (paymentServices == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'paymentServices' when calling AccountingApi->CreatePaymentService"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = paymentServices; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/PaymentServices", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreatePaymentService", response); if (exception != null) throw exception; } return response; } /// /// Creates multiple payments for invoices or credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Payments array with Payment object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Payments public async System.Threading.Tasks.Task CreatePaymentsAsync (string accessToken, string xeroTenantId, Payments payments, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreatePaymentsAsyncWithHttpInfo(accessToken, xeroTenantId, payments, summarizeErrors, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates multiple payments for invoices or credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Payments array with Payment object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Payments) public async System.Threading.Tasks.Task> CreatePaymentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Payments payments, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreatePayments"); // verify the required parameter 'payments' is set if (payments == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'payments' when calling AccountingApi->CreatePayments"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = payments; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Payments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreatePayments", response); if (exception != null) throw exception; } return response; } /// /// Allows you to create an Allocation for prepayments /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// Allocations with an array of Allocation object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Allocations public async System.Threading.Tasks.Task CreatePrepaymentAllocationsAsync (string accessToken, string xeroTenantId, Guid prepaymentID, Allocations allocations, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreatePrepaymentAllocationsAsyncWithHttpInfo(accessToken, xeroTenantId, prepaymentID, allocations, summarizeErrors, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Allows you to create an Allocation for prepayments /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// Allocations with an array of Allocation object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Allocations) public async System.Threading.Tasks.Task> CreatePrepaymentAllocationsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid prepaymentID, Allocations allocations, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreatePrepaymentAllocations"); // verify the required parameter 'prepaymentID' is set if (prepaymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'prepaymentID' when calling AccountingApi->CreatePrepaymentAllocations"); // verify the required parameter 'allocations' is set if (allocations == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'allocations' when calling AccountingApi->CreatePrepaymentAllocations"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (prepaymentID != null) requestOptions.PathParameters.Add("PrepaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(prepaymentID)); // path parameter if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = allocations; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Prepayments/{PrepaymentID}/Allocations", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreatePrepaymentAllocations", response); if (exception != null) throw exception; } return response; } /// /// Creates a history record for a specific prepayment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task CreatePrepaymentHistoryAsync (string accessToken, string xeroTenantId, Guid prepaymentID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreatePrepaymentHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, prepaymentID, historyRecords, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a history record for a specific prepayment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> CreatePrepaymentHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid prepaymentID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreatePrepaymentHistory"); // verify the required parameter 'prepaymentID' is set if (prepaymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'prepaymentID' when calling AccountingApi->CreatePrepaymentHistory"); // verify the required parameter 'historyRecords' is set if (historyRecords == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'historyRecords' when calling AccountingApi->CreatePrepaymentHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (prepaymentID != null) requestOptions.PathParameters.Add("PrepaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(prepaymentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = historyRecords; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Prepayments/{PrepaymentID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreatePrepaymentHistory", response); if (exception != null) throw exception; } return response; } /// /// Creates attachment for a specific purchase order /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task CreatePurchaseOrderAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreatePurchaseOrderAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, purchaseOrderID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates attachment for a specific purchase order /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> CreatePurchaseOrderAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreatePurchaseOrderAttachmentByFileName"); // verify the required parameter 'purchaseOrderID' is set if (purchaseOrderID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'purchaseOrderID' when calling AccountingApi->CreatePurchaseOrderAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->CreatePurchaseOrderAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->CreatePurchaseOrderAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (purchaseOrderID != null) requestOptions.PathParameters.Add("PurchaseOrderID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(purchaseOrderID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreatePurchaseOrderAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Creates a history record for a specific purchase orders /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task CreatePurchaseOrderHistoryAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreatePurchaseOrderHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, purchaseOrderID, historyRecords, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a history record for a specific purchase orders /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> CreatePurchaseOrderHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreatePurchaseOrderHistory"); // verify the required parameter 'purchaseOrderID' is set if (purchaseOrderID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'purchaseOrderID' when calling AccountingApi->CreatePurchaseOrderHistory"); // verify the required parameter 'historyRecords' is set if (historyRecords == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'historyRecords' when calling AccountingApi->CreatePurchaseOrderHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (purchaseOrderID != null) requestOptions.PathParameters.Add("PurchaseOrderID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(purchaseOrderID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = historyRecords; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/PurchaseOrders/{PurchaseOrderID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreatePurchaseOrderHistory", response); if (exception != null) throw exception; } return response; } /// /// Creates one or more purchase orders /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// PurchaseOrders with an array of PurchaseOrder object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PurchaseOrders public async System.Threading.Tasks.Task CreatePurchaseOrdersAsync (string accessToken, string xeroTenantId, PurchaseOrders purchaseOrders, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreatePurchaseOrdersAsyncWithHttpInfo(accessToken, xeroTenantId, purchaseOrders, summarizeErrors, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates one or more purchase orders /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// PurchaseOrders with an array of PurchaseOrder object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PurchaseOrders) public async System.Threading.Tasks.Task> CreatePurchaseOrdersAsyncWithHttpInfo (string accessToken, string xeroTenantId, PurchaseOrders purchaseOrders, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreatePurchaseOrders"); // verify the required parameter 'purchaseOrders' is set if (purchaseOrders == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'purchaseOrders' when calling AccountingApi->CreatePurchaseOrders"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = purchaseOrders; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/PurchaseOrders", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreatePurchaseOrders", response); if (exception != null) throw exception; } return response; } /// /// Creates attachment for a specific quote /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task CreateQuoteAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid quoteID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateQuoteAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, quoteID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates attachment for a specific quote /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> CreateQuoteAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateQuoteAttachmentByFileName"); // verify the required parameter 'quoteID' is set if (quoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'quoteID' when calling AccountingApi->CreateQuoteAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->CreateQuoteAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->CreateQuoteAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (quoteID != null) requestOptions.PathParameters.Add("QuoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(quoteID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Quotes/{QuoteID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateQuoteAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Creates a history record for a specific quote /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task CreateQuoteHistoryAsync (string accessToken, string xeroTenantId, Guid quoteID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateQuoteHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, quoteID, historyRecords, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a history record for a specific quote /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> CreateQuoteHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateQuoteHistory"); // verify the required parameter 'quoteID' is set if (quoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'quoteID' when calling AccountingApi->CreateQuoteHistory"); // verify the required parameter 'historyRecords' is set if (historyRecords == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'historyRecords' when calling AccountingApi->CreateQuoteHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (quoteID != null) requestOptions.PathParameters.Add("QuoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(quoteID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = historyRecords; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Quotes/{QuoteID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateQuoteHistory", response); if (exception != null) throw exception; } return response; } /// /// Create one or more quotes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Quotes with an array of Quote object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Quotes public async System.Threading.Tasks.Task CreateQuotesAsync (string accessToken, string xeroTenantId, Quotes quotes, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateQuotesAsyncWithHttpInfo(accessToken, xeroTenantId, quotes, summarizeErrors, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Create one or more quotes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Quotes with an array of Quote object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Quotes) public async System.Threading.Tasks.Task> CreateQuotesAsyncWithHttpInfo (string accessToken, string xeroTenantId, Quotes quotes, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateQuotes"); // verify the required parameter 'quotes' is set if (quotes == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'quotes' when calling AccountingApi->CreateQuotes"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = quotes; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Quotes", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateQuotes", response); if (exception != null) throw exception; } return response; } /// /// Creates draft expense claim receipts for any user /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Receipts with an array of Receipt object in body of request /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Receipts public async System.Threading.Tasks.Task CreateReceiptAsync (string accessToken, string xeroTenantId, Receipts receipts, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateReceiptAsyncWithHttpInfo(accessToken, xeroTenantId, receipts, unitdp, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates draft expense claim receipts for any user /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Receipts with an array of Receipt object in body of request /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Receipts) public async System.Threading.Tasks.Task> CreateReceiptAsyncWithHttpInfo (string accessToken, string xeroTenantId, Receipts receipts, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateReceipt"); // verify the required parameter 'receipts' is set if (receipts == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'receipts' when calling AccountingApi->CreateReceipt"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = receipts; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Receipts", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateReceipt", response); if (exception != null) throw exception; } return response; } /// /// Creates an attachment on a specific expense claim receipts by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task CreateReceiptAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid receiptID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateReceiptAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, receiptID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates an attachment on a specific expense claim receipts by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> CreateReceiptAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateReceiptAttachmentByFileName"); // verify the required parameter 'receiptID' is set if (receiptID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'receiptID' when calling AccountingApi->CreateReceiptAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->CreateReceiptAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->CreateReceiptAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (receiptID != null) requestOptions.PathParameters.Add("ReceiptID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(receiptID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Receipts/{ReceiptID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateReceiptAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Creates a history record for a specific receipt /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task CreateReceiptHistoryAsync (string accessToken, string xeroTenantId, Guid receiptID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateReceiptHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, receiptID, historyRecords, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a history record for a specific receipt /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> CreateReceiptHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateReceiptHistory"); // verify the required parameter 'receiptID' is set if (receiptID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'receiptID' when calling AccountingApi->CreateReceiptHistory"); // verify the required parameter 'historyRecords' is set if (historyRecords == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'historyRecords' when calling AccountingApi->CreateReceiptHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (receiptID != null) requestOptions.PathParameters.Add("ReceiptID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(receiptID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = historyRecords; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/Receipts/{ReceiptID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateReceiptHistory", response); if (exception != null) throw exception; } return response; } /// /// Creates an attachment from a specific repeating invoices by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task CreateRepeatingInvoiceAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateRepeatingInvoiceAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, repeatingInvoiceID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates an attachment from a specific repeating invoices by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> CreateRepeatingInvoiceAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateRepeatingInvoiceAttachmentByFileName"); // verify the required parameter 'repeatingInvoiceID' is set if (repeatingInvoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'repeatingInvoiceID' when calling AccountingApi->CreateRepeatingInvoiceAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->CreateRepeatingInvoiceAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->CreateRepeatingInvoiceAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (repeatingInvoiceID != null) requestOptions.PathParameters.Add("RepeatingInvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(repeatingInvoiceID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateRepeatingInvoiceAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Creates a history record for a specific repeating invoice /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task CreateRepeatingInvoiceHistoryAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateRepeatingInvoiceHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, repeatingInvoiceID, historyRecords, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a history record for a specific repeating invoice /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// HistoryRecords containing an array of HistoryRecord objects in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> CreateRepeatingInvoiceHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, HistoryRecords historyRecords, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateRepeatingInvoiceHistory"); // verify the required parameter 'repeatingInvoiceID' is set if (repeatingInvoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'repeatingInvoiceID' when calling AccountingApi->CreateRepeatingInvoiceHistory"); // verify the required parameter 'historyRecords' is set if (historyRecords == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'historyRecords' when calling AccountingApi->CreateRepeatingInvoiceHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (repeatingInvoiceID != null) requestOptions.PathParameters.Add("RepeatingInvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(repeatingInvoiceID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = historyRecords; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/RepeatingInvoices/{RepeatingInvoiceID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateRepeatingInvoiceHistory", response); if (exception != null) throw exception; } return response; } /// /// Creates one or more repeating invoice templates /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// RepeatingInvoices with an array of repeating invoice objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of RepeatingInvoices public async System.Threading.Tasks.Task CreateRepeatingInvoicesAsync (string accessToken, string xeroTenantId, RepeatingInvoices repeatingInvoices, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateRepeatingInvoicesAsyncWithHttpInfo(accessToken, xeroTenantId, repeatingInvoices, summarizeErrors, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates one or more repeating invoice templates /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// RepeatingInvoices with an array of repeating invoice objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (RepeatingInvoices) public async System.Threading.Tasks.Task> CreateRepeatingInvoicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, RepeatingInvoices repeatingInvoices, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateRepeatingInvoices"); // verify the required parameter 'repeatingInvoices' is set if (repeatingInvoices == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'repeatingInvoices' when calling AccountingApi->CreateRepeatingInvoices"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = repeatingInvoices; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/RepeatingInvoices", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateRepeatingInvoices", response); if (exception != null) throw exception; } return response; } /// /// Creates one or more tax rates /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// TaxRates array with TaxRate object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TaxRates public async System.Threading.Tasks.Task CreateTaxRatesAsync (string accessToken, string xeroTenantId, TaxRates taxRates, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateTaxRatesAsyncWithHttpInfo(accessToken, xeroTenantId, taxRates, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates one or more tax rates /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// TaxRates array with TaxRate object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TaxRates) public async System.Threading.Tasks.Task> CreateTaxRatesAsyncWithHttpInfo (string accessToken, string xeroTenantId, TaxRates taxRates, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateTaxRates"); // verify the required parameter 'taxRates' is set if (taxRates == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'taxRates' when calling AccountingApi->CreateTaxRates"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = taxRates; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/TaxRates", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateTaxRates", response); if (exception != null) throw exception; } return response; } /// /// Create tracking categories /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// TrackingCategory object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TrackingCategories public async System.Threading.Tasks.Task CreateTrackingCategoryAsync (string accessToken, string xeroTenantId, TrackingCategory trackingCategory, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateTrackingCategoryAsyncWithHttpInfo(accessToken, xeroTenantId, trackingCategory, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Create tracking categories /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// TrackingCategory object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TrackingCategories) public async System.Threading.Tasks.Task> CreateTrackingCategoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, TrackingCategory trackingCategory, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateTrackingCategory"); // verify the required parameter 'trackingCategory' is set if (trackingCategory == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'trackingCategory' when calling AccountingApi->CreateTrackingCategory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = trackingCategory; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/TrackingCategories", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateTrackingCategory", response); if (exception != null) throw exception; } return response; } /// /// Creates options for a specific tracking category /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// TrackingOption object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TrackingOptions public async System.Threading.Tasks.Task CreateTrackingOptionsAsync (string accessToken, string xeroTenantId, Guid trackingCategoryID, TrackingOption trackingOption, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await CreateTrackingOptionsAsyncWithHttpInfo(accessToken, xeroTenantId, trackingCategoryID, trackingOption, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates options for a specific tracking category /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// TrackingOption object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TrackingOptions) public async System.Threading.Tasks.Task> CreateTrackingOptionsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid trackingCategoryID, TrackingOption trackingOption, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->CreateTrackingOptions"); // verify the required parameter 'trackingCategoryID' is set if (trackingCategoryID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'trackingCategoryID' when calling AccountingApi->CreateTrackingOptions"); // verify the required parameter 'trackingOption' is set if (trackingOption == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'trackingOption' when calling AccountingApi->CreateTrackingOptions"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (trackingCategoryID != null) requestOptions.PathParameters.Add("TrackingCategoryID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(trackingCategoryID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = trackingOption; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PutAsync("/TrackingCategories/{TrackingCategoryID}/Options", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("CreateTrackingOptions", response); if (exception != null) throw exception; } return response; } /// /// Deletes a chart of accounts /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Accounts public async System.Threading.Tasks.Task DeleteAccountAsync (string accessToken, string xeroTenantId, Guid accountID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await DeleteAccountAsyncWithHttpInfo(accessToken, xeroTenantId, accountID, cancellationToken); return localVarResponse.Data; } /// /// Deletes a chart of accounts /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Accounts) public async System.Threading.Tasks.Task> DeleteAccountAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid accountID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->DeleteAccount"); // verify the required parameter 'accountID' is set if (accountID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'accountID' when calling AccountingApi->DeleteAccount"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (accountID != null) requestOptions.PathParameters.Add("AccountID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(accountID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.DeleteAsync("/Accounts/{AccountID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("DeleteAccount", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific batch payment for invoices and credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BatchPayments public async System.Threading.Tasks.Task DeleteBatchPaymentAsync (string accessToken, string xeroTenantId, BatchPaymentDelete batchPaymentDelete, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await DeleteBatchPaymentAsyncWithHttpInfo(accessToken, xeroTenantId, batchPaymentDelete, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific batch payment for invoices and credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BatchPayments) public async System.Threading.Tasks.Task> DeleteBatchPaymentAsyncWithHttpInfo (string accessToken, string xeroTenantId, BatchPaymentDelete batchPaymentDelete, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->DeleteBatchPayment"); // verify the required parameter 'batchPaymentDelete' is set if (batchPaymentDelete == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'batchPaymentDelete' when calling AccountingApi->DeleteBatchPayment"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = batchPaymentDelete; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/BatchPayments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("DeleteBatchPayment", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific batch payment for invoices and credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for BatchPayment /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BatchPayments public async System.Threading.Tasks.Task DeleteBatchPaymentByUrlParamAsync (string accessToken, string xeroTenantId, Guid batchPaymentID, BatchPaymentDeleteByUrlParam batchPaymentDeleteByUrlParam, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await DeleteBatchPaymentByUrlParamAsyncWithHttpInfo(accessToken, xeroTenantId, batchPaymentID, batchPaymentDeleteByUrlParam, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific batch payment for invoices and credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for BatchPayment /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BatchPayments) public async System.Threading.Tasks.Task> DeleteBatchPaymentByUrlParamAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid batchPaymentID, BatchPaymentDeleteByUrlParam batchPaymentDeleteByUrlParam, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->DeleteBatchPaymentByUrlParam"); // verify the required parameter 'batchPaymentID' is set if (batchPaymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'batchPaymentID' when calling AccountingApi->DeleteBatchPaymentByUrlParam"); // verify the required parameter 'batchPaymentDeleteByUrlParam' is set if (batchPaymentDeleteByUrlParam == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'batchPaymentDeleteByUrlParam' when calling AccountingApi->DeleteBatchPaymentByUrlParam"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (batchPaymentID != null) requestOptions.PathParameters.Add("BatchPaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(batchPaymentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = batchPaymentDeleteByUrlParam; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/BatchPayments/{BatchPaymentID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("DeleteBatchPaymentByUrlParam", response); if (exception != null) throw exception; } return response; } /// /// Deletes a specific contact from a contact group using a unique contact Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of void public async System.Threading.Tasks.Task DeleteContactGroupContactAsync (string accessToken, string xeroTenantId, Guid contactGroupID, Guid contactID, CancellationToken cancellationToken = default) { await DeleteContactGroupContactAsyncWithHttpInfo(accessToken, xeroTenantId, contactGroupID, contactID); } /// /// Deletes a specific contact from a contact group using a unique contact Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteContactGroupContactAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactGroupID, Guid contactID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->DeleteContactGroupContact"); // verify the required parameter 'contactGroupID' is set if (contactGroupID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactGroupID' when calling AccountingApi->DeleteContactGroupContact"); // verify the required parameter 'contactID' is set if (contactID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactID' when calling AccountingApi->DeleteContactGroupContact"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactGroupID != null) requestOptions.PathParameters.Add("ContactGroupID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactGroupID)); // path parameter if (contactID != null) requestOptions.PathParameters.Add("ContactID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.DeleteAsync("/ContactGroups/{ContactGroupID}/Contacts/{ContactID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("DeleteContactGroupContact", response); if (exception != null) throw exception; } return response; } /// /// Deletes all contacts from a specific contact group /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of void public async System.Threading.Tasks.Task DeleteContactGroupContactsAsync (string accessToken, string xeroTenantId, Guid contactGroupID, CancellationToken cancellationToken = default) { await DeleteContactGroupContactsAsyncWithHttpInfo(accessToken, xeroTenantId, contactGroupID); } /// /// Deletes all contacts from a specific contact group /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteContactGroupContactsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactGroupID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->DeleteContactGroupContacts"); // verify the required parameter 'contactGroupID' is set if (contactGroupID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactGroupID' when calling AccountingApi->DeleteContactGroupContacts"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactGroupID != null) requestOptions.PathParameters.Add("ContactGroupID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactGroupID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.DeleteAsync("/ContactGroups/{ContactGroupID}/Contacts", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("DeleteContactGroupContacts", response); if (exception != null) throw exception; } return response; } /// /// Deletes an Allocation from a Credit Note /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Unique identifier for Allocation object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Allocation public async System.Threading.Tasks.Task DeleteCreditNoteAllocationsAsync (string accessToken, string xeroTenantId, Guid creditNoteID, Guid allocationID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await DeleteCreditNoteAllocationsAsyncWithHttpInfo(accessToken, xeroTenantId, creditNoteID, allocationID, cancellationToken); return localVarResponse.Data; } /// /// Deletes an Allocation from a Credit Note /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Unique identifier for Allocation object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Allocation) public async System.Threading.Tasks.Task> DeleteCreditNoteAllocationsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, Guid allocationID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->DeleteCreditNoteAllocations"); // verify the required parameter 'creditNoteID' is set if (creditNoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'creditNoteID' when calling AccountingApi->DeleteCreditNoteAllocations"); // verify the required parameter 'allocationID' is set if (allocationID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'allocationID' when calling AccountingApi->DeleteCreditNoteAllocations"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (creditNoteID != null) requestOptions.PathParameters.Add("CreditNoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(creditNoteID)); // path parameter if (allocationID != null) requestOptions.PathParameters.Add("AllocationID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(allocationID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.DeleteAsync("/CreditNotes/{CreditNoteID}/Allocations/{AllocationID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("DeleteCreditNoteAllocations", response); if (exception != null) throw exception; } return response; } /// /// Deletes a specific item /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of void public async System.Threading.Tasks.Task DeleteItemAsync (string accessToken, string xeroTenantId, Guid itemID, CancellationToken cancellationToken = default) { await DeleteItemAsyncWithHttpInfo(accessToken, xeroTenantId, itemID); } /// /// Deletes a specific item /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteItemAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid itemID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->DeleteItem"); // verify the required parameter 'itemID' is set if (itemID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'itemID' when calling AccountingApi->DeleteItem"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (itemID != null) requestOptions.PathParameters.Add("ItemID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(itemID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.DeleteAsync("/Items/{ItemID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("DeleteItem", response); if (exception != null) throw exception; } return response; } /// /// Deletes a specific linked transactions (billable expenses) /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a LinkedTransaction /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of void public async System.Threading.Tasks.Task DeleteLinkedTransactionAsync (string accessToken, string xeroTenantId, Guid linkedTransactionID, CancellationToken cancellationToken = default) { await DeleteLinkedTransactionAsyncWithHttpInfo(accessToken, xeroTenantId, linkedTransactionID); } /// /// Deletes a specific linked transactions (billable expenses) /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a LinkedTransaction /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse public async System.Threading.Tasks.Task> DeleteLinkedTransactionAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid linkedTransactionID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->DeleteLinkedTransaction"); // verify the required parameter 'linkedTransactionID' is set if (linkedTransactionID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'linkedTransactionID' when calling AccountingApi->DeleteLinkedTransaction"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (linkedTransactionID != null) requestOptions.PathParameters.Add("LinkedTransactionID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(linkedTransactionID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.DeleteAsync("/LinkedTransactions/{LinkedTransactionID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("DeleteLinkedTransaction", response); if (exception != null) throw exception; } return response; } /// /// Deletes an Allocation from an overpayment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// Unique identifier for Allocation object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Allocation public async System.Threading.Tasks.Task DeleteOverpaymentAllocationsAsync (string accessToken, string xeroTenantId, Guid overpaymentID, Guid allocationID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await DeleteOverpaymentAllocationsAsyncWithHttpInfo(accessToken, xeroTenantId, overpaymentID, allocationID, cancellationToken); return localVarResponse.Data; } /// /// Deletes an Allocation from an overpayment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// Unique identifier for Allocation object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Allocation) public async System.Threading.Tasks.Task> DeleteOverpaymentAllocationsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid overpaymentID, Guid allocationID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->DeleteOverpaymentAllocations"); // verify the required parameter 'overpaymentID' is set if (overpaymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'overpaymentID' when calling AccountingApi->DeleteOverpaymentAllocations"); // verify the required parameter 'allocationID' is set if (allocationID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'allocationID' when calling AccountingApi->DeleteOverpaymentAllocations"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (overpaymentID != null) requestOptions.PathParameters.Add("OverpaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(overpaymentID)); // path parameter if (allocationID != null) requestOptions.PathParameters.Add("AllocationID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(allocationID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.DeleteAsync("/Overpayments/{OverpaymentID}/Allocations/{AllocationID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("DeleteOverpaymentAllocations", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific payment for invoices and credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Payment /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Payments public async System.Threading.Tasks.Task DeletePaymentAsync (string accessToken, string xeroTenantId, Guid paymentID, PaymentDelete paymentDelete, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await DeletePaymentAsyncWithHttpInfo(accessToken, xeroTenantId, paymentID, paymentDelete, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific payment for invoices and credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Payment /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Payments) public async System.Threading.Tasks.Task> DeletePaymentAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid paymentID, PaymentDelete paymentDelete, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->DeletePayment"); // verify the required parameter 'paymentID' is set if (paymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'paymentID' when calling AccountingApi->DeletePayment"); // verify the required parameter 'paymentDelete' is set if (paymentDelete == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'paymentDelete' when calling AccountingApi->DeletePayment"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (paymentID != null) requestOptions.PathParameters.Add("PaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(paymentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = paymentDelete; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Payments/{PaymentID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("DeletePayment", response); if (exception != null) throw exception; } return response; } /// /// Deletes an Allocation from a Prepayment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// Unique identifier for Allocation object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Allocation public async System.Threading.Tasks.Task DeletePrepaymentAllocationsAsync (string accessToken, string xeroTenantId, Guid prepaymentID, Guid allocationID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await DeletePrepaymentAllocationsAsyncWithHttpInfo(accessToken, xeroTenantId, prepaymentID, allocationID, cancellationToken); return localVarResponse.Data; } /// /// Deletes an Allocation from a Prepayment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// Unique identifier for Allocation object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Allocation) public async System.Threading.Tasks.Task> DeletePrepaymentAllocationsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid prepaymentID, Guid allocationID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->DeletePrepaymentAllocations"); // verify the required parameter 'prepaymentID' is set if (prepaymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'prepaymentID' when calling AccountingApi->DeletePrepaymentAllocations"); // verify the required parameter 'allocationID' is set if (allocationID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'allocationID' when calling AccountingApi->DeletePrepaymentAllocations"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (prepaymentID != null) requestOptions.PathParameters.Add("PrepaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(prepaymentID)); // path parameter if (allocationID != null) requestOptions.PathParameters.Add("AllocationID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(allocationID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.DeleteAsync("/Prepayments/{PrepaymentID}/Allocations/{AllocationID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("DeletePrepaymentAllocations", response); if (exception != null) throw exception; } return response; } /// /// Deletes a specific tracking category /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TrackingCategories public async System.Threading.Tasks.Task DeleteTrackingCategoryAsync (string accessToken, string xeroTenantId, Guid trackingCategoryID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await DeleteTrackingCategoryAsyncWithHttpInfo(accessToken, xeroTenantId, trackingCategoryID, cancellationToken); return localVarResponse.Data; } /// /// Deletes a specific tracking category /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TrackingCategories) public async System.Threading.Tasks.Task> DeleteTrackingCategoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid trackingCategoryID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->DeleteTrackingCategory"); // verify the required parameter 'trackingCategoryID' is set if (trackingCategoryID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'trackingCategoryID' when calling AccountingApi->DeleteTrackingCategory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (trackingCategoryID != null) requestOptions.PathParameters.Add("TrackingCategoryID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(trackingCategoryID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.DeleteAsync("/TrackingCategories/{TrackingCategoryID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("DeleteTrackingCategory", response); if (exception != null) throw exception; } return response; } /// /// Deletes a specific option for a specific tracking category /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// Unique identifier for a Tracking Option /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TrackingOptions public async System.Threading.Tasks.Task DeleteTrackingOptionsAsync (string accessToken, string xeroTenantId, Guid trackingCategoryID, Guid trackingOptionID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await DeleteTrackingOptionsAsyncWithHttpInfo(accessToken, xeroTenantId, trackingCategoryID, trackingOptionID, cancellationToken); return localVarResponse.Data; } /// /// Deletes a specific option for a specific tracking category /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// Unique identifier for a Tracking Option /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TrackingOptions) public async System.Threading.Tasks.Task> DeleteTrackingOptionsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid trackingCategoryID, Guid trackingOptionID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->DeleteTrackingOptions"); // verify the required parameter 'trackingCategoryID' is set if (trackingCategoryID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'trackingCategoryID' when calling AccountingApi->DeleteTrackingOptions"); // verify the required parameter 'trackingOptionID' is set if (trackingOptionID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'trackingOptionID' when calling AccountingApi->DeleteTrackingOptions"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (trackingCategoryID != null) requestOptions.PathParameters.Add("TrackingCategoryID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(trackingCategoryID)); // path parameter if (trackingOptionID != null) requestOptions.PathParameters.Add("TrackingOptionID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(trackingOptionID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.DeleteAsync("/TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("DeleteTrackingOptions", response); if (exception != null) throw exception; } return response; } /// /// Sends a copy of a specific invoice to related contact via email /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of void public async System.Threading.Tasks.Task EmailInvoiceAsync (string accessToken, string xeroTenantId, Guid invoiceID, RequestEmpty requestEmpty, string idempotencyKey = null, CancellationToken cancellationToken = default) { await EmailInvoiceAsyncWithHttpInfo(accessToken, xeroTenantId, invoiceID, requestEmpty, idempotencyKey); } /// /// Sends a copy of a specific invoice to related contact via email /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse public async System.Threading.Tasks.Task> EmailInvoiceAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, RequestEmpty requestEmpty, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->EmailInvoice"); // verify the required parameter 'invoiceID' is set if (invoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'invoiceID' when calling AccountingApi->EmailInvoice"); // verify the required parameter 'requestEmpty' is set if (requestEmpty == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'requestEmpty' when calling AccountingApi->EmailInvoice"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (invoiceID != null) requestOptions.PathParameters.Add("InvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(invoiceID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = requestEmpty; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Invoices/{InvoiceID}/Email", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("EmailInvoice", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a single chart of accounts by using a unique account Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Accounts public async System.Threading.Tasks.Task GetAccountAsync (string accessToken, string xeroTenantId, Guid accountID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetAccountAsyncWithHttpInfo(accessToken, xeroTenantId, accountID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a single chart of accounts by using a unique account Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Accounts) public async System.Threading.Tasks.Task> GetAccountAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid accountID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetAccount"); // verify the required parameter 'accountID' is set if (accountID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'accountID' when calling AccountingApi->GetAccount"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (accountID != null) requestOptions.PathParameters.Add("AccountID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(accountID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Accounts/{AccountID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetAccount", response); if (exception != null) throw exception; } return response; } /// /// Retrieves an attachment for a specific account by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetAccountAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid accountID, string fileName, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetAccountAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, accountID, fileName, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves an attachment for a specific account by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetAccountAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid accountID, string fileName, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetAccountAttachmentByFileName"); // verify the required parameter 'accountID' is set if (accountID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'accountID' when calling AccountingApi->GetAccountAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->GetAccountAttachmentByFileName"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetAccountAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (accountID != null) requestOptions.PathParameters.Add("AccountID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(accountID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Accounts/{AccountID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetAccountAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific attachment from a specific account using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetAccountAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid accountID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetAccountAttachmentByIdAsyncWithHttpInfo(accessToken, xeroTenantId, accountID, attachmentID, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific attachment from a specific account using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetAccountAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid accountID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetAccountAttachmentById"); // verify the required parameter 'accountID' is set if (accountID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'accountID' when calling AccountingApi->GetAccountAttachmentById"); // verify the required parameter 'attachmentID' is set if (attachmentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'attachmentID' when calling AccountingApi->GetAccountAttachmentById"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetAccountAttachmentById"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (accountID != null) requestOptions.PathParameters.Add("AccountID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(accountID)); // path parameter if (attachmentID != null) requestOptions.PathParameters.Add("AttachmentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(attachmentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Accounts/{AccountID}/Attachments/{AttachmentID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetAccountAttachmentById", response); if (exception != null) throw exception; } return response; } /// /// Retrieves attachments for a specific accounts by using a unique account Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task GetAccountAttachmentsAsync (string accessToken, string xeroTenantId, Guid accountID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetAccountAttachmentsAsyncWithHttpInfo(accessToken, xeroTenantId, accountID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves attachments for a specific accounts by using a unique account Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> GetAccountAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid accountID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetAccountAttachments"); // verify the required parameter 'accountID' is set if (accountID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'accountID' when calling AccountingApi->GetAccountAttachments"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (accountID != null) requestOptions.PathParameters.Add("AccountID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(accountID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Accounts/{AccountID}/Attachments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetAccountAttachments", response); if (exception != null) throw exception; } return response; } /// /// Retrieves the full chart of accounts /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Accounts public async System.Threading.Tasks.Task GetAccountsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetAccountsAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, where, order, cancellationToken); return localVarResponse.Data; } /// /// Retrieves the full chart of accounts /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Accounts) public async System.Threading.Tasks.Task> GetAccountsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetAccounts"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Accounts", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetAccounts", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a single spent or received money transaction by using a unique bank transaction Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BankTransactions public async System.Threading.Tasks.Task GetBankTransactionAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, int? unitdp = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBankTransactionAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransactionID, unitdp, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a single spent or received money transaction by using a unique bank transaction Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BankTransactions) public async System.Threading.Tasks.Task> GetBankTransactionAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, int? unitdp = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBankTransaction"); // verify the required parameter 'bankTransactionID' is set if (bankTransactionID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransactionID' when calling AccountingApi->GetBankTransaction"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (bankTransactionID != null) requestOptions.PathParameters.Add("BankTransactionID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(bankTransactionID)); // path parameter if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BankTransactions/{BankTransactionID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBankTransaction", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific attachment from a specific bank transaction by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetBankTransactionAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, string fileName, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBankTransactionAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransactionID, fileName, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific attachment from a specific bank transaction by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetBankTransactionAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, string fileName, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBankTransactionAttachmentByFileName"); // verify the required parameter 'bankTransactionID' is set if (bankTransactionID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransactionID' when calling AccountingApi->GetBankTransactionAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->GetBankTransactionAttachmentByFileName"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetBankTransactionAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (bankTransactionID != null) requestOptions.PathParameters.Add("BankTransactionID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(bankTransactionID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BankTransactions/{BankTransactionID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBankTransactionAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Retrieves specific attachments from a specific BankTransaction using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetBankTransactionAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBankTransactionAttachmentByIdAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransactionID, attachmentID, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves specific attachments from a specific BankTransaction using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetBankTransactionAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBankTransactionAttachmentById"); // verify the required parameter 'bankTransactionID' is set if (bankTransactionID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransactionID' when calling AccountingApi->GetBankTransactionAttachmentById"); // verify the required parameter 'attachmentID' is set if (attachmentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'attachmentID' when calling AccountingApi->GetBankTransactionAttachmentById"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetBankTransactionAttachmentById"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (bankTransactionID != null) requestOptions.PathParameters.Add("BankTransactionID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(bankTransactionID)); // path parameter if (attachmentID != null) requestOptions.PathParameters.Add("AttachmentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(attachmentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BankTransactions/{BankTransactionID}/Attachments/{AttachmentID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBankTransactionAttachmentById", response); if (exception != null) throw exception; } return response; } /// /// Retrieves any attachments from a specific bank transactions /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task GetBankTransactionAttachmentsAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBankTransactionAttachmentsAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransactionID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves any attachments from a specific bank transactions /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> GetBankTransactionAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBankTransactionAttachments"); // verify the required parameter 'bankTransactionID' is set if (bankTransactionID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransactionID' when calling AccountingApi->GetBankTransactionAttachments"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (bankTransactionID != null) requestOptions.PathParameters.Add("BankTransactionID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(bankTransactionID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BankTransactions/{BankTransactionID}/Attachments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBankTransactionAttachments", response); if (exception != null) throw exception; } return response; } /// /// Retrieves any spent or received money transactions /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Up to 100 bank transactions will be returned in a single API call with line items details (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BankTransactions public async System.Threading.Tasks.Task GetBankTransactionsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, int? unitdp = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBankTransactionsAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp, cancellationToken); return localVarResponse.Data; } /// /// Retrieves any spent or received money transactions /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Up to 100 bank transactions will be returned in a single API call with line items details (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BankTransactions) public async System.Threading.Tasks.Task> GetBankTransactionsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, int? unitdp = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBankTransactions"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (page != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "page", page)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BankTransactions", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBankTransactions", response); if (exception != null) throw exception; } return response; } /// /// Retrieves history from a specific bank transaction using a unique bank transaction Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task GetBankTransactionsHistoryAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBankTransactionsHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransactionID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves history from a specific bank transaction using a unique bank transaction Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> GetBankTransactionsHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBankTransactionsHistory"); // verify the required parameter 'bankTransactionID' is set if (bankTransactionID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransactionID' when calling AccountingApi->GetBankTransactionsHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (bankTransactionID != null) requestOptions.PathParameters.Add("BankTransactionID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(bankTransactionID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BankTransactions/{BankTransactionID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBankTransactionsHistory", response); if (exception != null) throw exception; } return response; } /// /// Retrieves specific bank transfers by using a unique bank transfer Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BankTransfers public async System.Threading.Tasks.Task GetBankTransferAsync (string accessToken, string xeroTenantId, Guid bankTransferID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBankTransferAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransferID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves specific bank transfers by using a unique bank transfer Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BankTransfers) public async System.Threading.Tasks.Task> GetBankTransferAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransferID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBankTransfer"); // verify the required parameter 'bankTransferID' is set if (bankTransferID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransferID' when calling AccountingApi->GetBankTransfer"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (bankTransferID != null) requestOptions.PathParameters.Add("BankTransferID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(bankTransferID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BankTransfers/{BankTransferID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBankTransfer", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific attachment on a specific bank transfer by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetBankTransferAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid bankTransferID, string fileName, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBankTransferAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransferID, fileName, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific attachment on a specific bank transfer by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetBankTransferAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransferID, string fileName, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBankTransferAttachmentByFileName"); // verify the required parameter 'bankTransferID' is set if (bankTransferID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransferID' when calling AccountingApi->GetBankTransferAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->GetBankTransferAttachmentByFileName"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetBankTransferAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (bankTransferID != null) requestOptions.PathParameters.Add("BankTransferID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(bankTransferID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BankTransfers/{BankTransferID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBankTransferAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific attachment from a specific bank transfer using a unique attachment ID /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetBankTransferAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid bankTransferID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBankTransferAttachmentByIdAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransferID, attachmentID, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific attachment from a specific bank transfer using a unique attachment ID /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetBankTransferAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransferID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBankTransferAttachmentById"); // verify the required parameter 'bankTransferID' is set if (bankTransferID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransferID' when calling AccountingApi->GetBankTransferAttachmentById"); // verify the required parameter 'attachmentID' is set if (attachmentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'attachmentID' when calling AccountingApi->GetBankTransferAttachmentById"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetBankTransferAttachmentById"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (bankTransferID != null) requestOptions.PathParameters.Add("BankTransferID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(bankTransferID)); // path parameter if (attachmentID != null) requestOptions.PathParameters.Add("AttachmentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(attachmentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BankTransfers/{BankTransferID}/Attachments/{AttachmentID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBankTransferAttachmentById", response); if (exception != null) throw exception; } return response; } /// /// Retrieves attachments from a specific bank transfer /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task GetBankTransferAttachmentsAsync (string accessToken, string xeroTenantId, Guid bankTransferID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBankTransferAttachmentsAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransferID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves attachments from a specific bank transfer /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> GetBankTransferAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransferID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBankTransferAttachments"); // verify the required parameter 'bankTransferID' is set if (bankTransferID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransferID' when calling AccountingApi->GetBankTransferAttachments"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (bankTransferID != null) requestOptions.PathParameters.Add("BankTransferID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(bankTransferID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BankTransfers/{BankTransferID}/Attachments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBankTransferAttachments", response); if (exception != null) throw exception; } return response; } /// /// Retrieves history from a specific bank transfer using a unique bank transfer Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task GetBankTransferHistoryAsync (string accessToken, string xeroTenantId, Guid bankTransferID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBankTransferHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransferID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves history from a specific bank transfer using a unique bank transfer Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> GetBankTransferHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransferID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBankTransferHistory"); // verify the required parameter 'bankTransferID' is set if (bankTransferID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransferID' when calling AccountingApi->GetBankTransferHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (bankTransferID != null) requestOptions.PathParameters.Add("BankTransferID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(bankTransferID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BankTransfers/{BankTransferID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBankTransferHistory", response); if (exception != null) throw exception; } return response; } /// /// Retrieves all bank transfers /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BankTransfers public async System.Threading.Tasks.Task GetBankTransfersAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBankTransfersAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, where, order, cancellationToken); return localVarResponse.Data; } /// /// Retrieves all bank transfers /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BankTransfers) public async System.Threading.Tasks.Task> GetBankTransfersAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBankTransfers"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BankTransfers", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBankTransfers", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific batch payment using a unique batch payment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for BatchPayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BatchPayments public async System.Threading.Tasks.Task GetBatchPaymentAsync (string accessToken, string xeroTenantId, Guid batchPaymentID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBatchPaymentAsyncWithHttpInfo(accessToken, xeroTenantId, batchPaymentID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific batch payment using a unique batch payment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for BatchPayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BatchPayments) public async System.Threading.Tasks.Task> GetBatchPaymentAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid batchPaymentID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBatchPayment"); // verify the required parameter 'batchPaymentID' is set if (batchPaymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'batchPaymentID' when calling AccountingApi->GetBatchPayment"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (batchPaymentID != null) requestOptions.PathParameters.Add("BatchPaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(batchPaymentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BatchPayments/{BatchPaymentID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBatchPayment", response); if (exception != null) throw exception; } return response; } /// /// Retrieves history from a specific batch payment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for BatchPayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task GetBatchPaymentHistoryAsync (string accessToken, string xeroTenantId, Guid batchPaymentID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBatchPaymentHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, batchPaymentID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves history from a specific batch payment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for BatchPayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> GetBatchPaymentHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid batchPaymentID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBatchPaymentHistory"); // verify the required parameter 'batchPaymentID' is set if (batchPaymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'batchPaymentID' when calling AccountingApi->GetBatchPaymentHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (batchPaymentID != null) requestOptions.PathParameters.Add("BatchPaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(batchPaymentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BatchPayments/{BatchPaymentID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBatchPaymentHistory", response); if (exception != null) throw exception; } return response; } /// /// Retrieves either one or many batch payments for invoices /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BatchPayments public async System.Threading.Tasks.Task GetBatchPaymentsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBatchPaymentsAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, where, order, cancellationToken); return localVarResponse.Data; } /// /// Retrieves either one or many batch payments for invoices /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BatchPayments) public async System.Threading.Tasks.Task> GetBatchPaymentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBatchPayments"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BatchPayments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBatchPayments", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific branding theme using a unique branding theme Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Branding Theme /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BrandingThemes public async System.Threading.Tasks.Task GetBrandingThemeAsync (string accessToken, string xeroTenantId, Guid brandingThemeID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBrandingThemeAsyncWithHttpInfo(accessToken, xeroTenantId, brandingThemeID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific branding theme using a unique branding theme Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Branding Theme /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BrandingThemes) public async System.Threading.Tasks.Task> GetBrandingThemeAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid brandingThemeID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBrandingTheme"); // verify the required parameter 'brandingThemeID' is set if (brandingThemeID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'brandingThemeID' when calling AccountingApi->GetBrandingTheme"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (brandingThemeID != null) requestOptions.PathParameters.Add("BrandingThemeID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(brandingThemeID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BrandingThemes/{BrandingThemeID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBrandingTheme", response); if (exception != null) throw exception; } return response; } /// /// Retrieves the payment services for a specific branding theme /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Branding Theme /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PaymentServices public async System.Threading.Tasks.Task GetBrandingThemePaymentServicesAsync (string accessToken, string xeroTenantId, Guid brandingThemeID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBrandingThemePaymentServicesAsyncWithHttpInfo(accessToken, xeroTenantId, brandingThemeID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves the payment services for a specific branding theme /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Branding Theme /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PaymentServices) public async System.Threading.Tasks.Task> GetBrandingThemePaymentServicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid brandingThemeID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBrandingThemePaymentServices"); // verify the required parameter 'brandingThemeID' is set if (brandingThemeID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'brandingThemeID' when calling AccountingApi->GetBrandingThemePaymentServices"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (brandingThemeID != null) requestOptions.PathParameters.Add("BrandingThemeID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(brandingThemeID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BrandingThemes/{BrandingThemeID}/PaymentServices", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBrandingThemePaymentServices", response); if (exception != null) throw exception; } return response; } /// /// Retrieves all the branding themes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BrandingThemes public async System.Threading.Tasks.Task GetBrandingThemesAsync (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBrandingThemesAsyncWithHttpInfo(accessToken, xeroTenantId, cancellationToken); return localVarResponse.Data; } /// /// Retrieves all the branding themes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BrandingThemes) public async System.Threading.Tasks.Task> GetBrandingThemesAsyncWithHttpInfo (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBrandingThemes"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/BrandingThemes", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBrandingThemes", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific budget, which includes budget lines /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Budgets /// Filter by start date (optional) /// Filter by end date (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Budgets public async System.Threading.Tasks.Task GetBudgetAsync (string accessToken, string xeroTenantId, Guid budgetID, DateTime? dateTo = null, DateTime? dateFrom = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBudgetAsyncWithHttpInfo(accessToken, xeroTenantId, budgetID, dateTo, dateFrom, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific budget, which includes budget lines /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Budgets /// Filter by start date (optional) /// Filter by end date (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Budgets) public async System.Threading.Tasks.Task> GetBudgetAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid budgetID, DateTime? dateTo = null, DateTime? dateFrom = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBudget"); // verify the required parameter 'budgetID' is set if (budgetID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'budgetID' when calling AccountingApi->GetBudget"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (budgetID != null) requestOptions.PathParameters.Add("BudgetID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(budgetID)); // path parameter if (dateTo != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "DateTo", dateTo)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (dateFrom != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "DateFrom", dateFrom)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Budgets/{BudgetID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBudget", response); if (exception != null) throw exception; } return response; } /// /// Retrieve a list of budgets /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by BudgetID. Allows you to retrieve a specific individual budget. (optional) /// Filter by start date (optional) /// Filter by end date (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Budgets public async System.Threading.Tasks.Task GetBudgetsAsync (string accessToken, string xeroTenantId, List iDs = null, DateTime? dateTo = null, DateTime? dateFrom = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetBudgetsAsyncWithHttpInfo(accessToken, xeroTenantId, iDs, dateTo, dateFrom, cancellationToken); return localVarResponse.Data; } /// /// Retrieve a list of budgets /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by BudgetID. Allows you to retrieve a specific individual budget. (optional) /// Filter by start date (optional) /// Filter by end date (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Budgets) public async System.Threading.Tasks.Task> GetBudgetsAsyncWithHttpInfo (string accessToken, string xeroTenantId, List iDs = null, DateTime? dateTo = null, DateTime? dateFrom = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetBudgets"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (iDs != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("csv", "IDs", iDs)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (dateTo != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "DateTo", dateTo)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (dateFrom != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "DateFrom", dateFrom)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Budgets", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetBudgets", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific contacts in a Xero organisation using a unique contact Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Contacts public async System.Threading.Tasks.Task GetContactAsync (string accessToken, string xeroTenantId, Guid contactID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetContactAsyncWithHttpInfo(accessToken, xeroTenantId, contactID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific contacts in a Xero organisation using a unique contact Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Contacts) public async System.Threading.Tasks.Task> GetContactAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetContact"); // verify the required parameter 'contactID' is set if (contactID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactID' when calling AccountingApi->GetContact"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactID != null) requestOptions.PathParameters.Add("ContactID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Contacts/{ContactID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetContact", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific attachment from a specific contact by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetContactAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid contactID, string fileName, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetContactAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, contactID, fileName, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific attachment from a specific contact by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetContactAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, string fileName, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetContactAttachmentByFileName"); // verify the required parameter 'contactID' is set if (contactID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactID' when calling AccountingApi->GetContactAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->GetContactAttachmentByFileName"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetContactAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactID != null) requestOptions.PathParameters.Add("ContactID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Contacts/{ContactID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetContactAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific attachment from a specific contact using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetContactAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid contactID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetContactAttachmentByIdAsyncWithHttpInfo(accessToken, xeroTenantId, contactID, attachmentID, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific attachment from a specific contact using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetContactAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetContactAttachmentById"); // verify the required parameter 'contactID' is set if (contactID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactID' when calling AccountingApi->GetContactAttachmentById"); // verify the required parameter 'attachmentID' is set if (attachmentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'attachmentID' when calling AccountingApi->GetContactAttachmentById"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetContactAttachmentById"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactID != null) requestOptions.PathParameters.Add("ContactID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactID)); // path parameter if (attachmentID != null) requestOptions.PathParameters.Add("AttachmentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(attachmentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Contacts/{ContactID}/Attachments/{AttachmentID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetContactAttachmentById", response); if (exception != null) throw exception; } return response; } /// /// Retrieves attachments for a specific contact in a Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task GetContactAttachmentsAsync (string accessToken, string xeroTenantId, Guid contactID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetContactAttachmentsAsyncWithHttpInfo(accessToken, xeroTenantId, contactID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves attachments for a specific contact in a Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> GetContactAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetContactAttachments"); // verify the required parameter 'contactID' is set if (contactID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactID' when calling AccountingApi->GetContactAttachments"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactID != null) requestOptions.PathParameters.Add("ContactID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Contacts/{ContactID}/Attachments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetContactAttachments", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific contact by contact number in a Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Contacts public async System.Threading.Tasks.Task GetContactByContactNumberAsync (string accessToken, string xeroTenantId, string contactNumber, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetContactByContactNumberAsyncWithHttpInfo(accessToken, xeroTenantId, contactNumber, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific contact by contact number in a Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Contacts) public async System.Threading.Tasks.Task> GetContactByContactNumberAsyncWithHttpInfo (string accessToken, string xeroTenantId, string contactNumber, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetContactByContactNumber"); // verify the required parameter 'contactNumber' is set if (contactNumber == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactNumber' when calling AccountingApi->GetContactByContactNumber"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactNumber != null) requestOptions.PathParameters.Add("ContactNumber", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactNumber)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Contacts/{ContactNumber}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetContactByContactNumber", response); if (exception != null) throw exception; } return response; } /// /// Retrieves CIS settings for a specific contact in a Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of CISSettings public async System.Threading.Tasks.Task GetContactCISSettingsAsync (string accessToken, string xeroTenantId, Guid contactID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetContactCISSettingsAsyncWithHttpInfo(accessToken, xeroTenantId, contactID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves CIS settings for a specific contact in a Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (CISSettings) public async System.Threading.Tasks.Task> GetContactCISSettingsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetContactCISSettings"); // verify the required parameter 'contactID' is set if (contactID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactID' when calling AccountingApi->GetContactCISSettings"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactID != null) requestOptions.PathParameters.Add("ContactID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Contacts/{ContactID}/CISSettings", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetContactCISSettings", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific contact group by using a unique contact group Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ContactGroups public async System.Threading.Tasks.Task GetContactGroupAsync (string accessToken, string xeroTenantId, Guid contactGroupID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetContactGroupAsyncWithHttpInfo(accessToken, xeroTenantId, contactGroupID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific contact group by using a unique contact group Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ContactGroups) public async System.Threading.Tasks.Task> GetContactGroupAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactGroupID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetContactGroup"); // verify the required parameter 'contactGroupID' is set if (contactGroupID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactGroupID' when calling AccountingApi->GetContactGroup"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactGroupID != null) requestOptions.PathParameters.Add("ContactGroupID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactGroupID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/ContactGroups/{ContactGroupID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetContactGroup", response); if (exception != null) throw exception; } return response; } /// /// Retrieves the contact Id and name of each contact group /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ContactGroups public async System.Threading.Tasks.Task GetContactGroupsAsync (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetContactGroupsAsyncWithHttpInfo(accessToken, xeroTenantId, where, order, cancellationToken); return localVarResponse.Data; } /// /// Retrieves the contact Id and name of each contact group /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ContactGroups) public async System.Threading.Tasks.Task> GetContactGroupsAsyncWithHttpInfo (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetContactGroups"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/ContactGroups", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetContactGroups", response); if (exception != null) throw exception; } return response; } /// /// Retrieves history records for a specific contact /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task GetContactHistoryAsync (string accessToken, string xeroTenantId, Guid contactID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetContactHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, contactID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves history records for a specific contact /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> GetContactHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetContactHistory"); // verify the required parameter 'contactID' is set if (contactID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactID' when calling AccountingApi->GetContactHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactID != null) requestOptions.PathParameters.Add("ContactID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Contacts/{ContactID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetContactHistory", response); if (exception != null) throw exception; } return response; } /// /// Retrieves all contacts in a Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Filter by a comma separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call. (optional) /// e.g. page=1 - Up to 100 contacts will be returned in a single API call. (optional) /// e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response (optional) /// Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. (optional, default to false) /// Search parameter that performs a case-insensitive text search across the Name, FirstName, LastName, ContactNumber and EmailAddress fields. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Contacts public async System.Threading.Tasks.Task GetContactsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, List iDs = null, int? page = null, bool? includeArchived = null, bool? summaryOnly = null, string searchTerm = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetContactsAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, where, order, iDs, page, includeArchived, summaryOnly, searchTerm, cancellationToken); return localVarResponse.Data; } /// /// Retrieves all contacts in a Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Filter by a comma separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call. (optional) /// e.g. page=1 - Up to 100 contacts will be returned in a single API call. (optional) /// e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response (optional) /// Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. (optional, default to false) /// Search parameter that performs a case-insensitive text search across the Name, FirstName, LastName, ContactNumber and EmailAddress fields. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Contacts) public async System.Threading.Tasks.Task> GetContactsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, List iDs = null, int? page = null, bool? includeArchived = null, bool? summaryOnly = null, string searchTerm = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetContacts"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (iDs != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("csv", "IDs", iDs)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (page != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "page", page)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (includeArchived != null) { requestOptions.QueryParameters.Add("includeArchived", includeArchived.ToString()); } if (summaryOnly != null) { requestOptions.QueryParameters.Add("summaryOnly", summaryOnly.ToString()); } if (searchTerm != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "searchTerm", searchTerm)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Contacts", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetContacts", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific credit note using a unique credit note Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of CreditNotes public async System.Threading.Tasks.Task GetCreditNoteAsync (string accessToken, string xeroTenantId, Guid creditNoteID, int? unitdp = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetCreditNoteAsyncWithHttpInfo(accessToken, xeroTenantId, creditNoteID, unitdp, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific credit note using a unique credit note Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (CreditNotes) public async System.Threading.Tasks.Task> GetCreditNoteAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, int? unitdp = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetCreditNote"); // verify the required parameter 'creditNoteID' is set if (creditNoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'creditNoteID' when calling AccountingApi->GetCreditNote"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (creditNoteID != null) requestOptions.PathParameters.Add("CreditNoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(creditNoteID)); // path parameter if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/CreditNotes/{CreditNoteID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetCreditNote", response); if (exception != null) throw exception; } return response; } /// /// Retrieves credit notes as PDF files /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetCreditNoteAsPdfAsync (string accessToken, string xeroTenantId, Guid creditNoteID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetCreditNoteAsPdfAsyncWithHttpInfo(accessToken, xeroTenantId, creditNoteID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves credit notes as PDF files /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetCreditNoteAsPdfAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetCreditNoteAsPdf"); // verify the required parameter 'creditNoteID' is set if (creditNoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'creditNoteID' when calling AccountingApi->GetCreditNoteAsPdf"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/pdf" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (creditNoteID != null) requestOptions.PathParameters.Add("CreditNoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(creditNoteID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/CreditNotes/{CreditNoteID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetCreditNoteAsPdf", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific attachment on a specific credit note by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetCreditNoteAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid creditNoteID, string fileName, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetCreditNoteAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, creditNoteID, fileName, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific attachment on a specific credit note by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetCreditNoteAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, string fileName, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetCreditNoteAttachmentByFileName"); // verify the required parameter 'creditNoteID' is set if (creditNoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'creditNoteID' when calling AccountingApi->GetCreditNoteAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->GetCreditNoteAttachmentByFileName"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetCreditNoteAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (creditNoteID != null) requestOptions.PathParameters.Add("CreditNoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(creditNoteID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/CreditNotes/{CreditNoteID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetCreditNoteAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific attachment from a specific credit note using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetCreditNoteAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid creditNoteID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetCreditNoteAttachmentByIdAsyncWithHttpInfo(accessToken, xeroTenantId, creditNoteID, attachmentID, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific attachment from a specific credit note using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetCreditNoteAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetCreditNoteAttachmentById"); // verify the required parameter 'creditNoteID' is set if (creditNoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'creditNoteID' when calling AccountingApi->GetCreditNoteAttachmentById"); // verify the required parameter 'attachmentID' is set if (attachmentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'attachmentID' when calling AccountingApi->GetCreditNoteAttachmentById"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetCreditNoteAttachmentById"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (creditNoteID != null) requestOptions.PathParameters.Add("CreditNoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(creditNoteID)); // path parameter if (attachmentID != null) requestOptions.PathParameters.Add("AttachmentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(attachmentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/CreditNotes/{CreditNoteID}/Attachments/{AttachmentID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetCreditNoteAttachmentById", response); if (exception != null) throw exception; } return response; } /// /// Retrieves attachments for a specific credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task GetCreditNoteAttachmentsAsync (string accessToken, string xeroTenantId, Guid creditNoteID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetCreditNoteAttachmentsAsyncWithHttpInfo(accessToken, xeroTenantId, creditNoteID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves attachments for a specific credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> GetCreditNoteAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetCreditNoteAttachments"); // verify the required parameter 'creditNoteID' is set if (creditNoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'creditNoteID' when calling AccountingApi->GetCreditNoteAttachments"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (creditNoteID != null) requestOptions.PathParameters.Add("CreditNoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(creditNoteID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/CreditNotes/{CreditNoteID}/Attachments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetCreditNoteAttachments", response); if (exception != null) throw exception; } return response; } /// /// Retrieves history records of a specific credit note /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task GetCreditNoteHistoryAsync (string accessToken, string xeroTenantId, Guid creditNoteID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetCreditNoteHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, creditNoteID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves history records of a specific credit note /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> GetCreditNoteHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetCreditNoteHistory"); // verify the required parameter 'creditNoteID' is set if (creditNoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'creditNoteID' when calling AccountingApi->GetCreditNoteHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (creditNoteID != null) requestOptions.PathParameters.Add("CreditNoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(creditNoteID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/CreditNotes/{CreditNoteID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetCreditNoteHistory", response); if (exception != null) throw exception; } return response; } /// /// Retrieves any credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. page=1 – Up to 100 credit notes will be returned in a single API call with line items shown for each credit note (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of CreditNotes public async System.Threading.Tasks.Task GetCreditNotesAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, int? unitdp = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetCreditNotesAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp, cancellationToken); return localVarResponse.Data; } /// /// Retrieves any credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. page=1 – Up to 100 credit notes will be returned in a single API call with line items shown for each credit note (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (CreditNotes) public async System.Threading.Tasks.Task> GetCreditNotesAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, int? unitdp = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetCreditNotes"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (page != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "page", page)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/CreditNotes", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetCreditNotes", response); if (exception != null) throw exception; } return response; } /// /// Retrieves currencies for your Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Currencies public async System.Threading.Tasks.Task GetCurrenciesAsync (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetCurrenciesAsyncWithHttpInfo(accessToken, xeroTenantId, where, order, cancellationToken); return localVarResponse.Data; } /// /// Retrieves currencies for your Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Currencies) public async System.Threading.Tasks.Task> GetCurrenciesAsyncWithHttpInfo (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetCurrencies"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Currencies", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetCurrencies", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific employee used in Xero payrun using a unique employee Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Employee /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Employees public async System.Threading.Tasks.Task GetEmployeeAsync (string accessToken, string xeroTenantId, Guid employeeID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetEmployeeAsyncWithHttpInfo(accessToken, xeroTenantId, employeeID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific employee used in Xero payrun using a unique employee Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Employee /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Employees) public async System.Threading.Tasks.Task> GetEmployeeAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid employeeID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetEmployee"); // verify the required parameter 'employeeID' is set if (employeeID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'employeeID' when calling AccountingApi->GetEmployee"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (employeeID != null) requestOptions.PathParameters.Add("EmployeeID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(employeeID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Employees/{EmployeeID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetEmployee", response); if (exception != null) throw exception; } return response; } /// /// Retrieves employees used in Xero payrun /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Employees public async System.Threading.Tasks.Task GetEmployeesAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetEmployeesAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, where, order, cancellationToken); return localVarResponse.Data; } /// /// Retrieves employees used in Xero payrun /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Employees) public async System.Threading.Tasks.Task> GetEmployeesAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetEmployees"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Employees", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetEmployees", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific expense claim using a unique expense claim Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ExpenseClaim /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ExpenseClaims public async System.Threading.Tasks.Task GetExpenseClaimAsync (string accessToken, string xeroTenantId, Guid expenseClaimID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetExpenseClaimAsyncWithHttpInfo(accessToken, xeroTenantId, expenseClaimID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific expense claim using a unique expense claim Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ExpenseClaim /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ExpenseClaims) public async System.Threading.Tasks.Task> GetExpenseClaimAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid expenseClaimID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetExpenseClaim"); // verify the required parameter 'expenseClaimID' is set if (expenseClaimID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'expenseClaimID' when calling AccountingApi->GetExpenseClaim"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (expenseClaimID != null) requestOptions.PathParameters.Add("ExpenseClaimID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(expenseClaimID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/ExpenseClaims/{ExpenseClaimID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetExpenseClaim", response); if (exception != null) throw exception; } return response; } /// /// Retrieves history records of a specific expense claim /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ExpenseClaim /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task GetExpenseClaimHistoryAsync (string accessToken, string xeroTenantId, Guid expenseClaimID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetExpenseClaimHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, expenseClaimID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves history records of a specific expense claim /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ExpenseClaim /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> GetExpenseClaimHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid expenseClaimID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetExpenseClaimHistory"); // verify the required parameter 'expenseClaimID' is set if (expenseClaimID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'expenseClaimID' when calling AccountingApi->GetExpenseClaimHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (expenseClaimID != null) requestOptions.PathParameters.Add("ExpenseClaimID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(expenseClaimID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/ExpenseClaims/{ExpenseClaimID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetExpenseClaimHistory", response); if (exception != null) throw exception; } return response; } /// /// Retrieves expense claims /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ExpenseClaims public async System.Threading.Tasks.Task GetExpenseClaimsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetExpenseClaimsAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, where, order, cancellationToken); return localVarResponse.Data; } /// /// Retrieves expense claims /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ExpenseClaims) public async System.Threading.Tasks.Task> GetExpenseClaimsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetExpenseClaims"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/ExpenseClaims", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetExpenseClaims", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific sales invoice or purchase bill using a unique invoice Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Invoices public async System.Threading.Tasks.Task GetInvoiceAsync (string accessToken, string xeroTenantId, Guid invoiceID, int? unitdp = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetInvoiceAsyncWithHttpInfo(accessToken, xeroTenantId, invoiceID, unitdp, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific sales invoice or purchase bill using a unique invoice Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Invoices) public async System.Threading.Tasks.Task> GetInvoiceAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, int? unitdp = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetInvoice"); // verify the required parameter 'invoiceID' is set if (invoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'invoiceID' when calling AccountingApi->GetInvoice"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (invoiceID != null) requestOptions.PathParameters.Add("InvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(invoiceID)); // path parameter if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Invoices/{InvoiceID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetInvoice", response); if (exception != null) throw exception; } return response; } /// /// Retrieves invoices or purchase bills as PDF files /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetInvoiceAsPdfAsync (string accessToken, string xeroTenantId, Guid invoiceID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetInvoiceAsPdfAsyncWithHttpInfo(accessToken, xeroTenantId, invoiceID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves invoices or purchase bills as PDF files /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetInvoiceAsPdfAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetInvoiceAsPdf"); // verify the required parameter 'invoiceID' is set if (invoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'invoiceID' when calling AccountingApi->GetInvoiceAsPdf"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/pdf" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (invoiceID != null) requestOptions.PathParameters.Add("InvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(invoiceID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Invoices/{InvoiceID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetInvoiceAsPdf", response); if (exception != null) throw exception; } return response; } /// /// Retrieves an attachment from a specific invoice or purchase bill by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetInvoiceAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid invoiceID, string fileName, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetInvoiceAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, invoiceID, fileName, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves an attachment from a specific invoice or purchase bill by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetInvoiceAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, string fileName, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetInvoiceAttachmentByFileName"); // verify the required parameter 'invoiceID' is set if (invoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'invoiceID' when calling AccountingApi->GetInvoiceAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->GetInvoiceAttachmentByFileName"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetInvoiceAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (invoiceID != null) requestOptions.PathParameters.Add("InvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(invoiceID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Invoices/{InvoiceID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetInvoiceAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific attachment from a specific invoices or purchase bills by using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetInvoiceAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid invoiceID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetInvoiceAttachmentByIdAsyncWithHttpInfo(accessToken, xeroTenantId, invoiceID, attachmentID, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific attachment from a specific invoices or purchase bills by using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetInvoiceAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetInvoiceAttachmentById"); // verify the required parameter 'invoiceID' is set if (invoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'invoiceID' when calling AccountingApi->GetInvoiceAttachmentById"); // verify the required parameter 'attachmentID' is set if (attachmentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'attachmentID' when calling AccountingApi->GetInvoiceAttachmentById"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetInvoiceAttachmentById"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (invoiceID != null) requestOptions.PathParameters.Add("InvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(invoiceID)); // path parameter if (attachmentID != null) requestOptions.PathParameters.Add("AttachmentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(attachmentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Invoices/{InvoiceID}/Attachments/{AttachmentID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetInvoiceAttachmentById", response); if (exception != null) throw exception; } return response; } /// /// Retrieves attachments for a specific invoice or purchase bill /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task GetInvoiceAttachmentsAsync (string accessToken, string xeroTenantId, Guid invoiceID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetInvoiceAttachmentsAsyncWithHttpInfo(accessToken, xeroTenantId, invoiceID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves attachments for a specific invoice or purchase bill /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> GetInvoiceAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetInvoiceAttachments"); // verify the required parameter 'invoiceID' is set if (invoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'invoiceID' when calling AccountingApi->GetInvoiceAttachments"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (invoiceID != null) requestOptions.PathParameters.Add("InvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(invoiceID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Invoices/{InvoiceID}/Attachments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetInvoiceAttachments", response); if (exception != null) throw exception; } return response; } /// /// Retrieves history records for a specific invoice /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task GetInvoiceHistoryAsync (string accessToken, string xeroTenantId, Guid invoiceID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetInvoiceHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, invoiceID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves history records for a specific invoice /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> GetInvoiceHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetInvoiceHistory"); // verify the required parameter 'invoiceID' is set if (invoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'invoiceID' when calling AccountingApi->GetInvoiceHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (invoiceID != null) requestOptions.PathParameters.Add("InvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(invoiceID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Invoices/{InvoiceID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetInvoiceHistory", response); if (exception != null) throw exception; } return response; } /// /// Retrieves invoice reminder settings /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of InvoiceReminders public async System.Threading.Tasks.Task GetInvoiceRemindersAsync (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetInvoiceRemindersAsyncWithHttpInfo(accessToken, xeroTenantId, cancellationToken); return localVarResponse.Data; } /// /// Retrieves invoice reminder settings /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (InvoiceReminders) public async System.Threading.Tasks.Task> GetInvoiceRemindersAsyncWithHttpInfo (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetInvoiceReminders"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/InvoiceReminders/Settings", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetInvoiceReminders", response); if (exception != null) throw exception; } return response; } /// /// Retrieves sales invoices or purchase bills /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Filter by a comma-separated list of InvoicesIDs. (optional) /// Filter by a comma-separated list of InvoiceNumbers. (optional) /// Filter by a comma-separated list of ContactIDs. (optional) /// Filter by a comma-separated list Statuses. For faster response times we recommend using these explicit parameters instead of passing OR conditions into the Where filter. (optional) /// e.g. page=1 – Up to 100 invoices will be returned in a single API call with line items shown for each invoice (optional) /// e.g. includeArchived=true - Invoices with a status of ARCHIVED will be included in the response (optional) /// When set to true you'll only retrieve Invoices created by your app (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. (optional, default to false) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Invoices public async System.Threading.Tasks.Task GetInvoicesAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, List iDs = null, List invoiceNumbers = null, List contactIDs = null, List statuses = null, int? page = null, bool? includeArchived = null, bool? createdByMyApp = null, int? unitdp = null, bool? summaryOnly = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetInvoicesAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, where, order, iDs, invoiceNumbers, contactIDs, statuses, page, includeArchived, createdByMyApp, unitdp, summaryOnly, cancellationToken); return localVarResponse.Data; } /// /// Retrieves sales invoices or purchase bills /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Filter by a comma-separated list of InvoicesIDs. (optional) /// Filter by a comma-separated list of InvoiceNumbers. (optional) /// Filter by a comma-separated list of ContactIDs. (optional) /// Filter by a comma-separated list Statuses. For faster response times we recommend using these explicit parameters instead of passing OR conditions into the Where filter. (optional) /// e.g. page=1 – Up to 100 invoices will be returned in a single API call with line items shown for each invoice (optional) /// e.g. includeArchived=true - Invoices with a status of ARCHIVED will be included in the response (optional) /// When set to true you'll only retrieve Invoices created by your app (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. (optional, default to false) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Invoices) public async System.Threading.Tasks.Task> GetInvoicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, List iDs = null, List invoiceNumbers = null, List contactIDs = null, List statuses = null, int? page = null, bool? includeArchived = null, bool? createdByMyApp = null, int? unitdp = null, bool? summaryOnly = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetInvoices"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (iDs != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("csv", "IDs", iDs)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (invoiceNumbers != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("csv", "InvoiceNumbers", invoiceNumbers)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (contactIDs != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("csv", "ContactIDs", contactIDs)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (statuses != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("csv", "Statuses", statuses)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (page != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "page", page)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (includeArchived != null) { requestOptions.QueryParameters.Add("includeArchived", includeArchived.ToString()); } if (createdByMyApp != null) { requestOptions.QueryParameters.Add("createdByMyApp", createdByMyApp.ToString()); } if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (summaryOnly != null) { requestOptions.QueryParameters.Add("summaryOnly", summaryOnly.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Invoices", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetInvoices", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific item using a unique item Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Items public async System.Threading.Tasks.Task GetItemAsync (string accessToken, string xeroTenantId, Guid itemID, int? unitdp = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetItemAsyncWithHttpInfo(accessToken, xeroTenantId, itemID, unitdp, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific item using a unique item Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Items) public async System.Threading.Tasks.Task> GetItemAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid itemID, int? unitdp = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetItem"); // verify the required parameter 'itemID' is set if (itemID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'itemID' when calling AccountingApi->GetItem"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (itemID != null) requestOptions.PathParameters.Add("ItemID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(itemID)); // path parameter if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Items/{ItemID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetItem", response); if (exception != null) throw exception; } return response; } /// /// Retrieves history for a specific item /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task GetItemHistoryAsync (string accessToken, string xeroTenantId, Guid itemID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetItemHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, itemID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves history for a specific item /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> GetItemHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid itemID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetItemHistory"); // verify the required parameter 'itemID' is set if (itemID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'itemID' when calling AccountingApi->GetItemHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (itemID != null) requestOptions.PathParameters.Add("ItemID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(itemID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Items/{ItemID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetItemHistory", response); if (exception != null) throw exception; } return response; } /// /// Retrieves items /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Items public async System.Threading.Tasks.Task GetItemsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? unitdp = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetItemsAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, where, order, unitdp, cancellationToken); return localVarResponse.Data; } /// /// Retrieves items /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Items) public async System.Threading.Tasks.Task> GetItemsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? unitdp = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetItems"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Items", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetItems", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific journal using a unique journal Id. /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Journal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Journals public async System.Threading.Tasks.Task GetJournalAsync (string accessToken, string xeroTenantId, Guid journalID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetJournalAsyncWithHttpInfo(accessToken, xeroTenantId, journalID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific journal using a unique journal Id. /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Journal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Journals) public async System.Threading.Tasks.Task> GetJournalAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid journalID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetJournal"); // verify the required parameter 'journalID' is set if (journalID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'journalID' when calling AccountingApi->GetJournal"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (journalID != null) requestOptions.PathParameters.Add("JournalID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(journalID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Journals/{JournalID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetJournal", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific journal using a unique journal number. /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Number of a Journal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Journals public async System.Threading.Tasks.Task GetJournalByNumberAsync (string accessToken, string xeroTenantId, int journalNumber, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetJournalByNumberAsyncWithHttpInfo(accessToken, xeroTenantId, journalNumber, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific journal using a unique journal number. /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Number of a Journal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Journals) public async System.Threading.Tasks.Task> GetJournalByNumberAsyncWithHttpInfo (string accessToken, string xeroTenantId, int journalNumber, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetJournalByNumber"); // verify the required parameter 'journalNumber' is set if (journalNumber == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'journalNumber' when calling AccountingApi->GetJournalByNumber"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (journalNumber != null) requestOptions.PathParameters.Add("JournalNumber", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(journalNumber)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Journals/{JournalNumber}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetJournalByNumber", response); if (exception != null) throw exception; } return response; } /// /// Retrieves journals /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Offset by a specified journal number. e.g. journals with a JournalNumber greater than the offset will be returned (optional) /// Filter to retrieve journals on a cash basis. Journals are returned on an accrual basis by default. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Journals public async System.Threading.Tasks.Task GetJournalsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, int? offset = null, bool? paymentsOnly = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetJournalsAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, offset, paymentsOnly, cancellationToken); return localVarResponse.Data; } /// /// Retrieves journals /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Offset by a specified journal number. e.g. journals with a JournalNumber greater than the offset will be returned (optional) /// Filter to retrieve journals on a cash basis. Journals are returned on an accrual basis by default. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Journals) public async System.Threading.Tasks.Task> GetJournalsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, int? offset = null, bool? paymentsOnly = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetJournals"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (offset != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (paymentsOnly != null) { requestOptions.QueryParameters.Add("paymentsOnly", paymentsOnly.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Journals", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetJournals", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific linked transaction (billable expenses) using a unique linked transaction Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a LinkedTransaction /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of LinkedTransactions public async System.Threading.Tasks.Task GetLinkedTransactionAsync (string accessToken, string xeroTenantId, Guid linkedTransactionID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetLinkedTransactionAsyncWithHttpInfo(accessToken, xeroTenantId, linkedTransactionID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific linked transaction (billable expenses) using a unique linked transaction Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a LinkedTransaction /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (LinkedTransactions) public async System.Threading.Tasks.Task> GetLinkedTransactionAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid linkedTransactionID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetLinkedTransaction"); // verify the required parameter 'linkedTransactionID' is set if (linkedTransactionID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'linkedTransactionID' when calling AccountingApi->GetLinkedTransaction"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (linkedTransactionID != null) requestOptions.PathParameters.Add("LinkedTransactionID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(linkedTransactionID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/LinkedTransactions/{LinkedTransactionID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetLinkedTransaction", response); if (exception != null) throw exception; } return response; } /// /// Retrieves linked transactions (billable expenses) /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Up to 100 linked transactions will be returned in a single API call. Use the page parameter to specify the page to be returned e.g. page=1. (optional) /// The Xero identifier for an Linked Transaction (optional) /// Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice (optional) /// Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer. (optional) /// Filter by the combination of ContactID and Status. Get the linked transactions associated to a customer and with a status (optional) /// Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of LinkedTransactions public async System.Threading.Tasks.Task GetLinkedTransactionsAsync (string accessToken, string xeroTenantId, int? page = null, Guid? linkedTransactionID = null, Guid? sourceTransactionID = null, Guid? contactID = null, string status = null, Guid? targetTransactionID = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetLinkedTransactionsAsyncWithHttpInfo(accessToken, xeroTenantId, page, linkedTransactionID, sourceTransactionID, contactID, status, targetTransactionID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves linked transactions (billable expenses) /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Up to 100 linked transactions will be returned in a single API call. Use the page parameter to specify the page to be returned e.g. page=1. (optional) /// The Xero identifier for an Linked Transaction (optional) /// Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice (optional) /// Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer. (optional) /// Filter by the combination of ContactID and Status. Get the linked transactions associated to a customer and with a status (optional) /// Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (LinkedTransactions) public async System.Threading.Tasks.Task> GetLinkedTransactionsAsyncWithHttpInfo (string accessToken, string xeroTenantId, int? page = null, Guid? linkedTransactionID = null, Guid? sourceTransactionID = null, Guid? contactID = null, string status = null, Guid? targetTransactionID = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetLinkedTransactions"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (page != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "page", page)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (linkedTransactionID != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "LinkedTransactionID", linkedTransactionID)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (sourceTransactionID != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "SourceTransactionID", sourceTransactionID)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (contactID != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "ContactID", contactID)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (status != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "Status", status)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (targetTransactionID != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "TargetTransactionID", targetTransactionID)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/LinkedTransactions", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetLinkedTransactions", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific manual journal /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ManualJournals public async System.Threading.Tasks.Task GetManualJournalAsync (string accessToken, string xeroTenantId, Guid manualJournalID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetManualJournalAsyncWithHttpInfo(accessToken, xeroTenantId, manualJournalID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific manual journal /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ManualJournals) public async System.Threading.Tasks.Task> GetManualJournalAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetManualJournal"); // verify the required parameter 'manualJournalID' is set if (manualJournalID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'manualJournalID' when calling AccountingApi->GetManualJournal"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (manualJournalID != null) requestOptions.PathParameters.Add("ManualJournalID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(manualJournalID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/ManualJournals/{ManualJournalID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetManualJournal", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific attachment from a specific manual journal by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetManualJournalAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid manualJournalID, string fileName, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetManualJournalAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, manualJournalID, fileName, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific attachment from a specific manual journal by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetManualJournalAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, string fileName, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetManualJournalAttachmentByFileName"); // verify the required parameter 'manualJournalID' is set if (manualJournalID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'manualJournalID' when calling AccountingApi->GetManualJournalAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->GetManualJournalAttachmentByFileName"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetManualJournalAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (manualJournalID != null) requestOptions.PathParameters.Add("ManualJournalID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(manualJournalID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/ManualJournals/{ManualJournalID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetManualJournalAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Allows you to retrieve a specific attachment from a specific manual journal using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetManualJournalAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid manualJournalID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetManualJournalAttachmentByIdAsyncWithHttpInfo(accessToken, xeroTenantId, manualJournalID, attachmentID, contentType, cancellationToken); return localVarResponse.Data; } /// /// Allows you to retrieve a specific attachment from a specific manual journal using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetManualJournalAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetManualJournalAttachmentById"); // verify the required parameter 'manualJournalID' is set if (manualJournalID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'manualJournalID' when calling AccountingApi->GetManualJournalAttachmentById"); // verify the required parameter 'attachmentID' is set if (attachmentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'attachmentID' when calling AccountingApi->GetManualJournalAttachmentById"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetManualJournalAttachmentById"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (manualJournalID != null) requestOptions.PathParameters.Add("ManualJournalID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(manualJournalID)); // path parameter if (attachmentID != null) requestOptions.PathParameters.Add("AttachmentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(attachmentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/ManualJournals/{ManualJournalID}/Attachments/{AttachmentID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetManualJournalAttachmentById", response); if (exception != null) throw exception; } return response; } /// /// Retrieves attachment for a specific manual journal /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task GetManualJournalAttachmentsAsync (string accessToken, string xeroTenantId, Guid manualJournalID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetManualJournalAttachmentsAsyncWithHttpInfo(accessToken, xeroTenantId, manualJournalID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves attachment for a specific manual journal /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> GetManualJournalAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetManualJournalAttachments"); // verify the required parameter 'manualJournalID' is set if (manualJournalID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'manualJournalID' when calling AccountingApi->GetManualJournalAttachments"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (manualJournalID != null) requestOptions.PathParameters.Add("ManualJournalID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(manualJournalID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/ManualJournals/{ManualJournalID}/Attachments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetManualJournalAttachments", response); if (exception != null) throw exception; } return response; } /// /// Retrieves manual journals /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. page=1 – Up to 100 manual journals will be returned in a single API call with line items shown for each overpayment (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ManualJournals public async System.Threading.Tasks.Task GetManualJournalsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetManualJournalsAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, where, order, page, cancellationToken); return localVarResponse.Data; } /// /// Retrieves manual journals /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. page=1 – Up to 100 manual journals will be returned in a single API call with line items shown for each overpayment (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ManualJournals) public async System.Threading.Tasks.Task> GetManualJournalsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetManualJournals"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (page != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "page", page)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/ManualJournals", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetManualJournals", response); if (exception != null) throw exception; } return response; } /// /// Retrieves history for a specific manual journal /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task GetManualJournalsHistoryAsync (string accessToken, string xeroTenantId, Guid manualJournalID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetManualJournalsHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, manualJournalID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves history for a specific manual journal /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> GetManualJournalsHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetManualJournalsHistory"); // verify the required parameter 'manualJournalID' is set if (manualJournalID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'manualJournalID' when calling AccountingApi->GetManualJournalsHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (manualJournalID != null) requestOptions.PathParameters.Add("ManualJournalID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(manualJournalID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/ManualJournals/{ManualJournalID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetManualJournalsHistory", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a URL to an online invoice /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of OnlineInvoices public async System.Threading.Tasks.Task GetOnlineInvoiceAsync (string accessToken, string xeroTenantId, Guid invoiceID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetOnlineInvoiceAsyncWithHttpInfo(accessToken, xeroTenantId, invoiceID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a URL to an online invoice /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (OnlineInvoices) public async System.Threading.Tasks.Task> GetOnlineInvoiceAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetOnlineInvoice"); // verify the required parameter 'invoiceID' is set if (invoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'invoiceID' when calling AccountingApi->GetOnlineInvoice"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (invoiceID != null) requestOptions.PathParameters.Add("InvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(invoiceID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Invoices/{InvoiceID}/OnlineInvoice", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetOnlineInvoice", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a list of the key actions your app has permission to perform in the connected Xero organisation. /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Actions public async System.Threading.Tasks.Task GetOrganisationActionsAsync (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetOrganisationActionsAsyncWithHttpInfo(accessToken, xeroTenantId, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a list of the key actions your app has permission to perform in the connected Xero organisation. /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Actions) public async System.Threading.Tasks.Task> GetOrganisationActionsAsyncWithHttpInfo (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetOrganisationActions"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Organisation/Actions", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetOrganisationActions", response); if (exception != null) throw exception; } return response; } /// /// Retrieves the CIS settings for the Xero organistaion. /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The unique Xero identifier for an organisation /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of CISOrgSettings public async System.Threading.Tasks.Task GetOrganisationCISSettingsAsync (string accessToken, string xeroTenantId, Guid organisationID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetOrganisationCISSettingsAsyncWithHttpInfo(accessToken, xeroTenantId, organisationID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves the CIS settings for the Xero organistaion. /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The unique Xero identifier for an organisation /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (CISOrgSettings) public async System.Threading.Tasks.Task> GetOrganisationCISSettingsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid organisationID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetOrganisationCISSettings"); // verify the required parameter 'organisationID' is set if (organisationID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'organisationID' when calling AccountingApi->GetOrganisationCISSettings"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (organisationID != null) requestOptions.PathParameters.Add("OrganisationID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(organisationID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Organisation/{OrganisationID}/CISSettings", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetOrganisationCISSettings", response); if (exception != null) throw exception; } return response; } /// /// Retrieves Xero organisation details /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Organisations public async System.Threading.Tasks.Task GetOrganisationsAsync (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetOrganisationsAsyncWithHttpInfo(accessToken, xeroTenantId, cancellationToken); return localVarResponse.Data; } /// /// Retrieves Xero organisation details /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Organisations) public async System.Threading.Tasks.Task> GetOrganisationsAsyncWithHttpInfo (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetOrganisations"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Organisation", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetOrganisations", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific overpayment using a unique overpayment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Overpayments public async System.Threading.Tasks.Task GetOverpaymentAsync (string accessToken, string xeroTenantId, Guid overpaymentID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetOverpaymentAsyncWithHttpInfo(accessToken, xeroTenantId, overpaymentID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific overpayment using a unique overpayment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Overpayments) public async System.Threading.Tasks.Task> GetOverpaymentAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid overpaymentID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetOverpayment"); // verify the required parameter 'overpaymentID' is set if (overpaymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'overpaymentID' when calling AccountingApi->GetOverpayment"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (overpaymentID != null) requestOptions.PathParameters.Add("OverpaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(overpaymentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Overpayments/{OverpaymentID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetOverpayment", response); if (exception != null) throw exception; } return response; } /// /// Retrieves history records of a specific overpayment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task GetOverpaymentHistoryAsync (string accessToken, string xeroTenantId, Guid overpaymentID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetOverpaymentHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, overpaymentID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves history records of a specific overpayment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Overpayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> GetOverpaymentHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid overpaymentID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetOverpaymentHistory"); // verify the required parameter 'overpaymentID' is set if (overpaymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'overpaymentID' when calling AccountingApi->GetOverpaymentHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (overpaymentID != null) requestOptions.PathParameters.Add("OverpaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(overpaymentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Overpayments/{OverpaymentID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetOverpaymentHistory", response); if (exception != null) throw exception; } return response; } /// /// Retrieves overpayments /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Overpayments public async System.Threading.Tasks.Task GetOverpaymentsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, int? unitdp = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetOverpaymentsAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp, cancellationToken); return localVarResponse.Data; } /// /// Retrieves overpayments /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Overpayments) public async System.Threading.Tasks.Task> GetOverpaymentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, int? unitdp = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetOverpayments"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (page != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "page", page)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Overpayments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetOverpayments", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific payment for invoices and credit notes using a unique payment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Payment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Payments public async System.Threading.Tasks.Task GetPaymentAsync (string accessToken, string xeroTenantId, Guid paymentID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetPaymentAsyncWithHttpInfo(accessToken, xeroTenantId, paymentID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific payment for invoices and credit notes using a unique payment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Payment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Payments) public async System.Threading.Tasks.Task> GetPaymentAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid paymentID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetPayment"); // verify the required parameter 'paymentID' is set if (paymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'paymentID' when calling AccountingApi->GetPayment"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (paymentID != null) requestOptions.PathParameters.Add("PaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(paymentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Payments/{PaymentID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetPayment", response); if (exception != null) throw exception; } return response; } /// /// Retrieves history records of a specific payment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Payment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task GetPaymentHistoryAsync (string accessToken, string xeroTenantId, Guid paymentID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetPaymentHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, paymentID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves history records of a specific payment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Payment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> GetPaymentHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid paymentID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetPaymentHistory"); // verify the required parameter 'paymentID' is set if (paymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'paymentID' when calling AccountingApi->GetPaymentHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (paymentID != null) requestOptions.PathParameters.Add("PaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(paymentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Payments/{PaymentID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetPaymentHistory", response); if (exception != null) throw exception; } return response; } /// /// Retrieves payment services /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PaymentServices public async System.Threading.Tasks.Task GetPaymentServicesAsync (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetPaymentServicesAsyncWithHttpInfo(accessToken, xeroTenantId, cancellationToken); return localVarResponse.Data; } /// /// Retrieves payment services /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PaymentServices) public async System.Threading.Tasks.Task> GetPaymentServicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetPaymentServices"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/PaymentServices", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetPaymentServices", response); if (exception != null) throw exception; } return response; } /// /// Retrieves payments for invoices and credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Up to 100 payments will be returned in a single API call (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Payments public async System.Threading.Tasks.Task GetPaymentsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetPaymentsAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, where, order, page, cancellationToken); return localVarResponse.Data; } /// /// Retrieves payments for invoices and credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Up to 100 payments will be returned in a single API call (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Payments) public async System.Threading.Tasks.Task> GetPaymentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetPayments"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (page != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "page", page)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Payments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetPayments", response); if (exception != null) throw exception; } return response; } /// /// Allows you to retrieve a specified prepayments /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Prepayments public async System.Threading.Tasks.Task GetPrepaymentAsync (string accessToken, string xeroTenantId, Guid prepaymentID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetPrepaymentAsyncWithHttpInfo(accessToken, xeroTenantId, prepaymentID, cancellationToken); return localVarResponse.Data; } /// /// Allows you to retrieve a specified prepayments /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Prepayments) public async System.Threading.Tasks.Task> GetPrepaymentAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid prepaymentID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetPrepayment"); // verify the required parameter 'prepaymentID' is set if (prepaymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'prepaymentID' when calling AccountingApi->GetPrepayment"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (prepaymentID != null) requestOptions.PathParameters.Add("PrepaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(prepaymentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Prepayments/{PrepaymentID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetPrepayment", response); if (exception != null) throw exception; } return response; } /// /// Retrieves history record for a specific prepayment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task GetPrepaymentHistoryAsync (string accessToken, string xeroTenantId, Guid prepaymentID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetPrepaymentHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, prepaymentID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves history record for a specific prepayment /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PrePayment /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> GetPrepaymentHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid prepaymentID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetPrepaymentHistory"); // verify the required parameter 'prepaymentID' is set if (prepaymentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'prepaymentID' when calling AccountingApi->GetPrepaymentHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (prepaymentID != null) requestOptions.PathParameters.Add("PrepaymentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(prepaymentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Prepayments/{PrepaymentID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetPrepaymentHistory", response); if (exception != null) throw exception; } return response; } /// /// Retrieves prepayments /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Prepayments public async System.Threading.Tasks.Task GetPrepaymentsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, int? unitdp = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetPrepaymentsAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp, cancellationToken); return localVarResponse.Data; } /// /// Retrieves prepayments /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Prepayments) public async System.Threading.Tasks.Task> GetPrepaymentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? page = null, int? unitdp = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetPrepayments"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (page != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "page", page)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Prepayments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetPrepayments", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific purchase order using a unique purchase order Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PurchaseOrders public async System.Threading.Tasks.Task GetPurchaseOrderAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetPurchaseOrderAsyncWithHttpInfo(accessToken, xeroTenantId, purchaseOrderID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific purchase order using a unique purchase order Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PurchaseOrders) public async System.Threading.Tasks.Task> GetPurchaseOrderAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetPurchaseOrder"); // verify the required parameter 'purchaseOrderID' is set if (purchaseOrderID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'purchaseOrderID' when calling AccountingApi->GetPurchaseOrder"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (purchaseOrderID != null) requestOptions.PathParameters.Add("PurchaseOrderID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(purchaseOrderID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/PurchaseOrders/{PurchaseOrderID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetPurchaseOrder", response); if (exception != null) throw exception; } return response; } /// /// Retrieves specific purchase order as PDF files using a unique purchase order Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetPurchaseOrderAsPdfAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetPurchaseOrderAsPdfAsyncWithHttpInfo(accessToken, xeroTenantId, purchaseOrderID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves specific purchase order as PDF files using a unique purchase order Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetPurchaseOrderAsPdfAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetPurchaseOrderAsPdf"); // verify the required parameter 'purchaseOrderID' is set if (purchaseOrderID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'purchaseOrderID' when calling AccountingApi->GetPurchaseOrderAsPdf"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/pdf" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (purchaseOrderID != null) requestOptions.PathParameters.Add("PurchaseOrderID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(purchaseOrderID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/PurchaseOrders/{PurchaseOrderID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetPurchaseOrderAsPdf", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific attachment for a specific purchase order by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetPurchaseOrderAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, string fileName, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetPurchaseOrderAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, purchaseOrderID, fileName, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific attachment for a specific purchase order by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetPurchaseOrderAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, string fileName, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetPurchaseOrderAttachmentByFileName"); // verify the required parameter 'purchaseOrderID' is set if (purchaseOrderID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'purchaseOrderID' when calling AccountingApi->GetPurchaseOrderAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->GetPurchaseOrderAttachmentByFileName"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetPurchaseOrderAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (purchaseOrderID != null) requestOptions.PathParameters.Add("PurchaseOrderID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(purchaseOrderID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetPurchaseOrderAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Retrieves specific attachment for a specific purchase order using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetPurchaseOrderAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetPurchaseOrderAttachmentByIdAsyncWithHttpInfo(accessToken, xeroTenantId, purchaseOrderID, attachmentID, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves specific attachment for a specific purchase order using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetPurchaseOrderAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetPurchaseOrderAttachmentById"); // verify the required parameter 'purchaseOrderID' is set if (purchaseOrderID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'purchaseOrderID' when calling AccountingApi->GetPurchaseOrderAttachmentById"); // verify the required parameter 'attachmentID' is set if (attachmentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'attachmentID' when calling AccountingApi->GetPurchaseOrderAttachmentById"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetPurchaseOrderAttachmentById"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (purchaseOrderID != null) requestOptions.PathParameters.Add("PurchaseOrderID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(purchaseOrderID)); // path parameter if (attachmentID != null) requestOptions.PathParameters.Add("AttachmentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(attachmentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/PurchaseOrders/{PurchaseOrderID}/Attachments/{AttachmentID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetPurchaseOrderAttachmentById", response); if (exception != null) throw exception; } return response; } /// /// Retrieves attachments for a specific purchase order /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task GetPurchaseOrderAttachmentsAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetPurchaseOrderAttachmentsAsyncWithHttpInfo(accessToken, xeroTenantId, purchaseOrderID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves attachments for a specific purchase order /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> GetPurchaseOrderAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetPurchaseOrderAttachments"); // verify the required parameter 'purchaseOrderID' is set if (purchaseOrderID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'purchaseOrderID' when calling AccountingApi->GetPurchaseOrderAttachments"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (purchaseOrderID != null) requestOptions.PathParameters.Add("PurchaseOrderID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(purchaseOrderID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/PurchaseOrders/{PurchaseOrderID}/Attachments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetPurchaseOrderAttachments", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific purchase order using purchase order number /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PurchaseOrder /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PurchaseOrders public async System.Threading.Tasks.Task GetPurchaseOrderByNumberAsync (string accessToken, string xeroTenantId, string purchaseOrderNumber, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetPurchaseOrderByNumberAsyncWithHttpInfo(accessToken, xeroTenantId, purchaseOrderNumber, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific purchase order using purchase order number /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a PurchaseOrder /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PurchaseOrders) public async System.Threading.Tasks.Task> GetPurchaseOrderByNumberAsyncWithHttpInfo (string accessToken, string xeroTenantId, string purchaseOrderNumber, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetPurchaseOrderByNumber"); // verify the required parameter 'purchaseOrderNumber' is set if (purchaseOrderNumber == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'purchaseOrderNumber' when calling AccountingApi->GetPurchaseOrderByNumber"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (purchaseOrderNumber != null) requestOptions.PathParameters.Add("PurchaseOrderNumber", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(purchaseOrderNumber)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/PurchaseOrders/{PurchaseOrderNumber}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetPurchaseOrderByNumber", response); if (exception != null) throw exception; } return response; } /// /// Retrieves history for a specific purchase order /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task GetPurchaseOrderHistoryAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetPurchaseOrderHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, purchaseOrderID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves history for a specific purchase order /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> GetPurchaseOrderHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetPurchaseOrderHistory"); // verify the required parameter 'purchaseOrderID' is set if (purchaseOrderID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'purchaseOrderID' when calling AccountingApi->GetPurchaseOrderHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (purchaseOrderID != null) requestOptions.PathParameters.Add("PurchaseOrderID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(purchaseOrderID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/PurchaseOrders/{PurchaseOrderID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetPurchaseOrderHistory", response); if (exception != null) throw exception; } return response; } /// /// Retrieves purchase orders /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by purchase order status (optional) /// Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) /// Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) /// Order by an any element (optional) /// To specify a page, append the page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PurchaseOrders public async System.Threading.Tasks.Task GetPurchaseOrdersAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string status = null, string dateFrom = null, string dateTo = null, string order = null, int? page = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetPurchaseOrdersAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, status, dateFrom, dateTo, order, page, cancellationToken); return localVarResponse.Data; } /// /// Retrieves purchase orders /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by purchase order status (optional) /// Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) /// Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) /// Order by an any element (optional) /// To specify a page, append the page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PurchaseOrders) public async System.Threading.Tasks.Task> GetPurchaseOrdersAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string status = null, string dateFrom = null, string dateTo = null, string order = null, int? page = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetPurchaseOrders"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (status != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "Status", status)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (dateFrom != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "DateFrom", dateFrom)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (dateTo != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "DateTo", dateTo)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (page != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "page", page)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/PurchaseOrders", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetPurchaseOrders", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific quote using a unique quote Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Quotes public async System.Threading.Tasks.Task GetQuoteAsync (string accessToken, string xeroTenantId, Guid quoteID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetQuoteAsyncWithHttpInfo(accessToken, xeroTenantId, quoteID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific quote using a unique quote Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Quotes) public async System.Threading.Tasks.Task> GetQuoteAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetQuote"); // verify the required parameter 'quoteID' is set if (quoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'quoteID' when calling AccountingApi->GetQuote"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (quoteID != null) requestOptions.PathParameters.Add("QuoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(quoteID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Quotes/{QuoteID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetQuote", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific quote as a PDF file using a unique quote Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetQuoteAsPdfAsync (string accessToken, string xeroTenantId, Guid quoteID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetQuoteAsPdfAsyncWithHttpInfo(accessToken, xeroTenantId, quoteID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific quote as a PDF file using a unique quote Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetQuoteAsPdfAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetQuoteAsPdf"); // verify the required parameter 'quoteID' is set if (quoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'quoteID' when calling AccountingApi->GetQuoteAsPdf"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/pdf" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (quoteID != null) requestOptions.PathParameters.Add("QuoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(quoteID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Quotes/{QuoteID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetQuoteAsPdf", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific attachment from a specific quote by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetQuoteAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid quoteID, string fileName, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetQuoteAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, quoteID, fileName, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific attachment from a specific quote by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetQuoteAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, string fileName, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetQuoteAttachmentByFileName"); // verify the required parameter 'quoteID' is set if (quoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'quoteID' when calling AccountingApi->GetQuoteAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->GetQuoteAttachmentByFileName"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetQuoteAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (quoteID != null) requestOptions.PathParameters.Add("QuoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(quoteID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Quotes/{QuoteID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetQuoteAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific attachment from a specific quote using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetQuoteAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid quoteID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetQuoteAttachmentByIdAsyncWithHttpInfo(accessToken, xeroTenantId, quoteID, attachmentID, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific attachment from a specific quote using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetQuoteAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetQuoteAttachmentById"); // verify the required parameter 'quoteID' is set if (quoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'quoteID' when calling AccountingApi->GetQuoteAttachmentById"); // verify the required parameter 'attachmentID' is set if (attachmentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'attachmentID' when calling AccountingApi->GetQuoteAttachmentById"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetQuoteAttachmentById"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (quoteID != null) requestOptions.PathParameters.Add("QuoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(quoteID)); // path parameter if (attachmentID != null) requestOptions.PathParameters.Add("AttachmentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(attachmentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Quotes/{QuoteID}/Attachments/{AttachmentID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetQuoteAttachmentById", response); if (exception != null) throw exception; } return response; } /// /// Retrieves attachments for a specific quote /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task GetQuoteAttachmentsAsync (string accessToken, string xeroTenantId, Guid quoteID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetQuoteAttachmentsAsyncWithHttpInfo(accessToken, xeroTenantId, quoteID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves attachments for a specific quote /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> GetQuoteAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetQuoteAttachments"); // verify the required parameter 'quoteID' is set if (quoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'quoteID' when calling AccountingApi->GetQuoteAttachments"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (quoteID != null) requestOptions.PathParameters.Add("QuoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(quoteID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Quotes/{QuoteID}/Attachments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetQuoteAttachments", response); if (exception != null) throw exception; } return response; } /// /// Retrieves history records of a specific quote /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task GetQuoteHistoryAsync (string accessToken, string xeroTenantId, Guid quoteID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetQuoteHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, quoteID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves history records of a specific quote /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> GetQuoteHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetQuoteHistory"); // verify the required parameter 'quoteID' is set if (quoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'quoteID' when calling AccountingApi->GetQuoteHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (quoteID != null) requestOptions.PathParameters.Add("QuoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(quoteID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Quotes/{QuoteID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetQuoteHistory", response); if (exception != null) throw exception; } return response; } /// /// Retrieves sales quotes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter for quotes after a particular date (optional) /// Filter for quotes before a particular date (optional) /// Filter for quotes expiring after a particular date (optional) /// Filter for quotes before a particular date (optional) /// Filter for quotes belonging to a particular contact (optional) /// Filter for quotes of a particular Status (optional) /// e.g. page=1 – Up to 100 Quotes will be returned in a single API call with line items shown for each quote (optional) /// Order by an any element (optional) /// Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001) (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Quotes public async System.Threading.Tasks.Task GetQuotesAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, DateTime? dateFrom = null, DateTime? dateTo = null, DateTime? expiryDateFrom = null, DateTime? expiryDateTo = null, Guid? contactID = null, string status = null, int? page = null, string order = null, string quoteNumber = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetQuotesAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, dateFrom, dateTo, expiryDateFrom, expiryDateTo, contactID, status, page, order, quoteNumber, cancellationToken); return localVarResponse.Data; } /// /// Retrieves sales quotes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter for quotes after a particular date (optional) /// Filter for quotes before a particular date (optional) /// Filter for quotes expiring after a particular date (optional) /// Filter for quotes before a particular date (optional) /// Filter for quotes belonging to a particular contact (optional) /// Filter for quotes of a particular Status (optional) /// e.g. page=1 – Up to 100 Quotes will be returned in a single API call with line items shown for each quote (optional) /// Order by an any element (optional) /// Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001) (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Quotes) public async System.Threading.Tasks.Task> GetQuotesAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, DateTime? dateFrom = null, DateTime? dateTo = null, DateTime? expiryDateFrom = null, DateTime? expiryDateTo = null, Guid? contactID = null, string status = null, int? page = null, string order = null, string quoteNumber = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetQuotes"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (dateFrom != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "DateFrom", dateFrom)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (dateTo != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "DateTo", dateTo)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (expiryDateFrom != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "ExpiryDateFrom", expiryDateFrom)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (expiryDateTo != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "ExpiryDateTo", expiryDateTo)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (contactID != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "ContactID", contactID)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (status != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "Status", status)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (page != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "page", page)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (quoteNumber != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "QuoteNumber", quoteNumber)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Quotes", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetQuotes", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific draft expense claim receipt by using a unique receipt Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Receipts public async System.Threading.Tasks.Task GetReceiptAsync (string accessToken, string xeroTenantId, Guid receiptID, int? unitdp = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetReceiptAsyncWithHttpInfo(accessToken, xeroTenantId, receiptID, unitdp, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific draft expense claim receipt by using a unique receipt Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Receipts) public async System.Threading.Tasks.Task> GetReceiptAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, int? unitdp = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetReceipt"); // verify the required parameter 'receiptID' is set if (receiptID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'receiptID' when calling AccountingApi->GetReceipt"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (receiptID != null) requestOptions.PathParameters.Add("ReceiptID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(receiptID)); // path parameter if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Receipts/{ReceiptID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetReceipt", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific attachment from a specific expense claim receipts by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetReceiptAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid receiptID, string fileName, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetReceiptAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, receiptID, fileName, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific attachment from a specific expense claim receipts by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetReceiptAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, string fileName, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetReceiptAttachmentByFileName"); // verify the required parameter 'receiptID' is set if (receiptID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'receiptID' when calling AccountingApi->GetReceiptAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->GetReceiptAttachmentByFileName"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetReceiptAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (receiptID != null) requestOptions.PathParameters.Add("ReceiptID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(receiptID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Receipts/{ReceiptID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetReceiptAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific attachments from a specific expense claim receipts by using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetReceiptAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid receiptID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetReceiptAttachmentByIdAsyncWithHttpInfo(accessToken, xeroTenantId, receiptID, attachmentID, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific attachments from a specific expense claim receipts by using a unique attachment Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetReceiptAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetReceiptAttachmentById"); // verify the required parameter 'receiptID' is set if (receiptID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'receiptID' when calling AccountingApi->GetReceiptAttachmentById"); // verify the required parameter 'attachmentID' is set if (attachmentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'attachmentID' when calling AccountingApi->GetReceiptAttachmentById"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetReceiptAttachmentById"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (receiptID != null) requestOptions.PathParameters.Add("ReceiptID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(receiptID)); // path parameter if (attachmentID != null) requestOptions.PathParameters.Add("AttachmentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(attachmentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Receipts/{ReceiptID}/Attachments/{AttachmentID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetReceiptAttachmentById", response); if (exception != null) throw exception; } return response; } /// /// Retrieves attachments for a specific expense claim receipt /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task GetReceiptAttachmentsAsync (string accessToken, string xeroTenantId, Guid receiptID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetReceiptAttachmentsAsyncWithHttpInfo(accessToken, xeroTenantId, receiptID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves attachments for a specific expense claim receipt /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> GetReceiptAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetReceiptAttachments"); // verify the required parameter 'receiptID' is set if (receiptID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'receiptID' when calling AccountingApi->GetReceiptAttachments"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (receiptID != null) requestOptions.PathParameters.Add("ReceiptID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(receiptID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Receipts/{ReceiptID}/Attachments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetReceiptAttachments", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a history record for a specific receipt /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task GetReceiptHistoryAsync (string accessToken, string xeroTenantId, Guid receiptID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetReceiptHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, receiptID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a history record for a specific receipt /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> GetReceiptHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetReceiptHistory"); // verify the required parameter 'receiptID' is set if (receiptID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'receiptID' when calling AccountingApi->GetReceiptHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (receiptID != null) requestOptions.PathParameters.Add("ReceiptID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(receiptID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Receipts/{ReceiptID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetReceiptHistory", response); if (exception != null) throw exception; } return response; } /// /// Retrieves draft expense claim receipts for any user /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Receipts public async System.Threading.Tasks.Task GetReceiptsAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? unitdp = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetReceiptsAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, where, order, unitdp, cancellationToken); return localVarResponse.Data; } /// /// Retrieves draft expense claim receipts for any user /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Receipts) public async System.Threading.Tasks.Task> GetReceiptsAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, int? unitdp = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetReceipts"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Receipts", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetReceipts", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific repeating invoice by using a unique repeating invoice Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of RepeatingInvoices public async System.Threading.Tasks.Task GetRepeatingInvoiceAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetRepeatingInvoiceAsyncWithHttpInfo(accessToken, xeroTenantId, repeatingInvoiceID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific repeating invoice by using a unique repeating invoice Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (RepeatingInvoices) public async System.Threading.Tasks.Task> GetRepeatingInvoiceAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetRepeatingInvoice"); // verify the required parameter 'repeatingInvoiceID' is set if (repeatingInvoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'repeatingInvoiceID' when calling AccountingApi->GetRepeatingInvoice"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (repeatingInvoiceID != null) requestOptions.PathParameters.Add("RepeatingInvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(repeatingInvoiceID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/RepeatingInvoices/{RepeatingInvoiceID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetRepeatingInvoice", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific attachment from a specific repeating invoices by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetRepeatingInvoiceAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, string fileName, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetRepeatingInvoiceAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, repeatingInvoiceID, fileName, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific attachment from a specific repeating invoices by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Name of the attachment /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetRepeatingInvoiceAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, string fileName, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetRepeatingInvoiceAttachmentByFileName"); // verify the required parameter 'repeatingInvoiceID' is set if (repeatingInvoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'repeatingInvoiceID' when calling AccountingApi->GetRepeatingInvoiceAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->GetRepeatingInvoiceAttachmentByFileName"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetRepeatingInvoiceAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (repeatingInvoiceID != null) requestOptions.PathParameters.Add("RepeatingInvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(repeatingInvoiceID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetRepeatingInvoiceAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific attachment from a specific repeating invoice /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of System.IO.Stream public async System.Threading.Tasks.Task GetRepeatingInvoiceAttachmentByIdAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetRepeatingInvoiceAttachmentByIdAsyncWithHttpInfo(accessToken, xeroTenantId, repeatingInvoiceID, attachmentID, contentType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific attachment from a specific repeating invoice /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Unique identifier for Attachment object /// The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (System.IO.Stream) public async System.Threading.Tasks.Task> GetRepeatingInvoiceAttachmentByIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, Guid attachmentID, string contentType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetRepeatingInvoiceAttachmentById"); // verify the required parameter 'repeatingInvoiceID' is set if (repeatingInvoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'repeatingInvoiceID' when calling AccountingApi->GetRepeatingInvoiceAttachmentById"); // verify the required parameter 'attachmentID' is set if (attachmentID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'attachmentID' when calling AccountingApi->GetRepeatingInvoiceAttachmentById"); // verify the required parameter 'contentType' is set if (contentType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contentType' when calling AccountingApi->GetRepeatingInvoiceAttachmentById"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/octet-stream" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (repeatingInvoiceID != null) requestOptions.PathParameters.Add("RepeatingInvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(repeatingInvoiceID)); // path parameter if (attachmentID != null) requestOptions.PathParameters.Add("AttachmentID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(attachmentID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (contentType != null) requestOptions.HeaderParameters.Add("contentType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contentType)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{AttachmentID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetRepeatingInvoiceAttachmentById", response); if (exception != null) throw exception; } return response; } /// /// Retrieves attachments from a specific repeating invoice /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task GetRepeatingInvoiceAttachmentsAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetRepeatingInvoiceAttachmentsAsyncWithHttpInfo(accessToken, xeroTenantId, repeatingInvoiceID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves attachments from a specific repeating invoice /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> GetRepeatingInvoiceAttachmentsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetRepeatingInvoiceAttachments"); // verify the required parameter 'repeatingInvoiceID' is set if (repeatingInvoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'repeatingInvoiceID' when calling AccountingApi->GetRepeatingInvoiceAttachments"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (repeatingInvoiceID != null) requestOptions.PathParameters.Add("RepeatingInvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(repeatingInvoiceID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/RepeatingInvoices/{RepeatingInvoiceID}/Attachments", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetRepeatingInvoiceAttachments", response); if (exception != null) throw exception; } return response; } /// /// Retrieves history record for a specific repeating invoice /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of HistoryRecords public async System.Threading.Tasks.Task GetRepeatingInvoiceHistoryAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetRepeatingInvoiceHistoryAsyncWithHttpInfo(accessToken, xeroTenantId, repeatingInvoiceID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves history record for a specific repeating invoice /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (HistoryRecords) public async System.Threading.Tasks.Task> GetRepeatingInvoiceHistoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetRepeatingInvoiceHistory"); // verify the required parameter 'repeatingInvoiceID' is set if (repeatingInvoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'repeatingInvoiceID' when calling AccountingApi->GetRepeatingInvoiceHistory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (repeatingInvoiceID != null) requestOptions.PathParameters.Add("RepeatingInvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(repeatingInvoiceID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/RepeatingInvoices/{RepeatingInvoiceID}/History", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetRepeatingInvoiceHistory", response); if (exception != null) throw exception; } return response; } /// /// Retrieves repeating invoices /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of RepeatingInvoices public async System.Threading.Tasks.Task GetRepeatingInvoicesAsync (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetRepeatingInvoicesAsyncWithHttpInfo(accessToken, xeroTenantId, where, order, cancellationToken); return localVarResponse.Data; } /// /// Retrieves repeating invoices /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (RepeatingInvoices) public async System.Threading.Tasks.Task> GetRepeatingInvoicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetRepeatingInvoices"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/RepeatingInvoices", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetRepeatingInvoices", response); if (exception != null) throw exception; } return response; } /// /// Retrieves report for aged payables by contact /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// The date of the Aged Payables By Contact report (optional) /// filter by the from date of the report e.g. 2021-02-01 (optional) /// filter by the to date of the report e.g. 2021-02-28 (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows public async System.Threading.Tasks.Task GetReportAgedPayablesByContactAsync (string accessToken, string xeroTenantId, Guid contactId, DateTime? date = null, DateTime? fromDate = null, DateTime? toDate = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetReportAgedPayablesByContactAsyncWithHttpInfo(accessToken, xeroTenantId, contactId, date, fromDate, toDate, cancellationToken); return localVarResponse.Data; } /// /// Retrieves report for aged payables by contact /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// The date of the Aged Payables By Contact report (optional) /// filter by the from date of the report e.g. 2021-02-01 (optional) /// filter by the to date of the report e.g. 2021-02-28 (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) public async System.Threading.Tasks.Task> GetReportAgedPayablesByContactAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactId, DateTime? date = null, DateTime? fromDate = null, DateTime? toDate = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetReportAgedPayablesByContact"); // verify the required parameter 'contactId' is set if (contactId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactId' when calling AccountingApi->GetReportAgedPayablesByContact"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactId != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "contactId", contactId)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (date != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "date", date)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (fromDate != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "fromDate", fromDate)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (toDate != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "toDate", toDate)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Reports/AgedPayablesByContact", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetReportAgedPayablesByContact", response); if (exception != null) throw exception; } return response; } /// /// Retrieves report for aged receivables by contact /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// The date of the Aged Receivables By Contact report (optional) /// filter by the from date of the report e.g. 2021-02-01 (optional) /// filter by the to date of the report e.g. 2021-02-28 (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows public async System.Threading.Tasks.Task GetReportAgedReceivablesByContactAsync (string accessToken, string xeroTenantId, Guid contactId, DateTime? date = null, DateTime? fromDate = null, DateTime? toDate = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetReportAgedReceivablesByContactAsyncWithHttpInfo(accessToken, xeroTenantId, contactId, date, fromDate, toDate, cancellationToken); return localVarResponse.Data; } /// /// Retrieves report for aged receivables by contact /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// The date of the Aged Receivables By Contact report (optional) /// filter by the from date of the report e.g. 2021-02-01 (optional) /// filter by the to date of the report e.g. 2021-02-28 (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) public async System.Threading.Tasks.Task> GetReportAgedReceivablesByContactAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactId, DateTime? date = null, DateTime? fromDate = null, DateTime? toDate = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetReportAgedReceivablesByContact"); // verify the required parameter 'contactId' is set if (contactId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactId' when calling AccountingApi->GetReportAgedReceivablesByContact"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactId != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "contactId", contactId)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (date != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "date", date)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (fromDate != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "fromDate", fromDate)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (toDate != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "toDate", toDate)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Reports/AgedReceivablesByContact", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetReportAgedReceivablesByContact", response); if (exception != null) throw exception; } return response; } /// /// Retrieves report for balancesheet /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The date of the Balance Sheet report (optional) /// The number of periods for the Balance Sheet report (optional) /// The period size to compare to (MONTH, QUARTER, YEAR) (optional) /// The tracking option 1 for the Balance Sheet report (optional) /// The tracking option 2 for the Balance Sheet report (optional) /// The standard layout boolean for the Balance Sheet report (optional) /// return a cash basis for the Balance Sheet report (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows public async System.Threading.Tasks.Task GetReportBalanceSheetAsync (string accessToken, string xeroTenantId, DateTime? date = null, int? periods = null, string timeframe = null, string trackingOptionID1 = null, string trackingOptionID2 = null, bool? standardLayout = null, bool? paymentsOnly = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetReportBalanceSheetAsyncWithHttpInfo(accessToken, xeroTenantId, date, periods, timeframe, trackingOptionID1, trackingOptionID2, standardLayout, paymentsOnly, cancellationToken); return localVarResponse.Data; } /// /// Retrieves report for balancesheet /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The date of the Balance Sheet report (optional) /// The number of periods for the Balance Sheet report (optional) /// The period size to compare to (MONTH, QUARTER, YEAR) (optional) /// The tracking option 1 for the Balance Sheet report (optional) /// The tracking option 2 for the Balance Sheet report (optional) /// The standard layout boolean for the Balance Sheet report (optional) /// return a cash basis for the Balance Sheet report (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) public async System.Threading.Tasks.Task> GetReportBalanceSheetAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? date = null, int? periods = null, string timeframe = null, string trackingOptionID1 = null, string trackingOptionID2 = null, bool? standardLayout = null, bool? paymentsOnly = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetReportBalanceSheet"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (date != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "date", date)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (periods != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "periods", periods)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (timeframe != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "timeframe", timeframe)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (trackingOptionID1 != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "trackingOptionID1", trackingOptionID1)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (trackingOptionID2 != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "trackingOptionID2", trackingOptionID2)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (standardLayout != null) { requestOptions.QueryParameters.Add("standardLayout", standardLayout.ToString()); } if (paymentsOnly != null) { requestOptions.QueryParameters.Add("paymentsOnly", paymentsOnly.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Reports/BalanceSheet", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetReportBalanceSheet", response); if (exception != null) throw exception; } return response; } /// /// Retrieves report for bank summary /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// filter by the from date of the report e.g. 2021-02-01 (optional) /// filter by the to date of the report e.g. 2021-02-28 (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows public async System.Threading.Tasks.Task GetReportBankSummaryAsync (string accessToken, string xeroTenantId, DateTime? fromDate = null, DateTime? toDate = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetReportBankSummaryAsyncWithHttpInfo(accessToken, xeroTenantId, fromDate, toDate, cancellationToken); return localVarResponse.Data; } /// /// Retrieves report for bank summary /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// filter by the from date of the report e.g. 2021-02-01 (optional) /// filter by the to date of the report e.g. 2021-02-28 (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) public async System.Threading.Tasks.Task> GetReportBankSummaryAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? fromDate = null, DateTime? toDate = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetReportBankSummary"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (fromDate != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "fromDate", fromDate)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (toDate != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "toDate", toDate)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Reports/BankSummary", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetReportBankSummary", response); if (exception != null) throw exception; } return response; } /// /// Retrieves report for budget summary /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The date for the Bank Summary report e.g. 2018-03-31 (optional) /// The number of periods to compare (integer between 1 and 12) (optional) /// The period size to compare to (1=month, 3=quarter, 12=year) (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows public async System.Threading.Tasks.Task GetReportBudgetSummaryAsync (string accessToken, string xeroTenantId, DateTime? date = null, int? periods = null, int? timeframe = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetReportBudgetSummaryAsyncWithHttpInfo(accessToken, xeroTenantId, date, periods, timeframe, cancellationToken); return localVarResponse.Data; } /// /// Retrieves report for budget summary /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The date for the Bank Summary report e.g. 2018-03-31 (optional) /// The number of periods to compare (integer between 1 and 12) (optional) /// The period size to compare to (1=month, 3=quarter, 12=year) (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) public async System.Threading.Tasks.Task> GetReportBudgetSummaryAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? date = null, int? periods = null, int? timeframe = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetReportBudgetSummary"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (date != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "date", date)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (periods != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "periods", periods)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (timeframe != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "timeframe", timeframe)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Reports/BudgetSummary", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetReportBudgetSummary", response); if (exception != null) throw exception; } return response; } /// /// Retrieves report for executive summary /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The date for the Bank Summary report e.g. 2018-03-31 (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows public async System.Threading.Tasks.Task GetReportExecutiveSummaryAsync (string accessToken, string xeroTenantId, DateTime? date = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetReportExecutiveSummaryAsyncWithHttpInfo(accessToken, xeroTenantId, date, cancellationToken); return localVarResponse.Data; } /// /// Retrieves report for executive summary /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The date for the Bank Summary report e.g. 2018-03-31 (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) public async System.Threading.Tasks.Task> GetReportExecutiveSummaryAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? date = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetReportExecutiveSummary"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (date != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "date", date)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Reports/ExecutiveSummary", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetReportExecutiveSummary", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific report using a unique ReportID /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Report /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows public async System.Threading.Tasks.Task GetReportFromIdAsync (string accessToken, string xeroTenantId, string reportID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetReportFromIdAsyncWithHttpInfo(accessToken, xeroTenantId, reportID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific report using a unique ReportID /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Report /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) public async System.Threading.Tasks.Task> GetReportFromIdAsyncWithHttpInfo (string accessToken, string xeroTenantId, string reportID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetReportFromId"); // verify the required parameter 'reportID' is set if (reportID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'reportID' when calling AccountingApi->GetReportFromId"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (reportID != null) requestOptions.PathParameters.Add("ReportID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(reportID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Reports/{ReportID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetReportFromId", response); if (exception != null) throw exception; } return response; } /// /// Retrieves report for profit and loss /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// filter by the from date of the report e.g. 2021-02-01 (optional) /// filter by the to date of the report e.g. 2021-02-28 (optional) /// The number of periods to compare (integer between 1 and 12) (optional) /// The period size to compare to (MONTH, QUARTER, YEAR) (optional) /// The trackingCategory 1 for the ProfitAndLoss report (optional) /// The trackingCategory 2 for the ProfitAndLoss report (optional) /// The tracking option 1 for the ProfitAndLoss report (optional) /// The tracking option 2 for the ProfitAndLoss report (optional) /// Return the standard layout for the ProfitAndLoss report (optional) /// Return cash only basis for the ProfitAndLoss report (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows public async System.Threading.Tasks.Task GetReportProfitAndLossAsync (string accessToken, string xeroTenantId, DateTime? fromDate = null, DateTime? toDate = null, int? periods = null, string timeframe = null, string trackingCategoryID = null, string trackingCategoryID2 = null, string trackingOptionID = null, string trackingOptionID2 = null, bool? standardLayout = null, bool? paymentsOnly = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetReportProfitAndLossAsyncWithHttpInfo(accessToken, xeroTenantId, fromDate, toDate, periods, timeframe, trackingCategoryID, trackingCategoryID2, trackingOptionID, trackingOptionID2, standardLayout, paymentsOnly, cancellationToken); return localVarResponse.Data; } /// /// Retrieves report for profit and loss /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// filter by the from date of the report e.g. 2021-02-01 (optional) /// filter by the to date of the report e.g. 2021-02-28 (optional) /// The number of periods to compare (integer between 1 and 12) (optional) /// The period size to compare to (MONTH, QUARTER, YEAR) (optional) /// The trackingCategory 1 for the ProfitAndLoss report (optional) /// The trackingCategory 2 for the ProfitAndLoss report (optional) /// The tracking option 1 for the ProfitAndLoss report (optional) /// The tracking option 2 for the ProfitAndLoss report (optional) /// Return the standard layout for the ProfitAndLoss report (optional) /// Return cash only basis for the ProfitAndLoss report (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) public async System.Threading.Tasks.Task> GetReportProfitAndLossAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? fromDate = null, DateTime? toDate = null, int? periods = null, string timeframe = null, string trackingCategoryID = null, string trackingCategoryID2 = null, string trackingOptionID = null, string trackingOptionID2 = null, bool? standardLayout = null, bool? paymentsOnly = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetReportProfitAndLoss"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (fromDate != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "fromDate", fromDate)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (toDate != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "toDate", toDate)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (periods != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "periods", periods)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (timeframe != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "timeframe", timeframe)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (trackingCategoryID != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "trackingCategoryID", trackingCategoryID)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (trackingCategoryID2 != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "trackingCategoryID2", trackingCategoryID2)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (trackingOptionID != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "trackingOptionID", trackingOptionID)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (trackingOptionID2 != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "trackingOptionID2", trackingOptionID2)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (standardLayout != null) { requestOptions.QueryParameters.Add("standardLayout", standardLayout.ToString()); } if (paymentsOnly != null) { requestOptions.QueryParameters.Add("paymentsOnly", paymentsOnly.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Reports/ProfitAndLoss", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetReportProfitAndLoss", response); if (exception != null) throw exception; } return response; } /// /// Retrieve reports for 1099 /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The year of the 1099 report (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Reports public async System.Threading.Tasks.Task GetReportTenNinetyNineAsync (string accessToken, string xeroTenantId, string reportYear = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetReportTenNinetyNineAsyncWithHttpInfo(accessToken, xeroTenantId, reportYear, cancellationToken); return localVarResponse.Data; } /// /// Retrieve reports for 1099 /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The year of the 1099 report (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Reports) public async System.Threading.Tasks.Task> GetReportTenNinetyNineAsyncWithHttpInfo (string accessToken, string xeroTenantId, string reportYear = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetReportTenNinetyNine"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (reportYear != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "reportYear", reportYear)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Reports/TenNinetyNine", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetReportTenNinetyNine", response); if (exception != null) throw exception; } return response; } /// /// Retrieves report for trial balance /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The date for the Trial Balance report e.g. 2018-03-31 (optional) /// Return cash only basis for the Trial Balance report (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows public async System.Threading.Tasks.Task GetReportTrialBalanceAsync (string accessToken, string xeroTenantId, DateTime? date = null, bool? paymentsOnly = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetReportTrialBalanceAsyncWithHttpInfo(accessToken, xeroTenantId, date, paymentsOnly, cancellationToken); return localVarResponse.Data; } /// /// Retrieves report for trial balance /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// The date for the Trial Balance report e.g. 2018-03-31 (optional) /// Return cash only basis for the Trial Balance report (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) public async System.Threading.Tasks.Task> GetReportTrialBalanceAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? date = null, bool? paymentsOnly = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetReportTrialBalance"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (date != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "date", date)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (paymentsOnly != null) { requestOptions.QueryParameters.Add("paymentsOnly", paymentsOnly.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Reports/TrialBalance", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetReportTrialBalance", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a list of the organistaions unique reports that require a uuid to fetch /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ReportWithRows public async System.Threading.Tasks.Task GetReportsListAsync (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetReportsListAsyncWithHttpInfo(accessToken, xeroTenantId, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a list of the organistaions unique reports that require a uuid to fetch /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ReportWithRows) public async System.Threading.Tasks.Task> GetReportsListAsyncWithHttpInfo (string accessToken, string xeroTenantId, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetReportsList"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Reports", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetReportsList", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific tax rate according to given TaxType code /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// A valid TaxType code /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TaxRates public async System.Threading.Tasks.Task GetTaxRateByTaxTypeAsync (string accessToken, string xeroTenantId, string taxType, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetTaxRateByTaxTypeAsyncWithHttpInfo(accessToken, xeroTenantId, taxType, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific tax rate according to given TaxType code /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// A valid TaxType code /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TaxRates) public async System.Threading.Tasks.Task> GetTaxRateByTaxTypeAsyncWithHttpInfo (string accessToken, string xeroTenantId, string taxType, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetTaxRateByTaxType"); // verify the required parameter 'taxType' is set if (taxType == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'taxType' when calling AccountingApi->GetTaxRateByTaxType"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (taxType != null) requestOptions.PathParameters.Add("TaxType", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(taxType)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/TaxRates/{TaxType}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetTaxRateByTaxType", response); if (exception != null) throw exception; } return response; } /// /// Retrieves tax rates /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TaxRates public async System.Threading.Tasks.Task GetTaxRatesAsync (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetTaxRatesAsyncWithHttpInfo(accessToken, xeroTenantId, where, order, cancellationToken); return localVarResponse.Data; } /// /// Retrieves tax rates /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TaxRates) public async System.Threading.Tasks.Task> GetTaxRatesAsyncWithHttpInfo (string accessToken, string xeroTenantId, string where = null, string order = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetTaxRates"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/TaxRates", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetTaxRates", response); if (exception != null) throw exception; } return response; } /// /// Retrieves tracking categories and options /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. includeArchived=true - Categories and options with a status of ARCHIVED will be included in the response (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TrackingCategories public async System.Threading.Tasks.Task GetTrackingCategoriesAsync (string accessToken, string xeroTenantId, string where = null, string order = null, bool? includeArchived = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetTrackingCategoriesAsyncWithHttpInfo(accessToken, xeroTenantId, where, order, includeArchived, cancellationToken); return localVarResponse.Data; } /// /// Retrieves tracking categories and options /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Filter by an any element (optional) /// Order by an any element (optional) /// e.g. includeArchived=true - Categories and options with a status of ARCHIVED will be included in the response (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TrackingCategories) public async System.Threading.Tasks.Task> GetTrackingCategoriesAsyncWithHttpInfo (string accessToken, string xeroTenantId, string where = null, string order = null, bool? includeArchived = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetTrackingCategories"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (includeArchived != null) { requestOptions.QueryParameters.Add("includeArchived", includeArchived.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/TrackingCategories", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetTrackingCategories", response); if (exception != null) throw exception; } return response; } /// /// Retrieves specific tracking categories and options using a unique tracking category Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TrackingCategories public async System.Threading.Tasks.Task GetTrackingCategoryAsync (string accessToken, string xeroTenantId, Guid trackingCategoryID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetTrackingCategoryAsyncWithHttpInfo(accessToken, xeroTenantId, trackingCategoryID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves specific tracking categories and options using a unique tracking category Id /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TrackingCategories) public async System.Threading.Tasks.Task> GetTrackingCategoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid trackingCategoryID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetTrackingCategory"); // verify the required parameter 'trackingCategoryID' is set if (trackingCategoryID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'trackingCategoryID' when calling AccountingApi->GetTrackingCategory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (trackingCategoryID != null) requestOptions.PathParameters.Add("TrackingCategoryID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(trackingCategoryID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/TrackingCategories/{TrackingCategoryID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetTrackingCategory", response); if (exception != null) throw exception; } return response; } /// /// Retrieves a specific user /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a User /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Users public async System.Threading.Tasks.Task GetUserAsync (string accessToken, string xeroTenantId, Guid userID, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetUserAsyncWithHttpInfo(accessToken, xeroTenantId, userID, cancellationToken); return localVarResponse.Data; } /// /// Retrieves a specific user /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a User /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Users) public async System.Threading.Tasks.Task> GetUserAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid userID, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetUser"); // verify the required parameter 'userID' is set if (userID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'userID' when calling AccountingApi->GetUser"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (userID != null) requestOptions.PathParameters.Add("UserID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(userID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Users/{UserID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetUser", response); if (exception != null) throw exception; } return response; } /// /// Retrieves users /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Users public async System.Threading.Tasks.Task GetUsersAsync (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await GetUsersAsyncWithHttpInfo(accessToken, xeroTenantId, ifModifiedSince, where, order, cancellationToken); return localVarResponse.Data; } /// /// Retrieves users /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Only records created or modified since this timestamp will be returned (optional) /// Filter by an any element (optional) /// Order by an any element (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Users) public async System.Threading.Tasks.Task> GetUsersAsyncWithHttpInfo (string accessToken, string xeroTenantId, DateTime? ifModifiedSince = null, string where = null, string order = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->GetUsers"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (where != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "where", where)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (order != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "order", order)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (ifModifiedSince != null) requestOptions.HeaderParameters.Add("If-Modified-Since", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(ifModifiedSince)); // header parameter // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.GetAsync("/Users", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("GetUsers", response); if (exception != null) throw exception; } return response; } /// /// Sets the chart of accounts, the conversion date and conversion balances /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Object including an accounts array, a conversion balances array and a conversion date object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ImportSummaryObject public async System.Threading.Tasks.Task PostSetupAsync (string accessToken, string xeroTenantId, Setup setup, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await PostSetupAsyncWithHttpInfo(accessToken, xeroTenantId, setup, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Sets the chart of accounts, the conversion date and conversion balances /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Object including an accounts array, a conversion balances array and a conversion date object in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ImportSummaryObject) public async System.Threading.Tasks.Task> PostSetupAsyncWithHttpInfo (string accessToken, string xeroTenantId, Setup setup, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->PostSetup"); // verify the required parameter 'setup' is set if (setup == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'setup' when calling AccountingApi->PostSetup"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = setup; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Setup", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("PostSetup", response); if (exception != null) throw exception; } return response; } /// /// Updates a chart of accounts /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Request of type Accounts array with one Account /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Accounts public async System.Threading.Tasks.Task UpdateAccountAsync (string accessToken, string xeroTenantId, Guid accountID, Accounts accounts, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateAccountAsyncWithHttpInfo(accessToken, xeroTenantId, accountID, accounts, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a chart of accounts /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Request of type Accounts array with one Account /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Accounts) public async System.Threading.Tasks.Task> UpdateAccountAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid accountID, Accounts accounts, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateAccount"); // verify the required parameter 'accountID' is set if (accountID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'accountID' when calling AccountingApi->UpdateAccount"); // verify the required parameter 'accounts' is set if (accounts == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'accounts' when calling AccountingApi->UpdateAccount"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (accountID != null) requestOptions.PathParameters.Add("AccountID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(accountID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = accounts; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Accounts/{AccountID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateAccount", response); if (exception != null) throw exception; } return response; } /// /// Updates attachment on a specific account by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task UpdateAccountAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid accountID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateAccountAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, accountID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates attachment on a specific account by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for Account object /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> UpdateAccountAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid accountID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateAccountAttachmentByFileName"); // verify the required parameter 'accountID' is set if (accountID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'accountID' when calling AccountingApi->UpdateAccountAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->UpdateAccountAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->UpdateAccountAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (accountID != null) requestOptions.PathParameters.Add("AccountID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(accountID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Accounts/{AccountID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateAccountAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Updates a single spent or received money transaction /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BankTransactions public async System.Threading.Tasks.Task UpdateBankTransactionAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, BankTransactions bankTransactions, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateBankTransactionAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransactionID, bankTransactions, unitdp, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a single spent or received money transaction /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BankTransactions) public async System.Threading.Tasks.Task> UpdateBankTransactionAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, BankTransactions bankTransactions, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateBankTransaction"); // verify the required parameter 'bankTransactionID' is set if (bankTransactionID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransactionID' when calling AccountingApi->UpdateBankTransaction"); // verify the required parameter 'bankTransactions' is set if (bankTransactions == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransactions' when calling AccountingApi->UpdateBankTransaction"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (bankTransactionID != null) requestOptions.PathParameters.Add("BankTransactionID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(bankTransactionID)); // path parameter if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = bankTransactions; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/BankTransactions/{BankTransactionID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateBankTransaction", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific attachment from a specific bank transaction by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task UpdateBankTransactionAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid bankTransactionID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateBankTransactionAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransactionID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific attachment from a specific bank transaction by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transaction /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> UpdateBankTransactionAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransactionID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateBankTransactionAttachmentByFileName"); // verify the required parameter 'bankTransactionID' is set if (bankTransactionID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransactionID' when calling AccountingApi->UpdateBankTransactionAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->UpdateBankTransactionAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->UpdateBankTransactionAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (bankTransactionID != null) requestOptions.PathParameters.Add("BankTransactionID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(bankTransactionID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/BankTransactions/{BankTransactionID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateBankTransactionAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task UpdateBankTransferAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid bankTransferID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateBankTransferAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransferID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Xero generated unique identifier for a bank transfer /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> UpdateBankTransferAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid bankTransferID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateBankTransferAttachmentByFileName"); // verify the required parameter 'bankTransferID' is set if (bankTransferID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransferID' when calling AccountingApi->UpdateBankTransferAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->UpdateBankTransferAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->UpdateBankTransferAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (bankTransferID != null) requestOptions.PathParameters.Add("BankTransferID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(bankTransferID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/BankTransfers/{BankTransferID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateBankTransferAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific contact in a Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// an array of Contacts containing single Contact object with properties to update /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Contacts public async System.Threading.Tasks.Task UpdateContactAsync (string accessToken, string xeroTenantId, Guid contactID, Contacts contacts, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateContactAsyncWithHttpInfo(accessToken, xeroTenantId, contactID, contacts, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific contact in a Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// an array of Contacts containing single Contact object with properties to update /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Contacts) public async System.Threading.Tasks.Task> UpdateContactAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, Contacts contacts, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateContact"); // verify the required parameter 'contactID' is set if (contactID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactID' when calling AccountingApi->UpdateContact"); // verify the required parameter 'contacts' is set if (contacts == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contacts' when calling AccountingApi->UpdateContact"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactID != null) requestOptions.PathParameters.Add("ContactID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = contacts; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Contacts/{ContactID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateContact", response); if (exception != null) throw exception; } return response; } /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task UpdateContactAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid contactID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateContactAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, contactID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> UpdateContactAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateContactAttachmentByFileName"); // verify the required parameter 'contactID' is set if (contactID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactID' when calling AccountingApi->UpdateContactAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->UpdateContactAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->UpdateContactAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactID != null) requestOptions.PathParameters.Add("ContactID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Contacts/{ContactID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateContactAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific contact group /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// an array of Contact groups with Name of specific group to update /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ContactGroups public async System.Threading.Tasks.Task UpdateContactGroupAsync (string accessToken, string xeroTenantId, Guid contactGroupID, ContactGroups contactGroups, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateContactGroupAsyncWithHttpInfo(accessToken, xeroTenantId, contactGroupID, contactGroups, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific contact group /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Contact Group /// an array of Contact groups with Name of specific group to update /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ContactGroups) public async System.Threading.Tasks.Task> UpdateContactGroupAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid contactGroupID, ContactGroups contactGroups, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateContactGroup"); // verify the required parameter 'contactGroupID' is set if (contactGroupID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactGroupID' when calling AccountingApi->UpdateContactGroup"); // verify the required parameter 'contactGroups' is set if (contactGroups == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contactGroups' when calling AccountingApi->UpdateContactGroup"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (contactGroupID != null) requestOptions.PathParameters.Add("ContactGroupID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(contactGroupID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = contactGroups; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/ContactGroups/{ContactGroupID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateContactGroup", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific credit note /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// an array of Credit Notes containing credit note details to update /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of CreditNotes public async System.Threading.Tasks.Task UpdateCreditNoteAsync (string accessToken, string xeroTenantId, Guid creditNoteID, CreditNotes creditNotes, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateCreditNoteAsyncWithHttpInfo(accessToken, xeroTenantId, creditNoteID, creditNotes, unitdp, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific credit note /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// an array of Credit Notes containing credit note details to update /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (CreditNotes) public async System.Threading.Tasks.Task> UpdateCreditNoteAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, CreditNotes creditNotes, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateCreditNote"); // verify the required parameter 'creditNoteID' is set if (creditNoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'creditNoteID' when calling AccountingApi->UpdateCreditNote"); // verify the required parameter 'creditNotes' is set if (creditNotes == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'creditNotes' when calling AccountingApi->UpdateCreditNote"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (creditNoteID != null) requestOptions.PathParameters.Add("CreditNoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(creditNoteID)); // path parameter if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = creditNotes; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/CreditNotes/{CreditNoteID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateCreditNote", response); if (exception != null) throw exception; } return response; } /// /// Updates attachments on a specific credit note by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task UpdateCreditNoteAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid creditNoteID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateCreditNoteAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, creditNoteID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates attachments on a specific credit note by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Credit Note /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> UpdateCreditNoteAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid creditNoteID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateCreditNoteAttachmentByFileName"); // verify the required parameter 'creditNoteID' is set if (creditNoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'creditNoteID' when calling AccountingApi->UpdateCreditNoteAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->UpdateCreditNoteAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->UpdateCreditNoteAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (creditNoteID != null) requestOptions.PathParameters.Add("CreditNoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(creditNoteID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/CreditNotes/{CreditNoteID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateCreditNoteAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific expense claims /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ExpenseClaim /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ExpenseClaims public async System.Threading.Tasks.Task UpdateExpenseClaimAsync (string accessToken, string xeroTenantId, Guid expenseClaimID, ExpenseClaims expenseClaims, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateExpenseClaimAsyncWithHttpInfo(accessToken, xeroTenantId, expenseClaimID, expenseClaims, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific expense claims /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ExpenseClaim /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ExpenseClaims) public async System.Threading.Tasks.Task> UpdateExpenseClaimAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid expenseClaimID, ExpenseClaims expenseClaims, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateExpenseClaim"); // verify the required parameter 'expenseClaimID' is set if (expenseClaimID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'expenseClaimID' when calling AccountingApi->UpdateExpenseClaim"); // verify the required parameter 'expenseClaims' is set if (expenseClaims == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'expenseClaims' when calling AccountingApi->UpdateExpenseClaim"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (expenseClaimID != null) requestOptions.PathParameters.Add("ExpenseClaimID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(expenseClaimID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = expenseClaims; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/ExpenseClaims/{ExpenseClaimID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateExpenseClaim", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific sales invoices or purchase bills /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Invoices public async System.Threading.Tasks.Task UpdateInvoiceAsync (string accessToken, string xeroTenantId, Guid invoiceID, Invoices invoices, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateInvoiceAsyncWithHttpInfo(accessToken, xeroTenantId, invoiceID, invoices, unitdp, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific sales invoices or purchase bills /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Invoices) public async System.Threading.Tasks.Task> UpdateInvoiceAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, Invoices invoices, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateInvoice"); // verify the required parameter 'invoiceID' is set if (invoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'invoiceID' when calling AccountingApi->UpdateInvoice"); // verify the required parameter 'invoices' is set if (invoices == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'invoices' when calling AccountingApi->UpdateInvoice"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (invoiceID != null) requestOptions.PathParameters.Add("InvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(invoiceID)); // path parameter if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = invoices; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Invoices/{InvoiceID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateInvoice", response); if (exception != null) throw exception; } return response; } /// /// Updates an attachment from a specific invoices or purchase bill by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task UpdateInvoiceAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid invoiceID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateInvoiceAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, invoiceID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates an attachment from a specific invoices or purchase bill by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Invoice /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> UpdateInvoiceAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid invoiceID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateInvoiceAttachmentByFileName"); // verify the required parameter 'invoiceID' is set if (invoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'invoiceID' when calling AccountingApi->UpdateInvoiceAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->UpdateInvoiceAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->UpdateInvoiceAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (invoiceID != null) requestOptions.PathParameters.Add("InvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(invoiceID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Invoices/{InvoiceID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateInvoiceAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific item /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Items public async System.Threading.Tasks.Task UpdateItemAsync (string accessToken, string xeroTenantId, Guid itemID, Items items, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateItemAsyncWithHttpInfo(accessToken, xeroTenantId, itemID, items, unitdp, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific item /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Item /// /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Items) public async System.Threading.Tasks.Task> UpdateItemAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid itemID, Items items, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateItem"); // verify the required parameter 'itemID' is set if (itemID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'itemID' when calling AccountingApi->UpdateItem"); // verify the required parameter 'items' is set if (items == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'items' when calling AccountingApi->UpdateItem"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (itemID != null) requestOptions.PathParameters.Add("ItemID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(itemID)); // path parameter if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = items; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Items/{ItemID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateItem", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific linked transactions (billable expenses) /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a LinkedTransaction /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of LinkedTransactions public async System.Threading.Tasks.Task UpdateLinkedTransactionAsync (string accessToken, string xeroTenantId, Guid linkedTransactionID, LinkedTransactions linkedTransactions, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateLinkedTransactionAsyncWithHttpInfo(accessToken, xeroTenantId, linkedTransactionID, linkedTransactions, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific linked transactions (billable expenses) /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a LinkedTransaction /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (LinkedTransactions) public async System.Threading.Tasks.Task> UpdateLinkedTransactionAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid linkedTransactionID, LinkedTransactions linkedTransactions, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateLinkedTransaction"); // verify the required parameter 'linkedTransactionID' is set if (linkedTransactionID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'linkedTransactionID' when calling AccountingApi->UpdateLinkedTransaction"); // verify the required parameter 'linkedTransactions' is set if (linkedTransactions == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'linkedTransactions' when calling AccountingApi->UpdateLinkedTransaction"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (linkedTransactionID != null) requestOptions.PathParameters.Add("LinkedTransactionID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(linkedTransactionID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = linkedTransactions; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/LinkedTransactions/{LinkedTransactionID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateLinkedTransaction", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific manual journal /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ManualJournals public async System.Threading.Tasks.Task UpdateManualJournalAsync (string accessToken, string xeroTenantId, Guid manualJournalID, ManualJournals manualJournals, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateManualJournalAsyncWithHttpInfo(accessToken, xeroTenantId, manualJournalID, manualJournals, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific manual journal /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ManualJournals) public async System.Threading.Tasks.Task> UpdateManualJournalAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, ManualJournals manualJournals, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateManualJournal"); // verify the required parameter 'manualJournalID' is set if (manualJournalID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'manualJournalID' when calling AccountingApi->UpdateManualJournal"); // verify the required parameter 'manualJournals' is set if (manualJournals == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'manualJournals' when calling AccountingApi->UpdateManualJournal"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (manualJournalID != null) requestOptions.PathParameters.Add("ManualJournalID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(manualJournalID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = manualJournals; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/ManualJournals/{ManualJournalID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateManualJournal", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific attachment from a specific manual journal by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task UpdateManualJournalAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid manualJournalID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateManualJournalAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, manualJournalID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific attachment from a specific manual journal by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a ManualJournal /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> UpdateManualJournalAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid manualJournalID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateManualJournalAttachmentByFileName"); // verify the required parameter 'manualJournalID' is set if (manualJournalID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'manualJournalID' when calling AccountingApi->UpdateManualJournalAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->UpdateManualJournalAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->UpdateManualJournalAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (manualJournalID != null) requestOptions.PathParameters.Add("ManualJournalID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(manualJournalID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/ManualJournals/{ManualJournalID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateManualJournalAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Updates or creates one or more spent or received money transaction /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of BankTransactions public async System.Threading.Tasks.Task UpdateOrCreateBankTransactionsAsync (string accessToken, string xeroTenantId, BankTransactions bankTransactions, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateOrCreateBankTransactionsAsyncWithHttpInfo(accessToken, xeroTenantId, bankTransactions, summarizeErrors, unitdp, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates or creates one or more spent or received money transaction /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (BankTransactions) public async System.Threading.Tasks.Task> UpdateOrCreateBankTransactionsAsyncWithHttpInfo (string accessToken, string xeroTenantId, BankTransactions bankTransactions, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateOrCreateBankTransactions"); // verify the required parameter 'bankTransactions' is set if (bankTransactions == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'bankTransactions' when calling AccountingApi->UpdateOrCreateBankTransactions"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = bankTransactions; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/BankTransactions", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateOrCreateBankTransactions", response); if (exception != null) throw exception; } return response; } /// /// Updates or creates one or more contacts in a Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Contacts public async System.Threading.Tasks.Task UpdateOrCreateContactsAsync (string accessToken, string xeroTenantId, Contacts contacts, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateOrCreateContactsAsyncWithHttpInfo(accessToken, xeroTenantId, contacts, summarizeErrors, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates or creates one or more contacts in a Xero organisation /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Contacts) public async System.Threading.Tasks.Task> UpdateOrCreateContactsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Contacts contacts, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateOrCreateContacts"); // verify the required parameter 'contacts' is set if (contacts == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'contacts' when calling AccountingApi->UpdateOrCreateContacts"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = contacts; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Contacts", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateOrCreateContacts", response); if (exception != null) throw exception; } return response; } /// /// Updates or creates one or more credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// an array of Credit Notes with a single CreditNote object. /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of CreditNotes public async System.Threading.Tasks.Task UpdateOrCreateCreditNotesAsync (string accessToken, string xeroTenantId, CreditNotes creditNotes, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateOrCreateCreditNotesAsyncWithHttpInfo(accessToken, xeroTenantId, creditNotes, summarizeErrors, unitdp, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates or creates one or more credit notes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// an array of Credit Notes with a single CreditNote object. /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (CreditNotes) public async System.Threading.Tasks.Task> UpdateOrCreateCreditNotesAsyncWithHttpInfo (string accessToken, string xeroTenantId, CreditNotes creditNotes, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateOrCreateCreditNotes"); // verify the required parameter 'creditNotes' is set if (creditNotes == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'creditNotes' when calling AccountingApi->UpdateOrCreateCreditNotes"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = creditNotes; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/CreditNotes", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateOrCreateCreditNotes", response); if (exception != null) throw exception; } return response; } /// /// Creates a single new employees used in Xero payrun /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Employees with array of Employee object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Employees public async System.Threading.Tasks.Task UpdateOrCreateEmployeesAsync (string accessToken, string xeroTenantId, Employees employees, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateOrCreateEmployeesAsyncWithHttpInfo(accessToken, xeroTenantId, employees, summarizeErrors, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates a single new employees used in Xero payrun /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Employees with array of Employee object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Employees) public async System.Threading.Tasks.Task> UpdateOrCreateEmployeesAsyncWithHttpInfo (string accessToken, string xeroTenantId, Employees employees, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateOrCreateEmployees"); // verify the required parameter 'employees' is set if (employees == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'employees' when calling AccountingApi->UpdateOrCreateEmployees"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = employees; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Employees", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateOrCreateEmployees", response); if (exception != null) throw exception; } return response; } /// /// Updates or creates one or more sales invoices or purchase bills /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Invoices public async System.Threading.Tasks.Task UpdateOrCreateInvoicesAsync (string accessToken, string xeroTenantId, Invoices invoices, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateOrCreateInvoicesAsyncWithHttpInfo(accessToken, xeroTenantId, invoices, summarizeErrors, unitdp, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates or creates one or more sales invoices or purchase bills /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Invoices) public async System.Threading.Tasks.Task> UpdateOrCreateInvoicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, Invoices invoices, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateOrCreateInvoices"); // verify the required parameter 'invoices' is set if (invoices == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'invoices' when calling AccountingApi->UpdateOrCreateInvoices"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = invoices; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Invoices", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateOrCreateInvoices", response); if (exception != null) throw exception; } return response; } /// /// Updates or creates one or more items /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Items public async System.Threading.Tasks.Task UpdateOrCreateItemsAsync (string accessToken, string xeroTenantId, Items items, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateOrCreateItemsAsyncWithHttpInfo(accessToken, xeroTenantId, items, summarizeErrors, unitdp, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates or creates one or more items /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Items) public async System.Threading.Tasks.Task> UpdateOrCreateItemsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Items items, bool? summarizeErrors = null, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateOrCreateItems"); // verify the required parameter 'items' is set if (items == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'items' when calling AccountingApi->UpdateOrCreateItems"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = items; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Items", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateOrCreateItems", response); if (exception != null) throw exception; } return response; } /// /// Updates or creates a single manual journal /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// ManualJournals array with ManualJournal object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ManualJournals public async System.Threading.Tasks.Task UpdateOrCreateManualJournalsAsync (string accessToken, string xeroTenantId, ManualJournals manualJournals, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateOrCreateManualJournalsAsyncWithHttpInfo(accessToken, xeroTenantId, manualJournals, summarizeErrors, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates or creates a single manual journal /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// ManualJournals array with ManualJournal object in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (ManualJournals) public async System.Threading.Tasks.Task> UpdateOrCreateManualJournalsAsyncWithHttpInfo (string accessToken, string xeroTenantId, ManualJournals manualJournals, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateOrCreateManualJournals"); // verify the required parameter 'manualJournals' is set if (manualJournals == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'manualJournals' when calling AccountingApi->UpdateOrCreateManualJournals"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = manualJournals; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/ManualJournals", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateOrCreateManualJournals", response); if (exception != null) throw exception; } return response; } /// /// Updates or creates one or more purchase orders /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PurchaseOrders public async System.Threading.Tasks.Task UpdateOrCreatePurchaseOrdersAsync (string accessToken, string xeroTenantId, PurchaseOrders purchaseOrders, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateOrCreatePurchaseOrdersAsyncWithHttpInfo(accessToken, xeroTenantId, purchaseOrders, summarizeErrors, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates or creates one or more purchase orders /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PurchaseOrders) public async System.Threading.Tasks.Task> UpdateOrCreatePurchaseOrdersAsyncWithHttpInfo (string accessToken, string xeroTenantId, PurchaseOrders purchaseOrders, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateOrCreatePurchaseOrders"); // verify the required parameter 'purchaseOrders' is set if (purchaseOrders == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'purchaseOrders' when calling AccountingApi->UpdateOrCreatePurchaseOrders"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = purchaseOrders; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/PurchaseOrders", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateOrCreatePurchaseOrders", response); if (exception != null) throw exception; } return response; } /// /// Updates or creates one or more quotes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Quotes public async System.Threading.Tasks.Task UpdateOrCreateQuotesAsync (string accessToken, string xeroTenantId, Quotes quotes, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateOrCreateQuotesAsyncWithHttpInfo(accessToken, xeroTenantId, quotes, summarizeErrors, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates or creates one or more quotes /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Quotes) public async System.Threading.Tasks.Task> UpdateOrCreateQuotesAsyncWithHttpInfo (string accessToken, string xeroTenantId, Quotes quotes, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateOrCreateQuotes"); // verify the required parameter 'quotes' is set if (quotes == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'quotes' when calling AccountingApi->UpdateOrCreateQuotes"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = quotes; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Quotes", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateOrCreateQuotes", response); if (exception != null) throw exception; } return response; } /// /// Creates or deletes one or more repeating invoice templates /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// RepeatingInvoices with an array of repeating invoice objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of RepeatingInvoices public async System.Threading.Tasks.Task UpdateOrCreateRepeatingInvoicesAsync (string accessToken, string xeroTenantId, RepeatingInvoices repeatingInvoices, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateOrCreateRepeatingInvoicesAsyncWithHttpInfo(accessToken, xeroTenantId, repeatingInvoices, summarizeErrors, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Creates or deletes one or more repeating invoice templates /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// RepeatingInvoices with an array of repeating invoice objects in body of request /// If false return 200 OK and mix of successfully created objects and any with validation errors (optional, default to false) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (RepeatingInvoices) public async System.Threading.Tasks.Task> UpdateOrCreateRepeatingInvoicesAsyncWithHttpInfo (string accessToken, string xeroTenantId, RepeatingInvoices repeatingInvoices, bool? summarizeErrors = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateOrCreateRepeatingInvoices"); // verify the required parameter 'repeatingInvoices' is set if (repeatingInvoices == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'repeatingInvoices' when calling AccountingApi->UpdateOrCreateRepeatingInvoices"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (summarizeErrors != null) { requestOptions.QueryParameters.Add("summarizeErrors", summarizeErrors.ToString()); } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = repeatingInvoices; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/RepeatingInvoices", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateOrCreateRepeatingInvoices", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific purchase order /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of PurchaseOrders public async System.Threading.Tasks.Task UpdatePurchaseOrderAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, PurchaseOrders purchaseOrders, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdatePurchaseOrderAsyncWithHttpInfo(accessToken, xeroTenantId, purchaseOrderID, purchaseOrders, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific purchase order /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (PurchaseOrders) public async System.Threading.Tasks.Task> UpdatePurchaseOrderAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, PurchaseOrders purchaseOrders, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdatePurchaseOrder"); // verify the required parameter 'purchaseOrderID' is set if (purchaseOrderID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'purchaseOrderID' when calling AccountingApi->UpdatePurchaseOrder"); // verify the required parameter 'purchaseOrders' is set if (purchaseOrders == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'purchaseOrders' when calling AccountingApi->UpdatePurchaseOrder"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (purchaseOrderID != null) requestOptions.PathParameters.Add("PurchaseOrderID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(purchaseOrderID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = purchaseOrders; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/PurchaseOrders/{PurchaseOrderID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdatePurchaseOrder", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific attachment for a specific purchase order by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task UpdatePurchaseOrderAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid purchaseOrderID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdatePurchaseOrderAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, purchaseOrderID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific attachment for a specific purchase order by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Purchase Order /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> UpdatePurchaseOrderAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid purchaseOrderID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdatePurchaseOrderAttachmentByFileName"); // verify the required parameter 'purchaseOrderID' is set if (purchaseOrderID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'purchaseOrderID' when calling AccountingApi->UpdatePurchaseOrderAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->UpdatePurchaseOrderAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->UpdatePurchaseOrderAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (purchaseOrderID != null) requestOptions.PathParameters.Add("PurchaseOrderID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(purchaseOrderID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdatePurchaseOrderAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific quote /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Quotes public async System.Threading.Tasks.Task UpdateQuoteAsync (string accessToken, string xeroTenantId, Guid quoteID, Quotes quotes, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateQuoteAsyncWithHttpInfo(accessToken, xeroTenantId, quoteID, quotes, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific quote /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Quotes) public async System.Threading.Tasks.Task> UpdateQuoteAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, Quotes quotes, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateQuote"); // verify the required parameter 'quoteID' is set if (quoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'quoteID' when calling AccountingApi->UpdateQuote"); // verify the required parameter 'quotes' is set if (quotes == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'quotes' when calling AccountingApi->UpdateQuote"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (quoteID != null) requestOptions.PathParameters.Add("QuoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(quoteID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = quotes; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Quotes/{QuoteID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateQuote", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific attachment from a specific quote by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task UpdateQuoteAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid quoteID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateQuoteAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, quoteID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific attachment from a specific quote by filename /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for an Quote /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> UpdateQuoteAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid quoteID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateQuoteAttachmentByFileName"); // verify the required parameter 'quoteID' is set if (quoteID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'quoteID' when calling AccountingApi->UpdateQuoteAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->UpdateQuoteAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->UpdateQuoteAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (quoteID != null) requestOptions.PathParameters.Add("QuoteID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(quoteID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Quotes/{QuoteID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateQuoteAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific draft expense claim receipts /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Receipts public async System.Threading.Tasks.Task UpdateReceiptAsync (string accessToken, string xeroTenantId, Guid receiptID, Receipts receipts, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateReceiptAsyncWithHttpInfo(accessToken, xeroTenantId, receiptID, receipts, unitdp, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific draft expense claim receipts /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// /// e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Receipts) public async System.Threading.Tasks.Task> UpdateReceiptAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, Receipts receipts, int? unitdp = null, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateReceipt"); // verify the required parameter 'receiptID' is set if (receiptID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'receiptID' when calling AccountingApi->UpdateReceipt"); // verify the required parameter 'receipts' is set if (receipts == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'receipts' when calling AccountingApi->UpdateReceipt"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (receiptID != null) requestOptions.PathParameters.Add("ReceiptID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(receiptID)); // path parameter if (unitdp != null) { foreach (var kvp in Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToMultiMap("", "unitdp", unitdp)) { foreach (var value in kvp.Value) { requestOptions.QueryParameters.Add(kvp.Key, value); } } } if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = receipts; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Receipts/{ReceiptID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateReceipt", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific attachment on a specific expense claim receipts by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task UpdateReceiptAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid receiptID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateReceiptAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, receiptID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific attachment on a specific expense claim receipts by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Receipt /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> UpdateReceiptAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid receiptID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateReceiptAttachmentByFileName"); // verify the required parameter 'receiptID' is set if (receiptID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'receiptID' when calling AccountingApi->UpdateReceiptAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->UpdateReceiptAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->UpdateReceiptAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (receiptID != null) requestOptions.PathParameters.Add("ReceiptID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(receiptID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/Receipts/{ReceiptID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateReceiptAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Deletes a specific repeating invoice template /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of RepeatingInvoices public async System.Threading.Tasks.Task UpdateRepeatingInvoiceAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, RepeatingInvoices repeatingInvoices, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateRepeatingInvoiceAsyncWithHttpInfo(accessToken, xeroTenantId, repeatingInvoiceID, repeatingInvoices, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Deletes a specific repeating invoice template /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (RepeatingInvoices) public async System.Threading.Tasks.Task> UpdateRepeatingInvoiceAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, RepeatingInvoices repeatingInvoices, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateRepeatingInvoice"); // verify the required parameter 'repeatingInvoiceID' is set if (repeatingInvoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'repeatingInvoiceID' when calling AccountingApi->UpdateRepeatingInvoice"); // verify the required parameter 'repeatingInvoices' is set if (repeatingInvoices == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'repeatingInvoices' when calling AccountingApi->UpdateRepeatingInvoice"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (repeatingInvoiceID != null) requestOptions.PathParameters.Add("RepeatingInvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(repeatingInvoiceID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = repeatingInvoices; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/RepeatingInvoices/{RepeatingInvoiceID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateRepeatingInvoice", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific attachment from a specific repeating invoices by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of Attachments public async System.Threading.Tasks.Task UpdateRepeatingInvoiceAttachmentByFileNameAsync (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateRepeatingInvoiceAttachmentByFileNameAsyncWithHttpInfo(accessToken, xeroTenantId, repeatingInvoiceID, fileName, body, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific attachment from a specific repeating invoices by file name /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a Repeating Invoice /// Name of the attachment /// Byte array of file in body of request /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (Attachments) public async System.Threading.Tasks.Task> UpdateRepeatingInvoiceAttachmentByFileNameAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid repeatingInvoiceID, string fileName, byte[] body, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateRepeatingInvoiceAttachmentByFileName"); // verify the required parameter 'repeatingInvoiceID' is set if (repeatingInvoiceID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'repeatingInvoiceID' when calling AccountingApi->UpdateRepeatingInvoiceAttachmentByFileName"); // verify the required parameter 'fileName' is set if (fileName == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'fileName' when calling AccountingApi->UpdateRepeatingInvoiceAttachmentByFileName"); // verify the required parameter 'body' is set if (body == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'body' when calling AccountingApi->UpdateRepeatingInvoiceAttachmentByFileName"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/octet-stream" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (repeatingInvoiceID != null) requestOptions.PathParameters.Add("RepeatingInvoiceID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(repeatingInvoiceID)); // path parameter if (fileName != null) requestOptions.PathParameters.Add("FileName", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(fileName)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = body; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateRepeatingInvoiceAttachmentByFileName", response); if (exception != null) throw exception; } return response; } /// /// Updates tax rates /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TaxRates public async System.Threading.Tasks.Task UpdateTaxRateAsync (string accessToken, string xeroTenantId, TaxRates taxRates, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateTaxRateAsyncWithHttpInfo(accessToken, xeroTenantId, taxRates, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates tax rates /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TaxRates) public async System.Threading.Tasks.Task> UpdateTaxRateAsyncWithHttpInfo (string accessToken, string xeroTenantId, TaxRates taxRates, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateTaxRate"); // verify the required parameter 'taxRates' is set if (taxRates == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'taxRates' when calling AccountingApi->UpdateTaxRate"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = taxRates; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/TaxRates", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateTaxRate", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific tracking category /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TrackingCategories public async System.Threading.Tasks.Task UpdateTrackingCategoryAsync (string accessToken, string xeroTenantId, Guid trackingCategoryID, TrackingCategory trackingCategory, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateTrackingCategoryAsyncWithHttpInfo(accessToken, xeroTenantId, trackingCategoryID, trackingCategory, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific tracking category /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TrackingCategories) public async System.Threading.Tasks.Task> UpdateTrackingCategoryAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid trackingCategoryID, TrackingCategory trackingCategory, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateTrackingCategory"); // verify the required parameter 'trackingCategoryID' is set if (trackingCategoryID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'trackingCategoryID' when calling AccountingApi->UpdateTrackingCategory"); // verify the required parameter 'trackingCategory' is set if (trackingCategory == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'trackingCategory' when calling AccountingApi->UpdateTrackingCategory"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (trackingCategoryID != null) requestOptions.PathParameters.Add("TrackingCategoryID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(trackingCategoryID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = trackingCategory; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/TrackingCategories/{TrackingCategoryID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateTrackingCategory", response); if (exception != null) throw exception; } return response; } /// /// Updates a specific option for a specific tracking category /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// Unique identifier for a Tracking Option /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of TrackingOptions public async System.Threading.Tasks.Task UpdateTrackingOptionsAsync (string accessToken, string xeroTenantId, Guid trackingCategoryID, Guid trackingOptionID, TrackingOption trackingOption, string idempotencyKey = null, CancellationToken cancellationToken = default) { Xero.NetStandard.OAuth2.Client.ApiResponse localVarResponse = await UpdateTrackingOptionsAsyncWithHttpInfo(accessToken, xeroTenantId, trackingCategoryID, trackingOptionID, trackingOption, idempotencyKey, cancellationToken); return localVarResponse.Data; } /// /// Updates a specific option for a specific tracking category /// /// Thrown when fails to make API call /// Xero API OAuth 2.0 accessToken /// Xero identifier for Tenant /// Unique identifier for a TrackingCategory /// Unique identifier for a Tracking Option /// /// This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) /// Cancellation token enables cancellation between threads. Defaults to CancellationToken.None /// Task of ApiResponse (TrackingOptions) public async System.Threading.Tasks.Task> UpdateTrackingOptionsAsyncWithHttpInfo (string accessToken, string xeroTenantId, Guid trackingCategoryID, Guid trackingOptionID, TrackingOption trackingOption, string idempotencyKey = null, CancellationToken cancellationToken = default) { // verify the required parameter 'xeroTenantId' is set if (xeroTenantId == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'xeroTenantId' when calling AccountingApi->UpdateTrackingOptions"); // verify the required parameter 'trackingCategoryID' is set if (trackingCategoryID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'trackingCategoryID' when calling AccountingApi->UpdateTrackingOptions"); // verify the required parameter 'trackingOptionID' is set if (trackingOptionID == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'trackingOptionID' when calling AccountingApi->UpdateTrackingOptions"); // verify the required parameter 'trackingOption' is set if (trackingOption == null) throw new Xero.NetStandard.OAuth2.Client.ApiException(400, "Missing required parameter 'trackingOption' when calling AccountingApi->UpdateTrackingOptions"); Xero.NetStandard.OAuth2.Client.RequestOptions requestOptions = new Xero.NetStandard.OAuth2.Client.RequestOptions(); String[] @contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] @accepts = new String[] { "application/json" }; foreach (var cType in @contentTypes) requestOptions.HeaderParameters.Add("Content-Type", cType); foreach (var accept in @accepts) requestOptions.HeaderParameters.Add("Accept", accept); if (trackingCategoryID != null) requestOptions.PathParameters.Add("TrackingCategoryID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(trackingCategoryID)); // path parameter if (trackingOptionID != null) requestOptions.PathParameters.Add("TrackingOptionID", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(trackingOptionID)); // path parameter if (xeroTenantId != null) requestOptions.HeaderParameters.Add("xero-tenant-id", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(xeroTenantId)); // header parameter if (idempotencyKey != null) requestOptions.HeaderParameters.Add("Idempotency-Key", Xero.NetStandard.OAuth2.Client.ClientUtils.ParameterToString(idempotencyKey)); // header parameter requestOptions.Data = trackingOption; // authentication (OAuth2) required // oauth required if (!String.IsNullOrEmpty(accessToken)) { requestOptions.HeaderParameters.Add("Authorization", "Bearer " + accessToken); } // make the HTTP request var response = await this.AsynchronousClient.PostAsync("/TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}", requestOptions, this.Configuration, cancellationToken); if (this.ExceptionFactory != null) { Exception exception = this.ExceptionFactory("UpdateTrackingOptions", response); if (exception != null) throw exception; } return response; } } }