createAccount
-Creates a new chart of accounts
--
/Accounts
- -
Usage and SDK Samples
- - - -curl -X "https://api.xero.com/api.xro/2.0/Accounts"
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- Account account = new Account();
- account.setCode("123456");
- account.setName("FooBar");
- account.setType(com.xero.models.accounting.AccountType.EXPENSE);
- account.setDescription("Hello World");
-
- try {
- Accounts result = apiInstance.createAccount(accessToken, xeroTenantId, account);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createAccount");
- e.printStackTrace();
- }
- }
-}
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Account account = { "Code":"123456", "Name":"Foobar", "Type":"EXPENSE", "Description":"Hello World" }; // Account |
- try {
- Accounts result = apiInstance.createAccount(xeroTenantId, account);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createAccount");
- e.printStackTrace();
- }
- }
-}
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Account *account = { "Code":"123456", "Name":"Foobar", "Type":"EXPENSE", "Description":"Hello World" }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a new chart of accounts
-[apiInstance createAccountWith:xeroTenantId
- account:account
- completionHandler: ^(Accounts output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
-const account: Account = {
- code: "123456",
- name: "FooBar",
- type: AccountType.EXPENSE,
- description: "Hello World" };
-
-try {
- const response = await xero.accountingApi.createAccount(xeroTenantId, account);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateAccountExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
-
- var account = new Account();
- account.Code = "123456";
- account.Name = "FooBar";
- account.Type = AccountType.EXPENSE;
- account.Description = "Hello World";
-
- try {
- var result = await apiInstance.CreateAccountAsync(accessToken, xeroTenantId, account);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateAccount: " + e.Message );
- }
- }
- }
-}
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-
-$account = new XeroAPI\XeroPHP\Models\Accounting\Account;
-$account->setCode('123456');
-$account->setName('FooBar');
-$account->setType(XeroAPI\XeroPHP\Models\Accounting\AccountType::EXPENSE);
-$account->setDescription('Hello World');
-
-try {
- $result = $apiInstance->createAccount($xeroTenantId, $account);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createAccount: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $account = ::Object::Account->new(); # Account |
-
-eval {
- my $result = $api_instance->createAccount(xeroTenantId => $xeroTenantId, account => $account);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createAccount: $@\n";
-}
- # configure api_client for use with xero-python sdk client
+
+
+ Accounting
+
+
+
+ createAccount
+ Creates a new chart of accounts
+
+
+
+
+
+
+
+ /Accounts
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -6748,50 +6556,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createAccount: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-
-account = {
- code: "123456",
- name: "FooBar",
- type: XeroRuby::Accounting::AccountType::EXPENSE,
- description: "Hello World"
-}
-
-begin
- response = xero_client.accounting_api.create_account(xero_tenant_id, account)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_account: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -6814,34 +6597,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- account *
-
-
-
-
- Account
-
-
-
-Account object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ account *
+
+
+
+
+ Account
+
+
+ Account object in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createAccountAttachmentByFileName
- Creates an attachment on a specific account
-
-
-
-
-
-
-
- /Accounts/{AccountID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Accounts/{AccountID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID accountID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.createAccountAttachmentByFileName(accessToken, xeroTenantId, accountID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createAccountAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID accountID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Account object
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.createAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createAccountAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *accountID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Account object (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates an attachment on a specific account
-[apiInstance createAccountAttachmentByFileNameWith:xeroTenantId
- accountID:accountID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const accountID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.createAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateAccountAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var accountID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.CreateAccountAttachmentByFileNameAsync(accessToken, xeroTenantId, accountID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateAccountAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$accountID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->createAccountAttachmentByFileName($xeroTenantId, $accountID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createAccountAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $accountID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Account object
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->createAccountAttachmentByFileName(xeroTenantId => $xeroTenantId, accountID => $accountID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createAccountAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createAccountAttachmentByFileName
+ Creates an attachment on a specific account
+
+
+
+
+
+
+
+ /Accounts/{AccountID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -7289,44 +6689,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createAccountAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-account_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.create_account_attachment_by_file_name(xero_tenant_id, account_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_account_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- AccountID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ AccountID*
@@ -7352,7 +6733,7 @@ Parameters
- FileName*
+ FileName*
@@ -7375,15 +6756,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -7406,454 +6786,260 @@ Parameters
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
+
+
+
+ Required
+
+
+
+
+
+
+
+
+
+
+ createBankTransactionAttachmentByFileName
+ Creates an attachment for a specific bank transaction by filename
+
+
+
+
+
+
+
+ /BankTransactions/{BankTransactionID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
+api_client = ApiClient(
+ Configuration(
+ debug=false,
+ oauth2_token=OAuth2Token(
+ client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
+ ),
+ ),
+ pool_threads=1,
+)
+
+api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
- Body parameters
-
-
- Name
- Description
-
- body *
+def accounting_create_bank_transaction_attachment_by_file_name():
+ api_instance = AccountingApi(api_client)
+ xero_tenant_id = 'YOUR_XERO_TENANT_ID'
+ bank_transaction_id = '00000000-0000-0000-0000-000000000000'
+ file_name = 'xero-dev.jpg'
+
+ path_to_upload = Path(__file__).resolve().parent.joinpath(fileName)
+ open_file = open(path_to_upload, 'rb')
+ body = open_file.read()
+
+ try:
+ api_response = api_instance.create_bank_transaction_attachment_by_file_name(xero_tenant_id, bank_transaction_id, file_name, body)
+ print(api_response)
+ except AccountingBadRequestException as e:
+ print("Exception when calling AccountingApi->createBankTransactionAttachmentByFileName: %s\n" % e)
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BankTransactionID*
-
+
+
+
+
- byte[]
+ UUID
+
+ (uuid)
+
-Byte array of file in body of request
+Xero generated unique identifier for a bank transaction
Required
-
-
-
+
-
+ FileName*
+
-
-
-
-
-
-
-
- createBankTransactionAttachmentByFileName
- Creates an attachment for a specific bank transaction by filename
-
-
-
-
-
-
-
- /BankTransactions/{BankTransactionID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransactions/{BankTransactionID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID bankTransactionID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.createBankTransactionAttachmentByFileName(accessToken, xeroTenantId, bankTransactionID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createBankTransactionAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID bankTransactionID = 00000000-0000-0000-0000-000000000000; // UUID | Xero generated unique identifier for a bank transaction
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.createBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createBankTransactionAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *bankTransactionID = 00000000-0000-0000-0000-000000000000; // Xero generated unique identifier for a bank transaction (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates an attachment for a specific bank transaction by filename
-[apiInstance createBankTransactionAttachmentByFileNameWith:xeroTenantId
- bankTransactionID:bankTransactionID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const bankTransactionID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.createBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateBankTransactionAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var bankTransactionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.CreateBankTransactionAttachmentByFileNameAsync(accessToken, xeroTenantId, bankTransactionID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateBankTransactionAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$bankTransactionID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->createBankTransactionAttachmentByFileName($xeroTenantId, $bankTransactionID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createBankTransactionAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
+ },
+ "required" : true
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransactionID = 00000000-0000-0000-0000-000000000000; # UUID | Xero generated unique identifier for a bank transaction
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->createBankTransactionAttachmentByFileName(xeroTenantId => $xeroTenantId, bankTransactionID => $bankTransactionID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createBankTransactionAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createBankTransactionHistoryRecord
+ Creates a history record for a specific bank transactions
+
+
+
+
+
+
+
+ /BankTransactions/{BankTransactionID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -7866,63 +7052,45 @@ Usage and SDK Samples
api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
-def accounting_create_bank_transaction_attachment_by_file_name():
+def accounting_create_bank_transaction_history_record():
api_instance = AccountingApi(api_client)
xero_tenant_id = 'YOUR_XERO_TENANT_ID'
bank_transaction_id = '00000000-0000-0000-0000-000000000000'
- file_name = 'xero-dev.jpg'
-
- path_to_upload = Path(__file__).resolve().parent.joinpath(fileName)
- open_file = open(path_to_upload, 'rb')
- body = open_file.read()
+
+ history_record = HistoryRecord(
+ details = "Hello World")
+
+ historyRecords = HistoryRecords(
+ history_records = [history_record])
try:
- api_response = api_instance.create_bank_transaction_attachment_by_file_name(xero_tenant_id, bank_transaction_id, file_name, body)
+ api_response = api_instance.create_bank_transaction_history_record(xero_tenant_id, bank_transaction_id, historyRecords)
print(api_response)
except AccountingBadRequestException as e:
- print("Exception when calling AccountingApi->createBankTransactionAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-bank_transaction_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.create_bank_transaction_attachment_by_file_name(xero_tenant_id, bank_transaction_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_bank_transaction_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BankTransactionID*
+ print("Exception when calling AccountingApi->createBankTransactionHistoryRecord: %s\n" % e)
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BankTransactionID*
-
+
@@ -7944,616 +7112,14 @@ Parameters
- FileName*
-
-
-
-
-
-
-
- String
-
-
-
-Name of the attachment
-
-
-
- Required
-
-
-
-
-
-
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
-
-
-
-
-
-
-
- String
-
-
-
-Xero identifier for Tenant
-
-
-
- Required
-
-
-
-
-
-
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createBankTransactionHistoryRecord
- Creates a history record for a specific bank transactions
-
-
-
-
-
-
-
- /BankTransactions/{BankTransactionID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransactions/{BankTransactionID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID bankTransactionID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- HistoryRecord historyRecord = new HistoryRecord();
- historyRecord.setDetails("Hello World");
-
- HistoryRecords historyRecords = new HistoryRecords();
- historyRecords.addHistoryRecordsItem(historyRecord);
-
- try {
- HistoryRecords result = apiInstance.createBankTransactionHistoryRecord(accessToken, xeroTenantId, bankTransactionID, historyRecords);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createBankTransactionHistoryRecord");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID bankTransactionID = 00000000-0000-0000-0000-000000000000; // UUID | Xero generated unique identifier for a bank transaction
- HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords |
- try {
- HistoryRecords result = apiInstance.createBankTransactionHistoryRecord(xeroTenantId, bankTransactionID, historyRecords);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createBankTransactionHistoryRecord");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *bankTransactionID = 00000000-0000-0000-0000-000000000000; // Xero generated unique identifier for a bank transaction (default to null)
-HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a history record for a specific bank transactions
-[apiInstance createBankTransactionHistoryRecordWith:xeroTenantId
- bankTransactionID:bankTransactionID
- historyRecords:historyRecords
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const bankTransactionID = '00000000-0000-0000-0000-000000000000';
-
-const historyRecord: HistoryRecord = {
- details: "Hello World" };
-
-const historyRecords: HistoryRecords = {
- historyRecords: [historyRecord] };
-
-try {
- const response = await xero.accountingApi.createBankTransactionHistoryRecord(xeroTenantId, bankTransactionID, historyRecords);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateBankTransactionHistoryRecordExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var bankTransactionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var historyRecord = new HistoryRecord();
- historyRecord.Details = "Hello World";
-
- var historyRecords = new HistoryRecords();
- var historyRecordsList = new List<HistoryRecord>();
- historyRecordsList.Add(historyRecord);
- historyRecords._HistoryRecords = historyRecordsList;
-
- try {
- var result = await apiInstance.CreateBankTransactionHistoryRecordAsync(accessToken, xeroTenantId, bankTransactionID, historyRecords);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateBankTransactionHistoryRecord: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$bankTransactionID = "00000000-0000-0000-0000-000000000000";
-
-$historyRecord = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecord;
-$historyRecord->setDetails('Hello World');
-
-$historyRecords = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecords;
-$arr_history_records = [];
-array_push($arr_history_records, $historyRecord);
-$historyRecords->setHistoryRecords($arr_history_records);
-
-try {
- $result = $apiInstance->createBankTransactionHistoryRecord($xeroTenantId, $bankTransactionID, $historyRecords);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createBankTransactionHistoryRecord: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransactionID = 00000000-0000-0000-0000-000000000000; # UUID | Xero generated unique identifier for a bank transaction
-my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords |
-
-eval {
- my $result = $api_instance->createBankTransactionHistoryRecord(xeroTenantId => $xeroTenantId, bankTransactionID => $bankTransactionID, historyRecords => $historyRecords);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createBankTransactionHistoryRecord: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
-api_client = ApiClient(
- Configuration(
- debug=false,
- oauth2_token=OAuth2Token(
- client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
- ),
- ),
- pool_threads=1,
-)
-
-api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
-
-def accounting_create_bank_transaction_history_record():
- api_instance = AccountingApi(api_client)
- xero_tenant_id = 'YOUR_XERO_TENANT_ID'
- bank_transaction_id = '00000000-0000-0000-0000-000000000000'
-
- history_record = HistoryRecord(
- details = "Hello World")
-
- historyRecords = HistoryRecords(
- history_records = [history_record])
-
- try:
- api_response = api_instance.create_bank_transaction_history_record(xero_tenant_id, bank_transaction_id, historyRecords)
- print(api_response)
- except AccountingBadRequestException as e:
- print("Exception when calling AccountingApi->createBankTransactionHistoryRecord: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-bank_transaction_id = '00000000-0000-0000-0000-000000000000'
-
-history_record = {
- details: "Hello World"
-}
-
-historyRecords = {
- history_records: [history_record]
-}
-
-begin
- response = xero_client.accounting_api.create_bank_transaction_history_record(xero_tenant_id, bank_transaction_id, historyRecords)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_bank_transaction_history_record: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BankTransactionID*
-
-
-
-
-
-
-
- UUID
-
-
- (uuid)
-
-
-
-Xero generated unique identifier for a bank transaction
-
-
-
- Required
-
-
-
-
-
-
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -8576,34 +7142,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- historyRecords *
-
-
-
-
- HistoryRecords
-
-
-
-HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ historyRecords *
+
+
+
+
+ HistoryRecords
+
+
+ HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createBankTransactions
- Creates one or more spent or received money transaction
-
-
-
-
-
-
-
- /BankTransactions
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransactions?summarizeErrors=true&unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
- Integer unitdp = 4;
-
- Contact contact = new Contact();
- contact.setContactID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- LineItem lineItem = new LineItem();
- lineItem.setDescription("Foobar");
- lineItem.setQuantity(1.0);
- lineItem.setUnitAmount(20.0);
- lineItem.setAccountCode("000");
-
- List<LineItem> lineItems = new ArrayList<LineItem>();
- lineItems.add(lineItem);
-
- Account bankAccount = new Account();
- bankAccount.setAccountID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- BankTransaction bankTransaction = new BankTransaction();
- bankTransaction.setType(com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE);
- bankTransaction.setContact(contact);
- bankTransaction.setLineItems(lineItems);
- bankTransaction.setBankAccount(bankAccount);
-
- BankTransactions bankTransactions = new BankTransactions();
- bankTransactions.addBankTransactionsItem(bankTransaction);
-
- try {
- BankTransactions result = apiInstance.createBankTransactions(accessToken, xeroTenantId, bankTransactions, summarizeErrors, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createBankTransactions");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- BankTransactions bankTransactions = { bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, contact: { contactID: "00000000-0000-0000-0000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "000" } ], bankAccount: { code: "000" }}]}; // BankTransactions |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- BankTransactions result = apiInstance.createBankTransactions(xeroTenantId, bankTransactions, summarizeErrors, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createBankTransactions");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-BankTransactions *bankTransactions = { bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, contact: { contactID: "00000000-0000-0000-0000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "000" } ], bankAccount: { code: "000" }}]}; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates one or more spent or received money transaction
-[apiInstance createBankTransactionsWith:xeroTenantId
- bankTransactions:bankTransactions
- summarizeErrors:summarizeErrors
- unitdp:unitdp
- completionHandler: ^(BankTransactions output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-const unitdp = 4;
-
-const contact: Contact = {
- contactID: "00000000-0000-0000-0000-000000000000" };
-
-const lineItem: LineItem = {
- description: "Foobar",
- quantity: 1.0,
- unitAmount: 20.0,
- accountCode: "000" };
-const lineItems = [];
-lineItems.push(lineItem)
-
-const bankAccount: Account = {
- accountID: "00000000-0000-0000-0000-000000000000" };
-
-const bankTransaction: BankTransaction = {
- type: BankTransaction.TypeEnum.RECEIVE,
- contact: contact,
- lineItems: lineItems,
- bankAccount: bankAccount };
-
-const bankTransactions: BankTransactions = {
- bankTransactions: [bankTransaction] };
-
-try {
- const response = await xero.accountingApi.createBankTransactions(xeroTenantId, bankTransactions, summarizeErrors, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateBankTransactionsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
- var unitdp = 4;
-
- var contact = new Contact();
- contact.ContactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var lineItem = new LineItem();
- lineItem.Description = "Foobar";
- lineItem.Quantity = new decimal(1.0);
- lineItem.UnitAmount = new decimal(20.0);
- lineItem.AccountCode = "000";
- var lineItems = new List<LineItem>();
- lineItems.Add(lineItem);
-
- var bankAccount = new Account();
- bankAccount.AccountID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var bankTransaction = new BankTransaction();
- bankTransaction.Type = BankTransaction.TypeEnum.RECEIVE;
- bankTransaction.Contact = contact;
- bankTransaction.LineItems = lineItems;
- bankTransaction.BankAccount = bankAccount;
-
- var bankTransactions = new BankTransactions();
- var bankTransactionsList = new List<BankTransaction>();
- bankTransactionsList.Add(bankTransaction);
- bankTransactions._BankTransactions = bankTransactionsList;
-
- try {
- var result = await apiInstance.CreateBankTransactionsAsync(accessToken, xeroTenantId, bankTransactions, summarizeErrors, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateBankTransactions: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-$unitdp = 4;
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setContactID('00000000-0000-0000-0000-000000000000');
-
-$lineItem = new XeroAPI\XeroPHP\Models\Accounting\LineItem;
-$lineItem->setDescription('Foobar');
-$lineItem->setQuantity(1.0);
-$lineItem->setUnitAmount(20.0);
-$lineItem->setAccountCode('000');
-$lineItems = [];
-array_push($lineItems, $lineItem);
-
-$bankAccount = new XeroAPI\XeroPHP\Models\Accounting\Account;
-$bankAccount->setAccountID('00000000-0000-0000-0000-000000000000');
-
-$bankTransaction = new XeroAPI\XeroPHP\Models\Accounting\BankTransaction;
-$bankTransaction->setType(XeroAPI\XeroPHP\Models\Accounting\BankTransaction::TYPE_RECEIVE);
-$bankTransaction->setContact($contact);
-$bankTransaction->setLineItems($lineItems);
-$bankTransaction->setBankAccount($bankAccount);
-
-$bankTransactions = new XeroAPI\XeroPHP\Models\Accounting\BankTransactions;
-$arr_bank_transactions = [];
-array_push($arr_bank_transactions, $bankTransaction);
-$bankTransactions->setBankTransactions($arr_bank_transactions);
-
-try {
- $result = $apiInstance->createBankTransactions($xeroTenantId, $bankTransactions, $summarizeErrors, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createBankTransactions: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransactions = ::Object::BankTransactions->new(); # BankTransactions |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->createBankTransactions(xeroTenantId => $xeroTenantId, bankTransactions => $bankTransactions, summarizeErrors => $summarizeErrors, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createBankTransactions: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createBankTransactions
+ Creates one or more spent or received money transaction
+
+
+
+
+
+
+
+ /BankTransactions
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -9147,73 +7253,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createBankTransactions: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-unitdp = 4
-
-contact = {
- contact_id: "00000000-0000-0000-0000-000000000000"
-}
-
-line_item = {
- description: "Foobar",
- quantity: 1.0,
- unit_amount: 20.0,
- account_code: "000"
-}
-line_items = []
-line_items << line_item
-
-bank_account = {
- account_id: "00000000-0000-0000-0000-000000000000"
-}
-
-bank_transaction = {
- type: XeroRuby::Accounting::BankTransaction::RECEIVE,
- contact: contact,
- lineItems: lineItems,
- bank_account: bank_account
-}
-
-bankTransactions = {
- bank_transactions: [bank_transaction]
-}
-
-begin
- response = xero_client.accounting_api.create_bank_transactions(xero_tenant_id, bankTransactions, summarize_errors, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_bank_transactions: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -9236,34 +7294,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- bankTransactions *
-
-
-
-
- BankTransactions
-
-
-
-BankTransactions with an array of BankTransaction objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ bankTransactions *
+
+
+
+
+ BankTransactions
+
+
+ BankTransactions with an array of BankTransaction objects in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -9324,7 +7358,7 @@ Parameters
- unitdp
+ unitdp
@@ -9344,417 +7378,34 @@ Parameters
-
-
-
-
-
-
-
-
- createBankTransfer
- Creates a bank transfer
-
-
-
-
-
-
-
- /BankTransfers
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransfers"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- Account fromBankAccount = new Account();
- fromBankAccount.setAccountID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- Account toBankAccount = new Account();
- toBankAccount.setAccountID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- BankTransfer bankTransfer = new BankTransfer();
- bankTransfer.setFromBankAccount(fromBankAccount);
- bankTransfer.setToBankAccount(toBankAccount);
- bankTransfer.setAmount(1.0);
-
- BankTransfers bankTransfers = new BankTransfers();
- bankTransfers.addBankTransfersItem(bankTransfer);
-
- try {
- BankTransfers result = apiInstance.createBankTransfer(accessToken, xeroTenantId, bankTransfers);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createBankTransfer");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- BankTransfers bankTransfers = { "BankTransfers": [ { "FromBankAccount": { "Code": "090", "Name": "My Savings", "AccountID": "00000000-0000-0000-0000-000000000000", "Type": "BANK", "BankAccountNumber": "123455", "Status": "ACTIVE", "BankAccountType": "BANK", "CurrencyCode": "USD", "TaxType": "NONE", "EnablePaymentsToAccount": false, "ShowInExpenseClaims": false, "Class": "ASSET", "ReportingCode": "ASS", "ReportingCodeName": "Assets", "HasAttachments": false, "UpdatedDateUTC": "2016-10-17T13:45:33.993-07:00" }, "ToBankAccount": { "Code": "088", "Name": "Business Wells Fargo", "AccountID": "00000000-0000-0000-0000-000000000000", "Type": "BANK", "BankAccountNumber": "123455", "Status": "ACTIVE", "BankAccountType": "BANK", "CurrencyCode": "USD", "TaxType": "NONE", "EnablePaymentsToAccount": false, "ShowInExpenseClaims": false, "Class": "ASSET", "ReportingCode": "ASS", "ReportingCodeName": "Assets", "HasAttachments": false, "UpdatedDateUTC": "2016-06-03T08:31:14.517-07:00" }, "Amount": "50.00" } ] }; // BankTransfers |
- try {
- BankTransfers result = apiInstance.createBankTransfer(xeroTenantId, bankTransfers);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createBankTransfer");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-BankTransfers *bankTransfers = { "BankTransfers": [ { "FromBankAccount": { "Code": "090", "Name": "My Savings", "AccountID": "00000000-0000-0000-0000-000000000000", "Type": "BANK", "BankAccountNumber": "123455", "Status": "ACTIVE", "BankAccountType": "BANK", "CurrencyCode": "USD", "TaxType": "NONE", "EnablePaymentsToAccount": false, "ShowInExpenseClaims": false, "Class": "ASSET", "ReportingCode": "ASS", "ReportingCodeName": "Assets", "HasAttachments": false, "UpdatedDateUTC": "2016-10-17T13:45:33.993-07:00" }, "ToBankAccount": { "Code": "088", "Name": "Business Wells Fargo", "AccountID": "00000000-0000-0000-0000-000000000000", "Type": "BANK", "BankAccountNumber": "123455", "Status": "ACTIVE", "BankAccountType": "BANK", "CurrencyCode": "USD", "TaxType": "NONE", "EnablePaymentsToAccount": false, "ShowInExpenseClaims": false, "Class": "ASSET", "ReportingCode": "ASS", "ReportingCodeName": "Assets", "HasAttachments": false, "UpdatedDateUTC": "2016-06-03T08:31:14.517-07:00" }, "Amount": "50.00" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a bank transfer
-[apiInstance createBankTransferWith:xeroTenantId
- bankTransfers:bankTransfers
- completionHandler: ^(BankTransfers output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
-const fromBankAccount: Account = {
- accountID: "00000000-0000-0000-0000-000000000000" };
-
-const toBankAccount: Account = {
- accountID: "00000000-0000-0000-0000-000000000000" };
-
-const bankTransfer: BankTransfer = {
- fromBankAccount: fromBankAccount,
- toBankAccount: toBankAccount,
- amount: 1.0 };
-
-const bankTransfers: BankTransfers = {
- bankTransfers: [bankTransfer] };
-
-try {
- const response = await xero.accountingApi.createBankTransfer(xeroTenantId, bankTransfers);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateBankTransferExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
-
- var fromBankAccount = new Account();
- fromBankAccount.AccountID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var toBankAccount = new Account();
- toBankAccount.AccountID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var bankTransfer = new BankTransfer();
- bankTransfer.FromBankAccount = fromBankAccount;
- bankTransfer.ToBankAccount = toBankAccount;
- bankTransfer.Amount = new decimal(1.0);
-
- var bankTransfers = new BankTransfers();
- var bankTransfersList = new List<BankTransfer>();
- bankTransfersList.Add(bankTransfer);
- bankTransfers._BankTransfers = bankTransfersList;
-
- try {
- var result = await apiInstance.CreateBankTransferAsync(accessToken, xeroTenantId, bankTransfers);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateBankTransfer: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-
-$fromBankAccount = new XeroAPI\XeroPHP\Models\Accounting\Account;
-$fromBankAccount->setAccountID('00000000-0000-0000-0000-000000000000');
-
-$toBankAccount = new XeroAPI\XeroPHP\Models\Accounting\Account;
-$toBankAccount->setAccountID('00000000-0000-0000-0000-000000000000');
-
-$bankTransfer = new XeroAPI\XeroPHP\Models\Accounting\BankTransfer;
-$bankTransfer->setFromBankAccount($fromBankAccount);
-$bankTransfer->setToBankAccount($toBankAccount);
-$bankTransfer->setAmount(1.0);
-
-$bankTransfers = new XeroAPI\XeroPHP\Models\Accounting\BankTransfers;
-$arr_bank_transfers = [];
-array_push($arr_bank_transfers, $bankTransfer);
-$bankTransfers->setBankTransfers($arr_bank_transfers);
-
-try {
- $result = $apiInstance->createBankTransfer($xeroTenantId, $bankTransfers);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createBankTransfer: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransfers = ::Object::BankTransfers->new(); # BankTransfers |
-
-eval {
- my $result = $api_instance->createBankTransfer(xeroTenantId => $xeroTenantId, bankTransfers => $bankTransfers);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createBankTransfer: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ createBankTransfer
+ Creates a bank transfer
+
+
+
+
+
+
+
+ /BankTransfers
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -9790,61 +7441,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createBankTransfer: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-
-fromBankAccount = {
- account_id: "00000000-0000-0000-0000-000000000000"
-}
-
-toBankAccount = {
- account_id: "00000000-0000-0000-0000-000000000000"
-}
-
-bank_transfer = {
- from_bank_account: fromBankAccount,
- to_bank_account: toBankAccount,
- amount: 1.0
-}
-
-bankTransfers = {
- bank_transfers: [bank_transfer]
-}
-
-begin
- response = xero_client.accounting_api.create_bank_transfer(xero_tenant_id, bankTransfers)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_bank_transfer: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -9867,34 +7482,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- bankTransfers *
-
-
-
-
- BankTransfers
-
-
-
-BankTransfers with array of BankTransfer objects in request body
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ bankTransfers *
+
+
+
+
+ BankTransfers
+
+
+ BankTransfers with array of BankTransfer objects in request body
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createBankTransferAttachmentByFileName
-
-
-
-
-
-
-
-
- /BankTransfers/{BankTransferID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransfers/{BankTransferID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID bankTransferID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.createBankTransferAttachmentByFileName(accessToken, xeroTenantId, bankTransferID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createBankTransferAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID bankTransferID = 00000000-0000-0000-0000-000000000000; // UUID | Xero generated unique identifier for a bank transfer
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.createBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createBankTransferAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *bankTransferID = 00000000-0000-0000-0000-000000000000; // Xero generated unique identifier for a bank transfer (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-//
-[apiInstance createBankTransferAttachmentByFileNameWith:xeroTenantId
- bankTransferID:bankTransferID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const bankTransferID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.createBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateBankTransferAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var bankTransferID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.CreateBankTransferAttachmentByFileNameAsync(accessToken, xeroTenantId, bankTransferID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateBankTransferAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$bankTransferID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->createBankTransferAttachmentByFileName($xeroTenantId, $bankTransferID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createBankTransferAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransferID = 00000000-0000-0000-0000-000000000000; # UUID | Xero generated unique identifier for a bank transfer
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->createBankTransferAttachmentByFileName(xeroTenantId => $xeroTenantId, bankTransferID => $bankTransferID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createBankTransferAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createBankTransferAttachmentByFileName
+
+
+
+
+
+
+
+
+ /BankTransfers/{BankTransferID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -10341,44 +7574,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createBankTransferAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-bank_transfer_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.create_bank_transfer_attachment_by_file_name(xero_tenant_id, bank_transfer_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_bank_transfer_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BankTransferID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BankTransferID*
@@ -10404,7 +7618,7 @@ Parameters
- FileName*
+ FileName*
@@ -10427,15 +7641,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -10458,34 +7671,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createBankTransferHistoryRecord
- Creates a history record for a specific bank transfer
-
-
-
-
-
-
-
- /BankTransfers/{BankTransferID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransfers/{BankTransferID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID bankTransferID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- HistoryRecord historyRecord = new HistoryRecord();
- historyRecord.setDetails("Hello World");
-
- HistoryRecords historyRecords = new HistoryRecords();
- historyRecords.addHistoryRecordsItem(historyRecord);
-
- try {
- HistoryRecords result = apiInstance.createBankTransferHistoryRecord(accessToken, xeroTenantId, bankTransferID, historyRecords);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createBankTransferHistoryRecord");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID bankTransferID = 00000000-0000-0000-0000-000000000000; // UUID | Xero generated unique identifier for a bank transfer
- HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords |
- try {
- HistoryRecords result = apiInstance.createBankTransferHistoryRecord(xeroTenantId, bankTransferID, historyRecords);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createBankTransferHistoryRecord");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *bankTransferID = 00000000-0000-0000-0000-000000000000; // Xero generated unique identifier for a bank transfer (default to null)
-HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a history record for a specific bank transfer
-[apiInstance createBankTransferHistoryRecordWith:xeroTenantId
- bankTransferID:bankTransferID
- historyRecords:historyRecords
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const bankTransferID = '00000000-0000-0000-0000-000000000000';
-
-const historyRecord: HistoryRecord = {
- details: "Hello World" };
-
-const historyRecords: HistoryRecords = {
- historyRecords: [historyRecord] };
-
-try {
- const response = await xero.accountingApi.createBankTransferHistoryRecord(xeroTenantId, bankTransferID, historyRecords);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateBankTransferHistoryRecordExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var bankTransferID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var historyRecord = new HistoryRecord();
- historyRecord.Details = "Hello World";
-
- var historyRecords = new HistoryRecords();
- var historyRecordsList = new List<HistoryRecord>();
- historyRecordsList.Add(historyRecord);
- historyRecords._HistoryRecords = historyRecordsList;
-
- try {
- var result = await apiInstance.CreateBankTransferHistoryRecordAsync(accessToken, xeroTenantId, bankTransferID, historyRecords);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateBankTransferHistoryRecord: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$bankTransferID = "00000000-0000-0000-0000-000000000000";
-
-$historyRecord = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecord;
-$historyRecord->setDetails('Hello World');
-
-$historyRecords = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecords;
-$arr_history_records = [];
-array_push($arr_history_records, $historyRecord);
-$historyRecords->setHistoryRecords($arr_history_records);
-
-try {
- $result = $apiInstance->createBankTransferHistoryRecord($xeroTenantId, $bankTransferID, $historyRecords);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createBankTransferHistoryRecord: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransferID = 00000000-0000-0000-0000-000000000000; # UUID | Xero generated unique identifier for a bank transfer
-my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords |
-
-eval {
- my $result = $api_instance->createBankTransferHistoryRecord(xeroTenantId => $xeroTenantId, bankTransferID => $bankTransferID, historyRecords => $historyRecords);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createBankTransferHistoryRecord: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createBankTransferHistoryRecord
+ Creates a history record for a specific bank transfer
+
+
+
+
+
+
+
+ /BankTransfers/{BankTransferID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -10935,51 +7764,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createBankTransferHistoryRecord: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-bank_transfer_id = '00000000-0000-0000-0000-000000000000'
-
-history_record = {
- details: "Hello World"
-}
-
-historyRecords = {
- history_records: [history_record]
-}
-
-begin
- response = xero_client.accounting_api.create_bank_transfer_history_record(xero_tenant_id, bank_transfer_id, historyRecords)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_bank_transfer_history_record: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BankTransferID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BankTransferID*
@@ -11005,15 +7808,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -11036,34 +7838,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- historyRecords *
-
-
-
-
- HistoryRecords
-
-
-
-HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ historyRecords *
+
+
+
+
+ HistoryRecords
+
+
+ HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createBatchPayment
- Creates one or many batch payments for invoices
-
-
-
-
-
-
-
- /BatchPayments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BatchPayments?summarizeErrors=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
- LocalDate currDate = LocalDate.now();
-
- Account paymentAccount = new Account();
- paymentAccount.setAccountID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- Account bankAccount = new Account();
- bankAccount.setAccountID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- Invoice invoice = new Invoice();
- invoice.setInvoiceID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- Payment payment = new Payment();
- payment.setAccount(bankAccount);
- payment.setDate(currDate);
- payment.setAmount(1.0);
- payment.setInvoice(invoice);
-
- List<Payment> payments = new ArrayList<Payment>();
- payments.add(payment);
-
- BatchPayment batchPayment = new BatchPayment();
- batchPayment.setAccount(paymentAccount);
- batchPayment.setReference("hello foobar");
- batchPayment.setDate(currDate);
- batchPayment.setPayments(payments);
-
- BatchPayments batchPayments = new BatchPayments();
- batchPayments.addBatchPaymentsItem(batchPayment);
-
- try {
- BatchPayments result = apiInstance.createBatchPayment(accessToken, xeroTenantId, batchPayments, summarizeErrors);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createBatchPayment");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- BatchPayments batchPayments = { "BatchPayments": [ { "Account": { "AccountID": "00000000-0000-0000-0000-000000000000" }, "Reference": "ref", "Date": "2018-08-01", "Payments": [ { "Account": { "Code": "001" }, "Date": "2019-12-31", "Amount": 500, "Invoice": { "InvoiceID": "00000000-0000-0000-0000-000000000000", "LineItems": [], "Contact": {}, "Type": "ACCPAY" } } ] } ] }; // BatchPayments |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- try {
- BatchPayments result = apiInstance.createBatchPayment(xeroTenantId, batchPayments, summarizeErrors);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createBatchPayment");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-BatchPayments *batchPayments = { "BatchPayments": [ { "Account": { "AccountID": "00000000-0000-0000-0000-000000000000" }, "Reference": "ref", "Date": "2018-08-01", "Payments": [ { "Account": { "Code": "001" }, "Date": "2019-12-31", "Amount": 500, "Invoice": { "InvoiceID": "00000000-0000-0000-0000-000000000000", "LineItems": [], "Contact": {}, "Type": "ACCPAY" } } ] } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates one or many batch payments for invoices
-[apiInstance createBatchPaymentWith:xeroTenantId
- batchPayments:batchPayments
- summarizeErrors:summarizeErrors
- completionHandler: ^(BatchPayments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-const currDate = '2020-12-10'
-
-const paymentAccount: Account = {
- accountID: "00000000-0000-0000-0000-000000000000" };
-
-const bankAccount: Account = {
- accountID: "00000000-0000-0000-0000-000000000000" };
-
-const invoice: Invoice = {
- invoiceID: "00000000-0000-0000-0000-000000000000" };
-
-const payment: Payment = {
- account: bankAccount,
- date: currDate,
- amount: 1.0,
- invoice: invoice };
-const payments = [];
-payments.push(payment)
-
-const batchPayment: BatchPayment = {
- account: paymentAccount,
- reference: "hello foobar",
- date: currDate,
- payments: payments };
-
-const batchPayments: BatchPayments = {
- batchPayments: [batchPayment] };
-
-try {
- const response = await xero.accountingApi.createBatchPayment(xeroTenantId, batchPayments, summarizeErrors);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateBatchPaymentExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
- var currDate = DateTime.Now;
-
- var paymentAccount = new Account();
- paymentAccount.AccountID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var bankAccount = new Account();
- bankAccount.AccountID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var invoice = new Invoice();
- invoice.InvoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var payment = new Payment();
- payment.Account = bankAccount;
- payment.Date = currDate;
- payment.Amount = new decimal(1.0);
- payment.Invoice = invoice;
- var payments = new List<Payment>();
- payments.Add(payment);
-
- var batchPayment = new BatchPayment();
- batchPayment.Account = paymentAccount;
- batchPayment.Reference = "hello foobar";
- batchPayment.Date = currDate;
- batchPayment.Payments = payments;
-
- var batchPayments = new BatchPayments();
- var batchPaymentsList = new List<BatchPayment>();
- batchPaymentsList.Add(batchPayment);
- batchPayments._BatchPayments = batchPaymentsList;
-
- try {
- var result = await apiInstance.CreateBatchPaymentAsync(accessToken, xeroTenantId, batchPayments, summarizeErrors);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateBatchPayment: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-$currDate = new DateTime('2020-12-10');
-
-$paymentAccount = new XeroAPI\XeroPHP\Models\Accounting\Account;
-$paymentAccount->setAccountID('00000000-0000-0000-0000-000000000000');
-
-$bankAccount = new XeroAPI\XeroPHP\Models\Accounting\Account;
-$bankAccount->setAccountID('00000000-0000-0000-0000-000000000000');
-
-$invoice = new XeroAPI\XeroPHP\Models\Accounting\Invoice;
-$invoice->setInvoiceID('00000000-0000-0000-0000-000000000000');
-
-$payment = new XeroAPI\XeroPHP\Models\Accounting\Payment;
-$payment->setAccount($bankAccount);
-$payment->setDate($currDate);
-$payment->setAmount(1.0);
-$payment->setInvoice($invoice);
-$payments = [];
-array_push($payments, $payment);
-
-$batchPayment = new XeroAPI\XeroPHP\Models\Accounting\BatchPayment;
-$batchPayment->setAccount($paymentAccount);
-$batchPayment->setReference('hello foobar');
-$batchPayment->setDate($currDate);
-$batchPayment->setPayments($payments);
-
-$batchPayments = new XeroAPI\XeroPHP\Models\Accounting\BatchPayments;
-$arr_batch_payments = [];
-array_push($arr_batch_payments, $batchPayment);
-$batchPayments->setBatchPayments($arr_batch_payments);
-
-try {
- $result = $apiInstance->createBatchPayment($xeroTenantId, $batchPayments, $summarizeErrors);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createBatchPayment: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $batchPayments = ::Object::BatchPayments->new(); # BatchPayments |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-
-eval {
- my $result = $api_instance->createBatchPayment(xeroTenantId => $xeroTenantId, batchPayments => $batchPayments, summarizeErrors => $summarizeErrors);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createBatchPayment: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createBatchPayment
+ Creates one or many batch payments for invoices
+
+
+
+
+
+
+
+ /BatchPayments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -11619,77 +7953,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createBatchPayment: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-curr_date = 'YYYY-MM-DD'
-
-payment_account = {
- account_id: "00000000-0000-0000-0000-000000000000"
-}
-
-bank_account = {
- account_id: "00000000-0000-0000-0000-000000000000"
-}
-
-invoice = {
- invoice_id: "00000000-0000-0000-0000-000000000000"
-}
-
-payment = {
- account: bank_account,
- date: curr_date,
- amount: 1.0,
- invoice: invoice
-}
-payments = []
-payments << payment
-
-batch_payment = {
- account: payment_account,
- reference: "hello foobar",
- date: curr_date,
- payments: payments
-}
-
-batchPayments = {
- batch_payments: [batch_payment]
-}
-
-begin
- response = xero_client.accounting_api.create_batch_payment(xero_tenant_id, batchPayments, summarize_errors)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_batch_payment: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -11712,34 +7994,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- batchPayments *
-
-
-
-
- BatchPayments
-
-
-
-BatchPayments with an array of Payments in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ batchPayments *
+
+
+
+
+ BatchPayments
+
+
+ BatchPayments with an array of Payments in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -11800,393 +8058,34 @@ Parameters
-
-
-
-
-
-
-
-
- createBatchPaymentHistoryRecord
- Creates a history record for a specific batch payment
-
-
-
-
-
-
-
- /BatchPayments/{BatchPaymentID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BatchPayments/{BatchPaymentID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID batchPaymentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- HistoryRecord historyRecord = new HistoryRecord();
- historyRecord.setDetails("Hello World");
-
- HistoryRecords historyRecords = new HistoryRecords();
- historyRecords.addHistoryRecordsItem(historyRecord);
-
- try {
- HistoryRecords result = apiInstance.createBatchPaymentHistoryRecord(accessToken, xeroTenantId, batchPaymentID, historyRecords);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createBatchPaymentHistoryRecord");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID batchPaymentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for BatchPayment
- HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords |
- try {
- HistoryRecords result = apiInstance.createBatchPaymentHistoryRecord(xeroTenantId, batchPaymentID, historyRecords);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createBatchPaymentHistoryRecord");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *batchPaymentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for BatchPayment (default to null)
-HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a history record for a specific batch payment
-[apiInstance createBatchPaymentHistoryRecordWith:xeroTenantId
- batchPaymentID:batchPaymentID
- historyRecords:historyRecords
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const batchPaymentID = '00000000-0000-0000-0000-000000000000';
-
-const historyRecord: HistoryRecord = {
- details: "Hello World" };
-
-const historyRecords: HistoryRecords = {
- historyRecords: [historyRecord] };
-
-try {
- const response = await xero.accountingApi.createBatchPaymentHistoryRecord(xeroTenantId, batchPaymentID, historyRecords);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateBatchPaymentHistoryRecordExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var batchPaymentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var historyRecord = new HistoryRecord();
- historyRecord.Details = "Hello World";
-
- var historyRecords = new HistoryRecords();
- var historyRecordsList = new List<HistoryRecord>();
- historyRecordsList.Add(historyRecord);
- historyRecords._HistoryRecords = historyRecordsList;
-
- try {
- var result = await apiInstance.CreateBatchPaymentHistoryRecordAsync(accessToken, xeroTenantId, batchPaymentID, historyRecords);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateBatchPaymentHistoryRecord: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$batchPaymentID = "00000000-0000-0000-0000-000000000000";
-
-$historyRecord = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecord;
-$historyRecord->setDetails('Hello World');
-
-$historyRecords = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecords;
-$arr_history_records = [];
-array_push($arr_history_records, $historyRecord);
-$historyRecords->setHistoryRecords($arr_history_records);
-
-try {
- $result = $apiInstance->createBatchPaymentHistoryRecord($xeroTenantId, $batchPaymentID, $historyRecords);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createBatchPaymentHistoryRecord: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $batchPaymentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for BatchPayment
-my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords |
-
-eval {
- my $result = $api_instance->createBatchPaymentHistoryRecord(xeroTenantId => $xeroTenantId, batchPaymentID => $batchPaymentID, historyRecords => $historyRecords);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createBatchPaymentHistoryRecord: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ createBatchPaymentHistoryRecord
+ Creates a history record for a specific batch payment
+
+
+
+
+
+
+
+ /BatchPayments/{BatchPaymentID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -12215,51 +8114,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createBatchPaymentHistoryRecord: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-batch_payment_id = '00000000-0000-0000-0000-000000000000'
-
-history_record = {
- details: "Hello World"
-}
-
-historyRecords = {
- history_records: [history_record]
-}
-
-begin
- response = xero_client.accounting_api.create_batch_payment_history_record(xero_tenant_id, batch_payment_id, historyRecords)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_batch_payment_history_record: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BatchPaymentID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BatchPaymentID*
@@ -12285,15 +8158,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -12316,34 +8188,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- historyRecords *
-
-
-
-
- HistoryRecords
-
-
-
-HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ historyRecords *
+
+
+
+
+ HistoryRecords
+
+
+ HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createBrandingThemePaymentServices
- Creates a new custom payment service for a specific branding theme
-
-
-
-
-
-
-
- /BrandingThemes/{BrandingThemeID}/PaymentServices
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BrandingThemes/{BrandingThemeID}/PaymentServices"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID brandingThemeID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- PaymentService paymentService = new PaymentService();
- paymentService.setPaymentServiceID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
- paymentService.setPaymentServiceName("ACME Payments");
- paymentService.setPaymentServiceUrl("https://www.payupnow.com/");
- paymentService.setPayNowText("Pay Now");
-
- try {
- PaymentServices result = apiInstance.createBrandingThemePaymentServices(accessToken, xeroTenantId, brandingThemeID, paymentService);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createBrandingThemePaymentServices");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID brandingThemeID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Branding Theme
- PaymentService paymentService = { "PaymentServiceID": "00000000-0000-0000-0000-000000000000", "PaymentServiceName": "ACME Payments", "PaymentServiceUrl": "https://www.payupnow.com/", "PayNowText": "Pay Now" }; // PaymentService |
- try {
- PaymentServices result = apiInstance.createBrandingThemePaymentServices(xeroTenantId, brandingThemeID, paymentService);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createBrandingThemePaymentServices");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *brandingThemeID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Branding Theme (default to null)
-PaymentService *paymentService = { "PaymentServiceID": "00000000-0000-0000-0000-000000000000", "PaymentServiceName": "ACME Payments", "PaymentServiceUrl": "https://www.payupnow.com/", "PayNowText": "Pay Now" }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a new custom payment service for a specific branding theme
-[apiInstance createBrandingThemePaymentServicesWith:xeroTenantId
- brandingThemeID:brandingThemeID
- paymentService:paymentService
- completionHandler: ^(PaymentServices output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const brandingThemeID = '00000000-0000-0000-0000-000000000000';
-
-const paymentService: PaymentService = {
- paymentServiceID: "00000000-0000-0000-0000-000000000000",
- paymentServiceName: "ACME Payments",
- paymentServiceUrl: "https://www.payupnow.com/",
- payNowText: "Pay Now" };
-
-try {
- const response = await xero.accountingApi.createBrandingThemePaymentServices(xeroTenantId, brandingThemeID, paymentService);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateBrandingThemePaymentServicesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var brandingThemeID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var paymentService = new PaymentService();
- paymentService.PaymentServiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- paymentService.PaymentServiceName = "ACME Payments";
- paymentService.PaymentServiceUrl = "https://www.payupnow.com/";
- paymentService.PayNowText = "Pay Now";
-
- try {
- var result = await apiInstance.CreateBrandingThemePaymentServicesAsync(accessToken, xeroTenantId, brandingThemeID, paymentService);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateBrandingThemePaymentServices: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$brandingThemeID = "00000000-0000-0000-0000-000000000000";
-
-$paymentService = new XeroAPI\XeroPHP\Models\Accounting\PaymentService;
-$paymentService->setPaymentServiceID('00000000-0000-0000-0000-000000000000');
-$paymentService->setPaymentServiceName('ACME Payments');
-$paymentService->setPaymentServiceUrl('https://www.payupnow.com/');
-$paymentService->setPayNowText('Pay Now');
-
-try {
- $result = $apiInstance->createBrandingThemePaymentServices($xeroTenantId, $brandingThemeID, $paymentService);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createBrandingThemePaymentServices: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $brandingThemeID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Branding Theme
-my $paymentService = ::Object::PaymentService->new(); # PaymentService |
-
-eval {
- my $result = $api_instance->createBrandingThemePaymentServices(xeroTenantId => $xeroTenantId, brandingThemeID => $brandingThemeID, paymentService => $paymentService);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createBrandingThemePaymentServices: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createBrandingThemePaymentServices
+ Creates a new custom payment service for a specific branding theme
+
+
+
+
+
+
+
+ /BrandingThemes/{BrandingThemeID}/PaymentServices
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -12788,50 +8281,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createBrandingThemePaymentServices: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-branding_theme_id = '00000000-0000-0000-0000-000000000000'
-
-payment_service = {
- payment_service_id: "00000000-0000-0000-0000-000000000000",
- payment_service_name: "ACME Payments",
- payment_service_url: "https://www.payupnow.com/",
- pay_now_text: "Pay Now"
-}
-
-begin
- response = xero_client.accounting_api.create_branding_theme_payment_services(xero_tenant_id, branding_theme_id, paymentService)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_branding_theme_payment_services: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- paymentservices
- Grant read-write access to payment services
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BrandingThemeID*
+
+
+ Scopes
+
+
+
+ paymentservices
+ Grant read-write access to payment services
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BrandingThemeID*
@@ -12857,15 +8325,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -12888,34 +8355,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- paymentService *
-
-
-
-
- PaymentService
-
-
-
-PaymentService object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ paymentService *
+
+
+
+
+ PaymentService
+
+
+ PaymentService object in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createContactAttachmentByFileName
-
-
-
-
-
-
-
-
- /Contacts/{ContactID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Contacts/{ContactID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID contactID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.createContactAttachmentByFileName(accessToken, xeroTenantId, contactID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createContactAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID contactID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.createContactAttachmentByFileName(xeroTenantId, contactID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createContactAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *contactID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-//
-[apiInstance createContactAttachmentByFileNameWith:xeroTenantId
- contactID:contactID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.createContactAttachmentByFileName(xeroTenantId, contactID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateContactAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.CreateContactAttachmentByFileNameAsync(accessToken, xeroTenantId, contactID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateContactAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->createContactAttachmentByFileName($xeroTenantId, $contactID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createContactAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->createContactAttachmentByFileName(xeroTenantId => $xeroTenantId, contactID => $contactID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createContactAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createContactAttachmentByFileName
+
+
+
+
+
+
+
+
+ /Contacts/{ContactID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -13362,44 +8447,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createContactAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.create_contact_attachment_by_file_name(xero_tenant_id, contact_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_contact_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ContactID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ContactID*
@@ -13425,7 +8491,7 @@ Parameters
- FileName*
+ FileName*
@@ -13448,15 +8514,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -13479,34 +8544,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createContactGroup
- Creates a contact group
-
-
-
-
-
-
-
- /ContactGroups
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ContactGroups"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- ContactGroup contactGroup = new ContactGroup();
- contactGroup.setName("VIPs");
-
- ContactGroups contactGroups = new ContactGroups();
- contactGroups.addContactGroupsItem(contactGroup);
-
- try {
- ContactGroups result = apiInstance.createContactGroup(accessToken, xeroTenantId, contactGroups);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createContactGroup");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- ContactGroups contactGroups = { "ContactGroups": [{ "Name": "VIPs" }]}; // ContactGroups |
- try {
- ContactGroups result = apiInstance.createContactGroup(xeroTenantId, contactGroups);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createContactGroup");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-ContactGroups *contactGroups = { "ContactGroups": [{ "Name": "VIPs" }]}; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a contact group
-[apiInstance createContactGroupWith:xeroTenantId
- contactGroups:contactGroups
- completionHandler: ^(ContactGroups output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
-const contactGroup: ContactGroup = {
- name: "VIPs" };
-
-const contactGroups: ContactGroups = {
- contactGroups: [contactGroup] };
-
-try {
- const response = await xero.accountingApi.createContactGroup(xeroTenantId, contactGroups);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateContactGroupExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
-
- var contactGroup = new ContactGroup();
- contactGroup.Name = "VIPs";
-
- var contactGroups = new ContactGroups();
- var contactGroupsList = new List<ContactGroup>();
- contactGroupsList.Add(contactGroup);
- contactGroups._ContactGroups = contactGroupsList;
-
- try {
- var result = await apiInstance.CreateContactGroupAsync(accessToken, xeroTenantId, contactGroups);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateContactGroup: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-
-$contactGroup = new XeroAPI\XeroPHP\Models\Accounting\ContactGroup;
-$contactGroup->setName('VIPs');
-
-$contactGroups = new XeroAPI\XeroPHP\Models\Accounting\ContactGroups;
-$arr_contact_groups = [];
-array_push($arr_contact_groups, $contactGroup);
-$contactGroups->setContactGroups($arr_contact_groups);
-
-try {
- $result = $apiInstance->createContactGroup($xeroTenantId, $contactGroups);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createContactGroup: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactGroups = ::Object::ContactGroups->new(); # ContactGroups |
-
-eval {
- my $result = $api_instance->createContactGroup(xeroTenantId => $xeroTenantId, contactGroups => $contactGroups);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createContactGroup: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+ "required" : true
+}
+
+
+
+
+
+
+
+
+ createContactGroup
+ Creates a contact group
+
+
+
+
+
+
+
+ /ContactGroups
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -13947,51 +8636,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createContactGroup: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-
-contact_group = {
- name: "VIPs"
-}
-
-contactGroups = {
- contact_groups: [contact_group]
-}
-
-begin
- response = xero_client.accounting_api.create_contact_group(xero_tenant_id, contactGroups)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_contact_group: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.contacts
- Grant read-write access to contacts and contact groups
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.contacts
+ Grant read-write access to contacts and contact groups
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -14014,34 +8677,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- contactGroups *
-
-
-
-
- ContactGroups
-
-
-
-ContactGroups with an array of names in request body
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ contactGroups *
+
+
+
+
+ ContactGroups
+
+
+ ContactGroups with an array of names in request body
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createContactGroupContacts
- Creates contacts to a specific contact group
-
-
-
-
-
-
-
- /ContactGroups/{ContactGroupID}/Contacts
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ContactGroups/{ContactGroupID}/Contacts"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID contactGroupID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- Contact contact = new Contact();
- contact.setContactID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- Contacts contacts = new Contacts();
- contacts.addContactsItem(contact);
-
- try {
- Contacts result = apiInstance.createContactGroupContacts(accessToken, xeroTenantId, contactGroupID, contacts);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createContactGroupContacts");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID contactGroupID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact Group
- Contacts contacts = { "Contacts": [ { "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7" }, { "ContactID": "4e1753b9-018a-4775-b6aa-1bc7871cfee3" } ] }; // Contacts |
- try {
- Contacts result = apiInstance.createContactGroupContacts(xeroTenantId, contactGroupID, contacts);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createContactGroupContacts");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *contactGroupID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact Group (default to null)
-Contacts *contacts = { "Contacts": [ { "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7" }, { "ContactID": "4e1753b9-018a-4775-b6aa-1bc7871cfee3" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates contacts to a specific contact group
-[apiInstance createContactGroupContactsWith:xeroTenantId
- contactGroupID:contactGroupID
- contacts:contacts
- completionHandler: ^(Contacts output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactGroupID = '00000000-0000-0000-0000-000000000000';
-
-const contact: Contact = {
- contactID: "00000000-0000-0000-0000-000000000000" };
-
-const contacts: Contacts = {
- contacts: [contact] };
-
-try {
- const response = await xero.accountingApi.createContactGroupContacts(xeroTenantId, contactGroupID, contacts);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateContactGroupContactsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactGroupID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var contact = new Contact();
- contact.ContactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var contacts = new Contacts();
- var contactsList = new List<Contact>();
- contactsList.Add(contact);
- contacts._Contacts = contactsList;
-
- try {
- var result = await apiInstance.CreateContactGroupContactsAsync(accessToken, xeroTenantId, contactGroupID, contacts);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateContactGroupContacts: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactGroupID = "00000000-0000-0000-0000-000000000000";
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setContactID('00000000-0000-0000-0000-000000000000');
-
-$contacts = new XeroAPI\XeroPHP\Models\Accounting\Contacts;
-$arr_contacts = [];
-array_push($arr_contacts, $contact);
-$contacts->setContacts($arr_contacts);
-
-try {
- $result = $apiInstance->createContactGroupContacts($xeroTenantId, $contactGroupID, $contacts);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createContactGroupContacts: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactGroupID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact Group
-my $contacts = ::Object::Contacts->new(); # Contacts |
-
-eval {
- my $result = $api_instance->createContactGroupContacts(xeroTenantId => $xeroTenantId, contactGroupID => $contactGroupID, contacts => $contacts);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createContactGroupContacts: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createContactGroupContacts
+ Creates contacts to a specific contact group
+
+
+
+
+
+
+
+ /ContactGroups/{ContactGroupID}/Contacts
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -14491,51 +8770,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createContactGroupContacts: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_group_id = '00000000-0000-0000-0000-000000000000'
-
-contact = {
- contact_id: "00000000-0000-0000-0000-000000000000"
-}
-
-contacts = {
- contacts: [contact]
-}
-
-begin
- response = xero_client.accounting_api.create_contact_group_contacts(xero_tenant_id, contact_group_id, contacts)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_contact_group_contacts: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.contacts
- Grant read-write access to contacts and contact groups
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ContactGroupID*
+
+
+ Scopes
+
+
+
+ accounting.contacts
+ Grant read-write access to contacts and contact groups
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ContactGroupID*
@@ -14561,15 +8814,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -14592,34 +8844,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- contacts *
-
-
-
-
- Contacts
-
-
-
-Contacts with array of contacts specifying the ContactID to be added to ContactGroup in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ contacts *
+
+
+
+
+ Contacts
+
+
+ Contacts with array of contacts specifying the ContactID to be added to ContactGroup in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createContactHistory
- Creates a new history record for a specific contact
-
-
-
-
-
-
-
- /Contacts/{ContactID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Contacts/{ContactID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID contactID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- HistoryRecord historyRecord = new HistoryRecord();
- historyRecord.setDetails("Hello World");
-
- HistoryRecords historyRecords = new HistoryRecords();
- historyRecords.addHistoryRecordsItem(historyRecord);
-
- try {
- HistoryRecords result = apiInstance.createContactHistory(accessToken, xeroTenantId, contactID, historyRecords);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createContactHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID contactID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact
- HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords |
- try {
- HistoryRecords result = apiInstance.createContactHistory(xeroTenantId, contactID, historyRecords);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createContactHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *contactID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact (default to null)
-HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a new history record for a specific contact
-[apiInstance createContactHistoryWith:xeroTenantId
- contactID:contactID
- historyRecords:historyRecords
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactID = '00000000-0000-0000-0000-000000000000';
-
-const historyRecord: HistoryRecord = {
- details: "Hello World" };
-
-const historyRecords: HistoryRecords = {
- historyRecords: [historyRecord] };
-
-try {
- const response = await xero.accountingApi.createContactHistory(xeroTenantId, contactID, historyRecords);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateContactHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var historyRecord = new HistoryRecord();
- historyRecord.Details = "Hello World";
-
- var historyRecords = new HistoryRecords();
- var historyRecordsList = new List<HistoryRecord>();
- historyRecordsList.Add(historyRecord);
- historyRecords._HistoryRecords = historyRecordsList;
-
- try {
- var result = await apiInstance.CreateContactHistoryAsync(accessToken, xeroTenantId, contactID, historyRecords);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateContactHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactID = "00000000-0000-0000-0000-000000000000";
-
-$historyRecord = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecord;
-$historyRecord->setDetails('Hello World');
-
-$historyRecords = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecords;
-$arr_history_records = [];
-array_push($arr_history_records, $historyRecord);
-$historyRecords->setHistoryRecords($arr_history_records);
-
-try {
- $result = $apiInstance->createContactHistory($xeroTenantId, $contactID, $historyRecords);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createContactHistory: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact
-my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords |
-
-eval {
- my $result = $api_instance->createContactHistory(xeroTenantId => $xeroTenantId, contactID => $contactID, historyRecords => $historyRecords);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createContactHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createContactHistory
+ Creates a new history record for a specific contact
+
+
+
+
+
+
+
+ /Contacts/{ContactID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -15068,51 +8937,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createContactHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_id = '00000000-0000-0000-0000-000000000000'
-
-history_record = {
- details: "Hello World"
-}
-
-historyRecords = {
- history_records: [history_record]
-}
-
-begin
- response = xero_client.accounting_api.create_contact_history(xero_tenant_id, contact_id, historyRecords)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_contact_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.contacts
- Grant read-write access to contacts and contact groups
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ContactID*
+
+
+ Scopes
+
+
+
+ accounting.contacts
+ Grant read-write access to contacts and contact groups
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ContactID*
@@ -15138,15 +8981,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -15169,34 +9011,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- historyRecords *
-
-
-
-
- HistoryRecords
-
-
-
-HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ historyRecords *
+
+
+
+
+ HistoryRecords
+
+
+ HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createContacts
- Creates multiple contacts (bulk) in a Xero organisation
-
-
-
-
-
-
-
- /Contacts
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Contacts?summarizeErrors=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
-
- Phone phone = new Phone();
- phone.setPhoneNumber("555-1212");
- phone.setPhoneType(com.xero.models.accounting.Phone.PhoneTypeEnum.MOBILE);
-
- List<Phone> phones = new ArrayList<Phone>();
- phones.add(phone);
-
- Contact contact = new Contact();
- contact.setName("Bruce Banner");
- contact.setEmailAddress("hulk@avengers.com");
- contact.setPhones(phones);
-
- Contacts contacts = new Contacts();
- contacts.addContactsItem(contact);
-
- try {
- Contacts result = apiInstance.createContacts(accessToken, xeroTenantId, contacts, summarizeErrors);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createContacts");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Contacts contacts = { "Id": "e997d6d7-6dad-4458-beb8-d9c1bf7f2edf", "Status": "OK", "ProviderName": "Xero API Partner", "DateTimeUTC": "/Date(1551399321121)/", "Contacts": [ { "ContactID": "3ff6d40c-af9a-40a3-89ce-3c1556a25591", "ContactStatus": "ACTIVE", "Name": "Foo9987", "EmailAddress": "sid32476@blah.com", "BankAccountDetails": "", "Addresses": [ { "AddressType": "STREET", "City": "", "Region": "", "PostalCode": "", "Country": "" }, { "AddressType": "POBOX", "City": "", "Region": "", "PostalCode": "", "Country": "" } ], "Phones": [ { "PhoneType": "DEFAULT", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" }, { "PhoneType": "DDI", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" }, { "PhoneType": "FAX", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" }, { "PhoneType": "MOBILE", "PhoneNumber": "555-1212", "PhoneAreaCode": "415", "PhoneCountryCode": "" } ], "UpdatedDateUTC": "/Date(1551399321043+0000)/", "ContactGroups": [], "IsSupplier": false, "IsCustomer": false, "SalesTrackingCategories": [], "PurchasesTrackingCategories": [], "PaymentTerms": { "Bills": { "Day": 15, "Type": "OFCURRENTMONTH" }, "Sales": { "Day": 10, "Type": "DAYSAFTERBILLMONTH" } }, "ContactPersons": [], "HasValidationErrors": false } ] }; // Contacts |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- try {
- Contacts result = apiInstance.createContacts(xeroTenantId, contacts, summarizeErrors);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createContacts");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Contacts *contacts = { "Id": "e997d6d7-6dad-4458-beb8-d9c1bf7f2edf", "Status": "OK", "ProviderName": "Xero API Partner", "DateTimeUTC": "/Date(1551399321121)/", "Contacts": [ { "ContactID": "3ff6d40c-af9a-40a3-89ce-3c1556a25591", "ContactStatus": "ACTIVE", "Name": "Foo9987", "EmailAddress": "sid32476@blah.com", "BankAccountDetails": "", "Addresses": [ { "AddressType": "STREET", "City": "", "Region": "", "PostalCode": "", "Country": "" }, { "AddressType": "POBOX", "City": "", "Region": "", "PostalCode": "", "Country": "" } ], "Phones": [ { "PhoneType": "DEFAULT", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" }, { "PhoneType": "DDI", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" }, { "PhoneType": "FAX", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" }, { "PhoneType": "MOBILE", "PhoneNumber": "555-1212", "PhoneAreaCode": "415", "PhoneCountryCode": "" } ], "UpdatedDateUTC": "/Date(1551399321043+0000)/", "ContactGroups": [], "IsSupplier": false, "IsCustomer": false, "SalesTrackingCategories": [], "PurchasesTrackingCategories": [], "PaymentTerms": { "Bills": { "Day": 15, "Type": "OFCURRENTMONTH" }, "Sales": { "Day": 10, "Type": "DAYSAFTERBILLMONTH" } }, "ContactPersons": [], "HasValidationErrors": false } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates multiple contacts (bulk) in a Xero organisation
-[apiInstance createContactsWith:xeroTenantId
- contacts:contacts
- summarizeErrors:summarizeErrors
- completionHandler: ^(Contacts output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-
-const phone: Phone = {
- phoneNumber: "555-1212",
- phoneType: Phone.PhoneTypeEnum.MOBILE };
-const phones = [];
-phones.push(phone)
-
-const contact: Contact = {
- name: "Bruce Banner",
- emailAddress: "hulk@avengers.com",
- phones: phones };
-
-const contacts: Contacts = {
- contacts: [contact] };
-
-try {
- const response = await xero.accountingApi.createContacts(xeroTenantId, contacts, summarizeErrors);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateContactsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
-
- var phone = new Phone();
- phone.PhoneNumber = "555-1212";
- phone.PhoneType = Phone.PhoneTypeEnum.MOBILE;
- var phones = new List<Phone>();
- phones.Add(phone);
-
- var contact = new Contact();
- contact.Name = "Bruce Banner";
- contact.EmailAddress = "hulk@avengers.com";
- contact.Phones = phones;
-
- var contacts = new Contacts();
- var contactsList = new List<Contact>();
- contactsList.Add(contact);
- contacts._Contacts = contactsList;
-
- try {
- var result = await apiInstance.CreateContactsAsync(accessToken, xeroTenantId, contacts, summarizeErrors);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateContacts: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-
-$phone = new XeroAPI\XeroPHP\Models\Accounting\Phone;
-$phone->setPhoneNumber('555-1212');
-$phone->setPhoneType(XeroAPI\XeroPHP\Models\Accounting\Phone::PHONE_TYPE_MOBILE);
-$phones = [];
-array_push($phones, $phone);
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setName('Bruce Banner');
-$contact->setEmailAddress('hulk@avengers.com');
-$contact->setPhones($phones);
-
-$contacts = new XeroAPI\XeroPHP\Models\Accounting\Contacts;
-$arr_contacts = [];
-array_push($arr_contacts, $contact);
-$contacts->setContacts($arr_contacts);
-
-try {
- $result = $apiInstance->createContacts($xeroTenantId, $contacts, $summarizeErrors);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createContacts: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contacts = ::Object::Contacts->new(); # Contacts |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-
-eval {
- my $result = $api_instance->createContacts(xeroTenantId => $xeroTenantId, contacts => $contacts, summarizeErrors => $summarizeErrors);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createContacts: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createContacts
+ Creates multiple contacts (bulk) in a Xero organisation
+
+
+
+
+
+
+
+ /Contacts
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -15687,61 +9113,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createContacts: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-
-phone = {
- phone_number: "555-1212",
- phone_type: XeroRuby::Accounting::PhoneType::MOBILE
-}
-phones = []
-phones << phone
-
-contact = {
- name: "Bruce Banner",
- email_address: "hulk@avengers.com",
- phones: phones
-}
-
-contacts = {
- contacts: [contact]
-}
-
-begin
- response = xero_client.accounting_api.create_contacts(xero_tenant_id, contacts, summarize_errors)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_contacts: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.contacts
- Grant read-write access to contacts and contact groups
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.contacts
+ Grant read-write access to contacts and contact groups
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -15764,34 +9154,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- contacts *
-
-
-
-
- Contacts
-
-
-
-Contacts with an array of Contact objects to create in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ contacts *
+
+
+
+
+ Contacts
+
+
+ Contacts with an array of Contact objects to create in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -15852,426 +9218,34 @@ Parameters
-
-
-
-
-
-
-
-
- createCreditNoteAllocation
- Creates allocation for a specific credit note
-
-
-
-
-
-
-
- /CreditNotes/{CreditNoteID}/Allocations
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/CreditNotes/{CreditNoteID}/Allocations?summarizeErrors=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID creditNoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- Boolean summarizeErrors = true;
- LocalDate currDate = LocalDate.now();
-
- Invoice invoice = new Invoice();
- invoice.setInvoiceID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- Allocation allocation = new Allocation();
- allocation.setAmount(1.0);
- allocation.setDate(currDate);
- allocation.setInvoice(invoice);
-
- Allocations allocations = new Allocations();
- allocations.addAllocationsItem(allocation);
-
- try {
- Allocations result = apiInstance.createCreditNoteAllocation(accessToken, xeroTenantId, creditNoteID, allocations, summarizeErrors);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createCreditNoteAllocation");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID creditNoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Credit Note
- Allocations allocations = { "Allocations": [ { "Invoice": { "LineItems": [], "InvoiceID": "c45720a1-ade3-4a38-a064-d15489be6841" }, "Amount": 1, "Date": "2019-03-05" } ] }; // Allocations |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- try {
- Allocations result = apiInstance.createCreditNoteAllocation(xeroTenantId, creditNoteID, allocations, summarizeErrors);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createCreditNoteAllocation");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *creditNoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Credit Note (default to null)
-Allocations *allocations = { "Allocations": [ { "Invoice": { "LineItems": [], "InvoiceID": "c45720a1-ade3-4a38-a064-d15489be6841" }, "Amount": 1, "Date": "2019-03-05" } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates allocation for a specific credit note
-[apiInstance createCreditNoteAllocationWith:xeroTenantId
- creditNoteID:creditNoteID
- allocations:allocations
- summarizeErrors:summarizeErrors
- completionHandler: ^(Allocations output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const creditNoteID = '00000000-0000-0000-0000-000000000000';
-const summarizeErrors = true;
-const currDate = '2020-12-10'
-
-const invoice: Invoice = {
- invoiceID: "00000000-0000-0000-0000-000000000000" };
-
-const allocation: Allocation = {
- amount: 1.0,
- date: currDate,
- invoice: invoice };
-
-const allocations: Allocations = {
- allocations: [allocation] };
-
-try {
- const response = await xero.accountingApi.createCreditNoteAllocation(xeroTenantId, creditNoteID, allocations, summarizeErrors);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateCreditNoteAllocationExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var creditNoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var summarizeErrors = true;
- var currDate = DateTime.Now;
-
- var invoice = new Invoice();
- invoice.InvoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var allocation = new Allocation();
- allocation.Amount = new decimal(1.0);
- allocation.Date = currDate;
- allocation.Invoice = invoice;
-
- var allocations = new Allocations();
- var allocationsList = new List<Allocation>();
- allocationsList.Add(allocation);
- allocations._Allocations = allocationsList;
-
- try {
- var result = await apiInstance.CreateCreditNoteAllocationAsync(accessToken, xeroTenantId, creditNoteID, allocations, summarizeErrors);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateCreditNoteAllocation: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$creditNoteID = "00000000-0000-0000-0000-000000000000";
-$summarizeErrors = true;
-$currDate = new DateTime('2020-12-10');
-
-$invoice = new XeroAPI\XeroPHP\Models\Accounting\Invoice;
-$invoice->setInvoiceID('00000000-0000-0000-0000-000000000000');
-
-$allocation = new XeroAPI\XeroPHP\Models\Accounting\Allocation;
-$allocation->setAmount(1.0);
-$allocation->setDate($currDate);
-$allocation->setInvoice($invoice);
-
-$allocations = new XeroAPI\XeroPHP\Models\Accounting\Allocations;
-$arr_allocations = [];
-array_push($arr_allocations, $allocation);
-$allocations->setAllocations($arr_allocations);
-
-try {
- $result = $apiInstance->createCreditNoteAllocation($xeroTenantId, $creditNoteID, $allocations, $summarizeErrors);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createCreditNoteAllocation: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $creditNoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Credit Note
-my $allocations = ::Object::Allocations->new(); # Allocations |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-
-eval {
- my $result = $api_instance->createCreditNoteAllocation(xeroTenantId => $xeroTenantId, creditNoteID => $creditNoteID, allocations => $allocations, summarizeErrors => $summarizeErrors);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createCreditNoteAllocation: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ createCreditNoteAllocation
+ Creates allocation for a specific credit note
+
+
+
+
+
+
+
+ /CreditNotes/{CreditNoteID}/Allocations
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -16307,59 +9281,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createCreditNoteAllocation: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-credit_note_id = '00000000-0000-0000-0000-000000000000'
-summarize_errors = true
-curr_date = 'YYYY-MM-DD'
-
-invoice = {
- invoiceID: "00000000-0000-0000-0000-000000000000"
-}
-
-allocation = {
- amount: 1.0,
- date: curr_date,
- invoice: invoice
-}
-
-allocations = {
- allocations: [allocation]
-}
-
-begin
- response = xero_client.accounting_api.create_credit_note_allocation(xero_tenant_id, credit_note_id, allocations, summarize_errors)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_credit_note_allocation: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- CreditNoteID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ CreditNoteID*
@@ -16385,15 +9325,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -16416,34 +9355,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- allocations *
-
-
-
-
- Allocations
-
-
-
-Allocations with array of Allocation object in body of request.
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ allocations *
+
+
+
+
+ Allocations
+
+
+ Allocations with array of Allocation object in body of request.
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -16504,400 +9419,34 @@ Parameters
-
-
-
-
-
-
-
-
- createCreditNoteAttachmentByFileName
- Creates an attachment for a specific credit note
-
-
-
-
-
-
-
- /CreditNotes/{CreditNoteID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/CreditNotes/{CreditNoteID}/Attachments/{FileName}?IncludeOnline=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID creditNoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
- Boolean includeOnline = true;
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.createCreditNoteAttachmentByFileName(accessToken, xeroTenantId, creditNoteID, fileName, body, includeOnline, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createCreditNoteAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID creditNoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Credit Note
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- Boolean includeOnline = true; // Boolean | Allows an attachment to be seen by the end customer within their online invoice
- try {
- Attachments result = apiInstance.createCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body, includeOnline);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createCreditNoteAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *creditNoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Credit Note (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-Boolean *includeOnline = true; // Allows an attachment to be seen by the end customer within their online invoice (optional) (default to false)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates an attachment for a specific credit note
-[apiInstance createCreditNoteAttachmentByFileNameWith:xeroTenantId
- creditNoteID:creditNoteID
- fileName:fileName
- body:body
- includeOnline:includeOnline
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const creditNoteID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const includeOnline = true;
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.createCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body, includeOnline, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateCreditNoteAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var creditNoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- var includeOnline = true;
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.CreateCreditNoteAttachmentByFileNameAsync(accessToken, xeroTenantId, creditNoteID, fileName, body, includeOnline);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateCreditNoteAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$creditNoteID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-$includeOnline = true;
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->createCreditNoteAttachmentByFileName($xeroTenantId, $creditNoteID, $fileName, $body, $includeOnline);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createCreditNoteAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $creditNoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Credit Note
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-my $includeOnline = true; # Boolean | Allows an attachment to be seen by the end customer within their online invoice
-
-eval {
- my $result = $api_instance->createCreditNoteAttachmentByFileName(xeroTenantId => $xeroTenantId, creditNoteID => $creditNoteID, fileName => $fileName, body => $body, includeOnline => $includeOnline);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createCreditNoteAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ createCreditNoteAttachmentByFileName
+ Creates an attachment for a specific credit note
+
+
+
+
+
+
+
+ /CreditNotes/{CreditNoteID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -16926,45 +9475,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createCreditNoteAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-credit_note_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-include_online = true
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.create_credit_note_attachment_by_file_name(xero_tenant_id, credit_note_id, file_name, body, include_online)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_credit_note_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- CreditNoteID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ CreditNoteID*
@@ -16990,7 +9519,7 @@ Parameters
- FileName*
+ FileName*
@@ -17013,15 +9542,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -17044,34 +9572,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- IncludeOnline
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ IncludeOnline
@@ -17132,394 +9636,34 @@ Parameters
-
-
-
-
-
-
-
-
- createCreditNoteHistory
- Retrieves history records of a specific credit note
-
-
-
-
-
-
-
- /CreditNotes/{CreditNoteID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/CreditNotes/{CreditNoteID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID creditNoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- HistoryRecord historyRecord = new HistoryRecord();
- historyRecord.setDetails("Hello World");
-
- HistoryRecords historyRecords = new HistoryRecords();
- historyRecords.addHistoryRecordsItem(historyRecord);
-
- try {
- HistoryRecords result = apiInstance.createCreditNoteHistory(accessToken, xeroTenantId, creditNoteID, historyRecords);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createCreditNoteHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID creditNoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Credit Note
- HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords |
- try {
- HistoryRecords result = apiInstance.createCreditNoteHistory(xeroTenantId, creditNoteID, historyRecords);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createCreditNoteHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *creditNoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Credit Note (default to null)
-HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves history records of a specific credit note
-[apiInstance createCreditNoteHistoryWith:xeroTenantId
- creditNoteID:creditNoteID
- historyRecords:historyRecords
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const creditNoteID = '00000000-0000-0000-0000-000000000000';
-
-const historyRecord: HistoryRecord = {
- details: "Hello World" };
-
-const historyRecords: HistoryRecords = {
- historyRecords: [historyRecord] };
-
-try {
- const response = await xero.accountingApi.createCreditNoteHistory(xeroTenantId, creditNoteID, historyRecords);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateCreditNoteHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var creditNoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var historyRecord = new HistoryRecord();
- historyRecord.Details = "Hello World";
-
- var historyRecords = new HistoryRecords();
- var historyRecordsList = new List<HistoryRecord>();
- historyRecordsList.Add(historyRecord);
- historyRecords._HistoryRecords = historyRecordsList;
-
- try {
- var result = await apiInstance.CreateCreditNoteHistoryAsync(accessToken, xeroTenantId, creditNoteID, historyRecords);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateCreditNoteHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$creditNoteID = "00000000-0000-0000-0000-000000000000";
-
-$historyRecord = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecord;
-$historyRecord->setDetails('Hello World');
-
-$historyRecords = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecords;
-$arr_history_records = [];
-array_push($arr_history_records, $historyRecord);
-$historyRecords->setHistoryRecords($arr_history_records);
-
-try {
- $result = $apiInstance->createCreditNoteHistory($xeroTenantId, $creditNoteID, $historyRecords);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createCreditNoteHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $creditNoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Credit Note
-my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords |
-
-eval {
- my $result = $api_instance->createCreditNoteHistory(xeroTenantId => $xeroTenantId, creditNoteID => $creditNoteID, historyRecords => $historyRecords);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createCreditNoteHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ createCreditNoteHistory
+ Retrieves history records of a specific credit note
+
+
+
+
+
+
+
+ /CreditNotes/{CreditNoteID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -17548,51 +9692,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createCreditNoteHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-credit_note_id = '00000000-0000-0000-0000-000000000000'
-
-history_record = {
- details: "Hello World"
-}
-
-historyRecords = {
- history_records: [history_record]
-}
-
-begin
- response = xero_client.accounting_api.create_credit_note_history(xero_tenant_id, credit_note_id, historyRecords)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_credit_note_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- CreditNoteID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ CreditNoteID*
@@ -17618,15 +9736,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -17649,34 +9766,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- historyRecords *
-
-
-
-
- HistoryRecords
-
-
-
-HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ historyRecords *
+
+
+
+
+ HistoryRecords
+
+
+ HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createCreditNotes
- Creates a new credit note
-
-
-
-
-
-
-
- /CreditNotes
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/CreditNotes?summarizeErrors=true&unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
- Integer unitdp = 4;
- LocalDate currDate = LocalDate.now();
-
- Contact contact = new Contact();
- contact.setContactID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- LineItem lineItem = new LineItem();
- lineItem.setDescription("Foobar");
- lineItem.setQuantity(1.0);
- lineItem.setUnitAmount(20.0);
- lineItem.setAccountCode("000");
-
- List<LineItem> lineItems = new ArrayList<LineItem>();
- lineItems.add(lineItem);
-
- CreditNote creditNote = new CreditNote();
- creditNote.setType(com.xero.models.accounting.CreditNote.TypeEnum.ACCPAYCREDIT);
- creditNote.setContact(contact);
- creditNote.setDate(currDate);
- creditNote.setLineItems(lineItems);
-
- CreditNotes creditNotes = new CreditNotes();
- creditNotes.addCreditNotesItem(creditNote);
-
- try {
- CreditNotes result = apiInstance.createCreditNotes(accessToken, xeroTenantId, creditNotes, summarizeErrors, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createCreditNotes");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- CreditNotes creditNotes = { "CreditNotes":[ { "Type":"ACCPAYCREDIT", "Contact":{ "ContactID":"430fa14a-f945-44d3-9f97-5df5e28441b8" }, "Date":"2019-01-05", "LineItems":[ { "Description":"Foobar", "Quantity":2.0, "UnitAmount":20.0, "AccountCode":"400" } ] } ] }; // CreditNotes |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- CreditNotes result = apiInstance.createCreditNotes(xeroTenantId, creditNotes, summarizeErrors, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createCreditNotes");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-CreditNotes *creditNotes = { "CreditNotes":[ { "Type":"ACCPAYCREDIT", "Contact":{ "ContactID":"430fa14a-f945-44d3-9f97-5df5e28441b8" }, "Date":"2019-01-05", "LineItems":[ { "Description":"Foobar", "Quantity":2.0, "UnitAmount":20.0, "AccountCode":"400" } ] } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a new credit note
-[apiInstance createCreditNotesWith:xeroTenantId
- creditNotes:creditNotes
- summarizeErrors:summarizeErrors
- unitdp:unitdp
- completionHandler: ^(CreditNotes output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-const unitdp = 4;
-const currDate = '2020-12-10'
-
-const contact: Contact = {
- contactID: "00000000-0000-0000-0000-000000000000" };
-
-const lineItem: LineItem = {
- description: "Foobar",
- quantity: 1.0,
- unitAmount: 20.0,
- accountCode: "000" };
-const lineItems = [];
-lineItems.push(lineItem)
-
-const creditNote: CreditNote = {
- type: CreditNote.TypeEnum.ACCPAYCREDIT,
- contact: contact,
- date: currDate,
- lineItems: lineItems };
-
-const creditNotes: CreditNotes = {
- creditNotes: [creditNote] };
-
-try {
- const response = await xero.accountingApi.createCreditNotes(xeroTenantId, creditNotes, summarizeErrors, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateCreditNotesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
- var unitdp = 4;
- var currDate = DateTime.Now;
-
- var contact = new Contact();
- contact.ContactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var lineItem = new LineItem();
- lineItem.Description = "Foobar";
- lineItem.Quantity = new decimal(1.0);
- lineItem.UnitAmount = new decimal(20.0);
- lineItem.AccountCode = "000";
- var lineItems = new List<LineItem>();
- lineItems.Add(lineItem);
-
- var creditNote = new CreditNote();
- creditNote.Type = CreditNote.TypeEnum.ACCPAYCREDIT;
- creditNote.Contact = contact;
- creditNote.Date = currDate;
- creditNote.LineItems = lineItems;
-
- var creditNotes = new CreditNotes();
- var creditNotesList = new List<CreditNote>();
- creditNotesList.Add(creditNote);
- creditNotes._CreditNotes = creditNotesList;
-
- try {
- var result = await apiInstance.CreateCreditNotesAsync(accessToken, xeroTenantId, creditNotes, summarizeErrors, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateCreditNotes: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-$unitdp = 4;
-$currDate = new DateTime('2020-12-10');
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setContactID('00000000-0000-0000-0000-000000000000');
-
-$lineItem = new XeroAPI\XeroPHP\Models\Accounting\LineItem;
-$lineItem->setDescription('Foobar');
-$lineItem->setQuantity(1.0);
-$lineItem->setUnitAmount(20.0);
-$lineItem->setAccountCode('000');
-$lineItems = [];
-array_push($lineItems, $lineItem);
-
-$creditNote = new XeroAPI\XeroPHP\Models\Accounting\CreditNote;
-$creditNote->setType(XeroAPI\XeroPHP\Models\Accounting\CreditNote::TYPE_ACCPAYCREDIT);
-$creditNote->setContact($contact);
-$creditNote->setDate($currDate);
-$creditNote->setLineItems($lineItems);
-
-$creditNotes = new XeroAPI\XeroPHP\Models\Accounting\CreditNotes;
-$arr_credit_notes = [];
-array_push($arr_credit_notes, $creditNote);
-$creditNotes->setCreditNotes($arr_credit_notes);
-
-try {
- $result = $apiInstance->createCreditNotes($xeroTenantId, $creditNotes, $summarizeErrors, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createCreditNotes: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $creditNotes = ::Object::CreditNotes->new(); # CreditNotes |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->createCreditNotes(xeroTenantId => $xeroTenantId, creditNotes => $creditNotes, summarizeErrors => $summarizeErrors, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createCreditNotes: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createCreditNotes
+ Creates a new credit note
+
+
+
+
+
+
+
+ /CreditNotes
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -18210,70 +9875,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createCreditNotes: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-unitdp = 4
-curr_date = 'YYYY-MM-DD'
-
-contact = {
- contact_id: "00000000-0000-0000-0000-000000000000"
-}
-
-line_item = {
- description: "Foobar",
- quantity: 1.0,
- unit_amount: 20.0,
- account_code: "000"
-}
-line_items = []
-line_items << line_item
-
-credit_note = {
- type: XeroRuby::Accounting::CreditNote::ACCPAYCREDIT,
- contact: contact,
- date: curr_date,
- line_items: line_items
-}
-
-creditNotes = {
- credit_notes: [credit_note]
-}
-
-begin
- response = xero_client.accounting_api.create_credit_notes(xero_tenant_id, creditNotes, summarize_errors, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_credit_notes: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -18296,34 +9916,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- creditNotes *
-
-
-
-
- CreditNotes
-
-
-
-Credit Notes with array of CreditNote object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ creditNotes *
+
+
+
+
+ CreditNotes
+
+
+ Credit Notes with array of CreditNote object in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
-
-
-
- Boolean
-
-
-
-If false return 200 OK and mix of successfully created objects and any with validation errors
-
-
-
-
-
-
-
- unitdp
-
-
-
-
-
-
-
- Integer
-
-
-
-e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createCurrency
- Create a new currency for a Xero organisation
-
-
-
-
-
-
-
- /Currencies
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Currencies"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- Currency currency = new Currency();
- currency.setCode(com.xero.models.accounting.CurrencyCode.USD);
- currency.setDescription("United States Dollar");
-
- try {
- Currencies result = apiInstance.createCurrency(accessToken, xeroTenantId, currency);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createCurrency");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Currency currency = { "Code": "USD", "Description": "United States Dollar" }; // Currency |
- try {
- Currencies result = apiInstance.createCurrency(xeroTenantId, currency);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createCurrency");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Currency *currency = { "Code": "USD", "Description": "United States Dollar" }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Create a new currency for a Xero organisation
-[apiInstance createCurrencyWith:xeroTenantId
- currency:currency
- completionHandler: ^(Currencies output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
-const currency: Currency = {
- code: CurrencyCode.USD,
- description: "United States Dollar" };
-
-try {
- const response = await xero.accountingApi.createCurrency(xeroTenantId, currency);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateCurrencyExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
-
- var currency = new Currency();
- currency.Code = CurrencyCode.USD;
- currency.Description = "United States Dollar";
-
- try {
- var result = await apiInstance.CreateCurrencyAsync(accessToken, xeroTenantId, currency);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateCurrency: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-
-$currency = new XeroAPI\XeroPHP\Models\Accounting\Currency;
-$currency->setCode(XeroAPI\XeroPHP\Models\Accounting\CurrencyCode::USD);
-$currency->setDescription('United States Dollar');
-
-try {
- $result = $apiInstance->createCurrency($xeroTenantId, $currency);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createCurrency: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
+
+
+
+ Boolean
+
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
+
+If false return 200 OK and mix of successfully created objects and any with validation errors
+
+
+
+
+
+
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
+ unitdp
+
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $currency = ::Object::Currency->new(); # Currency |
-eval {
- my $result = $api_instance->createCurrency(xeroTenantId => $xeroTenantId, currency => $currency);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createCurrency: $@\n";
-}
-
+
+
+
+
+ Integer
+
+
+
+e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
+
+
+
+
+
+
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ createCurrency
+ Create a new currency for a Xero organisation
+
+
+
+
+
+
+
+ /Currencies
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -18796,48 +10053,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createCurrency: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-
-currency = {
- code: XeroRuby::Accounting::CurrencyCode::USD,
- description: "United States Dollar"
-}
-
-begin
- response = xero_client.accounting_api.create_currency(xero_tenant_id, currency)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_currency: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -18860,34 +10094,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- currency *
-
-
-
-
- Currency
-
-
-
-Currency object in the body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ currency *
+
+
+
+
+ Currency
+
+
+ Currency object in the body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createEmployees
- Creates new employees used in Xero payrun
-
-
-
-
-
-
-
- /Employees
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Employees?summarizeErrors=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
-
- Employee employee = new Employee();
- employee.setFirstName("Nick");
- employee.setLastName("Fury");
-
- Employees employees = new Employees();
- employees.addEmployeesItem(employee);
-
- try {
- Employees result = apiInstance.createEmployees(accessToken, xeroTenantId, employees, summarizeErrors);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createEmployees");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Employees employees = { "Employees": [ { "FirstName": "Nick", "LastName": "Fury", "ExternalLink": { "Url": "http://twitter.com/#!/search/Nick+Fury" } } ] }; // Employees |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- try {
- Employees result = apiInstance.createEmployees(xeroTenantId, employees, summarizeErrors);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createEmployees");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Employees *employees = { "Employees": [ { "FirstName": "Nick", "LastName": "Fury", "ExternalLink": { "Url": "http://twitter.com/#!/search/Nick+Fury" } } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates new employees used in Xero payrun
-[apiInstance createEmployeesWith:xeroTenantId
- employees:employees
- summarizeErrors:summarizeErrors
- completionHandler: ^(Employees output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-
-const employee: Employee = {
- firstName: "Nick",
- lastName: "Fury" };
-
-const employees: Employees = {
- employees: [employee] };
-
-try {
- const response = await xero.accountingApi.createEmployees(xeroTenantId, employees, summarizeErrors);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateEmployeesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
-
- var employee = new Employee();
- employee.FirstName = "Nick";
- employee.LastName = "Fury";
-
- var employees = new Employees();
- var employeesList = new List<Employee>();
- employeesList.Add(employee);
- employees._Employees = employeesList;
-
- try {
- var result = await apiInstance.CreateEmployeesAsync(accessToken, xeroTenantId, employees, summarizeErrors);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateEmployees: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-
-$employee = new XeroAPI\XeroPHP\Models\Accounting\Employee;
-$employee->setFirstName('Nick');
-$employee->setLastName('Fury');
-
-$employees = new XeroAPI\XeroPHP\Models\Accounting\Employees;
-$arr_employees = [];
-array_push($arr_employees, $employee);
-$employees->setEmployees($arr_employees);
-
-try {
- $result = $apiInstance->createEmployees($xeroTenantId, $employees, $summarizeErrors);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createEmployees: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $employees = ::Object::Employees->new(); # Employees |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-
-eval {
- my $result = $api_instance->createEmployees(xeroTenantId => $xeroTenantId, employees => $employees, summarizeErrors => $summarizeErrors);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createEmployees: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createEmployees
+ Creates new employees used in Xero payrun
+
+
+
+
+
+
+
+ /Employees
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -19271,53 +10188,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createEmployees: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-
-employee = {
- first_name: "Nick",
- last_name: "Fury"
-}
-
-employees = {
- employees: [employee]
-}
-
-begin
- response = xero_client.accounting_api.create_employees(xero_tenant_id, employees, summarize_errors)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_employees: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -19340,34 +10229,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- employees *
-
-
-
-
- Employees
-
-
-
-Employees with array of Employee object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ employees *
+
+
+
+
+ Employees
+
+
+ Employees with array of Employee object in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -19428,393 +10293,34 @@ Parameters
-
-
-
-
-
-
-
-
- createExpenseClaimHistory
- Creates a history record for a specific expense claim
-
-
-
-
-
-
-
- /ExpenseClaims/{ExpenseClaimID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ExpenseClaims/{ExpenseClaimID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID expenseClaimID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- HistoryRecord historyRecord = new HistoryRecord();
- historyRecord.setDetails("Hello World");
-
- HistoryRecords historyRecords = new HistoryRecords();
- historyRecords.addHistoryRecordsItem(historyRecord);
-
- try {
- HistoryRecords result = apiInstance.createExpenseClaimHistory(accessToken, xeroTenantId, expenseClaimID, historyRecords);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createExpenseClaimHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID expenseClaimID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a ExpenseClaim
- HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords |
- try {
- HistoryRecords result = apiInstance.createExpenseClaimHistory(xeroTenantId, expenseClaimID, historyRecords);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createExpenseClaimHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *expenseClaimID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a ExpenseClaim (default to null)
-HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a history record for a specific expense claim
-[apiInstance createExpenseClaimHistoryWith:xeroTenantId
- expenseClaimID:expenseClaimID
- historyRecords:historyRecords
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const expenseClaimID = '00000000-0000-0000-0000-000000000000';
-
-const historyRecord: HistoryRecord = {
- details: "Hello World" };
-
-const historyRecords: HistoryRecords = {
- historyRecords: [historyRecord] };
-
-try {
- const response = await xero.accountingApi.createExpenseClaimHistory(xeroTenantId, expenseClaimID, historyRecords);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateExpenseClaimHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var expenseClaimID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var historyRecord = new HistoryRecord();
- historyRecord.Details = "Hello World";
-
- var historyRecords = new HistoryRecords();
- var historyRecordsList = new List<HistoryRecord>();
- historyRecordsList.Add(historyRecord);
- historyRecords._HistoryRecords = historyRecordsList;
-
- try {
- var result = await apiInstance.CreateExpenseClaimHistoryAsync(accessToken, xeroTenantId, expenseClaimID, historyRecords);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateExpenseClaimHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$expenseClaimID = "00000000-0000-0000-0000-000000000000";
-
-$historyRecord = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecord;
-$historyRecord->setDetails('Hello World');
-
-$historyRecords = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecords;
-$arr_history_records = [];
-array_push($arr_history_records, $historyRecord);
-$historyRecords->setHistoryRecords($arr_history_records);
-
-try {
- $result = $apiInstance->createExpenseClaimHistory($xeroTenantId, $expenseClaimID, $historyRecords);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createExpenseClaimHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $expenseClaimID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a ExpenseClaim
-my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords |
-
-eval {
- my $result = $api_instance->createExpenseClaimHistory(xeroTenantId => $xeroTenantId, expenseClaimID => $expenseClaimID, historyRecords => $historyRecords);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createExpenseClaimHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ createExpenseClaimHistory
+ Creates a history record for a specific expense claim
+
+
+
+
+
+
+
+ /ExpenseClaims/{ExpenseClaimID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -19843,51 +10349,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createExpenseClaimHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-expense_claim_id = '00000000-0000-0000-0000-000000000000'
-
-history_record = {
- details: "Hello World"
-}
-
-historyRecords = {
- history_records: [history_record]
-}
-
-begin
- response = xero_client.accounting_api.create_expense_claim_history(xero_tenant_id, expense_claim_id, historyRecords)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_expense_claim_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ExpenseClaimID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ExpenseClaimID*
@@ -19913,15 +10393,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -19944,34 +10423,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- historyRecords *
-
-
-
-
- HistoryRecords
-
-
-
-HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ historyRecords *
+
+
+
+
+ HistoryRecords
+
+
+ HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createExpenseClaims
- Creates expense claims
-
-
-
-
-
-
-
- /ExpenseClaims
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ExpenseClaims"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- LocalDate currDate = LocalDate.now();
-
- User user = new User();
- user.setUserID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- Receipt receipt = new Receipt();
- receipt.setReceiptID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
- receipt.setDate(currDate);
-
- List<Receipt> receipts = new ArrayList<Receipt>();
- receipts.add(receipt);
-
- ExpenseClaim expenseClaim = new ExpenseClaim();
- expenseClaim.setStatus(com.xero.models.accounting.ExpenseClaim.StatusEnum.SUBMITTED);
- expenseClaim.setUser(user);
- expenseClaim.setReceipts(receipts);
-
- ExpenseClaims expenseClaims = new ExpenseClaims();
- expenseClaims.addExpenseClaimsItem(expenseClaim);
-
- try {
- ExpenseClaims result = apiInstance.createExpenseClaims(accessToken, xeroTenantId, expenseClaims);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createExpenseClaims");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- ExpenseClaims expenseClaims = { "ExpenseClaims": [ { "Status": "SUBMITTED", "User": { "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273" }, "Receipts": [ { "Lineitems": [], "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816" } ] } ] }; // ExpenseClaims |
- try {
- ExpenseClaims result = apiInstance.createExpenseClaims(xeroTenantId, expenseClaims);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createExpenseClaims");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-ExpenseClaims *expenseClaims = { "ExpenseClaims": [ { "Status": "SUBMITTED", "User": { "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273" }, "Receipts": [ { "Lineitems": [], "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816" } ] } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates expense claims
-[apiInstance createExpenseClaimsWith:xeroTenantId
- expenseClaims:expenseClaims
- completionHandler: ^(ExpenseClaims output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const currDate = '2020-12-10'
-
-const user: User = {
- userID: "00000000-0000-0000-0000-000000000000" };
-
-const receipt: Receipt = {
- receiptID: "00000000-0000-0000-0000-000000000000",
- date: currDate };
-const receipts = [];
-receipts.push(receipt)
-
-const expenseClaim: ExpenseClaim = {
- status: ExpenseClaim.StatusEnum.SUBMITTED,
- user: user,
- receipts: receipts };
-
-const expenseClaims: ExpenseClaims = {
- expenseClaims: [expenseClaim] };
-
-try {
- const response = await xero.accountingApi.createExpenseClaims(xeroTenantId, expenseClaims);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateExpenseClaimsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var currDate = DateTime.Now;
-
- var user = new User();
- user.UserID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var receipt = new Receipt();
- receipt.ReceiptID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- receipt.Date = currDate;
- var receipts = new List<Receipt>();
- receipts.Add(receipt);
-
- var expenseClaim = new ExpenseClaim();
- expenseClaim.Status = ExpenseClaim.StatusEnum.SUBMITTED;
- expenseClaim.User = user;
- expenseClaim.Receipts = receipts;
-
- var expenseClaims = new ExpenseClaims();
- var expenseClaimsList = new List<ExpenseClaim>();
- expenseClaimsList.Add(expenseClaim);
- expenseClaims._ExpenseClaims = expenseClaimsList;
-
- try {
- var result = await apiInstance.CreateExpenseClaimsAsync(accessToken, xeroTenantId, expenseClaims);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateExpenseClaims: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$currDate = new DateTime('2020-12-10');
-
-$user = new XeroAPI\XeroPHP\Models\Accounting\User;
-$user->setUserID('00000000-0000-0000-0000-000000000000');
-
-$receipt = new XeroAPI\XeroPHP\Models\Accounting\Receipt;
-$receipt->setReceiptID('00000000-0000-0000-0000-000000000000');
-$receipt->setDate($currDate);
-$receipts = [];
-array_push($receipts, $receipt);
-
-$expenseClaim = new XeroAPI\XeroPHP\Models\Accounting\ExpenseClaim;
-$expenseClaim->setStatus(XeroAPI\XeroPHP\Models\Accounting\ExpenseClaim::STATUS_SUBMITTED);
-$expenseClaim->setUser($user);
-$expenseClaim->setReceipts($receipts);
-
-$expenseClaims = new XeroAPI\XeroPHP\Models\Accounting\ExpenseClaims;
-$arr_expense_claims = [];
-array_push($arr_expense_claims, $expenseClaim);
-$expenseClaims->setExpenseClaims($arr_expense_claims);
-
-try {
- $result = $apiInstance->createExpenseClaims($xeroTenantId, $expenseClaims);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createExpenseClaims: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $expenseClaims = ::Object::ExpenseClaims->new(); # ExpenseClaims |
-
-eval {
- my $result = $api_instance->createExpenseClaims(xeroTenantId => $xeroTenantId, expenseClaims => $expenseClaims);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createExpenseClaims: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createExpenseClaims
+ Creates expense claims
+
+
+
+
+
+
+
+ /ExpenseClaims
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -20404,65 +10528,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createExpenseClaims: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-curr_date = 'YYYY-MM-DD'
-
-user = {
- user_id: "00000000-0000-0000-0000-000000000000"
-}
-
-receipt = {
- receipt_id: "00000000-0000-0000-0000-000000000000",
- date: curr_date
-}
-receipts = []
-receipts << receipt
-
-expense_claim = {
- status: XeroRuby::Accounting::ExpenseClaim::SUBMITTED,
- user: user,
- receipts: receipts
-}
-
-expenseClaims = {
- expense_claims: [expense_claim]
-}
-
-begin
- response = xero_client.accounting_api.create_expense_claims(xero_tenant_id, expenseClaims)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_expense_claims: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -20485,34 +10569,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- expenseClaims *
-
-
-
-
- ExpenseClaims
-
-
-
-ExpenseClaims with array of ExpenseClaim object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ expenseClaims *
+
+
+
+
+ ExpenseClaims
+
+
+ ExpenseClaims with array of ExpenseClaim object in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createInvoiceAttachmentByFileName
- Creates an attachment for a specific invoice or purchase bill by filename
-
-
-
-
-
-
-
- /Invoices/{InvoiceID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Invoices/{InvoiceID}/Attachments/{FileName}?IncludeOnline=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID invoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
- Boolean includeOnline = true;
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.createInvoiceAttachmentByFileName(accessToken, xeroTenantId, invoiceID, fileName, body, includeOnline, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createInvoiceAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID invoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Invoice
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- Boolean includeOnline = true; // Boolean | Allows an attachment to be seen by the end customer within their online invoice
- try {
- Attachments result = apiInstance.createInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body, includeOnline);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createInvoiceAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *invoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Invoice (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-Boolean *includeOnline = true; // Allows an attachment to be seen by the end customer within their online invoice (optional) (default to false)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates an attachment for a specific invoice or purchase bill by filename
-[apiInstance createInvoiceAttachmentByFileNameWith:xeroTenantId
- invoiceID:invoiceID
- fileName:fileName
- body:body
- includeOnline:includeOnline
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const invoiceID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const includeOnline = true;
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.createInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body, includeOnline, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateInvoiceAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var invoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- var includeOnline = true;
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.CreateInvoiceAttachmentByFileNameAsync(accessToken, xeroTenantId, invoiceID, fileName, body, includeOnline);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateInvoiceAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$invoiceID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-$includeOnline = true;
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->createInvoiceAttachmentByFileName($xeroTenantId, $invoiceID, $fileName, $body, $includeOnline);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createInvoiceAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $invoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Invoice
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-my $includeOnline = true; # Boolean | Allows an attachment to be seen by the end customer within their online invoice
-
-eval {
- my $result = $api_instance->createInvoiceAttachmentByFileName(xeroTenantId => $xeroTenantId, invoiceID => $invoiceID, fileName => $fileName, body => $body, includeOnline => $includeOnline);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createInvoiceAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createInvoiceAttachmentByFileName
+ Creates an attachment for a specific invoice or purchase bill by filename
+
+
+
+
+
+
+
+ /Invoices/{InvoiceID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -20968,45 +10662,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createInvoiceAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-invoice_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-include_online = true
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.create_invoice_attachment_by_file_name(xero_tenant_id, invoice_id, file_name, body, include_online)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_invoice_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- InvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ InvoiceID*
@@ -21032,7 +10706,7 @@ Parameters
- FileName*
+ FileName*
@@ -21055,15 +10729,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -21086,34 +10759,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- IncludeOnline
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ IncludeOnline
@@ -21174,394 +10823,34 @@ Parameters
-
-
-
-
-
-
-
-
- createInvoiceHistory
- Creates a history record for a specific invoice
-
-
-
-
-
-
-
- /Invoices/{InvoiceID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Invoices/{InvoiceID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID invoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- HistoryRecord historyRecord = new HistoryRecord();
- historyRecord.setDetails("Hello World");
-
- HistoryRecords historyRecords = new HistoryRecords();
- historyRecords.addHistoryRecordsItem(historyRecord);
-
- try {
- HistoryRecords result = apiInstance.createInvoiceHistory(accessToken, xeroTenantId, invoiceID, historyRecords);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createInvoiceHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID invoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Invoice
- HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords |
- try {
- HistoryRecords result = apiInstance.createInvoiceHistory(xeroTenantId, invoiceID, historyRecords);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createInvoiceHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *invoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Invoice (default to null)
-HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a history record for a specific invoice
-[apiInstance createInvoiceHistoryWith:xeroTenantId
- invoiceID:invoiceID
- historyRecords:historyRecords
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const invoiceID = '00000000-0000-0000-0000-000000000000';
-
-const historyRecord: HistoryRecord = {
- details: "Hello World" };
-
-const historyRecords: HistoryRecords = {
- historyRecords: [historyRecord] };
-
-try {
- const response = await xero.accountingApi.createInvoiceHistory(xeroTenantId, invoiceID, historyRecords);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateInvoiceHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var invoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var historyRecord = new HistoryRecord();
- historyRecord.Details = "Hello World";
-
- var historyRecords = new HistoryRecords();
- var historyRecordsList = new List<HistoryRecord>();
- historyRecordsList.Add(historyRecord);
- historyRecords._HistoryRecords = historyRecordsList;
-
- try {
- var result = await apiInstance.CreateInvoiceHistoryAsync(accessToken, xeroTenantId, invoiceID, historyRecords);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateInvoiceHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$invoiceID = "00000000-0000-0000-0000-000000000000";
-
-$historyRecord = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecord;
-$historyRecord->setDetails('Hello World');
-
-$historyRecords = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecords;
-$arr_history_records = [];
-array_push($arr_history_records, $historyRecord);
-$historyRecords->setHistoryRecords($arr_history_records);
-
-try {
- $result = $apiInstance->createInvoiceHistory($xeroTenantId, $invoiceID, $historyRecords);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createInvoiceHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $invoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Invoice
-my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords |
-
-eval {
- my $result = $api_instance->createInvoiceHistory(xeroTenantId => $xeroTenantId, invoiceID => $invoiceID, historyRecords => $historyRecords);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createInvoiceHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ createInvoiceHistory
+ Creates a history record for a specific invoice
+
+
+
+
+
+
+
+ /Invoices/{InvoiceID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -21590,51 +10879,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createInvoiceHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-invoice_id = '00000000-0000-0000-0000-000000000000'
-
-history_record = {
- details: "Hello World"
-}
-
-historyRecords = {
- history_records: [history_record]
-}
-
-begin
- response = xero_client.accounting_api.create_invoice_history(xero_tenant_id, invoice_id, historyRecords)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_invoice_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- InvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ InvoiceID*
@@ -21660,15 +10923,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -21691,34 +10953,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- historyRecords *
-
-
-
-
- HistoryRecords
-
-
-
-HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ historyRecords *
+
+
+
+
+ HistoryRecords
+
+
+ HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createInvoices
- Creates one or more sales invoices or purchase bills
-
-
-
-
-
-
-
- /Invoices
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Invoices?summarizeErrors=true&unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
- Integer unitdp = 4;
- LocalDate dateValue = LocalDate.of(2020, Month.OCTOBER, 10);
- LocalDate dueDateValue = LocalDate.of(2020, Month.OCTOBER, 28);
-
- Contact contact = new Contact();
- contact.setContactID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- LineItemTracking lineItemTracking = new LineItemTracking();
- lineItemTracking.setTrackingCategoryID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
- lineItemTracking.setTrackingOptionID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- List<LineItemTracking> lineItemTrackings = new ArrayList<LineItemTracking>();
- lineItemTrackings.add(lineItemTracking);
-
- LineItem lineItem = new LineItem();
- lineItem.setDescription("Foobar");
- lineItem.setQuantity(1.0);
- lineItem.setUnitAmount(20.0);
- lineItem.setAccountCode("000");
- lineItem.setTracking(lineItemTrackings);
-
- List<LineItem> lineItems = new ArrayList<LineItem>();
- lineItems.add(lineItem);
-
- Invoice invoice = new Invoice();
- invoice.setType(com.xero.models.accounting.Invoice.TypeEnum.ACCREC);
- invoice.setContact(contact);
- invoice.setDate(dateValue);
- invoice.setDueDate(dueDateValue);
- invoice.setLineItems(lineItems);
- invoice.setReference("Website Design");
- invoice.setStatus(com.xero.models.accounting.Invoice.StatusEnum.DRAFT);
-
- Invoices invoices = new Invoices();
- invoices.addInvoicesItem(invoice);
-
- try {
- Invoices result = apiInstance.createInvoices(accessToken, xeroTenantId, invoices, summarizeErrors, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createInvoices");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Invoices invoices = { "Invoices": [ { "Type": "ACCREC", "Contact": { "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8" }, "LineItems": [ { "Description": "Acme Tires", "Quantity": 2, "UnitAmount": 20, "AccountCode": "200", "TaxType": "NONE", "LineAmount": 40 } ], "Date": "2019-03-11", "DueDate": "2018-12-10", "Reference": "Website Design", "Status": "AUTHORISED" } ] }; // Invoices |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- Invoices result = apiInstance.createInvoices(xeroTenantId, invoices, summarizeErrors, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createInvoices");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Invoices *invoices = { "Invoices": [ { "Type": "ACCREC", "Contact": { "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8" }, "LineItems": [ { "Description": "Acme Tires", "Quantity": 2, "UnitAmount": 20, "AccountCode": "200", "TaxType": "NONE", "LineAmount": 40 } ], "Date": "2019-03-11", "DueDate": "2018-12-10", "Reference": "Website Design", "Status": "AUTHORISED" } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates one or more sales invoices or purchase bills
-[apiInstance createInvoicesWith:xeroTenantId
- invoices:invoices
- summarizeErrors:summarizeErrors
- unitdp:unitdp
- completionHandler: ^(Invoices output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-const unitdp = 4;
-const dateValue = '2020-10-10'
-const dueDateValue = '2020-10-28'
-
-const contact: Contact = {
- contactID: "00000000-0000-0000-0000-000000000000" };
-
-const lineItemTracking: LineItemTracking = {
- trackingCategoryID: "00000000-0000-0000-0000-000000000000",
- trackingOptionID: "00000000-0000-0000-0000-000000000000" };
-const lineItemTrackings = [];
-lineItemTrackings.push(lineItemTracking)
-
-const lineItem: LineItem = {
- description: "Foobar",
- quantity: 1.0,
- unitAmount: 20.0,
- accountCode: "000",
- tracking: lineItemTrackings };
-const lineItems = [];
-lineItems.push(lineItem)
-
-const invoice: Invoice = {
- type: Invoice.TypeEnum.ACCREC,
- contact: contact,
- date: dateValue,
- dueDate: dueDateValue,
- lineItems: lineItems,
- reference: "Website Design",
- status: Invoice.StatusEnum.DRAFT };
-
-const invoices: Invoices = {
- invoices: [invoice] };
-
-try {
- const response = await xero.accountingApi.createInvoices(xeroTenantId, invoices, summarizeErrors, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateInvoicesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
- var unitdp = 4;
- var dateValue = new DateTime(2020, 10, 10);
- var dueDateValue = new DateTime(2020, 10, 10);
-
- var contact = new Contact();
- contact.ContactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var lineItemTracking = new LineItemTracking();
- lineItemTracking.TrackingCategoryID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- lineItemTracking.TrackingOptionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var lineItemTrackings = new List<LineItemTracking>();
- lineItemTrackings.Add(lineItemTracking);
-
- var lineItem = new LineItem();
- lineItem.Description = "Foobar";
- lineItem.Quantity = new decimal(1.0);
- lineItem.UnitAmount = new decimal(20.0);
- lineItem.AccountCode = "000";
- lineItem.Tracking = lineItemTrackings;
- var lineItems = new List<LineItem>();
- lineItems.Add(lineItem);
-
- var invoice = new Invoice();
- invoice.Type = Invoice.TypeEnum.ACCREC;
- invoice.Contact = contact;
- invoice.Date = dateValue;
- invoice.DueDate = dueDateValue;
- invoice.LineItems = lineItems;
- invoice.Reference = "Website Design";
- invoice.Status = Invoice.StatusEnum.DRAFT;
-
- var invoices = new Invoices();
- var invoicesList = new List<Invoice>();
- invoicesList.Add(invoice);
- invoices._Invoices = invoicesList;
-
- try {
- var result = await apiInstance.CreateInvoicesAsync(accessToken, xeroTenantId, invoices, summarizeErrors, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateInvoices: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-$unitdp = 4;
-$dateValue = new DateTime('2020-10-10');
-$dueDateValue = new DateTime('2020-10-28');
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setContactID('00000000-0000-0000-0000-000000000000');
-
-$lineItemTracking = new XeroAPI\XeroPHP\Models\Accounting\LineItemTracking;
-$lineItemTracking->setTrackingCategoryID('00000000-0000-0000-0000-000000000000');
-$lineItemTracking->setTrackingOptionID('00000000-0000-0000-0000-000000000000');
-$lineItemTrackings = [];
-array_push($lineItemTrackings, $lineItemTracking);
-
-$lineItem = new XeroAPI\XeroPHP\Models\Accounting\LineItem;
-$lineItem->setDescription('Foobar');
-$lineItem->setQuantity(1.0);
-$lineItem->setUnitAmount(20.0);
-$lineItem->setAccountCode('000');
-$lineItem->setTracking(lineItemTrackings);
-$lineItems = [];
-array_push($lineItems, $lineItem);
-
-$invoice = new XeroAPI\XeroPHP\Models\Accounting\Invoice;
-$invoice->setType(XeroAPI\XeroPHP\Models\Accounting\Invoice::TYPE_ACCREC);
-$invoice->setContact($contact);
-$invoice->setDate($dateValue);
-$invoice->setDueDate($dueDateValue);
-$invoice->setLineItems($lineItems);
-$invoice->setReference('Website Design');
-$invoice->setStatus(XeroAPI\XeroPHP\Models\Accounting\Invoice::STATUS_DRAFT);
-
-$invoices = new XeroAPI\XeroPHP\Models\Accounting\Invoices;
-$arr_invoices = [];
-array_push($arr_invoices, $invoice);
-$invoices->setInvoices($arr_invoices);
-
-try {
- $result = $apiInstance->createInvoices($xeroTenantId, $invoices, $summarizeErrors, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createInvoices: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $invoices = ::Object::Invoices->new(); # Invoices |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->createInvoices(xeroTenantId => $xeroTenantId, invoices => $invoices, summarizeErrors => $summarizeErrors, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createInvoices: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createInvoices
+ Creates one or more sales invoices or purchase bills
+
+
+
+
+
+
+
+ /Invoices
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -22309,82 +11074,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createInvoices: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-unitdp = 4
-date_value = 'YYYY-MM-DD'
-due_date_value = 'YYYY-MM-DD'
-
-contact = {
- contact_id: "00000000-0000-0000-0000-000000000000"
-}
-
-line_item_tracking = {
- tracking_category_id: "00000000-0000-0000-0000-000000000000",
- tracking_option_id: "00000000-0000-0000-0000-000000000000"
-}
-line_item_trackings = []
-line_item_trackings << line_item_tracking
-
-line_item = {
- description: "Foobar",
- quantity: 1.0,
- unit_amount: 20.0,
- account_code: "000",
- tracking: lineItemTrackings
-}
-line_items = []
-line_items << line_item
-
-invoice = {
- type: XeroRuby::Accounting::Invoice::ACCREC,
- contact: contact,
- date: date_value,
- due_date: due_date_value,
- line_items: line_items,
- reference: "Website Design",
- status: XeroRuby::Accounting::Invoice::DRAFT
-}
-
-invoices = {
- invoices: [invoice]
-}
-
-begin
- response = xero_client.accounting_api.create_invoices(xero_tenant_id, invoices, summarize_errors, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_invoices: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -22407,34 +11115,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- invoices *
-
-
-
-
- Invoices
-
-
-
-Invoices with an array of invoice objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ invoices *
+
+
+
+
+ Invoices
+
+
+ Invoices with an array of invoice objects in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -22495,7 +11179,7 @@ Parameters
- unitdp
+ unitdp
@@ -22515,393 +11199,34 @@ Parameters
-
-
-
-
-
-
-
-
- createItemHistory
- Creates a history record for a specific item
-
-
-
-
-
-
-
- /Items/{ItemID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Items/{ItemID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID itemID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- HistoryRecord historyRecord = new HistoryRecord();
- historyRecord.setDetails("Hello World");
-
- HistoryRecords historyRecords = new HistoryRecords();
- historyRecords.addHistoryRecordsItem(historyRecord);
-
- try {
- HistoryRecords result = apiInstance.createItemHistory(accessToken, xeroTenantId, itemID, historyRecords);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createItemHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID itemID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Item
- HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords |
- try {
- HistoryRecords result = apiInstance.createItemHistory(xeroTenantId, itemID, historyRecords);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createItemHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *itemID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Item (default to null)
-HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a history record for a specific item
-[apiInstance createItemHistoryWith:xeroTenantId
- itemID:itemID
- historyRecords:historyRecords
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const itemID = '00000000-0000-0000-0000-000000000000';
-
-const historyRecord: HistoryRecord = {
- details: "Hello World" };
-
-const historyRecords: HistoryRecords = {
- historyRecords: [historyRecord] };
-
-try {
- const response = await xero.accountingApi.createItemHistory(xeroTenantId, itemID, historyRecords);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateItemHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var itemID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var historyRecord = new HistoryRecord();
- historyRecord.Details = "Hello World";
-
- var historyRecords = new HistoryRecords();
- var historyRecordsList = new List<HistoryRecord>();
- historyRecordsList.Add(historyRecord);
- historyRecords._HistoryRecords = historyRecordsList;
-
- try {
- var result = await apiInstance.CreateItemHistoryAsync(accessToken, xeroTenantId, itemID, historyRecords);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateItemHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$itemID = "00000000-0000-0000-0000-000000000000";
-
-$historyRecord = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecord;
-$historyRecord->setDetails('Hello World');
-
-$historyRecords = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecords;
-$arr_history_records = [];
-array_push($arr_history_records, $historyRecord);
-$historyRecords->setHistoryRecords($arr_history_records);
-
-try {
- $result = $apiInstance->createItemHistory($xeroTenantId, $itemID, $historyRecords);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createItemHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $itemID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Item
-my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords |
-
-eval {
- my $result = $api_instance->createItemHistory(xeroTenantId => $xeroTenantId, itemID => $itemID, historyRecords => $historyRecords);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createItemHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ createItemHistory
+ Creates a history record for a specific item
+
+
+
+
+
+
+
+ /Items/{ItemID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -22930,51 +11255,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createItemHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-item_id = '00000000-0000-0000-0000-000000000000'
-
-history_record = {
- details: "Hello World"
-}
-
-historyRecords = {
- history_records: [history_record]
-}
-
-begin
- response = xero_client.accounting_api.create_item_history(xero_tenant_id, item_id, historyRecords)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_item_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ItemID*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ItemID*
@@ -23000,15 +11299,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -23031,34 +11329,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- historyRecords *
-
-
-
-
- HistoryRecords
-
-
-
-HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ historyRecords *
+
+
+
+
+ HistoryRecords
+
+
+ HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createItems
- Creates one or more items
-
-
-
-
-
-
-
- /Items
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Items?summarizeErrors=true&unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
- Integer unitdp = 4;
-
- Purchase purchaseDetails = new Purchase();
- purchaseDetails.setCoGSAccountCode("500");
-
- Item item = new Item();
- item.setCode("abcXYZ123");
- item.setName("HelloWorld");
- item.setDescription("Foobar");
- item.setInventoryAssetAccountCode("140");
- item.setPurchaseDetails(purchaseDetails);
-
- Items items = new Items();
- items.addItemsItem(item);
-
- try {
- Items result = apiInstance.createItems(accessToken, xeroTenantId, items, summarizeErrors, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createItems");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Items items = { "Items": [ { "Code": "code123", "Name": "Item Name XYZ", "Description": "Foobar", "InventoryAssetAccountCode": "140", "PurchaseDetails": { "COGSAccountCode": "500" } } ] }; // Items |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- Items result = apiInstance.createItems(xeroTenantId, items, summarizeErrors, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createItems");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Items *items = { "Items": [ { "Code": "code123", "Name": "Item Name XYZ", "Description": "Foobar", "InventoryAssetAccountCode": "140", "PurchaseDetails": { "COGSAccountCode": "500" } } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates one or more items
-[apiInstance createItemsWith:xeroTenantId
- items:items
- summarizeErrors:summarizeErrors
- unitdp:unitdp
- completionHandler: ^(Items output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-const unitdp = 4;
-
-const purchaseDetails: Purchase = {
- cOGSAccountCode: "500" };
-
-const item: Item = {
- code: "abcXYZ123",
- name: "HelloWorld",
- description: "Foobar",
- inventoryAssetAccountCode: "140",
- purchaseDetails: purchaseDetails };
-
-const items: Items = {
- items: [item] };
-
-try {
- const response = await xero.accountingApi.createItems(xeroTenantId, items, summarizeErrors, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateItemsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
- var unitdp = 4;
-
- var purchaseDetails = new Purchase();
- purchaseDetails.COGSAccountCode = "500";
-
- var item = new Item();
- item.Code = "abcXYZ123";
- item.Name = "HelloWorld";
- item.Description = "Foobar";
- item.InventoryAssetAccountCode = "140";
- item.PurchaseDetails = purchaseDetails;
-
- var items = new Items();
- var itemsList = new List<Item>();
- itemsList.Add(item);
- items._Items = itemsList;
-
- try {
- var result = await apiInstance.CreateItemsAsync(accessToken, xeroTenantId, items, summarizeErrors, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateItems: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-$unitdp = 4;
-
-$purchaseDetails = new XeroAPI\XeroPHP\Models\Accounting\Purchase;
-$purchaseDetails->setCoGSAccountCode('500');
-
-$item = new XeroAPI\XeroPHP\Models\Accounting\Item;
-$item->setCode('abcXYZ123');
-$item->setName('HelloWorld');
-$item->setDescription('Foobar');
-$item->setInventoryAssetAccountCode('140');
-$item->setPurchaseDetails($purchaseDetails);
-
-$items = new XeroAPI\XeroPHP\Models\Accounting\Items;
-$arr_items = [];
-array_push($arr_items, $item);
-$items->setItems($arr_items);
-
-try {
- $result = $apiInstance->createItems($xeroTenantId, $items, $summarizeErrors, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createItems: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $items = ::Object::Items->new(); # Items |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->createItems(xeroTenantId => $xeroTenantId, items => $items, summarizeErrors => $summarizeErrors, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createItems: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createItems
+ Creates one or more items
+
+
+
+
+
+
+
+ /Items
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -23481,61 +11429,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createItems: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-unitdp = 4
-
-purchase_details = {
- cogs_account_code: "500"
-}
-
-item = {
- code: "abcXYZ123",
- name: "HelloWorld",
- description: "Foobar",
- inventory_asset_account_code: "140",
- purchase_details: purchase_details
-}
-
-items = {
- items: [item]
-}
-
-begin
- response = xero_client.accounting_api.create_items(xero_tenant_id, items, summarize_errors, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_items: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -23554,38 +11466,35 @@ Parameters
Required
-
-
-
-
-
-
- Body parameters
-
-
- Name
- Description
-
- items *
-
-
-
-
- Items
-
-
-
-Items with an array of Item objects in body of request
-
-
-
- Required
-
+
+
+
+
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ items *
+
+
+
+
+ Items
+
+
+ Items with an array of Item objects in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -23646,7 +11534,7 @@ Parameters
- unitdp
+ unitdp
@@ -23666,373 +11554,34 @@ Parameters
-
-
-
-
-
-
-
-
- createLinkedTransaction
- Creates linked transactions (billable expenses)
-
-
-
-
-
-
-
- /LinkedTransactions
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/LinkedTransactions"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- LinkedTransaction linkedTransaction = new LinkedTransaction();
- linkedTransaction.setSourceTransactionID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
- linkedTransaction.setSourceLineItemID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- try {
- LinkedTransactions result = apiInstance.createLinkedTransaction(accessToken, xeroTenantId, linkedTransaction);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createLinkedTransaction");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- LinkedTransaction linkedTransaction = { "LinkedTransactions": [ { "SourceTransactionID": "a848644a-f20f-4630-98c3-386bd7505631", "SourceLineItemID": "b0df260d-3cc8-4ced-9bd6-41924f624ed3" } ] }; // LinkedTransaction |
- try {
- LinkedTransactions result = apiInstance.createLinkedTransaction(xeroTenantId, linkedTransaction);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createLinkedTransaction");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-LinkedTransaction *linkedTransaction = { "LinkedTransactions": [ { "SourceTransactionID": "a848644a-f20f-4630-98c3-386bd7505631", "SourceLineItemID": "b0df260d-3cc8-4ced-9bd6-41924f624ed3" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates linked transactions (billable expenses)
-[apiInstance createLinkedTransactionWith:xeroTenantId
- linkedTransaction:linkedTransaction
- completionHandler: ^(LinkedTransactions output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
-const linkedTransaction: LinkedTransaction = {
- sourceTransactionID: "00000000-0000-0000-0000-000000000000",
- sourceLineItemID: "00000000-0000-0000-0000-000000000000" };
-
-try {
- const response = await xero.accountingApi.createLinkedTransaction(xeroTenantId, linkedTransaction);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateLinkedTransactionExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
-
- var linkedTransaction = new LinkedTransaction();
- linkedTransaction.SourceTransactionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- linkedTransaction.SourceLineItemID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.CreateLinkedTransactionAsync(accessToken, xeroTenantId, linkedTransaction);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateLinkedTransaction: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-
-$linkedTransaction = new XeroAPI\XeroPHP\Models\Accounting\LinkedTransaction;
-$linkedTransaction->setSourceTransactionID('00000000-0000-0000-0000-000000000000');
-$linkedTransaction->setSourceLineItemID('00000000-0000-0000-0000-000000000000');
-
-try {
- $result = $apiInstance->createLinkedTransaction($xeroTenantId, $linkedTransaction);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createLinkedTransaction: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $linkedTransaction = ::Object::LinkedTransaction->new(); # LinkedTransaction |
-
-eval {
- my $result = $api_instance->createLinkedTransaction(xeroTenantId => $xeroTenantId, linkedTransaction => $linkedTransaction);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createLinkedTransaction: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ createLinkedTransaction
+ Creates linked transactions (billable expenses)
+
+
+
+
+
+
+
+ /LinkedTransactions
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -24058,48 +11607,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createLinkedTransaction: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-
-linked_transaction = {
- source_transaction_id: "00000000-0000-0000-0000-000000000000",
- source_line_item_id: "00000000-0000-0000-0000-000000000000"
-}
-
-begin
- response = xero_client.accounting_api.create_linked_transaction(xero_tenant_id, linkedTransaction)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_linked_transaction: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -24122,34 +11648,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- linkedTransaction *
-
-
-
-
- LinkedTransaction
-
-
-
-LinkedTransaction object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ linkedTransaction *
+
+
+
+
+ LinkedTransaction
+
+
+ LinkedTransaction object in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createManualJournalAttachmentByFileName
- Creates a specific attachment for a specific manual journal by file name
-
-
-
-
-
-
-
- /ManualJournals/{ManualJournalID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ManualJournals/{ManualJournalID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID manualJournalID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.createManualJournalAttachmentByFileName(accessToken, xeroTenantId, manualJournalID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createManualJournalAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID manualJournalID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a ManualJournal
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.createManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createManualJournalAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *manualJournalID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a ManualJournal (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a specific attachment for a specific manual journal by file name
-[apiInstance createManualJournalAttachmentByFileNameWith:xeroTenantId
- manualJournalID:manualJournalID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const manualJournalID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.createManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateManualJournalAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var manualJournalID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.CreateManualJournalAttachmentByFileNameAsync(accessToken, xeroTenantId, manualJournalID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateManualJournalAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$manualJournalID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->createManualJournalAttachmentByFileName($xeroTenantId, $manualJournalID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createManualJournalAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $manualJournalID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a ManualJournal
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->createManualJournalAttachmentByFileName(xeroTenantId => $xeroTenantId, manualJournalID => $manualJournalID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createManualJournalAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createManualJournalAttachmentByFileName
+ Creates a specific attachment for a specific manual journal by file name
+
+
+
+
+
+
+
+ /ManualJournals/{ManualJournalID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -24596,44 +11740,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createManualJournalAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-manual_journal_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.create_manual_journal_attachment_by_file_name(xero_tenant_id, manual_journal_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_manual_journal_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ManualJournalID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ManualJournalID*
@@ -24659,7 +11784,7 @@ Parameters
- FileName*
+ FileName*
@@ -24682,15 +11807,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -24713,34 +11837,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createManualJournalHistoryRecord
- Creates a history record for a specific manual journal
-
-
-
-
-
-
-
- /ManualJournals/{ManualJournalID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ManualJournals/{ManualJournalID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID manualJournalID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- HistoryRecord historyRecord = new HistoryRecord();
- historyRecord.setDetails("Hello World");
-
- HistoryRecords historyRecords = new HistoryRecords();
- historyRecords.addHistoryRecordsItem(historyRecord);
-
- try {
- HistoryRecords result = apiInstance.createManualJournalHistoryRecord(accessToken, xeroTenantId, manualJournalID, historyRecords);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createManualJournalHistoryRecord");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID manualJournalID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a ManualJournal
- HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords |
- try {
- HistoryRecords result = apiInstance.createManualJournalHistoryRecord(xeroTenantId, manualJournalID, historyRecords);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createManualJournalHistoryRecord");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *manualJournalID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a ManualJournal (default to null)
-HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a history record for a specific manual journal
-[apiInstance createManualJournalHistoryRecordWith:xeroTenantId
- manualJournalID:manualJournalID
- historyRecords:historyRecords
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const manualJournalID = '00000000-0000-0000-0000-000000000000';
-
-const historyRecord: HistoryRecord = {
- details: "Hello World" };
-
-const historyRecords: HistoryRecords = {
- historyRecords: [historyRecord] };
-
-try {
- const response = await xero.accountingApi.createManualJournalHistoryRecord(xeroTenantId, manualJournalID, historyRecords);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateManualJournalHistoryRecordExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var manualJournalID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var historyRecord = new HistoryRecord();
- historyRecord.Details = "Hello World";
-
- var historyRecords = new HistoryRecords();
- var historyRecordsList = new List<HistoryRecord>();
- historyRecordsList.Add(historyRecord);
- historyRecords._HistoryRecords = historyRecordsList;
-
- try {
- var result = await apiInstance.CreateManualJournalHistoryRecordAsync(accessToken, xeroTenantId, manualJournalID, historyRecords);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateManualJournalHistoryRecord: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$manualJournalID = "00000000-0000-0000-0000-000000000000";
-
-$historyRecord = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecord;
-$historyRecord->setDetails('Hello World');
-
-$historyRecords = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecords;
-$arr_history_records = [];
-array_push($arr_history_records, $historyRecord);
-$historyRecords->setHistoryRecords($arr_history_records);
-
-try {
- $result = $apiInstance->createManualJournalHistoryRecord($xeroTenantId, $manualJournalID, $historyRecords);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createManualJournalHistoryRecord: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $manualJournalID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a ManualJournal
-my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords |
-
-eval {
- my $result = $api_instance->createManualJournalHistoryRecord(xeroTenantId => $xeroTenantId, manualJournalID => $manualJournalID, historyRecords => $historyRecords);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createManualJournalHistoryRecord: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createManualJournalHistoryRecord
+ Creates a history record for a specific manual journal
+
+
+
+
+
+
+
+ /ManualJournals/{ManualJournalID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -25190,51 +11930,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createManualJournalHistoryRecord: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-manual_journal_id = '00000000-0000-0000-0000-000000000000'
-
-history_record = {
- details: "Hello World"
-}
-
-historyRecords = {
- history_records: [history_record]
-}
-
-begin
- response = xero_client.accounting_api.create_manual_journal_history_record(xero_tenant_id, manual_journal_id, historyRecords)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_manual_journal_history_record: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ManualJournalID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ManualJournalID*
@@ -25260,15 +11974,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -25291,34 +12004,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- historyRecords *
-
-
-
-
- HistoryRecords
-
-
-
-HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ historyRecords *
+
+
+
+
+ HistoryRecords
+
+
+ HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createManualJournals
- Creates one or more manual journals
-
-
-
-
-
-
-
- /ManualJournals
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ManualJournals?summarizeErrors=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
- LocalDate dateValue = LocalDate.of(2020, Month.OCTOBER, 10);
-
- List<ManualJournalLine> manualJournalLines = new ArrayList<ManualJournalLine>();
-
- ManualJournalLine credit = new ManualJournalLine();
- credit.setLineAmount(100.0);
- credit.setAccountCode("400");
- credit.setDescription("Hello there");
- manualJournalLines.add(credit);
-
- ManualJournalLine debit = new ManualJournalLine();
- debit.setLineAmount(-100.0);
- debit.setAccountCode("120");
- debit.setDescription("Hello there");
- manualJournalLines.add(debit);
-
- ManualJournal manualJournal = new ManualJournal();
- manualJournal.setNarration("Foobar");
- manualJournal.setDate(dateValue);
- manualJournal.setJournalLines(manualJournalLines);
-
- ManualJournals manualJournals = new ManualJournals();
- manualJournals.addManualJournalsItem(manualJournal);
-
- try {
- ManualJournals result = apiInstance.createManualJournals(accessToken, xeroTenantId, manualJournals, summarizeErrors);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createManualJournals");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- ManualJournals manualJournals = { "ManualJournals": [ { "Narration": "Journal Desc", "JournalLines": [ { "LineAmount": 100, "AccountCode": "400", "Description": "Money Movement" }, { "LineAmount": -100, "AccountCode": "400", "Description": "Prepayment of things", "Tracking": [ { "Name": "North", "Option": "Region" } ] } ], "Date": "2019-03-14" } ] }; // ManualJournals |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- try {
- ManualJournals result = apiInstance.createManualJournals(xeroTenantId, manualJournals, summarizeErrors);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createManualJournals");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-ManualJournals *manualJournals = { "ManualJournals": [ { "Narration": "Journal Desc", "JournalLines": [ { "LineAmount": 100, "AccountCode": "400", "Description": "Money Movement" }, { "LineAmount": -100, "AccountCode": "400", "Description": "Prepayment of things", "Tracking": [ { "Name": "North", "Option": "Region" } ] } ], "Date": "2019-03-14" } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates one or more manual journals
-[apiInstance createManualJournalsWith:xeroTenantId
- manualJournals:manualJournals
- summarizeErrors:summarizeErrors
- completionHandler: ^(ManualJournals output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-const dateValue = '2020-10-10'
-const manualJournalLines = [];
-
-const credit: ManualJournalLine = {
- lineAmount: 100.0,
- accountCode: "400",
- description: "Hello there" };
-manualJournalLines.push(credit)
-
-const debit: ManualJournalLine = {
- lineAmount: -100.0,
- accountCode: "120",
- description: "Hello there" };
-manualJournalLines.push(debit)
-
-const manualJournal: ManualJournal = {
- narration: "Foobar",
- date: dateValue,
- journalLines: manualJournalLines };
-
-const manualJournals: ManualJournals = {
- manualJournals: [manualJournal] };
-
-try {
- const response = await xero.accountingApi.createManualJournals(xeroTenantId, manualJournals, summarizeErrors);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateManualJournalsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
- var dateValue = new DateTime(2020, 10, 10);
- var manualJournalLines = new List<ManualJournalLine>();
-
- var credit = new ManualJournalLine();
- credit.LineAmount = new decimal(100.0);
- credit.AccountCode = "400";
- credit.Description = "Hello there";
- manualJournalLines.Add(credit);
-
- var debit = new ManualJournalLine();
- debit.LineAmount = new decimal(-100.0);
- debit.AccountCode = "120";
- debit.Description = "Hello there";
- manualJournalLines.Add(debit);
-
- var manualJournal = new ManualJournal();
- manualJournal.Narration = "Foobar";
- manualJournal.Date = dateValue;
- manualJournal.JournalLines = manualJournalLines;
-
- var manualJournals = new ManualJournals();
- var manualJournalsList = new List<ManualJournal>();
- manualJournalsList.Add(manualJournal);
- manualJournals._ManualJournals = manualJournalsList;
-
- try {
- var result = await apiInstance.CreateManualJournalsAsync(accessToken, xeroTenantId, manualJournals, summarizeErrors);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateManualJournals: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-$dateValue = new DateTime('2019-10-10');
-$manualJournalLines = [];
-
-$credit = new XeroAPI\XeroPHP\Models\Accounting\ManualJournalLine;
-$credit->setLineAmount(100.0);
-$credit->setAccountCode('400');
-$credit->setDescription('Hello there');
-array_push($manualJournalLines, $credit);
-
-$debit = new XeroAPI\XeroPHP\Models\Accounting\ManualJournalLine;
-$debit->setLineAmount(-100.0);
-$debit->setAccountCode('120');
-$debit->setDescription('Hello there');
-array_push($manualJournalLines, $debit);
-
-$manualJournal = new XeroAPI\XeroPHP\Models\Accounting\ManualJournal;
-$manualJournal->setNarration('Foobar');
-$manualJournal->setDate($dateValue);
-$manualJournal->setJournalLines($manualJournalLines);
-
-$manualJournals = new XeroAPI\XeroPHP\Models\Accounting\ManualJournals;
-$arr_manual_journals = [];
-array_push($arr_manual_journals, $manualJournal);
-$manualJournals->setManualJournals($arr_manual_journals);
-
-try {
- $result = $apiInstance->createManualJournals($xeroTenantId, $manualJournals, $summarizeErrors);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createManualJournals: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $manualJournals = ::Object::ManualJournals->new(); # ManualJournals |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-
-eval {
- my $result = $api_instance->createManualJournals(xeroTenantId => $xeroTenantId, manualJournals => $manualJournals, summarizeErrors => $summarizeErrors);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createManualJournals: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createManualJournals
+ Creates one or more manual journals
+
+
+
+
+
+
+
+ /ManualJournals
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -25849,70 +12114,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createManualJournals: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-date_value = 'YYYY-MM-DD'
-manual_journal_lines = []
-
-credit = {
- line_amount: 100.0,
- account_code: "400",
- description: "Hello there"
-}
-manual_journal_lines << credit
-
-debit = {
- line_amount: -100.0,
- account_code: "120",
- description: "Hello there"
-}
-manual_journal_lines << debit
-
-manual_journal = {
- narration: "Foobar",
- date: date_value,
- journal_lines: manual_journal_lines
-}
-
-manualJournals = {
- manual_journals: [manual_journal]
-}
-
-begin
- response = xero_client.accounting_api.create_manual_journals(xero_tenant_id, manualJournals, summarize_errors)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_manual_journals: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -25935,34 +12155,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- manualJournals *
-
-
-
-
- ManualJournals
-
-
-
-ManualJournals array with ManualJournal object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ manualJournals *
+
+
+
+
+ ManualJournals
+
+
+ ManualJournals array with ManualJournal object in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -26023,425 +12219,34 @@ Parameters
-
-
-
-
-
-
-
-
- createOverpaymentAllocations
- Creates a single allocation for a specific overpayment
-
-
-
-
-
-
-
- /Overpayments/{OverpaymentID}/Allocations
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Overpayments/{OverpaymentID}/Allocations?summarizeErrors=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID overpaymentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- Boolean summarizeErrors = true;
- LocalDate currDate = LocalDate.now();
-
- Invoice invoice = new Invoice();
- invoice.setInvoiceID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- Allocation allocation = new Allocation();
- allocation.setAmount(1.0);
- allocation.setDate(currDate);
- allocation.setInvoice(invoice);
-
- Allocations allocations = new Allocations();
- allocations.addAllocationsItem(allocation);
-
- try {
- Allocations result = apiInstance.createOverpaymentAllocations(accessToken, xeroTenantId, overpaymentID, allocations, summarizeErrors);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createOverpaymentAllocations");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID overpaymentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Overpayment
- Allocations allocations = { "Allocations": [ { "Invoice": { "InvoiceID": "00000000-0000-0000-0000-000000000000", "LineItems": [], "Contact": {}, "Type": "ACCPAY" }, "Amount": 10.00, "Date": "2019-03-12" } ] }; // Allocations |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- try {
- Allocations result = apiInstance.createOverpaymentAllocations(xeroTenantId, overpaymentID, allocations, summarizeErrors);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createOverpaymentAllocations");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *overpaymentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Overpayment (default to null)
-Allocations *allocations = { "Allocations": [ { "Invoice": { "InvoiceID": "00000000-0000-0000-0000-000000000000", "LineItems": [], "Contact": {}, "Type": "ACCPAY" }, "Amount": 10.00, "Date": "2019-03-12" } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a single allocation for a specific overpayment
-[apiInstance createOverpaymentAllocationsWith:xeroTenantId
- overpaymentID:overpaymentID
- allocations:allocations
- summarizeErrors:summarizeErrors
- completionHandler: ^(Allocations output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const overpaymentID = '00000000-0000-0000-0000-000000000000';
-const summarizeErrors = true;
-const currDate = '2020-12-10'
-
-const invoice: Invoice = {
- invoiceID: "00000000-0000-0000-0000-000000000000" };
-
-const allocation: Allocation = {
- amount: 1.0,
- date: currDate,
- invoice: invoice };
-
-const allocations: Allocations = {
- allocations: [allocation] };
-
-try {
- const response = await xero.accountingApi.createOverpaymentAllocations(xeroTenantId, overpaymentID, allocations, summarizeErrors);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateOverpaymentAllocationsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var overpaymentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var summarizeErrors = true;
- var currDate = DateTime.Now;
-
- var invoice = new Invoice();
- invoice.InvoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var allocation = new Allocation();
- allocation.Amount = new decimal(1.0);
- allocation.Date = currDate;
- allocation.Invoice = invoice;
-
- var allocations = new Allocations();
- var allocationsList = new List<Allocation>();
- allocationsList.Add(allocation);
- allocations._Allocations = allocationsList;
-
- try {
- var result = await apiInstance.CreateOverpaymentAllocationsAsync(accessToken, xeroTenantId, overpaymentID, allocations, summarizeErrors);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateOverpaymentAllocations: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$overpaymentID = "00000000-0000-0000-0000-000000000000";
-$summarizeErrors = true;
-$currDate = new DateTime('2020-12-10');
-
-$invoice = new XeroAPI\XeroPHP\Models\Accounting\Invoice;
-$invoice->setInvoiceID('00000000-0000-0000-0000-000000000000');
-
-$allocation = new XeroAPI\XeroPHP\Models\Accounting\Allocation;
-$allocation->setAmount(1.0);
-$allocation->setDate($currDate);
-$allocation->setInvoice($invoice);
-
-$allocations = new XeroAPI\XeroPHP\Models\Accounting\Allocations;
-$arr_allocations = [];
-array_push($arr_allocations, $allocation);
-$allocations->setAllocations($arr_allocations);
-
-try {
- $result = $apiInstance->createOverpaymentAllocations($xeroTenantId, $overpaymentID, $allocations, $summarizeErrors);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createOverpaymentAllocations: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $overpaymentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Overpayment
-my $allocations = ::Object::Allocations->new(); # Allocations |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-
-eval {
- my $result = $api_instance->createOverpaymentAllocations(xeroTenantId => $xeroTenantId, overpaymentID => $overpaymentID, allocations => $allocations, summarizeErrors => $summarizeErrors);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createOverpaymentAllocations: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ createOverpaymentAllocations
+ Creates a single allocation for a specific overpayment
+
+
+
+
+
+
+
+ /Overpayments/{OverpaymentID}/Allocations
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -26477,59 +12282,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createOverpaymentAllocations: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-overpayment_id = '00000000-0000-0000-0000-000000000000'
-summarize_errors = true
-curr_date = 'YYYY-MM-DD'
-
-invoice = {
- invoice_id: "00000000-0000-0000-0000-000000000000"
-}
-
-allocation = {
- amount: 1.0,
- date: curr_date,
- invoice: invoice
-}
-
-allocations = {
- allocations: [allocation]
-}
-
-begin
- response = xero_client.accounting_api.create_overpayment_allocations(xero_tenant_id, overpayment_id, allocations, summarize_errors)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_overpayment_allocations: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- OverpaymentID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ OverpaymentID*
@@ -26555,15 +12326,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -26586,34 +12356,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- allocations *
-
-
-
-
- Allocations
-
-
-
-Allocations array with Allocation object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ allocations *
+
+
+
+
+ Allocations
+
+
+ Allocations array with Allocation object in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -26674,393 +12420,34 @@ Parameters
-
-
-
-
-
-
-
-
- createOverpaymentHistory
- Creates a history record for a specific overpayment
-
-
-
-
-
-
-
- /Overpayments/{OverpaymentID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Overpayments/{OverpaymentID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID overpaymentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- HistoryRecord historyRecord = new HistoryRecord();
- historyRecord.setDetails("Hello World");
-
- HistoryRecords historyRecords = new HistoryRecords();
- historyRecords.addHistoryRecordsItem(historyRecord);
-
- try {
- HistoryRecords result = apiInstance.createOverpaymentHistory(accessToken, xeroTenantId, overpaymentID, historyRecords);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createOverpaymentHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID overpaymentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Overpayment
- HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords |
- try {
- HistoryRecords result = apiInstance.createOverpaymentHistory(xeroTenantId, overpaymentID, historyRecords);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createOverpaymentHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *overpaymentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Overpayment (default to null)
-HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a history record for a specific overpayment
-[apiInstance createOverpaymentHistoryWith:xeroTenantId
- overpaymentID:overpaymentID
- historyRecords:historyRecords
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const overpaymentID = '00000000-0000-0000-0000-000000000000';
-
-const historyRecord: HistoryRecord = {
- details: "Hello World" };
-
-const historyRecords: HistoryRecords = {
- historyRecords: [historyRecord] };
-
-try {
- const response = await xero.accountingApi.createOverpaymentHistory(xeroTenantId, overpaymentID, historyRecords);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateOverpaymentHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var overpaymentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var historyRecord = new HistoryRecord();
- historyRecord.Details = "Hello World";
-
- var historyRecords = new HistoryRecords();
- var historyRecordsList = new List<HistoryRecord>();
- historyRecordsList.Add(historyRecord);
- historyRecords._HistoryRecords = historyRecordsList;
-
- try {
- var result = await apiInstance.CreateOverpaymentHistoryAsync(accessToken, xeroTenantId, overpaymentID, historyRecords);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateOverpaymentHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$overpaymentID = "00000000-0000-0000-0000-000000000000";
-
-$historyRecord = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecord;
-$historyRecord->setDetails('Hello World');
-
-$historyRecords = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecords;
-$arr_history_records = [];
-array_push($arr_history_records, $historyRecord);
-$historyRecords->setHistoryRecords($arr_history_records);
-
-try {
- $result = $apiInstance->createOverpaymentHistory($xeroTenantId, $overpaymentID, $historyRecords);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createOverpaymentHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $overpaymentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Overpayment
-my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords |
-
-eval {
- my $result = $api_instance->createOverpaymentHistory(xeroTenantId => $xeroTenantId, overpaymentID => $overpaymentID, historyRecords => $historyRecords);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createOverpaymentHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ createOverpaymentHistory
+ Creates a history record for a specific overpayment
+
+
+
+
+
+
+
+ /Overpayments/{OverpaymentID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -27089,51 +12476,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createOverpaymentHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-overpayment_id = '00000000-0000-0000-0000-000000000000'
-
-history_record = {
- details: "Hello World"
-}
-
-historyRecords = {
- history_records: [history_record]
-}
-
-begin
- response = xero_client.accounting_api.create_overpayment_history(xero_tenant_id, overpayment_id, historyRecords)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_overpayment_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- OverpaymentID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ OverpaymentID*
@@ -27159,15 +12520,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -27190,34 +12550,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- historyRecords *
-
-
-
-
- HistoryRecords
-
-
-
-HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ historyRecords *
+
+
+
+
+ HistoryRecords
+
+
+ HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createPayment
- Creates a single payment for invoice or credit notes
-
-
-
-
-
-
-
- /Payments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Payments"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- LocalDate dateValue = LocalDate.of(2020, Month.OCTOBER, 10);
-
- Invoice invoice = new Invoice();
- invoice.setInvoiceID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- Account account = new Account();
- account.setAccountID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- Payment payment = new Payment();
- payment.setInvoice(invoice);
- payment.setAccount(account);
- payment.setAmount(1.0);
- payment.setDate(dateValue);
-
- Payments payments = new Payments();
- payments.addPaymentsItem(payment);
-
- try {
- Payments result = apiInstance.createPayment(accessToken, xeroTenantId, payment);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createPayment");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Payment payment = { "Payments": [ { "Invoice": { "LineItems": [], "InvoiceID": "00000000-0000-0000-0000-000000000000" }, "Account": { "Code": "970" }, "Date": "2019-03-12", "Amount": 1 } ] }; // Payment |
- try {
- Payments result = apiInstance.createPayment(xeroTenantId, payment);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createPayment");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Payment *payment = { "Payments": [ { "Invoice": { "LineItems": [], "InvoiceID": "00000000-0000-0000-0000-000000000000" }, "Account": { "Code": "970" }, "Date": "2019-03-12", "Amount": 1 } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a single payment for invoice or credit notes
-[apiInstance createPaymentWith:xeroTenantId
- payment:payment
- completionHandler: ^(Payments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const dateValue = '2020-10-10'
-
-const invoice: Invoice = {
- invoiceID: "00000000-0000-0000-0000-000000000000" };
-
-const account: Account = {
- accountID: "00000000-0000-0000-0000-000000000000" };
-
-const payment: Payment = {
- invoice: invoice,
- account: account,
- amount: 1.0,
- date: dateValue };
-
-const payments: Payments = {
- payments: [payment] };
-
-try {
- const response = await xero.accountingApi.createPayment(xeroTenantId, payment);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreatePaymentExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var dateValue = DateTime.Now;
-
- var invoice = new Invoice();
- invoice.InvoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var account = new Account();
- account.AccountID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var payment = new Payment();
- payment.Invoice = invoice;
- payment.Account = account;
- payment.Amount = new decimal(1.0);
- payment.Date = dateValue;
-
- var payments = new Payments();
- var paymentsList = new List<Payment>();
- paymentsList.Add(payment);
- payments._Payments = paymentsList;
-
- try {
- var result = await apiInstance.CreatePaymentAsync(accessToken, xeroTenantId, payment);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreatePayment: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$dateValue = new DateTime('2020-10-10');
-
-$invoice = new XeroAPI\XeroPHP\Models\Accounting\Invoice;
-$invoice->setInvoiceID('00000000-0000-0000-0000-000000000000');
-
-$account = new XeroAPI\XeroPHP\Models\Accounting\Account;
-$account->setAccountID('00000000-0000-0000-0000-000000000000');
-
-$payment = new XeroAPI\XeroPHP\Models\Accounting\Payment;
-$payment->setInvoice($invoice);
-$payment->setAccount($account);
-$payment->setAmount(1.0);
-$payment->setDate($dateValue);
-
-$payments = new XeroAPI\XeroPHP\Models\Accounting\Payments;
-$arr_payments = [];
-array_push($arr_payments, $payment);
-$payments->setPayments($arr_payments);
-
-try {
- $result = $apiInstance->createPayment($xeroTenantId, $payment);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createPayment: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $payment = ::Object::Payment->new(); # Payment |
-
-eval {
- my $result = $api_instance->createPayment(xeroTenantId => $xeroTenantId, payment => $payment);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createPayment: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createPayment
+ Creates a single payment for invoice or credit notes
+
+
+
+
+
+
+
+ /Payments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -27708,63 +12652,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createPayment: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-date_value = 'YYYY-MM-DD'
-
-invoice = {
- invoice_id: "00000000-0000-0000-0000-000000000000"
-}
-
-account = {
- account_id: "00000000-0000-0000-0000-000000000000"
-}
-
-payment = {
- invoice: invoice,
- account: account,
- amount: 1.0,
- date: date_value
-}
-
-payments = {
- payments: [payment]
-}
-
-begin
- response = xero_client.accounting_api.create_payment(xero_tenant_id, payment)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_payment: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -27787,34 +12693,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- payment *
-
-
-
-
- Payment
-
-
-
-Request body with a single Payment object
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ payment *
+
+
+
+
+ Payment
+
+
+ Request body with a single Payment object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createPaymentHistory
- Creates a history record for a specific payment
-
-
-
-
-
-
-
- /Payments/{PaymentID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Payments/{PaymentID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID paymentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- HistoryRecord historyRecord = new HistoryRecord();
- historyRecord.setDetails("Hello World");
-
- HistoryRecords historyRecords = new HistoryRecords();
- historyRecords.addHistoryRecordsItem(historyRecord);
-
- try {
- HistoryRecords result = apiInstance.createPaymentHistory(accessToken, xeroTenantId, paymentID, historyRecords);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createPaymentHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID paymentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Payment
- HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords |
- try {
- HistoryRecords result = apiInstance.createPaymentHistory(xeroTenantId, paymentID, historyRecords);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createPaymentHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *paymentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Payment (default to null)
-HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a history record for a specific payment
-[apiInstance createPaymentHistoryWith:xeroTenantId
- paymentID:paymentID
- historyRecords:historyRecords
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const paymentID = '00000000-0000-0000-0000-000000000000';
-
-const historyRecord: HistoryRecord = {
- details: "Hello World" };
-
-const historyRecords: HistoryRecords = {
- historyRecords: [historyRecord] };
-
-try {
- const response = await xero.accountingApi.createPaymentHistory(xeroTenantId, paymentID, historyRecords);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreatePaymentHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var paymentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var historyRecord = new HistoryRecord();
- historyRecord.Details = "Hello World";
-
- var historyRecords = new HistoryRecords();
- var historyRecordsList = new List<HistoryRecord>();
- historyRecordsList.Add(historyRecord);
- historyRecords._HistoryRecords = historyRecordsList;
-
- try {
- var result = await apiInstance.CreatePaymentHistoryAsync(accessToken, xeroTenantId, paymentID, historyRecords);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreatePaymentHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$paymentID = "00000000-0000-0000-0000-000000000000";
-
-$historyRecord = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecord;
-$historyRecord->setDetails('Hello World');
-
-$historyRecords = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecords;
-$arr_history_records = [];
-array_push($arr_history_records, $historyRecord);
-$historyRecords->setHistoryRecords($arr_history_records);
-
-try {
- $result = $apiInstance->createPaymentHistory($xeroTenantId, $paymentID, $historyRecords);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createPaymentHistory: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $paymentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Payment
-my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords |
-
-eval {
- my $result = $api_instance->createPaymentHistory(xeroTenantId => $xeroTenantId, paymentID => $paymentID, historyRecords => $historyRecords);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createPaymentHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createPaymentHistory
+ Creates a history record for a specific payment
+
+
+
+
+
+
+
+ /Payments/{PaymentID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -28263,51 +12786,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createPaymentHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-payment_id = '00000000-0000-0000-0000-000000000000'
-
-history_record = {
- details: "Hello World"
-}
-
-historyRecords = {
- history_records: [history_record]
-}
-
-begin
- response = xero_client.accounting_api.create_payment_history(xero_tenant_id, payment_id, historyRecords)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_payment_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PaymentID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PaymentID*
@@ -28333,15 +12830,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -28364,455 +12860,71 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- historyRecords *
-
-
-
-
- HistoryRecords
-
-
-
-HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ historyRecords *
+
+
+
+
+ HistoryRecords
+
+
+ HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createPaymentService
- Creates a payment service
-
-
-
-
-
-
-
- /PaymentServices
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/PaymentServices"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- PaymentService paymentService = new PaymentService();
- paymentService.setPaymentServiceName("ACME Payments");
- paymentService.setPaymentServiceUrl("https://www.payupnow.com/");
- paymentService.setPayNowText("Pay Now");
-
- PaymentServices paymentServices = new PaymentServices();
- paymentServices.addPaymentServicesItem(paymentService);
-
- try {
- PaymentServices result = apiInstance.createPaymentService(accessToken, xeroTenantId, paymentServices);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createPaymentService");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- PaymentServices paymentServices = { "PaymentServices": [ { "PaymentServiceName": "PayUpNow", "PaymentServiceUrl": "https://www.payupnow.com/", "PayNowText": "Time To Pay" } ] }; // PaymentServices |
- try {
- PaymentServices result = apiInstance.createPaymentService(xeroTenantId, paymentServices);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createPaymentService");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-PaymentServices *paymentServices = { "PaymentServices": [ { "PaymentServiceName": "PayUpNow", "PaymentServiceUrl": "https://www.payupnow.com/", "PayNowText": "Time To Pay" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a payment service
-[apiInstance createPaymentServiceWith:xeroTenantId
- paymentServices:paymentServices
- completionHandler: ^(PaymentServices output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
-const paymentService: PaymentService = {
- paymentServiceName: "ACME Payments",
- paymentServiceUrl: "https://www.payupnow.com/",
- payNowText: "Pay Now" };
-
-const paymentServices: PaymentServices = {
- paymentServices: [paymentService] };
-
-try {
- const response = await xero.accountingApi.createPaymentService(xeroTenantId, paymentServices);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreatePaymentServiceExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
-
- var paymentService = new PaymentService();
- paymentService.PaymentServiceName = "ACME Payments";
- paymentService.PaymentServiceUrl = "https://www.payupnow.com/";
- paymentService.PayNowText = "Pay Now";
-
- var paymentServices = new PaymentServices();
- var paymentServicesList = new List<PaymentService>();
- paymentServicesList.Add(paymentService);
- paymentServices._PaymentServices = paymentServicesList;
-
- try {
- var result = await apiInstance.CreatePaymentServiceAsync(accessToken, xeroTenantId, paymentServices);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreatePaymentService: " + e.Message );
- }
- }
+ "example" : "{ \"HistoryRecords\": [ { \"Details\": \"Hello World\" } ] }"
}
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-
-$paymentService = new XeroAPI\XeroPHP\Models\Accounting\PaymentService;
-$paymentService->setPaymentServiceName('ACME Payments');
-$paymentService->setPaymentServiceUrl('https://www.payupnow.com/');
-$paymentService->setPayNowText('Pay Now');
-
-$paymentServices = new XeroAPI\XeroPHP\Models\Accounting\PaymentServices;
-$arr_paymentServices = [];
-array_push($arr_paymentServices, $paymentService);
-$paymentServices->setPaymentServices($arr_paymentServices);
-
-try {
- $result = $apiInstance->createPaymentService($xeroTenantId, $paymentServices);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createPaymentService: ', $e->getMessage(), PHP_EOL;
+ },
+ "required" : true
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $paymentServices = ::Object::PaymentServices->new(); # PaymentServices |
-
-eval {
- my $result = $api_instance->createPaymentService(xeroTenantId => $xeroTenantId, paymentServices => $paymentServices);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createPaymentService: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createPaymentService
+ Creates a payment service
+
+
+
+
+
+
+
+ /PaymentServices
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -28842,53 +12954,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createPaymentService: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-
-payment_service = {
- payment_service_name: "ACME Payments",
- payment_service_url: "https://www.payupnow.com/",
- pay_now_text: "Pay Now"
-}
-
-paymentServices = {
- paymentServices: [paymentService]
-}
-
-begin
- response = xero_client.accounting_api.create_payment_service(xero_tenant_id, paymentServices)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_payment_service: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- paymentservices
- Grant read-write access to payment services
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ paymentservices
+ Grant read-write access to payment services
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -28911,34 +12995,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- paymentServices *
-
-
-
-
- PaymentServices
-
-
-
-PaymentServices array with PaymentService object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ paymentServices *
+
+
+
+
+ PaymentServices
+
+
+ PaymentServices array with PaymentService object in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createPayments
- Creates multiple payments for invoices or credit notes
-
-
-
-
-
-
-
- /Payments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Payments?summarizeErrors=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
- LocalDate dateValue = LocalDate.of(2020, Month.OCTOBER, 10);
-
- Invoice invoice = new Invoice();
- invoice.setInvoiceID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- Account account = new Account();
- account.setAccountID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- Payment payment = new Payment();
- payment.setInvoice(invoice);
- payment.setAccount(account);
- payment.setAmount(1.0);
- payment.setDate(dateValue);
-
- Payments payments = new Payments();
- payments.addPaymentsItem(payment);
-
- try {
- Payments result = apiInstance.createPayments(accessToken, xeroTenantId, payments, summarizeErrors);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createPayments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Payments payments = { "Payments": [ { "Invoice": { "LineItems": [], "InvoiceID": "00000000-0000-0000-0000-000000000000" }, "Account": { "Code": "970" }, "Date": "2019-03-12", "Amount": 1 } ] }; // Payments |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- try {
- Payments result = apiInstance.createPayments(xeroTenantId, payments, summarizeErrors);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createPayments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Payments *payments = { "Payments": [ { "Invoice": { "LineItems": [], "InvoiceID": "00000000-0000-0000-0000-000000000000" }, "Account": { "Code": "970" }, "Date": "2019-03-12", "Amount": 1 } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates multiple payments for invoices or credit notes
-[apiInstance createPaymentsWith:xeroTenantId
- payments:payments
- summarizeErrors:summarizeErrors
- completionHandler: ^(Payments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-const dateValue = '2020-10-10'
-
-const invoice: Invoice = {
- invoiceID: "00000000-0000-0000-0000-000000000000" };
-
-const account: Account = {
- accountID: "00000000-0000-0000-0000-000000000000" };
-
-const payment: Payment = {
- invoice: invoice,
- account: account,
- amount: 1.0,
- date: dateValue };
-
-const payments: Payments = {
- payments: [payment] };
-
-try {
- const response = await xero.accountingApi.createPayments(xeroTenantId, payments, summarizeErrors);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreatePaymentsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
- var dateValue = DateTime.Now;
-
- var invoice = new Invoice();
- invoice.InvoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var account = new Account();
- account.AccountID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var payment = new Payment();
- payment.Invoice = invoice;
- payment.Account = account;
- payment.Amount = new decimal(1.0);
- payment.Date = dateValue;
-
- var payments = new Payments();
- var paymentsList = new List<Payment>();
- paymentsList.Add(payment);
- payments._Payments = paymentsList;
-
- try {
- var result = await apiInstance.CreatePaymentsAsync(accessToken, xeroTenantId, payments, summarizeErrors);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreatePayments: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-$dateValue = new DateTime('2020-10-10');
-
-$invoice = new XeroAPI\XeroPHP\Models\Accounting\Invoice;
-$invoice->setInvoiceID('00000000-0000-0000-0000-000000000000');
-
-$account = new XeroAPI\XeroPHP\Models\Accounting\Account;
-$account->setAccountID('00000000-0000-0000-0000-000000000000');
-
-$payment = new XeroAPI\XeroPHP\Models\Accounting\Payment;
-$payment->setInvoice($invoice);
-$payment->setAccount($account);
-$payment->setAmount(1.0);
-$payment->setDate($dateValue);
-
-$payments = new XeroAPI\XeroPHP\Models\Accounting\Payments;
-$arr_payments = [];
-array_push($arr_payments, $payment);
-$payments->setPayments($arr_payments);
-
-try {
- $result = $apiInstance->createPayments($xeroTenantId, $payments, $summarizeErrors);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createPayments: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $payments = ::Object::Payments->new(); # Payments |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-
-eval {
- my $result = $api_instance->createPayments(xeroTenantId => $xeroTenantId, payments => $payments, summarizeErrors => $summarizeErrors);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createPayments: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createPayments
+ Creates multiple payments for invoices or credit notes
+
+
+
+
+
+
+
+ /Payments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -29437,64 +13098,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createPayments: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-date_value = 'YYYY-MM-DD'
-
-invoice = {
- invoice_id: "00000000-0000-0000-0000-000000000000"
-}
-
-account = {
- account_id: "00000000-0000-0000-0000-000000000000"
-}
-
-payment = {
- invoice: invoice,
- account: account,
- amount: 1.0,
- date: date_value
-}
-
-payments = {
- payments: [payment]
-}
-
-begin
- response = xero_client.accounting_api.create_payments(xero_tenant_id, payments, summarize_errors)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_payments: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -29517,34 +13139,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- payments *
-
-
-
-
- Payments
-
-
-
-Payments array with Payment object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ payments *
+
+
+
+
+ Payments
+
+
+ Payments array with Payment object in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -29605,425 +13203,34 @@ Parameters
-
-
-
-
-
-
-
-
- createPrepaymentAllocations
- Allows you to create an Allocation for prepayments
-
-
-
-
-
-
-
- /Prepayments/{PrepaymentID}/Allocations
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Prepayments/{PrepaymentID}/Allocations?summarizeErrors=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID prepaymentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- Boolean summarizeErrors = true;
- LocalDate currDate = LocalDate.now();
-
- Invoice invoice = new Invoice();
- invoice.setInvoiceID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- Allocation allocation = new Allocation();
- allocation.setInvoice(invoice);
- allocation.setAmount(1.0);
- allocation.setDate(currDate);
-
- Allocations allocations = new Allocations();
- allocations.addAllocationsItem(allocation);
-
- try {
- Allocations result = apiInstance.createPrepaymentAllocations(accessToken, xeroTenantId, prepaymentID, allocations, summarizeErrors);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createPrepaymentAllocations");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID prepaymentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a PrePayment
- Allocations allocations = { "Allocations": [ { "Invoice": { "LineItems": [], "InvoiceID": "00000000-0000-0000-0000-000000000000" }, "Amount": 1, "Date": "2019-01-10" } ] }; // Allocations |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- try {
- Allocations result = apiInstance.createPrepaymentAllocations(xeroTenantId, prepaymentID, allocations, summarizeErrors);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createPrepaymentAllocations");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *prepaymentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a PrePayment (default to null)
-Allocations *allocations = { "Allocations": [ { "Invoice": { "LineItems": [], "InvoiceID": "00000000-0000-0000-0000-000000000000" }, "Amount": 1, "Date": "2019-01-10" } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Allows you to create an Allocation for prepayments
-[apiInstance createPrepaymentAllocationsWith:xeroTenantId
- prepaymentID:prepaymentID
- allocations:allocations
- summarizeErrors:summarizeErrors
- completionHandler: ^(Allocations output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const prepaymentID = '00000000-0000-0000-0000-000000000000';
-const summarizeErrors = true;
-const currDate = '2020-12-10'
-
-const invoice: Invoice = {
- invoiceID: "00000000-0000-0000-0000-000000000000" };
-
-const allocation: Allocation = {
- invoice: invoice,
- amount: 1.0,
- date: currDate };
-
-const allocations: Allocations = {
- allocations: [allocation] };
-
-try {
- const response = await xero.accountingApi.createPrepaymentAllocations(xeroTenantId, prepaymentID, allocations, summarizeErrors);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreatePrepaymentAllocationsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var prepaymentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var summarizeErrors = true;
- var currDate = DateTime.Now;
-
- var invoice = new Invoice();
- invoice.InvoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var allocation = new Allocation();
- allocation.Invoice = invoice;
- allocation.Amount = new decimal(1.0);
- allocation.Date = currDate;
-
- var allocations = new Allocations();
- var allocationsList = new List<Allocation>();
- allocationsList.Add(allocation);
- allocations._Allocations = allocationsList;
-
- try {
- var result = await apiInstance.CreatePrepaymentAllocationsAsync(accessToken, xeroTenantId, prepaymentID, allocations, summarizeErrors);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreatePrepaymentAllocations: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$prepaymentID = "00000000-0000-0000-0000-000000000000";
-$summarizeErrors = true;
-$currDate = new DateTime('2020-12-10');
-
-$invoice = new XeroAPI\XeroPHP\Models\Accounting\Invoice;
-$invoice->setInvoiceID('00000000-0000-0000-0000-000000000000');
-
-$allocation = new XeroAPI\XeroPHP\Models\Accounting\Allocation;
-$allocation->setInvoice($invoice);
-$allocation->setAmount(1.0);
-$allocation->setDate($currDate);
-
-$allocations = new XeroAPI\XeroPHP\Models\Accounting\Allocations;
-$arr_allocations = [];
-array_push($arr_allocations, $allocation);
-$allocations->setAllocations($arr_allocations);
-
-try {
- $result = $apiInstance->createPrepaymentAllocations($xeroTenantId, $prepaymentID, $allocations, $summarizeErrors);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createPrepaymentAllocations: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $prepaymentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a PrePayment
-my $allocations = ::Object::Allocations->new(); # Allocations |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-
-eval {
- my $result = $api_instance->createPrepaymentAllocations(xeroTenantId => $xeroTenantId, prepaymentID => $prepaymentID, allocations => $allocations, summarizeErrors => $summarizeErrors);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createPrepaymentAllocations: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ createPrepaymentAllocations
+ Allows you to create an Allocation for prepayments
+
+
+
+
+
+
+
+ /Prepayments/{PrepaymentID}/Allocations
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -30059,59 +13266,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createPrepaymentAllocations: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-prepayment_id = '00000000-0000-0000-0000-000000000000'
-summarize_errors = true
-curr_date = 'YYYY-MM-DD'
-
-invoice = {
- invoice_id: "00000000-0000-0000-0000-000000000000"
-}
-
-allocation = {
- invoice: invoice,
- amount: 1.0,
- date: curr_date
-}
-
-allocations = {
- allocations: [allocation]
-}
-
-begin
- response = xero_client.accounting_api.create_prepayment_allocations(xero_tenant_id, prepayment_id, allocations, summarize_errors)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_prepayment_allocations: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PrepaymentID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PrepaymentID*
@@ -30137,15 +13310,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -30168,34 +13340,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- allocations *
-
-
-
-
- Allocations
-
-
-
-Allocations with an array of Allocation object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ allocations *
+
+
+
+
+ Allocations
+
+
+ Allocations with an array of Allocation object in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -30256,393 +13404,34 @@ Parameters
-
-
-
-
-
-
-
-
- createPrepaymentHistory
- Creates a history record for a specific prepayment
-
-
-
-
-
-
-
- /Prepayments/{PrepaymentID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Prepayments/{PrepaymentID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID prepaymentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- HistoryRecord historyRecord = new HistoryRecord();
- historyRecord.setDetails("Hello World");
-
- HistoryRecords historyRecords = new HistoryRecords();
- historyRecords.addHistoryRecordsItem(historyRecord);
-
- try {
- HistoryRecords result = apiInstance.createPrepaymentHistory(accessToken, xeroTenantId, prepaymentID, historyRecords);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createPrepaymentHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID prepaymentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a PrePayment
- HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords |
- try {
- HistoryRecords result = apiInstance.createPrepaymentHistory(xeroTenantId, prepaymentID, historyRecords);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createPrepaymentHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *prepaymentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a PrePayment (default to null)
-HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a history record for a specific prepayment
-[apiInstance createPrepaymentHistoryWith:xeroTenantId
- prepaymentID:prepaymentID
- historyRecords:historyRecords
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const prepaymentID = '00000000-0000-0000-0000-000000000000';
-
-const historyRecord: HistoryRecord = {
- details: "Hello World" };
-
-const historyRecords: HistoryRecords = {
- historyRecords: [historyRecord] };
-
-try {
- const response = await xero.accountingApi.createPrepaymentHistory(xeroTenantId, prepaymentID, historyRecords);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreatePrepaymentHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var prepaymentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var historyRecord = new HistoryRecord();
- historyRecord.Details = "Hello World";
-
- var historyRecords = new HistoryRecords();
- var historyRecordsList = new List<HistoryRecord>();
- historyRecordsList.Add(historyRecord);
- historyRecords._HistoryRecords = historyRecordsList;
-
- try {
- var result = await apiInstance.CreatePrepaymentHistoryAsync(accessToken, xeroTenantId, prepaymentID, historyRecords);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreatePrepaymentHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$prepaymentID = "00000000-0000-0000-0000-000000000000";
-
-$historyRecord = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecord;
-$historyRecord->setDetails('Hello World');
-
-$historyRecords = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecords;
-$arr_history_records = [];
-array_push($arr_history_records, $historyRecord);
-$historyRecords->setHistoryRecords($arr_history_records);
-
-try {
- $result = $apiInstance->createPrepaymentHistory($xeroTenantId, $prepaymentID, $historyRecords);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createPrepaymentHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $prepaymentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a PrePayment
-my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords |
-
-eval {
- my $result = $api_instance->createPrepaymentHistory(xeroTenantId => $xeroTenantId, prepaymentID => $prepaymentID, historyRecords => $historyRecords);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createPrepaymentHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ createPrepaymentHistory
+ Creates a history record for a specific prepayment
+
+
+
+
+
+
+
+ /Prepayments/{PrepaymentID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -30671,51 +13460,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createPrepaymentHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-prepayment_id = '00000000-0000-0000-0000-000000000000'
-
-history_record = {
- details: "Hello World"
-}
-
-historyRecords = {
- history_records: [history_record]
-}
-
-begin
- response = xero_client.accounting_api.create_prepayment_history(xero_tenant_id, prepayment_id, historyRecords)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_prepayment_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PrepaymentID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PrepaymentID*
@@ -30741,15 +13504,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -30772,34 +13534,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- historyRecords *
-
-
-
-
- HistoryRecords
-
-
-
-HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ historyRecords *
+
+
+
+
+ HistoryRecords
+
+
+ HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createPurchaseOrderAttachmentByFileName
- Creates attachment for a specific purchase order
-
-
-
-
-
-
-
- /PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID purchaseOrderID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.createPurchaseOrderAttachmentByFileName(accessToken, xeroTenantId, purchaseOrderID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createPurchaseOrderAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID purchaseOrderID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Purchase Order
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.createPurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createPurchaseOrderAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *purchaseOrderID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Purchase Order (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates attachment for a specific purchase order
-[apiInstance createPurchaseOrderAttachmentByFileNameWith:xeroTenantId
- purchaseOrderID:purchaseOrderID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const purchaseOrderID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.createPurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreatePurchaseOrderAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var purchaseOrderID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.CreatePurchaseOrderAttachmentByFileNameAsync(accessToken, xeroTenantId, purchaseOrderID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreatePurchaseOrderAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$purchaseOrderID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->createPurchaseOrderAttachmentByFileName($xeroTenantId, $purchaseOrderID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createPurchaseOrderAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $purchaseOrderID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Purchase Order
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->createPurchaseOrderAttachmentByFileName(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createPurchaseOrderAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createPurchaseOrderAttachmentByFileName
+ Creates attachment for a specific purchase order
+
+
+
+
+
+
+
+ /PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -31247,44 +13626,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createPurchaseOrderAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-purchase_order_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.create_purchase_order_attachment_by_file_name(xero_tenant_id, purchase_order_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_purchase_order_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PurchaseOrderID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PurchaseOrderID*
@@ -31310,7 +13670,7 @@ Parameters
- FileName*
+ FileName*
@@ -31333,15 +13693,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -31364,34 +13723,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createPurchaseOrderHistory
- Creates a history record for a specific purchase orders
-
-
-
-
-
-
-
- /PurchaseOrders/{PurchaseOrderID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID purchaseOrderID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- HistoryRecord historyRecord = new HistoryRecord();
- historyRecord.setDetails("Hello World");
-
- HistoryRecords historyRecords = new HistoryRecords();
- historyRecords.addHistoryRecordsItem(historyRecord);
-
- try {
- HistoryRecords result = apiInstance.createPurchaseOrderHistory(accessToken, xeroTenantId, purchaseOrderID, historyRecords);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createPurchaseOrderHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID purchaseOrderID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Purchase Order
- HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords |
- try {
- HistoryRecords result = apiInstance.createPurchaseOrderHistory(xeroTenantId, purchaseOrderID, historyRecords);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createPurchaseOrderHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *purchaseOrderID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Purchase Order (default to null)
-HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a history record for a specific purchase orders
-[apiInstance createPurchaseOrderHistoryWith:xeroTenantId
- purchaseOrderID:purchaseOrderID
- historyRecords:historyRecords
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const purchaseOrderID = '00000000-0000-0000-0000-000000000000';
-
-const historyRecord: HistoryRecord = {
- details: "Hello World" };
-
-const historyRecords: HistoryRecords = {
- historyRecords: [historyRecord] };
-
-try {
- const response = await xero.accountingApi.createPurchaseOrderHistory(xeroTenantId, purchaseOrderID, historyRecords);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreatePurchaseOrderHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var purchaseOrderID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var historyRecord = new HistoryRecord();
- historyRecord.Details = "Hello World";
-
- var historyRecords = new HistoryRecords();
- var historyRecordsList = new List<HistoryRecord>();
- historyRecordsList.Add(historyRecord);
- historyRecords._HistoryRecords = historyRecordsList;
-
- try {
- var result = await apiInstance.CreatePurchaseOrderHistoryAsync(accessToken, xeroTenantId, purchaseOrderID, historyRecords);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreatePurchaseOrderHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$purchaseOrderID = "00000000-0000-0000-0000-000000000000";
-
-$historyRecord = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecord;
-$historyRecord->setDetails('Hello World');
-
-$historyRecords = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecords;
-$arr_history_records = [];
-array_push($arr_history_records, $historyRecord);
-$historyRecords->setHistoryRecords($arr_history_records);
-
-try {
- $result = $apiInstance->createPurchaseOrderHistory($xeroTenantId, $purchaseOrderID, $historyRecords);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createPurchaseOrderHistory: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $purchaseOrderID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Purchase Order
-my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords |
-
-eval {
- my $result = $api_instance->createPurchaseOrderHistory(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID, historyRecords => $historyRecords);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createPurchaseOrderHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createPurchaseOrderHistory
+ Creates a history record for a specific purchase orders
+
+
+
+
+
+
+
+ /PurchaseOrders/{PurchaseOrderID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -31841,51 +13816,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createPurchaseOrderHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-purchase_order_id = '00000000-0000-0000-0000-000000000000'
-
-history_record = {
- details: "Hello World"
-}
-
-historyRecords = {
- history_records: [history_record]
-}
-
-begin
- response = xero_client.accounting_api.create_purchase_order_history(xero_tenant_id, purchase_order_id, historyRecords)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_purchase_order_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PurchaseOrderID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PurchaseOrderID*
@@ -31911,15 +13860,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -31942,34 +13890,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- historyRecords *
-
-
-
-
- HistoryRecords
-
-
-
-HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ historyRecords *
+
+
+
+
+ HistoryRecords
+
+
+ HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createPurchaseOrders
- Creates one or more purchase orders
-
-
-
-
-
-
-
- /PurchaseOrders
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/PurchaseOrders?summarizeErrors=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
- LocalDate dateValue = LocalDate.of(2020, Month.OCTOBER, 10);
-
- Contact contact = new Contact();
- contact.setContactID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- LineItem lineItem = new LineItem();
- lineItem.setDescription("Foobar");
- lineItem.setQuantity(1.0);
- lineItem.setUnitAmount(20.0);
- lineItem.setAccountCode("000");
-
- List<LineItem> lineItems = new ArrayList<LineItem>();
- lineItems.add(lineItem);
-
- PurchaseOrder purchaseOrder = new PurchaseOrder();
- purchaseOrder.setContact(contact);
- purchaseOrder.setLineItems(lineItems);
- purchaseOrder.setDate(dateValue);
-
- PurchaseOrders purchaseOrders = new PurchaseOrders();
- purchaseOrders.addPurchaseOrdersItem(purchaseOrder);
-
- try {
- PurchaseOrders result = apiInstance.createPurchaseOrders(accessToken, xeroTenantId, purchaseOrders, summarizeErrors);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createPurchaseOrders");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- PurchaseOrders purchaseOrders = { "PurchaseOrders": [ { "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "710" } ], "Date": "2019-03-13" } ] }; // PurchaseOrders |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- try {
- PurchaseOrders result = apiInstance.createPurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createPurchaseOrders");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-PurchaseOrders *purchaseOrders = { "PurchaseOrders": [ { "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "710" } ], "Date": "2019-03-13" } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates one or more purchase orders
-[apiInstance createPurchaseOrdersWith:xeroTenantId
- purchaseOrders:purchaseOrders
- summarizeErrors:summarizeErrors
- completionHandler: ^(PurchaseOrders output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-const dateValue = '2020-10-10'
-
-const contact: Contact = {
- contactID: "00000000-0000-0000-0000-000000000000" };
-
-const lineItem: LineItem = {
- description: "Foobar",
- quantity: 1.0,
- unitAmount: 20.0,
- accountCode: "000" };
-const lineItems = [];
-lineItems.push(lineItem)
-
-const purchaseOrder: PurchaseOrder = {
- contact: contact,
- lineItems: lineItems,
- date: dateValue };
-
-const purchaseOrders: PurchaseOrders = {
- purchaseOrders: [purchaseOrder] };
-
-try {
- const response = await xero.accountingApi.createPurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreatePurchaseOrdersExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
- var dateValue = DateTime.Now;
-
- var contact = new Contact();
- contact.ContactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var lineItem = new LineItem();
- lineItem.Description = "Foobar";
- lineItem.Quantity = new decimal(1.0);
- lineItem.UnitAmount = new decimal(20.0);
- lineItem.AccountCode = "000";
- var lineItems = new List<LineItem>();
- lineItems.Add(lineItem);
-
- var purchaseOrder = new PurchaseOrder();
- purchaseOrder.Contact = contact;
- purchaseOrder.LineItems = lineItems;
- purchaseOrder.Date = dateValue;
-
- var purchaseOrders = new PurchaseOrders();
- var purchaseOrdersList = new List<PurchaseOrder>();
- purchaseOrdersList.Add(purchaseOrder);
- purchaseOrders._PurchaseOrders = purchaseOrdersList;
-
- try {
- var result = await apiInstance.CreatePurchaseOrdersAsync(accessToken, xeroTenantId, purchaseOrders, summarizeErrors);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreatePurchaseOrders: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-$dateValue = new DateTime('2020-12-10');
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setContactID('00000000-0000-0000-0000-000000000000');
-
-$lineItem = new XeroAPI\XeroPHP\Models\Accounting\LineItem;
-$lineItem->setDescription('Foobar');
-$lineItem->setQuantity(1.0);
-$lineItem->setUnitAmount(20.0);
-$lineItem->setAccountCode('000');
-$lineItems = [];
-array_push($lineItems, $lineItem);
-
-$purchaseOrder = new XeroAPI\XeroPHP\Models\Accounting\PurchaseOrder;
-$purchaseOrder->setContact($contact);
-$purchaseOrder->setLineItems($lineItems);
-$purchaseOrder->setDate($dateValue);
-
-$purchaseOrders = new XeroAPI\XeroPHP\Models\Accounting\PurchaseOrders;
-$arr_purchase_orders = [];
-array_push($arr_purchase_orders, $purchaseOrder);
-$purchaseOrders->setPurchaseOrders($arr_purchase_orders);
-
-try {
- $result = $apiInstance->createPurchaseOrders($xeroTenantId, $purchaseOrders, $summarizeErrors);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createPurchaseOrders: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $purchaseOrders = ::Object::PurchaseOrders->new(); # PurchaseOrders |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-
-eval {
- my $result = $api_instance->createPurchaseOrders(xeroTenantId => $xeroTenantId, purchaseOrders => $purchaseOrders, summarizeErrors => $summarizeErrors);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createPurchaseOrders: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createPurchaseOrders
+ Creates one or more purchase orders
+
+
+
+
+
+
+
+ /PurchaseOrders
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -32490,68 +13998,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createPurchaseOrders: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-date_value = 'YYYY-MM-DD'
-
-contact = {
- contact_id: "00000000-0000-0000-0000-000000000000"
-}
-
-line_item = {
- description: "Foobar",
- quantity: 1.0,
- unit_amount: 20.0,
- account_code: "000"
-}
-line_items = []
-line_items << line_item
-
-purchase_order = {
- contact: contact,
- line_items: line_items,
- date: date_value
-}
-
-purchaseOrders = {
- purchase_orders: [purchase_order]
-}
-
-begin
- response = xero_client.accounting_api.create_purchase_orders(xero_tenant_id, purchaseOrders, summarize_errors)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_purchase_orders: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -32574,34 +14039,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- purchaseOrders *
-
-
-
-
- PurchaseOrders
-
-
-
-PurchaseOrders with an array of PurchaseOrder object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ purchaseOrders *
+
+
+
+
+ PurchaseOrders
+
+
+ PurchaseOrders with an array of PurchaseOrder object in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -32662,392 +14103,34 @@ Parameters
-
-
-
-
-
-
-
-
- createQuoteAttachmentByFileName
- Creates attachment for a specific quote
-
-
-
-
-
-
-
- /Quotes/{QuoteID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID quoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.createQuoteAttachmentByFileName(accessToken, xeroTenantId, quoteID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createQuoteAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID quoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Quote
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.createQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createQuoteAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *quoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Quote (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates attachment for a specific quote
-[apiInstance createQuoteAttachmentByFileNameWith:xeroTenantId
- quoteID:quoteID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const quoteID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.createQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateQuoteAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var quoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.CreateQuoteAttachmentByFileNameAsync(accessToken, xeroTenantId, quoteID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateQuoteAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$quoteID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->createQuoteAttachmentByFileName($xeroTenantId, $quoteID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createQuoteAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $quoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Quote
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->createQuoteAttachmentByFileName(xeroTenantId => $xeroTenantId, quoteID => $quoteID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createQuoteAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ createQuoteAttachmentByFileName
+ Creates attachment for a specific quote
+
+
+
+
+
+
+
+ /Quotes/{QuoteID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -33075,44 +14158,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createQuoteAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-quote_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.create_quote_attachment_by_file_name(xero_tenant_id, quote_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_quote_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- QuoteID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ QuoteID*
@@ -33138,7 +14202,7 @@ Parameters
- FileName*
+ FileName*
@@ -33161,15 +14225,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -33192,455 +14255,71 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createQuoteHistory
- Creates a history record for a specific quote
-
-
-
-
-
-
-
- /Quotes/{QuoteID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID quoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- HistoryRecord historyRecord = new HistoryRecord();
- historyRecord.setDetails("Hello World");
-
- HistoryRecords historyRecords = new HistoryRecords();
- historyRecords.addHistoryRecordsItem(historyRecord);
-
- try {
- HistoryRecords result = apiInstance.createQuoteHistory(accessToken, xeroTenantId, quoteID, historyRecords);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createQuoteHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID quoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Quote
- HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords |
- try {
- HistoryRecords result = apiInstance.createQuoteHistory(xeroTenantId, quoteID, historyRecords);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createQuoteHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *quoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Quote (default to null)
-HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a history record for a specific quote
-[apiInstance createQuoteHistoryWith:xeroTenantId
- quoteID:quoteID
- historyRecords:historyRecords
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const quoteID = '00000000-0000-0000-0000-000000000000';
-
-const historyRecord: HistoryRecord = {
- details: "Hello World" };
-
-const historyRecords: HistoryRecords = {
- historyRecords: [historyRecord] };
-
-try {
- const response = await xero.accountingApi.createQuoteHistory(xeroTenantId, quoteID, historyRecords);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateQuoteHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var quoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var historyRecord = new HistoryRecord();
- historyRecord.Details = "Hello World";
-
- var historyRecords = new HistoryRecords();
- var historyRecordsList = new List<HistoryRecord>();
- historyRecordsList.Add(historyRecord);
- historyRecords._HistoryRecords = historyRecordsList;
-
- try {
- var result = await apiInstance.CreateQuoteHistoryAsync(accessToken, xeroTenantId, quoteID, historyRecords);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateQuoteHistory: " + e.Message );
- }
- }
+
+
+ Required
+
+
+
+
+
+
+
+
+
+
+ createQuoteHistory
+ Creates a history record for a specific quote
+
+
+
+
+
+
+
+ /Quotes/{QuoteID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -33669,51 +14348,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createQuoteHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-quote_id = '00000000-0000-0000-0000-000000000000'
-
-history_record = {
- details: "Hello World"
-}
-
-historyRecords = {
- history_records: [history_record]
-}
-
-begin
- response = xero_client.accounting_api.create_quote_history(xero_tenant_id, quote_id, historyRecords)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_quote_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- QuoteID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ QuoteID*
@@ -33739,15 +14392,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -33770,34 +14422,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- historyRecords *
-
-
-
-
- HistoryRecords
-
-
-
-HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ historyRecords *
+
+
+
+
+ HistoryRecords
+
+
+ HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createQuotes
- Create one or more quotes
-
-
-
-
-
-
-
- /Quotes
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Quotes?summarizeErrors=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
- LocalDate dateValue = LocalDate.of(2020, Month.OCTOBER, 10);
-
- Contact contact = new Contact();
- contact.setContactID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- LineItem lineItem = new LineItem();
- lineItem.setDescription("Foobar");
- lineItem.setQuantity(1.0);
- lineItem.setUnitAmount(20.0);
- lineItem.setAccountCode("000");
-
- List<LineItem> lineItems = new ArrayList<LineItem>();
- lineItems.add(lineItem);
-
- Quote quote = new Quote();
- quote.setContact(contact);
- quote.setLineItems(lineItems);
- quote.setDate(dateValue);
-
- Quotes quotes = new Quotes();
- quotes.addQuotesItem(quote);
-
- try {
- Quotes result = apiInstance.createQuotes(accessToken, xeroTenantId, quotes, summarizeErrors);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createQuotes");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Quotes quotes = { "Quotes": [ { "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "12775" } ], "Date": "2020-02-01" } ] }; // Quotes |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- try {
- Quotes result = apiInstance.createQuotes(xeroTenantId, quotes, summarizeErrors);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createQuotes");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Quotes *quotes = { "Quotes": [ { "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "12775" } ], "Date": "2020-02-01" } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Create one or more quotes
-[apiInstance createQuotesWith:xeroTenantId
- quotes:quotes
- summarizeErrors:summarizeErrors
- completionHandler: ^(Quotes output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-const dateValue = '2020-10-10'
-
-const contact: Contact = {
- contactID: "00000000-0000-0000-0000-000000000000" };
-
-const lineItem: LineItem = {
- description: "Foobar",
- quantity: 1.0,
- unitAmount: 20.0,
- accountCode: "000" };
-const lineItems = [];
-lineItems.push(lineItem)
-
-const quote: Quote = {
- contact: contact,
- lineItems: lineItems,
- date: dateValue };
-
-const quotes: Quotes = {
- quotes: [quote] };
-
-try {
- const response = await xero.accountingApi.createQuotes(xeroTenantId, quotes, summarizeErrors);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateQuotesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
- var dateValue = DateTime.Now;
-
- var contact = new Contact();
- contact.ContactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var lineItem = new LineItem();
- lineItem.Description = "Foobar";
- lineItem.Quantity = new decimal(1.0);
- lineItem.UnitAmount = new decimal(20.0);
- lineItem.AccountCode = "000";
- var lineItems = new List<LineItem>();
- lineItems.Add(lineItem);
-
- var quote = new Quote();
- quote.Contact = contact;
- quote.LineItems = lineItems;
- quote.Date = dateValue;
-
- var quotes = new Quotes();
- var quotesList = new List<Quote>();
- quotesList.Add(quote);
- quotes._Quotes = quotesList;
-
- try {
- var result = await apiInstance.CreateQuotesAsync(accessToken, xeroTenantId, quotes, summarizeErrors);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateQuotes: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-$dateValue = new DateTime('2020-12-10');
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setContactID('00000000-0000-0000-0000-000000000000');
-
-$lineItem = new XeroAPI\XeroPHP\Models\Accounting\LineItem;
-$lineItem->setDescription('Foobar');
-$lineItem->setQuantity(1.0);
-$lineItem->setUnitAmount(20.0);
-$lineItem->setAccountCode('000');
-$lineItems = [];
-array_push($lineItems, $lineItem);
-
-$quote = new XeroAPI\XeroPHP\Models\Accounting\Quote;
-$quote->setContact($contact);
-$quote->setLineItems($lineItems);
-$quote->setDate($dateValue);
-
-$quotes = new XeroAPI\XeroPHP\Models\Accounting\Quotes;
-$arr_quotes = [];
-array_push($arr_quotes, $quote);
-$quotes->setQuotes($arr_quotes);
-
-try {
- $result = $apiInstance->createQuotes($xeroTenantId, $quotes, $summarizeErrors);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createQuotes: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $quotes = ::Object::Quotes->new(); # Quotes |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-
-eval {
- my $result = $api_instance->createQuotes(xeroTenantId => $xeroTenantId, quotes => $quotes, summarizeErrors => $summarizeErrors);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createQuotes: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createQuotes
+ Create one or more quotes
+
+
+
+
+
+
+
+ /Quotes
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -34318,68 +14530,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createQuotes: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-date_value = 'YYYY-MM-DD'
-
-contact = {
- contact_id: "00000000-0000-0000-0000-000000000000"
-}
-
-line_item = {
- description: "Foobar",
- quantity: 1.0,
- unit_amount: 20.0,
- account_code: "000"
-}
-line_items = []
-line_items << line_item
-
-quote = {
- contact: contact,
- line_items: line_items,
- date: date_value
-}
-
-quotes = {
- quotes: [quote]
-}
-
-begin
- response = xero_client.accounting_api.create_quotes(xero_tenant_id, quotes, summarize_errors)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_quotes: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -34402,34 +14571,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- quotes *
-
-
-
-
- Quotes
-
-
-
-Quotes with an array of Quote object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ quotes *
+
+
+
+
+ Quotes
+
+
+ Quotes with an array of Quote object in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -34490,466 +14635,34 @@ Parameters
-
-
-
-
-
-
-
-
- createReceipt
- Creates draft expense claim receipts for any user
-
-
-
-
-
-
-
- /Receipts
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Receipts?unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Integer unitdp = 4;
-
- Contact contact = new Contact();
- contact.setContactID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- User user = new User();
- user.setUserID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- LineItem lineItem = new LineItem();
- lineItem.setDescription("Foobar");
- lineItem.setQuantity(1.0);
- lineItem.setUnitAmount(20.0);
- lineItem.setAccountCode("000");
-
- List<LineItem> lineItems = new ArrayList<LineItem>();
- lineItems.add(lineItem);
-
- Receipt receipt = new Receipt();
- receipt.setContact(contact);
- receipt.setUser(user);
- receipt.setLineItems(lineItems);
- receipt.setLineAmountTypes(com.xero.models.accounting.LineAmountTypes.INCLUSIVE);
- receipt.setStatus(com.xero.models.accounting.Receipt.StatusEnum.DRAFT);
-
- Receipts receipts = new Receipts();
- receipts.addReceiptsItem(receipt);
-
- try {
- Receipts result = apiInstance.createReceipt(accessToken, xeroTenantId, receipts, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createReceipt");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Receipts receipts = { "Receipts": [ { "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "Lineitems": [ { "Description": "Foobar", "Quantity": 2, "UnitAmount": 20, "AccountCode": "400", "TaxType": "NONE", "LineAmount": 40 } ], "User": { "UserID": "00000000-0000-0000-0000-000000000000" }, "LineAmountTypes": "NoTax", "Status": "DRAFT" } ] }; // Receipts |
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- Receipts result = apiInstance.createReceipt(xeroTenantId, receipts, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createReceipt");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Receipts *receipts = { "Receipts": [ { "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "Lineitems": [ { "Description": "Foobar", "Quantity": 2, "UnitAmount": 20, "AccountCode": "400", "TaxType": "NONE", "LineAmount": 40 } ], "User": { "UserID": "00000000-0000-0000-0000-000000000000" }, "LineAmountTypes": "NoTax", "Status": "DRAFT" } ] }; //
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates draft expense claim receipts for any user
-[apiInstance createReceiptWith:xeroTenantId
- receipts:receipts
- unitdp:unitdp
- completionHandler: ^(Receipts output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const unitdp = 4;
-
-const contact: Contact = {
- contactID: "00000000-0000-0000-0000-000000000000" };
-
-const user: User = {
- userID: "00000000-0000-0000-0000-000000000000" };
-
-const lineItem: LineItem = {
- description: "Foobar",
- quantity: 1.0,
- unitAmount: 20.0,
- accountCode: "000" };
-const lineItems = [];
-lineItems.push(lineItem)
-
-const receipt: Receipt = {
- contact: contact,
- user: user,
- lineItems: lineItems,
- lineAmountTypes: LineAmountTypes.Inclusive,
- status: Receipt.StatusEnum.DRAFT };
-
-const receipts: Receipts = {
- receipts: [receipt] };
-
-try {
- const response = await xero.accountingApi.createReceipt(xeroTenantId, receipts, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateReceiptExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var unitdp = 4;
-
- var contact = new Contact();
- contact.ContactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var user = new User();
- user.UserID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var lineItem = new LineItem();
- lineItem.Description = "Foobar";
- lineItem.Quantity = new decimal(1.0);
- lineItem.UnitAmount = new decimal(20.0);
- lineItem.AccountCode = "000";
- var lineItems = new List<LineItem>();
- lineItems.Add(lineItem);
-
- var receipt = new Receipt();
- receipt.Contact = contact;
- receipt.User = user;
- receipt.LineItems = lineItems;
- receipt.LineAmountTypes = LineAmountTypes.Exclusive;
- receipt.Status = Receipt.StatusEnum.DRAFT;
-
- var receipts = new Receipts();
- var receiptsList = new List<Receipt>();
- receiptsList.Add(receipt);
- receipts._Receipts = receiptsList;
-
- try {
- var result = await apiInstance.CreateReceiptAsync(accessToken, xeroTenantId, receipts, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateReceipt: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$unitdp = 4;
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setContactID('00000000-0000-0000-0000-000000000000');
-
-$user = new XeroAPI\XeroPHP\Models\Accounting\User;
-$user->setUserID('00000000-0000-0000-0000-000000000000');
-
-$lineItem = new XeroAPI\XeroPHP\Models\Accounting\LineItem;
-$lineItem->setDescription('Foobar');
-$lineItem->setQuantity(1.0);
-$lineItem->setUnitAmount(20.0);
-$lineItem->setAccountCode('000');
-$lineItems = [];
-array_push($lineItems, $lineItem);
-
-$receipt = new XeroAPI\XeroPHP\Models\Accounting\Receipt;
-$receipt->setContact($contact);
-$receipt->setUser($user);
-$receipt->setLineItems($lineItems);
-$receipt->setLineAmountTypes(XeroAPI\XeroPHP\Models\Accounting\LineAmountTypes::INCLUSIVE);
-$receipt->setStatus(XeroAPI\XeroPHP\Models\Accounting\Receipt::STATUS_DRAFT);
-
-$receipts = new XeroAPI\XeroPHP\Models\Accounting\Receipts;
-$arr_receipts = [];
-array_push($arr_receipts, $receipt);
-$receipts->setReceipts($arr_receipts);
-
-try {
- $result = $apiInstance->createReceipt($xeroTenantId, $receipts, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createReceipt: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $receipts = ::Object::Receipts->new(); # Receipts |
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->createReceipt(xeroTenantId => $xeroTenantId, receipts => $receipts, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createReceipt: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ createReceipt
+ Creates draft expense claim receipts for any user
+
+
+
+
+
+
+
+ /Receipts
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -34996,73 +14709,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createReceipt: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-unitdp = 4
-
-contact = {
- contact_id: "00000000-0000-0000-0000-000000000000"
-}
-
-user = {
- user_id: "00000000-0000-0000-0000-000000000000"
-}
-
-line_item = {
- description: "Foobar",
- quantity: 1.0,
- unit_amount: 20.0,
- account_code: "000"
-}
-line_items = []
-line_items << line_item
-
-receipt = {
- contact: contact,
- user: user,
- line_items: line_items,
- line_amount_types: XeroRuby::Accounting::INCLUSIVE,
- status: XeroRuby::Accounting::Receipt::DRAFT
-}
-
-receipts = {
- receipts: [receipt]
-}
-
-begin
- response = xero_client.accounting_api.create_receipt(xero_tenant_id, receipts, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_receipt: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -35085,34 +14750,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- receipts *
-
-
-
-
- Receipts
-
-
-
-Receipts with an array of Receipt object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ receipts *
+
+
+
+
+ Receipts
+
+
+ Receipts with an array of Receipt object in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- unitdp
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ unitdp
@@ -35173,392 +14814,34 @@ Parameters
-
-
-
-
-
-
-
-
- createReceiptAttachmentByFileName
- Creates an attachment on a specific expense claim receipts by file name
-
-
-
-
-
-
-
- /Receipts/{ReceiptID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Receipts/{ReceiptID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID receiptID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.createReceiptAttachmentByFileName(accessToken, xeroTenantId, receiptID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createReceiptAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID receiptID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Receipt
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.createReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createReceiptAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *receiptID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Receipt (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates an attachment on a specific expense claim receipts by file name
-[apiInstance createReceiptAttachmentByFileNameWith:xeroTenantId
- receiptID:receiptID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const receiptID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.createReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateReceiptAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var receiptID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.CreateReceiptAttachmentByFileNameAsync(accessToken, xeroTenantId, receiptID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateReceiptAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$receiptID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->createReceiptAttachmentByFileName($xeroTenantId, $receiptID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createReceiptAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $receiptID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Receipt
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->createReceiptAttachmentByFileName(xeroTenantId => $xeroTenantId, receiptID => $receiptID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createReceiptAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ createReceiptAttachmentByFileName
+ Creates an attachment on a specific expense claim receipts by file name
+
+
+
+
+
+
+
+ /Receipts/{ReceiptID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -35586,44 +14869,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createReceiptAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-receipt_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.create_receipt_attachment_by_file_name(xero_tenant_id, receipt_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_receipt_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ReceiptID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ReceiptID*
@@ -35649,7 +14913,7 @@ Parameters
- FileName*
+ FileName*
@@ -35672,15 +14936,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -35703,34 +14966,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createReceiptHistory
- Creates a history record for a specific receipt
-
-
-
-
-
-
-
- /Receipts/{ReceiptID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Receipts/{ReceiptID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID receiptID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- HistoryRecord historyRecord = new HistoryRecord();
- historyRecord.setDetails("Hello World");
-
- HistoryRecords historyRecords = new HistoryRecords();
- historyRecords.addHistoryRecordsItem(historyRecord);
-
- try {
- HistoryRecords result = apiInstance.createReceiptHistory(accessToken, xeroTenantId, receiptID, historyRecords);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createReceiptHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID receiptID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Receipt
- HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords |
- try {
- HistoryRecords result = apiInstance.createReceiptHistory(xeroTenantId, receiptID, historyRecords);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createReceiptHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *receiptID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Receipt (default to null)
-HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a history record for a specific receipt
-[apiInstance createReceiptHistoryWith:xeroTenantId
- receiptID:receiptID
- historyRecords:historyRecords
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const receiptID = '00000000-0000-0000-0000-000000000000';
-
-const historyRecord: HistoryRecord = {
- details: "Hello World" };
-
-const historyRecords: HistoryRecords = {
- historyRecords: [historyRecord] };
-
-try {
- const response = await xero.accountingApi.createReceiptHistory(xeroTenantId, receiptID, historyRecords);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateReceiptHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var receiptID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var historyRecord = new HistoryRecord();
- historyRecord.Details = "Hello World";
-
- var historyRecords = new HistoryRecords();
- var historyRecordsList = new List<HistoryRecord>();
- historyRecordsList.Add(historyRecord);
- historyRecords._HistoryRecords = historyRecordsList;
-
- try {
- var result = await apiInstance.CreateReceiptHistoryAsync(accessToken, xeroTenantId, receiptID, historyRecords);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateReceiptHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$receiptID = "00000000-0000-0000-0000-000000000000";
-
-$historyRecord = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecord;
-$historyRecord->setDetails('Hello World');
-
-$historyRecords = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecords;
-$arr_history_records = [];
-array_push($arr_history_records, $historyRecord);
-$historyRecords->setHistoryRecords($arr_history_records);
-
-try {
- $result = $apiInstance->createReceiptHistory($xeroTenantId, $receiptID, $historyRecords);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createReceiptHistory: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $receiptID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Receipt
-my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords |
-
-eval {
- my $result = $api_instance->createReceiptHistory(xeroTenantId => $xeroTenantId, receiptID => $receiptID, historyRecords => $historyRecords);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createReceiptHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createReceiptHistory
+ Creates a history record for a specific receipt
+
+
+
+
+
+
+
+ /Receipts/{ReceiptID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -36180,51 +15059,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createReceiptHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-receipt_id = '00000000-0000-0000-0000-000000000000'
-
-history_record = {
- details: "Hello World"
-}
-
-historyRecords = {
- history_records: [history_record]
-}
-
-begin
- response = xero_client.accounting_api.create_receipt_history(xero_tenant_id, receipt_id, historyRecords)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_receipt_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ReceiptID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ReceiptID*
@@ -36250,15 +15103,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -36281,34 +15133,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- historyRecords *
-
-
-
-
- HistoryRecords
-
-
-
-HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ historyRecords *
+
+
+
+
+ HistoryRecords
+
+
+ HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createRepeatingInvoiceAttachmentByFileName
- Creates an attachment from a specific repeating invoices by file name
-
-
-
-
-
-
-
- /RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID repeatingInvoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.createRepeatingInvoiceAttachmentByFileName(accessToken, xeroTenantId, repeatingInvoiceID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createRepeatingInvoiceAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Repeating Invoice
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.createRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createRepeatingInvoiceAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Repeating Invoice (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates an attachment from a specific repeating invoices by file name
-[apiInstance createRepeatingInvoiceAttachmentByFileNameWith:xeroTenantId
- repeatingInvoiceID:repeatingInvoiceID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const repeatingInvoiceID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.createRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateRepeatingInvoiceAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var repeatingInvoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.CreateRepeatingInvoiceAttachmentByFileNameAsync(accessToken, xeroTenantId, repeatingInvoiceID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateRepeatingInvoiceAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$repeatingInvoiceID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->createRepeatingInvoiceAttachmentByFileName($xeroTenantId, $repeatingInvoiceID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createRepeatingInvoiceAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Repeating Invoice
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->createRepeatingInvoiceAttachmentByFileName(xeroTenantId => $xeroTenantId, repeatingInvoiceID => $repeatingInvoiceID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createRepeatingInvoiceAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createRepeatingInvoiceAttachmentByFileName
+ Creates an attachment from a specific repeating invoices by file name
+
+
+
+
+
+
+
+ /RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -36756,44 +15225,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createRepeatingInvoiceAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-repeating_invoice_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.create_repeating_invoice_attachment_by_file_name(xero_tenant_id, repeating_invoice_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_repeating_invoice_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- RepeatingInvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ RepeatingInvoiceID*
@@ -36819,7 +15269,7 @@ Parameters
- FileName*
+ FileName*
@@ -36842,15 +15292,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -36873,34 +15322,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createRepeatingInvoiceHistory
- Creates a history record for a specific repeating invoice
-
-
-
-
-
-
-
- /RepeatingInvoices/{RepeatingInvoiceID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/RepeatingInvoices/{RepeatingInvoiceID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID repeatingInvoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- HistoryRecord historyRecord = new HistoryRecord();
- historyRecord.setDetails("Hello World");
-
- HistoryRecords historyRecords = new HistoryRecords();
- historyRecords.addHistoryRecordsItem(historyRecord);
-
- try {
- HistoryRecords result = apiInstance.createRepeatingInvoiceHistory(accessToken, xeroTenantId, repeatingInvoiceID, historyRecords);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createRepeatingInvoiceHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Repeating Invoice
- HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords |
- try {
- HistoryRecords result = apiInstance.createRepeatingInvoiceHistory(xeroTenantId, repeatingInvoiceID, historyRecords);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createRepeatingInvoiceHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Repeating Invoice (default to null)
-HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a history record for a specific repeating invoice
-[apiInstance createRepeatingInvoiceHistoryWith:xeroTenantId
- repeatingInvoiceID:repeatingInvoiceID
- historyRecords:historyRecords
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const repeatingInvoiceID = '00000000-0000-0000-0000-000000000000';
-
-const historyRecord: HistoryRecord = {
- details: "Hello World" };
-
-const historyRecords: HistoryRecords = {
- historyRecords: [historyRecord] };
-
-try {
- const response = await xero.accountingApi.createRepeatingInvoiceHistory(xeroTenantId, repeatingInvoiceID, historyRecords);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateRepeatingInvoiceHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var repeatingInvoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var historyRecord = new HistoryRecord();
- historyRecord.Details = "Hello World";
-
- var historyRecords = new HistoryRecords();
- var historyRecordsList = new List<HistoryRecord>();
- historyRecordsList.Add(historyRecord);
- historyRecords._HistoryRecords = historyRecordsList;
-
- try {
- var result = await apiInstance.CreateRepeatingInvoiceHistoryAsync(accessToken, xeroTenantId, repeatingInvoiceID, historyRecords);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateRepeatingInvoiceHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$repeatingInvoiceID = "00000000-0000-0000-0000-000000000000";
-
-$historyRecord = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecord;
-$historyRecord->setDetails('Hello World');
-
-$historyRecords = new XeroAPI\XeroPHP\Models\Accounting\HistoryRecords;
-$arr_history_records = [];
-array_push($arr_history_records, $historyRecord);
-$historyRecords->setHistoryRecords($arr_history_records);
-
-try {
- $result = $apiInstance->createRepeatingInvoiceHistory($xeroTenantId, $repeatingInvoiceID, $historyRecords);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createRepeatingInvoiceHistory: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Repeating Invoice
-my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords |
-
-eval {
- my $result = $api_instance->createRepeatingInvoiceHistory(xeroTenantId => $xeroTenantId, repeatingInvoiceID => $repeatingInvoiceID, historyRecords => $historyRecords);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createRepeatingInvoiceHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createRepeatingInvoiceHistory
+ Creates a history record for a specific repeating invoice
+
+
+
+
+
+
+
+ /RepeatingInvoices/{RepeatingInvoiceID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -37350,51 +15415,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createRepeatingInvoiceHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-repeating_invoice_id = '00000000-0000-0000-0000-000000000000'
-
-history_record = {
- details: "Hello World"
-}
-
-historyRecords = {
- history_records: [history_record]
-}
-
-begin
- response = xero_client.accounting_api.create_repeating_invoice_history(xero_tenant_id, repeating_invoice_id, historyRecords)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_repeating_invoice_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- RepeatingInvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ RepeatingInvoiceID*
@@ -37420,15 +15459,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -37451,34 +15489,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- historyRecords *
-
-
-
-
- HistoryRecords
-
-
-
-HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ historyRecords *
+
+
+
+
+ HistoryRecords
+
+
+ HistoryRecords containing an array of HistoryRecord objects in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createTaxRates
- Creates one or more tax rates
-
-
-
-
-
-
-
- /TaxRates
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/TaxRates"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- TaxComponent taxComponent = new TaxComponent();
- taxComponent.setName("State Tax");
- taxComponent.setRate(2.25);
-
- List<TaxComponent> taxComponent = new ArrayList<TaxComponent>();
- taxComponents.add(taxComponent);
-
- TaxRate taxRate = new TaxRate();
- taxRate.setName("CA State Tax");
- taxRate.setTaxComponents(taxComponents);
-
- TaxRates taxRates = new TaxRates();
- taxRates.addTaxRatesItem(taxRate);
-
- try {
- TaxRates result = apiInstance.createTaxRates(accessToken, xeroTenantId, taxRates);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createTaxRates");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- TaxRates taxRates = { "TaxRates": [ { "Name": "CA State Tax", "TaxComponents": [ { "Name": "State Tax", "Rate": 2.25 } ] } ] }; // TaxRates |
- try {
- TaxRates result = apiInstance.createTaxRates(xeroTenantId, taxRates);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createTaxRates");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-TaxRates *taxRates = { "TaxRates": [ { "Name": "CA State Tax", "TaxComponents": [ { "Name": "State Tax", "Rate": 2.25 } ] } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates one or more tax rates
-[apiInstance createTaxRatesWith:xeroTenantId
- taxRates:taxRates
- completionHandler: ^(TaxRates output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
-const taxComponent: TaxComponent = {
- name: "State Tax",
- rate: 2.25 };
-const taxComponent = [];
-taxComponents.push(taxComponent)
-
-const taxRate: TaxRate = {
- name: "CA State Tax",
- taxComponents: taxComponents,
-
-const taxRates: TaxRates = {
- taxRates: [taxRate] };
-
-try {
- const response = await xero.accountingApi.createTaxRates(xeroTenantId, taxRates);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateTaxRatesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
-
- var taxComponent = new TaxComponent();
- taxComponent.Name = "State Tax";
- taxComponent.Rate = new decimal(2.25);
- var taxComponent = new List<TaxComponent>();
- taxComponents.Add(taxComponent);
-
- var taxRate = new TaxRate();
- taxRate.Name = "CA State Tax";
- taxRate.TaxComponents = taxComponents;
-
- var taxRates = new TaxRates();
- var taxRatesList = new List<TaxRate>();
- taxRatesList.Add(taxRate);
- taxRates._TaxRates = taxRatesList;
-
- try {
- var result = await apiInstance.CreateTaxRatesAsync(accessToken, xeroTenantId, taxRates);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateTaxRates: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-
-$taxComponent = new XeroAPI\XeroPHP\Models\Accounting\TaxComponent;
-$taxComponent->setName('State Tax');
-$taxComponent->setRate(2.25);
-$taxComponent = [];
-array_push($taxComponents, $taxComponent);
-
-$taxRate = new XeroAPI\XeroPHP\Models\Accounting\TaxRate;
-$taxRate->setName('CA State Tax');
-$taxRate->setTaxComponents($taxComponents);
-
-$taxRates = new XeroAPI\XeroPHP\Models\Accounting\TaxRates;
-$arr_tax_rates = [];
-array_push($arr_tax_rates, $taxRate);
-$taxRates->setTaxRates($arr_tax_rates);
-
-try {
- $result = $apiInstance->createTaxRates($xeroTenantId, $taxRates);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createTaxRates: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $taxRates = ::Object::TaxRates->new(); # TaxRates |
-
-eval {
- my $result = $api_instance->createTaxRates(xeroTenantId => $xeroTenantId, taxRates => $taxRates);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createTaxRates: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createTaxRates
+ Creates one or more tax rates
+
+
+
+
+
+
+
+ /TaxRates
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -37955,58 +15589,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createTaxRates: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-
-tax_component = {
- name: "State Tax",
- rate: 2.25
-}
-taxComponent = []
-tax_components << tax_component
-
-tax_rate = {
- name: "CA State Tax",
- taxComponents: taxComponents,
-
-taxRates = {
- tax_rates: [tax_rate]
-}
-
-begin
- response = xero_client.accounting_api.create_tax_rates(xero_tenant_id, taxRates)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_tax_rates: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -38029,34 +15630,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- taxRates *
-
-
-
-
- TaxRates
-
-
-
-TaxRates array with TaxRate object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ taxRates *
+
+
+
+
+ TaxRates
+
+
+ TaxRates array with TaxRate object in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createTrackingCategory
- Create tracking categories
-
-
-
-
-
-
-
- /TrackingCategories
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/TrackingCategories"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- TrackingCategory trackingCategory = new TrackingCategory();
- trackingCategory.setName("Foobar");
-
- try {
- TrackingCategories result = apiInstance.createTrackingCategory(accessToken, xeroTenantId, trackingCategory);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createTrackingCategory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- TrackingCategory trackingCategory = { name: "FooBar" }; // TrackingCategory |
- try {
- TrackingCategories result = apiInstance.createTrackingCategory(xeroTenantId, trackingCategory);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createTrackingCategory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-TrackingCategory *trackingCategory = { name: "FooBar" }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Create tracking categories
-[apiInstance createTrackingCategoryWith:xeroTenantId
- trackingCategory:trackingCategory
- completionHandler: ^(TrackingCategories output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
-const trackingCategory: TrackingCategory = {
- name: "Foobar" };
-
-try {
- const response = await xero.accountingApi.createTrackingCategory(xeroTenantId, trackingCategory);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateTrackingCategoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
-
- var trackingCategory = new TrackingCategory();
- trackingCategory.Name = "Foobar";
-
- try {
- var result = await apiInstance.CreateTrackingCategoryAsync(accessToken, xeroTenantId, trackingCategory);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateTrackingCategory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-
-$trackingCategory = new XeroAPI\XeroPHP\Models\Accounting\TrackingCategory;
-$trackingCategory->setName('Foobar');
-
-try {
- $result = $apiInstance->createTrackingCategory($xeroTenantId, $trackingCategory);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createTrackingCategory: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $trackingCategory = ::Object::TrackingCategory->new(); # TrackingCategory |
-
-eval {
- my $result = $api_instance->createTrackingCategory(xeroTenantId => $xeroTenantId, trackingCategory => $trackingCategory);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createTrackingCategory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createTrackingCategory
+ Create tracking categories
+
+
+
+
+
+
+
+ /TrackingCategories
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -38474,50 +15716,28 @@ Usage and SDK Samples
try:
api_response = api_instance.create_tracking_category(xero_tenant_id, trackingCategory)
- print(api_response)
- except AccountingBadRequestException as e:
- print("Exception when calling AccountingApi->createTrackingCategory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-
-trackingCategory = {
- name: "Foobar"
-}
-
-begin
- response = xero_client.accounting_api.create_tracking_category(xero_tenant_id, trackingCategory)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_tracking_category: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+ print(api_response)
+ except AccountingBadRequestException as e:
+ print("Exception when calling AccountingApi->createTrackingCategory: %s\n" % e)
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -38540,34 +15760,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- trackingCategory *
-
-
-
-
- TrackingCategory
-
-
-
-TrackingCategory object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ trackingCategory *
+
+
+
+
+ TrackingCategory
+
+
+ TrackingCategory object in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- createTrackingOptions
- Creates options for a specific tracking category
-
-
-
-
-
-
-
- /TrackingCategories/{TrackingCategoryID}/Options
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/TrackingCategories/{TrackingCategoryID}/Options"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID trackingCategoryID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- TrackingOption trackingOption = new TrackingOption();
- trackingOption.setName("Foobar");
-
- try {
- TrackingOptions result = apiInstance.createTrackingOptions(accessToken, xeroTenantId, trackingCategoryID, trackingOption);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#createTrackingOptions");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID trackingCategoryID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a TrackingCategory
- TrackingOption trackingOption = { name: " Bar" }; // TrackingOption |
- try {
- TrackingOptions result = apiInstance.createTrackingOptions(xeroTenantId, trackingCategoryID, trackingOption);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#createTrackingOptions");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *trackingCategoryID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a TrackingCategory (default to null)
-TrackingOption *trackingOption = { name: " Bar" }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates options for a specific tracking category
-[apiInstance createTrackingOptionsWith:xeroTenantId
- trackingCategoryID:trackingCategoryID
- trackingOption:trackingOption
- completionHandler: ^(TrackingOptions output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const trackingCategoryID = '00000000-0000-0000-0000-000000000000';
-
-const trackingOption: TrackingOption = {
- name: "Foobar" };
-
-try {
- const response = await xero.accountingApi.createTrackingOptions(xeroTenantId, trackingCategoryID, trackingOption);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class CreateTrackingOptionsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var trackingCategoryID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var trackingOption = new TrackingOption();
- trackingOption.Name = "Foobar";
-
- try {
- var result = await apiInstance.CreateTrackingOptionsAsync(accessToken, xeroTenantId, trackingCategoryID, trackingOption);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.CreateTrackingOptions: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$trackingCategoryID = "00000000-0000-0000-0000-000000000000";
-
-$trackingOption = new XeroAPI\XeroPHP\Models\Accounting\TrackingOption;
-$trackingOption->setName('Foobar');
-
-try {
- $result = $apiInstance->createTrackingOptions($xeroTenantId, $trackingCategoryID, $trackingOption);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->createTrackingOptions: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $trackingCategoryID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a TrackingCategory
-my $trackingOption = ::Object::TrackingOption->new(); # TrackingOption |
-
-eval {
- my $result = $api_instance->createTrackingOptions(xeroTenantId => $xeroTenantId, trackingCategoryID => $trackingCategoryID, trackingOption => $trackingOption);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->createTrackingOptions: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ createTrackingOptions
+ Creates options for a specific tracking category
+
+
+
+
+
+
+
+ /TrackingCategories/{TrackingCategoryID}/Options
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -38997,47 +15850,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->createTrackingOptions: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-tracking_category_id = '00000000-0000-0000-0000-000000000000'
-
-trackingOption = {
- name: "Foobar"
-}
-
-begin
- response = xero_client.accounting_api.create_tracking_options(xero_tenant_id, tracking_category_id, trackingOption)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling create_tracking_options: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- TrackingCategoryID*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ TrackingCategoryID*
@@ -39063,15 +15894,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -39094,34 +15924,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- trackingOption *
-
-
-
-
- TrackingOption
-
-
-
-TrackingOption object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ trackingOption *
+
+
+
+
+ TrackingOption
+
+
+ TrackingOption object in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- deleteAccount
- Deletes a chart of accounts
-
-
-
-
-
-
-
- /Accounts/{AccountID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Accounts/{AccountID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID accountID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Accounts result = apiInstance.deleteAccount(accessToken, xeroTenantId, accountID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#deleteAccount");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID accountID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Account object
- try {
- Accounts result = apiInstance.deleteAccount(xeroTenantId, accountID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#deleteAccount");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *accountID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Account object (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Deletes a chart of accounts
-[apiInstance deleteAccountWith:xeroTenantId
- accountID:accountID
- completionHandler: ^(Accounts output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const accountID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.deleteAccount(xeroTenantId, accountID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class DeleteAccountExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var accountID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.DeleteAccountAsync(accessToken, xeroTenantId, accountID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.DeleteAccount: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$accountID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->deleteAccount($xeroTenantId, $accountID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->deleteAccount: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $accountID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Account object
-
-eval {
- my $result = $api_instance->deleteAccount(xeroTenantId => $xeroTenantId, accountID => $accountID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->deleteAccount: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ deleteAccount
+ Deletes a chart of accounts
+
+
+
+
+
+
+
+ /Accounts/{AccountID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -39532,43 +16011,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->deleteAccount: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-account_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.delete_account(xero_tenant_id, account_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling delete_account: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- AccountID*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ AccountID*
@@ -39594,15 +16055,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -39625,366 +16085,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- deleteContactGroupContact
- Deletes a specific contact from a contact group using a unique contact Id
-
-
-
-
-
-
-
- /ContactGroups/{ContactGroupID}/Contacts/{ContactID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ContactGroups/{ContactGroupID}/Contacts/{ContactID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID contactGroupID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- UUID contactID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- result = apiInstance.deleteContactGroupContact(accessToken, xeroTenantId, contactGroupID, contactID);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#deleteContactGroupContact");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID contactGroupID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact Group
- UUID contactID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact
- try {
- apiInstance.deleteContactGroupContact(xeroTenantId, contactGroupID, contactID);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#deleteContactGroupContact");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *contactGroupID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact Group (default to null)
-UUID *contactID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Deletes a specific contact from a contact group using a unique contact Id
-[apiInstance deleteContactGroupContactWith:xeroTenantId
- contactGroupID:contactGroupID
- contactID:contactID
- completionHandler: ^(NSError* error) {
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactGroupID = '00000000-0000-0000-0000-000000000000';
-const contactID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.deleteContactGroupContact(xeroTenantId, contactGroupID, contactID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class DeleteContactGroupContactExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactGroupID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var contactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- await apiInstance.DeleteContactGroupContactAsync(accessToken, xeroTenantId, contactGroupID, contactID);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.DeleteContactGroupContact: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactGroupID = "00000000-0000-0000-0000-000000000000";
-$contactID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $apiInstance->deleteContactGroupContact($xeroTenantId, $contactGroupID, $contactID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->deleteContactGroupContact: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactGroupID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact Group
-my $contactID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact
-
-eval {
- $api_instance->deleteContactGroupContact(xeroTenantId => $xeroTenantId, contactGroupID => $contactGroupID, contactID => $contactID);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->deleteContactGroupContact: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ deleteContactGroupContact
+ Deletes a specific contact from a contact group using a unique contact Id
+
+
+
+
+
+
+
+ /ContactGroups/{ContactGroupID}/Contacts/{ContactID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -40007,44 +16135,25 @@ Usage and SDK Samples
api_instance.delete_contact_group_contact(xero_tenant_id, contact_group_id, contact_id)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->deleteContactGroupContact: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_group_id = '00000000-0000-0000-0000-000000000000'
-contact_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.delete_contact_group_contact(xero_tenant_id, contact_group_id, contact_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling delete_contact_group_contact: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.contacts
- Grant read-write access to contacts and contact groups
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ContactGroupID*
+
+
+ Scopes
+
+
+
+ accounting.contacts
+ Grant read-write access to contacts and contact groups
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ContactGroupID*
@@ -40070,7 +16179,7 @@ Parameters
- ContactID*
+ ContactID*
@@ -40096,15 +16205,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -40127,311 +16235,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- deleteContactGroupContacts
- Deletes all contacts from a specific contact group
-
-
-
-
-
-
-
- /ContactGroups/{ContactGroupID}/Contacts
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ContactGroups/{ContactGroupID}/Contacts"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID contactGroupID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- result = apiInstance.deleteContactGroupContacts(accessToken, xeroTenantId, contactGroupID);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#deleteContactGroupContacts");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID contactGroupID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact Group
- try {
- apiInstance.deleteContactGroupContacts(xeroTenantId, contactGroupID);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#deleteContactGroupContacts");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *contactGroupID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact Group (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Deletes all contacts from a specific contact group
-[apiInstance deleteContactGroupContactsWith:xeroTenantId
- contactGroupID:contactGroupID
- completionHandler: ^(NSError* error) {
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactGroupID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.deleteContactGroupContacts(xeroTenantId, contactGroupID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class DeleteContactGroupContactsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactGroupID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- await apiInstance.DeleteContactGroupContactsAsync(accessToken, xeroTenantId, contactGroupID);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.DeleteContactGroupContacts: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactGroupID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $apiInstance->deleteContactGroupContacts($xeroTenantId, $contactGroupID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->deleteContactGroupContacts: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactGroupID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact Group
-
-eval {
- $api_instance->deleteContactGroupContacts(xeroTenantId => $xeroTenantId, contactGroupID => $contactGroupID);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->deleteContactGroupContacts: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ deleteContactGroupContacts
+ Deletes all contacts from a specific contact group
+
+
+
+
+
+
+
+ /ContactGroups/{ContactGroupID}/Contacts
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -40453,43 +16284,25 @@ Usage and SDK Samples
api_instance.delete_contact_group_contacts(xero_tenant_id, contact_group_id)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->deleteContactGroupContacts: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_group_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.delete_contact_group_contacts(xero_tenant_id, contact_group_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling delete_contact_group_contacts: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.contacts
- Grant read-write access to contacts and contact groups
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ContactGroupID*
+
+
+ Scopes
+
+
+
+ accounting.contacts
+ Grant read-write access to contacts and contact groups
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ContactGroupID*
@@ -40515,15 +16328,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -40546,242 +16358,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- deleteItem
- Deletes a specific item
-
-
-
-
-
-
-
- /Items/{ItemID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Items/{ItemID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID itemID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- result = apiInstance.deleteItem(accessToken, xeroTenantId, itemID);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#deleteItem");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID itemID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Item
- try {
- apiInstance.deleteItem(xeroTenantId, itemID);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#deleteItem");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *itemID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Item (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Deletes a specific item
-[apiInstance deleteItemWith:xeroTenantId
- itemID:itemID
- completionHandler: ^(NSError* error) {
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const itemID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.deleteItem(xeroTenantId, itemID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class DeleteItemExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var itemID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- await apiInstance.DeleteItemAsync(accessToken, xeroTenantId, itemID);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.DeleteItem: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$itemID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $apiInstance->deleteItem($xeroTenantId, $itemID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->deleteItem: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $itemID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Item
-
-eval {
- $api_instance->deleteItem(xeroTenantId => $xeroTenantId, itemID => $itemID);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->deleteItem: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ deleteItem
+ Deletes a specific item
+
+
+
+
+
+
+
+ /Items/{ItemID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -40803,43 +16407,25 @@ Usage and SDK Samples
api_instance.delete_item(xero_tenant_id, item_id)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->deleteItem: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-item_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.delete_item(xero_tenant_id, item_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling delete_item: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ItemID*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ItemID*
@@ -40865,15 +16451,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -40896,311 +16481,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- deleteLinkedTransaction
- Deletes a specific linked transactions (billable expenses)
-
-
-
-
-
-
-
- /LinkedTransactions/{LinkedTransactionID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/LinkedTransactions/{LinkedTransactionID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID linkedTransactionID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- result = apiInstance.deleteLinkedTransaction(accessToken, xeroTenantId, linkedTransactionID);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#deleteLinkedTransaction");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID linkedTransactionID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a LinkedTransaction
- try {
- apiInstance.deleteLinkedTransaction(xeroTenantId, linkedTransactionID);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#deleteLinkedTransaction");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *linkedTransactionID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a LinkedTransaction (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Deletes a specific linked transactions (billable expenses)
-[apiInstance deleteLinkedTransactionWith:xeroTenantId
- linkedTransactionID:linkedTransactionID
- completionHandler: ^(NSError* error) {
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const linkedTransactionID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.deleteLinkedTransaction(xeroTenantId, linkedTransactionID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class DeleteLinkedTransactionExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var linkedTransactionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- await apiInstance.DeleteLinkedTransactionAsync(accessToken, xeroTenantId, linkedTransactionID);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.DeleteLinkedTransaction: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$linkedTransactionID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $apiInstance->deleteLinkedTransaction($xeroTenantId, $linkedTransactionID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->deleteLinkedTransaction: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $linkedTransactionID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a LinkedTransaction
-
-eval {
- $api_instance->deleteLinkedTransaction(xeroTenantId => $xeroTenantId, linkedTransactionID => $linkedTransactionID);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->deleteLinkedTransaction: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ deleteLinkedTransaction
+ Deletes a specific linked transactions (billable expenses)
+
+
+
+
+
+
+
+ /LinkedTransactions/{LinkedTransactionID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -41222,43 +16530,25 @@ Usage and SDK Samples
api_instance.delete_linked_transaction(xero_tenant_id, linked_transaction_id)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->deleteLinkedTransaction: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-linked_transaction_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.delete_linked_transaction(xero_tenant_id, linked_transaction_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling delete_linked_transaction: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- LinkedTransactionID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ LinkedTransactionID*
@@ -41284,15 +16574,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -41315,334 +16604,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- deletePayment
- Updates a specific payment for invoices and credit notes
-
-
-
-
-
-
-
- /Payments/{PaymentID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Payments/{PaymentID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID paymentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- PaymentDelete paymentDelete = new PaymentDelete();
- paymentDelete.setStatus("DELETED");
-
- try {
- Payments result = apiInstance.deletePayment(accessToken, xeroTenantId, paymentID, paymentDelete);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#deletePayment");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID paymentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Payment
- PaymentDelete paymentDelete = { "Payments":[ { "Status":"DELETED" } ] }; // PaymentDelete |
- try {
- Payments result = apiInstance.deletePayment(xeroTenantId, paymentID, paymentDelete);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#deletePayment");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *paymentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Payment (default to null)
-PaymentDelete *paymentDelete = { "Payments":[ { "Status":"DELETED" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific payment for invoices and credit notes
-[apiInstance deletePaymentWith:xeroTenantId
- paymentID:paymentID
- paymentDelete:paymentDelete
- completionHandler: ^(Payments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const paymentID = '00000000-0000-0000-0000-000000000000';
-
-const paymentDelete: PaymentDelete = {
- status: "DELETED" };
-
-try {
- const response = await xero.accountingApi.deletePayment(xeroTenantId, paymentID, paymentDelete);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class DeletePaymentExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var paymentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var paymentDelete = new PaymentDelete();
- paymentDelete.Status = "DELETED";
-
- try {
- var result = await apiInstance.DeletePaymentAsync(accessToken, xeroTenantId, paymentID, paymentDelete);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.DeletePayment: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$paymentID = "00000000-0000-0000-0000-000000000000";
-
-$paymentDelete = new XeroAPI\XeroPHP\Models\Accounting\PaymentDelete;
-$paymentDelete->setStatus('DELETED');
-
-try {
- $result = $apiInstance->deletePayment($xeroTenantId, $paymentID, $paymentDelete);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->deletePayment: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $paymentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Payment
-my $paymentDelete = ::Object::PaymentDelete->new(); # PaymentDelete |
-
-eval {
- my $result = $api_instance->deletePayment(xeroTenantId => $xeroTenantId, paymentID => $paymentID, paymentDelete => $paymentDelete);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->deletePayment: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ deletePayment
+ Updates a specific payment for invoices and credit notes
+
+
+
+
+
+
+
+ /Payments/{PaymentID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -41668,47 +16657,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->deletePayment: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-payment_id = '00000000-0000-0000-0000-000000000000'
-
-paymentDelete = {
- status: "DELETED"
-}
-
-begin
- response = xero_client.accounting_api.delete_payment(xero_tenant_id, payment_id, paymentDelete)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling delete_payment: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PaymentID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PaymentID*
@@ -41734,15 +16701,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -41765,34 +16731,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- paymentDelete *
-
-
-
-
- PaymentDelete
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ paymentDelete *
+
+
+
+
+ PaymentDelete
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- deleteTrackingCategory
- Deletes a specific tracking category
-
-
-
-
-
-
-
- /TrackingCategories/{TrackingCategoryID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/TrackingCategories/{TrackingCategoryID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID trackingCategoryID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- TrackingCategories result = apiInstance.deleteTrackingCategory(accessToken, xeroTenantId, trackingCategoryID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#deleteTrackingCategory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID trackingCategoryID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a TrackingCategory
- try {
- TrackingCategories result = apiInstance.deleteTrackingCategory(xeroTenantId, trackingCategoryID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#deleteTrackingCategory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *trackingCategoryID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a TrackingCategory (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Deletes a specific tracking category
-[apiInstance deleteTrackingCategoryWith:xeroTenantId
- trackingCategoryID:trackingCategoryID
- completionHandler: ^(TrackingCategories output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const trackingCategoryID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.deleteTrackingCategory(xeroTenantId, trackingCategoryID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class DeleteTrackingCategoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var trackingCategoryID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.DeleteTrackingCategoryAsync(accessToken, xeroTenantId, trackingCategoryID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.DeleteTrackingCategory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$trackingCategoryID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->deleteTrackingCategory($xeroTenantId, $trackingCategoryID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->deleteTrackingCategory: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $trackingCategoryID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a TrackingCategory
-
-eval {
- my $result = $api_instance->deleteTrackingCategory(xeroTenantId => $xeroTenantId, trackingCategoryID => $trackingCategoryID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->deleteTrackingCategory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ deleteTrackingCategory
+ Deletes a specific tracking category
+
+
+
+
+
+
+
+ /TrackingCategories/{TrackingCategoryID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -42202,43 +16817,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->deleteTrackingCategory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-tracking_category_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.delete_tracking_category(xero_tenant_id, tracking_category_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling delete_tracking_category: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- TrackingCategoryID*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ TrackingCategoryID*
@@ -42264,15 +16861,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -42295,372 +16891,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- deleteTrackingOptions
- Deletes a specific option for a specific tracking category
-
-
-
-
-
-
-
- /TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID trackingCategoryID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- UUID trackingOptionID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- TrackingOptions result = apiInstance.deleteTrackingOptions(accessToken, xeroTenantId, trackingCategoryID, trackingOptionID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#deleteTrackingOptions");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID trackingCategoryID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a TrackingCategory
- UUID trackingOptionID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Tracking Option
- try {
- TrackingOptions result = apiInstance.deleteTrackingOptions(xeroTenantId, trackingCategoryID, trackingOptionID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#deleteTrackingOptions");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *trackingCategoryID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a TrackingCategory (default to null)
-UUID *trackingOptionID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Tracking Option (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Deletes a specific option for a specific tracking category
-[apiInstance deleteTrackingOptionsWith:xeroTenantId
- trackingCategoryID:trackingCategoryID
- trackingOptionID:trackingOptionID
- completionHandler: ^(TrackingOptions output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const trackingCategoryID = '00000000-0000-0000-0000-000000000000';
-const trackingOptionID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.deleteTrackingOptions(xeroTenantId, trackingCategoryID, trackingOptionID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class DeleteTrackingOptionsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var trackingCategoryID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var trackingOptionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.DeleteTrackingOptionsAsync(accessToken, xeroTenantId, trackingCategoryID, trackingOptionID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.DeleteTrackingOptions: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$trackingCategoryID = "00000000-0000-0000-0000-000000000000";
-$trackingOptionID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->deleteTrackingOptions($xeroTenantId, $trackingCategoryID, $trackingOptionID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->deleteTrackingOptions: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $trackingCategoryID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a TrackingCategory
-my $trackingOptionID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Tracking Option
-
-eval {
- my $result = $api_instance->deleteTrackingOptions(xeroTenantId => $xeroTenantId, trackingCategoryID => $trackingCategoryID, trackingOptionID => $trackingOptionID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->deleteTrackingOptions: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ deleteTrackingOptions
+ Deletes a specific option for a specific tracking category
+
+
+
+
+
+
+
+ /TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -42684,44 +16942,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->deleteTrackingOptions: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-tracking_category_id = '00000000-0000-0000-0000-000000000000'
-tracking_option_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.delete_tracking_options(xero_tenant_id, tracking_category_id, tracking_option_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling delete_tracking_options: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- TrackingCategoryID*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ TrackingCategoryID*
@@ -42747,7 +16986,7 @@ Parameters
- TrackingOptionID*
+ TrackingOptionID*
@@ -42773,15 +17012,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -42804,369 +17042,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- emailInvoice
- Sends a copy of a specific invoice to related contact via email
-
-
-
-
-
-
-
- /Invoices/{InvoiceID}/Email
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Invoices/{InvoiceID}/Email"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID invoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- RequestEmpty requestEmpty = new RequestEmpty();
-
- try {
- result = apiInstance.emailInvoice(accessToken, xeroTenantId, invoiceID, requestEmpty);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#emailInvoice");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID invoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Invoice
- RequestEmpty requestEmpty = {}; // RequestEmpty |
- try {
- apiInstance.emailInvoice(xeroTenantId, invoiceID, requestEmpty);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#emailInvoice");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *invoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Invoice (default to null)
-RequestEmpty *requestEmpty = {}; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Sends a copy of a specific invoice to related contact via email
-[apiInstance emailInvoiceWith:xeroTenantId
- invoiceID:invoiceID
- requestEmpty:requestEmpty
- completionHandler: ^(NSError* error) {
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const invoiceID = '00000000-0000-0000-0000-000000000000';
-
-const requestEmpty: RequestEmpty = { };
-
-try {
- const response = await xero.accountingApi.emailInvoice(xeroTenantId, invoiceID, requestEmpty);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class EmailInvoiceExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var invoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var requestEmpty = new RequestEmpty();
-
- try {
- await apiInstance.EmailInvoiceAsync(accessToken, xeroTenantId, invoiceID, requestEmpty);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.EmailInvoice: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$invoiceID = "00000000-0000-0000-0000-000000000000";
-
-$requestEmpty = new XeroAPI\XeroPHP\Models\Accounting\RequestEmpty;
-
-try {
- $apiInstance->emailInvoice($xeroTenantId, $invoiceID, $requestEmpty);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->emailInvoice: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $invoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Invoice
-my $requestEmpty = ::Object::RequestEmpty->new(); # RequestEmpty |
-
-eval {
- $api_instance->emailInvoice(xeroTenantId => $xeroTenantId, invoiceID => $invoiceID, requestEmpty => $requestEmpty);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->emailInvoice: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ emailInvoice
+ Sends a copy of a specific invoice to related contact via email
+
+
+
+
+
+
+
+ /Invoices/{InvoiceID}/Email
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -43190,45 +17093,25 @@ Usage and SDK Samples
api_instance.email_invoice(xero_tenant_id, invoice_id, requestEmpty)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->emailInvoice: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-invoice_id = '00000000-0000-0000-0000-000000000000'
-
-requestEmpty = { }
-
-begin
- response = xero_client.accounting_api.email_invoice(xero_tenant_id, invoice_id, requestEmpty)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling email_invoice: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- InvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ InvoiceID*
@@ -43254,15 +17137,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -43285,34 +17167,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- requestEmpty *
-
-
-
-
- RequestEmpty
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ requestEmpty *
+
+
+
+
+ RequestEmpty
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- getAccount
- Retrieves a single chart of accounts by using a unique account Id
-
-
-
-
-
-
-
- /Accounts/{AccountID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Accounts/{AccountID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID accountID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Accounts result = apiInstance.getAccount(accessToken, xeroTenantId, accountID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getAccount");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID accountID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Account object
- try {
- Accounts result = apiInstance.getAccount(xeroTenantId, accountID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getAccount");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *accountID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Account object (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a single chart of accounts by using a unique account Id
-[apiInstance getAccountWith:xeroTenantId
- accountID:accountID
- completionHandler: ^(Accounts output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const accountID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getAccount(xeroTenantId, accountID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetAccountExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var accountID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetAccountAsync(accessToken, xeroTenantId, accountID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetAccount: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$accountID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getAccount($xeroTenantId, $accountID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getAccount: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $accountID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Account object
-
-eval {
- my $result = $api_instance->getAccount(xeroTenantId => $xeroTenantId, accountID => $accountID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getAccount: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ getAccount
+ Retrieves a single chart of accounts by using a unique account Id
+
+
+
+
+
+
+
+ /Accounts/{AccountID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -43676,43 +17253,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getAccount: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-account_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_account(xero_tenant_id, account_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_account: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- AccountID*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ AccountID*
@@ -43738,15 +17297,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -43769,311 +17327,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getAccountAttachmentByFileName
- Retrieves an attachment for a specific account by filename
-
-
-
-
-
-
-
- /Accounts/{AccountID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Accounts/{AccountID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID accountID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getAccountAttachmentByFileName(accessToken, xeroTenantId, accountID, fileName, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getAccountAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID accountID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Account object
- String fileName = xero-dev.jpg; // String | Name of the attachment
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getAccountAttachmentByFileName(xeroTenantId, accountID, fileName, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getAccountAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *accountID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Account object (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves an attachment for a specific account by filename
-[apiInstance getAccountAttachmentByFileNameWith:xeroTenantId
- accountID:accountID
- fileName:fileName
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const accountID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getAccountAttachmentByFileName(xeroTenantId, accountID, fileName, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetAccountAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var accountID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetAccountAttachmentByFileNameAsync(accessToken, xeroTenantId, accountID, fileName, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetAccountAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$accountID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getAccountAttachmentByFileName($xeroTenantId, $accountID, $fileName, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getAccountAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $accountID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Account object
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getAccountAttachmentByFileName(xeroTenantId => $xeroTenantId, accountID => $accountID, fileName => $fileName, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getAccountAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getAccountAttachmentByFileName
+ Retrieves an attachment for a specific account by filename
+
+
+
+
+
+
+
+ /Accounts/{AccountID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -44098,45 +17379,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getAccountAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-account_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_account_attachment_by_file_name(xero_tenant_id, account_id, file_name, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_account_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- AccountID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ AccountID*
@@ -44162,7 +17423,7 @@ Parameters
- FileName*
+ FileName*
@@ -44185,15 +17446,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -44216,7 +17476,7 @@ Parameters
- contentType*
+ contentType*
@@ -44239,311 +17499,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getAccountAttachmentById
- Retrieves a specific attachment from a specific account using a unique attachment Id
-
-
-
-
-
-
-
- /Accounts/{AccountID}/Attachments/{AttachmentID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Accounts/{AccountID}/Attachments/{AttachmentID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID accountID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- UUID attachmentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getAccountAttachmentById(accessToken, xeroTenantId, accountID, attachmentID, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getAccountAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID accountID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Account object
- UUID attachmentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Attachment object
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getAccountAttachmentById(xeroTenantId, accountID, attachmentID, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getAccountAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *accountID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Account object (default to null)
-UUID *attachmentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Attachment object (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific attachment from a specific account using a unique attachment Id
-[apiInstance getAccountAttachmentByIdWith:xeroTenantId
- accountID:accountID
- attachmentID:attachmentID
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const accountID = '00000000-0000-0000-0000-000000000000';
-const attachmentID = '00000000-0000-0000-0000-000000000000';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getAccountAttachmentById(xeroTenantId, accountID, attachmentID, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetAccountAttachmentByIdExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var accountID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var attachmentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetAccountAttachmentByIdAsync(accessToken, xeroTenantId, accountID, attachmentID, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetAccountAttachmentById: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$accountID = "00000000-0000-0000-0000-000000000000";
-$attachmentID = "00000000-0000-0000-0000-000000000000";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getAccountAttachmentById($xeroTenantId, $accountID, $attachmentID, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getAccountAttachmentById: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $accountID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Account object
-my $attachmentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Attachment object
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getAccountAttachmentById(xeroTenantId => $xeroTenantId, accountID => $accountID, attachmentID => $attachmentID, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getAccountAttachmentById: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getAccountAttachmentById
+ Retrieves a specific attachment from a specific account using a unique attachment Id
+
+
+
+
+
+
+
+ /Accounts/{AccountID}/Attachments/{AttachmentID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -44568,45 +17551,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getAccountAttachmentById: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-account_id = '00000000-0000-0000-0000-000000000000'
-attachment_id = '00000000-0000-0000-0000-000000000000'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_account_attachment_by_id(xero_tenant_id, account_id, attachment_id, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_account_attachment_by_id: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- AccountID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ AccountID*
@@ -44632,7 +17595,7 @@ Parameters
- AttachmentID*
+ AttachmentID*
@@ -44658,15 +17621,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -44689,7 +17651,7 @@ Parameters
- contentType*
+ contentType*
@@ -44712,295 +17674,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getAccountAttachments
- Retrieves attachments for a specific accounts by using a unique account Id
-
-
-
-
-
-
-
- /Accounts/{AccountID}/Attachments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Accounts/{AccountID}/Attachments"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID accountID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Attachments result = apiInstance.getAccountAttachments(accessToken, xeroTenantId, accountID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getAccountAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID accountID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Account object
- try {
- Attachments result = apiInstance.getAccountAttachments(xeroTenantId, accountID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getAccountAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *accountID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Account object (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves attachments for a specific accounts by using a unique account Id
-[apiInstance getAccountAttachmentsWith:xeroTenantId
- accountID:accountID
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const accountID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getAccountAttachments(xeroTenantId, accountID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetAccountAttachmentsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var accountID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetAccountAttachmentsAsync(accessToken, xeroTenantId, accountID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetAccountAttachments: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$accountID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getAccountAttachments($xeroTenantId, $accountID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getAccountAttachments: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $accountID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Account object
-
-eval {
- my $result = $api_instance->getAccountAttachments(xeroTenantId => $xeroTenantId, accountID => $accountID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getAccountAttachments: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getAccountAttachments
+ Retrieves attachments for a specific accounts by using a unique account Id
+
+
+
+
+
+
+
+ /Accounts/{AccountID}/Attachments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -45023,43 +17724,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getAccountAttachments: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-account_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_account_attachments(xero_tenant_id, account_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_account_attachments: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- AccountID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ AccountID*
@@ -45085,15 +17768,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -45116,313 +17798,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getAccounts
- Retrieves the full chart of accounts
-
-
-
-
-
-
-
- /Accounts
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Accounts?where=Status=="ACTIVE" AND Type=="BANK"&order=Name ASC"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- String where = 'Status=="ACTIVE" AND Type=="BANK"';
- String order = 'Name ASC';
-
- try {
- Accounts result = apiInstance.getAccounts(accessToken, xeroTenantId, ifModifiedSince, where, order);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getAccounts");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- String where = Status=="ACTIVE" AND Type=="BANK"; // String | Filter by an any element
- String order = Name ASC; // String | Order by an any element
- try {
- Accounts result = apiInstance.getAccounts(xeroTenantId, ifModifiedSince, where, order);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getAccounts");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-String *where = Status=="ACTIVE" AND Type=="BANK"; // Filter by an any element (optional) (default to null)
-String *order = Name ASC; // Order by an any element (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves the full chart of accounts
-[apiInstance getAccountsWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- where:where
- order:order
- completionHandler: ^(Accounts output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const where = 'Status=="ACTIVE" AND Type=="BANK"';
-const order = 'Name ASC';
-
-try {
- const response = await xero.accountingApi.getAccounts(xeroTenantId, ifModifiedSince, where, order);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetAccountsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var where = "Status==\"ACTIVE\"";
- var order = "Name ASC";
-
- try {
- var result = await apiInstance.GetAccountsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetAccounts: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$where = "Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Account::STATUS_ACTIVE . '"";
-$order = "Name ASC";
-
-try {
- $result = $apiInstance->getAccounts($xeroTenantId, $ifModifiedSince, $where, $order);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getAccounts: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $where = Status=="ACTIVE" AND Type=="BANK"; # String | Filter by an any element
-my $order = Name ASC; # String | Order by an any element
-
-eval {
- my $result = $api_instance->getAccounts(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, where => $where, order => $order);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getAccounts: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getAccounts
+ Retrieves the full chart of accounts
+
+
+
+
+
+
+
+ /Accounts
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -45447,46 +17850,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getAccounts: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-where = 'Status==#{XeroRuby::Accounting::Account::ACTIVE}'
-order = 'Name ASC'
-
-begin
- response = xero_client.accounting_api.get_accounts(xero_tenant_id, if_modified_since, where, order)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_accounts: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -45509,7 +17891,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -45532,17 +17914,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -45562,7 +17941,7 @@ Parameters
- order
+ order
@@ -45582,300 +17961,34 @@ Parameters
-
-
-
-
-
-
-
-
- getBankTransaction
- Retrieves a single spent or received money transaction by using a unique bank transaction Id
-
-
-
-
-
-
-
- /BankTransactions/{BankTransactionID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransactions/{BankTransactionID}?unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID bankTransactionID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- Integer unitdp = 4;
-
- try {
- BankTransactions result = apiInstance.getBankTransaction(accessToken, xeroTenantId, bankTransactionID, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransaction");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID bankTransactionID = 00000000-0000-0000-0000-000000000000; // UUID | Xero generated unique identifier for a bank transaction
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- BankTransactions result = apiInstance.getBankTransaction(xeroTenantId, bankTransactionID, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransaction");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *bankTransactionID = 00000000-0000-0000-0000-000000000000; // Xero generated unique identifier for a bank transaction (default to null)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a single spent or received money transaction by using a unique bank transaction Id
-[apiInstance getBankTransactionWith:xeroTenantId
- bankTransactionID:bankTransactionID
- unitdp:unitdp
- completionHandler: ^(BankTransactions output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const bankTransactionID = '00000000-0000-0000-0000-000000000000';
-const unitdp = 4;
-
-try {
- const response = await xero.accountingApi.getBankTransaction(xeroTenantId, bankTransactionID, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetBankTransactionExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var bankTransactionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var unitdp = 4;
-
- try {
- var result = await apiInstance.GetBankTransactionAsync(accessToken, xeroTenantId, bankTransactionID, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetBankTransaction: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$bankTransactionID = "00000000-0000-0000-0000-000000000000";
-$unitdp = 4;
-
-try {
- $result = $apiInstance->getBankTransaction($xeroTenantId, $bankTransactionID, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getBankTransaction: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransactionID = 00000000-0000-0000-0000-000000000000; # UUID | Xero generated unique identifier for a bank transaction
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->getBankTransaction(xeroTenantId => $xeroTenantId, bankTransactionID => $bankTransactionID, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getBankTransaction: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getBankTransaction
+ Retrieves a single spent or received money transaction by using a unique bank transaction Id
+
+
+
+
+
+
+
+ /BankTransactions/{BankTransactionID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -45898,44 +18011,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBankTransaction: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-bank_transaction_id = '00000000-0000-0000-0000-000000000000'
-unitdp = 4
-
-begin
- response = xero_client.accounting_api.get_bank_transaction(xero_tenant_id, bank_transaction_id, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_bank_transaction: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BankTransactionID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BankTransactionID*
@@ -45961,15 +18055,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -45992,17 +18085,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- unitdp
+
+ Query parameters
+
+
+ Name
+ Description
+
+ unitdp
@@ -46022,308 +18112,34 @@ Parameters
-
-
-
-
-
-
-
-
- getBankTransactionAttachmentByFileName
- Retrieves a specific attachment from a specific bank transaction by filename
-
-
-
-
-
-
-
- /BankTransactions/{BankTransactionID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransactions/{BankTransactionID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID bankTransactionID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getBankTransactionAttachmentByFileName(accessToken, xeroTenantId, bankTransactionID, fileName, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransactionAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID bankTransactionID = 00000000-0000-0000-0000-000000000000; // UUID | Xero generated unique identifier for a bank transaction
- String fileName = xero-dev.jpg; // String | Name of the attachment
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransactionAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *bankTransactionID = 00000000-0000-0000-0000-000000000000; // Xero generated unique identifier for a bank transaction (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific attachment from a specific bank transaction by filename
-[apiInstance getBankTransactionAttachmentByFileNameWith:xeroTenantId
- bankTransactionID:bankTransactionID
- fileName:fileName
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const bankTransactionID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetBankTransactionAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var bankTransactionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetBankTransactionAttachmentByFileNameAsync(accessToken, xeroTenantId, bankTransactionID, fileName, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetBankTransactionAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$bankTransactionID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getBankTransactionAttachmentByFileName($xeroTenantId, $bankTransactionID, $fileName, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getBankTransactionAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransactionID = 00000000-0000-0000-0000-000000000000; # UUID | Xero generated unique identifier for a bank transaction
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getBankTransactionAttachmentByFileName(xeroTenantId => $xeroTenantId, bankTransactionID => $bankTransactionID, fileName => $fileName, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getBankTransactionAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getBankTransactionAttachmentByFileName
+ Retrieves a specific attachment from a specific bank transaction by filename
+
+
+
+
+
+
+
+ /BankTransactions/{BankTransactionID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -46348,45 +18164,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBankTransactionAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-bank_transaction_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_bank_transaction_attachment_by_file_name(xero_tenant_id, bank_transaction_id, file_name, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_bank_transaction_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BankTransactionID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BankTransactionID*
@@ -46412,7 +18208,7 @@ Parameters
- FileName*
+ FileName*
@@ -46435,15 +18231,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -46466,7 +18261,7 @@ Parameters
- contentType*
+ contentType*
@@ -46489,311 +18284,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getBankTransactionAttachmentById
- Retrieves specific attachments from a specific BankTransaction using a unique attachment Id
-
-
-
-
-
-
-
- /BankTransactions/{BankTransactionID}/Attachments/{AttachmentID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransactions/{BankTransactionID}/Attachments/{AttachmentID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID bankTransactionID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- UUID attachmentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getBankTransactionAttachmentById(accessToken, xeroTenantId, bankTransactionID, attachmentID, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransactionAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID bankTransactionID = 00000000-0000-0000-0000-000000000000; // UUID | Xero generated unique identifier for a bank transaction
- UUID attachmentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Attachment object
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getBankTransactionAttachmentById(xeroTenantId, bankTransactionID, attachmentID, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransactionAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *bankTransactionID = 00000000-0000-0000-0000-000000000000; // Xero generated unique identifier for a bank transaction (default to null)
-UUID *attachmentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Attachment object (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves specific attachments from a specific BankTransaction using a unique attachment Id
-[apiInstance getBankTransactionAttachmentByIdWith:xeroTenantId
- bankTransactionID:bankTransactionID
- attachmentID:attachmentID
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const bankTransactionID = '00000000-0000-0000-0000-000000000000';
-const attachmentID = '00000000-0000-0000-0000-000000000000';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getBankTransactionAttachmentById(xeroTenantId, bankTransactionID, attachmentID, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetBankTransactionAttachmentByIdExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var bankTransactionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var attachmentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetBankTransactionAttachmentByIdAsync(accessToken, xeroTenantId, bankTransactionID, attachmentID, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetBankTransactionAttachmentById: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$bankTransactionID = "00000000-0000-0000-0000-000000000000";
-$attachmentID = "00000000-0000-0000-0000-000000000000";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getBankTransactionAttachmentById($xeroTenantId, $bankTransactionID, $attachmentID, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getBankTransactionAttachmentById: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransactionID = 00000000-0000-0000-0000-000000000000; # UUID | Xero generated unique identifier for a bank transaction
-my $attachmentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Attachment object
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getBankTransactionAttachmentById(xeroTenantId => $xeroTenantId, bankTransactionID => $bankTransactionID, attachmentID => $attachmentID, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getBankTransactionAttachmentById: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getBankTransactionAttachmentById
+ Retrieves specific attachments from a specific BankTransaction using a unique attachment Id
+
+
+
+
+
+
+
+ /BankTransactions/{BankTransactionID}/Attachments/{AttachmentID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -46818,45 +18336,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBankTransactionAttachmentById: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-bank_transaction_id = '00000000-0000-0000-0000-000000000000'
-attachment_id = '00000000-0000-0000-0000-000000000000'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_bank_transaction_attachment_by_id(xero_tenant_id, bank_transaction_id, attachment_id, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_bank_transaction_attachment_by_id: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BankTransactionID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BankTransactionID*
@@ -46882,7 +18380,7 @@ Parameters
- AttachmentID*
+ AttachmentID*
@@ -46908,15 +18406,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -46939,7 +18436,7 @@ Parameters
- contentType*
+ contentType*
@@ -46962,295 +18459,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getBankTransactionAttachments
- Retrieves any attachments from a specific bank transactions
-
-
-
-
-
-
-
- /BankTransactions/{BankTransactionID}/Attachments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransactions/{BankTransactionID}/Attachments"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID bankTransactionID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Attachments result = apiInstance.getBankTransactionAttachments(accessToken, xeroTenantId, bankTransactionID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransactionAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID bankTransactionID = 00000000-0000-0000-0000-000000000000; // UUID | Xero generated unique identifier for a bank transaction
- try {
- Attachments result = apiInstance.getBankTransactionAttachments(xeroTenantId, bankTransactionID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransactionAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *bankTransactionID = 00000000-0000-0000-0000-000000000000; // Xero generated unique identifier for a bank transaction (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves any attachments from a specific bank transactions
-[apiInstance getBankTransactionAttachmentsWith:xeroTenantId
- bankTransactionID:bankTransactionID
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const bankTransactionID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getBankTransactionAttachments(xeroTenantId, bankTransactionID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetBankTransactionAttachmentsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var bankTransactionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetBankTransactionAttachmentsAsync(accessToken, xeroTenantId, bankTransactionID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetBankTransactionAttachments: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$bankTransactionID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getBankTransactionAttachments($xeroTenantId, $bankTransactionID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getBankTransactionAttachments: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransactionID = 00000000-0000-0000-0000-000000000000; # UUID | Xero generated unique identifier for a bank transaction
-
-eval {
- my $result = $api_instance->getBankTransactionAttachments(xeroTenantId => $xeroTenantId, bankTransactionID => $bankTransactionID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getBankTransactionAttachments: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getBankTransactionAttachments
+ Retrieves any attachments from a specific bank transactions
+
+
+
+
+
+
+
+ /BankTransactions/{BankTransactionID}/Attachments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -47273,43 +18509,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBankTransactionAttachments: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-bank_transaction_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_bank_transaction_attachments(xero_tenant_id, bank_transaction_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_bank_transaction_attachments: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BankTransactionID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BankTransactionID*
@@ -47335,15 +18553,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -47366,329 +18583,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getBankTransactions
- Retrieves any spent or received money transactions
-
-
-
-
-
-
-
- /BankTransactions
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransactions?where=Status=="AUTHORISED"&order=Type ASC&page=1&unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- String where = 'Status=="AUTHORISED"';
- String order = 'Type ASC';
- Integer page = 1;
- Integer unitdp = 4;
-
- try {
- BankTransactions result = apiInstance.getBankTransactions(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransactions");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- String where = Status=="AUTHORISED"; // String | Filter by an any element
- String order = Type ASC; // String | Order by an any element
- Integer page = 1; // Integer | Up to 100 bank transactions will be returned in a single API call with line items details
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- BankTransactions result = apiInstance.getBankTransactions(xeroTenantId, ifModifiedSince, where, order, page, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransactions");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-String *where = Status=="AUTHORISED"; // Filter by an any element (optional) (default to null)
-String *order = Type ASC; // Order by an any element (optional) (default to null)
-Integer *page = 1; // Up to 100 bank transactions will be returned in a single API call with line items details (optional) (default to null)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves any spent or received money transactions
-[apiInstance getBankTransactionsWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- where:where
- order:order
- page:page
- unitdp:unitdp
- completionHandler: ^(BankTransactions output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const where = 'Status=="AUTHORISED"';
-const order = 'Type ASC';
-const page = 1;
-const unitdp = 4;
-
-try {
- const response = await xero.accountingApi.getBankTransactions(xeroTenantId, ifModifiedSince, where, order, page, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetBankTransactionsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var where = "Status==\"AUTHORISED\"";
- var order = "Type ASC";
- var page = 1;
- var unitdp = 4;
-
- try {
- var result = await apiInstance.GetBankTransactionsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetBankTransactions: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$where = "Status=="' . XeroAPI\XeroPHP\Models\Accounting\BankTransaction::STATUS_AUTHORISED . '"";
-$order = "Type ASC";
-$page = 1;
-$unitdp = 4;
-
-try {
- $result = $apiInstance->getBankTransactions($xeroTenantId, $ifModifiedSince, $where, $order, $page, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getBankTransactions: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $where = Status=="AUTHORISED"; # String | Filter by an any element
-my $order = Type ASC; # String | Order by an any element
-my $page = 1; # Integer | Up to 100 bank transactions will be returned in a single API call with line items details
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->getBankTransactions(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, where => $where, order => $order, page => $page, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getBankTransactions: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getBankTransactions
+ Retrieves any spent or received money transactions
+
+
+
+
+
+
+
+ /BankTransactions
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -47713,48 +18635,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBankTransactions: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-where = 'Status==#{XeroRuby::Accounting::BankTransaction::AUTHORISED}'
-order = 'Type ASC'
-page = 1
-unitdp = 4
-
-begin
- response = xero_client.accounting_api.get_bank_transactions(xero_tenant_id, if_modified_since, where, order, page, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_bank_transactions: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -47777,7 +18676,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -47800,17 +18699,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -47830,7 +18726,7 @@ Parameters
- order
+ order
@@ -47850,7 +18746,7 @@ Parameters
- page
+ page
@@ -47870,7 +18766,7 @@ Parameters
- unitdp
+ unitdp
@@ -47890,292 +18786,34 @@ Parameters
-
-
-
-
-
-
-
-
- getBankTransactionsHistory
- Retrieves history from a specific bank transaction using a unique bank transaction Id
-
-
-
-
-
-
-
- /BankTransactions/{BankTransactionID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransactions/{BankTransactionID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID bankTransactionID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- HistoryRecords result = apiInstance.getBankTransactionsHistory(accessToken, xeroTenantId, bankTransactionID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransactionsHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID bankTransactionID = 00000000-0000-0000-0000-000000000000; // UUID | Xero generated unique identifier for a bank transaction
- try {
- HistoryRecords result = apiInstance.getBankTransactionsHistory(xeroTenantId, bankTransactionID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransactionsHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *bankTransactionID = 00000000-0000-0000-0000-000000000000; // Xero generated unique identifier for a bank transaction (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves history from a specific bank transaction using a unique bank transaction Id
-[apiInstance getBankTransactionsHistoryWith:xeroTenantId
- bankTransactionID:bankTransactionID
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const bankTransactionID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getBankTransactionsHistory(xeroTenantId, bankTransactionID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetBankTransactionsHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var bankTransactionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetBankTransactionsHistoryAsync(accessToken, xeroTenantId, bankTransactionID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetBankTransactionsHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$bankTransactionID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getBankTransactionsHistory($xeroTenantId, $bankTransactionID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getBankTransactionsHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransactionID = 00000000-0000-0000-0000-000000000000; # UUID | Xero generated unique identifier for a bank transaction
-
-eval {
- my $result = $api_instance->getBankTransactionsHistory(xeroTenantId => $xeroTenantId, bankTransactionID => $bankTransactionID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getBankTransactionsHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getBankTransactionsHistory
+ Retrieves history from a specific bank transaction using a unique bank transaction Id
+
+
+
+
+
+
+
+ /BankTransactions/{BankTransactionID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -48198,43 +18836,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBankTransactionsHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-bank_transaction_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_bank_transactions_history(xero_tenant_id, bank_transaction_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_bank_transactions_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BankTransactionID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BankTransactionID*
@@ -48260,15 +18880,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -48291,295 +18910,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getBankTransfer
- Retrieves specific bank transfers by using a unique bank transfer Id
-
-
-
-
-
-
-
- /BankTransfers/{BankTransferID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransfers/{BankTransferID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID bankTransferID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- BankTransfers result = apiInstance.getBankTransfer(accessToken, xeroTenantId, bankTransferID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransfer");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID bankTransferID = 00000000-0000-0000-0000-000000000000; // UUID | Xero generated unique identifier for a bank transfer
- try {
- BankTransfers result = apiInstance.getBankTransfer(xeroTenantId, bankTransferID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransfer");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *bankTransferID = 00000000-0000-0000-0000-000000000000; // Xero generated unique identifier for a bank transfer (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves specific bank transfers by using a unique bank transfer Id
-[apiInstance getBankTransferWith:xeroTenantId
- bankTransferID:bankTransferID
- completionHandler: ^(BankTransfers output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const bankTransferID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getBankTransfer(xeroTenantId, bankTransferID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetBankTransferExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var bankTransferID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetBankTransferAsync(accessToken, xeroTenantId, bankTransferID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetBankTransfer: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$bankTransferID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getBankTransfer($xeroTenantId, $bankTransferID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getBankTransfer: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransferID = 00000000-0000-0000-0000-000000000000; # UUID | Xero generated unique identifier for a bank transfer
-
-eval {
- my $result = $api_instance->getBankTransfer(xeroTenantId => $xeroTenantId, bankTransferID => $bankTransferID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getBankTransfer: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getBankTransfer
+ Retrieves specific bank transfers by using a unique bank transfer Id
+
+
+
+
+
+
+
+ /BankTransfers/{BankTransferID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -48602,43 +18960,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBankTransfer: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-bank_transfer_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_bank_transfer(xero_tenant_id, bank_transfer_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_bank_transfer: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BankTransferID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BankTransferID*
@@ -48664,15 +19004,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -48695,311 +19034,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getBankTransferAttachmentByFileName
- Retrieves a specific attachment on a specific bank transfer by file name
-
-
-
-
-
-
-
- /BankTransfers/{BankTransferID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransfers/{BankTransferID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID bankTransferID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getBankTransferAttachmentByFileName(accessToken, xeroTenantId, bankTransferID, fileName, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransferAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID bankTransferID = 00000000-0000-0000-0000-000000000000; // UUID | Xero generated unique identifier for a bank transfer
- String fileName = xero-dev.jpg; // String | Name of the attachment
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransferAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *bankTransferID = 00000000-0000-0000-0000-000000000000; // Xero generated unique identifier for a bank transfer (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific attachment on a specific bank transfer by file name
-[apiInstance getBankTransferAttachmentByFileNameWith:xeroTenantId
- bankTransferID:bankTransferID
- fileName:fileName
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const bankTransferID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetBankTransferAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var bankTransferID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetBankTransferAttachmentByFileNameAsync(accessToken, xeroTenantId, bankTransferID, fileName, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetBankTransferAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$bankTransferID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getBankTransferAttachmentByFileName($xeroTenantId, $bankTransferID, $fileName, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getBankTransferAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransferID = 00000000-0000-0000-0000-000000000000; # UUID | Xero generated unique identifier for a bank transfer
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getBankTransferAttachmentByFileName(xeroTenantId => $xeroTenantId, bankTransferID => $bankTransferID, fileName => $fileName, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getBankTransferAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getBankTransferAttachmentByFileName
+ Retrieves a specific attachment on a specific bank transfer by file name
+
+
+
+
+
+
+
+ /BankTransfers/{BankTransferID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -49024,45 +19086,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBankTransferAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-bank_transfer_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_bank_transfer_attachment_by_file_name(xero_tenant_id, bank_transfer_id, file_name, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_bank_transfer_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BankTransferID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BankTransferID*
@@ -49088,7 +19130,7 @@ Parameters
- FileName*
+ FileName*
@@ -49111,15 +19153,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -49142,7 +19183,7 @@ Parameters
- contentType*
+ contentType*
@@ -49165,311 +19206,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getBankTransferAttachmentById
- Retrieves a specific attachment from a specific bank transfer using a unique attachment ID
-
-
-
-
-
-
-
- /BankTransfers/{BankTransferID}/Attachments/{AttachmentID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransfers/{BankTransferID}/Attachments/{AttachmentID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID bankTransferID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- UUID attachmentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getBankTransferAttachmentById(accessToken, xeroTenantId, bankTransferID, attachmentID, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransferAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID bankTransferID = 00000000-0000-0000-0000-000000000000; // UUID | Xero generated unique identifier for a bank transfer
- UUID attachmentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Attachment object
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getBankTransferAttachmentById(xeroTenantId, bankTransferID, attachmentID, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransferAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *bankTransferID = 00000000-0000-0000-0000-000000000000; // Xero generated unique identifier for a bank transfer (default to null)
-UUID *attachmentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Attachment object (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific attachment from a specific bank transfer using a unique attachment ID
-[apiInstance getBankTransferAttachmentByIdWith:xeroTenantId
- bankTransferID:bankTransferID
- attachmentID:attachmentID
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const bankTransferID = '00000000-0000-0000-0000-000000000000';
-const attachmentID = '00000000-0000-0000-0000-000000000000';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getBankTransferAttachmentById(xeroTenantId, bankTransferID, attachmentID, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetBankTransferAttachmentByIdExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var bankTransferID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var attachmentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetBankTransferAttachmentByIdAsync(accessToken, xeroTenantId, bankTransferID, attachmentID, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetBankTransferAttachmentById: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$bankTransferID = "00000000-0000-0000-0000-000000000000";
-$attachmentID = "00000000-0000-0000-0000-000000000000";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getBankTransferAttachmentById($xeroTenantId, $bankTransferID, $attachmentID, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getBankTransferAttachmentById: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransferID = 00000000-0000-0000-0000-000000000000; # UUID | Xero generated unique identifier for a bank transfer
-my $attachmentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Attachment object
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getBankTransferAttachmentById(xeroTenantId => $xeroTenantId, bankTransferID => $bankTransferID, attachmentID => $attachmentID, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getBankTransferAttachmentById: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getBankTransferAttachmentById
+ Retrieves a specific attachment from a specific bank transfer using a unique attachment ID
+
+
+
+
+
+
+
+ /BankTransfers/{BankTransferID}/Attachments/{AttachmentID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -49494,45 +19258,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBankTransferAttachmentById: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-bank_transfer_id = '00000000-0000-0000-0000-000000000000'
-attachment_id = '00000000-0000-0000-0000-000000000000'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_bank_transfer_attachment_by_id(xero_tenant_id, bank_transfer_id, attachment_id, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_bank_transfer_attachment_by_id: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BankTransferID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BankTransferID*
@@ -49558,7 +19302,7 @@ Parameters
- AttachmentID*
+ AttachmentID*
@@ -49584,15 +19328,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -49615,7 +19358,7 @@ Parameters
- contentType*
+ contentType*
@@ -49638,295 +19381,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getBankTransferAttachments
- Retrieves attachments from a specific bank transfer
-
-
-
-
-
-
-
- /BankTransfers/{BankTransferID}/Attachments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransfers/{BankTransferID}/Attachments"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID bankTransferID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Attachments result = apiInstance.getBankTransferAttachments(accessToken, xeroTenantId, bankTransferID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransferAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID bankTransferID = 00000000-0000-0000-0000-000000000000; // UUID | Xero generated unique identifier for a bank transfer
- try {
- Attachments result = apiInstance.getBankTransferAttachments(xeroTenantId, bankTransferID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransferAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *bankTransferID = 00000000-0000-0000-0000-000000000000; // Xero generated unique identifier for a bank transfer (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves attachments from a specific bank transfer
-[apiInstance getBankTransferAttachmentsWith:xeroTenantId
- bankTransferID:bankTransferID
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const bankTransferID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getBankTransferAttachments(xeroTenantId, bankTransferID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetBankTransferAttachmentsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var bankTransferID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetBankTransferAttachmentsAsync(accessToken, xeroTenantId, bankTransferID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetBankTransferAttachments: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$bankTransferID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getBankTransferAttachments($xeroTenantId, $bankTransferID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getBankTransferAttachments: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransferID = 00000000-0000-0000-0000-000000000000; # UUID | Xero generated unique identifier for a bank transfer
-
-eval {
- my $result = $api_instance->getBankTransferAttachments(xeroTenantId => $xeroTenantId, bankTransferID => $bankTransferID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getBankTransferAttachments: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getBankTransferAttachments
+ Retrieves attachments from a specific bank transfer
+
+
+
+
+
+
+
+ /BankTransfers/{BankTransferID}/Attachments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -49949,43 +19431,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBankTransferAttachments: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-bank_transfer_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_bank_transfer_attachments(xero_tenant_id, bank_transfer_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_bank_transfer_attachments: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BankTransferID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BankTransferID*
@@ -50011,15 +19475,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -50042,296 +19505,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getBankTransferHistory
- Retrieves history from a specific bank transfer using a unique bank transfer Id
-
-
-
-
-
-
-
- /BankTransfers/{BankTransferID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransfers/{BankTransferID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID bankTransferID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- HistoryRecords result = apiInstance.getBankTransferHistory(accessToken, xeroTenantId, bankTransferID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransferHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID bankTransferID = 00000000-0000-0000-0000-000000000000; // UUID | Xero generated unique identifier for a bank transfer
- try {
- HistoryRecords result = apiInstance.getBankTransferHistory(xeroTenantId, bankTransferID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransferHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *bankTransferID = 00000000-0000-0000-0000-000000000000; // Xero generated unique identifier for a bank transfer (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves history from a specific bank transfer using a unique bank transfer Id
-[apiInstance getBankTransferHistoryWith:xeroTenantId
- bankTransferID:bankTransferID
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const bankTransferID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getBankTransferHistory(xeroTenantId, bankTransferID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetBankTransferHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var bankTransferID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetBankTransferHistoryAsync(accessToken, xeroTenantId, bankTransferID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetBankTransferHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$bankTransferID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getBankTransferHistory($xeroTenantId, $bankTransferID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getBankTransferHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransferID = 00000000-0000-0000-0000-000000000000; # UUID | Xero generated unique identifier for a bank transfer
-
-eval {
- my $result = $api_instance->getBankTransferHistory(xeroTenantId => $xeroTenantId, bankTransferID => $bankTransferID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getBankTransferHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getBankTransferHistory
+ Retrieves history from a specific bank transfer using a unique bank transfer Id
+
+
+
+
+
+
+
+ /BankTransfers/{BankTransferID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -50354,43 +19555,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBankTransferHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-bank_transfer_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_bank_transfer_history(xero_tenant_id, bank_transfer_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_bank_transfer_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BankTransferID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BankTransferID*
@@ -50416,15 +19599,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -50447,312 +19629,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getBankTransfers
- Retrieves all bank transfers
-
-
-
-
-
-
-
- /BankTransfers
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransfers?where=HasAttachments==true&order=Amount ASC"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- String where = 'HasAttachments==true';
- String order = 'Amount ASC';
-
- try {
- BankTransfers result = apiInstance.getBankTransfers(accessToken, xeroTenantId, ifModifiedSince, where, order);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransfers");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- String where = HasAttachments==true; // String | Filter by an any element
- String order = Amount ASC; // String | Order by an any element
- try {
- BankTransfers result = apiInstance.getBankTransfers(xeroTenantId, ifModifiedSince, where, order);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getBankTransfers");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-String *where = HasAttachments==true; // Filter by an any element (optional) (default to null)
-String *order = Amount ASC; // Order by an any element (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves all bank transfers
-[apiInstance getBankTransfersWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- where:where
- order:order
- completionHandler: ^(BankTransfers output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const where = 'HasAttachments==true';
-const order = 'Amount ASC';
-
-try {
- const response = await xero.accountingApi.getBankTransfers(xeroTenantId, ifModifiedSince, where, order);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetBankTransfersExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var where = "HasAttachments==true";
- var order = "Amount ASC";
-
- try {
- var result = await apiInstance.GetBankTransfersAsync(accessToken, xeroTenantId, ifModifiedSince, where, order);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetBankTransfers: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$where = "HasAttachments==true";
-$order = "Amount ASC";
-
-try {
- $result = $apiInstance->getBankTransfers($xeroTenantId, $ifModifiedSince, $where, $order);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getBankTransfers: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $where = HasAttachments==true; # String | Filter by an any element
-my $order = Amount ASC; # String | Order by an any element
-
-eval {
- my $result = $api_instance->getBankTransfers(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, where => $where, order => $order);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getBankTransfers: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getBankTransfers
+ Retrieves all bank transfers
+
+
+
+
+
+
+
+ /BankTransfers
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -50777,46 +19681,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBankTransfers: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-where = 'HasAttachments==true'
-order = 'Amount ASC'
-
-begin
- response = xero_client.accounting_api.get_bank_transfers(xero_tenant_id, if_modified_since, where, order)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_bank_transfers: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -50839,7 +19722,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -50862,17 +19745,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -50892,7 +19772,7 @@ Parameters
- order
+ order
@@ -50912,292 +19792,34 @@ Parameters
-
-
-
-
-
-
-
-
- getBatchPaymentHistory
- Retrieves history from a specific batch payment
-
-
-
-
-
-
-
- /BatchPayments/{BatchPaymentID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BatchPayments/{BatchPaymentID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID batchPaymentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- HistoryRecords result = apiInstance.getBatchPaymentHistory(accessToken, xeroTenantId, batchPaymentID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getBatchPaymentHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID batchPaymentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for BatchPayment
- try {
- HistoryRecords result = apiInstance.getBatchPaymentHistory(xeroTenantId, batchPaymentID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getBatchPaymentHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *batchPaymentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for BatchPayment (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves history from a specific batch payment
-[apiInstance getBatchPaymentHistoryWith:xeroTenantId
- batchPaymentID:batchPaymentID
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const batchPaymentID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getBatchPaymentHistory(xeroTenantId, batchPaymentID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetBatchPaymentHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var batchPaymentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetBatchPaymentHistoryAsync(accessToken, xeroTenantId, batchPaymentID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetBatchPaymentHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$batchPaymentID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getBatchPaymentHistory($xeroTenantId, $batchPaymentID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getBatchPaymentHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $batchPaymentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for BatchPayment
-
-eval {
- my $result = $api_instance->getBatchPaymentHistory(xeroTenantId => $xeroTenantId, batchPaymentID => $batchPaymentID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getBatchPaymentHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getBatchPaymentHistory
+ Retrieves history from a specific batch payment
+
+
+
+
+
+
+
+ /BatchPayments/{BatchPaymentID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -51220,43 +19842,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBatchPaymentHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-batch_payment_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_batch_payment_history(xero_tenant_id, batch_payment_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_batch_payment_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BatchPaymentID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BatchPaymentID*
@@ -51282,15 +19886,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -51313,312 +19916,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getBatchPayments
- Retrieves either one or many batch payments for invoices
-
-
-
-
-
-
-
- /BatchPayments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BatchPayments?where=Status=="AUTHORISED"&order=Date ASC"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- String where = 'Status=="AUTHORISED"';
- String order = 'Date ASC';
-
- try {
- BatchPayments result = apiInstance.getBatchPayments(accessToken, xeroTenantId, ifModifiedSince, where, order);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getBatchPayments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- String where = Status=="AUTHORISED"; // String | Filter by an any element
- String order = Date ASC; // String | Order by an any element
- try {
- BatchPayments result = apiInstance.getBatchPayments(xeroTenantId, ifModifiedSince, where, order);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getBatchPayments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-String *where = Status=="AUTHORISED"; // Filter by an any element (optional) (default to null)
-String *order = Date ASC; // Order by an any element (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves either one or many batch payments for invoices
-[apiInstance getBatchPaymentsWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- where:where
- order:order
- completionHandler: ^(BatchPayments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const where = 'Status=="AUTHORISED"';
-const order = 'Date ASC';
-
-try {
- const response = await xero.accountingApi.getBatchPayments(xeroTenantId, ifModifiedSince, where, order);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetBatchPaymentsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var where = "Status==\"AUTHORISED\"";
- var order = "Date ASC";
-
- try {
- var result = await apiInstance.GetBatchPaymentsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetBatchPayments: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$where = "Status=="' . XeroAPI\XeroPHP\Models\Accounting\BatchPayment::STATUS_AUTHORISED . '"";
-$order = "Date ASC";
-
-try {
- $result = $apiInstance->getBatchPayments($xeroTenantId, $ifModifiedSince, $where, $order);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getBatchPayments: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $where = Status=="AUTHORISED"; # String | Filter by an any element
-my $order = Date ASC; # String | Order by an any element
-
-eval {
- my $result = $api_instance->getBatchPayments(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, where => $where, order => $order);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getBatchPayments: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getBatchPayments
+ Retrieves either one or many batch payments for invoices
+
+
+
+
+
+
+
+ /BatchPayments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -51643,46 +19968,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBatchPayments: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-where = 'Status==#{XeroRuby::Accounting::BatchPayment::AUTHORISED}'
-order = 'Date ASC'
-
-begin
- response = xero_client.accounting_api.get_batch_payments(xero_tenant_id, if_modified_since, where, order)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_batch_payments: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -51705,7 +20009,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -51728,17 +20032,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -51758,7 +20059,7 @@ Parameters
- order
+ order
@@ -51778,292 +20079,34 @@ Parameters
-
-
-
-
-
-
-
-
- getBrandingTheme
- Retrieves a specific branding theme using a unique branding theme Id
-
-
-
-
-
-
-
- /BrandingThemes/{BrandingThemeID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BrandingThemes/{BrandingThemeID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID brandingThemeID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- BrandingThemes result = apiInstance.getBrandingTheme(accessToken, xeroTenantId, brandingThemeID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getBrandingTheme");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID brandingThemeID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Branding Theme
- try {
- BrandingThemes result = apiInstance.getBrandingTheme(xeroTenantId, brandingThemeID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getBrandingTheme");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *brandingThemeID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Branding Theme (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific branding theme using a unique branding theme Id
-[apiInstance getBrandingThemeWith:xeroTenantId
- brandingThemeID:brandingThemeID
- completionHandler: ^(BrandingThemes output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const brandingThemeID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getBrandingTheme(xeroTenantId, brandingThemeID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetBrandingThemeExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var brandingThemeID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetBrandingThemeAsync(accessToken, xeroTenantId, brandingThemeID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetBrandingTheme: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$brandingThemeID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getBrandingTheme($xeroTenantId, $brandingThemeID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getBrandingTheme: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $brandingThemeID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Branding Theme
-
-eval {
- my $result = $api_instance->getBrandingTheme(xeroTenantId => $xeroTenantId, brandingThemeID => $brandingThemeID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getBrandingTheme: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getBrandingTheme
+ Retrieves a specific branding theme using a unique branding theme Id
+
+
+
+
+
+
+
+ /BrandingThemes/{BrandingThemeID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -52086,43 +20129,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBrandingTheme: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-branding_theme_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_branding_theme(xero_tenant_id, branding_theme_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_branding_theme: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings.read
- Grant read-only access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BrandingThemeID*
+
+
+ Scopes
+
+
+
+ accounting.settings.read
+ Grant read-only access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BrandingThemeID*
@@ -52148,15 +20173,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -52179,295 +20203,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getBrandingThemePaymentServices
- Retrieves the payment services for a specific branding theme
-
-
-
-
-
-
-
- /BrandingThemes/{BrandingThemeID}/PaymentServices
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BrandingThemes/{BrandingThemeID}/PaymentServices"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID brandingThemeID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- PaymentServices result = apiInstance.getBrandingThemePaymentServices(accessToken, xeroTenantId, brandingThemeID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getBrandingThemePaymentServices");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID brandingThemeID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Branding Theme
- try {
- PaymentServices result = apiInstance.getBrandingThemePaymentServices(xeroTenantId, brandingThemeID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getBrandingThemePaymentServices");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *brandingThemeID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Branding Theme (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves the payment services for a specific branding theme
-[apiInstance getBrandingThemePaymentServicesWith:xeroTenantId
- brandingThemeID:brandingThemeID
- completionHandler: ^(PaymentServices output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const brandingThemeID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getBrandingThemePaymentServices(xeroTenantId, brandingThemeID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetBrandingThemePaymentServicesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var brandingThemeID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetBrandingThemePaymentServicesAsync(accessToken, xeroTenantId, brandingThemeID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetBrandingThemePaymentServices: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$brandingThemeID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getBrandingThemePaymentServices($xeroTenantId, $brandingThemeID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getBrandingThemePaymentServices: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $brandingThemeID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Branding Theme
-
-eval {
- my $result = $api_instance->getBrandingThemePaymentServices(xeroTenantId => $xeroTenantId, brandingThemeID => $brandingThemeID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getBrandingThemePaymentServices: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getBrandingThemePaymentServices
+ Retrieves the payment services for a specific branding theme
+
+
+
+
+
+
+
+ /BrandingThemes/{BrandingThemeID}/PaymentServices
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -52490,43 +20253,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBrandingThemePaymentServices: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-branding_theme_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_branding_theme_payment_services(xero_tenant_id, branding_theme_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_branding_theme_payment_services: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- paymentservices
- Grant read-write access to payment services
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BrandingThemeID*
+
+
+ Scopes
+
+
+
+ paymentservices
+ Grant read-write access to payment services
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BrandingThemeID*
@@ -52552,15 +20297,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -52583,287 +20327,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getBrandingThemes
- Retrieves all the branding themes
-
-
-
-
-
-
-
- /BrandingThemes
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BrandingThemes"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- try {
- BrandingThemes result = apiInstance.getBrandingThemes(accessToken, xeroTenantId);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getBrandingThemes");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- try {
- BrandingThemes result = apiInstance.getBrandingThemes(xeroTenantId);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getBrandingThemes");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves all the branding themes
-[apiInstance getBrandingThemesWith:xeroTenantId
- completionHandler: ^(BrandingThemes output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
-try {
- const response = await xero.accountingApi.getBrandingThemes(xeroTenantId);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetBrandingThemesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
-
- try {
- var result = await apiInstance.GetBrandingThemesAsync(accessToken, xeroTenantId);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetBrandingThemes: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-
-try {
- $result = $apiInstance->getBrandingThemes($xeroTenantId);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getBrandingThemes: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-
-eval {
- my $result = $api_instance->getBrandingThemes(xeroTenantId => $xeroTenantId);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getBrandingThemes: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getBrandingThemes
+ Retrieves all the branding themes
+
+
+
+
+
+
+
+ /BrandingThemes
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -52885,43 +20376,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getBrandingThemes: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-
-begin
- response = xero_client.accounting_api.get_branding_themes(xero_tenant_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_branding_themes: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings.read
- Grant read-only access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings.read
+ Grant read-only access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -52944,295 +20417,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getContact
- Retrieves a specific contacts in a Xero organisation using a unique contact Id
-
-
-
-
-
-
-
- /Contacts/{ContactID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Contacts/{ContactID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID contactID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Contacts result = apiInstance.getContact(accessToken, xeroTenantId, contactID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getContact");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID contactID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact
- try {
- Contacts result = apiInstance.getContact(xeroTenantId, contactID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getContact");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *contactID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific contacts in a Xero organisation using a unique contact Id
-[apiInstance getContactWith:xeroTenantId
- contactID:contactID
- completionHandler: ^(Contacts output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getContact(xeroTenantId, contactID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetContactExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetContactAsync(accessToken, xeroTenantId, contactID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetContact: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getContact($xeroTenantId, $contactID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getContact: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact
-
-eval {
- my $result = $api_instance->getContact(xeroTenantId => $xeroTenantId, contactID => $contactID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getContact: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getContact
+ Retrieves a specific contacts in a Xero organisation using a unique contact Id
+
+
+
+
+
+
+
+ /Contacts/{ContactID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -53255,43 +20467,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getContact: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_contact(xero_tenant_id, contact_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_contact: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.contacts.read
- Grant read-only access to contacts and contact groups
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ContactID*
+
+
+ Scopes
+
+
+
+ accounting.contacts.read
+ Grant read-only access to contacts and contact groups
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ContactID*
@@ -53317,15 +20511,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -53348,311 +20541,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getContactAttachmentByFileName
- Retrieves a specific attachment from a specific contact by file name
-
-
-
-
-
-
-
- /Contacts/{ContactID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Contacts/{ContactID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID contactID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getContactAttachmentByFileName(accessToken, xeroTenantId, contactID, fileName, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getContactAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID contactID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact
- String fileName = xero-dev.jpg; // String | Name of the attachment
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getContactAttachmentByFileName(xeroTenantId, contactID, fileName, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getContactAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *contactID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific attachment from a specific contact by file name
-[apiInstance getContactAttachmentByFileNameWith:xeroTenantId
- contactID:contactID
- fileName:fileName
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getContactAttachmentByFileName(xeroTenantId, contactID, fileName, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetContactAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetContactAttachmentByFileNameAsync(accessToken, xeroTenantId, contactID, fileName, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetContactAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getContactAttachmentByFileName($xeroTenantId, $contactID, $fileName, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getContactAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getContactAttachmentByFileName(xeroTenantId => $xeroTenantId, contactID => $contactID, fileName => $fileName, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getContactAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getContactAttachmentByFileName
+ Retrieves a specific attachment from a specific contact by file name
+
+
+
+
+
+
+
+ /Contacts/{ContactID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -53677,45 +20593,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getContactAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_contact_attachment_by_file_name(xero_tenant_id, contact_id, file_name, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_contact_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ContactID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ContactID*
@@ -53741,7 +20637,7 @@ Parameters
- FileName*
+ FileName*
@@ -53764,15 +20660,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -53795,7 +20690,7 @@ Parameters
- contentType*
+ contentType*
@@ -53818,311 +20713,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getContactAttachmentById
- Retrieves a specific attachment from a specific contact using a unique attachment Id
-
-
-
-
-
-
-
- /Contacts/{ContactID}/Attachments/{AttachmentID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Contacts/{ContactID}/Attachments/{AttachmentID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID contactID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- UUID attachmentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getContactAttachmentById(accessToken, xeroTenantId, contactID, attachmentID, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getContactAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID contactID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact
- UUID attachmentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Attachment object
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getContactAttachmentById(xeroTenantId, contactID, attachmentID, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getContactAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *contactID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact (default to null)
-UUID *attachmentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Attachment object (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific attachment from a specific contact using a unique attachment Id
-[apiInstance getContactAttachmentByIdWith:xeroTenantId
- contactID:contactID
- attachmentID:attachmentID
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactID = '00000000-0000-0000-0000-000000000000';
-const attachmentID = '00000000-0000-0000-0000-000000000000';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getContactAttachmentById(xeroTenantId, contactID, attachmentID, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetContactAttachmentByIdExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var attachmentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetContactAttachmentByIdAsync(accessToken, xeroTenantId, contactID, attachmentID, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetContactAttachmentById: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactID = "00000000-0000-0000-0000-000000000000";
-$attachmentID = "00000000-0000-0000-0000-000000000000";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getContactAttachmentById($xeroTenantId, $contactID, $attachmentID, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getContactAttachmentById: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact
-my $attachmentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Attachment object
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getContactAttachmentById(xeroTenantId => $xeroTenantId, contactID => $contactID, attachmentID => $attachmentID, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getContactAttachmentById: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getContactAttachmentById
+ Retrieves a specific attachment from a specific contact using a unique attachment Id
+
+
+
+
+
+
+
+ /Contacts/{ContactID}/Attachments/{AttachmentID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -54147,45 +20765,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getContactAttachmentById: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_id = '00000000-0000-0000-0000-000000000000'
-attachment_id = '00000000-0000-0000-0000-000000000000'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_contact_attachment_by_id(xero_tenant_id, contact_id, attachment_id, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_contact_attachment_by_id: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ContactID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ContactID*
@@ -54211,7 +20809,7 @@ Parameters
- AttachmentID*
+ AttachmentID*
@@ -54237,15 +20835,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -54268,7 +20865,7 @@ Parameters
- contentType*
+ contentType*
@@ -54291,295 +20888,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getContactAttachments
- Retrieves attachments for a specific contact in a Xero organisation
-
-
-
-
-
-
-
- /Contacts/{ContactID}/Attachments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Contacts/{ContactID}/Attachments"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID contactID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Attachments result = apiInstance.getContactAttachments(accessToken, xeroTenantId, contactID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getContactAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID contactID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact
- try {
- Attachments result = apiInstance.getContactAttachments(xeroTenantId, contactID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getContactAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *contactID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves attachments for a specific contact in a Xero organisation
-[apiInstance getContactAttachmentsWith:xeroTenantId
- contactID:contactID
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getContactAttachments(xeroTenantId, contactID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetContactAttachmentsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetContactAttachmentsAsync(accessToken, xeroTenantId, contactID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetContactAttachments: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getContactAttachments($xeroTenantId, $contactID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getContactAttachments: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact
-
-eval {
- my $result = $api_instance->getContactAttachments(xeroTenantId => $xeroTenantId, contactID => $contactID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getContactAttachments: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getContactAttachments
+ Retrieves attachments for a specific contact in a Xero organisation
+
+
+
+
+
+
+
+ /Contacts/{ContactID}/Attachments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -54602,43 +20938,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getContactAttachments: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_contact_attachments(xero_tenant_id, contact_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_contact_attachments: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ContactID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ContactID*
@@ -54664,15 +20982,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -54695,296 +21012,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getContactByContactNumber
- Retrieves a specific contact by contact number in a Xero organisation
-
-
-
-
-
-
-
- /Contacts/{ContactNumber}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Contacts/{ContactNumber}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- String contactNumber = 'SB2';
-
- try {
- Contacts result = apiInstance.getContactByContactNumber(accessToken, xeroTenantId, contactNumber);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getContactByContactNumber");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- String contactNumber = SB2; // String | This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50).
- try {
- Contacts result = apiInstance.getContactByContactNumber(xeroTenantId, contactNumber);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getContactByContactNumber");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-String *contactNumber = SB2; // This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific contact by contact number in a Xero organisation
-[apiInstance getContactByContactNumberWith:xeroTenantId
- contactNumber:contactNumber
- completionHandler: ^(Contacts output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactNumber = 'SB2';
-
-try {
- const response = await xero.accountingApi.getContactByContactNumber(xeroTenantId, contactNumber);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetContactByContactNumberExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactNumber = "SB2";
-
- try {
- var result = await apiInstance.GetContactByContactNumberAsync(accessToken, xeroTenantId, contactNumber);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetContactByContactNumber: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactNumber = "SB2";
-
-try {
- $result = $apiInstance->getContactByContactNumber($xeroTenantId, $contactNumber);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getContactByContactNumber: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactNumber = SB2; # String | This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50).
-
-eval {
- my $result = $api_instance->getContactByContactNumber(xeroTenantId => $xeroTenantId, contactNumber => $contactNumber);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getContactByContactNumber: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getContactByContactNumber
+ Retrieves a specific contact by contact number in a Xero organisation
+
+
+
+
+
+
+
+ /Contacts/{ContactNumber}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -55007,43 +21062,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getContactByContactNumber: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_number = 'SB2'
-
-begin
- response = xero_client.accounting_api.get_contact_by_contact_number(xero_tenant_id, contact_number)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_contact_by_contact_number: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.contacts.read
- Grant read-only access to contacts and contact groups
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ContactNumber*
+
+
+ Scopes
+
+
+
+ accounting.contacts.read
+ Grant read-only access to contacts and contact groups
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ContactNumber*
@@ -55066,15 +21103,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -55097,295 +21133,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getContactCISSettings
- Retrieves CIS settings for a specific contact in a Xero organisation
-
-
-
-
-
-
-
- /Contacts/{ContactID}/CISSettings
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Contacts/{ContactID}/CISSettings"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID contactID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- CISSettings result = apiInstance.getContactCISSettings(accessToken, xeroTenantId, contactID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getContactCISSettings");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID contactID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact
- try {
- CISSettings result = apiInstance.getContactCISSettings(xeroTenantId, contactID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getContactCISSettings");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *contactID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves CIS settings for a specific contact in a Xero organisation
-[apiInstance getContactCISSettingsWith:xeroTenantId
- contactID:contactID
- completionHandler: ^(CISSettings output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getContactCISSettings(xeroTenantId, contactID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetContactCISSettingsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetContactCISSettingsAsync(accessToken, xeroTenantId, contactID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetContactCISSettings: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getContactCISSettings($xeroTenantId, $contactID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getContactCISSettings: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact
-
-eval {
- my $result = $api_instance->getContactCISSettings(xeroTenantId => $xeroTenantId, contactID => $contactID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getContactCISSettings: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getContactCISSettings
+ Retrieves CIS settings for a specific contact in a Xero organisation
+
+
+
+
+
+
+
+ /Contacts/{ContactID}/CISSettings
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -55408,43 +21183,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getContactCISSettings: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_contact_cis_settings(xero_tenant_id, contact_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_contact_cis_settings: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.contacts.read
- Grant read-only access to contacts and contact groups
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ContactID*
+
+
+ Scopes
+
+
+
+ accounting.contacts.read
+ Grant read-only access to contacts and contact groups
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ContactID*
@@ -55470,15 +21227,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -55501,294 +21257,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getContactGroup
- Retrieves a specific contact group by using a unique contact group Id
-
-
-
-
-
-
-
- /ContactGroups/{ContactGroupID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ContactGroups/{ContactGroupID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID contactGroupID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- ContactGroups result = apiInstance.getContactGroup(accessToken, xeroTenantId, contactGroupID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getContactGroup");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID contactGroupID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact Group
- try {
- ContactGroups result = apiInstance.getContactGroup(xeroTenantId, contactGroupID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getContactGroup");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *contactGroupID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact Group (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific contact group by using a unique contact group Id
-[apiInstance getContactGroupWith:xeroTenantId
- contactGroupID:contactGroupID
- completionHandler: ^(ContactGroups output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactGroupID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getContactGroup(xeroTenantId, contactGroupID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetContactGroupExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactGroupID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetContactGroupAsync(accessToken, xeroTenantId, contactGroupID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetContactGroup: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactGroupID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getContactGroup($xeroTenantId, $contactGroupID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getContactGroup: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactGroupID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact Group
-
-eval {
- my $result = $api_instance->getContactGroup(xeroTenantId => $xeroTenantId, contactGroupID => $contactGroupID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getContactGroup: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getContactGroup
+ Retrieves a specific contact group by using a unique contact group Id
+
+
+
+
+
+
+
+ /ContactGroups/{ContactGroupID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -55811,43 +21307,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getContactGroup: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_group_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_contact_group(xero_tenant_id, contact_group_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_contact_group: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.contacts.read
- Grant read-only access to contacts and contact groups
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ContactGroupID*
+
+
+ Scopes
+
+
+
+ accounting.contacts.read
+ Grant read-only access to contacts and contact groups
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ContactGroupID*
@@ -55873,15 +21351,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -55904,303 +21381,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getContactGroups
- Retrieves the contact Id and name of all the contacts in a contact group
-
-
-
-
-
-
-
- /ContactGroups
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ContactGroups?where=Status=="ACTIVE"&order=Name ASC"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- String where = 'Status=="ACTIVE"';
- String order = 'Name ASC';
-
- try {
- ContactGroups result = apiInstance.getContactGroups(accessToken, xeroTenantId, where, order);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getContactGroups");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- String where = Status=="ACTIVE"; // String | Filter by an any element
- String order = Name ASC; // String | Order by an any element
- try {
- ContactGroups result = apiInstance.getContactGroups(xeroTenantId, where, order);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getContactGroups");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-String *where = Status=="ACTIVE"; // Filter by an any element (optional) (default to null)
-String *order = Name ASC; // Order by an any element (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves the contact Id and name of all the contacts in a contact group
-[apiInstance getContactGroupsWith:xeroTenantId
- where:where
- order:order
- completionHandler: ^(ContactGroups output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const where = 'Status=="ACTIVE"';
-const order = 'Name ASC';
-
-try {
- const response = await xero.accountingApi.getContactGroups(xeroTenantId, where, order);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetContactGroupsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var where = "Status==\"ACTIVE\"";
- var order = "Name ASC";
-
- try {
- var result = await apiInstance.GetContactGroupsAsync(accessToken, xeroTenantId, where, order);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetContactGroups: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$where = "Status=="' . \XeroAPI\XeroPHP\Models\Accounting\ContactGroup::STATUS_ACTIVE . '"";
-$order = "Name ASC";
-
-try {
- $result = $apiInstance->getContactGroups($xeroTenantId, $where, $order);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getContactGroups: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $where = Status=="ACTIVE"; # String | Filter by an any element
-my $order = Name ASC; # String | Order by an any element
-
-eval {
- my $result = $api_instance->getContactGroups(xeroTenantId => $xeroTenantId, where => $where, order => $order);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getContactGroups: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getContactGroups
+ Retrieves the contact Id and name of all the contacts in a contact group
+
+
+
+
+
+
+
+ /ContactGroups
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -56224,45 +21432,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getContactGroups: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-where = 'Status==#{XeroRuby::Accounting::ContactGroup::ACTIVE}'
-order = 'Name ASC'
-
-begin
- response = xero_client.accounting_api.get_contact_groups(xero_tenant_id, where, order)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_contact_groups: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.contacts.read
- Grant read-only access to contacts and contact groups
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.contacts.read
+ Grant read-only access to contacts and contact groups
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -56285,17 +21473,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -56315,7 +21500,7 @@ Parameters
- order
+ order
@@ -56335,292 +21520,34 @@ Parameters
-
-
-
-
-
-
-
-
- getContactHistory
- Retrieves history records for a specific contact
-
-
-
-
-
-
-
- /Contacts/{ContactID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Contacts/{ContactID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID contactID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- HistoryRecords result = apiInstance.getContactHistory(accessToken, xeroTenantId, contactID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getContactHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID contactID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact
- try {
- HistoryRecords result = apiInstance.getContactHistory(xeroTenantId, contactID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getContactHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *contactID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves history records for a specific contact
-[apiInstance getContactHistoryWith:xeroTenantId
- contactID:contactID
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getContactHistory(xeroTenantId, contactID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetContactHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetContactHistoryAsync(accessToken, xeroTenantId, contactID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetContactHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getContactHistory($xeroTenantId, $contactID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getContactHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact
-
-eval {
- my $result = $api_instance->getContactHistory(xeroTenantId => $xeroTenantId, contactID => $contactID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getContactHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getContactHistory
+ Retrieves history records for a specific contact
+
+
+
+
+
+
+
+ /Contacts/{ContactID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -56643,43 +21570,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getContactHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_contact_history(xero_tenant_id, contact_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_contact_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.contacts.read
- Grant read-only access to contacts and contact groups
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ContactID*
+
+
+ Scopes
+
+
+
+ accounting.contacts.read
+ Grant read-only access to contacts and contact groups
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ContactID*
@@ -56705,15 +21614,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -56736,336 +21644,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getContacts
- Retrieves all contacts in a Xero organisation
-
-
-
-
-
-
-
- /Contacts
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Contacts?where=ContactStatus=="ACTIVE"&order=Name ASC&IDs="00000000-0000-0000-0000-000000000000"&page=1&includeArchived=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- String where = 'ContactStatus=="ACTIVE"';
- String order = 'Name ASC';
- array[UUID] iDs = "00000000-0000-0000-0000-000000000000";
- Integer page = 1;
- Boolean includeArchived = true;
-
- try {
- Contacts result = apiInstance.getContacts(accessToken, xeroTenantId, ifModifiedSince, where, order, iDs, page, includeArchived);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getContacts");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- String where = ContactStatus=="ACTIVE"; // String | Filter by an any element
- String order = Name ASC; // String | Order by an any element
- array[UUID] iDs = "00000000-0000-0000-0000-000000000000"; // array[UUID] | Filter by a comma separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call.
- Integer page = 1; // Integer | e.g. page=1 - Up to 100 contacts will be returned in a single API call.
- Boolean includeArchived = true; // Boolean | e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response
- try {
- Contacts result = apiInstance.getContacts(xeroTenantId, ifModifiedSince, where, order, iDs, page, includeArchived);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getContacts");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-String *where = ContactStatus=="ACTIVE"; // Filter by an any element (optional) (default to null)
-String *order = Name ASC; // Order by an any element (optional) (default to null)
-array[UUID] *iDs = "00000000-0000-0000-0000-000000000000"; // Filter by a comma separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call. (optional) (default to null)
-Integer *page = 1; // e.g. page=1 - Up to 100 contacts will be returned in a single API call. (optional) (default to null)
-Boolean *includeArchived = true; // e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves all contacts in a Xero organisation
-[apiInstance getContactsWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- where:where
- order:order
- iDs:iDs
- page:page
- includeArchived:includeArchived
- completionHandler: ^(Contacts output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const where = 'ContactStatus=="ACTIVE"';
-const order = 'Name ASC';
-const iDs = ["00000000-0000-0000-0000-000000000000"];
-const page = 1;
-const includeArchived = true;
-
-try {
- const response = await xero.accountingApi.getContacts(xeroTenantId, ifModifiedSince, where, order, iDs, page, includeArchived);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetContactsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var where = "ContactStatus==\"ACTIVE\"";
- var order = "Name ASC";
- var iDs = new List<Guid>{Guid.Parse("00000000-0000-0000-0000-000000000000")};
- var page = 1;
- var includeArchived = true;
-
- try {
- var result = await apiInstance.GetContactsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order, iDs, page, includeArchived);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetContacts: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$where = "ContactStatus=="' . \XeroAPI\XeroPHP\Models\Accounting\Contact::CONTACT_STATUS_ACTIVE . '"";
-$order = "Name ASC";
-$iDs = array("00000000-0000-0000-0000-000000000000")
-$page = 1;
-$includeArchived = true;
-
-try {
- $result = $apiInstance->getContacts($xeroTenantId, $ifModifiedSince, $where, $order, $iDs, $page, $includeArchived);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getContacts: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $where = ContactStatus=="ACTIVE"; # String | Filter by an any element
-my $order = Name ASC; # String | Order by an any element
-my $iDs = ["00000000-0000-0000-0000-000000000000"]; # array[UUID] | Filter by a comma separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call.
-my $page = 1; # Integer | e.g. page=1 - Up to 100 contacts will be returned in a single API call.
-my $includeArchived = true; # Boolean | e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response
-
-eval {
- my $result = $api_instance->getContacts(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, where => $where, order => $order, iDs => $iDs, page => $page, includeArchived => $includeArchived);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getContacts: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getContacts
+ Retrieves all contacts in a Xero organisation
+
+
+
+
+
+
+
+ /Contacts
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -57092,49 +21698,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getContacts: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-where = 'ContactStatus==#{XeroRuby::Accounting::Contact::ACTIVE}'
-order = 'Name ASC'
-ids = ["00000000-0000-0000-0000-000000000000"]
-page = 1
-include_archived = true
-
-begin
- response = xero_client.accounting_api.get_contacts(xero_tenant_id, if_modified_since, where, order, ids, page, include_archived)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_contacts: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.contacts.read
- Grant read-only access to contacts and contact groups
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.contacts.read
+ Grant read-only access to contacts and contact groups
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -57157,7 +21739,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -57180,17 +21762,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -57210,7 +21789,7 @@ Parameters
- order
+ order
@@ -57230,7 +21809,7 @@ Parameters
- IDs
+ IDs
@@ -57253,7 +21832,7 @@ Parameters
- page
+ page
@@ -57273,7 +21852,7 @@ Parameters
- includeArchived
+ includeArchived
@@ -57293,300 +21872,34 @@ Parameters
-
-
-
-
-
-
-
-
- getCreditNote
- Retrieves a specific credit note using a unique credit note Id
-
-
-
-
-
-
-
- /CreditNotes/{CreditNoteID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/CreditNotes/{CreditNoteID}?unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID creditNoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- Integer unitdp = 4;
-
- try {
- CreditNotes result = apiInstance.getCreditNote(accessToken, xeroTenantId, creditNoteID, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getCreditNote");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID creditNoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Credit Note
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- CreditNotes result = apiInstance.getCreditNote(xeroTenantId, creditNoteID, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getCreditNote");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *creditNoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Credit Note (default to null)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific credit note using a unique credit note Id
-[apiInstance getCreditNoteWith:xeroTenantId
- creditNoteID:creditNoteID
- unitdp:unitdp
- completionHandler: ^(CreditNotes output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const creditNoteID = '00000000-0000-0000-0000-000000000000';
-const unitdp = 4;
-
-try {
- const response = await xero.accountingApi.getCreditNote(xeroTenantId, creditNoteID, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetCreditNoteExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var creditNoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var unitdp = 4;
-
- try {
- var result = await apiInstance.GetCreditNoteAsync(accessToken, xeroTenantId, creditNoteID, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetCreditNote: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$creditNoteID = "00000000-0000-0000-0000-000000000000";
-$unitdp = 4;
-
-try {
- $result = $apiInstance->getCreditNote($xeroTenantId, $creditNoteID, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getCreditNote: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $creditNoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Credit Note
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->getCreditNote(xeroTenantId => $xeroTenantId, creditNoteID => $creditNoteID, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getCreditNote: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getCreditNote
+ Retrieves a specific credit note using a unique credit note Id
+
+
+
+
+
+
+
+ /CreditNotes/{CreditNoteID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -57609,44 +21922,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getCreditNote: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-credit_note_id = '00000000-0000-0000-0000-000000000000'
-unitdp = 4
-
-begin
- response = xero_client.accounting_api.get_credit_note(xero_tenant_id, credit_note_id, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_credit_note: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- CreditNoteID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ CreditNoteID*
@@ -57672,15 +21966,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -57703,17 +21996,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- unitdp
+
+ Query parameters
+
+
+ Name
+ Description
+
+ unitdp
@@ -57733,292 +22023,34 @@ Parameters
-
-
-
-
-
-
-
-
- getCreditNoteAsPdf
- Retrieves credit notes as PDF files
-
-
-
-
-
-
-
- /CreditNotes/{CreditNoteID}/pdf
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/CreditNotes/{CreditNoteID}/pdf"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID creditNoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- ByteArrayInputStream result = apiInstance.getCreditNoteAsPdf(accessToken, xeroTenantId, creditNoteID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getCreditNoteAsPdf");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID creditNoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Credit Note
- try {
- File result = apiInstance.getCreditNoteAsPdf(xeroTenantId, creditNoteID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getCreditNoteAsPdf");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *creditNoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Credit Note (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves credit notes as PDF files
-[apiInstance getCreditNoteAsPdfWith:xeroTenantId
- creditNoteID:creditNoteID
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const creditNoteID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getCreditNoteAsPdf(xeroTenantId, creditNoteID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetCreditNoteAsPdfExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var creditNoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetCreditNoteAsPdfAsync(accessToken, xeroTenantId, creditNoteID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetCreditNoteAsPdf: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$creditNoteID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getCreditNoteAsPdf($xeroTenantId, $creditNoteID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getCreditNoteAsPdf: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $creditNoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Credit Note
-
-eval {
- my $result = $api_instance->getCreditNoteAsPdf(xeroTenantId => $xeroTenantId, creditNoteID => $creditNoteID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getCreditNoteAsPdf: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getCreditNoteAsPdf
+ Retrieves credit notes as PDF files
+
+
+
+
+
+
+
+ /CreditNotes/{CreditNoteID}/pdf
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -58041,43 +22073,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getCreditNoteAsPdf: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-credit_note_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_credit_note_as_pdf(xero_tenant_id, credit_note_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_credit_note_as_pdf: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- CreditNoteID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ CreditNoteID*
@@ -58103,15 +22117,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -58134,311 +22147,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getCreditNoteAttachmentByFileName
- Retrieves a specific attachment on a specific credit note by file name
-
-
-
-
-
-
-
- /CreditNotes/{CreditNoteID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/CreditNotes/{CreditNoteID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID creditNoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getCreditNoteAttachmentByFileName(accessToken, xeroTenantId, creditNoteID, fileName, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getCreditNoteAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID creditNoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Credit Note
- String fileName = xero-dev.jpg; // String | Name of the attachment
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getCreditNoteAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *creditNoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Credit Note (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific attachment on a specific credit note by file name
-[apiInstance getCreditNoteAttachmentByFileNameWith:xeroTenantId
- creditNoteID:creditNoteID
- fileName:fileName
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const creditNoteID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetCreditNoteAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var creditNoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetCreditNoteAttachmentByFileNameAsync(accessToken, xeroTenantId, creditNoteID, fileName, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetCreditNoteAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$creditNoteID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getCreditNoteAttachmentByFileName($xeroTenantId, $creditNoteID, $fileName, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getCreditNoteAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $creditNoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Credit Note
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getCreditNoteAttachmentByFileName(xeroTenantId => $xeroTenantId, creditNoteID => $creditNoteID, fileName => $fileName, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getCreditNoteAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getCreditNoteAttachmentByFileName
+ Retrieves a specific attachment on a specific credit note by file name
+
+
+
+
+
+
+
+ /CreditNotes/{CreditNoteID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -58463,45 +22199,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getCreditNoteAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-credit_note_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_credit_note_attachment_by_file_name(xero_tenant_id, credit_note_id, file_name, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_credit_note_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- CreditNoteID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ CreditNoteID*
@@ -58527,7 +22243,7 @@ Parameters
- FileName*
+ FileName*
@@ -58550,15 +22266,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -58581,7 +22296,7 @@ Parameters
- contentType*
+ contentType*
@@ -58604,311 +22319,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getCreditNoteAttachmentById
- Retrieves a specific attachment from a specific credit note using a unique attachment Id
-
-
-
-
-
-
-
- /CreditNotes/{CreditNoteID}/Attachments/{AttachmentID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/CreditNotes/{CreditNoteID}/Attachments/{AttachmentID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID creditNoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- UUID attachmentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getCreditNoteAttachmentById(accessToken, xeroTenantId, creditNoteID, attachmentID, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getCreditNoteAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID creditNoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Credit Note
- UUID attachmentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Attachment object
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getCreditNoteAttachmentById(xeroTenantId, creditNoteID, attachmentID, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getCreditNoteAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *creditNoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Credit Note (default to null)
-UUID *attachmentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Attachment object (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific attachment from a specific credit note using a unique attachment Id
-[apiInstance getCreditNoteAttachmentByIdWith:xeroTenantId
- creditNoteID:creditNoteID
- attachmentID:attachmentID
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const creditNoteID = '00000000-0000-0000-0000-000000000000';
-const attachmentID = '00000000-0000-0000-0000-000000000000';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getCreditNoteAttachmentById(xeroTenantId, creditNoteID, attachmentID, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetCreditNoteAttachmentByIdExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var creditNoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var attachmentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetCreditNoteAttachmentByIdAsync(accessToken, xeroTenantId, creditNoteID, attachmentID, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetCreditNoteAttachmentById: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$creditNoteID = "00000000-0000-0000-0000-000000000000";
-$attachmentID = "00000000-0000-0000-0000-000000000000";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getCreditNoteAttachmentById($xeroTenantId, $creditNoteID, $attachmentID, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getCreditNoteAttachmentById: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $creditNoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Credit Note
-my $attachmentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Attachment object
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getCreditNoteAttachmentById(xeroTenantId => $xeroTenantId, creditNoteID => $creditNoteID, attachmentID => $attachmentID, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getCreditNoteAttachmentById: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getCreditNoteAttachmentById
+ Retrieves a specific attachment from a specific credit note using a unique attachment Id
+
+
+
+
+
+
+
+ /CreditNotes/{CreditNoteID}/Attachments/{AttachmentID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -58933,45 +22371,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getCreditNoteAttachmentById: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-credit_note_id = '00000000-0000-0000-0000-000000000000'
-attachment_id = '00000000-0000-0000-0000-000000000000'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_credit_note_attachment_by_id(xero_tenant_id, credit_note_id, attachment_id, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_credit_note_attachment_by_id: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- CreditNoteID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ CreditNoteID*
@@ -58997,7 +22415,7 @@ Parameters
- AttachmentID*
+ AttachmentID*
@@ -59023,15 +22441,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -59054,7 +22471,7 @@ Parameters
- contentType*
+ contentType*
@@ -59077,295 +22494,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getCreditNoteAttachments
- Retrieves attachments for a specific credit notes
-
-
-
-
-
-
-
- /CreditNotes/{CreditNoteID}/Attachments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/CreditNotes/{CreditNoteID}/Attachments"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID creditNoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Attachments result = apiInstance.getCreditNoteAttachments(accessToken, xeroTenantId, creditNoteID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getCreditNoteAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID creditNoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Credit Note
- try {
- Attachments result = apiInstance.getCreditNoteAttachments(xeroTenantId, creditNoteID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getCreditNoteAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *creditNoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Credit Note (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves attachments for a specific credit notes
-[apiInstance getCreditNoteAttachmentsWith:xeroTenantId
- creditNoteID:creditNoteID
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const creditNoteID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getCreditNoteAttachments(xeroTenantId, creditNoteID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetCreditNoteAttachmentsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var creditNoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetCreditNoteAttachmentsAsync(accessToken, xeroTenantId, creditNoteID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetCreditNoteAttachments: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$creditNoteID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getCreditNoteAttachments($xeroTenantId, $creditNoteID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getCreditNoteAttachments: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $creditNoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Credit Note
-
-eval {
- my $result = $api_instance->getCreditNoteAttachments(xeroTenantId => $xeroTenantId, creditNoteID => $creditNoteID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getCreditNoteAttachments: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getCreditNoteAttachments
+ Retrieves attachments for a specific credit notes
+
+
+
+
+
+
+
+ /CreditNotes/{CreditNoteID}/Attachments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -59388,43 +22544,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getCreditNoteAttachments: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-credit_note_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_credit_note_attachments(xero_tenant_id, credit_note_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_credit_note_attachments: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- CreditNoteID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ CreditNoteID*
@@ -59450,15 +22588,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -59481,296 +22618,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getCreditNoteHistory
- Retrieves history records of a specific credit note
-
-
-
-
-
-
-
- /CreditNotes/{CreditNoteID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/CreditNotes/{CreditNoteID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID creditNoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- HistoryRecords result = apiInstance.getCreditNoteHistory(accessToken, xeroTenantId, creditNoteID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getCreditNoteHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID creditNoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Credit Note
- try {
- HistoryRecords result = apiInstance.getCreditNoteHistory(xeroTenantId, creditNoteID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getCreditNoteHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *creditNoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Credit Note (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves history records of a specific credit note
-[apiInstance getCreditNoteHistoryWith:xeroTenantId
- creditNoteID:creditNoteID
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const creditNoteID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getCreditNoteHistory(xeroTenantId, creditNoteID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetCreditNoteHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var creditNoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetCreditNoteHistoryAsync(accessToken, xeroTenantId, creditNoteID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetCreditNoteHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$creditNoteID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getCreditNoteHistory($xeroTenantId, $creditNoteID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getCreditNoteHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $creditNoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Credit Note
-
-eval {
- my $result = $api_instance->getCreditNoteHistory(xeroTenantId => $xeroTenantId, creditNoteID => $creditNoteID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getCreditNoteHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getCreditNoteHistory
+ Retrieves history records of a specific credit note
+
+
+
+
+
+
+
+ /CreditNotes/{CreditNoteID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -59793,43 +22668,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getCreditNoteHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-credit_note_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_credit_note_history(xero_tenant_id, credit_note_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_credit_note_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- CreditNoteID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ CreditNoteID*
@@ -59855,15 +22712,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -59886,328 +22742,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getCreditNotes
- Retrieves any credit notes
-
-
-
-
-
-
-
- /CreditNotes
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/CreditNotes?where=Status=="DRAFT"&order=CreditNoteNumber ASC&page=1&unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- String where = 'Status=="DRAFT"';
- String order = 'CreditNoteNumber ASC';
- Integer page = 1;
- Integer unitdp = 4;
-
- try {
- CreditNotes result = apiInstance.getCreditNotes(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getCreditNotes");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- String where = Status=="DRAFT"; // String | Filter by an any element
- String order = CreditNoteNumber ASC; // String | Order by an any element
- Integer page = 1; // Integer | 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
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- CreditNotes result = apiInstance.getCreditNotes(xeroTenantId, ifModifiedSince, where, order, page, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getCreditNotes");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-String *where = Status=="DRAFT"; // Filter by an any element (optional) (default to null)
-String *order = CreditNoteNumber ASC; // Order by an any element (optional) (default to null)
-Integer *page = 1; // 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) (default to null)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves any credit notes
-[apiInstance getCreditNotesWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- where:where
- order:order
- page:page
- unitdp:unitdp
- completionHandler: ^(CreditNotes output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const where = 'Status=="DRAFT"';
-const order = 'CreditNoteNumber ASC';
-const page = 1;
-const unitdp = 4;
-
-try {
- const response = await xero.accountingApi.getCreditNotes(xeroTenantId, ifModifiedSince, where, order, page, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetCreditNotesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var where = "Status==\"DRAFT\"";
- var order = "CreditNoteNumber ASC";
- var page = 1;
- var unitdp = 4;
-
- try {
- var result = await apiInstance.GetCreditNotesAsync(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetCreditNotes: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$where = "Status=="' . \XeroAPI\XeroPHP\Models\Accounting\CreditNote::STATUS_DRAFT . '"";
-$order = "CreditNoteNumber ASC";
-$page = 1;
-$unitdp = 4;
-
-try {
- $result = $apiInstance->getCreditNotes($xeroTenantId, $ifModifiedSince, $where, $order, $page, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getCreditNotes: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $where = Status=="DRAFT"; # String | Filter by an any element
-my $order = CreditNoteNumber ASC; # String | Order by an any element
-my $page = 1; # Integer | 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
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->getCreditNotes(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, where => $where, order => $order, page => $page, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getCreditNotes: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getCreditNotes
+ Retrieves any credit notes
+
+
+
+
+
+
+
+ /CreditNotes
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -60232,48 +22794,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getCreditNotes: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-where = 'Status==#{XeroRuby::Accounting::CreditNote::DRAFT}'
-order = 'CreditNoteNumber ASC'
-page = 1
-unitdp = 4
-
-begin
- response = xero_client.accounting_api.get_credit_notes(xero_tenant_id, if_modified_since, where, order, page, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_credit_notes: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -60296,7 +22835,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -60319,17 +22858,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -60349,7 +22885,7 @@ Parameters
- order
+ order
@@ -60369,7 +22905,7 @@ Parameters
- page
+ page
@@ -60389,7 +22925,7 @@ Parameters
- unitdp
+ unitdp
@@ -60409,300 +22945,34 @@ Parameters
-
-
-
-
-
-
-
-
- getCurrencies
- Retrieves currencies for your Xero organisation
-
-
-
-
-
-
-
- /Currencies
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Currencies?where=Code=="USD"&order=Code ASC"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- String where = 'Code=="USD"';
- String order = 'Code ASC';
-
- try {
- Currencies result = apiInstance.getCurrencies(accessToken, xeroTenantId, where, order);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getCurrencies");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- String where = Code=="USD"; // String | Filter by an any element
- String order = Code ASC; // String | Order by an any element
- try {
- Currencies result = apiInstance.getCurrencies(xeroTenantId, where, order);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getCurrencies");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-String *where = Code=="USD"; // Filter by an any element (optional) (default to null)
-String *order = Code ASC; // Order by an any element (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves currencies for your Xero organisation
-[apiInstance getCurrenciesWith:xeroTenantId
- where:where
- order:order
- completionHandler: ^(Currencies output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const where = 'Code=="USD"';
-const order = 'Code ASC';
-
-try {
- const response = await xero.accountingApi.getCurrencies(xeroTenantId, where, order);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetCurrenciesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var where = "Code==\"USD\"";
- var order = "Code ASC";
-
- try {
- var result = await apiInstance.GetCurrenciesAsync(accessToken, xeroTenantId, where, order);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetCurrencies: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$where = "Code=="' . \XeroAPI\XeroPHP\Models\Accounting\CurrencyCode::USD . '"";
-$order = "Code ASC";
-
-try {
- $result = $apiInstance->getCurrencies($xeroTenantId, $where, $order);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getCurrencies: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $where = Code=="USD"; # String | Filter by an any element
-my $order = Code ASC; # String | Order by an any element
-
-eval {
- my $result = $api_instance->getCurrencies(xeroTenantId => $xeroTenantId, where => $where, order => $order);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getCurrencies: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getCurrencies
+ Retrieves currencies for your Xero organisation
+
+
+
+
+
+
+
+ /Currencies
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -60726,45 +22996,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getCurrencies: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-where = 'Code==#{XeroRuby::Accounting::CurrencyCode::USD}'
-order = 'Code ASC'
-
-begin
- response = xero_client.accounting_api.get_currencies(xero_tenant_id, where, order)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_currencies: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings.read
- Grant read-only access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings.read
+ Grant read-only access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -60787,17 +23037,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -60817,7 +23064,7 @@ Parameters
- order
+ order
@@ -60837,292 +23084,34 @@ Parameters
-
-
-
-
-
-
-
-
- getEmployee
- Retrieves a specific employee used in Xero payrun using a unique employee Id
-
-
-
-
-
-
-
- /Employees/{EmployeeID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Employees/{EmployeeID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID employeeID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Employees result = apiInstance.getEmployee(accessToken, xeroTenantId, employeeID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getEmployee");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID employeeID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Employee
- try {
- Employees result = apiInstance.getEmployee(xeroTenantId, employeeID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getEmployee");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *employeeID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Employee (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific employee used in Xero payrun using a unique employee Id
-[apiInstance getEmployeeWith:xeroTenantId
- employeeID:employeeID
- completionHandler: ^(Employees output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const employeeID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getEmployee(xeroTenantId, employeeID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetEmployeeExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var employeeID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetEmployeeAsync(accessToken, xeroTenantId, employeeID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetEmployee: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$employeeID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getEmployee($xeroTenantId, $employeeID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getEmployee: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $employeeID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Employee
-
-eval {
- my $result = $api_instance->getEmployee(xeroTenantId => $xeroTenantId, employeeID => $employeeID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getEmployee: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getEmployee
+ Retrieves a specific employee used in Xero payrun using a unique employee Id
+
+
+
+
+
+
+
+ /Employees/{EmployeeID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -61145,43 +23134,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getEmployee: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-employee_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_employee(xero_tenant_id, employee_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_employee: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings.read
- Grant read-only access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- EmployeeID*
+
+
+ Scopes
+
+
+
+ accounting.settings.read
+ Grant read-only access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ EmployeeID*
@@ -61207,15 +23178,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -61238,312 +23208,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getEmployees
- Retrieves employees used in Xero payrun
-
-
-
-
-
-
-
- /Employees
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Employees?where=Status=="ACTIVE"&order=LastName ASC"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- String where = 'Status=="ACTIVE"';
- String order = 'LastName ASC';
-
- try {
- Employees result = apiInstance.getEmployees(accessToken, xeroTenantId, ifModifiedSince, where, order);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getEmployees");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- String where = Status=="ACTIVE"; // String | Filter by an any element
- String order = LastName ASC; // String | Order by an any element
- try {
- Employees result = apiInstance.getEmployees(xeroTenantId, ifModifiedSince, where, order);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getEmployees");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-String *where = Status=="ACTIVE"; // Filter by an any element (optional) (default to null)
-String *order = LastName ASC; // Order by an any element (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves employees used in Xero payrun
-[apiInstance getEmployeesWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- where:where
- order:order
- completionHandler: ^(Employees output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const where = 'Status=="ACTIVE"';
-const order = 'LastName ASC';
-
-try {
- const response = await xero.accountingApi.getEmployees(xeroTenantId, ifModifiedSince, where, order);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetEmployeesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var where = "Status==\"ACTIVE\"";
- var order = "LastName ASC";
-
- try {
- var result = await apiInstance.GetEmployeesAsync(accessToken, xeroTenantId, ifModifiedSince, where, order);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetEmployees: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$where = "Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Employee::STATUS_ACTIVE . '"";
-$order = "LastName ASC";
-
-try {
- $result = $apiInstance->getEmployees($xeroTenantId, $ifModifiedSince, $where, $order);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getEmployees: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $where = Status=="ACTIVE"; # String | Filter by an any element
-my $order = LastName ASC; # String | Order by an any element
-
-eval {
- my $result = $api_instance->getEmployees(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, where => $where, order => $order);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getEmployees: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getEmployees
+ Retrieves employees used in Xero payrun
+
+
+
+
+
+
+
+ /Employees
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -61568,46 +23260,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getEmployees: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-where = 'Status==#{XeroRuby::Accounting::Employee::ACTIVE}'
-order = 'LastName ASC'
-
-begin
- response = xero_client.accounting_api.get_employees(xero_tenant_id, if_modified_since, where, order)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_employees: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings.read
- Grant read-only access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings.read
+ Grant read-only access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -61630,7 +23301,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -61653,17 +23324,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -61683,7 +23351,7 @@ Parameters
- order
+ order
@@ -61703,292 +23371,34 @@ Parameters
-
-
-
-
-
-
-
-
- getExpenseClaim
- Retrieves a specific expense claim using a unique expense claim Id
-
-
-
-
-
-
-
- /ExpenseClaims/{ExpenseClaimID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ExpenseClaims/{ExpenseClaimID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID expenseClaimID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- ExpenseClaims result = apiInstance.getExpenseClaim(accessToken, xeroTenantId, expenseClaimID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getExpenseClaim");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID expenseClaimID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a ExpenseClaim
- try {
- ExpenseClaims result = apiInstance.getExpenseClaim(xeroTenantId, expenseClaimID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getExpenseClaim");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *expenseClaimID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a ExpenseClaim (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific expense claim using a unique expense claim Id
-[apiInstance getExpenseClaimWith:xeroTenantId
- expenseClaimID:expenseClaimID
- completionHandler: ^(ExpenseClaims output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const expenseClaimID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getExpenseClaim(xeroTenantId, expenseClaimID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetExpenseClaimExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var expenseClaimID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetExpenseClaimAsync(accessToken, xeroTenantId, expenseClaimID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetExpenseClaim: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$expenseClaimID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getExpenseClaim($xeroTenantId, $expenseClaimID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getExpenseClaim: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $expenseClaimID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a ExpenseClaim
-
-eval {
- my $result = $api_instance->getExpenseClaim(xeroTenantId => $xeroTenantId, expenseClaimID => $expenseClaimID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getExpenseClaim: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getExpenseClaim
+ Retrieves a specific expense claim using a unique expense claim Id
+
+
+
+
+
+
+
+ /ExpenseClaims/{ExpenseClaimID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -62011,43 +23421,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getExpenseClaim: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-expense_claim_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_expense_claim(xero_tenant_id, expense_claim_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_expense_claim: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ExpenseClaimID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ExpenseClaimID*
@@ -62073,15 +23465,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -62104,295 +23495,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getExpenseClaimHistory
- Retrieves history records of a specific expense claim
-
-
-
-
-
-
-
- /ExpenseClaims/{ExpenseClaimID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ExpenseClaims/{ExpenseClaimID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID expenseClaimID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- HistoryRecords result = apiInstance.getExpenseClaimHistory(accessToken, xeroTenantId, expenseClaimID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getExpenseClaimHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID expenseClaimID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a ExpenseClaim
- try {
- HistoryRecords result = apiInstance.getExpenseClaimHistory(xeroTenantId, expenseClaimID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getExpenseClaimHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *expenseClaimID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a ExpenseClaim (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves history records of a specific expense claim
-[apiInstance getExpenseClaimHistoryWith:xeroTenantId
- expenseClaimID:expenseClaimID
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const expenseClaimID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getExpenseClaimHistory(xeroTenantId, expenseClaimID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetExpenseClaimHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var expenseClaimID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetExpenseClaimHistoryAsync(accessToken, xeroTenantId, expenseClaimID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetExpenseClaimHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$expenseClaimID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getExpenseClaimHistory($xeroTenantId, $expenseClaimID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getExpenseClaimHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $expenseClaimID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a ExpenseClaim
-
-eval {
- my $result = $api_instance->getExpenseClaimHistory(xeroTenantId => $xeroTenantId, expenseClaimID => $expenseClaimID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getExpenseClaimHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getExpenseClaimHistory
+ Retrieves history records of a specific expense claim
+
+
+
+
+
+
+
+ /ExpenseClaims/{ExpenseClaimID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -62415,43 +23545,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getExpenseClaimHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-expense_claim_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_expense_claim_history(xero_tenant_id, expense_claim_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_expense_claim_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ExpenseClaimID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ExpenseClaimID*
@@ -62477,15 +23589,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -62508,312 +23619,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getExpenseClaims
- Retrieves expense claims
-
-
-
-
-
-
-
- /ExpenseClaims
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ExpenseClaims?where=Status=="SUBMITTED"&order=Status ASC"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- String where = 'Status=="SUBMITTED"';
- String order = 'Status ASC';
-
- try {
- ExpenseClaims result = apiInstance.getExpenseClaims(accessToken, xeroTenantId, ifModifiedSince, where, order);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getExpenseClaims");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- String where = Status=="SUBMITTED"; // String | Filter by an any element
- String order = Status ASC; // String | Order by an any element
- try {
- ExpenseClaims result = apiInstance.getExpenseClaims(xeroTenantId, ifModifiedSince, where, order);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getExpenseClaims");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-String *where = Status=="SUBMITTED"; // Filter by an any element (optional) (default to null)
-String *order = Status ASC; // Order by an any element (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves expense claims
-[apiInstance getExpenseClaimsWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- where:where
- order:order
- completionHandler: ^(ExpenseClaims output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const where = 'Status=="SUBMITTED"';
-const order = 'Status ASC';
-
-try {
- const response = await xero.accountingApi.getExpenseClaims(xeroTenantId, ifModifiedSince, where, order);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetExpenseClaimsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var where = "Status==\"SUBMITTED\"";
- var order = "Status ASC";
-
- try {
- var result = await apiInstance.GetExpenseClaimsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetExpenseClaims: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$where = "Status=="' . \XeroAPI\XeroPHP\Models\Accounting\ExpenseClaim::STATUS_SUBMITTED . '"";
-$order = "Status ASC";
-
-try {
- $result = $apiInstance->getExpenseClaims($xeroTenantId, $ifModifiedSince, $where, $order);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getExpenseClaims: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $where = Status=="SUBMITTED"; # String | Filter by an any element
-my $order = Status ASC; # String | Order by an any element
-
-eval {
- my $result = $api_instance->getExpenseClaims(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, where => $where, order => $order);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getExpenseClaims: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getExpenseClaims
+ Retrieves expense claims
+
+
+
+
+
+
+
+ /ExpenseClaims
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -62838,46 +23671,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getExpenseClaims: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-where = 'Status==#{XeroRuby::Accounting::ExpenseClaim::SUBMITTED}'
-order = 'Status ASC'
-
-begin
- response = xero_client.accounting_api.get_expense_claims(xero_tenant_id, if_modified_since, where, order)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_expense_claims: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -62900,7 +23712,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -62923,17 +23735,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -62953,7 +23762,7 @@ Parameters
- order
+ order
@@ -62973,300 +23782,34 @@ Parameters
-
-
-
-
-
-
-
-
- getInvoice
- Retrieves a specific sales invoice or purchase bill using a unique invoice Id
-
-
-
-
-
-
-
- /Invoices/{InvoiceID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Invoices/{InvoiceID}?unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID invoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- Integer unitdp = 4;
-
- try {
- Invoices result = apiInstance.getInvoice(accessToken, xeroTenantId, invoiceID, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getInvoice");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID invoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Invoice
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- Invoices result = apiInstance.getInvoice(xeroTenantId, invoiceID, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getInvoice");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *invoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Invoice (default to null)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific sales invoice or purchase bill using a unique invoice Id
-[apiInstance getInvoiceWith:xeroTenantId
- invoiceID:invoiceID
- unitdp:unitdp
- completionHandler: ^(Invoices output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const invoiceID = '00000000-0000-0000-0000-000000000000';
-const unitdp = 4;
-
-try {
- const response = await xero.accountingApi.getInvoice(xeroTenantId, invoiceID, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetInvoiceExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var invoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var unitdp = 4;
-
- try {
- var result = await apiInstance.GetInvoiceAsync(accessToken, xeroTenantId, invoiceID, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetInvoice: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$invoiceID = "00000000-0000-0000-0000-000000000000";
-$unitdp = 4;
-
-try {
- $result = $apiInstance->getInvoice($xeroTenantId, $invoiceID, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getInvoice: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $invoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Invoice
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->getInvoice(xeroTenantId => $xeroTenantId, invoiceID => $invoiceID, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getInvoice: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getInvoice
+ Retrieves a specific sales invoice or purchase bill using a unique invoice Id
+
+
+
+
+
+
+
+ /Invoices/{InvoiceID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -63289,44 +23832,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getInvoice: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-invoice_id = '00000000-0000-0000-0000-000000000000'
-unitdp = 4
-
-begin
- response = xero_client.accounting_api.get_invoice(xero_tenant_id, invoice_id, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_invoice: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- InvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ InvoiceID*
@@ -63352,15 +23876,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -63383,17 +23906,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- unitdp
+
+ Query parameters
+
+
+ Name
+ Description
+
+ unitdp
@@ -63413,292 +23933,34 @@ Parameters
-
-
-
-
-
-
-
-
- getInvoiceAsPdf
- Retrieves invoices or purchase bills as PDF files
-
-
-
-
-
-
-
- /Invoices/{InvoiceID}/pdf
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Invoices/{InvoiceID}/pdf"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID invoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- ByteArrayInputStream result = apiInstance.getInvoiceAsPdf(accessToken, xeroTenantId, invoiceID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getInvoiceAsPdf");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID invoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Invoice
- try {
- File result = apiInstance.getInvoiceAsPdf(xeroTenantId, invoiceID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getInvoiceAsPdf");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *invoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Invoice (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves invoices or purchase bills as PDF files
-[apiInstance getInvoiceAsPdfWith:xeroTenantId
- invoiceID:invoiceID
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const invoiceID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getInvoiceAsPdf(xeroTenantId, invoiceID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetInvoiceAsPdfExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var invoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetInvoiceAsPdfAsync(accessToken, xeroTenantId, invoiceID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetInvoiceAsPdf: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$invoiceID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getInvoiceAsPdf($xeroTenantId, $invoiceID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getInvoiceAsPdf: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $invoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Invoice
-
-eval {
- my $result = $api_instance->getInvoiceAsPdf(xeroTenantId => $xeroTenantId, invoiceID => $invoiceID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getInvoiceAsPdf: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getInvoiceAsPdf
+ Retrieves invoices or purchase bills as PDF files
+
+
+
+
+
+
+
+ /Invoices/{InvoiceID}/pdf
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -63721,43 +23983,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getInvoiceAsPdf: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-invoice_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_invoice_as_pdf(xero_tenant_id, invoice_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_invoice_as_pdf: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- InvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ InvoiceID*
@@ -63783,15 +24027,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -63814,311 +24057,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getInvoiceAttachmentByFileName
- Retrieves an attachment from a specific invoice or purchase bill by filename
-
-
-
-
-
-
-
- /Invoices/{InvoiceID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Invoices/{InvoiceID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID invoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getInvoiceAttachmentByFileName(accessToken, xeroTenantId, invoiceID, fileName, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getInvoiceAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID invoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Invoice
- String fileName = xero-dev.jpg; // String | Name of the attachment
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getInvoiceAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *invoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Invoice (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves an attachment from a specific invoice or purchase bill by filename
-[apiInstance getInvoiceAttachmentByFileNameWith:xeroTenantId
- invoiceID:invoiceID
- fileName:fileName
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const invoiceID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetInvoiceAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var invoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetInvoiceAttachmentByFileNameAsync(accessToken, xeroTenantId, invoiceID, fileName, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetInvoiceAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$invoiceID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getInvoiceAttachmentByFileName($xeroTenantId, $invoiceID, $fileName, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getInvoiceAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $invoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Invoice
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getInvoiceAttachmentByFileName(xeroTenantId => $xeroTenantId, invoiceID => $invoiceID, fileName => $fileName, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getInvoiceAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getInvoiceAttachmentByFileName
+ Retrieves an attachment from a specific invoice or purchase bill by filename
+
+
+
+
+
+
+
+ /Invoices/{InvoiceID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -64143,45 +24109,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getInvoiceAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-invoice_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_invoice_attachment_by_file_name(xero_tenant_id, invoice_id, file_name, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_invoice_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- InvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ InvoiceID*
@@ -64207,7 +24153,7 @@ Parameters
- FileName*
+ FileName*
@@ -64230,15 +24176,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -64261,7 +24206,7 @@ Parameters
- contentType*
+ contentType*
@@ -64284,311 +24229,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getInvoiceAttachmentById
- Retrieves a specific attachment from a specific invoices or purchase bills by using a unique attachment Id
-
-
-
-
-
-
-
- /Invoices/{InvoiceID}/Attachments/{AttachmentID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Invoices/{InvoiceID}/Attachments/{AttachmentID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID invoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- UUID attachmentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getInvoiceAttachmentById(accessToken, xeroTenantId, invoiceID, attachmentID, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getInvoiceAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID invoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Invoice
- UUID attachmentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Attachment object
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getInvoiceAttachmentById(xeroTenantId, invoiceID, attachmentID, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getInvoiceAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *invoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Invoice (default to null)
-UUID *attachmentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Attachment object (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific attachment from a specific invoices or purchase bills by using a unique attachment Id
-[apiInstance getInvoiceAttachmentByIdWith:xeroTenantId
- invoiceID:invoiceID
- attachmentID:attachmentID
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const invoiceID = '00000000-0000-0000-0000-000000000000';
-const attachmentID = '00000000-0000-0000-0000-000000000000';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getInvoiceAttachmentById(xeroTenantId, invoiceID, attachmentID, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetInvoiceAttachmentByIdExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var invoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var attachmentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetInvoiceAttachmentByIdAsync(accessToken, xeroTenantId, invoiceID, attachmentID, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetInvoiceAttachmentById: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$invoiceID = "00000000-0000-0000-0000-000000000000";
-$attachmentID = "00000000-0000-0000-0000-000000000000";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getInvoiceAttachmentById($xeroTenantId, $invoiceID, $attachmentID, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getInvoiceAttachmentById: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $invoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Invoice
-my $attachmentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Attachment object
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getInvoiceAttachmentById(xeroTenantId => $xeroTenantId, invoiceID => $invoiceID, attachmentID => $attachmentID, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getInvoiceAttachmentById: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getInvoiceAttachmentById
+ Retrieves a specific attachment from a specific invoices or purchase bills by using a unique attachment Id
+
+
+
+
+
+
+
+ /Invoices/{InvoiceID}/Attachments/{AttachmentID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -64613,45 +24281,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getInvoiceAttachmentById: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-invoice_id = '00000000-0000-0000-0000-000000000000'
-attachment_id = '00000000-0000-0000-0000-000000000000'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_invoice_attachment_by_id(xero_tenant_id, invoice_id, attachment_id, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_invoice_attachment_by_id: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- InvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ InvoiceID*
@@ -64677,7 +24325,7 @@ Parameters
- AttachmentID*
+ AttachmentID*
@@ -64703,15 +24351,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -64734,7 +24381,7 @@ Parameters
- contentType*
+ contentType*
@@ -64757,295 +24404,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getInvoiceAttachments
- Retrieves attachments for a specific invoice or purchase bill
-
-
-
-
-
-
-
- /Invoices/{InvoiceID}/Attachments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Invoices/{InvoiceID}/Attachments"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID invoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Attachments result = apiInstance.getInvoiceAttachments(accessToken, xeroTenantId, invoiceID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getInvoiceAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID invoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Invoice
- try {
- Attachments result = apiInstance.getInvoiceAttachments(xeroTenantId, invoiceID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getInvoiceAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *invoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Invoice (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves attachments for a specific invoice or purchase bill
-[apiInstance getInvoiceAttachmentsWith:xeroTenantId
- invoiceID:invoiceID
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const invoiceID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getInvoiceAttachments(xeroTenantId, invoiceID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetInvoiceAttachmentsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var invoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetInvoiceAttachmentsAsync(accessToken, xeroTenantId, invoiceID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetInvoiceAttachments: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$invoiceID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getInvoiceAttachments($xeroTenantId, $invoiceID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getInvoiceAttachments: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $invoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Invoice
-
-eval {
- my $result = $api_instance->getInvoiceAttachments(xeroTenantId => $xeroTenantId, invoiceID => $invoiceID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getInvoiceAttachments: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getInvoiceAttachments
+ Retrieves attachments for a specific invoice or purchase bill
+
+
+
+
+
+
+
+ /Invoices/{InvoiceID}/Attachments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -65068,43 +24454,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getInvoiceAttachments: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-invoice_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_invoice_attachments(xero_tenant_id, invoice_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_invoice_attachments: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- InvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ InvoiceID*
@@ -65130,15 +24498,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -65161,296 +24528,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getInvoiceHistory
- Retrieves history records for a specific invoice
-
-
-
-
-
-
-
- /Invoices/{InvoiceID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Invoices/{InvoiceID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID invoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- HistoryRecords result = apiInstance.getInvoiceHistory(accessToken, xeroTenantId, invoiceID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getInvoiceHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID invoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Invoice
- try {
- HistoryRecords result = apiInstance.getInvoiceHistory(xeroTenantId, invoiceID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getInvoiceHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *invoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Invoice (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves history records for a specific invoice
-[apiInstance getInvoiceHistoryWith:xeroTenantId
- invoiceID:invoiceID
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const invoiceID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getInvoiceHistory(xeroTenantId, invoiceID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetInvoiceHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var invoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetInvoiceHistoryAsync(accessToken, xeroTenantId, invoiceID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetInvoiceHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$invoiceID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getInvoiceHistory($xeroTenantId, $invoiceID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getInvoiceHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $invoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Invoice
-
-eval {
- my $result = $api_instance->getInvoiceHistory(xeroTenantId => $xeroTenantId, invoiceID => $invoiceID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getInvoiceHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getInvoiceHistory
+ Retrieves history records for a specific invoice
+
+
+
+
+
+
+
+ /Invoices/{InvoiceID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -65473,43 +24578,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getInvoiceHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-invoice_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_invoice_history(xero_tenant_id, invoice_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_invoice_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- InvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ InvoiceID*
@@ -65535,15 +24622,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -65566,287 +24652,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getInvoiceReminders
- Retrieves invoice reminder settings
-
-
-
-
-
-
-
- /InvoiceReminders/Settings
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/InvoiceReminders/Settings"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- try {
- InvoiceReminders result = apiInstance.getInvoiceReminders(accessToken, xeroTenantId);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getInvoiceReminders");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- try {
- InvoiceReminders result = apiInstance.getInvoiceReminders(xeroTenantId);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getInvoiceReminders");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves invoice reminder settings
-[apiInstance getInvoiceRemindersWith:xeroTenantId
- completionHandler: ^(InvoiceReminders output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
-try {
- const response = await xero.accountingApi.getInvoiceReminders(xeroTenantId);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetInvoiceRemindersExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
-
- try {
- var result = await apiInstance.GetInvoiceRemindersAsync(accessToken, xeroTenantId);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetInvoiceReminders: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-
-try {
- $result = $apiInstance->getInvoiceReminders($xeroTenantId);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getInvoiceReminders: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-
-eval {
- my $result = $api_instance->getInvoiceReminders(xeroTenantId => $xeroTenantId);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getInvoiceReminders: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getInvoiceReminders
+ Retrieves invoice reminder settings
+
+
+
+
+
+
+
+ /InvoiceReminders/Settings
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -65868,43 +24701,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getInvoiceReminders: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-
-begin
- response = xero_client.accounting_api.get_invoice_reminders(xero_tenant_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_invoice_reminders: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -65927,376 +24742,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getInvoices
- Retrieves sales invoices or purchase bills
-
-
-
-
-
-
-
- /Invoices
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Invoices?where=Status=="DRAFT"&order=InvoiceNumber ASC&IDs="00000000-0000-0000-0000-000000000000"&InvoiceNumbers="INV-001", "INV-002"&ContactIDs="00000000-0000-0000-0000-000000000000"&Statuses="DRAFT", "SUBMITTED"&page=1&includeArchived=true&createdByMyApp=false&unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- String where = 'Status=="DRAFT"';
- String order = 'InvoiceNumber ASC';
- array[UUID] iDs = "00000000-0000-0000-0000-000000000000";
- array[String] invoiceNumbers = "INV-001", "INV-002";
- array[UUID] contactIDs = "00000000-0000-0000-0000-000000000000";
- array[String] statuses = "DRAFT", "SUBMITTED";
- Integer page = 1;
- Boolean includeArchived = true;
- Boolean createdByMyApp = false;
- Integer unitdp = 4;
-
- try {
- Invoices result = apiInstance.getInvoices(accessToken, xeroTenantId, ifModifiedSince, where, order, iDs, invoiceNumbers, contactIDs, statuses, page, includeArchived, createdByMyApp, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getInvoices");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- String where = Status=="DRAFT"; // String | Filter by an any element
- String order = InvoiceNumber ASC; // String | Order by an any element
- array[UUID] iDs = "00000000-0000-0000-0000-000000000000"; // array[UUID] | Filter by a comma-separated list of InvoicesIDs.
- array[String] invoiceNumbers = "INV-001", "INV-002"; // array[String] | Filter by a comma-separated list of InvoiceNumbers.
- array[UUID] contactIDs = "00000000-0000-0000-0000-000000000000"; // array[UUID] | Filter by a comma-separated list of ContactIDs.
- array[String] statuses = "DRAFT", "SUBMITTED"; // array[String] | 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.
- Integer page = 1; // Integer | e.g. page=1 – Up to 100 invoices will be returned in a single API call with line items shown for each invoice
- Boolean includeArchived = true; // Boolean | e.g. includeArchived=true - Invoices with a status of ARCHIVED will be included in the response
- Boolean createdByMyApp = false; // Boolean | When set to true you'll only retrieve Invoices created by your app
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- Invoices result = apiInstance.getInvoices(xeroTenantId, ifModifiedSince, where, order, iDs, invoiceNumbers, contactIDs, statuses, page, includeArchived, createdByMyApp, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getInvoices");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-String *where = Status=="DRAFT"; // Filter by an any element (optional) (default to null)
-String *order = InvoiceNumber ASC; // Order by an any element (optional) (default to null)
-array[UUID] *iDs = "00000000-0000-0000-0000-000000000000"; // Filter by a comma-separated list of InvoicesIDs. (optional) (default to null)
-array[String] *invoiceNumbers = "INV-001", "INV-002"; // Filter by a comma-separated list of InvoiceNumbers. (optional) (default to null)
-array[UUID] *contactIDs = "00000000-0000-0000-0000-000000000000"; // Filter by a comma-separated list of ContactIDs. (optional) (default to null)
-array[String] *statuses = "DRAFT", "SUBMITTED"; // 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) (default to null)
-Integer *page = 1; // e.g. page=1 – Up to 100 invoices will be returned in a single API call with line items shown for each invoice (optional) (default to null)
-Boolean *includeArchived = true; // e.g. includeArchived=true - Invoices with a status of ARCHIVED will be included in the response (optional) (default to null)
-Boolean *createdByMyApp = false; // When set to true you'll only retrieve Invoices created by your app (optional) (default to null)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves sales invoices or purchase bills
-[apiInstance getInvoicesWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- where:where
- order:order
- iDs:iDs
- invoiceNumbers:invoiceNumbers
- contactIDs:contactIDs
- statuses:statuses
- page:page
- includeArchived:includeArchived
- createdByMyApp:createdByMyApp
- unitdp:unitdp
- completionHandler: ^(Invoices output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const where = 'Status=="DRAFT"';
-const order = 'InvoiceNumber ASC';
-const iDs = ["00000000-0000-0000-0000-000000000000"];
-const invoiceNumbers = ["INV-001", "INV-002"];
-const contactIDs = ["00000000-0000-0000-0000-000000000000"];
-const statuses = ["DRAFT", "SUBMITTED"];
-const page = 1;
-const includeArchived = true;
-const createdByMyApp = false;
-const unitdp = 4;
-
-try {
- const response = await xero.accountingApi.getInvoices(xeroTenantId, ifModifiedSince, where, order, iDs, invoiceNumbers, contactIDs, statuses, page, includeArchived, createdByMyApp, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetInvoicesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var where = "Status==\"DRAFT\"";
- var order = "InvoiceNumber ASC";
- var iDs = new List<Guid>{Guid.Parse("00000000-0000-0000-0000-000000000000")};
- var invoiceNumbers = new List<string>{"INV-001","INV-002"};
- var contactIDs = new List<Guid>{Guid.Parse("00000000-0000-0000-0000-000000000000")};
- var statuses = new List<string>{"DRAFT","SUBMITTED"};
- var page = 1;
- var includeArchived = true;
- var createdByMyApp = false;
- var unitdp = 4;
-
- try {
- var result = await apiInstance.GetInvoicesAsync(accessToken, xeroTenantId, ifModifiedSince, where, order, iDs, invoiceNumbers, contactIDs, statuses, page, includeArchived, createdByMyApp, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetInvoices: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$where = "Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Invoice::STATUS_DRAFT . '"";
-$order = "InvoiceNumber ASC";
-$iDs = array("00000000-0000-0000-0000-000000000000")
-$invoiceNumbers = array("INV-001", "INV-002")
-$contactIDs = array("00000000-0000-0000-0000-000000000000")
-$statuses = array("DRAFT", "SUBMITTED")
-$page = 1;
-$includeArchived = true;
-$createdByMyApp = false;
-$unitdp = 4;
-
-try {
- $result = $apiInstance->getInvoices($xeroTenantId, $ifModifiedSince, $where, $order, $iDs, $invoiceNumbers, $contactIDs, $statuses, $page, $includeArchived, $createdByMyApp, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getInvoices: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $where = Status=="DRAFT"; # String | Filter by an any element
-my $order = InvoiceNumber ASC; # String | Order by an any element
-my $iDs = ["00000000-0000-0000-0000-000000000000"]; # array[UUID] | Filter by a comma-separated list of InvoicesIDs.
-my $invoiceNumbers = ["INV-001", "INV-002"]; # array[String] | Filter by a comma-separated list of InvoiceNumbers.
-my $contactIDs = ["00000000-0000-0000-0000-000000000000"]; # array[UUID] | Filter by a comma-separated list of ContactIDs.
-my $statuses = ["DRAFT", "SUBMITTED"]; # array[String] | 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.
-my $page = 1; # Integer | e.g. page=1 – Up to 100 invoices will be returned in a single API call with line items shown for each invoice
-my $includeArchived = true; # Boolean | e.g. includeArchived=true - Invoices with a status of ARCHIVED will be included in the response
-my $createdByMyApp = false; # Boolean | When set to true you'll only retrieve Invoices created by your app
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->getInvoices(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, where => $where, order => $order, iDs => $iDs, invoiceNumbers => $invoiceNumbers, contactIDs => $contactIDs, statuses => $statuses, page => $page, includeArchived => $includeArchived, createdByMyApp => $createdByMyApp, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getInvoices: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getInvoices
+ Retrieves sales invoices or purchase bills
+
+
+
+
+
+
+
+ /Invoices
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -66327,54 +24800,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getInvoices: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-where = 'Status==#{XeroRuby::Accounting::Invoice::DRAFT}'
-order = 'InvoiceNumber ASC'
-ids = ["00000000-0000-0000-0000-000000000000"]
-invoice_numbers = ["INV-001", "INV-002"]
-contact_ids = ["00000000-0000-0000-0000-000000000000"]
-statuses = ["DRAFT", "SUBMITTED"]
-page = 1
-include_archived = true
-created_by_my_app = false
-unitdp = 4
-
-begin
- response = xero_client.accounting_api.get_invoices(xero_tenant_id, if_modified_since, where, order, ids, invoice_numbers, contact_ids, statuses, page, include_archived, created_by_my_app, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_invoices: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -66397,7 +24841,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -66420,17 +24864,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -66450,7 +24891,7 @@ Parameters
- order
+ order
@@ -66470,7 +24911,7 @@ Parameters
- IDs
+ IDs
@@ -66493,7 +24934,7 @@ Parameters
- InvoiceNumbers
+ InvoiceNumbers
@@ -66513,7 +24954,7 @@ Parameters
- ContactIDs
+ ContactIDs
@@ -66536,7 +24977,7 @@ Parameters
- Statuses
+ Statuses
@@ -66556,7 +24997,7 @@ Parameters
- page
+ page
@@ -66576,7 +25017,7 @@ Parameters
- includeArchived
+ includeArchived
@@ -66596,7 +25037,7 @@ Parameters
- createdByMyApp
+ createdByMyApp
@@ -66616,7 +25057,7 @@ Parameters
- unitdp
+ unitdp
@@ -66636,300 +25077,34 @@ Parameters
-
-
-
-
-
-
-
-
- getItem
- Retrieves a specific item using a unique item Id
-
-
-
-
-
-
-
- /Items/{ItemID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Items/{ItemID}?unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID itemID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- Integer unitdp = 4;
-
- try {
- Items result = apiInstance.getItem(accessToken, xeroTenantId, itemID, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getItem");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID itemID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Item
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- Items result = apiInstance.getItem(xeroTenantId, itemID, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getItem");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *itemID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Item (default to null)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific item using a unique item Id
-[apiInstance getItemWith:xeroTenantId
- itemID:itemID
- unitdp:unitdp
- completionHandler: ^(Items output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const itemID = '00000000-0000-0000-0000-000000000000';
-const unitdp = 4;
-
-try {
- const response = await xero.accountingApi.getItem(xeroTenantId, itemID, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetItemExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var itemID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var unitdp = 4;
-
- try {
- var result = await apiInstance.GetItemAsync(accessToken, xeroTenantId, itemID, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetItem: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$itemID = "00000000-0000-0000-0000-000000000000";
-$unitdp = 4;
-
-try {
- $result = $apiInstance->getItem($xeroTenantId, $itemID, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getItem: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $itemID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Item
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->getItem(xeroTenantId => $xeroTenantId, itemID => $itemID, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getItem: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getItem
+ Retrieves a specific item using a unique item Id
+
+
+
+
+
+
+
+ /Items/{ItemID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -66952,44 +25127,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getItem: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-item_id = '00000000-0000-0000-0000-000000000000'
-unitdp = 4
-
-begin
- response = xero_client.accounting_api.get_item(xero_tenant_id, item_id, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_item: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings.read
- Grant read-only access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ItemID*
+
+
+ Scopes
+
+
+
+ accounting.settings.read
+ Grant read-only access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ItemID*
@@ -67015,15 +25171,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -67046,17 +25201,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- unitdp
+
+ Query parameters
+
+
+ Name
+ Description
+
+ unitdp
@@ -67076,292 +25228,34 @@ Parameters
-
-
-
-
-
-
-
-
- getItemHistory
- Retrieves history for a specific item
-
-
-
-
-
-
-
- /Items/{ItemID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Items/{ItemID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID itemID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- HistoryRecords result = apiInstance.getItemHistory(accessToken, xeroTenantId, itemID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getItemHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID itemID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Item
- try {
- HistoryRecords result = apiInstance.getItemHistory(xeroTenantId, itemID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getItemHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *itemID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Item (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves history for a specific item
-[apiInstance getItemHistoryWith:xeroTenantId
- itemID:itemID
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const itemID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getItemHistory(xeroTenantId, itemID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetItemHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var itemID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetItemHistoryAsync(accessToken, xeroTenantId, itemID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetItemHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$itemID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getItemHistory($xeroTenantId, $itemID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getItemHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $itemID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Item
-
-eval {
- my $result = $api_instance->getItemHistory(xeroTenantId => $xeroTenantId, itemID => $itemID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getItemHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getItemHistory
+ Retrieves history for a specific item
+
+
+
+
+
+
+
+ /Items/{ItemID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -67384,43 +25278,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getItemHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-item_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_item_history(xero_tenant_id, item_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_item_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings.read
- Grant read-only access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ItemID*
+
+
+ Scopes
+
+
+
+ accounting.settings.read
+ Grant read-only access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ItemID*
@@ -67446,15 +25322,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -67477,320 +25352,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getItems
- Retrieves items
-
-
-
-
-
-
-
- /Items
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Items?where=IsSold==true&order=Code ASC&unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- String where = 'IsSold==true';
- String order = 'Code ASC';
- Integer unitdp = 4;
-
- try {
- Items result = apiInstance.getItems(accessToken, xeroTenantId, ifModifiedSince, where, order, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getItems");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- String where = IsSold==true; // String | Filter by an any element
- String order = Code ASC; // String | Order by an any element
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- Items result = apiInstance.getItems(xeroTenantId, ifModifiedSince, where, order, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getItems");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-String *where = IsSold==true; // Filter by an any element (optional) (default to null)
-String *order = Code ASC; // Order by an any element (optional) (default to null)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves items
-[apiInstance getItemsWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- where:where
- order:order
- unitdp:unitdp
- completionHandler: ^(Items output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const where = 'IsSold==true';
-const order = 'Code ASC';
-const unitdp = 4;
-
-try {
- const response = await xero.accountingApi.getItems(xeroTenantId, ifModifiedSince, where, order, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetItemsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var where = "IsSold==true";
- var order = "Code ASC";
- var unitdp = 4;
-
- try {
- var result = await apiInstance.GetItemsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetItems: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$where = "IsSold==true";
-$order = "Code ASC";
-$unitdp = 4;
-
-try {
- $result = $apiInstance->getItems($xeroTenantId, $ifModifiedSince, $where, $order, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getItems: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $where = IsSold==true; # String | Filter by an any element
-my $order = Code ASC; # String | Order by an any element
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->getItems(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, where => $where, order => $order, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getItems: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getItems
+ Retrieves items
+
+
+
+
+
+
+
+ /Items
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -67815,47 +25404,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getItems: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-where = 'IsSold==true'
-order = 'Code ASC'
-unitdp = 4
-
-begin
- response = xero_client.accounting_api.get_items(xero_tenant_id, if_modified_since, where, order, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_items: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings.read
- Grant read-only access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings.read
+ Grant read-only access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -67878,7 +25445,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -67901,17 +25468,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -67931,7 +25495,7 @@ Parameters
- order
+ order
@@ -67951,7 +25515,7 @@ Parameters
- unitdp
+ unitdp
@@ -67971,292 +25535,34 @@ Parameters
-
-
-
-
-
-
-
-
- getJournal
- Retrieves a specific journal using a unique journal Id.
-
-
-
-
-
-
-
- /Journals/{JournalID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Journals/{JournalID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID journalID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Journals result = apiInstance.getJournal(accessToken, xeroTenantId, journalID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getJournal");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID journalID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Journal
- try {
- Journals result = apiInstance.getJournal(xeroTenantId, journalID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getJournal");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *journalID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Journal (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific journal using a unique journal Id.
-[apiInstance getJournalWith:xeroTenantId
- journalID:journalID
- completionHandler: ^(Journals output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const journalID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getJournal(xeroTenantId, journalID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetJournalExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var journalID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetJournalAsync(accessToken, xeroTenantId, journalID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetJournal: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$journalID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getJournal($xeroTenantId, $journalID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getJournal: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $journalID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Journal
-
-eval {
- my $result = $api_instance->getJournal(xeroTenantId => $xeroTenantId, journalID => $journalID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getJournal: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getJournal
+ Retrieves a specific journal using a unique journal Id.
+
+
+
+
+
+
+
+ /Journals/{JournalID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -68279,43 +25585,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getJournal: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-journal_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_journal(xero_tenant_id, journal_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_journal: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.journals.read
- Grant read-only access to journals
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- JournalID*
+
+
+ Scopes
+
+
+
+ accounting.journals.read
+ Grant read-only access to journals
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ JournalID*
@@ -68341,15 +25629,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -68372,312 +25659,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getJournals
- Retrieves journals
-
-
-
-
-
-
-
- /Journals
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Journals?offset=10&paymentsOnly=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- Integer offset = 10;
- Boolean paymentsOnly = true;
-
- try {
- Journals result = apiInstance.getJournals(accessToken, xeroTenantId, ifModifiedSince, offset, paymentsOnly);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getJournals");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- Integer offset = 10; // Integer | Offset by a specified journal number. e.g. journals with a JournalNumber greater than the offset will be returned
- Boolean paymentsOnly = true; // Boolean | Filter to retrieve journals on a cash basis. Journals are returned on an accrual basis by default.
- try {
- Journals result = apiInstance.getJournals(xeroTenantId, ifModifiedSince, offset, paymentsOnly);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getJournals");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-Integer *offset = 10; // Offset by a specified journal number. e.g. journals with a JournalNumber greater than the offset will be returned (optional) (default to null)
-Boolean *paymentsOnly = true; // Filter to retrieve journals on a cash basis. Journals are returned on an accrual basis by default. (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves journals
-[apiInstance getJournalsWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- offset:offset
- paymentsOnly:paymentsOnly
- completionHandler: ^(Journals output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const offset = 10;
-const paymentsOnly = true;
-
-try {
- const response = await xero.accountingApi.getJournals(xeroTenantId, ifModifiedSince, offset, paymentsOnly);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetJournalsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var offset = 10;
- var paymentsOnly = true;
-
- try {
- var result = await apiInstance.GetJournalsAsync(accessToken, xeroTenantId, ifModifiedSince, offset, paymentsOnly);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetJournals: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$offset = 10;
-$paymentsOnly = true;
-
-try {
- $result = $apiInstance->getJournals($xeroTenantId, $ifModifiedSince, $offset, $paymentsOnly);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getJournals: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $offset = 10; # Integer | Offset by a specified journal number. e.g. journals with a JournalNumber greater than the offset will be returned
-my $paymentsOnly = true; # Boolean | Filter to retrieve journals on a cash basis. Journals are returned on an accrual basis by default.
-
-eval {
- my $result = $api_instance->getJournals(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, offset => $offset, paymentsOnly => $paymentsOnly);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getJournals: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getJournals
+ Retrieves journals
+
+
+
+
+
+
+
+ /Journals
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -68701,46 +25710,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getJournals: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-offset = 10
-paymentsOnly = true
-
-begin
- response = xero_client.accounting_api.get_journals(xero_tenant_id, if_modified_since, offset, paymentsOnly)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_journals: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.journals.read
- Grant read-only access to journals
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.journals.read
+ Grant read-only access to journals
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -68763,7 +25751,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -68786,17 +25774,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- offset
+
+ Query parameters
+
+
+ Name
+ Description
+
+ offset
@@ -68816,7 +25801,7 @@ Parameters
- paymentsOnly
+ paymentsOnly
@@ -68836,292 +25821,34 @@ Parameters
-
-
-
-
-
-
-
-
- getLinkedTransaction
- Retrieves a specific linked transaction (billable expenses) using a unique linked transaction Id
-
-
-
-
-
-
-
- /LinkedTransactions/{LinkedTransactionID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/LinkedTransactions/{LinkedTransactionID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID linkedTransactionID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- LinkedTransactions result = apiInstance.getLinkedTransaction(accessToken, xeroTenantId, linkedTransactionID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getLinkedTransaction");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID linkedTransactionID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a LinkedTransaction
- try {
- LinkedTransactions result = apiInstance.getLinkedTransaction(xeroTenantId, linkedTransactionID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getLinkedTransaction");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *linkedTransactionID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a LinkedTransaction (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific linked transaction (billable expenses) using a unique linked transaction Id
-[apiInstance getLinkedTransactionWith:xeroTenantId
- linkedTransactionID:linkedTransactionID
- completionHandler: ^(LinkedTransactions output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const linkedTransactionID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getLinkedTransaction(xeroTenantId, linkedTransactionID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetLinkedTransactionExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var linkedTransactionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetLinkedTransactionAsync(accessToken, xeroTenantId, linkedTransactionID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetLinkedTransaction: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$linkedTransactionID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getLinkedTransaction($xeroTenantId, $linkedTransactionID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getLinkedTransaction: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $linkedTransactionID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a LinkedTransaction
-
-eval {
- my $result = $api_instance->getLinkedTransaction(xeroTenantId => $xeroTenantId, linkedTransactionID => $linkedTransactionID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getLinkedTransaction: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getLinkedTransaction
+ Retrieves a specific linked transaction (billable expenses) using a unique linked transaction Id
+
+
+
+
+
+
+
+ /LinkedTransactions/{LinkedTransactionID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -69144,43 +25871,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getLinkedTransaction: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-linked_transaction_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_linked_transaction(xero_tenant_id, linked_transaction_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_linked_transaction: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- LinkedTransactionID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ LinkedTransactionID*
@@ -69206,15 +25915,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -69237,335 +25945,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getLinkedTransactions
- Retrieves linked transactions (billable expenses)
-
-
-
-
-
-
-
- /LinkedTransactions
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/LinkedTransactions?page=1&LinkedTransactionID=00000000-0000-0000-0000-000000000000&SourceTransactionID=00000000-0000-0000-0000-000000000000&ContactID=00000000-0000-0000-0000-000000000000&Status=APPROVED&TargetTransactionID=00000000-0000-0000-0000-000000000000"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Integer page = 1;
- UUID linkedTransactionID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- UUID sourceTransactionID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- UUID contactID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String status = 'APPROVED';
- UUID targetTransactionID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- LinkedTransactions result = apiInstance.getLinkedTransactions(accessToken, xeroTenantId, page, linkedTransactionID, sourceTransactionID, contactID, status, targetTransactionID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getLinkedTransactions");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Integer page = 1; // Integer | 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.
- UUID linkedTransactionID = 00000000-0000-0000-0000-000000000000; // UUID | The Xero identifier for an Linked Transaction
- UUID sourceTransactionID = 00000000-0000-0000-0000-000000000000; // UUID | Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice
- UUID contactID = 00000000-0000-0000-0000-000000000000; // UUID | Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer.
- String status = APPROVED; // String | Filter by the combination of ContactID and Status. Get the linked transactions associated to a customer and with a status
- UUID targetTransactionID = 00000000-0000-0000-0000-000000000000; // UUID | Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice
- try {
- LinkedTransactions result = apiInstance.getLinkedTransactions(xeroTenantId, page, linkedTransactionID, sourceTransactionID, contactID, status, targetTransactionID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getLinkedTransactions");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Integer *page = 1; // 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) (default to null)
-UUID *linkedTransactionID = 00000000-0000-0000-0000-000000000000; // The Xero identifier for an Linked Transaction (optional) (default to null)
-UUID *sourceTransactionID = 00000000-0000-0000-0000-000000000000; // Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice (optional) (default to null)
-UUID *contactID = 00000000-0000-0000-0000-000000000000; // Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer. (optional) (default to null)
-String *status = APPROVED; // Filter by the combination of ContactID and Status. Get the linked transactions associated to a customer and with a status (optional) (default to null)
-UUID *targetTransactionID = 00000000-0000-0000-0000-000000000000; // Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves linked transactions (billable expenses)
-[apiInstance getLinkedTransactionsWith:xeroTenantId
- page:page
- linkedTransactionID:linkedTransactionID
- sourceTransactionID:sourceTransactionID
- contactID:contactID
- status:status
- targetTransactionID:targetTransactionID
- completionHandler: ^(LinkedTransactions output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const page = 1;
-const linkedTransactionID = '00000000-0000-0000-0000-000000000000';
-const sourceTransactionID = '00000000-0000-0000-0000-000000000000';
-const contactID = '00000000-0000-0000-0000-000000000000';
-const status = 'APPROVED';
-const targetTransactionID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getLinkedTransactions(xeroTenantId, page, linkedTransactionID, sourceTransactionID, contactID, status, targetTransactionID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetLinkedTransactionsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var page = 1;
- var linkedTransactionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var sourceTransactionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var contactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var status = "APPROVED";
- var targetTransactionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetLinkedTransactionsAsync(accessToken, xeroTenantId, page, linkedTransactionID, sourceTransactionID, contactID, status, targetTransactionID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetLinkedTransactions: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$page = 1;
-$linkedTransactionID = "00000000-0000-0000-0000-000000000000";
-$sourceTransactionID = "00000000-0000-0000-0000-000000000000";
-$contactID = "00000000-0000-0000-0000-000000000000";
-$status = "APPROVED";
-$targetTransactionID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getLinkedTransactions($xeroTenantId, $page, $linkedTransactionID, $sourceTransactionID, $contactID, $status, $targetTransactionID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getLinkedTransactions: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $page = 1; # Integer | 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.
-my $linkedTransactionID = 00000000-0000-0000-0000-000000000000; # UUID | The Xero identifier for an Linked Transaction
-my $sourceTransactionID = 00000000-0000-0000-0000-000000000000; # UUID | Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice
-my $contactID = 00000000-0000-0000-0000-000000000000; # UUID | Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer.
-my $status = APPROVED; # String | Filter by the combination of ContactID and Status. Get the linked transactions associated to a customer and with a status
-my $targetTransactionID = 00000000-0000-0000-0000-000000000000; # UUID | Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice
-
-eval {
- my $result = $api_instance->getLinkedTransactions(xeroTenantId => $xeroTenantId, page => $page, linkedTransactionID => $linkedTransactionID, sourceTransactionID => $sourceTransactionID, contactID => $contactID, status => $status, targetTransactionID => $targetTransactionID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getLinkedTransactions: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getLinkedTransactions
+ Retrieves linked transactions (billable expenses)
+
+
+
+
+
+
+
+ /LinkedTransactions
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -69592,49 +25999,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getLinkedTransactions: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-page = 1
-linked_transaction_id = '00000000-0000-0000-0000-000000000000'
-source_transaction_id = '00000000-0000-0000-0000-000000000000'
-contact_id = '00000000-0000-0000-0000-000000000000'
-status = 'APPROVED'
-target_transaction_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_linked_transactions(xero_tenant_id, page, linked_transaction_id, source_transaction_id, contact_id, status, target_transaction_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_linked_transactions: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -69657,17 +26040,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- page
+
+ Query parameters
+
+
+ Name
+ Description
+
+ page
@@ -69687,7 +26067,7 @@ Parameters
- LinkedTransactionID
+ LinkedTransactionID
@@ -69710,7 +26090,7 @@ Parameters
- SourceTransactionID
+ SourceTransactionID
@@ -69733,7 +26113,7 @@ Parameters
- ContactID
+ ContactID
@@ -69756,7 +26136,7 @@ Parameters
- Status
+ Status
@@ -69776,7 +26156,7 @@ Parameters
- TargetTransactionID
+ TargetTransactionID
@@ -69799,292 +26179,34 @@ Parameters
-
-
-
-
-
-
-
-
- getManualJournal
- Retrieves a specific manual journal
-
-
-
-
-
-
-
- /ManualJournals/{ManualJournalID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ManualJournals/{ManualJournalID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID manualJournalID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- ManualJournals result = apiInstance.getManualJournal(accessToken, xeroTenantId, manualJournalID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getManualJournal");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID manualJournalID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a ManualJournal
- try {
- ManualJournals result = apiInstance.getManualJournal(xeroTenantId, manualJournalID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getManualJournal");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *manualJournalID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a ManualJournal (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific manual journal
-[apiInstance getManualJournalWith:xeroTenantId
- manualJournalID:manualJournalID
- completionHandler: ^(ManualJournals output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const manualJournalID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getManualJournal(xeroTenantId, manualJournalID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetManualJournalExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var manualJournalID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetManualJournalAsync(accessToken, xeroTenantId, manualJournalID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetManualJournal: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$manualJournalID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getManualJournal($xeroTenantId, $manualJournalID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getManualJournal: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $manualJournalID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a ManualJournal
-
-eval {
- my $result = $api_instance->getManualJournal(xeroTenantId => $xeroTenantId, manualJournalID => $manualJournalID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getManualJournal: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getManualJournal
+ Retrieves a specific manual journal
+
+
+
+
+
+
+
+ /ManualJournals/{ManualJournalID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -70107,43 +26229,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getManualJournal: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-manual_journal_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_manual_journal(xero_tenant_id, manual_journal_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_manual_journal: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ManualJournalID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ManualJournalID*
@@ -70169,15 +26273,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -70200,311 +26303,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getManualJournalAttachmentByFileName
- Retrieves a specific attachment from a specific manual journal by file name
-
-
-
-
-
-
-
- /ManualJournals/{ManualJournalID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ManualJournals/{ManualJournalID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID manualJournalID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getManualJournalAttachmentByFileName(accessToken, xeroTenantId, manualJournalID, fileName, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getManualJournalAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID manualJournalID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a ManualJournal
- String fileName = xero-dev.jpg; // String | Name of the attachment
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getManualJournalAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *manualJournalID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a ManualJournal (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific attachment from a specific manual journal by file name
-[apiInstance getManualJournalAttachmentByFileNameWith:xeroTenantId
- manualJournalID:manualJournalID
- fileName:fileName
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const manualJournalID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetManualJournalAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var manualJournalID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetManualJournalAttachmentByFileNameAsync(accessToken, xeroTenantId, manualJournalID, fileName, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetManualJournalAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$manualJournalID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getManualJournalAttachmentByFileName($xeroTenantId, $manualJournalID, $fileName, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getManualJournalAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $manualJournalID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a ManualJournal
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getManualJournalAttachmentByFileName(xeroTenantId => $xeroTenantId, manualJournalID => $manualJournalID, fileName => $fileName, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getManualJournalAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getManualJournalAttachmentByFileName
+ Retrieves a specific attachment from a specific manual journal by file name
+
+
+
+
+
+
+
+ /ManualJournals/{ManualJournalID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -70529,45 +26355,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getManualJournalAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-manual_journal_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_manual_journal_attachment_by_file_name(xero_tenant_id, manual_journal_id, file_name, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_manual_journal_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ManualJournalID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ManualJournalID*
@@ -70593,7 +26399,7 @@ Parameters
- FileName*
+ FileName*
@@ -70616,15 +26422,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -70647,7 +26452,7 @@ Parameters
- contentType*
+ contentType*
@@ -70670,311 +26475,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getManualJournalAttachmentById
- Allows you to retrieve a specific attachment from a specific manual journal using a unique attachment Id
-
-
-
-
-
-
-
- /ManualJournals/{ManualJournalID}/Attachments/{AttachmentID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ManualJournals/{ManualJournalID}/Attachments/{AttachmentID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID manualJournalID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- UUID attachmentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getManualJournalAttachmentById(accessToken, xeroTenantId, manualJournalID, attachmentID, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getManualJournalAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID manualJournalID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a ManualJournal
- UUID attachmentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Attachment object
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getManualJournalAttachmentById(xeroTenantId, manualJournalID, attachmentID, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getManualJournalAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *manualJournalID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a ManualJournal (default to null)
-UUID *attachmentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Attachment object (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Allows you to retrieve a specific attachment from a specific manual journal using a unique attachment Id
-[apiInstance getManualJournalAttachmentByIdWith:xeroTenantId
- manualJournalID:manualJournalID
- attachmentID:attachmentID
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const manualJournalID = '00000000-0000-0000-0000-000000000000';
-const attachmentID = '00000000-0000-0000-0000-000000000000';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getManualJournalAttachmentById(xeroTenantId, manualJournalID, attachmentID, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetManualJournalAttachmentByIdExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var manualJournalID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var attachmentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetManualJournalAttachmentByIdAsync(accessToken, xeroTenantId, manualJournalID, attachmentID, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetManualJournalAttachmentById: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$manualJournalID = "00000000-0000-0000-0000-000000000000";
-$attachmentID = "00000000-0000-0000-0000-000000000000";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getManualJournalAttachmentById($xeroTenantId, $manualJournalID, $attachmentID, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getManualJournalAttachmentById: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $manualJournalID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a ManualJournal
-my $attachmentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Attachment object
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getManualJournalAttachmentById(xeroTenantId => $xeroTenantId, manualJournalID => $manualJournalID, attachmentID => $attachmentID, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getManualJournalAttachmentById: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getManualJournalAttachmentById
+ Allows you to retrieve a specific attachment from a specific manual journal using a unique attachment Id
+
+
+
+
+
+
+
+ /ManualJournals/{ManualJournalID}/Attachments/{AttachmentID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -70999,45 +26527,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getManualJournalAttachmentById: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-manual_journal_id = '00000000-0000-0000-0000-000000000000'
-attachment_id = '00000000-0000-0000-0000-000000000000'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_manual_journal_attachment_by_id(xero_tenant_id, manual_journal_id, attachment_id, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_manual_journal_attachment_by_id: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ManualJournalID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ManualJournalID*
@@ -71063,7 +26571,7 @@ Parameters
- AttachmentID*
+ AttachmentID*
@@ -71089,15 +26597,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -71120,7 +26627,7 @@ Parameters
- contentType*
+ contentType*
@@ -71143,295 +26650,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getManualJournalAttachments
- Retrieves attachment for a specific manual journal
-
-
-
-
-
-
-
- /ManualJournals/{ManualJournalID}/Attachments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ManualJournals/{ManualJournalID}/Attachments"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID manualJournalID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Attachments result = apiInstance.getManualJournalAttachments(accessToken, xeroTenantId, manualJournalID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getManualJournalAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID manualJournalID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a ManualJournal
- try {
- Attachments result = apiInstance.getManualJournalAttachments(xeroTenantId, manualJournalID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getManualJournalAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *manualJournalID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a ManualJournal (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves attachment for a specific manual journal
-[apiInstance getManualJournalAttachmentsWith:xeroTenantId
- manualJournalID:manualJournalID
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const manualJournalID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getManualJournalAttachments(xeroTenantId, manualJournalID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetManualJournalAttachmentsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var manualJournalID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetManualJournalAttachmentsAsync(accessToken, xeroTenantId, manualJournalID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetManualJournalAttachments: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$manualJournalID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getManualJournalAttachments($xeroTenantId, $manualJournalID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getManualJournalAttachments: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $manualJournalID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a ManualJournal
-
-eval {
- my $result = $api_instance->getManualJournalAttachments(xeroTenantId => $xeroTenantId, manualJournalID => $manualJournalID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getManualJournalAttachments: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getManualJournalAttachments
+ Retrieves attachment for a specific manual journal
+
+
+
+
+
+
+
+ /ManualJournals/{ManualJournalID}/Attachments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -71454,43 +26700,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getManualJournalAttachments: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-manual_journal_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_manual_journal_attachments(xero_tenant_id, manual_journal_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_manual_journal_attachments: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ManualJournalID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ManualJournalID*
@@ -71516,15 +26744,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -71547,321 +26774,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getManualJournals
- Retrieves manual journals
-
-
-
-
-
-
-
- /ManualJournals
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ManualJournals?where=Status=="DRAFT"&order=Date ASC&page=1"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- String where = 'Status=="DRAFT"';
- String order = 'Date ASC';
- Integer page = 1;
-
- try {
- ManualJournals result = apiInstance.getManualJournals(accessToken, xeroTenantId, ifModifiedSince, where, order, page);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getManualJournals");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- String where = Status=="DRAFT"; // String | Filter by an any element
- String order = Date ASC; // String | Order by an any element
- Integer page = 1; // Integer | e.g. page=1 – Up to 100 manual journals will be returned in a single API call with line items shown for each overpayment
- try {
- ManualJournals result = apiInstance.getManualJournals(xeroTenantId, ifModifiedSince, where, order, page);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getManualJournals");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-String *where = Status=="DRAFT"; // Filter by an any element (optional) (default to null)
-String *order = Date ASC; // Order by an any element (optional) (default to null)
-Integer *page = 1; // 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) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves manual journals
-[apiInstance getManualJournalsWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- where:where
- order:order
- page:page
- completionHandler: ^(ManualJournals output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const where = 'Status=="DRAFT"';
-const order = 'Date ASC';
-const page = 1;
-
-try {
- const response = await xero.accountingApi.getManualJournals(xeroTenantId, ifModifiedSince, where, order, page);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetManualJournalsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var where = "Status==\"DRAFT\"";
- var order = "Date ASC";
- var page = 1;
-
- try {
- var result = await apiInstance.GetManualJournalsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order, page);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetManualJournals: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$where = "Status=="' . \XeroAPI\XeroPHP\Models\Accounting\ManualJournal::STATUS_DRAFT . '"";
-$order = "Date ASC";
-$page = 1;
-
-try {
- $result = $apiInstance->getManualJournals($xeroTenantId, $ifModifiedSince, $where, $order, $page);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getManualJournals: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $where = Status=="DRAFT"; # String | Filter by an any element
-my $order = Date ASC; # String | Order by an any element
-my $page = 1; # Integer | e.g. page=1 – Up to 100 manual journals will be returned in a single API call with line items shown for each overpayment
-
-eval {
- my $result = $api_instance->getManualJournals(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, where => $where, order => $order, page => $page);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getManualJournals: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getManualJournals
+ Retrieves manual journals
+
+
+
+
+
+
+
+ /ManualJournals
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -71886,47 +26826,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getManualJournals: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-where = 'Status==#{XeroRuby::Accounting::ManualJournal::DRAFT}'
-order = 'Date ASC'
-page = 1
-
-begin
- response = xero_client.accounting_api.get_manual_journals(xero_tenant_id, if_modified_since, where, order, page)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_manual_journals: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -71949,7 +26867,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -71972,17 +26890,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -72002,7 +26917,7 @@ Parameters
- order
+ order
@@ -72022,7 +26937,7 @@ Parameters
- page
+ page
@@ -72042,292 +26957,34 @@ Parameters
-
-
-
-
-
-
-
-
- getManualJournalsHistory
- Retrieves history for a specific manual journal
-
-
-
-
-
-
-
- /ManualJournals/{ManualJournalID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ManualJournals/{ManualJournalID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID manualJournalID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- HistoryRecords result = apiInstance.getManualJournalsHistory(accessToken, xeroTenantId, manualJournalID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getManualJournalsHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID manualJournalID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a ManualJournal
- try {
- HistoryRecords result = apiInstance.getManualJournalsHistory(xeroTenantId, manualJournalID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getManualJournalsHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *manualJournalID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a ManualJournal (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves history for a specific manual journal
-[apiInstance getManualJournalsHistoryWith:xeroTenantId
- manualJournalID:manualJournalID
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const manualJournalID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getManualJournalsHistory(xeroTenantId, manualJournalID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetManualJournalsHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var manualJournalID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetManualJournalsHistoryAsync(accessToken, xeroTenantId, manualJournalID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetManualJournalsHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$manualJournalID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getManualJournalsHistory($xeroTenantId, $manualJournalID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getManualJournalsHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $manualJournalID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a ManualJournal
-
-eval {
- my $result = $api_instance->getManualJournalsHistory(xeroTenantId => $xeroTenantId, manualJournalID => $manualJournalID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getManualJournalsHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getManualJournalsHistory
+ Retrieves history for a specific manual journal
+
+
+
+
+
+
+
+ /ManualJournals/{ManualJournalID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -72350,43 +27007,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getManualJournalsHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-manual_journal_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_manual_journals_history(xero_tenant_id, manual_journal_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_manual_journals_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ManualJournalID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ManualJournalID*
@@ -72412,15 +27051,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -72443,295 +27081,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getOnlineInvoice
- Retrieves a URL to an online invoice
-
-
-
-
-
-
-
- /Invoices/{InvoiceID}/OnlineInvoice
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Invoices/{InvoiceID}/OnlineInvoice"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID invoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- OnlineInvoices result = apiInstance.getOnlineInvoice(accessToken, xeroTenantId, invoiceID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getOnlineInvoice");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID invoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Invoice
- try {
- OnlineInvoices result = apiInstance.getOnlineInvoice(xeroTenantId, invoiceID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getOnlineInvoice");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *invoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Invoice (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a URL to an online invoice
-[apiInstance getOnlineInvoiceWith:xeroTenantId
- invoiceID:invoiceID
- completionHandler: ^(OnlineInvoices output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const invoiceID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getOnlineInvoice(xeroTenantId, invoiceID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetOnlineInvoiceExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var invoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetOnlineInvoiceAsync(accessToken, xeroTenantId, invoiceID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetOnlineInvoice: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$invoiceID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getOnlineInvoice($xeroTenantId, $invoiceID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getOnlineInvoice: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $invoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Invoice
-
-eval {
- my $result = $api_instance->getOnlineInvoice(xeroTenantId => $xeroTenantId, invoiceID => $invoiceID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getOnlineInvoice: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getOnlineInvoice
+ Retrieves a URL to an online invoice
+
+
+
+
+
+
+
+ /Invoices/{InvoiceID}/OnlineInvoice
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -72754,43 +27131,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getOnlineInvoice: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-invoice_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_online_invoice(xero_tenant_id, invoice_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_online_invoice: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- InvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ InvoiceID*
@@ -72816,15 +27175,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -72847,287 +27205,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getOrganisationActions
- Retrieves a list of the key actions your app has permission to perform in the connected Xero organisation.
-
-
-
-
-
-
-
- /Organisation/Actions
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Organisation/Actions"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- try {
- Actions result = apiInstance.getOrganisationActions(accessToken, xeroTenantId);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getOrganisationActions");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- try {
- Actions result = apiInstance.getOrganisationActions(xeroTenantId);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getOrganisationActions");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a list of the key actions your app has permission to perform in the connected Xero organisation.
-[apiInstance getOrganisationActionsWith:xeroTenantId
- completionHandler: ^(Actions output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
-try {
- const response = await xero.accountingApi.getOrganisationActions(xeroTenantId);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetOrganisationActionsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
-
- try {
- var result = await apiInstance.GetOrganisationActionsAsync(accessToken, xeroTenantId);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetOrganisationActions: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-
-try {
- $result = $apiInstance->getOrganisationActions($xeroTenantId);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getOrganisationActions: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-
-eval {
- my $result = $api_instance->getOrganisationActions(xeroTenantId => $xeroTenantId);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getOrganisationActions: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getOrganisationActions
+ Retrieves a list of the key actions your app has permission to perform in the connected Xero organisation.
+
+
+
+
+
+
+
+ /Organisation/Actions
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -73149,43 +27254,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getOrganisationActions: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-
-begin
- response = xero_client.accounting_api.get_organisation_actions(xero_tenant_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_organisation_actions: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings.read
- Grant read-only access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings.read
+ Grant read-only access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -73208,295 +27295,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getOrganisationCISSettings
- Retrieves the CIS settings for the Xero organistaion.
-
-
-
-
-
-
-
- /Organisation/{OrganisationID}/CISSettings
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Organisation/{OrganisationID}/CISSettings"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID organisationID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- CISOrgSettings result = apiInstance.getOrganisationCISSettings(accessToken, xeroTenantId, organisationID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getOrganisationCISSettings");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID organisationID = 00000000-0000-0000-0000-000000000000; // UUID | The unique Xero identifier for an organisation
- try {
- CISOrgSettings result = apiInstance.getOrganisationCISSettings(xeroTenantId, organisationID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getOrganisationCISSettings");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *organisationID = 00000000-0000-0000-0000-000000000000; // The unique Xero identifier for an organisation (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves the CIS settings for the Xero organistaion.
-[apiInstance getOrganisationCISSettingsWith:xeroTenantId
- organisationID:organisationID
- completionHandler: ^(CISOrgSettings output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const organisationID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getOrganisationCISSettings(xeroTenantId, organisationID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetOrganisationCISSettingsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var organisationID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetOrganisationCISSettingsAsync(accessToken, xeroTenantId, organisationID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetOrganisationCISSettings: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$organisationID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getOrganisationCISSettings($xeroTenantId, $organisationID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getOrganisationCISSettings: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $organisationID = 00000000-0000-0000-0000-000000000000; # UUID | The unique Xero identifier for an organisation
-
-eval {
- my $result = $api_instance->getOrganisationCISSettings(xeroTenantId => $xeroTenantId, organisationID => $organisationID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getOrganisationCISSettings: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getOrganisationCISSettings
+ Retrieves the CIS settings for the Xero organistaion.
+
+
+
+
+
+
+
+ /Organisation/{OrganisationID}/CISSettings
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -73519,43 +27345,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getOrganisationCISSettings: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-organisation_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_organisation_cis_settings(xero_tenant_id, organisation_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_organisation_cis_settings: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings.read
- Grant read-only access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- OrganisationID*
+
+
+ Scopes
+
+
+
+ accounting.settings.read
+ Grant read-only access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ OrganisationID*
@@ -73581,15 +27389,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -73612,286 +27419,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getOrganisations
- Retrieves Xero organisation details
-
-
-
-
-
-
-
- /Organisation
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Organisation"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- try {
- Organisations result = apiInstance.getOrganisations(accessToken, xeroTenantId);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getOrganisations");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- try {
- Organisations result = apiInstance.getOrganisations(xeroTenantId);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getOrganisations");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves Xero organisation details
-[apiInstance getOrganisationsWith:xeroTenantId
- completionHandler: ^(Organisations output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
-try {
- const response = await xero.accountingApi.getOrganisations(xeroTenantId);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetOrganisationsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
-
- try {
- var result = await apiInstance.GetOrganisationsAsync(accessToken, xeroTenantId);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetOrganisations: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-
-try {
- $result = $apiInstance->getOrganisations($xeroTenantId);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getOrganisations: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-
-eval {
- my $result = $api_instance->getOrganisations(xeroTenantId => $xeroTenantId);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getOrganisations: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getOrganisations
+ Retrieves Xero organisation details
+
+
+
+
+
+
+
+ /Organisation
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -73913,43 +27468,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getOrganisations: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-
-begin
- response = xero_client.accounting_api.get_organisations(xero_tenant_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_organisations: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings.read
- Grant read-only access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings.read
+ Grant read-only access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -73972,295 +27509,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getOverpayment
- Retrieves a specific overpayment using a unique overpayment Id
-
-
-
-
-
-
-
- /Overpayments/{OverpaymentID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Overpayments/{OverpaymentID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID overpaymentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Overpayments result = apiInstance.getOverpayment(accessToken, xeroTenantId, overpaymentID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getOverpayment");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID overpaymentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Overpayment
- try {
- Overpayments result = apiInstance.getOverpayment(xeroTenantId, overpaymentID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getOverpayment");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *overpaymentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Overpayment (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific overpayment using a unique overpayment Id
-[apiInstance getOverpaymentWith:xeroTenantId
- overpaymentID:overpaymentID
- completionHandler: ^(Overpayments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const overpaymentID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getOverpayment(xeroTenantId, overpaymentID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetOverpaymentExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var overpaymentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetOverpaymentAsync(accessToken, xeroTenantId, overpaymentID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetOverpayment: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$overpaymentID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getOverpayment($xeroTenantId, $overpaymentID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getOverpayment: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $overpaymentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Overpayment
-
-eval {
- my $result = $api_instance->getOverpayment(xeroTenantId => $xeroTenantId, overpaymentID => $overpaymentID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getOverpayment: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getOverpayment
+ Retrieves a specific overpayment using a unique overpayment Id
+
+
+
+
+
+
+
+ /Overpayments/{OverpaymentID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -74283,43 +27559,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getOverpayment: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-overpayment_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_overpayment(xero_tenant_id, overpayment_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_overpayment: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- OverpaymentID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ OverpaymentID*
@@ -74345,15 +27603,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -74376,295 +27633,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getOverpaymentHistory
- Retrieves history records of a specific overpayment
-
-
-
-
-
-
-
- /Overpayments/{OverpaymentID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Overpayments/{OverpaymentID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID overpaymentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- HistoryRecords result = apiInstance.getOverpaymentHistory(accessToken, xeroTenantId, overpaymentID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getOverpaymentHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID overpaymentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Overpayment
- try {
- HistoryRecords result = apiInstance.getOverpaymentHistory(xeroTenantId, overpaymentID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getOverpaymentHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *overpaymentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Overpayment (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves history records of a specific overpayment
-[apiInstance getOverpaymentHistoryWith:xeroTenantId
- overpaymentID:overpaymentID
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const overpaymentID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getOverpaymentHistory(xeroTenantId, overpaymentID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetOverpaymentHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var overpaymentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetOverpaymentHistoryAsync(accessToken, xeroTenantId, overpaymentID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetOverpaymentHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$overpaymentID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getOverpaymentHistory($xeroTenantId, $overpaymentID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getOverpaymentHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $overpaymentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Overpayment
-
-eval {
- my $result = $api_instance->getOverpaymentHistory(xeroTenantId => $xeroTenantId, overpaymentID => $overpaymentID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getOverpaymentHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getOverpaymentHistory
+ Retrieves history records of a specific overpayment
+
+
+
+
+
+
+
+ /Overpayments/{OverpaymentID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -74687,43 +27683,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getOverpaymentHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-overpayment_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_overpayment_history(xero_tenant_id, overpayment_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_overpayment_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- OverpaymentID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ OverpaymentID*
@@ -74749,15 +27727,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -74780,328 +27757,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getOverpayments
- Retrieves overpayments
-
-
-
-
-
-
-
- /Overpayments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Overpayments?where=Status=="AUTHORISED"&order=Status ASC&page=1&unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- String where = 'Status=="AUTHORISED"';
- String order = 'Status ASC';
- Integer page = 1;
- Integer unitdp = 4;
-
- try {
- Overpayments result = apiInstance.getOverpayments(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getOverpayments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- String where = Status=="AUTHORISED"; // String | Filter by an any element
- String order = Status ASC; // String | Order by an any element
- Integer page = 1; // Integer | e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- Overpayments result = apiInstance.getOverpayments(xeroTenantId, ifModifiedSince, where, order, page, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getOverpayments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-String *where = Status=="AUTHORISED"; // Filter by an any element (optional) (default to null)
-String *order = Status ASC; // Order by an any element (optional) (default to null)
-Integer *page = 1; // e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment (optional) (default to null)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves overpayments
-[apiInstance getOverpaymentsWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- where:where
- order:order
- page:page
- unitdp:unitdp
- completionHandler: ^(Overpayments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const where = 'Status=="AUTHORISED"';
-const order = 'Status ASC';
-const page = 1;
-const unitdp = 4;
-
-try {
- const response = await xero.accountingApi.getOverpayments(xeroTenantId, ifModifiedSince, where, order, page, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetOverpaymentsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var where = "Status==\"AUTHORISED\"";
- var order = "Status ASC";
- var page = 1;
- var unitdp = 4;
-
- try {
- var result = await apiInstance.GetOverpaymentsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetOverpayments: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$where = "Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Overpayment::STATUS_AUTHORISED . '"";
-$order = "Status ASC";
-$page = 1;
-$unitdp = 4;
-
-try {
- $result = $apiInstance->getOverpayments($xeroTenantId, $ifModifiedSince, $where, $order, $page, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getOverpayments: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $where = Status=="AUTHORISED"; # String | Filter by an any element
-my $order = Status ASC; # String | Order by an any element
-my $page = 1; # Integer | e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->getOverpayments(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, where => $where, order => $order, page => $page, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getOverpayments: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getOverpayments
+ Retrieves overpayments
+
+
+
+
+
+
+
+ /Overpayments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -75126,48 +27809,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getOverpayments: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-where = 'Status==#{XeroRuby::Accounting::Overpayment::AUTHORISED}'
-order = 'Status ASC'
-page = 1
-unitdp = 4
-
-begin
- response = xero_client.accounting_api.get_overpayments(xero_tenant_id, if_modified_since, where, order, page, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_overpayments: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -75190,7 +27850,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -75213,17 +27873,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -75243,7 +27900,7 @@ Parameters
- order
+ order
@@ -75263,7 +27920,7 @@ Parameters
- page
+ page
@@ -75283,7 +27940,7 @@ Parameters
- unitdp
+ unitdp
@@ -75303,292 +27960,34 @@ Parameters
-
-
-
-
-
-
-
-
- getPayment
- Retrieves a specific payment for invoices and credit notes using a unique payment Id
-
-
-
-
-
-
-
- /Payments/{PaymentID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Payments/{PaymentID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID paymentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Payments result = apiInstance.getPayment(accessToken, xeroTenantId, paymentID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getPayment");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID paymentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Payment
- try {
- Payments result = apiInstance.getPayment(xeroTenantId, paymentID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getPayment");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *paymentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Payment (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific payment for invoices and credit notes using a unique payment Id
-[apiInstance getPaymentWith:xeroTenantId
- paymentID:paymentID
- completionHandler: ^(Payments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const paymentID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getPayment(xeroTenantId, paymentID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetPaymentExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var paymentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetPaymentAsync(accessToken, xeroTenantId, paymentID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetPayment: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$paymentID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getPayment($xeroTenantId, $paymentID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getPayment: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $paymentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Payment
-
-eval {
- my $result = $api_instance->getPayment(xeroTenantId => $xeroTenantId, paymentID => $paymentID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getPayment: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getPayment
+ Retrieves a specific payment for invoices and credit notes using a unique payment Id
+
+
+
+
+
+
+
+ /Payments/{PaymentID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -75611,43 +28010,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getPayment: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-payment_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_payment(xero_tenant_id, payment_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_payment: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PaymentID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PaymentID*
@@ -75673,15 +28054,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -75704,295 +28084,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getPaymentHistory
- Retrieves history records of a specific payment
-
-
-
-
-
-
-
- /Payments/{PaymentID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Payments/{PaymentID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID paymentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- HistoryRecords result = apiInstance.getPaymentHistory(accessToken, xeroTenantId, paymentID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getPaymentHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID paymentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Payment
- try {
- HistoryRecords result = apiInstance.getPaymentHistory(xeroTenantId, paymentID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getPaymentHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *paymentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Payment (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves history records of a specific payment
-[apiInstance getPaymentHistoryWith:xeroTenantId
- paymentID:paymentID
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const paymentID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getPaymentHistory(xeroTenantId, paymentID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetPaymentHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var paymentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetPaymentHistoryAsync(accessToken, xeroTenantId, paymentID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetPaymentHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$paymentID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getPaymentHistory($xeroTenantId, $paymentID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getPaymentHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $paymentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Payment
-
-eval {
- my $result = $api_instance->getPaymentHistory(xeroTenantId => $xeroTenantId, paymentID => $paymentID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getPaymentHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getPaymentHistory
+ Retrieves history records of a specific payment
+
+
+
+
+
+
+
+ /Payments/{PaymentID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -76015,43 +28134,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getPaymentHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-payment_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_payment_history(xero_tenant_id, payment_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_payment_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PaymentID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PaymentID*
@@ -76077,15 +28178,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -76108,287 +28208,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getPaymentServices
- Retrieves payment services
-
-
-
-
-
-
-
- /PaymentServices
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/PaymentServices"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- try {
- PaymentServices result = apiInstance.getPaymentServices(accessToken, xeroTenantId);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getPaymentServices");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- try {
- PaymentServices result = apiInstance.getPaymentServices(xeroTenantId);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getPaymentServices");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves payment services
-[apiInstance getPaymentServicesWith:xeroTenantId
- completionHandler: ^(PaymentServices output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
-try {
- const response = await xero.accountingApi.getPaymentServices(xeroTenantId);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetPaymentServicesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
-
- try {
- var result = await apiInstance.GetPaymentServicesAsync(accessToken, xeroTenantId);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetPaymentServices: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-
-try {
- $result = $apiInstance->getPaymentServices($xeroTenantId);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getPaymentServices: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-
-eval {
- my $result = $api_instance->getPaymentServices(xeroTenantId => $xeroTenantId);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getPaymentServices: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getPaymentServices
+ Retrieves payment services
+
+
+
+
+
+
+
+ /PaymentServices
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -76410,43 +28257,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getPaymentServices: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-
-begin
- response = xero_client.accounting_api.get_payment_services(xero_tenant_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_payment_services: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- paymentservices
- Grant read-write access to payment services
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ paymentservices
+ Grant read-write access to payment services
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -76469,320 +28298,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getPayments
- Retrieves payments for invoices and credit notes
-
-
-
-
-
-
-
- /Payments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Payments?where=Status=="AUTHORISED"&order=Amount ASC&page=1"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- String where = 'Status=="AUTHORISED"';
- String order = 'Amount ASC';
- Integer page = 1;
-
- try {
- Payments result = apiInstance.getPayments(accessToken, xeroTenantId, ifModifiedSince, where, order, page);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getPayments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- String where = Status=="AUTHORISED"; // String | Filter by an any element
- String order = Amount ASC; // String | Order by an any element
- Integer page = 1; // Integer | Up to 100 payments will be returned in a single API call
- try {
- Payments result = apiInstance.getPayments(xeroTenantId, ifModifiedSince, where, order, page);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getPayments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-String *where = Status=="AUTHORISED"; // Filter by an any element (optional) (default to null)
-String *order = Amount ASC; // Order by an any element (optional) (default to null)
-Integer *page = 1; // Up to 100 payments will be returned in a single API call (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves payments for invoices and credit notes
-[apiInstance getPaymentsWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- where:where
- order:order
- page:page
- completionHandler: ^(Payments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const where = 'Status=="AUTHORISED"';
-const order = 'Amount ASC';
-const page = 1;
-
-try {
- const response = await xero.accountingApi.getPayments(xeroTenantId, ifModifiedSince, where, order, page);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetPaymentsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var where = "Status==\"AUTHORISED\"";
- var order = "Amount ASC";
- var page = 1;
-
- try {
- var result = await apiInstance.GetPaymentsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order, page);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetPayments: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$where = "Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Payment::STATUS_AUTHORISED . '"";
-$order = "Amount ASC";
-$page = 1;
-
-try {
- $result = $apiInstance->getPayments($xeroTenantId, $ifModifiedSince, $where, $order, $page);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getPayments: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $where = Status=="AUTHORISED"; # String | Filter by an any element
-my $order = Amount ASC; # String | Order by an any element
-my $page = 1; # Integer | Up to 100 payments will be returned in a single API call
-
-eval {
- my $result = $api_instance->getPayments(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, where => $where, order => $order, page => $page);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getPayments: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getPayments
+ Retrieves payments for invoices and credit notes
+
+
+
+
+
+
+
+ /Payments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -76807,47 +28350,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getPayments: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-where = 'Status==#{XeroRuby::Accounting::Payment::AUTHORISED}'
-order = 'Amount ASC'
-page = 1
-
-begin
- response = xero_client.accounting_api.get_payments(xero_tenant_id, if_modified_since, where, order, page)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_payments: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -76870,7 +28391,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -76893,17 +28414,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -76923,7 +28441,7 @@ Parameters
- order
+ order
@@ -76943,7 +28461,7 @@ Parameters
- page
+ page
@@ -76963,292 +28481,34 @@ Parameters
-
-
-
-
-
-
-
-
- getPrepayment
- Allows you to retrieve a specified prepayments
-
-
-
-
-
-
-
- /Prepayments/{PrepaymentID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Prepayments/{PrepaymentID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID prepaymentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Prepayments result = apiInstance.getPrepayment(accessToken, xeroTenantId, prepaymentID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getPrepayment");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID prepaymentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a PrePayment
- try {
- Prepayments result = apiInstance.getPrepayment(xeroTenantId, prepaymentID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getPrepayment");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *prepaymentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a PrePayment (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Allows you to retrieve a specified prepayments
-[apiInstance getPrepaymentWith:xeroTenantId
- prepaymentID:prepaymentID
- completionHandler: ^(Prepayments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const prepaymentID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getPrepayment(xeroTenantId, prepaymentID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetPrepaymentExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var prepaymentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetPrepaymentAsync(accessToken, xeroTenantId, prepaymentID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetPrepayment: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$prepaymentID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getPrepayment($xeroTenantId, $prepaymentID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getPrepayment: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $prepaymentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a PrePayment
-
-eval {
- my $result = $api_instance->getPrepayment(xeroTenantId => $xeroTenantId, prepaymentID => $prepaymentID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getPrepayment: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getPrepayment
+ Allows you to retrieve a specified prepayments
+
+
+
+
+
+
+
+ /Prepayments/{PrepaymentID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -77271,43 +28531,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getPrepayment: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-prepayment_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_prepayment(xero_tenant_id, prepayment_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_prepayment: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PrepaymentID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PrepaymentID*
@@ -77333,15 +28575,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -77364,295 +28605,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getPrepaymentHistory
- Retrieves history record for a specific prepayment
-
-
-
-
-
-
-
- /Prepayments/{PrepaymentID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Prepayments/{PrepaymentID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID prepaymentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- HistoryRecords result = apiInstance.getPrepaymentHistory(accessToken, xeroTenantId, prepaymentID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getPrepaymentHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID prepaymentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a PrePayment
- try {
- HistoryRecords result = apiInstance.getPrepaymentHistory(xeroTenantId, prepaymentID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getPrepaymentHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *prepaymentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a PrePayment (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves history record for a specific prepayment
-[apiInstance getPrepaymentHistoryWith:xeroTenantId
- prepaymentID:prepaymentID
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const prepaymentID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getPrepaymentHistory(xeroTenantId, prepaymentID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetPrepaymentHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var prepaymentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetPrepaymentHistoryAsync(accessToken, xeroTenantId, prepaymentID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetPrepaymentHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$prepaymentID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getPrepaymentHistory($xeroTenantId, $prepaymentID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getPrepaymentHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $prepaymentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a PrePayment
-
-eval {
- my $result = $api_instance->getPrepaymentHistory(xeroTenantId => $xeroTenantId, prepaymentID => $prepaymentID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getPrepaymentHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getPrepaymentHistory
+ Retrieves history record for a specific prepayment
+
+
+
+
+
+
+
+ /Prepayments/{PrepaymentID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -77675,43 +28655,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getPrepaymentHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-prepayment_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_prepayment_history(xero_tenant_id, prepayment_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_prepayment_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PrepaymentID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PrepaymentID*
@@ -77737,15 +28699,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -77768,328 +28729,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getPrepayments
- Retrieves prepayments
-
-
-
-
-
-
-
- /Prepayments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Prepayments?where=Status=="AUTHORISED"&order=Reference ASC&page=1&unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- String where = 'Status=="AUTHORISED"';
- String order = 'Reference ASC';
- Integer page = 1;
- Integer unitdp = 4;
-
- try {
- Prepayments result = apiInstance.getPrepayments(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getPrepayments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- String where = Status=="AUTHORISED"; // String | Filter by an any element
- String order = Reference ASC; // String | Order by an any element
- Integer page = 1; // Integer | e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- Prepayments result = apiInstance.getPrepayments(xeroTenantId, ifModifiedSince, where, order, page, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getPrepayments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-String *where = Status=="AUTHORISED"; // Filter by an any element (optional) (default to null)
-String *order = Reference ASC; // Order by an any element (optional) (default to null)
-Integer *page = 1; // e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment (optional) (default to null)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves prepayments
-[apiInstance getPrepaymentsWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- where:where
- order:order
- page:page
- unitdp:unitdp
- completionHandler: ^(Prepayments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const where = 'Status=="AUTHORISED"';
-const order = 'Reference ASC';
-const page = 1;
-const unitdp = 4;
-
-try {
- const response = await xero.accountingApi.getPrepayments(xeroTenantId, ifModifiedSince, where, order, page, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetPrepaymentsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var where = "Status==\"AUTHORISED\"";
- var order = "Reference ASC";
- var page = 1;
- var unitdp = 4;
-
- try {
- var result = await apiInstance.GetPrepaymentsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order, page, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetPrepayments: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$where = "Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Prepayment::STATUS_AUTHORISED . '"";
-$order = "Reference ASC";
-$page = 1;
-$unitdp = 4;
-
-try {
- $result = $apiInstance->getPrepayments($xeroTenantId, $ifModifiedSince, $where, $order, $page, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getPrepayments: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $where = Status=="AUTHORISED"; # String | Filter by an any element
-my $order = Reference ASC; # String | Order by an any element
-my $page = 1; # Integer | e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->getPrepayments(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, where => $where, order => $order, page => $page, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getPrepayments: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getPrepayments
+ Retrieves prepayments
+
+
+
+
+
+
+
+ /Prepayments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -78114,48 +28781,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getPrepayments: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-where = 'Status==#{XeroRuby::Accounting::Prepayment::AUTHORISED}'
-order = 'Reference ASC'
-page = 1
-unitdp = 4
-
-begin
- response = xero_client.accounting_api.get_prepayments(xero_tenant_id, if_modified_since, where, order, page, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_prepayments: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -78178,7 +28822,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -78201,17 +28845,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -78231,7 +28872,7 @@ Parameters
- order
+ order
@@ -78251,7 +28892,7 @@ Parameters
- page
+ page
@@ -78271,7 +28912,7 @@ Parameters
- unitdp
+ unitdp
@@ -78291,292 +28932,34 @@ Parameters
-
-
-
-
-
-
-
-
- getPurchaseOrder
- Retrieves a specific purchase order using a unique purchase order Id
-
-
-
-
-
-
-
- /PurchaseOrders/{PurchaseOrderID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID purchaseOrderID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- PurchaseOrders result = apiInstance.getPurchaseOrder(accessToken, xeroTenantId, purchaseOrderID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getPurchaseOrder");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID purchaseOrderID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Purchase Order
- try {
- PurchaseOrders result = apiInstance.getPurchaseOrder(xeroTenantId, purchaseOrderID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getPurchaseOrder");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *purchaseOrderID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Purchase Order (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific purchase order using a unique purchase order Id
-[apiInstance getPurchaseOrderWith:xeroTenantId
- purchaseOrderID:purchaseOrderID
- completionHandler: ^(PurchaseOrders output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const purchaseOrderID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getPurchaseOrder(xeroTenantId, purchaseOrderID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetPurchaseOrderExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var purchaseOrderID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetPurchaseOrderAsync(accessToken, xeroTenantId, purchaseOrderID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetPurchaseOrder: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$purchaseOrderID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getPurchaseOrder($xeroTenantId, $purchaseOrderID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getPurchaseOrder: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $purchaseOrderID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Purchase Order
-
-eval {
- my $result = $api_instance->getPurchaseOrder(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getPurchaseOrder: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getPurchaseOrder
+ Retrieves a specific purchase order using a unique purchase order Id
+
+
+
+
+
+
+
+ /PurchaseOrders/{PurchaseOrderID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -78599,43 +28982,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getPurchaseOrder: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-purchase_order_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_purchase_order(xero_tenant_id, purchase_order_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_purchase_order: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PurchaseOrderID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PurchaseOrderID*
@@ -78661,15 +29026,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -78692,295 +29056,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getPurchaseOrderAsPdf
- Retrieves specific purchase order as PDF files using a unique purchase order Id
-
-
-
-
-
-
-
- /PurchaseOrders/{PurchaseOrderID}/pdf
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/pdf"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID purchaseOrderID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- ByteArrayInputStream result = apiInstance.getPurchaseOrderAsPdf(accessToken, xeroTenantId, purchaseOrderID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getPurchaseOrderAsPdf");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID purchaseOrderID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Purchase Order
- try {
- File result = apiInstance.getPurchaseOrderAsPdf(xeroTenantId, purchaseOrderID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getPurchaseOrderAsPdf");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *purchaseOrderID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Purchase Order (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves specific purchase order as PDF files using a unique purchase order Id
-[apiInstance getPurchaseOrderAsPdfWith:xeroTenantId
- purchaseOrderID:purchaseOrderID
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const purchaseOrderID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getPurchaseOrderAsPdf(xeroTenantId, purchaseOrderID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetPurchaseOrderAsPdfExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var purchaseOrderID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetPurchaseOrderAsPdfAsync(accessToken, xeroTenantId, purchaseOrderID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetPurchaseOrderAsPdf: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$purchaseOrderID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getPurchaseOrderAsPdf($xeroTenantId, $purchaseOrderID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getPurchaseOrderAsPdf: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $purchaseOrderID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Purchase Order
-
-eval {
- my $result = $api_instance->getPurchaseOrderAsPdf(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getPurchaseOrderAsPdf: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getPurchaseOrderAsPdf
+ Retrieves specific purchase order as PDF files using a unique purchase order Id
+
+
+
+
+
+
+
+ /PurchaseOrders/{PurchaseOrderID}/pdf
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -79003,43 +29106,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getPurchaseOrderAsPdf: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-purchase_order_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_purchase_order_as_pdf(xero_tenant_id, purchase_order_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_purchase_order_as_pdf: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PurchaseOrderID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PurchaseOrderID*
@@ -79065,15 +29150,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -79096,311 +29180,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getPurchaseOrderAttachmentById
- Retrieves specific attachment for a specific purchase order using a unique attachment Id
-
-
-
-
-
-
-
- /PurchaseOrders/{PurchaseOrderID}/Attachments/{AttachmentID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/Attachments/{AttachmentID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID purchaseOrderID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- UUID attachmentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getPurchaseOrderAttachmentById(accessToken, xeroTenantId, purchaseOrderID, attachmentID, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getPurchaseOrderAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID purchaseOrderID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Purchase Order
- UUID attachmentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Attachment object
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getPurchaseOrderAttachmentById(xeroTenantId, purchaseOrderID, attachmentID, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getPurchaseOrderAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *purchaseOrderID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Purchase Order (default to null)
-UUID *attachmentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Attachment object (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves specific attachment for a specific purchase order using a unique attachment Id
-[apiInstance getPurchaseOrderAttachmentByIdWith:xeroTenantId
- purchaseOrderID:purchaseOrderID
- attachmentID:attachmentID
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const purchaseOrderID = '00000000-0000-0000-0000-000000000000';
-const attachmentID = '00000000-0000-0000-0000-000000000000';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getPurchaseOrderAttachmentById(xeroTenantId, purchaseOrderID, attachmentID, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetPurchaseOrderAttachmentByIdExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var purchaseOrderID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var attachmentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetPurchaseOrderAttachmentByIdAsync(accessToken, xeroTenantId, purchaseOrderID, attachmentID, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetPurchaseOrderAttachmentById: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$purchaseOrderID = "00000000-0000-0000-0000-000000000000";
-$attachmentID = "00000000-0000-0000-0000-000000000000";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getPurchaseOrderAttachmentById($xeroTenantId, $purchaseOrderID, $attachmentID, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getPurchaseOrderAttachmentById: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $purchaseOrderID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Purchase Order
-my $attachmentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Attachment object
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getPurchaseOrderAttachmentById(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID, attachmentID => $attachmentID, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getPurchaseOrderAttachmentById: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getPurchaseOrderAttachmentById
+ Retrieves specific attachment for a specific purchase order using a unique attachment Id
+
+
+
+
+
+
+
+ /PurchaseOrders/{PurchaseOrderID}/Attachments/{AttachmentID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -79425,45 +29232,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getPurchaseOrderAttachmentById: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-purchase_order_id = '00000000-0000-0000-0000-000000000000'
-attachment_id = '00000000-0000-0000-0000-000000000000'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_purchase_order_attachment_by_id(xero_tenant_id, purchase_order_id, attachment_id, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_purchase_order_attachment_by_id: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PurchaseOrderID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PurchaseOrderID*
@@ -79489,7 +29276,7 @@ Parameters
- AttachmentID*
+ AttachmentID*
@@ -79515,15 +29302,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -79546,7 +29332,7 @@ Parameters
- contentType*
+ contentType*
@@ -79569,295 +29355,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getPurchaseOrderAttachments
- Retrieves attachments for a specific purchase order
-
-
-
-
-
-
-
- /PurchaseOrders/{PurchaseOrderID}/Attachments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/Attachments"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID purchaseOrderID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Attachments result = apiInstance.getPurchaseOrderAttachments(accessToken, xeroTenantId, purchaseOrderID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getPurchaseOrderAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID purchaseOrderID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Purchase Order
- try {
- Attachments result = apiInstance.getPurchaseOrderAttachments(xeroTenantId, purchaseOrderID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getPurchaseOrderAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *purchaseOrderID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Purchase Order (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves attachments for a specific purchase order
-[apiInstance getPurchaseOrderAttachmentsWith:xeroTenantId
- purchaseOrderID:purchaseOrderID
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const purchaseOrderID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getPurchaseOrderAttachments(xeroTenantId, purchaseOrderID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetPurchaseOrderAttachmentsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var purchaseOrderID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetPurchaseOrderAttachmentsAsync(accessToken, xeroTenantId, purchaseOrderID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetPurchaseOrderAttachments: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$purchaseOrderID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getPurchaseOrderAttachments($xeroTenantId, $purchaseOrderID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getPurchaseOrderAttachments: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $purchaseOrderID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Purchase Order
-
-eval {
- my $result = $api_instance->getPurchaseOrderAttachments(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getPurchaseOrderAttachments: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getPurchaseOrderAttachments
+ Retrieves attachments for a specific purchase order
+
+
+
+
+
+
+
+ /PurchaseOrders/{PurchaseOrderID}/Attachments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -79880,43 +29405,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getPurchaseOrderAttachments: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-purchase_order_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_purchase_order_attachments(xero_tenant_id, purchase_order_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_purchase_order_attachments: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PurchaseOrderID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PurchaseOrderID*
@@ -79942,15 +29449,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -79973,296 +29479,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getPurchaseOrderByNumber
- Retrieves a specific purchase order using purchase order number
-
-
-
-
-
-
-
- /PurchaseOrders/{PurchaseOrderNumber}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderNumber}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- String purchaseOrderNumber = 'PO1234';
-
- try {
- PurchaseOrders result = apiInstance.getPurchaseOrderByNumber(accessToken, xeroTenantId, purchaseOrderNumber);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getPurchaseOrderByNumber");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- String purchaseOrderNumber = PO1234; // String | Unique identifier for a PurchaseOrder
- try {
- PurchaseOrders result = apiInstance.getPurchaseOrderByNumber(xeroTenantId, purchaseOrderNumber);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getPurchaseOrderByNumber");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-String *purchaseOrderNumber = PO1234; // Unique identifier for a PurchaseOrder (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific purchase order using purchase order number
-[apiInstance getPurchaseOrderByNumberWith:xeroTenantId
- purchaseOrderNumber:purchaseOrderNumber
- completionHandler: ^(PurchaseOrders output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const purchaseOrderNumber = 'PO1234';
-
-try {
- const response = await xero.accountingApi.getPurchaseOrderByNumber(xeroTenantId, purchaseOrderNumber);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetPurchaseOrderByNumberExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var purchaseOrderNumber = "PO1234";
-
- try {
- var result = await apiInstance.GetPurchaseOrderByNumberAsync(accessToken, xeroTenantId, purchaseOrderNumber);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetPurchaseOrderByNumber: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$purchaseOrderNumber = "PO1234";
-
-try {
- $result = $apiInstance->getPurchaseOrderByNumber($xeroTenantId, $purchaseOrderNumber);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getPurchaseOrderByNumber: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $purchaseOrderNumber = PO1234; # String | Unique identifier for a PurchaseOrder
-
-eval {
- my $result = $api_instance->getPurchaseOrderByNumber(xeroTenantId => $xeroTenantId, purchaseOrderNumber => $purchaseOrderNumber);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getPurchaseOrderByNumber: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getPurchaseOrderByNumber
+ Retrieves a specific purchase order using purchase order number
+
+
+
+
+
+
+
+ /PurchaseOrders/{PurchaseOrderNumber}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -80285,43 +29529,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getPurchaseOrderByNumber: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-purchase_order_number = 'PO1234'
-
-begin
- response = xero_client.accounting_api.get_purchase_order_by_number(xero_tenant_id, purchase_order_number)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_purchase_order_by_number: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PurchaseOrderNumber*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PurchaseOrderNumber*
@@ -80344,15 +29570,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -80375,295 +29600,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getPurchaseOrderHistory
- Retrieves history for a specific purchase order
-
-
-
-
-
-
-
- /PurchaseOrders/{PurchaseOrderID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID purchaseOrderID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- HistoryRecords result = apiInstance.getPurchaseOrderHistory(accessToken, xeroTenantId, purchaseOrderID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getPurchaseOrderHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID purchaseOrderID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Purchase Order
- try {
- HistoryRecords result = apiInstance.getPurchaseOrderHistory(xeroTenantId, purchaseOrderID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getPurchaseOrderHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *purchaseOrderID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Purchase Order (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves history for a specific purchase order
-[apiInstance getPurchaseOrderHistoryWith:xeroTenantId
- purchaseOrderID:purchaseOrderID
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const purchaseOrderID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getPurchaseOrderHistory(xeroTenantId, purchaseOrderID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetPurchaseOrderHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var purchaseOrderID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetPurchaseOrderHistoryAsync(accessToken, xeroTenantId, purchaseOrderID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetPurchaseOrderHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$purchaseOrderID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getPurchaseOrderHistory($xeroTenantId, $purchaseOrderID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getPurchaseOrderHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $purchaseOrderID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Purchase Order
-
-eval {
- my $result = $api_instance->getPurchaseOrderHistory(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getPurchaseOrderHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getPurchaseOrderHistory
+ Retrieves history for a specific purchase order
+
+
+
+
+
+
+
+ /PurchaseOrders/{PurchaseOrderID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -80686,43 +29650,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getPurchaseOrderHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-purchase_order_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_purchase_order_history(xero_tenant_id, purchase_order_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_purchase_order_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PurchaseOrderID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PurchaseOrderID*
@@ -80748,15 +29694,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -80779,336 +29724,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getPurchaseOrders
- Retrieves purchase orders
-
-
-
-
-
-
-
- /PurchaseOrders
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/PurchaseOrders?Status=SUBMITTED&DateFrom=2019-12-01&DateTo=2019-12-31&order=PurchaseOrderNumber ASC&page=1"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- String status = 'SUBMITTED';
- String dateFrom = '2019-12-01';
- String dateTo = '2019-12-31';
- String order = 'PurchaseOrderNumber ASC';
- Integer page = 1;
-
- try {
- PurchaseOrders result = apiInstance.getPurchaseOrders(accessToken, xeroTenantId, ifModifiedSince, status, dateFrom, dateTo, order, page);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getPurchaseOrders");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- String status = SUBMITTED; // String | Filter by purchase order status
- String dateFrom = 2019-12-01; // String | Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31
- String dateTo = 2019-12-31; // String | Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31
- String order = PurchaseOrderNumber ASC; // String | Order by an any element
- Integer page = 1; // Integer | 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.
- try {
- PurchaseOrders result = apiInstance.getPurchaseOrders(xeroTenantId, ifModifiedSince, status, dateFrom, dateTo, order, page);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getPurchaseOrders");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-String *status = SUBMITTED; // Filter by purchase order status (optional) (default to null)
-String *dateFrom = 2019-12-01; // Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) (default to null)
-String *dateTo = 2019-12-31; // Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) (default to null)
-String *order = PurchaseOrderNumber ASC; // Order by an any element (optional) (default to null)
-Integer *page = 1; // 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) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves purchase orders
-[apiInstance getPurchaseOrdersWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- status:status
- dateFrom:dateFrom
- dateTo:dateTo
- order:order
- page:page
- completionHandler: ^(PurchaseOrders output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const status = 'SUBMITTED';
-const dateFrom = '2019-12-01';
-const dateTo = '2019-12-31';
-const order = 'PurchaseOrderNumber ASC';
-const page = 1;
-
-try {
- const response = await xero.accountingApi.getPurchaseOrders(xeroTenantId, ifModifiedSince, status, dateFrom, dateTo, order, page);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetPurchaseOrdersExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var status = "SUBMITTED";
- var dateFrom = "2019-12-01";
- var dateTo = "2019-12-31";
- var order = "PurchaseOrderNumber ASC";
- var page = 1;
-
- try {
- var result = await apiInstance.GetPurchaseOrdersAsync(accessToken, xeroTenantId, ifModifiedSince, status, dateFrom, dateTo, order, page);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetPurchaseOrders: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$status = "SUBMITTED";
-$dateFrom = "2019-12-01";
-$dateTo = "2019-12-31";
-$order = "PurchaseOrderNumber ASC";
-$page = 1;
-
-try {
- $result = $apiInstance->getPurchaseOrders($xeroTenantId, $ifModifiedSince, $status, $dateFrom, $dateTo, $order, $page);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getPurchaseOrders: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $status = SUBMITTED; # String | Filter by purchase order status
-my $dateFrom = 2019-12-01; # String | Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31
-my $dateTo = 2019-12-31; # String | Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31
-my $order = PurchaseOrderNumber ASC; # String | Order by an any element
-my $page = 1; # Integer | 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.
-
-eval {
- my $result = $api_instance->getPurchaseOrders(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, status => $status, dateFrom => $dateFrom, dateTo => $dateTo, order => $order, page => $page);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getPurchaseOrders: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getPurchaseOrders
+ Retrieves purchase orders
+
+
+
+
+
+
+
+ /PurchaseOrders
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -81135,49 +29778,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getPurchaseOrders: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-status = 'SUBMITTED'
-dateFrom = '2019-12-01'
-dateTo = '2019-12-31'
-order = 'PurchaseOrderNumber ASC'
-page = 1
-
-begin
- response = xero_client.accounting_api.get_purchase_orders(xero_tenant_id, if_modified_since, status, dateFrom, dateTo, order, page)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_purchase_orders: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -81200,7 +29819,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -81223,17 +29842,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- Status
+
+ Query parameters
+
+
+ Name
+ Description
+
+ Status
@@ -81253,7 +29869,7 @@ Parameters
- DateFrom
+ DateFrom
@@ -81273,7 +29889,7 @@ Parameters
- DateTo
+ DateTo
@@ -81293,7 +29909,7 @@ Parameters
- order
+ order
@@ -81313,7 +29929,7 @@ Parameters
- page
+ page
@@ -81333,308 +29949,34 @@ Parameters
-
-
-
-
-
-
-
-
- getPurchaseOrder≠AttachmentByFileName
- Retrieves a specific attachment for a specific purchase order by filename
-
-
-
-
-
-
-
- /PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID purchaseOrderID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getPurchaseOrder≠AttachmentByFileName(accessToken, xeroTenantId, purchaseOrderID, fileName, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getPurchaseOrder≠AttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID purchaseOrderID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Purchase Order
- String fileName = xero-dev.jpg; // String | Name of the attachment
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getPurchaseOrder≠AttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getPurchaseOrder≠AttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *purchaseOrderID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Purchase Order (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific attachment for a specific purchase order by filename
-[apiInstance getPurchaseOrder≠AttachmentByFileNameWith:xeroTenantId
- purchaseOrderID:purchaseOrderID
- fileName:fileName
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const purchaseOrderID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getPurchaseOrder≠AttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetPurchaseOrder≠AttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var purchaseOrderID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetPurchaseOrder≠AttachmentByFileNameAsync(accessToken, xeroTenantId, purchaseOrderID, fileName, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetPurchaseOrder≠AttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$purchaseOrderID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getPurchaseOrder≠AttachmentByFileName($xeroTenantId, $purchaseOrderID, $fileName, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getPurchaseOrder≠AttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $purchaseOrderID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Purchase Order
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getPurchaseOrder≠AttachmentByFileName(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID, fileName => $fileName, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getPurchaseOrder≠AttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getPurchaseOrder≠AttachmentByFileName
+ Retrieves a specific attachment for a specific purchase order by filename
+
+
+
+
+
+
+
+ /PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -81659,45 +30001,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getPurchaseOrder≠AttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-purchase_order_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_purchase_order≠attachment_by_file_name(xero_tenant_id, purchase_order_id, file_name, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_purchase_order≠attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PurchaseOrderID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PurchaseOrderID*
@@ -81723,7 +30045,7 @@ Parameters
- FileName*
+ FileName*
@@ -81746,15 +30068,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -81777,7 +30098,7 @@ Parameters
- contentType*
+ contentType*
@@ -81800,295 +30121,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getQuote
- Retrieves a specific quote using a unique quote Id
-
-
-
-
-
-
-
- /Quotes/{QuoteID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID quoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Quotes result = apiInstance.getQuote(accessToken, xeroTenantId, quoteID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getQuote");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID quoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Quote
- try {
- Quotes result = apiInstance.getQuote(xeroTenantId, quoteID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getQuote");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *quoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Quote (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific quote using a unique quote Id
-[apiInstance getQuoteWith:xeroTenantId
- quoteID:quoteID
- completionHandler: ^(Quotes output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const quoteID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getQuote(xeroTenantId, quoteID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetQuoteExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var quoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetQuoteAsync(accessToken, xeroTenantId, quoteID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetQuote: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$quoteID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getQuote($xeroTenantId, $quoteID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getQuote: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $quoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Quote
-
-eval {
- my $result = $api_instance->getQuote(xeroTenantId => $xeroTenantId, quoteID => $quoteID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getQuote: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getQuote
+ Retrieves a specific quote using a unique quote Id
+
+
+
+
+
+
+
+ /Quotes/{QuoteID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -82111,43 +30171,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getQuote: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-quote_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_quote(xero_tenant_id, quote_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_quote: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- QuoteID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ QuoteID*
@@ -82173,15 +30215,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -82204,295 +30245,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getQuoteAsPdf
- Retrieves a specific quote as a PDF file using a unique quote Id
-
-
-
-
-
-
-
- /Quotes/{QuoteID}/pdf
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/pdf"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID quoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- ByteArrayInputStream result = apiInstance.getQuoteAsPdf(accessToken, xeroTenantId, quoteID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getQuoteAsPdf");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID quoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Quote
- try {
- File result = apiInstance.getQuoteAsPdf(xeroTenantId, quoteID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getQuoteAsPdf");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *quoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Quote (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific quote as a PDF file using a unique quote Id
-[apiInstance getQuoteAsPdfWith:xeroTenantId
- quoteID:quoteID
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const quoteID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getQuoteAsPdf(xeroTenantId, quoteID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetQuoteAsPdfExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var quoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetQuoteAsPdfAsync(accessToken, xeroTenantId, quoteID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetQuoteAsPdf: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$quoteID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getQuoteAsPdf($xeroTenantId, $quoteID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getQuoteAsPdf: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $quoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Quote
-
-eval {
- my $result = $api_instance->getQuoteAsPdf(xeroTenantId => $xeroTenantId, quoteID => $quoteID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getQuoteAsPdf: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getQuoteAsPdf
+ Retrieves a specific quote as a PDF file using a unique quote Id
+
+
+
+
+
+
+
+ /Quotes/{QuoteID}/pdf
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -82515,43 +30295,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getQuoteAsPdf: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-quote_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_quote_as_pdf(xero_tenant_id, quote_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_quote_as_pdf: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- QuoteID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ QuoteID*
@@ -82577,15 +30339,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -82608,311 +30369,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getQuoteAttachmentByFileName
- Retrieves a specific attachment from a specific quote by filename
-
-
-
-
-
-
-
- /Quotes/{QuoteID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID quoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getQuoteAttachmentByFileName(accessToken, xeroTenantId, quoteID, fileName, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getQuoteAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID quoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Quote
- String fileName = xero-dev.jpg; // String | Name of the attachment
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getQuoteAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *quoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Quote (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific attachment from a specific quote by filename
-[apiInstance getQuoteAttachmentByFileNameWith:xeroTenantId
- quoteID:quoteID
- fileName:fileName
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const quoteID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetQuoteAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var quoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetQuoteAttachmentByFileNameAsync(accessToken, xeroTenantId, quoteID, fileName, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetQuoteAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$quoteID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getQuoteAttachmentByFileName($xeroTenantId, $quoteID, $fileName, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getQuoteAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $quoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Quote
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getQuoteAttachmentByFileName(xeroTenantId => $xeroTenantId, quoteID => $quoteID, fileName => $fileName, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getQuoteAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getQuoteAttachmentByFileName
+ Retrieves a specific attachment from a specific quote by filename
+
+
+
+
+
+
+
+ /Quotes/{QuoteID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -82937,45 +30421,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getQuoteAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-quote_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_quote_attachment_by_file_name(xero_tenant_id, quote_id, file_name, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_quote_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- QuoteID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ QuoteID*
@@ -83001,7 +30465,7 @@ Parameters
- FileName*
+ FileName*
@@ -83024,15 +30488,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -83055,7 +30518,7 @@ Parameters
- contentType*
+ contentType*
@@ -83078,311 +30541,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getQuoteAttachmentById
- Retrieves a specific attachment from a specific quote using a unique attachment Id
-
-
-
-
-
-
-
- /Quotes/{QuoteID}/Attachments/{AttachmentID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/Attachments/{AttachmentID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID quoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- UUID attachmentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getQuoteAttachmentById(accessToken, xeroTenantId, quoteID, attachmentID, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getQuoteAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID quoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Quote
- UUID attachmentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Attachment object
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getQuoteAttachmentById(xeroTenantId, quoteID, attachmentID, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getQuoteAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *quoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Quote (default to null)
-UUID *attachmentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Attachment object (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific attachment from a specific quote using a unique attachment Id
-[apiInstance getQuoteAttachmentByIdWith:xeroTenantId
- quoteID:quoteID
- attachmentID:attachmentID
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const quoteID = '00000000-0000-0000-0000-000000000000';
-const attachmentID = '00000000-0000-0000-0000-000000000000';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getQuoteAttachmentById(xeroTenantId, quoteID, attachmentID, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetQuoteAttachmentByIdExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var quoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var attachmentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetQuoteAttachmentByIdAsync(accessToken, xeroTenantId, quoteID, attachmentID, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetQuoteAttachmentById: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$quoteID = "00000000-0000-0000-0000-000000000000";
-$attachmentID = "00000000-0000-0000-0000-000000000000";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getQuoteAttachmentById($xeroTenantId, $quoteID, $attachmentID, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getQuoteAttachmentById: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $quoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Quote
-my $attachmentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Attachment object
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getQuoteAttachmentById(xeroTenantId => $xeroTenantId, quoteID => $quoteID, attachmentID => $attachmentID, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getQuoteAttachmentById: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getQuoteAttachmentById
+ Retrieves a specific attachment from a specific quote using a unique attachment Id
+
+
+
+
+
+
+
+ /Quotes/{QuoteID}/Attachments/{AttachmentID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -83407,45 +30593,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getQuoteAttachmentById: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-quote_id = '00000000-0000-0000-0000-000000000000'
-attachment_id = '00000000-0000-0000-0000-000000000000'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_quote_attachment_by_id(xero_tenant_id, quote_id, attachment_id, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_quote_attachment_by_id: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- QuoteID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ QuoteID*
@@ -83471,7 +30637,7 @@ Parameters
- AttachmentID*
+ AttachmentID*
@@ -83497,15 +30663,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -83528,7 +30693,7 @@ Parameters
- contentType*
+ contentType*
@@ -83551,295 +30716,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getQuoteAttachments
- Retrieves attachments for a specific quote
-
-
-
-
-
-
-
- /Quotes/{QuoteID}/Attachments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/Attachments"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID quoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Attachments result = apiInstance.getQuoteAttachments(accessToken, xeroTenantId, quoteID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getQuoteAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID quoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Quote
- try {
- Attachments result = apiInstance.getQuoteAttachments(xeroTenantId, quoteID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getQuoteAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *quoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Quote (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves attachments for a specific quote
-[apiInstance getQuoteAttachmentsWith:xeroTenantId
- quoteID:quoteID
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const quoteID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getQuoteAttachments(xeroTenantId, quoteID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetQuoteAttachmentsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var quoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetQuoteAttachmentsAsync(accessToken, xeroTenantId, quoteID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetQuoteAttachments: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$quoteID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getQuoteAttachments($xeroTenantId, $quoteID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getQuoteAttachments: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $quoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Quote
-
-eval {
- my $result = $api_instance->getQuoteAttachments(xeroTenantId => $xeroTenantId, quoteID => $quoteID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getQuoteAttachments: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getQuoteAttachments
+ Retrieves attachments for a specific quote
+
+
+
+
+
+
+
+ /Quotes/{QuoteID}/Attachments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -83862,43 +30766,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getQuoteAttachments: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-quote_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_quote_attachments(xero_tenant_id, quote_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_quote_attachments: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- QuoteID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ QuoteID*
@@ -83924,15 +30810,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -83955,296 +30840,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getQuoteHistory
- Retrieves history records of a specific quote
-
-
-
-
-
-
-
- /Quotes/{QuoteID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID quoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- HistoryRecords result = apiInstance.getQuoteHistory(accessToken, xeroTenantId, quoteID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getQuoteHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID quoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Quote
- try {
- HistoryRecords result = apiInstance.getQuoteHistory(xeroTenantId, quoteID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getQuoteHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *quoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Quote (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves history records of a specific quote
-[apiInstance getQuoteHistoryWith:xeroTenantId
- quoteID:quoteID
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const quoteID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getQuoteHistory(xeroTenantId, quoteID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetQuoteHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var quoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetQuoteHistoryAsync(accessToken, xeroTenantId, quoteID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetQuoteHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$quoteID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getQuoteHistory($xeroTenantId, $quoteID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getQuoteHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $quoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Quote
-
-eval {
- my $result = $api_instance->getQuoteHistory(xeroTenantId => $xeroTenantId, quoteID => $quoteID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getQuoteHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getQuoteHistory
+ Retrieves history records of a specific quote
+
+
+
+
+
+
+
+ /Quotes/{QuoteID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -84267,43 +30890,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getQuoteHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-quote_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_quote_history(xero_tenant_id, quote_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_quote_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- QuoteID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ QuoteID*
@@ -84329,15 +30934,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -84360,368 +30964,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getQuotes
- Retrieves sales quotes
-
-
-
-
-
-
-
- /Quotes
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Quotes?DateFrom=2013-10-20&DateTo=2013-10-20&ExpiryDateFrom=2013-10-20&ExpiryDateTo=2013-10-20&ContactID=00000000-0000-0000-0000-000000000000&Status=DRAFT&page=1&order=Status ASC&QuoteNumber=QU-0001"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- date dateFrom = 2013-10-20;
- date dateTo = 2013-10-20;
- date expiryDateFrom = 2013-10-20;
- date expiryDateTo = 2013-10-20;
- UUID contactID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String status = 'DRAFT';
- Integer page = 1;
- String order = 'Status ASC';
- String quoteNumber = 'QU-0001';
-
- try {
- Quotes result = apiInstance.getQuotes(accessToken, xeroTenantId, ifModifiedSince, dateFrom, dateTo, expiryDateFrom, expiryDateTo, contactID, status, page, order, quoteNumber);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getQuotes");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- date dateFrom = 2013-10-20; // date | Filter for quotes after a particular date
- date dateTo = 2013-10-20; // date | Filter for quotes before a particular date
- date expiryDateFrom = 2013-10-20; // date | Filter for quotes expiring after a particular date
- date expiryDateTo = 2013-10-20; // date | Filter for quotes before a particular date
- UUID contactID = 00000000-0000-0000-0000-000000000000; // UUID | Filter for quotes belonging to a particular contact
- String status = DRAFT; // String | Filter for quotes of a particular Status
- Integer page = 1; // Integer | e.g. page=1 – Up to 100 Quotes will be returned in a single API call with line items shown for each quote
- String order = Status ASC; // String | Order by an any element
- String quoteNumber = QU-0001; // String | Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001)
- try {
- Quotes result = apiInstance.getQuotes(xeroTenantId, ifModifiedSince, dateFrom, dateTo, expiryDateFrom, expiryDateTo, contactID, status, page, order, quoteNumber);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getQuotes");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-date *dateFrom = 2013-10-20; // Filter for quotes after a particular date (optional) (default to null)
-date *dateTo = 2013-10-20; // Filter for quotes before a particular date (optional) (default to null)
-date *expiryDateFrom = 2013-10-20; // Filter for quotes expiring after a particular date (optional) (default to null)
-date *expiryDateTo = 2013-10-20; // Filter for quotes before a particular date (optional) (default to null)
-UUID *contactID = 00000000-0000-0000-0000-000000000000; // Filter for quotes belonging to a particular contact (optional) (default to null)
-String *status = DRAFT; // Filter for quotes of a particular Status (optional) (default to null)
-Integer *page = 1; // e.g. page=1 – Up to 100 Quotes will be returned in a single API call with line items shown for each quote (optional) (default to null)
-String *order = Status ASC; // Order by an any element (optional) (default to null)
-String *quoteNumber = QU-0001; // Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001) (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves sales quotes
-[apiInstance getQuotesWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- dateFrom:dateFrom
- dateTo:dateTo
- expiryDateFrom:expiryDateFrom
- expiryDateTo:expiryDateTo
- contactID:contactID
- status:status
- page:page
- order:order
- quoteNumber:quoteNumber
- completionHandler: ^(Quotes output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const dateFrom: Date = new Date("2013-10-20");
-const dateTo: Date = new Date("2013-10-20");
-const expiryDateFrom: Date = new Date("2013-10-20");
-const expiryDateTo: Date = new Date("2013-10-20");
-const contactID = '00000000-0000-0000-0000-000000000000';
-const status = 'DRAFT';
-const page = 1;
-const order = 'Status ASC';
-const quoteNumber = 'QU-0001';
-
-try {
- const response = await xero.accountingApi.getQuotes(xeroTenantId, ifModifiedSince, dateFrom, dateTo, expiryDateFrom, expiryDateTo, contactID, status, page, order, quoteNumber);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetQuotesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var dateFrom = DateTime.Parse("2013-10-20");
- var dateTo = DateTime.Parse("2013-10-20");
- var expiryDateFrom = DateTime.Parse("2013-10-20");
- var expiryDateTo = DateTime.Parse("2013-10-20");
- var contactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var status = "DRAFT";
- var page = 1;
- var order = "Status ASC";
- var quoteNumber = "QU-0001";
-
- try {
- var result = await apiInstance.GetQuotesAsync(accessToken, xeroTenantId, ifModifiedSince, dateFrom, dateTo, expiryDateFrom, expiryDateTo, contactID, status, page, order, quoteNumber);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetQuotes: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$dateFrom = new DateTime("2013-10-20");
-$dateTo = new DateTime("2013-10-20");
-$expiryDateFrom = new DateTime("2013-10-20");
-$expiryDateTo = new DateTime("2013-10-20");
-$contactID = "00000000-0000-0000-0000-000000000000";
-$status = "DRAFT";
-$page = 1;
-$order = "Status ASC";
-$quoteNumber = "QU-0001";
-
-try {
- $result = $apiInstance->getQuotes($xeroTenantId, $ifModifiedSince, $dateFrom, $dateTo, $expiryDateFrom, $expiryDateTo, $contactID, $status, $page, $order, $quoteNumber);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getQuotes: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $dateFrom = 2013-10-20; # date | Filter for quotes after a particular date
-my $dateTo = 2013-10-20; # date | Filter for quotes before a particular date
-my $expiryDateFrom = 2013-10-20; # date | Filter for quotes expiring after a particular date
-my $expiryDateTo = 2013-10-20; # date | Filter for quotes before a particular date
-my $contactID = 00000000-0000-0000-0000-000000000000; # UUID | Filter for quotes belonging to a particular contact
-my $status = DRAFT; # String | Filter for quotes of a particular Status
-my $page = 1; # Integer | e.g. page=1 – Up to 100 Quotes will be returned in a single API call with line items shown for each quote
-my $order = Status ASC; # String | Order by an any element
-my $quoteNumber = QU-0001; # String | Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001)
-
-eval {
- my $result = $api_instance->getQuotes(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, dateFrom => $dateFrom, dateTo => $dateTo, expiryDateFrom => $expiryDateFrom, expiryDateTo => $expiryDateTo, contactID => $contactID, status => $status, page => $page, order => $order, quoteNumber => $quoteNumber);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getQuotes: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getQuotes
+ Retrieves sales quotes
+
+
+
+
+
+
+
+ /Quotes
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -84752,53 +31022,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getQuotes: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-date_from = "2013-10-20"
-date_to = "2013-10-20"
-expiry_date_from = "2013-10-20"
-expiry_date_to = "2013-10-20"
-contact_id = '00000000-0000-0000-0000-000000000000'
-status = 'DRAFT'
-page = 1
-order = 'Status ASC'
-quote_number = 'QU-0001'
-
-begin
- response = xero_client.accounting_api.get_quotes(xero_tenant_id, if_modified_since, date_from, date_to, expiry_date_from, expiry_date_to, contact_id, status, page, order, quote_number)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_quotes: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -84821,7 +31063,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -84844,17 +31086,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- DateFrom
+
+ Query parameters
+
+
+ Name
+ Description
+
+ DateFrom
@@ -84877,7 +31116,7 @@ Parameters
- DateTo
+ DateTo
@@ -84900,7 +31139,7 @@ Parameters
- ExpiryDateFrom
+ ExpiryDateFrom
@@ -84923,7 +31162,7 @@ Parameters
- ExpiryDateTo
+ ExpiryDateTo
@@ -84946,7 +31185,7 @@ Parameters
- ContactID
+ ContactID
@@ -84969,7 +31208,7 @@ Parameters
- Status
+ Status
@@ -84989,7 +31228,7 @@ Parameters
- page
+ page
@@ -85009,7 +31248,7 @@ Parameters
- order
+ order
@@ -85029,7 +31268,7 @@ Parameters
- QuoteNumber
+ QuoteNumber
@@ -85049,300 +31288,34 @@ Parameters
-
-
-
-
-
-
-
-
- getReceipt
- Retrieves a specific draft expense claim receipt by using a unique receipt Id
-
-
-
-
-
-
-
- /Receipts/{ReceiptID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Receipts/{ReceiptID}?unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID receiptID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- Integer unitdp = 4;
-
- try {
- Receipts result = apiInstance.getReceipt(accessToken, xeroTenantId, receiptID, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getReceipt");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID receiptID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Receipt
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- Receipts result = apiInstance.getReceipt(xeroTenantId, receiptID, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getReceipt");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *receiptID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Receipt (default to null)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific draft expense claim receipt by using a unique receipt Id
-[apiInstance getReceiptWith:xeroTenantId
- receiptID:receiptID
- unitdp:unitdp
- completionHandler: ^(Receipts output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const receiptID = '00000000-0000-0000-0000-000000000000';
-const unitdp = 4;
-
-try {
- const response = await xero.accountingApi.getReceipt(xeroTenantId, receiptID, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetReceiptExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var receiptID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var unitdp = 4;
-
- try {
- var result = await apiInstance.GetReceiptAsync(accessToken, xeroTenantId, receiptID, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetReceipt: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$receiptID = "00000000-0000-0000-0000-000000000000";
-$unitdp = 4;
-
-try {
- $result = $apiInstance->getReceipt($xeroTenantId, $receiptID, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getReceipt: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $receiptID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Receipt
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->getReceipt(xeroTenantId => $xeroTenantId, receiptID => $receiptID, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getReceipt: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getReceipt
+ Retrieves a specific draft expense claim receipt by using a unique receipt Id
+
+
+
+
+
+
+
+ /Receipts/{ReceiptID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -85365,44 +31338,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getReceipt: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-receipt_id = '00000000-0000-0000-0000-000000000000'
-unitdp = 4
-
-begin
- response = xero_client.accounting_api.get_receipt(xero_tenant_id, receipt_id, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_receipt: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ReceiptID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ReceiptID*
@@ -85428,15 +31382,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -85459,17 +31412,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- unitdp
+
+ Query parameters
+
+
+ Name
+ Description
+
+ unitdp
@@ -85489,308 +31439,34 @@ Parameters
-
-
-
-
-
-
-
-
- getReceiptAttachmentByFileName
- Retrieves a specific attachment from a specific expense claim receipts by file name
-
-
-
-
-
-
-
- /Receipts/{ReceiptID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Receipts/{ReceiptID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID receiptID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getReceiptAttachmentByFileName(accessToken, xeroTenantId, receiptID, fileName, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getReceiptAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID receiptID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Receipt
- String fileName = xero-dev.jpg; // String | Name of the attachment
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getReceiptAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *receiptID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Receipt (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific attachment from a specific expense claim receipts by file name
-[apiInstance getReceiptAttachmentByFileNameWith:xeroTenantId
- receiptID:receiptID
- fileName:fileName
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const receiptID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetReceiptAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var receiptID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetReceiptAttachmentByFileNameAsync(accessToken, xeroTenantId, receiptID, fileName, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetReceiptAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$receiptID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getReceiptAttachmentByFileName($xeroTenantId, $receiptID, $fileName, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getReceiptAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $receiptID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Receipt
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getReceiptAttachmentByFileName(xeroTenantId => $xeroTenantId, receiptID => $receiptID, fileName => $fileName, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getReceiptAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getReceiptAttachmentByFileName
+ Retrieves a specific attachment from a specific expense claim receipts by file name
+
+
+
+
+
+
+
+ /Receipts/{ReceiptID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -85815,45 +31491,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getReceiptAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-receipt_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_receipt_attachment_by_file_name(xero_tenant_id, receipt_id, file_name, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_receipt_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ReceiptID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ReceiptID*
@@ -85879,7 +31535,7 @@ Parameters
- FileName*
+ FileName*
@@ -85902,15 +31558,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -85933,7 +31588,7 @@ Parameters
- contentType*
+ contentType*
@@ -85956,311 +31611,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getReceiptAttachmentById
- Retrieves a specific attachments from a specific expense claim receipts by using a unique attachment Id
-
-
-
-
-
-
-
- /Receipts/{ReceiptID}/Attachments/{AttachmentID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Receipts/{ReceiptID}/Attachments/{AttachmentID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID receiptID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- UUID attachmentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getReceiptAttachmentById(accessToken, xeroTenantId, receiptID, attachmentID, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getReceiptAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID receiptID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Receipt
- UUID attachmentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Attachment object
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getReceiptAttachmentById(xeroTenantId, receiptID, attachmentID, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getReceiptAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *receiptID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Receipt (default to null)
-UUID *attachmentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Attachment object (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific attachments from a specific expense claim receipts by using a unique attachment Id
-[apiInstance getReceiptAttachmentByIdWith:xeroTenantId
- receiptID:receiptID
- attachmentID:attachmentID
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const receiptID = '00000000-0000-0000-0000-000000000000';
-const attachmentID = '00000000-0000-0000-0000-000000000000';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getReceiptAttachmentById(xeroTenantId, receiptID, attachmentID, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetReceiptAttachmentByIdExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var receiptID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var attachmentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetReceiptAttachmentByIdAsync(accessToken, xeroTenantId, receiptID, attachmentID, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetReceiptAttachmentById: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$receiptID = "00000000-0000-0000-0000-000000000000";
-$attachmentID = "00000000-0000-0000-0000-000000000000";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getReceiptAttachmentById($xeroTenantId, $receiptID, $attachmentID, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getReceiptAttachmentById: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $receiptID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Receipt
-my $attachmentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Attachment object
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getReceiptAttachmentById(xeroTenantId => $xeroTenantId, receiptID => $receiptID, attachmentID => $attachmentID, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getReceiptAttachmentById: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getReceiptAttachmentById
+ Retrieves a specific attachments from a specific expense claim receipts by using a unique attachment Id
+
+
+
+
+
+
+
+ /Receipts/{ReceiptID}/Attachments/{AttachmentID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -86285,45 +31663,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getReceiptAttachmentById: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-receipt_id = '00000000-0000-0000-0000-000000000000'
-attachment_id = '00000000-0000-0000-0000-000000000000'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_receipt_attachment_by_id(xero_tenant_id, receipt_id, attachment_id, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_receipt_attachment_by_id: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ReceiptID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ReceiptID*
@@ -86349,7 +31707,7 @@ Parameters
- AttachmentID*
+ AttachmentID*
@@ -86375,15 +31733,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -86406,7 +31763,7 @@ Parameters
- contentType*
+ contentType*
@@ -86429,295 +31786,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getReceiptAttachments
- Retrieves attachments for a specific expense claim receipt
-
-
-
-
-
-
-
- /Receipts/{ReceiptID}/Attachments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Receipts/{ReceiptID}/Attachments"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID receiptID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Attachments result = apiInstance.getReceiptAttachments(accessToken, xeroTenantId, receiptID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getReceiptAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID receiptID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Receipt
- try {
- Attachments result = apiInstance.getReceiptAttachments(xeroTenantId, receiptID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getReceiptAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *receiptID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Receipt (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves attachments for a specific expense claim receipt
-[apiInstance getReceiptAttachmentsWith:xeroTenantId
- receiptID:receiptID
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const receiptID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getReceiptAttachments(xeroTenantId, receiptID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetReceiptAttachmentsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var receiptID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetReceiptAttachmentsAsync(accessToken, xeroTenantId, receiptID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetReceiptAttachments: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$receiptID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getReceiptAttachments($xeroTenantId, $receiptID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getReceiptAttachments: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $receiptID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Receipt
-
-eval {
- my $result = $api_instance->getReceiptAttachments(xeroTenantId => $xeroTenantId, receiptID => $receiptID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getReceiptAttachments: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getReceiptAttachments
+ Retrieves attachments for a specific expense claim receipt
+
+
+
+
+
+
+
+ /Receipts/{ReceiptID}/Attachments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -86740,43 +31836,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getReceiptAttachments: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-receipt_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_receipt_attachments(xero_tenant_id, receipt_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_receipt_attachments: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ReceiptID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ReceiptID*
@@ -86802,15 +31880,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -86833,296 +31910,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getReceiptHistory
- Retrieves a history record for a specific receipt
-
-
-
-
-
-
-
- /Receipts/{ReceiptID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Receipts/{ReceiptID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID receiptID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- HistoryRecords result = apiInstance.getReceiptHistory(accessToken, xeroTenantId, receiptID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getReceiptHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID receiptID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Receipt
- try {
- HistoryRecords result = apiInstance.getReceiptHistory(xeroTenantId, receiptID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getReceiptHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *receiptID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Receipt (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a history record for a specific receipt
-[apiInstance getReceiptHistoryWith:xeroTenantId
- receiptID:receiptID
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const receiptID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getReceiptHistory(xeroTenantId, receiptID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetReceiptHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var receiptID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetReceiptHistoryAsync(accessToken, xeroTenantId, receiptID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetReceiptHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$receiptID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getReceiptHistory($xeroTenantId, $receiptID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getReceiptHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $receiptID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Receipt
-
-eval {
- my $result = $api_instance->getReceiptHistory(xeroTenantId => $xeroTenantId, receiptID => $receiptID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getReceiptHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getReceiptHistory
+ Retrieves a history record for a specific receipt
+
+
+
+
+
+
+
+ /Receipts/{ReceiptID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -87145,43 +31960,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getReceiptHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-receipt_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_receipt_history(xero_tenant_id, receipt_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_receipt_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ReceiptID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ReceiptID*
@@ -87207,15 +32004,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -87238,320 +32034,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getReceipts
- Retrieves draft expense claim receipts for any user
-
-
-
-
-
-
-
- /Receipts
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Receipts?where=Status=="DRAFT"&order=ReceiptNumber ASC&unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- String where = 'Status=="DRAFT"';
- String order = 'ReceiptNumber ASC';
- Integer unitdp = 4;
-
- try {
- Receipts result = apiInstance.getReceipts(accessToken, xeroTenantId, ifModifiedSince, where, order, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getReceipts");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- String where = Status=="DRAFT"; // String | Filter by an any element
- String order = ReceiptNumber ASC; // String | Order by an any element
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- Receipts result = apiInstance.getReceipts(xeroTenantId, ifModifiedSince, where, order, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getReceipts");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-String *where = Status=="DRAFT"; // Filter by an any element (optional) (default to null)
-String *order = ReceiptNumber ASC; // Order by an any element (optional) (default to null)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves draft expense claim receipts for any user
-[apiInstance getReceiptsWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- where:where
- order:order
- unitdp:unitdp
- completionHandler: ^(Receipts output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const where = 'Status=="DRAFT"';
-const order = 'ReceiptNumber ASC';
-const unitdp = 4;
-
-try {
- const response = await xero.accountingApi.getReceipts(xeroTenantId, ifModifiedSince, where, order, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetReceiptsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var where = "Status==\"DRAFT\"";
- var order = "ReceiptNumber ASC";
- var unitdp = 4;
-
- try {
- var result = await apiInstance.GetReceiptsAsync(accessToken, xeroTenantId, ifModifiedSince, where, order, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetReceipts: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$where = "Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Receipt::STATUS_DRAFT . '"";
-$order = "ReceiptNumber ASC";
-$unitdp = 4;
-
-try {
- $result = $apiInstance->getReceipts($xeroTenantId, $ifModifiedSince, $where, $order, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getReceipts: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $where = Status=="DRAFT"; # String | Filter by an any element
-my $order = ReceiptNumber ASC; # String | Order by an any element
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->getReceipts(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, where => $where, order => $order, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getReceipts: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getReceipts
+ Retrieves draft expense claim receipts for any user
+
+
+
+
+
+
+
+ /Receipts
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -87576,47 +32086,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getReceipts: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-where = 'Status==#{XeroRuby::Accounting::Receipt::DRAFT}'
-order = 'ReceiptNumber ASC'
-unitdp = 4
-
-begin
- response = xero_client.accounting_api.get_receipts(xero_tenant_id, if_modified_since, where, order, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_receipts: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -87639,7 +32127,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -87662,17 +32150,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -87692,7 +32177,7 @@ Parameters
- order
+ order
@@ -87712,7 +32197,7 @@ Parameters
- unitdp
+ unitdp
@@ -87732,292 +32217,34 @@ Parameters
-
-
-
-
-
-
-
-
- getRepeatingInvoice
- Retrieves a specific repeating invoice by using a unique repeating invoice Id
-
-
-
-
-
-
-
- /RepeatingInvoices/{RepeatingInvoiceID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/RepeatingInvoices/{RepeatingInvoiceID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID repeatingInvoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- RepeatingInvoices result = apiInstance.getRepeatingInvoice(accessToken, xeroTenantId, repeatingInvoiceID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getRepeatingInvoice");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Repeating Invoice
- try {
- RepeatingInvoices result = apiInstance.getRepeatingInvoice(xeroTenantId, repeatingInvoiceID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getRepeatingInvoice");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Repeating Invoice (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific repeating invoice by using a unique repeating invoice Id
-[apiInstance getRepeatingInvoiceWith:xeroTenantId
- repeatingInvoiceID:repeatingInvoiceID
- completionHandler: ^(RepeatingInvoices output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const repeatingInvoiceID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getRepeatingInvoice(xeroTenantId, repeatingInvoiceID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetRepeatingInvoiceExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var repeatingInvoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetRepeatingInvoiceAsync(accessToken, xeroTenantId, repeatingInvoiceID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetRepeatingInvoice: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$repeatingInvoiceID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getRepeatingInvoice($xeroTenantId, $repeatingInvoiceID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getRepeatingInvoice: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Repeating Invoice
-
-eval {
- my $result = $api_instance->getRepeatingInvoice(xeroTenantId => $xeroTenantId, repeatingInvoiceID => $repeatingInvoiceID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getRepeatingInvoice: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getRepeatingInvoice
+ Retrieves a specific repeating invoice by using a unique repeating invoice Id
+
+
+
+
+
+
+
+ /RepeatingInvoices/{RepeatingInvoiceID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -88040,43 +32267,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getRepeatingInvoice: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-repeating_invoice_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_repeating_invoice(xero_tenant_id, repeating_invoice_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_repeating_invoice: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- RepeatingInvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ RepeatingInvoiceID*
@@ -88102,15 +32311,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -88133,311 +32341,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getRepeatingInvoiceAttachmentByFileName
- Retrieves a specific attachment from a specific repeating invoices by file name
-
-
-
-
-
-
-
- /RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID repeatingInvoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getRepeatingInvoiceAttachmentByFileName(accessToken, xeroTenantId, repeatingInvoiceID, fileName, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getRepeatingInvoiceAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Repeating Invoice
- String fileName = xero-dev.jpg; // String | Name of the attachment
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getRepeatingInvoiceAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Repeating Invoice (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific attachment from a specific repeating invoices by file name
-[apiInstance getRepeatingInvoiceAttachmentByFileNameWith:xeroTenantId
- repeatingInvoiceID:repeatingInvoiceID
- fileName:fileName
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const repeatingInvoiceID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetRepeatingInvoiceAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var repeatingInvoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetRepeatingInvoiceAttachmentByFileNameAsync(accessToken, xeroTenantId, repeatingInvoiceID, fileName, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetRepeatingInvoiceAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$repeatingInvoiceID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getRepeatingInvoiceAttachmentByFileName($xeroTenantId, $repeatingInvoiceID, $fileName, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getRepeatingInvoiceAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Repeating Invoice
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getRepeatingInvoiceAttachmentByFileName(xeroTenantId => $xeroTenantId, repeatingInvoiceID => $repeatingInvoiceID, fileName => $fileName, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getRepeatingInvoiceAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getRepeatingInvoiceAttachmentByFileName
+ Retrieves a specific attachment from a specific repeating invoices by file name
+
+
+
+
+
+
+
+ /RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -88462,45 +32393,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getRepeatingInvoiceAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-repeating_invoice_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_repeating_invoice_attachment_by_file_name(xero_tenant_id, repeating_invoice_id, file_name, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_repeating_invoice_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- RepeatingInvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ RepeatingInvoiceID*
@@ -88526,7 +32437,7 @@ Parameters
- FileName*
+ FileName*
@@ -88549,15 +32460,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -88580,7 +32490,7 @@ Parameters
- contentType*
+ contentType*
@@ -88603,311 +32513,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getRepeatingInvoiceAttachmentById
- Retrieves a specific attachment from a specific repeating invoice
-
-
-
-
-
-
-
- /RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{AttachmentID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{AttachmentID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID repeatingInvoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- UUID attachmentID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String contentType = 'image/jpg';
-
- try {
- ByteArrayInputStream result = apiInstance.getRepeatingInvoiceAttachmentById(accessToken, xeroTenantId, repeatingInvoiceID, attachmentID, contentType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getRepeatingInvoiceAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Repeating Invoice
- UUID attachmentID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Attachment object
- String contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- try {
- File result = apiInstance.getRepeatingInvoiceAttachmentById(xeroTenantId, repeatingInvoiceID, attachmentID, contentType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getRepeatingInvoiceAttachmentById");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Repeating Invoice (default to null)
-UUID *attachmentID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Attachment object (default to null)
-String *contentType = image/jpg; // The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific attachment from a specific repeating invoice
-[apiInstance getRepeatingInvoiceAttachmentByIdWith:xeroTenantId
- repeatingInvoiceID:repeatingInvoiceID
- attachmentID:attachmentID
- contentType:contentType
- completionHandler: ^(File output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const repeatingInvoiceID = '00000000-0000-0000-0000-000000000000';
-const attachmentID = '00000000-0000-0000-0000-000000000000';
-const contentType = 'image/jpg';
-
-try {
- const response = await xero.accountingApi.getRepeatingInvoiceAttachmentById(xeroTenantId, repeatingInvoiceID, attachmentID, contentType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetRepeatingInvoiceAttachmentByIdExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var repeatingInvoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var attachmentID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var contentType = "image/jpg";
-
- try {
- var result = await apiInstance.GetRepeatingInvoiceAttachmentByIdAsync(accessToken, xeroTenantId, repeatingInvoiceID, attachmentID, contentType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetRepeatingInvoiceAttachmentById: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$repeatingInvoiceID = "00000000-0000-0000-0000-000000000000";
-$attachmentID = "00000000-0000-0000-0000-000000000000";
-$contentType = "image/jpg";
-
-try {
- $result = $apiInstance->getRepeatingInvoiceAttachmentById($xeroTenantId, $repeatingInvoiceID, $attachmentID, $contentType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getRepeatingInvoiceAttachmentById: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Repeating Invoice
-my $attachmentID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Attachment object
-my $contentType = image/jpg; # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
-
-eval {
- my $result = $api_instance->getRepeatingInvoiceAttachmentById(xeroTenantId => $xeroTenantId, repeatingInvoiceID => $repeatingInvoiceID, attachmentID => $attachmentID, contentType => $contentType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getRepeatingInvoiceAttachmentById: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getRepeatingInvoiceAttachmentById
+ Retrieves a specific attachment from a specific repeating invoice
+
+
+
+
+
+
+
+ /RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{AttachmentID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -88932,45 +32565,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getRepeatingInvoiceAttachmentById: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-repeating_invoice_id = '00000000-0000-0000-0000-000000000000'
-attachment_id = '00000000-0000-0000-0000-000000000000'
-content_type = 'image/jpg'
-
-begin
- response = xero_client.accounting_api.get_repeating_invoice_attachment_by_id(xero_tenant_id, repeating_invoice_id, attachment_id, content_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_repeating_invoice_attachment_by_id: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- RepeatingInvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ RepeatingInvoiceID*
@@ -88996,7 +32609,7 @@ Parameters
- AttachmentID*
+ AttachmentID*
@@ -89022,15 +32635,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -89053,7 +32665,7 @@ Parameters
- contentType*
+ contentType*
@@ -89076,295 +32688,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getRepeatingInvoiceAttachments
- Retrieves attachments from a specific repeating invoice
-
-
-
-
-
-
-
- /RepeatingInvoices/{RepeatingInvoiceID}/Attachments
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/RepeatingInvoices/{RepeatingInvoiceID}/Attachments"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID repeatingInvoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Attachments result = apiInstance.getRepeatingInvoiceAttachments(accessToken, xeroTenantId, repeatingInvoiceID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getRepeatingInvoiceAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Repeating Invoice
- try {
- Attachments result = apiInstance.getRepeatingInvoiceAttachments(xeroTenantId, repeatingInvoiceID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getRepeatingInvoiceAttachments");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Repeating Invoice (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves attachments from a specific repeating invoice
-[apiInstance getRepeatingInvoiceAttachmentsWith:xeroTenantId
- repeatingInvoiceID:repeatingInvoiceID
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const repeatingInvoiceID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getRepeatingInvoiceAttachments(xeroTenantId, repeatingInvoiceID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetRepeatingInvoiceAttachmentsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var repeatingInvoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetRepeatingInvoiceAttachmentsAsync(accessToken, xeroTenantId, repeatingInvoiceID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetRepeatingInvoiceAttachments: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$repeatingInvoiceID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getRepeatingInvoiceAttachments($xeroTenantId, $repeatingInvoiceID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getRepeatingInvoiceAttachments: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Repeating Invoice
-
-eval {
- my $result = $api_instance->getRepeatingInvoiceAttachments(xeroTenantId => $xeroTenantId, repeatingInvoiceID => $repeatingInvoiceID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getRepeatingInvoiceAttachments: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getRepeatingInvoiceAttachments
+ Retrieves attachments from a specific repeating invoice
+
+
+
+
+
+
+
+ /RepeatingInvoices/{RepeatingInvoiceID}/Attachments
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -89387,43 +32738,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getRepeatingInvoiceAttachments: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-repeating_invoice_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_repeating_invoice_attachments(xero_tenant_id, repeating_invoice_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_repeating_invoice_attachments: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments.read
- Grant read-only access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- RepeatingInvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.attachments.read
+ Grant read-only access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ RepeatingInvoiceID*
@@ -89449,15 +32782,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -89480,296 +32812,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getRepeatingInvoiceHistory
- Retrieves history record for a specific repeating invoice
-
-
-
-
-
-
-
- /RepeatingInvoices/{RepeatingInvoiceID}/History
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/RepeatingInvoices/{RepeatingInvoiceID}/History"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID repeatingInvoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- HistoryRecords result = apiInstance.getRepeatingInvoiceHistory(accessToken, xeroTenantId, repeatingInvoiceID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getRepeatingInvoiceHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Repeating Invoice
- try {
- HistoryRecords result = apiInstance.getRepeatingInvoiceHistory(xeroTenantId, repeatingInvoiceID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getRepeatingInvoiceHistory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Repeating Invoice (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves history record for a specific repeating invoice
-[apiInstance getRepeatingInvoiceHistoryWith:xeroTenantId
- repeatingInvoiceID:repeatingInvoiceID
- completionHandler: ^(HistoryRecords output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const repeatingInvoiceID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getRepeatingInvoiceHistory(xeroTenantId, repeatingInvoiceID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetRepeatingInvoiceHistoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var repeatingInvoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetRepeatingInvoiceHistoryAsync(accessToken, xeroTenantId, repeatingInvoiceID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetRepeatingInvoiceHistory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$repeatingInvoiceID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getRepeatingInvoiceHistory($xeroTenantId, $repeatingInvoiceID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getRepeatingInvoiceHistory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Repeating Invoice
-
-eval {
- my $result = $api_instance->getRepeatingInvoiceHistory(xeroTenantId => $xeroTenantId, repeatingInvoiceID => $repeatingInvoiceID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getRepeatingInvoiceHistory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getRepeatingInvoiceHistory
+ Retrieves history record for a specific repeating invoice
+
+
+
+
+
+
+
+ /RepeatingInvoices/{RepeatingInvoiceID}/History
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -89792,43 +32862,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getRepeatingInvoiceHistory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-repeating_invoice_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_repeating_invoice_history(xero_tenant_id, repeating_invoice_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_repeating_invoice_history: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- RepeatingInvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ RepeatingInvoiceID*
@@ -89854,15 +32906,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -89885,303 +32936,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getRepeatingInvoices
- Retrieves repeating invoices
-
-
-
-
-
-
-
- /RepeatingInvoices
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/RepeatingInvoices?where=Status=="DRAFT"&order=Total ASC"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- String where = 'Status=="DRAFT"';
- String order = 'Total ASC';
-
- try {
- RepeatingInvoices result = apiInstance.getRepeatingInvoices(accessToken, xeroTenantId, where, order);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getRepeatingInvoices");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- String where = Status=="DRAFT"; // String | Filter by an any element
- String order = Total ASC; // String | Order by an any element
- try {
- RepeatingInvoices result = apiInstance.getRepeatingInvoices(xeroTenantId, where, order);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getRepeatingInvoices");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-String *where = Status=="DRAFT"; // Filter by an any element (optional) (default to null)
-String *order = Total ASC; // Order by an any element (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves repeating invoices
-[apiInstance getRepeatingInvoicesWith:xeroTenantId
- where:where
- order:order
- completionHandler: ^(RepeatingInvoices output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const where = 'Status=="DRAFT"';
-const order = 'Total ASC';
-
-try {
- const response = await xero.accountingApi.getRepeatingInvoices(xeroTenantId, where, order);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetRepeatingInvoicesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var where = "Status==\"DRAFT\"";
- var order = "Total ASC";
-
- try {
- var result = await apiInstance.GetRepeatingInvoicesAsync(accessToken, xeroTenantId, where, order);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetRepeatingInvoices: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$where = "Status=="' . \XeroAPI\XeroPHP\Models\Accounting\RepeatingInvoice::STATUS_DRAFT . '"";
-$order = "Total ASC";
-
-try {
- $result = $apiInstance->getRepeatingInvoices($xeroTenantId, $where, $order);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getRepeatingInvoices: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $where = Status=="DRAFT"; # String | Filter by an any element
-my $order = Total ASC; # String | Order by an any element
-
-eval {
- my $result = $api_instance->getRepeatingInvoices(xeroTenantId => $xeroTenantId, where => $where, order => $order);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getRepeatingInvoices: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getRepeatingInvoices
+ Retrieves repeating invoices
+
+
+
+
+
+
+
+ /RepeatingInvoices
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -90205,45 +32987,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getRepeatingInvoices: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-where = 'Status==#{XeroRuby::Accounting::RepeatingInvoice::DRAFT}'
-order = 'Total ASC'
-
-begin
- response = xero_client.accounting_api.get_repeating_invoices(xero_tenant_id, where, order)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_repeating_invoices: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions.read
- Grant read-only access to invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions.read
+ Grant read-only access to invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -90266,17 +33028,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -90296,7 +33055,7 @@ Parameters
- order
+ order
@@ -90316,316 +33075,34 @@ Parameters
-
-
-
-
-
-
-
-
- getReportAgedPayablesByContact
- Retrieves report for aged payables by contact
-
-
-
-
-
-
-
- /Reports/AgedPayablesByContact
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Reports/AgedPayablesByContact?contactId=00000000-0000-0000-0000-000000000000&date=2013-10-20&fromDate=2013-10-20&toDate=2013-10-20"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID contactId = UUID.fromString("00000000-0000-0000-0000-000000000000");
- date date = 2013-10-20;
- date fromDate = 2013-10-20;
- date toDate = 2013-10-20;
-
- try {
- ReportWithRows result = apiInstance.getReportAgedPayablesByContact(accessToken, xeroTenantId, contactId, date, fromDate, toDate);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getReportAgedPayablesByContact");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID contactId = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact
- date date = 2013-10-20; // date | The date of the Aged Payables By Contact report
- date fromDate = 2013-10-20; // date | filter by the from date of the report e.g. 2021-02-01
- date toDate = 2013-10-20; // date | filter by the to date of the report e.g. 2021-02-28
- try {
- ReportWithRows result = apiInstance.getReportAgedPayablesByContact(xeroTenantId, contactId, date, fromDate, toDate);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getReportAgedPayablesByContact");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *contactId = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact (default to null)
-date *date = 2013-10-20; // The date of the Aged Payables By Contact report (optional) (default to null)
-date *fromDate = 2013-10-20; // filter by the from date of the report e.g. 2021-02-01 (optional) (default to null)
-date *toDate = 2013-10-20; // filter by the to date of the report e.g. 2021-02-28 (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves report for aged payables by contact
-[apiInstance getReportAgedPayablesByContactWith:xeroTenantId
- contactId:contactId
- date:date
- fromDate:fromDate
- toDate:toDate
- completionHandler: ^(ReportWithRows output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactId = '00000000-0000-0000-0000-000000000000';
-const date: Date = new Date("2013-10-20");
-const fromDate: Date = new Date("2013-10-20");
-const toDate: Date = new Date("2013-10-20");
-
-try {
- const response = await xero.accountingApi.getReportAgedPayablesByContact(xeroTenantId, contactId, date, fromDate, toDate);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetReportAgedPayablesByContactExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactId = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var date = DateTime.Parse("2013-10-20");
- var fromDate = DateTime.Parse("2013-10-20");
- var toDate = DateTime.Parse("2013-10-20");
-
- try {
- var result = await apiInstance.GetReportAgedPayablesByContactAsync(accessToken, xeroTenantId, contactId, date, fromDate, toDate);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetReportAgedPayablesByContact: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactId = "00000000-0000-0000-0000-000000000000";
-$date = new DateTime("2013-10-20");
-$fromDate = new DateTime("2013-10-20");
-$toDate = new DateTime("2013-10-20");
-
-try {
- $result = $apiInstance->getReportAgedPayablesByContact($xeroTenantId, $contactId, $date, $fromDate, $toDate);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getReportAgedPayablesByContact: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactId = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact
-my $date = 2013-10-20; # date | The date of the Aged Payables By Contact report
-my $fromDate = 2013-10-20; # date | filter by the from date of the report e.g. 2021-02-01
-my $toDate = 2013-10-20; # date | filter by the to date of the report e.g. 2021-02-28
-
-eval {
- my $result = $api_instance->getReportAgedPayablesByContact(xeroTenantId => $xeroTenantId, contactId => $contactId, date => $date, fromDate => $fromDate, toDate => $toDate);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getReportAgedPayablesByContact: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getReportAgedPayablesByContact
+ Retrieves report for aged payables by contact
+
+
+
+
+
+
+
+ /Reports/AgedPayablesByContact
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -90651,47 +33128,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getReportAgedPayablesByContact: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_id = '00000000-0000-0000-0000-000000000000'
-date = "2013-10-20"
-from_date = "2013-10-20"
-to_date = "2013-10-20"
-
-begin
- response = xero_client.accounting_api.get_report_aged_payables_by_contact(xero_tenant_id, contact_id, date, from_date, to_date)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_report_aged_payables_by_contact: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.reports.read
- Grant read-only access to accounting reports
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.reports.read
+ Grant read-only access to accounting reports
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -90714,17 +33169,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- contactId*
+
+ Query parameters
+
+
+ Name
+ Description
+
+ contactId*
@@ -90750,7 +33202,7 @@ Parameters
- date
+ date
@@ -90773,7 +33225,7 @@ Parameters
- fromDate
+ fromDate
@@ -90796,7 +33248,7 @@ Parameters
- toDate
+ toDate
@@ -90819,316 +33271,34 @@ Parameters
-
-
-
-
-
-
-
-
- getReportAgedReceivablesByContact
- Retrieves report for aged receivables by contact
-
-
-
-
-
-
-
- /Reports/AgedReceivablesByContact
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Reports/AgedReceivablesByContact?contactId=00000000-0000-0000-0000-000000000000&date=2013-10-20&fromDate=2013-10-20&toDate=2013-10-20"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID contactId = UUID.fromString("00000000-0000-0000-0000-000000000000");
- date date = 2013-10-20;
- date fromDate = 2013-10-20;
- date toDate = 2013-10-20;
-
- try {
- ReportWithRows result = apiInstance.getReportAgedReceivablesByContact(accessToken, xeroTenantId, contactId, date, fromDate, toDate);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getReportAgedReceivablesByContact");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID contactId = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact
- date date = 2013-10-20; // date | The date of the Aged Receivables By Contact report
- date fromDate = 2013-10-20; // date | filter by the from date of the report e.g. 2021-02-01
- date toDate = 2013-10-20; // date | filter by the to date of the report e.g. 2021-02-28
- try {
- ReportWithRows result = apiInstance.getReportAgedReceivablesByContact(xeroTenantId, contactId, date, fromDate, toDate);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getReportAgedReceivablesByContact");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *contactId = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact (default to null)
-date *date = 2013-10-20; // The date of the Aged Receivables By Contact report (optional) (default to null)
-date *fromDate = 2013-10-20; // filter by the from date of the report e.g. 2021-02-01 (optional) (default to null)
-date *toDate = 2013-10-20; // filter by the to date of the report e.g. 2021-02-28 (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves report for aged receivables by contact
-[apiInstance getReportAgedReceivablesByContactWith:xeroTenantId
- contactId:contactId
- date:date
- fromDate:fromDate
- toDate:toDate
- completionHandler: ^(ReportWithRows output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactId = '00000000-0000-0000-0000-000000000000';
-const date: Date = new Date("2013-10-20");
-const fromDate: Date = new Date("2013-10-20");
-const toDate: Date = new Date("2013-10-20");
-
-try {
- const response = await xero.accountingApi.getReportAgedReceivablesByContact(xeroTenantId, contactId, date, fromDate, toDate);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetReportAgedReceivablesByContactExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactId = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var date = DateTime.Parse("2013-10-20");
- var fromDate = DateTime.Parse("2013-10-20");
- var toDate = DateTime.Parse("2013-10-20");
-
- try {
- var result = await apiInstance.GetReportAgedReceivablesByContactAsync(accessToken, xeroTenantId, contactId, date, fromDate, toDate);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetReportAgedReceivablesByContact: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactId = "00000000-0000-0000-0000-000000000000";
-$date = new DateTime("2013-10-20");
-$fromDate = new DateTime("2013-10-20");
-$toDate = new DateTime("2013-10-20");
-
-try {
- $result = $apiInstance->getReportAgedReceivablesByContact($xeroTenantId, $contactId, $date, $fromDate, $toDate);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getReportAgedReceivablesByContact: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactId = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact
-my $date = 2013-10-20; # date | The date of the Aged Receivables By Contact report
-my $fromDate = 2013-10-20; # date | filter by the from date of the report e.g. 2021-02-01
-my $toDate = 2013-10-20; # date | filter by the to date of the report e.g. 2021-02-28
-
-eval {
- my $result = $api_instance->getReportAgedReceivablesByContact(xeroTenantId => $xeroTenantId, contactId => $contactId, date => $date, fromDate => $fromDate, toDate => $toDate);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getReportAgedReceivablesByContact: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getReportAgedReceivablesByContact
+ Retrieves report for aged receivables by contact
+
+
+
+
+
+
+
+ /Reports/AgedReceivablesByContact
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -91154,47 +33324,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getReportAgedReceivablesByContact: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_id = '00000000-0000-0000-0000-000000000000'
-date = "2013-10-20"
-from_date = "2013-10-20"
-to_date = "2013-10-20"
-
-begin
- response = xero_client.accounting_api.get_report_aged_receivables_by_contact(xero_tenant_id, contact_id, date, from_date, to_date)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_report_aged_receivables_by_contact: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.reports.read
- Grant read-only access to accounting reports
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.reports.read
+ Grant read-only access to accounting reports
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -91217,17 +33365,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- contactId*
+
+ Query parameters
+
+
+ Name
+ Description
+
+ contactId*
@@ -91253,7 +33398,7 @@ Parameters
- date
+ date
@@ -91276,7 +33421,7 @@ Parameters
- fromDate
+ fromDate
@@ -91299,7 +33444,7 @@ Parameters
- toDate
+ toDate
@@ -91322,292 +33467,34 @@ Parameters
-
-
-
-
-
-
-
-
- getReportBASorGST
- Retrieves a specific report for BAS using a unique report Id (only valid for AU orgs)
-
-
-
-
-
-
-
- /Reports/{ReportID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Reports/{ReportID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- String reportID = '00000000-0000-0000-0000-000000000000';
-
- try {
- ReportWithRows result = apiInstance.getReportBASorGST(accessToken, xeroTenantId, reportID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getReportBASorGST");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- String reportID = 00000000-0000-0000-0000-000000000000; // String | Unique identifier for a Report
- try {
- ReportWithRows result = apiInstance.getReportBASorGST(xeroTenantId, reportID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getReportBASorGST");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-String *reportID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Report (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific report for BAS using a unique report Id (only valid for AU orgs)
-[apiInstance getReportBASorGSTWith:xeroTenantId
- reportID:reportID
- completionHandler: ^(ReportWithRows output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const reportID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getReportBASorGST(xeroTenantId, reportID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetReportBASorGSTExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var reportID = "00000000-0000-0000-0000-000000000000";
-
- try {
- var result = await apiInstance.GetReportBASorGSTAsync(accessToken, xeroTenantId, reportID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetReportBASorGST: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$reportID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getReportBASorGST($xeroTenantId, $reportID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getReportBASorGST: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $reportID = 00000000-0000-0000-0000-000000000000; # String | Unique identifier for a Report
-
-eval {
- my $result = $api_instance->getReportBASorGST(xeroTenantId => $xeroTenantId, reportID => $reportID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getReportBASorGST: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getReportBASorGST
+ Retrieves a specific report for BAS using a unique report Id (only valid for AU orgs)
+
+
+
+
+
+
+
+ /Reports/{ReportID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -91630,43 +33517,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getReportBASorGST: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-report_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_report_ba_sor_gst(xero_tenant_id, report_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_report_ba_sor_gst: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.reports.read
- Grant read-only access to accounting reports
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ReportID*
+
+
+ Scopes
+
+
+
+ accounting.reports.read
+ Grant read-only access to accounting reports
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ReportID*
@@ -91689,15 +33558,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -91720,286 +33588,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getReportBASorGSTList
- Retrieves report for BAS (only valid for AU orgs)
-
-
-
-
-
-
-
- /Reports
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Reports"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- try {
- ReportWithRows result = apiInstance.getReportBASorGSTList(accessToken, xeroTenantId);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getReportBASorGSTList");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- try {
- ReportWithRows result = apiInstance.getReportBASorGSTList(xeroTenantId);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getReportBASorGSTList");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves report for BAS (only valid for AU orgs)
-[apiInstance getReportBASorGSTListWith:xeroTenantId
- completionHandler: ^(ReportWithRows output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
-try {
- const response = await xero.accountingApi.getReportBASorGSTList(xeroTenantId);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetReportBASorGSTListExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
-
- try {
- var result = await apiInstance.GetReportBASorGSTListAsync(accessToken, xeroTenantId);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetReportBASorGSTList: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-
-try {
- $result = $apiInstance->getReportBASorGSTList($xeroTenantId);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getReportBASorGSTList: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-
-eval {
- my $result = $api_instance->getReportBASorGSTList(xeroTenantId => $xeroTenantId);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getReportBASorGSTList: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getReportBASorGSTList
+ Retrieves report for BAS (only valid for AU orgs)
+
+
+
+
+
+
+
+ /Reports
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -92021,43 +33637,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getReportBASorGSTList: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-
-begin
- response = xero_client.accounting_api.get_report_ba_sor_gst_list(xero_tenant_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_report_ba_sor_gst_list: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.reports.read
- Grant read-only access to accounting reports
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.reports.read
+ Grant read-only access to accounting reports
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -92080,342 +33678,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getReportBalanceSheet
- Retrieves report for balancesheet
-
-
-
-
-
-
-
- /Reports/BalanceSheet
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Reports/BalanceSheet?date=2019-11-01&periods=3&timeframe=MONTH&trackingOptionID1=00000000-0000-0000-0000-000000000000&trackingOptionID2=00000000-0000-0000-0000-000000000000&standardLayout=true&paymentsOnly=false"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- date date = 2019-11-01;
- Integer periods = 3;
- String timeframe = 'MONTH';
- String trackingOptionID1 = '00000000-0000-0000-0000-000000000000';
- String trackingOptionID2 = '00000000-0000-0000-0000-000000000000';
- Boolean standardLayout = true;
- Boolean paymentsOnly = false;
-
- try {
- ReportWithRows result = apiInstance.getReportBalanceSheet(accessToken, xeroTenantId, date, periods, timeframe, trackingOptionID1, trackingOptionID2, standardLayout, paymentsOnly);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getReportBalanceSheet");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- date date = 2019-11-01; // date | The date of the Balance Sheet report
- Integer periods = 3; // Integer | The number of periods for the Balance Sheet report
- String timeframe = MONTH; // String | The period size to compare to (MONTH, QUARTER, YEAR)
- String trackingOptionID1 = 00000000-0000-0000-0000-000000000000; // String | The tracking option 1 for the Balance Sheet report
- String trackingOptionID2 = 00000000-0000-0000-0000-000000000000; // String | The tracking option 2 for the Balance Sheet report
- Boolean standardLayout = true; // Boolean | The standard layout boolean for the Balance Sheet report
- Boolean paymentsOnly = false; // Boolean | return a cash basis for the Balance Sheet report
- try {
- ReportWithRows result = apiInstance.getReportBalanceSheet(xeroTenantId, date, periods, timeframe, trackingOptionID1, trackingOptionID2, standardLayout, paymentsOnly);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getReportBalanceSheet");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-date *date = 2019-11-01; // The date of the Balance Sheet report (optional) (default to null)
-Integer *periods = 3; // The number of periods for the Balance Sheet report (optional) (default to null)
-String *timeframe = MONTH; // The period size to compare to (MONTH, QUARTER, YEAR) (optional) (default to null)
-String *trackingOptionID1 = 00000000-0000-0000-0000-000000000000; // The tracking option 1 for the Balance Sheet report (optional) (default to null)
-String *trackingOptionID2 = 00000000-0000-0000-0000-000000000000; // The tracking option 2 for the Balance Sheet report (optional) (default to null)
-Boolean *standardLayout = true; // The standard layout boolean for the Balance Sheet report (optional) (default to null)
-Boolean *paymentsOnly = false; // return a cash basis for the Balance Sheet report (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves report for balancesheet
-[apiInstance getReportBalanceSheetWith:xeroTenantId
- date:date
- periods:periods
- timeframe:timeframe
- trackingOptionID1:trackingOptionID1
- trackingOptionID2:trackingOptionID2
- standardLayout:standardLayout
- paymentsOnly:paymentsOnly
- completionHandler: ^(ReportWithRows output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const date: Date = new Date("2019-11-01");
-const periods = 3;
-const timeframe = 'MONTH';
-const trackingOptionID1 = '00000000-0000-0000-0000-000000000000';
-const trackingOptionID2 = '00000000-0000-0000-0000-000000000000';
-const standardLayout = true;
-const paymentsOnly = false;
-
-try {
- const response = await xero.accountingApi.getReportBalanceSheet(xeroTenantId, date, periods, timeframe, trackingOptionID1, trackingOptionID2, standardLayout, paymentsOnly);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetReportBalanceSheetExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var date = DateTime.Parse("2019-11-01");
- var periods = 3;
- var timeframe = "MONTH";
- var trackingOptionID1 = "00000000-0000-0000-0000-000000000000";
- var trackingOptionID2 = "00000000-0000-0000-0000-000000000000";
- var standardLayout = true;
- var paymentsOnly = false;
-
- try {
- var result = await apiInstance.GetReportBalanceSheetAsync(accessToken, xeroTenantId, date, periods, timeframe, trackingOptionID1, trackingOptionID2, standardLayout, paymentsOnly);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetReportBalanceSheet: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$date = new DateTime("2019-11-01");
-$periods = 3;
-$timeframe = "MONTH";
-$trackingOptionID1 = "00000000-0000-0000-0000-000000000000";
-$trackingOptionID2 = "00000000-0000-0000-0000-000000000000";
-$standardLayout = true;
-$paymentsOnly = false;
-
-try {
- $result = $apiInstance->getReportBalanceSheet($xeroTenantId, $date, $periods, $timeframe, $trackingOptionID1, $trackingOptionID2, $standardLayout, $paymentsOnly);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getReportBalanceSheet: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $date = 2019-11-01; # date | The date of the Balance Sheet report
-my $periods = 3; # Integer | The number of periods for the Balance Sheet report
-my $timeframe = MONTH; # String | The period size to compare to (MONTH, QUARTER, YEAR)
-my $trackingOptionID1 = 00000000-0000-0000-0000-000000000000; # String | The tracking option 1 for the Balance Sheet report
-my $trackingOptionID2 = 00000000-0000-0000-0000-000000000000; # String | The tracking option 2 for the Balance Sheet report
-my $standardLayout = true; # Boolean | The standard layout boolean for the Balance Sheet report
-my $paymentsOnly = false; # Boolean | return a cash basis for the Balance Sheet report
-
-eval {
- my $result = $api_instance->getReportBalanceSheet(xeroTenantId => $xeroTenantId, date => $date, periods => $periods, timeframe => $timeframe, trackingOptionID1 => $trackingOptionID1, trackingOptionID2 => $trackingOptionID2, standardLayout => $standardLayout, paymentsOnly => $paymentsOnly);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getReportBalanceSheet: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getReportBalanceSheet
+ Retrieves report for balancesheet
+
+
+
+
+
+
+
+ /Reports/BalanceSheet
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -92443,50 +33733,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getReportBalanceSheet: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-date = "2019-11-01"
-periods = 3
-time_frame = 'MONTH'
-tracking_option_id_1 = '00000000-0000-0000-0000-000000000000'
-tracking_option_id_2 = '00000000-0000-0000-0000-000000000000'
-standard_layout = true
-payments_only = false
-
-begin
- response = xero_client.accounting_api.get_report_balance_sheet(xero_tenant_id, date, periods, time_frame, tracking_option_id_1, tracking_option_id_2, standard_layout, payments_only)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_report_balance_sheet: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.reports.read
- Grant read-only access to accounting reports
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.reports.read
+ Grant read-only access to accounting reports
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -92509,17 +33774,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- date
+
+ Query parameters
+
+
+ Name
+ Description
+
+ date
@@ -92542,7 +33804,7 @@ Parameters
- periods
+ periods
@@ -92562,7 +33824,7 @@ Parameters
- timeframe
+ timeframe
@@ -92582,7 +33844,7 @@ Parameters
- trackingOptionID1
+ trackingOptionID1
@@ -92602,7 +33864,7 @@ Parameters
- trackingOptionID2
+ trackingOptionID2
@@ -92622,7 +33884,7 @@ Parameters
- standardLayout
+ standardLayout
@@ -92642,7 +33904,7 @@ Parameters
- paymentsOnly
+ paymentsOnly
@@ -92662,300 +33924,34 @@ Parameters
-
-
-
-
-
-
-
-
- getReportBankSummary
- Retrieves report for bank summary
-
-
-
-
-
-
-
- /Reports/BankSummary
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Reports/BankSummary?fromDate=2013-10-20&toDate=2013-10-20"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- date fromDate = 2013-10-20;
- date toDate = 2013-10-20;
-
- try {
- ReportWithRows result = apiInstance.getReportBankSummary(accessToken, xeroTenantId, fromDate, toDate);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getReportBankSummary");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- date fromDate = 2013-10-20; // date | filter by the from date of the report e.g. 2021-02-01
- date toDate = 2013-10-20; // date | filter by the to date of the report e.g. 2021-02-28
- try {
- ReportWithRows result = apiInstance.getReportBankSummary(xeroTenantId, fromDate, toDate);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getReportBankSummary");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-date *fromDate = 2013-10-20; // filter by the from date of the report e.g. 2021-02-01 (optional) (default to null)
-date *toDate = 2013-10-20; // filter by the to date of the report e.g. 2021-02-28 (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves report for bank summary
-[apiInstance getReportBankSummaryWith:xeroTenantId
- fromDate:fromDate
- toDate:toDate
- completionHandler: ^(ReportWithRows output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const fromDate: Date = new Date("2013-10-20");
-const toDate: Date = new Date("2013-10-20");
-
-try {
- const response = await xero.accountingApi.getReportBankSummary(xeroTenantId, fromDate, toDate);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetReportBankSummaryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var fromDate = DateTime.Parse("2013-10-20");
- var toDate = DateTime.Parse("2013-10-20");
-
- try {
- var result = await apiInstance.GetReportBankSummaryAsync(accessToken, xeroTenantId, fromDate, toDate);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetReportBankSummary: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$fromDate = new DateTime("2013-10-20");
-$toDate = new DateTime("2013-10-20");
-
-try {
- $result = $apiInstance->getReportBankSummary($xeroTenantId, $fromDate, $toDate);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getReportBankSummary: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $fromDate = 2013-10-20; # date | filter by the from date of the report e.g. 2021-02-01
-my $toDate = 2013-10-20; # date | filter by the to date of the report e.g. 2021-02-28
-
-eval {
- my $result = $api_instance->getReportBankSummary(xeroTenantId => $xeroTenantId, fromDate => $fromDate, toDate => $toDate);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getReportBankSummary: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getReportBankSummary
+ Retrieves report for bank summary
+
+
+
+
+
+
+
+ /Reports/BankSummary
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -92979,45 +33975,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getReportBankSummary: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-from_date = "2013-10-20"
-to_date = "2013-10-20"
-
-begin
- response = xero_client.accounting_api.get_report_bank_summary(xero_tenant_id, from_date, to_date)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_report_bank_summary: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.reports.read
- Grant read-only access to accounting reports
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.reports.read
+ Grant read-only access to accounting reports
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -93040,17 +34016,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- fromDate
+
+ Query parameters
+
+
+ Name
+ Description
+
+ fromDate
@@ -93073,7 +34046,7 @@ Parameters
- toDate
+ toDate
@@ -93096,308 +34069,34 @@ Parameters
-
-
-
-
-
-
-
-
- getReportBudgetSummary
- Retrieves report for budget summary
-
-
-
-
-
-
-
- /Reports/BudgetSummary
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Reports/BudgetSummary?date=2019-03-31&period=2&timeframe=3"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- date date = 2019-03-31;
- Integer period = 2;
- Integer timeframe = 3;
-
- try {
- ReportWithRows result = apiInstance.getReportBudgetSummary(accessToken, xeroTenantId, date, period, timeframe);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getReportBudgetSummary");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- date date = 2019-03-31; // date | The date for the Bank Summary report e.g. 2018-03-31
- Integer period = 2; // Integer | The number of periods to compare (integer between 1 and 12)
- Integer timeframe = 3; // Integer | The period size to compare to (1=month, 3=quarter, 12=year)
- try {
- ReportWithRows result = apiInstance.getReportBudgetSummary(xeroTenantId, date, period, timeframe);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getReportBudgetSummary");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-date *date = 2019-03-31; // The date for the Bank Summary report e.g. 2018-03-31 (optional) (default to null)
-Integer *period = 2; // The number of periods to compare (integer between 1 and 12) (optional) (default to null)
-Integer *timeframe = 3; // The period size to compare to (1=month, 3=quarter, 12=year) (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves report for budget summary
-[apiInstance getReportBudgetSummaryWith:xeroTenantId
- date:date
- period:period
- timeframe:timeframe
- completionHandler: ^(ReportWithRows output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const date: Date = new Date("2019-03-31");
-const period = 2;
-const timeframe = 3;
-
-try {
- const response = await xero.accountingApi.getReportBudgetSummary(xeroTenantId, date, period, timeframe);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetReportBudgetSummaryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var date = DateTime.Parse("2019-03-31");
- var period = 2;
- var timeframe = 3;
-
- try {
- var result = await apiInstance.GetReportBudgetSummaryAsync(accessToken, xeroTenantId, date, period, timeframe);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetReportBudgetSummary: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$date = new DateTime("2019-03-31");
-$period = 2;
-$timeframe = 3;
-
-try {
- $result = $apiInstance->getReportBudgetSummary($xeroTenantId, $date, $period, $timeframe);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getReportBudgetSummary: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $date = 2019-03-31; # date | The date for the Bank Summary report e.g. 2018-03-31
-my $period = 2; # Integer | The number of periods to compare (integer between 1 and 12)
-my $timeframe = 3; # Integer | The period size to compare to (1=month, 3=quarter, 12=year)
-
-eval {
- my $result = $api_instance->getReportBudgetSummary(xeroTenantId => $xeroTenantId, date => $date, period => $period, timeframe => $timeframe);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getReportBudgetSummary: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getReportBudgetSummary
+ Retrieves report for budget summary
+
+
+
+
+
+
+
+ /Reports/BudgetSummary
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -93420,46 +34119,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getReportBudgetSummary: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-date = "2019-03-31"
-period = 2
-time_frame = 3
-
-begin
- response = xero_client.accounting_api.get_report_budget_summary(xero_tenant_id, date, period, time_frame)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_report_budget_summary: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.reports.read
- Grant read-only access to accounting reports
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.reports.read
+ Grant read-only access to accounting reports
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -93482,17 +34160,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- date
+
+ Query parameters
+
+
+ Name
+ Description
+
+ date
@@ -93515,7 +34190,7 @@ Parameters
- period
+ period
@@ -93535,7 +34210,7 @@ Parameters
- timeframe
+ timeframe
@@ -93555,292 +34230,34 @@ Parameters
-
-
-
-
-
-
-
-
- getReportExecutiveSummary
- Retrieves report for executive summary
-
-
-
-
-
-
-
- /Reports/ExecutiveSummary
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Reports/ExecutiveSummary?date=2019-03-31"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- date date = 2019-03-31;
-
- try {
- ReportWithRows result = apiInstance.getReportExecutiveSummary(accessToken, xeroTenantId, date);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getReportExecutiveSummary");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- date date = 2019-03-31; // date | The date for the Bank Summary report e.g. 2018-03-31
- try {
- ReportWithRows result = apiInstance.getReportExecutiveSummary(xeroTenantId, date);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getReportExecutiveSummary");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-date *date = 2019-03-31; // The date for the Bank Summary report e.g. 2018-03-31 (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves report for executive summary
-[apiInstance getReportExecutiveSummaryWith:xeroTenantId
- date:date
- completionHandler: ^(ReportWithRows output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const date: Date = new Date("2019-03-31");
-
-try {
- const response = await xero.accountingApi.getReportExecutiveSummary(xeroTenantId, date);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetReportExecutiveSummaryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var date = DateTime.Parse("2019-03-31");
-
- try {
- var result = await apiInstance.GetReportExecutiveSummaryAsync(accessToken, xeroTenantId, date);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetReportExecutiveSummary: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$date = new DateTime("2019-03-31");
-
-try {
- $result = $apiInstance->getReportExecutiveSummary($xeroTenantId, $date);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getReportExecutiveSummary: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $date = 2019-03-31; # date | The date for the Bank Summary report e.g. 2018-03-31
-
-eval {
- my $result = $api_instance->getReportExecutiveSummary(xeroTenantId => $xeroTenantId, date => $date);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getReportExecutiveSummary: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getReportExecutiveSummary
+ Retrieves report for executive summary
+
+
+
+
+
+
+
+ /Reports/ExecutiveSummary
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -93863,44 +34280,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getReportExecutiveSummary: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-date = "2019-03-31"
-
-begin
- response = xero_client.accounting_api.get_report_executive_summary(xero_tenant_id, date)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_report_executive_summary: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.reports.read
- Grant read-only access to accounting reports
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.reports.read
+ Grant read-only access to accounting reports
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -93923,17 +34321,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- date
+
+ Query parameters
+
+
+ Name
+ Description
+
+ date
@@ -93956,364 +34351,34 @@ Parameters
-
-
-
-
-
-
-
-
- getReportProfitAndLoss
- Retrieves report for profit and loss
-
-
-
-
-
-
-
- /Reports/ProfitAndLoss
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Reports/ProfitAndLoss?fromDate=2013-10-20&toDate=2013-10-20&periods=3&timeframe=MONTH&trackingCategoryID=00000000-0000-0000-0000-000000000000&trackingCategoryID2=00000000-0000-0000-0000-000000000000&trackingOptionID=00000000-0000-0000-0000-000000000000&trackingOptionID2=00000000-0000-0000-0000-000000000000&standardLayout=true&paymentsOnly=false"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- date fromDate = 2013-10-20;
- date toDate = 2013-10-20;
- Integer periods = 3;
- String timeframe = 'MONTH';
- String trackingCategoryID = '00000000-0000-0000-0000-000000000000';
- String trackingCategoryID2 = '00000000-0000-0000-0000-000000000000';
- String trackingOptionID = '00000000-0000-0000-0000-000000000000';
- String trackingOptionID2 = '00000000-0000-0000-0000-000000000000';
- Boolean standardLayout = true;
- Boolean paymentsOnly = false;
-
- try {
- ReportWithRows result = apiInstance.getReportProfitAndLoss(accessToken, xeroTenantId, fromDate, toDate, periods, timeframe, trackingCategoryID, trackingCategoryID2, trackingOptionID, trackingOptionID2, standardLayout, paymentsOnly);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getReportProfitAndLoss");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- date fromDate = 2013-10-20; // date | filter by the from date of the report e.g. 2021-02-01
- date toDate = 2013-10-20; // date | filter by the to date of the report e.g. 2021-02-28
- Integer periods = 3; // Integer | The number of periods to compare (integer between 1 and 12)
- String timeframe = MONTH; // String | The period size to compare to (MONTH, QUARTER, YEAR)
- String trackingCategoryID = 00000000-0000-0000-0000-000000000000; // String | The trackingCategory 1 for the ProfitAndLoss report
- String trackingCategoryID2 = 00000000-0000-0000-0000-000000000000; // String | The trackingCategory 2 for the ProfitAndLoss report
- String trackingOptionID = 00000000-0000-0000-0000-000000000000; // String | The tracking option 1 for the ProfitAndLoss report
- String trackingOptionID2 = 00000000-0000-0000-0000-000000000000; // String | The tracking option 2 for the ProfitAndLoss report
- Boolean standardLayout = true; // Boolean | Return the standard layout for the ProfitAndLoss report
- Boolean paymentsOnly = false; // Boolean | Return cash only basis for the ProfitAndLoss report
- try {
- ReportWithRows result = apiInstance.getReportProfitAndLoss(xeroTenantId, fromDate, toDate, periods, timeframe, trackingCategoryID, trackingCategoryID2, trackingOptionID, trackingOptionID2, standardLayout, paymentsOnly);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getReportProfitAndLoss");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-date *fromDate = 2013-10-20; // filter by the from date of the report e.g. 2021-02-01 (optional) (default to null)
-date *toDate = 2013-10-20; // filter by the to date of the report e.g. 2021-02-28 (optional) (default to null)
-Integer *periods = 3; // The number of periods to compare (integer between 1 and 12) (optional) (default to null)
-String *timeframe = MONTH; // The period size to compare to (MONTH, QUARTER, YEAR) (optional) (default to null)
-String *trackingCategoryID = 00000000-0000-0000-0000-000000000000; // The trackingCategory 1 for the ProfitAndLoss report (optional) (default to null)
-String *trackingCategoryID2 = 00000000-0000-0000-0000-000000000000; // The trackingCategory 2 for the ProfitAndLoss report (optional) (default to null)
-String *trackingOptionID = 00000000-0000-0000-0000-000000000000; // The tracking option 1 for the ProfitAndLoss report (optional) (default to null)
-String *trackingOptionID2 = 00000000-0000-0000-0000-000000000000; // The tracking option 2 for the ProfitAndLoss report (optional) (default to null)
-Boolean *standardLayout = true; // Return the standard layout for the ProfitAndLoss report (optional) (default to null)
-Boolean *paymentsOnly = false; // Return cash only basis for the ProfitAndLoss report (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves report for profit and loss
-[apiInstance getReportProfitAndLossWith:xeroTenantId
- fromDate:fromDate
- toDate:toDate
- periods:periods
- timeframe:timeframe
- trackingCategoryID:trackingCategoryID
- trackingCategoryID2:trackingCategoryID2
- trackingOptionID:trackingOptionID
- trackingOptionID2:trackingOptionID2
- standardLayout:standardLayout
- paymentsOnly:paymentsOnly
- completionHandler: ^(ReportWithRows output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const fromDate: Date = new Date("2013-10-20");
-const toDate: Date = new Date("2013-10-20");
-const periods = 3;
-const timeframe = 'MONTH';
-const trackingCategoryID = '00000000-0000-0000-0000-000000000000';
-const trackingCategoryID2 = '00000000-0000-0000-0000-000000000000';
-const trackingOptionID = '00000000-0000-0000-0000-000000000000';
-const trackingOptionID2 = '00000000-0000-0000-0000-000000000000';
-const standardLayout = true;
-const paymentsOnly = false;
-
-try {
- const response = await xero.accountingApi.getReportProfitAndLoss(xeroTenantId, fromDate, toDate, periods, timeframe, trackingCategoryID, trackingCategoryID2, trackingOptionID, trackingOptionID2, standardLayout, paymentsOnly);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetReportProfitAndLossExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var fromDate = DateTime.Parse("2013-10-20");
- var toDate = DateTime.Parse("2013-10-20");
- var periods = 3;
- var timeframe = "MONTH";
- var trackingCategoryID = "00000000-0000-0000-0000-000000000000";
- var trackingCategoryID2 = "00000000-0000-0000-0000-000000000000";
- var trackingOptionID = "00000000-0000-0000-0000-000000000000";
- var trackingOptionID2 = "00000000-0000-0000-0000-000000000000";
- var standardLayout = true;
- var paymentsOnly = false;
-
- try {
- var result = await apiInstance.GetReportProfitAndLossAsync(accessToken, xeroTenantId, fromDate, toDate, periods, timeframe, trackingCategoryID, trackingCategoryID2, trackingOptionID, trackingOptionID2, standardLayout, paymentsOnly);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetReportProfitAndLoss: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$fromDate = new DateTime("2013-10-20");
-$toDate = new DateTime("2013-10-20");
-$periods = 3;
-$timeframe = "MONTH";
-$trackingCategoryID = "00000000-0000-0000-0000-000000000000";
-$trackingCategoryID2 = "00000000-0000-0000-0000-000000000000";
-$trackingOptionID = "00000000-0000-0000-0000-000000000000";
-$trackingOptionID2 = "00000000-0000-0000-0000-000000000000";
-$standardLayout = true;
-$paymentsOnly = false;
-
-try {
- $result = $apiInstance->getReportProfitAndLoss($xeroTenantId, $fromDate, $toDate, $periods, $timeframe, $trackingCategoryID, $trackingCategoryID2, $trackingOptionID, $trackingOptionID2, $standardLayout, $paymentsOnly);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getReportProfitAndLoss: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $fromDate = 2013-10-20; # date | filter by the from date of the report e.g. 2021-02-01
-my $toDate = 2013-10-20; # date | filter by the to date of the report e.g. 2021-02-28
-my $periods = 3; # Integer | The number of periods to compare (integer between 1 and 12)
-my $timeframe = MONTH; # String | The period size to compare to (MONTH, QUARTER, YEAR)
-my $trackingCategoryID = 00000000-0000-0000-0000-000000000000; # String | The trackingCategory 1 for the ProfitAndLoss report
-my $trackingCategoryID2 = 00000000-0000-0000-0000-000000000000; # String | The trackingCategory 2 for the ProfitAndLoss report
-my $trackingOptionID = 00000000-0000-0000-0000-000000000000; # String | The tracking option 1 for the ProfitAndLoss report
-my $trackingOptionID2 = 00000000-0000-0000-0000-000000000000; # String | The tracking option 2 for the ProfitAndLoss report
-my $standardLayout = true; # Boolean | Return the standard layout for the ProfitAndLoss report
-my $paymentsOnly = false; # Boolean | Return cash only basis for the ProfitAndLoss report
-
-eval {
- my $result = $api_instance->getReportProfitAndLoss(xeroTenantId => $xeroTenantId, fromDate => $fromDate, toDate => $toDate, periods => $periods, timeframe => $timeframe, trackingCategoryID => $trackingCategoryID, trackingCategoryID2 => $trackingCategoryID2, trackingOptionID => $trackingOptionID, trackingOptionID2 => $trackingOptionID2, standardLayout => $standardLayout, paymentsOnly => $paymentsOnly);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getReportProfitAndLoss: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getReportProfitAndLoss
+ Retrieves report for profit and loss
+
+
+
+
+
+
+
+ /Reports/ProfitAndLoss
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -94344,53 +34409,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getReportProfitAndLoss: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-from_date = "2013-10-20"
-to_date = "2013-10-20"
-periods = 3
-time_frame = 'MONTH'
-tracking_category_id = '00000000-0000-0000-0000-000000000000'
-tracking_category_id_2 = '00000000-0000-0000-0000-000000000000'
-tracking_option_id = '00000000-0000-0000-0000-000000000000'
-tracking_option_id_2 = '00000000-0000-0000-0000-000000000000'
-standard_layout = true
-payments_only = false
-
-begin
- response = xero_client.accounting_api.get_report_profit_and_loss(xero_tenant_id, from_date, to_date, periods, time_frame, tracking_category_id, tracking_category_id_2, tracking_option_id, tracking_option_id_2, standard_layout, payments_only)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_report_profit_and_loss: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.reports.read
- Grant read-only access to accounting reports
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.reports.read
+ Grant read-only access to accounting reports
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -94413,17 +34450,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- fromDate
+
+ Query parameters
+
+
+ Name
+ Description
+
+ fromDate
@@ -94446,7 +34480,7 @@ Parameters
- toDate
+ toDate
@@ -94469,7 +34503,7 @@ Parameters
- periods
+ periods
@@ -94489,7 +34523,7 @@ Parameters
- timeframe
+ timeframe
@@ -94509,7 +34543,7 @@ Parameters
- trackingCategoryID
+ trackingCategoryID
@@ -94529,7 +34563,7 @@ Parameters
- trackingCategoryID2
+ trackingCategoryID2
@@ -94549,7 +34583,7 @@ Parameters
- trackingOptionID
+ trackingOptionID
@@ -94569,7 +34603,7 @@ Parameters
- trackingOptionID2
+ trackingOptionID2
@@ -94589,7 +34623,7 @@ Parameters
- standardLayout
+ standardLayout
@@ -94609,7 +34643,7 @@ Parameters
- paymentsOnly
+ paymentsOnly
@@ -94629,291 +34663,34 @@ Parameters
-
-
-
-
-
-
-
-
- getReportTenNinetyNine
- Retrieve reports for 1099
-
-
-
-
-
-
-
- /Reports/TenNinetyNine
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Reports/TenNinetyNine?reportYear=2019"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- String reportYear = '2019';
-
- try {
- Reports result = apiInstance.getReportTenNinetyNine(accessToken, xeroTenantId, reportYear);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getReportTenNinetyNine");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- String reportYear = 2019; // String | The year of the 1099 report
- try {
- Reports result = apiInstance.getReportTenNinetyNine(xeroTenantId, reportYear);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getReportTenNinetyNine");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-String *reportYear = 2019; // The year of the 1099 report (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieve reports for 1099
-[apiInstance getReportTenNinetyNineWith:xeroTenantId
- reportYear:reportYear
- completionHandler: ^(Reports output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const reportYear = '2019';
-
-try {
- const response = await xero.accountingApi.getReportTenNinetyNine(xeroTenantId, reportYear);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetReportTenNinetyNineExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var reportYear = "2019";
-
- try {
- var result = await apiInstance.GetReportTenNinetyNineAsync(accessToken, xeroTenantId, reportYear);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetReportTenNinetyNine: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$reportYear = "2019";
-
-try {
- $result = $apiInstance->getReportTenNinetyNine($xeroTenantId, $reportYear);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getReportTenNinetyNine: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $reportYear = 2019; # String | The year of the 1099 report
-
-eval {
- my $result = $api_instance->getReportTenNinetyNine(xeroTenantId => $xeroTenantId, reportYear => $reportYear);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getReportTenNinetyNine: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getReportTenNinetyNine
+ Retrieve reports for 1099
+
+
+
+
+
+
+
+ /Reports/TenNinetyNine
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -94936,44 +34713,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getReportTenNinetyNine: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-report_year = '2019'
-
-begin
- response = xero_client.accounting_api.get_report_ten_ninety_nine(xero_tenant_id, report_year)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_report_ten_ninety_nine: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.reports.tenninetynine.read
- Grant read-only access to 1099 reports
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.reports.tenninetynine.read
+ Grant read-only access to 1099 reports
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -94996,17 +34754,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- reportYear
+
+ Query parameters
+
+
+ Name
+ Description
+
+ reportYear
@@ -95026,300 +34781,34 @@ Parameters
-
-
-
-
-
-
-
-
- getReportTrialBalance
- Retrieves report for trial balance
-
-
-
-
-
-
-
- /Reports/TrialBalance
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Reports/TrialBalance?date=2019-10-31&paymentsOnly=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- date date = 2019-10-31;
- Boolean paymentsOnly = true;
-
- try {
- ReportWithRows result = apiInstance.getReportTrialBalance(accessToken, xeroTenantId, date, paymentsOnly);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getReportTrialBalance");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- date date = 2019-10-31; // date | The date for the Trial Balance report e.g. 2018-03-31
- Boolean paymentsOnly = true; // Boolean | Return cash only basis for the Trial Balance report
- try {
- ReportWithRows result = apiInstance.getReportTrialBalance(xeroTenantId, date, paymentsOnly);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getReportTrialBalance");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-date *date = 2019-10-31; // The date for the Trial Balance report e.g. 2018-03-31 (optional) (default to null)
-Boolean *paymentsOnly = true; // Return cash only basis for the Trial Balance report (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves report for trial balance
-[apiInstance getReportTrialBalanceWith:xeroTenantId
- date:date
- paymentsOnly:paymentsOnly
- completionHandler: ^(ReportWithRows output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const date: Date = new Date("2019-10-31");
-const paymentsOnly = true;
-
-try {
- const response = await xero.accountingApi.getReportTrialBalance(xeroTenantId, date, paymentsOnly);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetReportTrialBalanceExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var date = DateTime.Parse("2019-10-31");
- var paymentsOnly = true;
-
- try {
- var result = await apiInstance.GetReportTrialBalanceAsync(accessToken, xeroTenantId, date, paymentsOnly);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetReportTrialBalance: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$date = new DateTime("2019-10-31");
-$paymentsOnly = true;
-
-try {
- $result = $apiInstance->getReportTrialBalance($xeroTenantId, $date, $paymentsOnly);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getReportTrialBalance: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $date = 2019-10-31; # date | The date for the Trial Balance report e.g. 2018-03-31
-my $paymentsOnly = true; # Boolean | Return cash only basis for the Trial Balance report
-
-eval {
- my $result = $api_instance->getReportTrialBalance(xeroTenantId => $xeroTenantId, date => $date, paymentsOnly => $paymentsOnly);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getReportTrialBalance: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getReportTrialBalance
+ Retrieves report for trial balance
+
+
+
+
+
+
+
+ /Reports/TrialBalance
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -95343,45 +34832,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getReportTrialBalance: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-date = "2019-10-31"
-payments_only = true
-
-begin
- response = xero_client.accounting_api.get_report_trial_balance(xero_tenant_id, date, payments_only)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_report_trial_balance: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.reports.read
- Grant read-only access to accounting reports
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.reports.read
+ Grant read-only access to accounting reports
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -95404,17 +34873,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- date
+
+ Query parameters
+
+
+ Name
+ Description
+
+ date
@@ -95437,7 +34903,7 @@ Parameters
- paymentsOnly
+ paymentsOnly
@@ -95457,308 +34923,34 @@ Parameters
-
-
-
-
-
-
-
-
- getTaxRates
- Retrieves tax rates
-
-
-
-
-
-
-
- /TaxRates
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/TaxRates?where=Status=="ACTIVE"&order=Name ASC&TaxType=INPUT"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- String where = 'Status=="ACTIVE"';
- String order = 'Name ASC';
- String taxType = 'INPUT';
-
- try {
- TaxRates result = apiInstance.getTaxRates(accessToken, xeroTenantId, where, order, taxType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getTaxRates");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- String where = Status=="ACTIVE"; // String | Filter by an any element
- String order = Name ASC; // String | Order by an any element
- String taxType = INPUT; // String | Filter by tax type
- try {
- TaxRates result = apiInstance.getTaxRates(xeroTenantId, where, order, taxType);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getTaxRates");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-String *where = Status=="ACTIVE"; // Filter by an any element (optional) (default to null)
-String *order = Name ASC; // Order by an any element (optional) (default to null)
-String *taxType = INPUT; // Filter by tax type (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves tax rates
-[apiInstance getTaxRatesWith:xeroTenantId
- where:where
- order:order
- taxType:taxType
- completionHandler: ^(TaxRates output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const where = 'Status=="ACTIVE"';
-const order = 'Name ASC';
-const taxType = 'INPUT';
-
-try {
- const response = await xero.accountingApi.getTaxRates(xeroTenantId, where, order, taxType);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetTaxRatesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var where = "Status==\"ACTIVE\"";
- var order = "Name ASC";
- var taxType = "INPUT";
-
- try {
- var result = await apiInstance.GetTaxRatesAsync(accessToken, xeroTenantId, where, order, taxType);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetTaxRates: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$where = "Status=="' . \XeroAPI\XeroPHP\Models\Accounting\TaxRate::STATUS_ACTIVE . '"";
-$order = "Name ASC";
-$taxType = "INPUT";
-
-try {
- $result = $apiInstance->getTaxRates($xeroTenantId, $where, $order, $taxType);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getTaxRates: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $where = Status=="ACTIVE"; # String | Filter by an any element
-my $order = Name ASC; # String | Order by an any element
-my $taxType = INPUT; # String | Filter by tax type
-
-eval {
- my $result = $api_instance->getTaxRates(xeroTenantId => $xeroTenantId, where => $where, order => $order, taxType => $taxType);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getTaxRates: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getTaxRates
+ Retrieves tax rates
+
+
+
+
+
+
+
+ /TaxRates
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -95783,46 +34975,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getTaxRates: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-where = 'Status==#{XeroRuby::Accounting::TaxRate::ACTIVE}'
-order = 'Name ASC'
-tax_type = 'INPUT'
-
-begin
- response = xero_client.accounting_api.get_tax_rates(xero_tenant_id, where, order, tax_type)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_tax_rates: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings.read
- Grant read-only access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings.read
+ Grant read-only access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -95845,17 +35016,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -95875,7 +35043,7 @@ Parameters
- order
+ order
@@ -95895,7 +35063,7 @@ Parameters
- TaxType
+ TaxType
@@ -95915,308 +35083,34 @@ Parameters
-
-
-
-
-
-
-
-
- getTrackingCategories
- Retrieves tracking categories and options
-
-
-
-
-
-
-
- /TrackingCategories
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/TrackingCategories?where=Status=="ACTIVE"&order=Name ASC&includeArchived=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- String where = 'Status=="ACTIVE"';
- String order = 'Name ASC';
- Boolean includeArchived = true;
-
- try {
- TrackingCategories result = apiInstance.getTrackingCategories(accessToken, xeroTenantId, where, order, includeArchived);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getTrackingCategories");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- String where = Status=="ACTIVE"; // String | Filter by an any element
- String order = Name ASC; // String | Order by an any element
- Boolean includeArchived = true; // Boolean | e.g. includeArchived=true - Categories and options with a status of ARCHIVED will be included in the response
- try {
- TrackingCategories result = apiInstance.getTrackingCategories(xeroTenantId, where, order, includeArchived);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getTrackingCategories");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-String *where = Status=="ACTIVE"; // Filter by an any element (optional) (default to null)
-String *order = Name ASC; // Order by an any element (optional) (default to null)
-Boolean *includeArchived = true; // e.g. includeArchived=true - Categories and options with a status of ARCHIVED will be included in the response (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves tracking categories and options
-[apiInstance getTrackingCategoriesWith:xeroTenantId
- where:where
- order:order
- includeArchived:includeArchived
- completionHandler: ^(TrackingCategories output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const where = 'Status=="ACTIVE"';
-const order = 'Name ASC';
-const includeArchived = true;
-
-try {
- const response = await xero.accountingApi.getTrackingCategories(xeroTenantId, where, order, includeArchived);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetTrackingCategoriesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var where = "Status==\"ACTIVE\"";
- var order = "Name ASC";
- var includeArchived = true;
-
- try {
- var result = await apiInstance.GetTrackingCategoriesAsync(accessToken, xeroTenantId, where, order, includeArchived);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetTrackingCategories: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$where = "Status=="' . \XeroAPI\XeroPHP\Models\Accounting\TrackingCategory::STATUS_ACTIVE . '"";
-$order = "Name ASC";
-$includeArchived = true;
-
-try {
- $result = $apiInstance->getTrackingCategories($xeroTenantId, $where, $order, $includeArchived);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getTrackingCategories: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $where = Status=="ACTIVE"; # String | Filter by an any element
-my $order = Name ASC; # String | Order by an any element
-my $includeArchived = true; # Boolean | e.g. includeArchived=true - Categories and options with a status of ARCHIVED will be included in the response
-
-eval {
- my $result = $api_instance->getTrackingCategories(xeroTenantId => $xeroTenantId, where => $where, order => $order, includeArchived => $includeArchived);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getTrackingCategories: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getTrackingCategories
+ Retrieves tracking categories and options
+
+
+
+
+
+
+
+ /TrackingCategories
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -96241,46 +35135,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getTrackingCategories: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-where = 'Status==#{XeroRuby::Accounting::TrackingCategory::ACTIVE}'
-order = 'Name ASC'
-include_archived = true
-
-begin
- response = xero_client.accounting_api.get_tracking_categories(xero_tenant_id, where, order, include_archived)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_tracking_categories: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings.read
- Grant read-only access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings.read
+ Grant read-only access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -96303,17 +35176,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -96333,7 +35203,7 @@ Parameters
- order
+ order
@@ -96353,7 +35223,7 @@ Parameters
- includeArchived
+ includeArchived
@@ -96373,292 +35243,34 @@ Parameters
-
-
-
-
-
-
-
-
- getTrackingCategory
- Retrieves specific tracking categories and options using a unique tracking category Id
-
-
-
-
-
-
-
- /TrackingCategories/{TrackingCategoryID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/TrackingCategories/{TrackingCategoryID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID trackingCategoryID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- TrackingCategories result = apiInstance.getTrackingCategory(accessToken, xeroTenantId, trackingCategoryID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getTrackingCategory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID trackingCategoryID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a TrackingCategory
- try {
- TrackingCategories result = apiInstance.getTrackingCategory(xeroTenantId, trackingCategoryID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getTrackingCategory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *trackingCategoryID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a TrackingCategory (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves specific tracking categories and options using a unique tracking category Id
-[apiInstance getTrackingCategoryWith:xeroTenantId
- trackingCategoryID:trackingCategoryID
- completionHandler: ^(TrackingCategories output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const trackingCategoryID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getTrackingCategory(xeroTenantId, trackingCategoryID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetTrackingCategoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var trackingCategoryID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetTrackingCategoryAsync(accessToken, xeroTenantId, trackingCategoryID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetTrackingCategory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$trackingCategoryID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getTrackingCategory($xeroTenantId, $trackingCategoryID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getTrackingCategory: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $trackingCategoryID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a TrackingCategory
-
-eval {
- my $result = $api_instance->getTrackingCategory(xeroTenantId => $xeroTenantId, trackingCategoryID => $trackingCategoryID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getTrackingCategory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getTrackingCategory
+ Retrieves specific tracking categories and options using a unique tracking category Id
+
+
+
+
+
+
+
+ /TrackingCategories/{TrackingCategoryID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -96681,43 +35293,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getTrackingCategory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-tracking_category_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_tracking_category(xero_tenant_id, tracking_category_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_tracking_category: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings.read
- Grant read-only access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- TrackingCategoryID*
+
+
+ Scopes
+
+
+
+ accounting.settings.read
+ Grant read-only access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ TrackingCategoryID*
@@ -96743,15 +35337,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -96774,295 +35367,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getUser
- Retrieves a specific user
-
-
-
-
-
-
-
- /Users/{UserID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Users/{UserID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID userID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- try {
- Users result = apiInstance.getUser(accessToken, xeroTenantId, userID);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getUser");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID userID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a User
- try {
- Users result = apiInstance.getUser(xeroTenantId, userID);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getUser");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *userID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a User (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves a specific user
-[apiInstance getUserWith:xeroTenantId
- userID:userID
- completionHandler: ^(Users output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const userID = '00000000-0000-0000-0000-000000000000';
-
-try {
- const response = await xero.accountingApi.getUser(xeroTenantId, userID);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetUserExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var userID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- try {
- var result = await apiInstance.GetUserAsync(accessToken, xeroTenantId, userID);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetUser: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$userID = "00000000-0000-0000-0000-000000000000";
-
-try {
- $result = $apiInstance->getUser($xeroTenantId, $userID);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getUser: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $userID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a User
-
-eval {
- my $result = $api_instance->getUser(xeroTenantId => $xeroTenantId, userID => $userID);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getUser: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getUser
+ Retrieves a specific user
+
+
+
+
+
+
+
+ /Users/{UserID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -97085,43 +35417,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getUser: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-user_id = '00000000-0000-0000-0000-000000000000'
-
-begin
- response = xero_client.accounting_api.get_user(xero_tenant_id, user_id)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_user: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings.read
- Grant read-only access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- UserID*
+
+
+ Scopes
+
+
+
+ accounting.settings.read
+ Grant read-only access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ UserID*
@@ -97147,15 +35461,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -97178,312 +35491,34 @@ Parameters
-
-
-
-
-
-
-
-
-
-
-
- getUsers
- Retrieves users
-
-
-
-
-
-
-
- /Users
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Users?where=IsSubscriber==true&order=LastName ASC"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- OffsetDateTime ifModifiedSince = OffsetDateTime.parse("2020-02-06T12:17:43.202-08:00");
- String where = 'IsSubscriber==true';
- String order = 'LastName ASC';
-
- try {
- Users result = apiInstance.getUsers(accessToken, xeroTenantId, ifModifiedSince, where, order);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#getUsers");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Date ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned
- String where = IsSubscriber==true; // String | Filter by an any element
- String order = LastName ASC; // String | Order by an any element
- try {
- Users result = apiInstance.getUsers(xeroTenantId, ifModifiedSince, where, order);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#getUsers");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Date *ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Only records created or modified since this timestamp will be returned (optional) (default to null)
-String *where = IsSubscriber==true; // Filter by an any element (optional) (default to null)
-String *order = LastName ASC; // Order by an any element (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Retrieves users
-[apiInstance getUsersWith:xeroTenantId
- ifModifiedSince:ifModifiedSince
- where:where
- order:order
- completionHandler: ^(Users output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
-const where = 'IsSubscriber==true';
-const order = 'LastName ASC';
-
-try {
- const response = await xero.accountingApi.getUsers(xeroTenantId, ifModifiedSince, where, order);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class GetUsersExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var ifModifiedSince = DateTime.Parse("2020-02-06T12:17:43.202-08:00");
- var where = "IsSubscriber==true";
- var order = "LastName ASC";
-
- try {
- var result = await apiInstance.GetUsersAsync(accessToken, xeroTenantId, ifModifiedSince, where, order);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.GetUsers: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$ifModifiedSince = new DateTime("2020-02-06T12:17:43.202-08:00");
-$where = "IsSubscriber==true";
-$order = "LastName ASC";
-
-try {
- $result = $apiInstance->getUsers($xeroTenantId, $ifModifiedSince, $where, $order);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->getUsers: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $ifModifiedSince = 2020-02-06T12:17:43.202-08:00; # Date | Only records created or modified since this timestamp will be returned
-my $where = IsSubscriber==true; # String | Filter by an any element
-my $order = LastName ASC; # String | Order by an any element
-
-eval {
- my $result = $api_instance->getUsers(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, where => $where, order => $order);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->getUsers: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ getUsers
+ Retrieves users
+
+
+
+
+
+
+
+ /Users
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -97508,46 +35543,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->getUsers: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-if_modified_since = "2020-02-06T12:17:43.202-08:00"
-where = 'IsSubscriber==true'
-order = 'LastName ASC'
-
-begin
- response = xero_client.accounting_api.get_users(xero_tenant_id, if_modified_since, where, order)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling get_users: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings.read
- Grant read-only access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings.read
+ Grant read-only access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -97570,7 +35584,7 @@ Parameters
- If-Modified-Since
+ If-Modified-Since
@@ -97593,17 +35607,14 @@ Parameters
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- where
+
+ Query parameters
+
+
+ Name
+ Description
+
+ where
@@ -97623,7 +35634,7 @@ Parameters
- order
+ order
@@ -97643,358 +35654,34 @@ Parameters
-
-
-
-
-
-
-
-
- postSetup
- Sets the chart of accounts, the conversion date and conversion balances
-
-
-
-
-
-
-
- /Setup
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Setup"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- Account account = new Account();
- account.setCode("123");
- account.setName("Business supplies");
- account.setType(com.xero.models.accounting.AccountType.EXPENSE);
-
- List<Account> accounts = new ArrayList<Account>();
- accounts.add(account);
-
- ConversionDate conversionDate = new ConversionDate();
- conversionDate.setMonth(10);
- conversionDate.setYear(2020);
-
- List<ConversionBalances> conversionBalances = new ArrayList<ConversionBalances>();
-
- Setup setup = new Setup();
- setup.setAccounts(accounts);
- setup.setConversionDate(conversionDate);
- setup.setConversionBalances(conversionBalances);
-
- try {
- ImportSummaryObject result = apiInstance.postSetup(accessToken, xeroTenantId, setup);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#postSetup");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Setup setup = { "ConversionDate": {}, "ConversionBalances": [], "Accounts": [ { "Code": "200", "Name": "Sales", "Type": "SALES", "ReportingCode": "REV.TRA.GOO" }, { "Code": "400", "Name": "Advertising", "Type": "OVERHEADS", "ReportingCode": "EXP" }, { "Code": "610", "Name": "Accounts Receivable", "Type": "CURRENT", "SystemAccount": "DEBTORS", "ReportingCode": "ASS.CUR.REC.TRA" }, { "Code": "800", "Name": "Accounts Payable", "Type": "CURRLIAB", "SystemAccount": "CREDITORS", "ReportingCode": "LIA.CUR.PAY" } ] }; // Setup |
- try {
- ImportSummaryObject result = apiInstance.postSetup(xeroTenantId, setup);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#postSetup");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Setup *setup = { "ConversionDate": {}, "ConversionBalances": [], "Accounts": [ { "Code": "200", "Name": "Sales", "Type": "SALES", "ReportingCode": "REV.TRA.GOO" }, { "Code": "400", "Name": "Advertising", "Type": "OVERHEADS", "ReportingCode": "EXP" }, { "Code": "610", "Name": "Accounts Receivable", "Type": "CURRENT", "SystemAccount": "DEBTORS", "ReportingCode": "ASS.CUR.REC.TRA" }, { "Code": "800", "Name": "Accounts Payable", "Type": "CURRLIAB", "SystemAccount": "CREDITORS", "ReportingCode": "LIA.CUR.PAY" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Sets the chart of accounts, the conversion date and conversion balances
-[apiInstance postSetupWith:xeroTenantId
- setup:setup
- completionHandler: ^(ImportSummaryObject output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
-const account: Account = {
- code: "123",
- name: "Business supplies",
- type: AccountType.EXPENSE };
-const accounts = [];
-accounts.push(account)
-
-const conversionDate: ConversionDate = {
- month: 10,
- year: 2020 };
-const conversionBalances = [];
-
-const setup: Setup = {
- accounts: accounts,
- conversionDate: conversionDate,
- conversionBalances: conversionBalances };
-
-try {
- const response = await xero.accountingApi.postSetup(xeroTenantId, setup);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class PostSetupExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
-
- var account = new Account();
- account.Code = "123";
- account.Name = "Business supplies";
- account.Type = AccountType.EXPENSE;
- var accounts = new List<Account>();
- accounts.Add(account);
-
- var conversionDate = new ConversionDate();
- conversionDate.Month = 10;
- conversionDate.Year = 2020;
- var conversionBalances = new List<ConversionBalances>();
-
- var setup = new Setup();
- setup.Accounts = accounts;
- setup.ConversionDate = conversionDate;
- setup.ConversionBalances = conversionBalances;
-
- try {
- var result = await apiInstance.PostSetupAsync(accessToken, xeroTenantId, setup);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.PostSetup: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-
-$account = new XeroAPI\XeroPHP\Models\Accounting\Account;
-$account->setCode('123');
-$account->setName('Business supplies');
-$account->setType(XeroAPI\XeroPHP\Models\Accounting\AccountType::EXPENSE);
-$accounts = [];
-array_push($accounts, $account);
-
-$conversionDate = new XeroAPI\XeroPHP\Models\Accounting\ConversionDate;
-$conversionDate->setMonth(10);
-$conversionDate->setYear(2020);
-$conversionBalances = [];
-
-$setup = new XeroAPI\XeroPHP\Models\Accounting\Setup;
-$setup->setAccounts($accounts);
-$setup->setConversionDate($conversionDate);
-$setup->setConversionBalances($conversionBalances);
-
-try {
- $result = $apiInstance->postSetup($xeroTenantId, $setup);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->postSetup: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $setup = ::Object::Setup->new(); # Setup |
-
-eval {
- my $result = $api_instance->postSetup(xeroTenantId => $xeroTenantId, setup => $setup);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->postSetup: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ postSetup
+ Sets the chart of accounts, the conversion date and conversion balances
+
+
+
+
+
+
+
+ /Setup
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -98035,63 +35722,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->postSetup: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-
-account = {
- code: "123",
- name: "Business supplies",
- type: XeroRuby::Accounting::AccountType::EXPENSE
-}
-accounts = []
-accounts << account
-
-conversion_date = {
- month: 10,
- year: 2020
-}
-conversion_balances = []
-
-setup = {
- accounts: accounts,
- conversion_date: conversion_date,
- conversion_balances: conversion_balances
-}
-
-begin
- response = xero_client.accounting_api.post_setup(xero_tenant_id, setup)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling post_setup: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -98114,34 +35763,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- setup *
-
-
-
-
- Setup
-
-
-
-Object including an accounts array, a conversion balances array and a conversion date object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ setup *
+
+
+
+
+ Setup
+
+
+ Object including an accounts array, a conversion balances array and a conversion date object in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateAccount
- Updates a chart of accounts
-
-
-
-
-
-
-
- /Accounts/{AccountID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Accounts/{AccountID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID accountID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- Account account = new Account();
- account.setCode("123456");
- account.setName("BarFoo");
- account.setType(com.xero.models.accounting.AccountType.EXPENSE);
- account.setDescription("Hello World");
- account.setTaxType("NONE");
-
- Accounts accounts = new Accounts();
- accounts.addAccountsItem(account);
-
- try {
- Accounts result = apiInstance.updateAccount(accessToken, xeroTenantId, accountID, accounts);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateAccount");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID accountID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Account object
- Accounts accounts = { "Accounts":[ { "Code":"123456", "Name":"BarFoo", "AccountID":"99ce6032-0678-4aa0-8148-240c75fee33a", "Type":"EXPENSE", "Description":"GoodBye World", "TaxType":"INPUT", "EnablePaymentsToAccount":false, "ShowInExpenseClaims":false, "Class":"EXPENSE", "ReportingCode":"EXP", "ReportingCodeName":"Expense", "UpdatedDateUTC":"2019-02-21T16:29:47.96-08:00" } ] }; // Accounts |
- try {
- Accounts result = apiInstance.updateAccount(xeroTenantId, accountID, accounts);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateAccount");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *accountID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Account object (default to null)
-Accounts *accounts = { "Accounts":[ { "Code":"123456", "Name":"BarFoo", "AccountID":"99ce6032-0678-4aa0-8148-240c75fee33a", "Type":"EXPENSE", "Description":"GoodBye World", "TaxType":"INPUT", "EnablePaymentsToAccount":false, "ShowInExpenseClaims":false, "Class":"EXPENSE", "ReportingCode":"EXP", "ReportingCodeName":"Expense", "UpdatedDateUTC":"2019-02-21T16:29:47.96-08:00" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a chart of accounts
-[apiInstance updateAccountWith:xeroTenantId
- accountID:accountID
- accounts:accounts
- completionHandler: ^(Accounts output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const accountID = '00000000-0000-0000-0000-000000000000';
-
-const account: Account = {
- code: "123456",
- name: "BarFoo",
- type: AccountType.EXPENSE,
- description: "Hello World",
- taxType: "NONE" };
-
-const accounts: Accounts = {
- accounts: [account] };
-
-try {
- const response = await xero.accountingApi.updateAccount(xeroTenantId, accountID, accounts);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateAccountExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var accountID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var account = new Account();
- account.Code = "123456";
- account.Name = "BarFoo";
- account.Type = AccountType.EXPENSE;
- account.Description = "Hello World";
- account.TaxType = "NONE";
-
- var accounts = new Accounts();
- var accountsList = new List<Account>();
- accountsList.Add(account);
- accounts._Accounts = accountsList;
-
- try {
- var result = await apiInstance.UpdateAccountAsync(accessToken, xeroTenantId, accountID, accounts);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateAccount: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$accountID = "00000000-0000-0000-0000-000000000000";
-
-$account = new XeroAPI\XeroPHP\Models\Accounting\Account;
-$account->setCode('123456');
-$account->setName('BarFoo');
-$account->setType(XeroAPI\XeroPHP\Models\Accounting\AccountType::EXPENSE);
-$account->setDescription('Hello World');
-$account->setTaxType('NONE');
-
-$accounts = new XeroAPI\XeroPHP\Models\Accounting\Accounts;
-$arr_accounts = [];
-array_push($arr_accounts, $account);
-$accounts->setAccounts($arr_accounts);
-
-try {
- $result = $apiInstance->updateAccount($xeroTenantId, $accountID, $accounts);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateAccount: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $accountID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Account object
-my $accounts = ::Object::Accounts->new(); # Accounts |
-
-eval {
- my $result = $api_instance->updateAccount(xeroTenantId => $xeroTenantId, accountID => $accountID, accounts => $accounts);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateAccount: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateAccount
+ Updates a chart of accounts
+
+
+
+
+
+
+
+ /Accounts/{AccountID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -98541,55 +35860,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateAccount: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-account_id = '00000000-0000-0000-0000-000000000000'
-
-account = {
- code: "123456",
- name: "BarFoo",
- type: XeroRuby::Accounting::AccountType::EXPENSE,
- description: "Hello World",
- tax_type: "NONE"
-}
-
-accounts = {
- accounts: [account]
-}
-
-begin
- response = xero_client.accounting_api.update_account(xero_tenant_id, account_id, accounts)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_account: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- AccountID*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ AccountID*
@@ -98615,15 +35904,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -98646,34 +35934,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- accounts *
-
-
-
-
- Accounts
-
-
-
-Request of type Accounts array with one Account
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ accounts *
+
+
+
+
+ Accounts
+
+
+ Request of type Accounts array with one Account
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateAccountAttachmentByFileName
- Updates attachment on a specific account by filename
-
-
-
-
-
-
-
- /Accounts/{AccountID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Accounts/{AccountID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID accountID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.updateAccountAttachmentByFileName(accessToken, xeroTenantId, accountID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateAccountAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID accountID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for Account object
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.updateAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateAccountAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *accountID = 00000000-0000-0000-0000-000000000000; // Unique identifier for Account object (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates attachment on a specific account by filename
-[apiInstance updateAccountAttachmentByFileNameWith:xeroTenantId
- accountID:accountID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const accountID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.updateAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateAccountAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var accountID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.UpdateAccountAttachmentByFileNameAsync(accessToken, xeroTenantId, accountID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateAccountAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$accountID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->updateAccountAttachmentByFileName($xeroTenantId, $accountID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateAccountAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $accountID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for Account object
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->updateAccountAttachmentByFileName(xeroTenantId => $xeroTenantId, accountID => $accountID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateAccountAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateAccountAttachmentByFileName
+ Updates attachment on a specific account by filename
+
+
+
+
+
+
+
+ /Accounts/{AccountID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -99121,44 +36026,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateAccountAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-account_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.update_account_attachment_by_file_name(xero_tenant_id, account_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_account_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- AccountID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ AccountID*
@@ -99184,7 +36070,7 @@ Parameters
- FileName*
+ FileName*
@@ -99207,15 +36093,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -99232,542 +36117,77 @@ Parameters
Required
-
-
-
-
-
-
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateBankTransaction
- Updates a single spent or received money transaction
-
-
-
-
-
-
-
- /BankTransactions/{BankTransactionID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransactions/{BankTransactionID}?unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID bankTransactionID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- Integer unitdp = 4;
-
- Contact contact = new Contact();
- contact.setContactID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- LineItem lineItem = new LineItem();
- lineItem.setDescription("Foobar");
- lineItem.setQuantity(1.0);
- lineItem.setUnitAmount(20.0);
- lineItem.setAccountCode("000");
-
- List<LineItem> lineItems = new ArrayList<LineItem>();
- lineItems.add(lineItem);
-
- Account bankAccount = new Account();
- bankAccount.setAccountID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- BankTransaction bankTransaction = new BankTransaction();
- bankTransaction.setReference("You just updated");
- bankTransaction.setType(com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE);
- bankTransaction.setContact(contact);
- bankTransaction.setLineItems(lineItems);
- bankTransaction.setBankAccount(bankAccount);
-
- BankTransactions bankTransactions = new BankTransactions();
- bankTransactions.addBankTransactionsItem(bankTransaction);
-
- try {
- BankTransactions result = apiInstance.updateBankTransaction(accessToken, xeroTenantId, bankTransactionID, bankTransactions, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateBankTransaction");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID bankTransactionID = 00000000-0000-0000-0000-000000000000; // UUID | Xero generated unique identifier for a bank transaction
- BankTransactions bankTransactions = { "BankTransactions": [ { "Type": "SPEND", "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000", "ContactStatus": "ACTIVE", "Name": "Buzz Lightyear", "FirstName": "Buzz", "LastName": "Lightyear", "EmailAddress": "buzz.Lightyear@email.com", "ContactPersons": [], "BankAccountDetails": "", "Addresses": [ { "AddressType": "STREET", "City": "", "Region": "", "PostalCode": "", "Country": "" }, { "AddressType": "POBOX", "AddressLine1": "", "AddressLine2": "", "AddressLine3": "", "AddressLine4": "", "City": "Palo Alto", "Region": "CA", "PostalCode": "94020", "Country": "United States" } ], "Phones": [ { "PhoneType": "DEFAULT", "PhoneNumber": "847-1294", "PhoneAreaCode": "(626)", "PhoneCountryCode": "" }, { "PhoneType": "DDI", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" }, { "PhoneType": "FAX", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" }, { "PhoneType": "MOBILE", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" } ], "UpdatedDateUTC": "2017-08-21T13:49:04.227-07:00", "ContactGroups": [] }, "Lineitems": [], "BankAccount": { "Code": "088", "Name": "Business Wells Fargo", "AccountID": "00000000-0000-0000-0000-000000000000" }, "IsReconciled": false, "Date": "2019-02-25", "Reference": "You just updated", "CurrencyCode": "USD", "CurrencyRate": 1, "Status": "AUTHORISED", "LineAmountTypes": "Inclusive", "TotalTax": 1.74, "BankTransactionID": "00000000-0000-0000-0000-000000000000", "UpdatedDateUTC": "2019-02-26T12:39:27.813-08:00" } ] }; // BankTransactions |
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- BankTransactions result = apiInstance.updateBankTransaction(xeroTenantId, bankTransactionID, bankTransactions, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateBankTransaction");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *bankTransactionID = 00000000-0000-0000-0000-000000000000; // Xero generated unique identifier for a bank transaction (default to null)
-BankTransactions *bankTransactions = { "BankTransactions": [ { "Type": "SPEND", "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000", "ContactStatus": "ACTIVE", "Name": "Buzz Lightyear", "FirstName": "Buzz", "LastName": "Lightyear", "EmailAddress": "buzz.Lightyear@email.com", "ContactPersons": [], "BankAccountDetails": "", "Addresses": [ { "AddressType": "STREET", "City": "", "Region": "", "PostalCode": "", "Country": "" }, { "AddressType": "POBOX", "AddressLine1": "", "AddressLine2": "", "AddressLine3": "", "AddressLine4": "", "City": "Palo Alto", "Region": "CA", "PostalCode": "94020", "Country": "United States" } ], "Phones": [ { "PhoneType": "DEFAULT", "PhoneNumber": "847-1294", "PhoneAreaCode": "(626)", "PhoneCountryCode": "" }, { "PhoneType": "DDI", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" }, { "PhoneType": "FAX", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" }, { "PhoneType": "MOBILE", "PhoneNumber": "", "PhoneAreaCode": "", "PhoneCountryCode": "" } ], "UpdatedDateUTC": "2017-08-21T13:49:04.227-07:00", "ContactGroups": [] }, "Lineitems": [], "BankAccount": { "Code": "088", "Name": "Business Wells Fargo", "AccountID": "00000000-0000-0000-0000-000000000000" }, "IsReconciled": false, "Date": "2019-02-25", "Reference": "You just updated", "CurrencyCode": "USD", "CurrencyRate": 1, "Status": "AUTHORISED", "LineAmountTypes": "Inclusive", "TotalTax": 1.74, "BankTransactionID": "00000000-0000-0000-0000-000000000000", "UpdatedDateUTC": "2019-02-26T12:39:27.813-08:00" } ] }; //
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a single spent or received money transaction
-[apiInstance updateBankTransactionWith:xeroTenantId
- bankTransactionID:bankTransactionID
- bankTransactions:bankTransactions
- unitdp:unitdp
- completionHandler: ^(BankTransactions output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const bankTransactionID = '00000000-0000-0000-0000-000000000000';
-const unitdp = 4;
-
-const contact: Contact = {
- contactID: "00000000-0000-0000-0000-000000000000" };
-
-const lineItem: LineItem = {
- description: "Foobar",
- quantity: 1.0,
- unitAmount: 20.0,
- accountCode: "000" };
-const lineItems = [];
-lineItems.push(lineItem)
-
-const bankAccount: Account = {
- accountID: "00000000-0000-0000-0000-000000000000" };
-
-const bankTransaction: BankTransaction = {
- reference: "You just updated",
- type: BankTransaction.TypeEnum.RECEIVE,
- contact: contact,
- lineItems: lineItems,
- bankAccount: bankAccount };
-
-const bankTransactions: BankTransactions = {
- bankTransactions: [bankTransaction] };
-
-try {
- const response = await xero.accountingApi.updateBankTransaction(xeroTenantId, bankTransactionID, bankTransactions, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateBankTransactionExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var bankTransactionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var unitdp = 4;
-
- var contact = new Contact();
- contact.ContactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var lineItem = new LineItem();
- lineItem.Description = "Foobar";
- lineItem.Quantity = new decimal(1.0);
- lineItem.UnitAmount = new decimal(20.0);
- lineItem.AccountCode = "000";
- var lineItems = new List<LineItem>();
- lineItems.Add(lineItem);
-
- var bankAccount = new Account();
- bankAccount.AccountID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var bankTransaction = new BankTransaction();
- bankTransaction.Reference = "You just updated";
- bankTransaction.Type = BankTransaction.TypeEnum.RECEIVE;
- bankTransaction.Contact = contact;
- bankTransaction.LineItems = lineItems;
- bankTransaction.BankAccount = bankAccount;
-
- var bankTransactions = new BankTransactions();
- var bankTransactionsList = new List<BankTransaction>();
- bankTransactionsList.Add(bankTransaction);
- bankTransactions._BankTransactions = bankTransactionsList;
-
- try {
- var result = await apiInstance.UpdateBankTransactionAsync(accessToken, xeroTenantId, bankTransactionID, bankTransactions, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateBankTransaction: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$bankTransactionID = "00000000-0000-0000-0000-000000000000";
-$unitdp = 4;
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setContactID('00000000-0000-0000-0000-000000000000');
-
-$lineItem = new XeroAPI\XeroPHP\Models\Accounting\LineItem;
-$lineItem->setDescription('Foobar');
-$lineItem->setQuantity(1.0);
-$lineItem->setUnitAmount(20.0);
-$lineItem->setAccountCode('000');
-$lineItems = [];
-array_push($lineItems, $lineItem);
-
-$bankAccount = new XeroAPI\XeroPHP\Models\Accounting\Account;
-$bankAccount->setAccountID('00000000-0000-0000-0000-000000000000');
-
-$bankTransaction = new XeroAPI\XeroPHP\Models\Accounting\BankTransaction;
-$bankTransaction->setReference('You just updated');
-$bankTransaction->setType(XeroAPI\XeroPHP\Models\Accounting\BankTransaction::TYPE_RECEIVE);
-$bankTransaction->setContact($contact);
-$bankTransaction->setLineItems($lineItems);
-$bankTransaction->setBankAccount($bankAccount);
-
-$bankTransactions = new XeroAPI\XeroPHP\Models\Accounting\BankTransactions;
-$arr_bank_transactions = [];
-array_push($arr_bank_transactions, $bankTransaction);
-$bankTransactions->setBankTransactions($arr_bank_transactions);
-
-try {
- $result = $apiInstance->updateBankTransaction($xeroTenantId, $bankTransactionID, $bankTransactions, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateBankTransaction: ', $e->getMessage(), PHP_EOL;
+ },
+ "required" : true
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransactionID = 00000000-0000-0000-0000-000000000000; # UUID | Xero generated unique identifier for a bank transaction
-my $bankTransactions = ::Object::BankTransactions->new(); # BankTransactions |
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->updateBankTransaction(xeroTenantId => $xeroTenantId, bankTransactionID => $bankTransactionID, bankTransactions => $bankTransactions, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateBankTransaction: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateBankTransaction
+ Updates a single spent or received money transaction
+
+
+
+
+
+
+
+ /BankTransactions/{BankTransactionID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -99815,73 +36235,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateBankTransaction: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-bank_transaction_id = '00000000-0000-0000-0000-000000000000'
-unitdp = 4
-
-contact = {
- contact_id: "00000000-0000-0000-0000-000000000000"
-}
-
-line_item = {
- description: "Foobar",
- quantity: 1.0,
- unit_amount: 20.0,
- account_code: "000"
-}
-line_items = []
-line_items << line_item
-
-bank_account = {
- account_id: "00000000-0000-0000-0000-000000000000"
-}
-
-bank_transaction = {
- reference: "You just updated",
- type: XeroRuby::Accounting::BankTransaction::RECEIVE,
- contact: contact,
- lineItems: lineItems,
- bank_account: bank_account
-}
-
-bankTransactions = {
- bank_transactions: [bank_transaction]
-}
-
-begin
- response = xero_client.accounting_api.update_bank_transaction(xero_tenant_id, bank_transaction_id, bankTransactions, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_bank_transaction: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BankTransactionID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BankTransactionID*
@@ -99907,15 +36279,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -99938,34 +36309,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- bankTransactions *
-
-
-
-
- BankTransactions
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ bankTransactions *
+
+
+
+
+ BankTransactions
+
+
+
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- unitdp
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ unitdp
@@ -100025,392 +36372,34 @@ Parameters
-
-
-
-
-
-
-
-
- updateBankTransactionAttachmentByFileName
- Updates a specific attachment from a specific bank transaction by filename
-
-
-
-
-
-
-
- /BankTransactions/{BankTransactionID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransactions/{BankTransactionID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID bankTransactionID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.updateBankTransactionAttachmentByFileName(accessToken, xeroTenantId, bankTransactionID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateBankTransactionAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID bankTransactionID = 00000000-0000-0000-0000-000000000000; // UUID | Xero generated unique identifier for a bank transaction
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.updateBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateBankTransactionAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *bankTransactionID = 00000000-0000-0000-0000-000000000000; // Xero generated unique identifier for a bank transaction (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific attachment from a specific bank transaction by filename
-[apiInstance updateBankTransactionAttachmentByFileNameWith:xeroTenantId
- bankTransactionID:bankTransactionID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const bankTransactionID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.updateBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateBankTransactionAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var bankTransactionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.UpdateBankTransactionAttachmentByFileNameAsync(accessToken, xeroTenantId, bankTransactionID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateBankTransactionAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$bankTransactionID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->updateBankTransactionAttachmentByFileName($xeroTenantId, $bankTransactionID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateBankTransactionAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransactionID = 00000000-0000-0000-0000-000000000000; # UUID | Xero generated unique identifier for a bank transaction
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->updateBankTransactionAttachmentByFileName(xeroTenantId => $xeroTenantId, bankTransactionID => $bankTransactionID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateBankTransactionAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ updateBankTransactionAttachmentByFileName
+ Updates a specific attachment from a specific bank transaction by filename
+
+
+
+
+
+
+
+ /BankTransactions/{BankTransactionID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -100438,44 +36427,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateBankTransactionAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-bank_transaction_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.update_bank_transaction_attachment_by_file_name(xero_tenant_id, bank_transaction_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_bank_transaction_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BankTransactionID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BankTransactionID*
@@ -100501,7 +36471,7 @@ Parameters
- FileName*
+ FileName*
@@ -100524,15 +36494,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -100555,34 +36524,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateBankTransferAttachmentByFileName
-
-
-
-
-
-
-
-
- /BankTransfers/{BankTransferID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransfers/{BankTransferID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID bankTransferID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.updateBankTransferAttachmentByFileName(accessToken, xeroTenantId, bankTransferID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateBankTransferAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID bankTransferID = 00000000-0000-0000-0000-000000000000; // UUID | Xero generated unique identifier for a bank transfer
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.updateBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateBankTransferAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *bankTransferID = 00000000-0000-0000-0000-000000000000; // Xero generated unique identifier for a bank transfer (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-//
-[apiInstance updateBankTransferAttachmentByFileNameWith:xeroTenantId
- bankTransferID:bankTransferID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const bankTransferID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.updateBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateBankTransferAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var bankTransferID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.UpdateBankTransferAttachmentByFileNameAsync(accessToken, xeroTenantId, bankTransferID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateBankTransferAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$bankTransferID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->updateBankTransferAttachmentByFileName($xeroTenantId, $bankTransferID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateBankTransferAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransferID = 00000000-0000-0000-0000-000000000000; # UUID | Xero generated unique identifier for a bank transfer
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->updateBankTransferAttachmentByFileName(xeroTenantId => $xeroTenantId, bankTransferID => $bankTransferID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateBankTransferAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateBankTransferAttachmentByFileName
+
+
+
+
+
+
+
+
+ /BankTransfers/{BankTransferID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -101030,44 +36616,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateBankTransferAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-bank_transfer_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.update_bank_transfer_attachment_by_file_name(xero_tenant_id, bank_transfer_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_bank_transfer_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- BankTransferID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ BankTransferID*
@@ -101093,7 +36660,7 @@ Parameters
- FileName*
+ FileName*
@@ -101116,15 +36683,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -101147,34 +36713,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateContact
- Updates a specific contact in a Xero organisation
-
-
-
-
-
-
-
- /Contacts/{ContactID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Contacts/{ContactID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID contactID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- Contact contact = new Contact();
- contact.setName("Thanos");
- contact.setContactID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- Contacts contacts = new Contacts();
- contacts.addContactsItem(contact);
-
- try {
- Contacts result = apiInstance.updateContact(accessToken, xeroTenantId, contactID, contacts);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateContact");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID contactID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact
- Contacts contacts = { "Contacts": [{ "ContactID": "00000000-0000-0000-0000-000000000000", "Name": "Thanos" }]}; // Contacts |
- try {
- Contacts result = apiInstance.updateContact(xeroTenantId, contactID, contacts);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateContact");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *contactID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact (default to null)
-Contacts *contacts = { "Contacts": [{ "ContactID": "00000000-0000-0000-0000-000000000000", "Name": "Thanos" }]}; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific contact in a Xero organisation
-[apiInstance updateContactWith:xeroTenantId
- contactID:contactID
- contacts:contacts
- completionHandler: ^(Contacts output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactID = '00000000-0000-0000-0000-000000000000';
-
-const contact: Contact = {
- name: "Thanos",
- contactID: "00000000-0000-0000-0000-000000000000" };
-
-const contacts: Contacts = {
- contacts: [contact] };
-
-try {
- const response = await xero.accountingApi.updateContact(xeroTenantId, contactID, contacts);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateContactExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var contact = new Contact();
- contact.Name = "Thanos";
- contact.ContactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var contacts = new Contacts();
- var contactsList = new List<Contact>();
- contactsList.Add(contact);
- contacts._Contacts = contactsList;
-
- try {
- var result = await apiInstance.UpdateContactAsync(accessToken, xeroTenantId, contactID, contacts);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateContact: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactID = "00000000-0000-0000-0000-000000000000";
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setName('Thanos');
-$contact->setContactID('00000000-0000-0000-0000-000000000000');
-
-$contacts = new XeroAPI\XeroPHP\Models\Accounting\Contacts;
-$arr_contacts = [];
-array_push($arr_contacts, $contact);
-$contacts->setContacts($arr_contacts);
-
-try {
- $result = $apiInstance->updateContact($xeroTenantId, $contactID, $contacts);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateContact: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact
-my $contacts = ::Object::Contacts->new(); # Contacts |
-
-eval {
- my $result = $api_instance->updateContact(xeroTenantId => $xeroTenantId, contactID => $contactID, contacts => $contacts);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateContact: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateContact
+ Updates a specific contact in a Xero organisation
+
+
+
+
+
+
+
+ /Contacts/{ContactID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -101629,52 +36807,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateContact: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_id = '00000000-0000-0000-0000-000000000000'
-
-contact = {
- name: "Thanos",
- contactID: "00000000-0000-0000-0000-000000000000"
-}
-
-contacts = {
- contacts: [contact]
-}
-
-begin
- response = xero_client.accounting_api.update_contact(xero_tenant_id, contact_id, contacts)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_contact: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.contacts
- Grant read-write access to contacts and contact groups
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ContactID*
+
+
+ Scopes
+
+
+
+ accounting.contacts
+ Grant read-write access to contacts and contact groups
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ContactID*
@@ -101700,15 +36851,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -101731,34 +36881,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- contacts *
-
-
-
-
- Contacts
-
-
-
-an array of Contacts containing single Contact object with properties to update
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ contacts *
+
+
+
+
+ Contacts
+
+
+ an array of Contacts containing single Contact object with properties to update
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateContactAttachmentByFileName
-
-
-
-
-
-
-
-
- /Contacts/{ContactID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Contacts/{ContactID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID contactID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.updateContactAttachmentByFileName(accessToken, xeroTenantId, contactID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateContactAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID contactID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.updateContactAttachmentByFileName(xeroTenantId, contactID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateContactAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *contactID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-//
-[apiInstance updateContactAttachmentByFileNameWith:xeroTenantId
- contactID:contactID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.updateContactAttachmentByFileName(xeroTenantId, contactID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateContactAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.UpdateContactAttachmentByFileNameAsync(accessToken, xeroTenantId, contactID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateContactAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->updateContactAttachmentByFileName($xeroTenantId, $contactID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateContactAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->updateContactAttachmentByFileName(xeroTenantId => $xeroTenantId, contactID => $contactID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateContactAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateContactAttachmentByFileName
+
+
+
+
+
+
+
+
+ /Contacts/{ContactID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -102205,44 +36973,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateContactAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.update_contact_attachment_by_file_name(xero_tenant_id, contact_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_contact_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ContactID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ContactID*
@@ -102268,7 +37017,7 @@ Parameters
- FileName*
+ FileName*
@@ -102291,15 +37040,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -102322,34 +37070,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateContactGroup
- Updates a specific contact group
-
-
-
-
-
-
-
- /ContactGroups/{ContactGroupID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ContactGroups/{ContactGroupID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID contactGroupID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- ContactGroup contactGroup = new ContactGroup();
- contactGroup.setName("Vendor");
-
- ContactGroups contactGroups = new ContactGroups();
- contactGroups.addContactGroupsItem(contactGroup);
-
- try {
- ContactGroups result = apiInstance.updateContactGroup(accessToken, xeroTenantId, contactGroupID, contactGroups);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateContactGroup");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID contactGroupID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Contact Group
- ContactGroups contactGroups = { "ContactGroups":[ { "Name":"Suppliers" } ] }; // ContactGroups |
- try {
- ContactGroups result = apiInstance.updateContactGroup(xeroTenantId, contactGroupID, contactGroups);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateContactGroup");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *contactGroupID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Contact Group (default to null)
-ContactGroups *contactGroups = { "ContactGroups":[ { "Name":"Suppliers" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific contact group
-[apiInstance updateContactGroupWith:xeroTenantId
- contactGroupID:contactGroupID
- contactGroups:contactGroups
- completionHandler: ^(ContactGroups output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const contactGroupID = '00000000-0000-0000-0000-000000000000';
-
-const contactGroup: ContactGroup = {
- name: "Vendor" };
-
-const contactGroups: ContactGroups = {
- contactGroups: [contactGroup] };
-
-try {
- const response = await xero.accountingApi.updateContactGroup(xeroTenantId, contactGroupID, contactGroups);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateContactGroupExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var contactGroupID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var contactGroup = new ContactGroup();
- contactGroup.Name = "Vendor";
-
- var contactGroups = new ContactGroups();
- var contactGroupsList = new List<ContactGroup>();
- contactGroupsList.Add(contactGroup);
- contactGroups._ContactGroups = contactGroupsList;
-
- try {
- var result = await apiInstance.UpdateContactGroupAsync(accessToken, xeroTenantId, contactGroupID, contactGroups);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateContactGroup: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$contactGroupID = "00000000-0000-0000-0000-000000000000";
-
-$contactGroup = new XeroAPI\XeroPHP\Models\Accounting\ContactGroup;
-$contactGroup->setName('Vendor');
-
-$contactGroups = new XeroAPI\XeroPHP\Models\Accounting\ContactGroups;
-$arr_contact_groups = [];
-array_push($arr_contact_groups, $contactGroup);
-$contactGroups->setContactGroups($arr_contact_groups);
-
-try {
- $result = $apiInstance->updateContactGroup($xeroTenantId, $contactGroupID, $contactGroups);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateContactGroup: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contactGroupID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Contact Group
-my $contactGroups = ::Object::ContactGroups->new(); # ContactGroups |
-
-eval {
- my $result = $api_instance->updateContactGroup(xeroTenantId => $xeroTenantId, contactGroupID => $contactGroupID, contactGroups => $contactGroups);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateContactGroup: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateContactGroup
+ Updates a specific contact group
+
+
+
+
+
+
+
+ /ContactGroups/{ContactGroupID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -102799,51 +37163,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateContactGroup: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-contact_group_id = '00000000-0000-0000-0000-000000000000'
-
-contact_group = {
- name: "Vendor"
-}
-
-contactGroups = {
- contact_groups: [contact_group]
-}
-
-begin
- response = xero_client.accounting_api.update_contact_group(xero_tenant_id, contact_group_id, contactGroups)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_contact_group: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.contacts
- Grant read-write access to contacts and contact groups
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ContactGroupID*
+
+
+ Scopes
+
+
+
+ accounting.contacts
+ Grant read-write access to contacts and contact groups
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ContactGroupID*
@@ -102869,15 +37207,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -102900,34 +37237,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- contactGroups *
-
-
-
-
- ContactGroups
-
-
-
-an array of Contact groups with Name of specific group to update
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ contactGroups *
+
+
+
+
+ ContactGroups
+
+
+ an array of Contact groups with Name of specific group to update
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateCreditNote
- Updates a specific credit note
-
-
-
-
-
-
-
- /CreditNotes/{CreditNoteID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/CreditNotes/{CreditNoteID}?unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID creditNoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- Integer unitdp = 4;
- LocalDate currDate = LocalDate.now();
-
- Contact contact = new Contact();
- contact.setContactID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- LineItem lineItem = new LineItem();
- lineItem.setDescription("Foobar");
- lineItem.setQuantity(1.0);
- lineItem.setUnitAmount(20.0);
- lineItem.setAccountCode("000");
-
- List<LineItem> lineItems = new ArrayList<LineItem>();
- lineItems.add(lineItem);
-
- CreditNote creditNote = new CreditNote();
- creditNote.setType(com.xero.models.accounting.CreditNote.TypeEnum.ACCPAYCREDIT);
- creditNote.setStatus(com.xero.models.accounting.CreditNote.StatusEnum.AUTHORISED);
- creditNote.setReference("My ref.");
- creditNote.setContact(contact);
- creditNote.setDate(currDate);
- creditNote.setLineItems(lineItems);
-
- CreditNotes creditNotes = new CreditNotes();
- creditNotes.addCreditNotesItem(creditNote);
-
- try {
- CreditNotes result = apiInstance.updateCreditNote(accessToken, xeroTenantId, creditNoteID, creditNotes, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateCreditNote");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID creditNoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Credit Note
- CreditNotes creditNotes = { "CreditNotes": [ { "Type": "ACCPAYCREDIT", "Contact": { "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8" }, "Date": "2019-01-05", "Status": "AUTHORISED", "Reference": "HelloWorld", "LineItems": [ { "Description": "Foobar", "Quantity": 2, "UnitAmount": 20, "AccountCode": "400" } ] } ] }; // CreditNotes |
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- CreditNotes result = apiInstance.updateCreditNote(xeroTenantId, creditNoteID, creditNotes, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateCreditNote");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *creditNoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Credit Note (default to null)
-CreditNotes *creditNotes = { "CreditNotes": [ { "Type": "ACCPAYCREDIT", "Contact": { "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8" }, "Date": "2019-01-05", "Status": "AUTHORISED", "Reference": "HelloWorld", "LineItems": [ { "Description": "Foobar", "Quantity": 2, "UnitAmount": 20, "AccountCode": "400" } ] } ] }; //
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific credit note
-[apiInstance updateCreditNoteWith:xeroTenantId
- creditNoteID:creditNoteID
- creditNotes:creditNotes
- unitdp:unitdp
- completionHandler: ^(CreditNotes output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const creditNoteID = '00000000-0000-0000-0000-000000000000';
-const unitdp = 4;
-const currDate = '2020-12-10'
-
-const contact: Contact = {
- contactID: "00000000-0000-0000-0000-000000000000" };
-
-const lineItem: LineItem = {
- description: "Foobar",
- quantity: 1.0,
- unitAmount: 20.0,
- accountCode: "000" };
-const lineItems = [];
-lineItems.push(lineItem)
-
-const creditNote: CreditNote = {
- type: CreditNote.TypeEnum.ACCPAYCREDIT,
- status: CreditNote.StatusEnum.AUTHORISED,
- reference: "My ref.",
- contact: contact,
- date: currDate,
- lineItems: lineItems };
-
-const creditNotes: CreditNotes = {
- creditNotes: [creditNote] };
-
-try {
- const response = await xero.accountingApi.updateCreditNote(xeroTenantId, creditNoteID, creditNotes, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateCreditNoteExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var creditNoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var unitdp = 4;
- var currDate = DateTime.Now;
-
- var contact = new Contact();
- contact.ContactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var lineItem = new LineItem();
- lineItem.Description = "Foobar";
- lineItem.Quantity = new decimal(1.0);
- lineItem.UnitAmount = new decimal(20.0);
- lineItem.AccountCode = "000";
- var lineItems = new List<LineItem>();
- lineItems.Add(lineItem);
-
- var creditNote = new CreditNote();
- creditNote.Type = CreditNote.TypeEnum.ACCPAYCREDIT;
- creditNote.Status = CreditNote.StatusEnum.AUTHORISED;
- creditNote.Reference = "My ref.";
- creditNote.Contact = contact;
- creditNote.Date = currDate;
- creditNote.LineItems = lineItems;
-
- var creditNotes = new CreditNotes();
- var creditNotesList = new List<CreditNote>();
- creditNotesList.Add(creditNote);
- creditNotes._CreditNotes = creditNotesList;
-
- try {
- var result = await apiInstance.UpdateCreditNoteAsync(accessToken, xeroTenantId, creditNoteID, creditNotes, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateCreditNote: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$creditNoteID = "00000000-0000-0000-0000-000000000000";
-$unitdp = 4;
-$currDate = new DateTime('2020-12-10');
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setContactID('00000000-0000-0000-0000-000000000000');
-
-$lineItem = new XeroAPI\XeroPHP\Models\Accounting\LineItem;
-$lineItem->setDescription('Foobar');
-$lineItem->setQuantity(1.0);
-$lineItem->setUnitAmount(20.0);
-$lineItem->setAccountCode('000');
-$lineItems = [];
-array_push($lineItems, $lineItem);
-
-$creditNote = new XeroAPI\XeroPHP\Models\Accounting\CreditNote;
-$creditNote->setType(XeroAPI\XeroPHP\Models\Accounting\CreditNote::TYPE_ACCPAYCREDIT);
-$creditNote->setStatus(XeroAPI\XeroPHP\Models\Accounting\CreditNote::STATUS_AUTHORISED);
-$creditNote->setReference('My ref.');
-$creditNote->setContact($contact);
-$creditNote->setDate($currDate);
-$creditNote->setLineItems($lineItems);
-
-$creditNotes = new XeroAPI\XeroPHP\Models\Accounting\CreditNotes;
-$arr_credit_notes = [];
-array_push($arr_credit_notes, $creditNote);
-$creditNotes->setCreditNotes($arr_credit_notes);
-
-try {
- $result = $apiInstance->updateCreditNote($xeroTenantId, $creditNoteID, $creditNotes, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateCreditNote: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $creditNoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Credit Note
-my $creditNotes = ::Object::CreditNotes->new(); # CreditNotes |
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->updateCreditNote(xeroTenantId => $xeroTenantId, creditNoteID => $creditNoteID, creditNotes => $creditNotes, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateCreditNote: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateCreditNote
+ Updates a specific credit note
+
+
+
+
+
+
+
+ /CreditNotes/{CreditNoteID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -103471,71 +37348,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateCreditNote: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-credit_note_id = '00000000-0000-0000-0000-000000000000'
-unitdp = 4
-curr_date = 'YYYY-MM-DD'
-
-contact = {
- contact_id: "00000000-0000-0000-0000-000000000000"
-}
-
-line_item = {
- description: "Foobar",
- quantity: 1.0,
- unit_amount: 20.0,
- account_code: "000"
-}
-line_items = []
-line_items << line_item
-
-credit_note = {
- type: XeroRuby::Accounting::CreditNote::ACCPAYCREDIT,
- status: XeroRuby::Accounting::CreditNote::AUTHORISED,
- reference: "My ref.",
- contact: contact,
- date: curr_date,
- line_items: line_items
-}
-
-creditNotes = {
- credit_notes: [credit_note]
-}
-
-begin
- response = xero_client.accounting_api.update_credit_note(xero_tenant_id, credit_note_id, creditNotes, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_credit_note: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- CreditNoteID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ CreditNoteID*
@@ -103561,15 +37392,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -103592,34 +37422,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- creditNotes *
-
-
-
-
- CreditNotes
-
-
-
-an array of Credit Notes containing credit note details to update
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ creditNotes *
+
+
+
+
+ CreditNotes
+
+
+ an array of Credit Notes containing credit note details to update
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- unitdp
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ unitdp
@@ -103680,392 +37486,34 @@ Parameters
-
-
-
-
-
-
-
-
- updateCreditNoteAttachmentByFileName
- Updates attachments on a specific credit note by file name
-
-
-
-
-
-
-
- /CreditNotes/{CreditNoteID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/CreditNotes/{CreditNoteID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID creditNoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.updateCreditNoteAttachmentByFileName(accessToken, xeroTenantId, creditNoteID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateCreditNoteAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID creditNoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Credit Note
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.updateCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateCreditNoteAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *creditNoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Credit Note (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates attachments on a specific credit note by file name
-[apiInstance updateCreditNoteAttachmentByFileNameWith:xeroTenantId
- creditNoteID:creditNoteID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const creditNoteID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.updateCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateCreditNoteAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var creditNoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.UpdateCreditNoteAttachmentByFileNameAsync(accessToken, xeroTenantId, creditNoteID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateCreditNoteAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$creditNoteID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->updateCreditNoteAttachmentByFileName($xeroTenantId, $creditNoteID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateCreditNoteAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $creditNoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Credit Note
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->updateCreditNoteAttachmentByFileName(xeroTenantId => $xeroTenantId, creditNoteID => $creditNoteID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateCreditNoteAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ updateCreditNoteAttachmentByFileName
+ Updates attachments on a specific credit note by file name
+
+
+
+
+
+
+
+ /CreditNotes/{CreditNoteID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -104093,44 +37541,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateCreditNoteAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-credit_note_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.update_credit_note_attachment_by_file_name(xero_tenant_id, credit_note_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_credit_note_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- CreditNoteID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ CreditNoteID*
@@ -104156,7 +37585,7 @@ Parameters
- FileName*
+ FileName*
@@ -104179,15 +37608,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -104210,504 +37638,71 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateExpenseClaim
- Updates a specific expense claims
-
-
-
-
-
-
-
- /ExpenseClaims/{ExpenseClaimID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ExpenseClaims/{ExpenseClaimID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID expenseClaimID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- LocalDate currDate = LocalDate.now();
-
- User user = new User();
- user.setUserID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- Receipt receipt = new Receipt();
- receipt.setReceiptID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
- receipt.setDate(currDate);
-
- List<Receipt> receipts = new ArrayList<Receipt>();
- receipts.add(receipt);
-
- ExpenseClaim expenseClaim = new ExpenseClaim();
- expenseClaim.setStatus(com.xero.models.accounting.ExpenseClaim.StatusEnum.SUBMITTED);
- expenseClaim.setUser(user);
- expenseClaim.setReceipts(receipts);
-
- ExpenseClaims expenseClaims = new ExpenseClaims();
- expenseClaims.addExpenseClaimsItem(expenseClaim);
-
- try {
- ExpenseClaims result = apiInstance.updateExpenseClaim(accessToken, xeroTenantId, expenseClaimID, expenseClaims);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateExpenseClaim");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID expenseClaimID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a ExpenseClaim
- ExpenseClaims expenseClaims = { "ExpenseClaims": [ { "Status": "SUBMITTED", "User": { "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273" }, "Receipts": [ { "Lineitems": [], "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816" } ] } ] }; // ExpenseClaims |
- try {
- ExpenseClaims result = apiInstance.updateExpenseClaim(xeroTenantId, expenseClaimID, expenseClaims);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateExpenseClaim");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *expenseClaimID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a ExpenseClaim (default to null)
-ExpenseClaims *expenseClaims = { "ExpenseClaims": [ { "Status": "SUBMITTED", "User": { "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273" }, "Receipts": [ { "Lineitems": [], "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816" } ] } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific expense claims
-[apiInstance updateExpenseClaimWith:xeroTenantId
- expenseClaimID:expenseClaimID
- expenseClaims:expenseClaims
- completionHandler: ^(ExpenseClaims output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const expenseClaimID = '00000000-0000-0000-0000-000000000000';
-const currDate = '2020-12-10'
-
-const user: User = {
- userID: "00000000-0000-0000-0000-000000000000" };
-
-const receipt: Receipt = {
- receiptID: "00000000-0000-0000-0000-000000000000",
- date: currDate };
-const receipts = [];
-receipts.push(receipt)
-
-const expenseClaim: ExpenseClaim = {
- status: ExpenseClaim.StatusEnum.SUBMITTED,
- user: user,
- receipts: receipts };
-
-const expenseClaims: ExpenseClaims = {
- expenseClaims: [expenseClaim] };
-
-try {
- const response = await xero.accountingApi.updateExpenseClaim(xeroTenantId, expenseClaimID, expenseClaims);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateExpenseClaimExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var expenseClaimID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var currDate = DateTime.Now;
-
- var user = new User();
- user.UserID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var receipt = new Receipt();
- receipt.ReceiptID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- receipt.Date = currDate;
- var receipts = new List<Receipt>();
- receipts.Add(receipt);
-
- var expenseClaim = new ExpenseClaim();
- expenseClaim.Status = ExpenseClaim.StatusEnum.SUBMITTED;
- expenseClaim.User = user;
- expenseClaim.Receipts = receipts;
-
- var expenseClaims = new ExpenseClaims();
- var expenseClaimsList = new List<ExpenseClaim>();
- expenseClaimsList.Add(expenseClaim);
- expenseClaims._ExpenseClaims = expenseClaimsList;
-
- try {
- var result = await apiInstance.UpdateExpenseClaimAsync(accessToken, xeroTenantId, expenseClaimID, expenseClaims);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateExpenseClaim: " + e.Message );
- }
- }
+
+
+ Required
+
+
+
+
+
+
+
+
+
+
+ updateExpenseClaim
+ Updates a specific expense claims
+
+
+
+
+
+
+
+ /ExpenseClaims/{ExpenseClaimID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -104749,65 +37744,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateExpenseClaim: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-expense_claim_id = '00000000-0000-0000-0000-000000000000'
-curr_date = 'YYYY-MM-DD'
-
-user = {
- user_id: "00000000-0000-0000-0000-000000000000"
-}
-
-receipt = {
- receipt_id: "00000000-0000-0000-0000-000000000000",
- date: curr_date
-}
-receipts = []
-receipts << receipt
-
-expense_claim = {
- status: XeroRuby::Accounting::ExpenseClaim::SUBMITTED,
- user: user,
- receipts: receipts
-}
-
-expenseClaims = {
- expense_claims: [expense_claim]
-}
-
-begin
- response = xero_client.accounting_api.update_expense_claim(xero_tenant_id, expense_claim_id, expenseClaims)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_expense_claim: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ExpenseClaimID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ExpenseClaimID*
@@ -104833,15 +37788,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -104864,34 +37818,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- expenseClaims *
-
-
-
-
- ExpenseClaims
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ expenseClaims *
+
+
+
+
+ ExpenseClaims
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateInvoice
- Updates a specific sales invoices or purchase bills
-
-
-
-
-
-
-
- /Invoices/{InvoiceID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Invoices/{InvoiceID}?unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID invoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- Integer unitdp = 4;
-
- Invoice invoice = new Invoice();
- invoice.setReference("I am Iron man");
-
- Invoices invoices = new Invoices();
- invoices.addInvoicesItem(invoice);
-
- try {
- Invoices result = apiInstance.updateInvoice(accessToken, xeroTenantId, invoiceID, invoices, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateInvoice");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID invoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Invoice
- Invoices invoices = { "Invoices": [{ Reference: "May the force be with you", "InvoiceID": "00000000-0000-0000-0000-000000000000", "LineItems": [], "Contact": {}, "Type": "ACCPAY" }]}; // Invoices |
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- Invoices result = apiInstance.updateInvoice(xeroTenantId, invoiceID, invoices, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateInvoice");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *invoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Invoice (default to null)
-Invoices *invoices = { "Invoices": [{ Reference: "May the force be with you", "InvoiceID": "00000000-0000-0000-0000-000000000000", "LineItems": [], "Contact": {}, "Type": "ACCPAY" }]}; //
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific sales invoices or purchase bills
-[apiInstance updateInvoiceWith:xeroTenantId
- invoiceID:invoiceID
- invoices:invoices
- unitdp:unitdp
- completionHandler: ^(Invoices output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const invoiceID = '00000000-0000-0000-0000-000000000000';
-const unitdp = 4;
-
-const invoice: Invoice = {
- reference: "I am Iron man" };
-
-const invoices: Invoices = {
- invoices: [invoice] };
-
-try {
- const response = await xero.accountingApi.updateInvoice(xeroTenantId, invoiceID, invoices, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateInvoiceExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var invoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var unitdp = 4;
-
- var invoice = new Invoice();
- invoice.Reference = "I am Iron man";
-
- var invoices = new Invoices();
- var invoicesList = new List<Invoice>();
- invoicesList.Add(invoice);
- invoices._Invoices = invoicesList;
-
- try {
- var result = await apiInstance.UpdateInvoiceAsync(accessToken, xeroTenantId, invoiceID, invoices, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateInvoice: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$invoiceID = "00000000-0000-0000-0000-000000000000";
-$unitdp = 4;
-
-$invoice = new XeroAPI\XeroPHP\Models\Accounting\Invoice;
-$invoice->setReference('I am Iron man');
-
-$invoices = new XeroAPI\XeroPHP\Models\Accounting\Invoices;
-$arr_invoices = [];
-array_push($arr_invoices, $invoice);
-$invoices->setInvoices($arr_invoices);
-
-try {
- $result = $apiInstance->updateInvoice($xeroTenantId, $invoiceID, $invoices, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateInvoice: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $invoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Invoice
-my $invoices = ::Object::Invoices->new(); # Invoices |
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->updateInvoice(xeroTenantId => $xeroTenantId, invoiceID => $invoiceID, invoices => $invoices, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateInvoice: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateInvoice
+ Updates a specific sales invoices or purchase bills
+
+
+
+
+
+
+
+ /Invoices/{InvoiceID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -105347,52 +37910,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateInvoice: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-invoice_id = '00000000-0000-0000-0000-000000000000'
-unitdp = 4
-
-invoice = {
- reference: "I am Iron man"
-}
-
-invoices = {
- invoices: [invoice]
-}
-
-begin
- response = xero_client.accounting_api.update_invoice(xero_tenant_id, invoice_id, invoices, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_invoice: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- InvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ InvoiceID*
@@ -105418,15 +37954,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -105449,34 +37984,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- invoices *
-
-
-
-
- Invoices
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ invoices *
+
+
+
+
+ Invoices
+
+
+
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- unitdp
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ unitdp
@@ -105536,392 +38047,34 @@ Parameters
-
-
-
-
-
-
-
-
- updateInvoiceAttachmentByFileName
- Updates an attachment from a specific invoices or purchase bill by filename
-
-
-
-
-
-
-
- /Invoices/{InvoiceID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Invoices/{InvoiceID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID invoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.updateInvoiceAttachmentByFileName(accessToken, xeroTenantId, invoiceID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateInvoiceAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID invoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Invoice
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.updateInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateInvoiceAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *invoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Invoice (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates an attachment from a specific invoices or purchase bill by filename
-[apiInstance updateInvoiceAttachmentByFileNameWith:xeroTenantId
- invoiceID:invoiceID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const invoiceID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.updateInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateInvoiceAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var invoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.UpdateInvoiceAttachmentByFileNameAsync(accessToken, xeroTenantId, invoiceID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateInvoiceAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$invoiceID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->updateInvoiceAttachmentByFileName($xeroTenantId, $invoiceID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateInvoiceAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $invoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Invoice
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->updateInvoiceAttachmentByFileName(xeroTenantId => $xeroTenantId, invoiceID => $invoiceID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateInvoiceAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ updateInvoiceAttachmentByFileName
+ Updates an attachment from a specific invoices or purchase bill by filename
+
+
+
+
+
+
+
+ /Invoices/{InvoiceID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -105949,44 +38102,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateInvoiceAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-invoice_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.update_invoice_attachment_by_file_name(xero_tenant_id, invoice_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_invoice_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- InvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ InvoiceID*
@@ -106012,7 +38146,7 @@ Parameters
- FileName*
+ FileName*
@@ -106035,15 +38169,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -106066,34 +38199,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateItem
- Updates a specific item
-
-
-
-
-
-
-
- /Items/{ItemID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Items/{ItemID}?unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID itemID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- Integer unitdp = 4;
-
- Item item = new Item();
- item.setCode("ItemCode123");
- item.setDescription("Goodbye");
-
- Items items = new Items();
- items.addItemsItem(item);
-
- try {
- Items result = apiInstance.updateItem(accessToken, xeroTenantId, itemID, items, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateItem");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID itemID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Item
- Items items = { "Items": [ { "Code": "ItemCode123", "Description": "Description 123" } ] }; // Items |
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- Items result = apiInstance.updateItem(xeroTenantId, itemID, items, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateItem");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *itemID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Item (default to null)
-Items *items = { "Items": [ { "Code": "ItemCode123", "Description": "Description 123" } ] }; //
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific item
-[apiInstance updateItemWith:xeroTenantId
- itemID:itemID
- items:items
- unitdp:unitdp
- completionHandler: ^(Items output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const itemID = '00000000-0000-0000-0000-000000000000';
-const unitdp = 4;
-
-const item: Item = {
- code: "ItemCode123",
- description: "Goodbye" };
-
-const items: Items = {
- items: [item] };
-
-try {
- const response = await xero.accountingApi.updateItem(xeroTenantId, itemID, items, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateItemExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var itemID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var unitdp = 4;
-
- var item = new Item();
- item.Code = "ItemCode123";
- item.Description = "Goodbye";
-
- var items = new Items();
- var itemsList = new List<Item>();
- itemsList.Add(item);
- items._Items = itemsList;
-
- try {
- var result = await apiInstance.UpdateItemAsync(accessToken, xeroTenantId, itemID, items, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateItem: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$itemID = "00000000-0000-0000-0000-000000000000";
-$unitdp = 4;
-
-$item = new XeroAPI\XeroPHP\Models\Accounting\Item;
-$item->setCode('ItemCode123');
-$item->setDescription('Goodbye');
-
-$items = new XeroAPI\XeroPHP\Models\Accounting\Items;
-$arr_items = [];
-array_push($arr_items, $item);
-$items->setItems($arr_items);
-
-try {
- $result = $apiInstance->updateItem($xeroTenantId, $itemID, $items, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateItem: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $itemID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Item
-my $items = ::Object::Items->new(); # Items |
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->updateItem(xeroTenantId => $xeroTenantId, itemID => $itemID, items => $items, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateItem: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateItem
+ Updates a specific item
+
+
+
+
+
+
+
+ /Items/{ItemID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -106556,53 +38293,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateItem: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-item_id = '00000000-0000-0000-0000-000000000000'
-unitdp = 4
-
-item = {
- code: "ItemCode123",
- description: "Goodbye"
-}
-
-items = {
- items: [item]
-}
-
-begin
- response = xero_client.accounting_api.update_item(xero_tenant_id, item_id, items, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_item: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ItemID*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ItemID*
@@ -106628,15 +38337,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -106659,34 +38367,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- items *
-
-
-
-
- Items
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ items *
+
+
+
+
+ Items
+
+
+
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- unitdp
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ unitdp
@@ -106746,397 +38430,34 @@ Parameters
-
-
-
-
-
-
-
-
- updateLinkedTransaction
- Updates a specific linked transactions (billable expenses)
-
-
-
-
-
-
-
- /LinkedTransactions/{LinkedTransactionID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/LinkedTransactions/{LinkedTransactionID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID linkedTransactionID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- LinkedTransaction linkedTransaction = new LinkedTransaction();
- linkedTransaction.setSourceLineItemID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
- linkedTransaction.setContactID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- LinkedTransactions linkedTransactions = new LinkedTransactions();
- linkedTransactions.addLinkedTransactionsItem(linkedTransaction);
-
- try {
- LinkedTransactions result = apiInstance.updateLinkedTransaction(accessToken, xeroTenantId, linkedTransactionID, linkedTransactions);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateLinkedTransaction");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID linkedTransactionID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a LinkedTransaction
- LinkedTransactions linkedTransactions = { "LinkedTransactions": [ { "SourceTransactionID": "00000000-0000-0000-0000-000000000000", "SourceLineItemID": "00000000-0000-0000-0000-000000000000" } ] }; // LinkedTransactions |
- try {
- LinkedTransactions result = apiInstance.updateLinkedTransaction(xeroTenantId, linkedTransactionID, linkedTransactions);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateLinkedTransaction");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *linkedTransactionID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a LinkedTransaction (default to null)
-LinkedTransactions *linkedTransactions = { "LinkedTransactions": [ { "SourceTransactionID": "00000000-0000-0000-0000-000000000000", "SourceLineItemID": "00000000-0000-0000-0000-000000000000" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific linked transactions (billable expenses)
-[apiInstance updateLinkedTransactionWith:xeroTenantId
- linkedTransactionID:linkedTransactionID
- linkedTransactions:linkedTransactions
- completionHandler: ^(LinkedTransactions output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const linkedTransactionID = '00000000-0000-0000-0000-000000000000';
-
-const linkedTransaction: LinkedTransaction = {
- sourceLineItemID: "00000000-0000-0000-0000-000000000000",
- contactID: "00000000-0000-0000-0000-000000000000" };
-
-const linkedTransactions: LinkedTransactions = {
- linkedTransactions: [linkedTransaction] };
-
-try {
- const response = await xero.accountingApi.updateLinkedTransaction(xeroTenantId, linkedTransactionID, linkedTransactions);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateLinkedTransactionExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var linkedTransactionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var linkedTransaction = new LinkedTransaction();
- linkedTransaction.SourceLineItemID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- linkedTransaction.ContactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var linkedTransactions = new LinkedTransactions();
- var linkedTransactionsList = new List<LinkedTransaction>();
- linkedTransactionsList.Add(linkedTransaction);
- linkedTransactions._LinkedTransactions = linkedTransactionsList;
-
- try {
- var result = await apiInstance.UpdateLinkedTransactionAsync(accessToken, xeroTenantId, linkedTransactionID, linkedTransactions);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateLinkedTransaction: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$linkedTransactionID = "00000000-0000-0000-0000-000000000000";
-
-$linkedTransaction = new XeroAPI\XeroPHP\Models\Accounting\LinkedTransaction;
-$linkedTransaction->setSourceLineItemID('00000000-0000-0000-0000-000000000000');
-$linkedTransaction->setContactID('00000000-0000-0000-0000-000000000000');
-
-$linkedTransactions = new XeroAPI\XeroPHP\Models\Accounting\LinkedTransactions;
-$arr_linked_transactions = [];
-array_push($arr_linked_transactions, $linkedTransaction);
-$linkedTransactions->setLinkedTransactions($arr_linked_transactions);
-
-try {
- $result = $apiInstance->updateLinkedTransaction($xeroTenantId, $linkedTransactionID, $linkedTransactions);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateLinkedTransaction: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $linkedTransactionID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a LinkedTransaction
-my $linkedTransactions = ::Object::LinkedTransactions->new(); # LinkedTransactions |
-
-eval {
- my $result = $api_instance->updateLinkedTransaction(xeroTenantId => $xeroTenantId, linkedTransactionID => $linkedTransactionID, linkedTransactions => $linkedTransactions);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateLinkedTransaction: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ updateLinkedTransaction
+ Updates a specific linked transactions (billable expenses)
+
+
+
+
+
+
+
+ /LinkedTransactions/{LinkedTransactionID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -107166,52 +38487,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateLinkedTransaction: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-linked_transaction_id = '00000000-0000-0000-0000-000000000000'
-
-linked_transaction = {
- source_line_item_id: "00000000-0000-0000-0000-000000000000",
- contactID: "00000000-0000-0000-0000-000000000000"
-}
-
-linkedTransactions = {
- linked_transactions: [linked_transaction]
-}
-
-begin
- response = xero_client.accounting_api.update_linked_transaction(xero_tenant_id, linked_transaction_id, linkedTransactions)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_linked_transaction: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- LinkedTransactionID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ LinkedTransactionID*
@@ -107237,15 +38531,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -107268,34 +38561,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- linkedTransactions *
-
-
-
-
- LinkedTransactions
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ linkedTransactions *
+
+
+
+
+ LinkedTransactions
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateManualJournal
- Updates a specific manual journal
-
-
-
-
-
-
-
- /ManualJournals/{ManualJournalID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ManualJournals/{ManualJournalID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID manualJournalID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- LocalDate dateValue = LocalDate.of(2020, Month.OCTOBER, 10);
-
- List<ManualJournalLine> manualJournalLines = new ArrayList<ManualJournalLine>();
-
- ManualJournalLine credit = new ManualJournalLine();
- credit.setLineAmount(100.0);
- credit.setAccountCode("400");
- credit.setDescription("Hello there");
- manualJournalLines.add(credit);
-
- ManualJournalLine debit = new ManualJournalLine();
- debit.setLineAmount(-100.0);
- debit.setAccountCode("120");
- debit.setDescription("Hello there");
- manualJournalLines.add(debit);
-
- ManualJournal manualJournal = new ManualJournal();
- manualJournal.setNarration("Foobar");
- manualJournal.setDate(dateValue);
- manualJournal.setJournalLines(manualJournalLines);
-
- ManualJournals manualJournals = new ManualJournals();
- manualJournals.addManualJournalsItem(manualJournal);
-
- try {
- ManualJournals result = apiInstance.updateManualJournal(accessToken, xeroTenantId, manualJournalID, manualJournals);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateManualJournal");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID manualJournalID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a ManualJournal
- ManualJournals manualJournals = { "ManualJournals": [ { "Narration": "Hello Xero", "ManualJournalID": "00000000-0000-0000-0000-000000000000", "JournalLines": [] } ] }; // ManualJournals |
- try {
- ManualJournals result = apiInstance.updateManualJournal(xeroTenantId, manualJournalID, manualJournals);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateManualJournal");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *manualJournalID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a ManualJournal (default to null)
-ManualJournals *manualJournals = { "ManualJournals": [ { "Narration": "Hello Xero", "ManualJournalID": "00000000-0000-0000-0000-000000000000", "JournalLines": [] } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific manual journal
-[apiInstance updateManualJournalWith:xeroTenantId
- manualJournalID:manualJournalID
- manualJournals:manualJournals
- completionHandler: ^(ManualJournals output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const manualJournalID = '00000000-0000-0000-0000-000000000000';
-const dateValue = '2020-10-10'
-const manualJournalLines = [];
-
-const credit: ManualJournalLine = {
- lineAmount: 100.0,
- accountCode: "400",
- description: "Hello there" };
-manualJournalLines.push(credit)
-
-const debit: ManualJournalLine = {
- lineAmount: -100.0,
- accountCode: "120",
- description: "Hello there" };
-manualJournalLines.push(debit)
-
-const manualJournal: ManualJournal = {
- narration: "Foobar",
- date: dateValue,
- manualJournalLines: manualJournalLines };
-
-const manualJournals: ManualJournals = {
- manualJournals: [manualJournal] };
-
-try {
- const response = await xero.accountingApi.updateManualJournal(xeroTenantId, manualJournalID, manualJournals);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateManualJournalExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var manualJournalID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var dateValue = new DateTime(2020, 10, 10);
- var manualJournalLines = new List<ManualJournalLine>();
-
- var credit = new ManualJournalLine();
- credit.LineAmount = new decimal(100.0);
- credit.AccountCode = "400";
- credit.Description = "Hello there";
- manualJournalLines.Add(credit);
-
- var debit = new ManualJournalLine();
- debit.LineAmount = new decimal(-100.0);
- debit.AccountCode = "120";
- debit.Description = "Hello there";
- manualJournalLines.Add(debit);
-
- var manualJournal = new ManualJournal();
- manualJournal.Narration = "Foobar";
- manualJournal.Date = dateValue;
- manualJournal.JournalLines = manualJournalLines;
-
- var manualJournals = new ManualJournals();
- var manualJournalsList = new List<ManualJournal>();
- manualJournalsList.Add(manualJournal);
- manualJournals._ManualJournals = manualJournalsList;
-
- try {
- var result = await apiInstance.UpdateManualJournalAsync(accessToken, xeroTenantId, manualJournalID, manualJournals);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateManualJournal: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$manualJournalID = "00000000-0000-0000-0000-000000000000";
-$dateValue = new DateTime('2020-10-10');
-$manualJournalLines = [];
-
-$credit = new XeroAPI\XeroPHP\Models\Accounting\ManualJournalLine;
-$credit->setLineAmount(100.0);
-$credit->setAccountCode('400');
-$credit->setDescription('Hello there');
-array_push($manualJournalLines, $credit);
-
-$debit = new XeroAPI\XeroPHP\Models\Accounting\ManualJournalLine;
-$debit->setLineAmount(-100.0);
-$debit->setAccountCode('120');
-$debit->setDescription('Hello there');
-array_push($manualJournalLines, $debit);
-
-$manualJournal = new XeroAPI\XeroPHP\Models\Accounting\ManualJournal;
-$manualJournal->setNarration('Foobar');
-$manualJournal->setDate($dateValue);
-$manualJournal->setJournalLines($manualJournalLines);
-
-$manualJournals = new XeroAPI\XeroPHP\Models\Accounting\ManualJournals;
-$arr_manual_journals = [];
-array_push($arr_manual_journals, $manualJournal);
-$manualJournals->setManualJournals($arr_manual_journals);
-
-try {
- $result = $apiInstance->updateManualJournal($xeroTenantId, $manualJournalID, $manualJournals);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateManualJournal: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $manualJournalID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a ManualJournal
-my $manualJournals = ::Object::ManualJournals->new(); # ManualJournals |
-
-eval {
- my $result = $api_instance->updateManualJournal(xeroTenantId => $xeroTenantId, manualJournalID => $manualJournalID, manualJournals => $manualJournals);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateManualJournal: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateManualJournal
+ Updates a specific manual journal
+
+
+
+
+
+
+
+ /ManualJournals/{ManualJournalID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -107826,69 +38670,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateManualJournal: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-manual_journal_id = '00000000-0000-0000-0000-000000000000'
-date_value = 'YYYY-MM-DD'
-manual_journal_lines = []
-
-credit = {
- line_amount: 100.0,
- account_code: "400",
- description: "Hello there"
-}
-manual_journal_lines << credit
-
-debit = {
- line_amount: -100.0,
- account_code: "120",
- description: "Hello there"
-}
-manual_journal_lines << debit
-
-manual_journal = {
- narration: "Foobar",
- date: date_value,
- journal_lines: manual_journal_lines
-}
-
-manualJournals = {
- manual_journals: [manual_journal]
-}
-
-begin
- response = xero_client.accounting_api.update_manual_journal(xero_tenant_id, manual_journal_id, manualJournals)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_manual_journal: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ManualJournalID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ManualJournalID*
@@ -107914,15 +38714,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -107945,34 +38744,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- manualJournals *
-
-
-
-
- ManualJournals
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ manualJournals *
+
+
+
+
+ ManualJournals
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateManualJournalAttachmentByFileName
- Updates a specific attachment from a specific manual journal by file name
-
-
-
-
-
-
-
- /ManualJournals/{ManualJournalID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ManualJournals/{ManualJournalID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID manualJournalID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.updateManualJournalAttachmentByFileName(accessToken, xeroTenantId, manualJournalID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateManualJournalAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID manualJournalID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a ManualJournal
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.updateManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateManualJournalAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *manualJournalID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a ManualJournal (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific attachment from a specific manual journal by file name
-[apiInstance updateManualJournalAttachmentByFileNameWith:xeroTenantId
- manualJournalID:manualJournalID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const manualJournalID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.updateManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateManualJournalAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var manualJournalID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.UpdateManualJournalAttachmentByFileNameAsync(accessToken, xeroTenantId, manualJournalID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateManualJournalAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$manualJournalID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->updateManualJournalAttachmentByFileName($xeroTenantId, $manualJournalID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateManualJournalAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $manualJournalID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a ManualJournal
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->updateManualJournalAttachmentByFileName(xeroTenantId => $xeroTenantId, manualJournalID => $manualJournalID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateManualJournalAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateManualJournalAttachmentByFileName
+ Updates a specific attachment from a specific manual journal by file name
+
+
+
+
+
+
+
+ /ManualJournals/{ManualJournalID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -108418,44 +38835,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateManualJournalAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-manual_journal_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.update_manual_journal_attachment_by_file_name(xero_tenant_id, manual_journal_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_manual_journal_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ManualJournalID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ManualJournalID*
@@ -108481,7 +38879,7 @@ Parameters
- FileName*
+ FileName*
@@ -108504,15 +38902,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -108535,34 +38932,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateOrCreateBankTransactions
- Updates or creates one or more spent or received money transaction
-
-
-
-
-
-
-
- /BankTransactions
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/BankTransactions?summarizeErrors=true&unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
- Integer unitdp = 4;
-
- Contact contact = new Contact();
- contact.setContactID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- LineItem lineItem = new LineItem();
- lineItem.setDescription("Foobar");
- lineItem.setQuantity(1.0);
- lineItem.setUnitAmount(20.0);
- lineItem.setAccountCode("000");
-
- List<LineItem> lineItems = new ArrayList<LineItem>();
- lineItems.add(lineItem);
-
- Account bankAccount = new Account();
- bankAccount.setAccountID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- BankTransaction bankTransaction = new BankTransaction();
- bankTransaction.setType(com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE);
- bankTransaction.setContact(contact);
- bankTransaction.setLineItems(lineItems);
- bankTransaction.setBankAccount(bankAccount);
-
- BankTransactions bankTransactions = new BankTransactions();
- bankTransactions.addBankTransactionsItem(bankTransaction);
-
- try {
- BankTransactions result = apiInstance.updateOrCreateBankTransactions(accessToken, xeroTenantId, bankTransactions, summarizeErrors, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreateBankTransactions");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- BankTransactions bankTransactions = { "BankTransactions": [ { "Type": "SPEND", "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "Lineitems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "400" } ], "BankAccount": { "Code": "088" } } ] }; // BankTransactions |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- BankTransactions result = apiInstance.updateOrCreateBankTransactions(xeroTenantId, bankTransactions, summarizeErrors, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreateBankTransactions");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-BankTransactions *bankTransactions = { "BankTransactions": [ { "Type": "SPEND", "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "Lineitems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "400" } ], "BankAccount": { "Code": "088" } } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates or creates one or more spent or received money transaction
-[apiInstance updateOrCreateBankTransactionsWith:xeroTenantId
- bankTransactions:bankTransactions
- summarizeErrors:summarizeErrors
- unitdp:unitdp
- completionHandler: ^(BankTransactions output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-const unitdp = 4;
-
-const contact: Contact = {
- contactID: "00000000-0000-0000-0000-000000000000" };
-
-const lineItem: LineItem = {
- description: "Foobar",
- quantity: 1.0,
- unitAmount: 20.0,
- accountCode: "000" };
-const lineItems = [];
-lineItems.push(lineItem)
-
-const bankAccount: Account = {
- accountID: "00000000-0000-0000-0000-000000000000" };
-
-const bankTransaction: BankTransaction = {
- type: BankTransaction.TypeEnum.RECEIVE,
- contact: contact,
- lineItems: lineItems,
- bankAccount: bankAccount };
-
-const bankTransactions: BankTransactions = {
- bankTransactions: [bankTransaction] };
-
-try {
- const response = await xero.accountingApi.updateOrCreateBankTransactions(xeroTenantId, bankTransactions, summarizeErrors, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateOrCreateBankTransactionsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
- var unitdp = 4;
-
- var contact = new Contact();
- contact.ContactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var lineItem = new LineItem();
- lineItem.Description = "Foobar";
- lineItem.Quantity = new decimal(1.0);
- lineItem.UnitAmount = new decimal(20.0);
- lineItem.AccountCode = "000";
- var lineItems = new List<LineItem>();
- lineItems.Add(lineItem);
-
- var bankAccount = new Account();
- bankAccount.AccountID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var bankTransaction = new BankTransaction();
- bankTransaction.Type = BankTransaction.TypeEnum.RECEIVE;
- bankTransaction.Contact = contact;
- bankTransaction.LineItems = lineItems;
- bankTransaction.BankAccount = bankAccount;
-
- var bankTransactions = new BankTransactions();
- var bankTransactionsList = new List<BankTransaction>();
- bankTransactionsList.Add(bankTransaction);
- bankTransactions._BankTransactions = bankTransactionsList;
-
- try {
- var result = await apiInstance.UpdateOrCreateBankTransactionsAsync(accessToken, xeroTenantId, bankTransactions, summarizeErrors, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateOrCreateBankTransactions: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-$unitdp = 4;
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setContactID('00000000-0000-0000-0000-000000000000');
-
-$lineItem = new XeroAPI\XeroPHP\Models\Accounting\LineItem;
-$lineItem->setDescription('Foobar');
-$lineItem->setQuantity(1.0);
-$lineItem->setUnitAmount(20.0);
-$lineItem->setAccountCode('000');
-$lineItems = [];
-array_push($lineItems, $lineItem);
-
-$bankAccount = new XeroAPI\XeroPHP\Models\Accounting\Account;
-$bankAccount->setAccountID('00000000-0000-0000-0000-000000000000');
-
-$bankTransaction = new XeroAPI\XeroPHP\Models\Accounting\BankTransaction;
-$bankTransaction->setType(XeroAPI\XeroPHP\Models\Accounting\BankTransaction::TYPE_RECEIVE);
-$bankTransaction->setContact($contact);
-$bankTransaction->setLineItems($lineItems);
-$bankTransaction->setBankAccount($bankAccount);
-
-$bankTransactions = new XeroAPI\XeroPHP\Models\Accounting\BankTransactions;
-$arr_bank_transactions = [];
-array_push($arr_bank_transactions, $bankTransaction);
-$bankTransactions->setBankTransactions($arr_bank_transactions);
-
-try {
- $result = $apiInstance->updateOrCreateBankTransactions($xeroTenantId, $bankTransactions, $summarizeErrors, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateOrCreateBankTransactions: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $bankTransactions = ::Object::BankTransactions->new(); # BankTransactions |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->updateOrCreateBankTransactions(xeroTenantId => $xeroTenantId, bankTransactions => $bankTransactions, summarizeErrors => $summarizeErrors, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateOrCreateBankTransactions: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateOrCreateBankTransactions
+ Updates or creates one or more spent or received money transaction
+
+
+
+
+
+
+
+ /BankTransactions
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -109107,73 +39043,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateOrCreateBankTransactions: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-unitdp = 4
-
-contact = {
- contact_id: "00000000-0000-0000-0000-000000000000"
-}
-
-line_item = {
- description: "Foobar",
- quantity: 1.0,
- unit_amount: 20.0,
- account_code: "000"
-}
-line_items = []
-line_items << line_item
-
-bank_account = {
- account_id: "00000000-0000-0000-0000-000000000000"
-}
-
-bank_transaction = {
- type: XeroRuby::Accounting::BankTransaction::RECEIVE,
- contact: contact,
- lineItems: lineItems,
- bank_account: bank_account
-}
-
-bankTransactions = {
- bank_transactions: [bank_transaction]
-}
-
-begin
- response = xero_client.accounting_api.update_or_create_bank_transactions(xero_tenant_id, bankTransactions, summarize_errors, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_or_create_bank_transactions: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -109196,34 +39084,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- bankTransactions *
-
-
-
-
- BankTransactions
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ bankTransactions *
+
+
+
+
+ BankTransactions
+
+
+
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -109275,454 +39139,62 @@ Parameters
-If false return 200 OK and mix of successfully created objects and any with validation errors
-
-
-
-
-
-
-
- unitdp
-
-
-
-
-
-
-
- Integer
-
-
-
-e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateOrCreateContacts
- Updates or creates one or more contacts in a Xero organisation
-
-
-
-
-
-
-
- /Contacts
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Contacts?summarizeErrors=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
-
- Phone phone = new Phone();
- phone.setPhoneNumber("555-1212");
- phone.setPhoneType(com.xero.models.accounting.Phone.PhoneTypeEnum.MOBILE);
-
- List<Phone> phones = new ArrayList<Phone>();
- phones.add(phone);
-
- Contact contact = new Contact();
- contact.setName("Bruce Banner");
- contact.setEmailAddress("hulk@avengers.com");
- contact.setPhones(phones);
-
- Contacts contacts = new Contacts();
- contacts.addContactsItem(contact);
-
- try {
- Contacts result = apiInstance.updateOrCreateContacts(accessToken, xeroTenantId, contacts, summarizeErrors);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreateContacts");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Contacts contacts = { "Contacts": [ { "Name": "Bruce Banner", "EmailAddress": "hulk@avengers.com", "Phones": [ { "PhoneType": "MOBILE", "PhoneNumber": "555-1212", "PhoneAreaCode": "415" } ], "PaymentTerms": { "Bills": { "Day": 15, "Type": "OFCURRENTMONTH" }, "Sales": { "Day": 10, "Type": "DAYSAFTERBILLMONTH" } } } ] }; // Contacts |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- try {
- Contacts result = apiInstance.updateOrCreateContacts(xeroTenantId, contacts, summarizeErrors);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreateContacts");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Contacts *contacts = { "Contacts": [ { "Name": "Bruce Banner", "EmailAddress": "hulk@avengers.com", "Phones": [ { "PhoneType": "MOBILE", "PhoneNumber": "555-1212", "PhoneAreaCode": "415" } ], "PaymentTerms": { "Bills": { "Day": 15, "Type": "OFCURRENTMONTH" }, "Sales": { "Day": 10, "Type": "DAYSAFTERBILLMONTH" } } } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates or creates one or more contacts in a Xero organisation
-[apiInstance updateOrCreateContactsWith:xeroTenantId
- contacts:contacts
- summarizeErrors:summarizeErrors
- completionHandler: ^(Contacts output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-
-const phone: Phone = {
- phoneNumber: "555-1212",
- phoneType: Phone.PhoneTypeEnum.MOBILE };
-const phones = [];
-phones.push(phone)
-
-const contact: Contact = {
- name: "Bruce Banner",
- emailAddress: "hulk@avengers.com",
- phones: phones };
-
-const contacts: Contacts = {
- contacts: [contact] };
-
-try {
- const response = await xero.accountingApi.updateOrCreateContacts(xeroTenantId, contacts, summarizeErrors);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateOrCreateContactsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
-
- var phone = new Phone();
- phone.PhoneNumber = "555-1212";
- phone.PhoneType = Phone.PhoneTypeEnum.MOBILE;
- var phones = new List<Phone>();
- phones.Add(phone);
-
- var contact = new Contact();
- contact.Name = "Bruce Banner";
- contact.EmailAddress = "hulk@avengers.com";
- contact.Phones = phones;
-
- var contacts = new Contacts();
- var contactsList = new List<Contact>();
- contactsList.Add(contact);
- contacts._Contacts = contactsList;
-
- try {
- var result = await apiInstance.UpdateOrCreateContactsAsync(accessToken, xeroTenantId, contacts, summarizeErrors);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateOrCreateContacts: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-
-$phone = new XeroAPI\XeroPHP\Models\Accounting\Phone;
-$phone->setPhoneNumber('555-1212');
-$phone->setPhoneType(XeroAPI\XeroPHP\Models\Accounting\Phone::PHONE_TYPE_MOBILE);
-$phones = [];
-array_push($phones, $phone);
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setName('Bruce Banner');
-$contact->setEmailAddress('hulk@avengers.com');
-$contact->setPhones($phones);
-
-$contacts = new XeroAPI\XeroPHP\Models\Accounting\Contacts;
-$arr_contacts = [];
-array_push($arr_contacts, $contact);
-$contacts->setContacts($arr_contacts);
-
-try {
- $result = $apiInstance->updateOrCreateContacts($xeroTenantId, $contacts, $summarizeErrors);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateOrCreateContacts: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $contacts = ::Object::Contacts->new(); # Contacts |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-
-eval {
- my $result = $api_instance->updateOrCreateContacts(xeroTenantId => $xeroTenantId, contacts => $contacts, summarizeErrors => $summarizeErrors);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateOrCreateContacts: $@\n";
-}
-
+If false return 200 OK and mix of successfully created objects and any with validation errors
+
+
+
+
+
+
+
+ unitdp
+
+
+
+
+
+
+
+ Integer
+
+
+
+e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
+
+
+
+
+
+
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ updateOrCreateContacts
+ Updates or creates one or more contacts in a Xero organisation
+
+
+
+
+
+
+
+ /Contacts
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -109760,61 +39232,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateOrCreateContacts: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-
-phone = {
- phone_number: "555-1212",
- phone_type: XeroRuby::Accounting::PhoneType::MOBILE
-}
-phones = []
-phones << phone
-
-contact = {
- name: "Bruce Banner",
- email_address: "hulk@avengers.com",
- phones: phones
-}
-
-contacts = {
- contacts: [contact]
-}
-
-begin
- response = xero_client.accounting_api.update_or_create_contacts(xero_tenant_id, contacts, summarize_errors)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_or_create_contacts: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.contacts
- Grant read-write access to contacts and contact groups
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.contacts
+ Grant read-write access to contacts and contact groups
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -109837,34 +39273,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- contacts *
-
-
-
-
- Contacts
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ contacts *
+
+
+
+
+ Contacts
+
+
+
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -109924,463 +39336,34 @@ Parameters
-
-
-
-
-
-
-
-
- updateOrCreateCreditNotes
- Updates or creates one or more credit notes
-
-
-
-
-
-
-
- /CreditNotes
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/CreditNotes?summarizeErrors=true&unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
- Integer unitdp = 4;
- LocalDate currDate = LocalDate.now();
-
- Contact contact = new Contact();
- contact.setContactID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- LineItem lineItem = new LineItem();
- lineItem.setDescription("Foobar");
- lineItem.setQuantity(1.0);
- lineItem.setUnitAmount(20.0);
- lineItem.setAccountCode("000");
-
- List<LineItem> lineItems = new ArrayList<LineItem>();
- lineItems.add(lineItem);
-
- CreditNote creditNote = new CreditNote();
- creditNote.setType(com.xero.models.accounting.CreditNote.TypeEnum.ACCPAYCREDIT);
- creditNote.setContact(contact);
- creditNote.setDate(currDate);
- creditNote.setLineItems(lineItems);
-
- CreditNotes creditNotes = new CreditNotes();
- creditNotes.addCreditNotesItem(creditNote);
-
- try {
- CreditNotes result = apiInstance.updateOrCreateCreditNotes(accessToken, xeroTenantId, creditNotes, summarizeErrors, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreateCreditNotes");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- CreditNotes creditNotes = { "CreditNotes":[ { "Type":"ACCPAYCREDIT", "Contact":{ "ContactID":"430fa14a-f945-44d3-9f97-5df5e28441b8" }, "Date":"2019-01-05", "Status":"AUTHORISED", "Reference": "HelloWorld", "LineItems":[ { "Description":"Foobar", "Quantity":2.0, "UnitAmount":20.0, "AccountCode":"400" } ] } ] }; // CreditNotes |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- CreditNotes result = apiInstance.updateOrCreateCreditNotes(xeroTenantId, creditNotes, summarizeErrors, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreateCreditNotes");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-CreditNotes *creditNotes = { "CreditNotes":[ { "Type":"ACCPAYCREDIT", "Contact":{ "ContactID":"430fa14a-f945-44d3-9f97-5df5e28441b8" }, "Date":"2019-01-05", "Status":"AUTHORISED", "Reference": "HelloWorld", "LineItems":[ { "Description":"Foobar", "Quantity":2.0, "UnitAmount":20.0, "AccountCode":"400" } ] } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates or creates one or more credit notes
-[apiInstance updateOrCreateCreditNotesWith:xeroTenantId
- creditNotes:creditNotes
- summarizeErrors:summarizeErrors
- unitdp:unitdp
- completionHandler: ^(CreditNotes output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-const unitdp = 4;
-const currDate = '2020-12-10'
-
-const contact: Contact = {
- contactID: "00000000-0000-0000-0000-000000000000" };
-
-const lineItem: LineItem = {
- description: "Foobar",
- quantity: 1.0,
- unitAmount: 20.0,
- accountCode: "000" };
-const lineItems = [];
-lineItems.push(lineItem)
-
-const creditNote: CreditNote = {
- type: CreditNote.TypeEnum.ACCPAYCREDIT,
- contact: contact,
- date: currDate,
- lineItems: lineItems };
-
-const creditNotes: CreditNotes = {
- creditNotes: [creditNote] };
-
-try {
- const response = await xero.accountingApi.updateOrCreateCreditNotes(xeroTenantId, creditNotes, summarizeErrors, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateOrCreateCreditNotesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
- var unitdp = 4;
- var currDate = DateTime.Now;
-
- var contact = new Contact();
- contact.ContactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var lineItem = new LineItem();
- lineItem.Description = "Foobar";
- lineItem.Quantity = new decimal(1.0);
- lineItem.UnitAmount = new decimal(20.0);
- lineItem.AccountCode = "000";
- var lineItems = new List<LineItem>();
- lineItems.Add(lineItem);
-
- var creditNote = new CreditNote();
- creditNote.Type = CreditNote.TypeEnum.ACCPAYCREDIT;
- creditNote.Contact = contact;
- creditNote.Date = currDate;
- creditNote.LineItems = lineItems;
-
- var creditNotes = new CreditNotes();
- var creditNotesList = new List<CreditNote>();
- creditNotesList.Add(creditNote);
- creditNotes._CreditNotes = creditNotesList;
-
- try {
- var result = await apiInstance.UpdateOrCreateCreditNotesAsync(accessToken, xeroTenantId, creditNotes, summarizeErrors, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateOrCreateCreditNotes: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-$unitdp = 4;
-$currDate = new DateTime('2020-12-10');
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setContactID('00000000-0000-0000-0000-000000000000');
-
-$lineItem = new XeroAPI\XeroPHP\Models\Accounting\LineItem;
-$lineItem->setDescription('Foobar');
-$lineItem->setQuantity(1.0);
-$lineItem->setUnitAmount(20.0);
-$lineItem->setAccountCode('000');
-$lineItems = [];
-array_push($lineItems, $lineItem);
-
-$creditNote = new XeroAPI\XeroPHP\Models\Accounting\CreditNote;
-$creditNote->setType(XeroAPI\XeroPHP\Models\Accounting\CreditNote::TYPE_ACCPAYCREDIT);
-$creditNote->setContact($contact);
-$creditNote->setDate($currDate);
-$creditNote->setLineItems($lineItems);
-
-$creditNotes = new XeroAPI\XeroPHP\Models\Accounting\CreditNotes;
-$arr_credit_notes = [];
-array_push($arr_credit_notes, $creditNote);
-$creditNotes->setCreditNotes($arr_credit_notes);
-
-try {
- $result = $apiInstance->updateOrCreateCreditNotes($xeroTenantId, $creditNotes, $summarizeErrors, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateOrCreateCreditNotes: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $creditNotes = ::Object::CreditNotes->new(); # CreditNotes |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->updateOrCreateCreditNotes(xeroTenantId => $xeroTenantId, creditNotes => $creditNotes, summarizeErrors => $summarizeErrors, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateOrCreateCreditNotes: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ updateOrCreateCreditNotes
+ Updates or creates one or more credit notes
+
+
+
+
+
+
+
+ /CreditNotes
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -110425,70 +39408,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateOrCreateCreditNotes: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-unitdp = 4
-curr_date = 'YYYY-MM-DD'
-
-contact = {
- contact_id: "00000000-0000-0000-0000-000000000000"
-}
-
-line_item = {
- description: "Foobar",
- quantity: 1.0,
- unit_amount: 20.0,
- account_code: "000"
-}
-line_items = []
-line_items << line_item
-
-credit_note = {
- type: XeroRuby::Accounting::CreditNote::ACCPAYCREDIT,
- contact: contact,
- date: curr_date,
- line_items: line_items
-}
-
-creditNotes = {
- credit_notes: [credit_note]
-}
-
-begin
- response = xero_client.accounting_api.update_or_create_credit_notes(xero_tenant_id, creditNotes, summarize_errors, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_or_create_credit_notes: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -110511,34 +39449,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- creditNotes *
-
-
-
-
- CreditNotes
-
-
-
-an array of Credit Notes with a single CreditNote object.
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ creditNotes *
+
+
+
+
+ CreditNotes
+
+
+ an array of Credit Notes with a single CreditNote object.
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -110599,7 +39513,7 @@ Parameters
- unitdp
+ unitdp
@@ -110619,397 +39533,34 @@ Parameters
-
-
-
-
-
-
-
-
- updateOrCreateEmployees
- Creates a single new employees used in Xero payrun
-
-
-
-
-
-
-
- /Employees
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Employees?summarizeErrors=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
-
- Employee employee = new Employee();
- employee.setFirstName("Nick");
- employee.setLastName("Fury");
-
- Employees employees = new Employees();
- employees.addEmployeesItem(employee);
-
- try {
- Employees result = apiInstance.updateOrCreateEmployees(accessToken, xeroTenantId, employees, summarizeErrors);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreateEmployees");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Employees employees = { "Employees": [ { "FirstName": "Nick", "LastName": "Fury", "ExternalLink": { "Url": "http://twitter.com/#!/search/Nick+Fury" } } ] }; // Employees |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- try {
- Employees result = apiInstance.updateOrCreateEmployees(xeroTenantId, employees, summarizeErrors);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreateEmployees");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Employees *employees = { "Employees": [ { "FirstName": "Nick", "LastName": "Fury", "ExternalLink": { "Url": "http://twitter.com/#!/search/Nick+Fury" } } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Creates a single new employees used in Xero payrun
-[apiInstance updateOrCreateEmployeesWith:xeroTenantId
- employees:employees
- summarizeErrors:summarizeErrors
- completionHandler: ^(Employees output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-
-const employee: Employee = {
- firstName: "Nick",
- lastName: "Fury" };
-
-const employees: Employees = {
- employees: [employee] };
-
-try {
- const response = await xero.accountingApi.updateOrCreateEmployees(xeroTenantId, employees, summarizeErrors);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateOrCreateEmployeesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
-
- var employee = new Employee();
- employee.FirstName = "Nick";
- employee.LastName = "Fury";
-
- var employees = new Employees();
- var employeesList = new List<Employee>();
- employeesList.Add(employee);
- employees._Employees = employeesList;
-
- try {
- var result = await apiInstance.UpdateOrCreateEmployeesAsync(accessToken, xeroTenantId, employees, summarizeErrors);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateOrCreateEmployees: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-
-$employee = new XeroAPI\XeroPHP\Models\Accounting\Employee;
-$employee->setFirstName('Nick');
-$employee->setLastName('Fury');
-
-$employees = new XeroAPI\XeroPHP\Models\Accounting\Employees;
-$arr_employees = [];
-array_push($arr_employees, $employee);
-$employees->setEmployees($arr_employees);
-
-try {
- $result = $apiInstance->updateOrCreateEmployees($xeroTenantId, $employees, $summarizeErrors);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateOrCreateEmployees: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $employees = ::Object::Employees->new(); # Employees |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-
-eval {
- my $result = $api_instance->updateOrCreateEmployees(xeroTenantId => $xeroTenantId, employees => $employees, summarizeErrors => $summarizeErrors);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateOrCreateEmployees: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ updateOrCreateEmployees
+ Creates a single new employees used in Xero payrun
+
+
+
+
+
+
+
+ /Employees
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -111039,53 +39590,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateOrCreateEmployees: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-
-employee = {
- first_name: "Nick",
- last_name: "Fury"
-}
-
-employees = {
- employees: [employee]
-}
-
-begin
- response = xero_client.accounting_api.update_or_create_employees(xero_tenant_id, employees, summarize_errors)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_or_create_employees: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -111108,34 +39631,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- employees *
-
-
-
-
- Employees
-
-
-
-Employees with array of Employee object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ employees *
+
+
+
+
+ Employees
+
+
+ Employees with array of Employee object in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -111196,478 +39695,34 @@ Parameters
-
-
-
-
-
-
-
-
- updateOrCreateInvoices
- Updates or creates one or more sales invoices or purchase bills
-
-
-
-
-
-
-
- /Invoices
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Invoices?summarizeErrors=true&unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
- Integer unitdp = 4;
- LocalDate dateValue = LocalDate.of(2020, Month.OCTOBER, 10);
- LocalDate dueDateValue = LocalDate.of(2020, Month.OCTOBER, 28);
-
- Contact contact = new Contact();
- contact.setContactID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- LineItem lineItem = new LineItem();
- lineItem.setDescription("Foobar");
- lineItem.setQuantity(1.0);
- lineItem.setUnitAmount(20.0);
- lineItem.setAccountCode("000");
-
- List<LineItem> lineItems = new ArrayList<LineItem>();
- lineItems.add(lineItem);
-
- Invoice invoice = new Invoice();
- invoice.setType(com.xero.models.accounting.Invoice.TypeEnum.ACCREC);
- invoice.setContact(contact);
- invoice.setDate(dateValue);
- invoice.setDate(dueDateValue);
- invoice.setLineItems(lineItems);
- invoice.setReference("Website Design");
- invoice.setStatus(com.xero.models.accounting.Invoice.StatusEnum.DRAFT);
-
- Invoices invoices = new Invoices();
- invoices.addInvoicesItem(invoice);
-
- try {
- Invoices result = apiInstance.updateOrCreateInvoices(accessToken, xeroTenantId, invoices, summarizeErrors, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreateInvoices");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Invoices invoices = { "Invoices": [ { "Type": "ACCREC", "Contact": { "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8" }, "LineItems": [ { "Description": "Acme Tires", "Quantity": 2, "UnitAmount": 20, "AccountCode": "200", "TaxType": "NONE", "LineAmount": 40 } ], "Date": "2019-03-11", "DueDate": "2018-12-10", "Reference": "Website Design", "Status": "AUTHORISED" } ] }; // Invoices |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- Invoices result = apiInstance.updateOrCreateInvoices(xeroTenantId, invoices, summarizeErrors, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreateInvoices");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Invoices *invoices = { "Invoices": [ { "Type": "ACCREC", "Contact": { "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8" }, "LineItems": [ { "Description": "Acme Tires", "Quantity": 2, "UnitAmount": 20, "AccountCode": "200", "TaxType": "NONE", "LineAmount": 40 } ], "Date": "2019-03-11", "DueDate": "2018-12-10", "Reference": "Website Design", "Status": "AUTHORISED" } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates or creates one or more sales invoices or purchase bills
-[apiInstance updateOrCreateInvoicesWith:xeroTenantId
- invoices:invoices
- summarizeErrors:summarizeErrors
- unitdp:unitdp
- completionHandler: ^(Invoices output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-const unitdp = 4;
-const dateValue = '2020-10-10'
-const dueDateValue = '2020-10-28'
-
-const contact: Contact = {
- contactID: "00000000-0000-0000-0000-000000000000" };
-
-const lineItem: LineItem = {
- description: "Foobar",
- quantity: 1.0,
- unitAmount: 20.0,
- accountCode: "000" };
-const lineItems = [];
-lineItems.push(lineItem)
-
-const invoice: Invoice = {
- type: Invoice.TypeEnum.ACCREC,
- contact: contact,
- date: dateValue,
- dueDate: dueDateValue,
- lineItems: lineItems,
- reference: "Website Design",
- status: Invoice.StatusEnum.DRAFT };
-
-const invoices: Invoices = {
- invoices: [invoice] };
-
-try {
- const response = await xero.accountingApi.updateOrCreateInvoices(xeroTenantId, invoices, summarizeErrors, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateOrCreateInvoicesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
- var unitdp = 4;
- var dateValue = new DateTime(2020, 10, 10);
- var dueDateValue = new DateTime(2020, 10, 10);
-
- var contact = new Contact();
- contact.ContactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var lineItem = new LineItem();
- lineItem.Description = "Foobar";
- lineItem.Quantity = new decimal(1.0);
- lineItem.UnitAmount = new decimal(20.0);
- lineItem.AccountCode = "000";
- var lineItems = new List<LineItem>();
- lineItems.Add(lineItem);
-
- var invoice = new Invoice();
- invoice.Type = Invoice.TypeEnum.ACCREC;
- invoice.Contact = contact;
- invoice.Date = dateValue;
- invoice.Date = dueDateValue;
- invoice.LineItems = lineItems;
- invoice.Reference = "Website Design";
- invoice.Status = Invoice.StatusEnum.DRAFT;
-
- var invoices = new Invoices();
- var invoicesList = new List<Invoice>();
- invoicesList.Add(invoice);
- invoices._Invoices = invoicesList;
-
- try {
- var result = await apiInstance.UpdateOrCreateInvoicesAsync(accessToken, xeroTenantId, invoices, summarizeErrors, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateOrCreateInvoices: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-$unitdp = 4;
-$dateValue = new DateTime('2020-10-10');
-$dueDateValue = new DateTime('2020-10-28');
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setContactID('00000000-0000-0000-0000-000000000000');
-
-$lineItem = new XeroAPI\XeroPHP\Models\Accounting\LineItem;
-$lineItem->setDescription('Foobar');
-$lineItem->setQuantity(1.0);
-$lineItem->setUnitAmount(20.0);
-$lineItem->setAccountCode('000');
-$lineItems = [];
-array_push($lineItems, $lineItem);
-
-$invoice = new XeroAPI\XeroPHP\Models\Accounting\Invoice;
-$invoice->setType(XeroAPI\XeroPHP\Models\Accounting\Invoice::TYPE_ACCREC);
-$invoice->setContact($contact);
-$invoice->setDate($dateValue);
-$invoice->setDate($dueDateValue);
-$invoice->setLineItems($lineItems);
-$invoice->setReference('Website Design');
-$invoice->setStatus(XeroAPI\XeroPHP\Models\Accounting\Invoice::STATUS_DRAFT);
-
-$invoices = new XeroAPI\XeroPHP\Models\Accounting\Invoices;
-$arr_invoices = [];
-array_push($arr_invoices, $invoice);
-$invoices->setInvoices($arr_invoices);
-
-try {
- $result = $apiInstance->updateOrCreateInvoices($xeroTenantId, $invoices, $summarizeErrors, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateOrCreateInvoices: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $invoices = ::Object::Invoices->new(); # Invoices |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->updateOrCreateInvoices(xeroTenantId => $xeroTenantId, invoices => $invoices, summarizeErrors => $summarizeErrors, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateOrCreateInvoices: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ updateOrCreateInvoices
+ Updates or creates one or more sales invoices or purchase bills
+
+
+
+
+
+
+
+ /Invoices
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -111716,74 +39771,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateOrCreateInvoices: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-unitdp = 4
-date_value = 'YYYY-MM-DD'
-due_date_value = 'YYYY-MM-DD'
-
-contact = {
- contact_id: "00000000-0000-0000-0000-000000000000"
-}
-
-line_item = {
- description: "Foobar",
- quantity: 1.0,
- unit_amount: 20.0,
- account_code: "000"
-}
-line_items = []
-line_items << line_item
-
-invoice = {
- type: XeroRuby::Accounting::Invoice::ACCREC,
- contact: contact,
- date: date_value,
- due_date: due_date_value,
- line_items: line_items,
- reference: "Website Design",
- status: XeroRuby::Accounting::Invoice::DRAFT
-}
-
-invoices = {
- invoices: [invoice]
-}
-
-begin
- response = xero_client.accounting_api.update_or_create_invoices(xero_tenant_id, invoices, summarize_errors, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_or_create_invoices: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -111806,34 +39812,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- invoices *
-
-
-
-
- Invoices
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ invoices *
+
+
+
+
+ Invoices
+
+
+
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -111893,7 +39875,7 @@ Parameters
- unitdp
+ unitdp
@@ -111913,409 +39895,34 @@ Parameters
-
-
-
-
-
-
-
-
- updateOrCreateItems
- Updates or creates one or more items
-
-
-
-
-
-
-
- /Items
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Items?summarizeErrors=true&unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
- Integer unitdp = 4;
-
- Item item = new Item();
- item.setCode("abcXYZ123");
- item.setName("HelloWorld");
- item.setDescription("Foobar");
-
- Items items = new Items();
- items.addItemsItem(item);
-
- try {
- Items result = apiInstance.updateOrCreateItems(accessToken, xeroTenantId, items, summarizeErrors, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreateItems");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Items items = { "Items": [ { "Code": "ItemCode123", "Name": "ItemName XYZ", "Description": "Item Description ABC" } ] }; // Items |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- Items result = apiInstance.updateOrCreateItems(xeroTenantId, items, summarizeErrors, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreateItems");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Items *items = { "Items": [ { "Code": "ItemCode123", "Name": "ItemName XYZ", "Description": "Item Description ABC" } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates or creates one or more items
-[apiInstance updateOrCreateItemsWith:xeroTenantId
- items:items
- summarizeErrors:summarizeErrors
- unitdp:unitdp
- completionHandler: ^(Items output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-const unitdp = 4;
-
-const item: Item = {
- code: "abcXYZ123",
- name: "HelloWorld",
- description: "Foobar" };
-
-const items: Items = {
- items: [item] };
-
-try {
- const response = await xero.accountingApi.updateOrCreateItems(xeroTenantId, items, summarizeErrors, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateOrCreateItemsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
- var unitdp = 4;
-
- var item = new Item();
- item.Code = "abcXYZ123";
- item.Name = "HelloWorld";
- item.Description = "Foobar";
-
- var items = new Items();
- var itemsList = new List<Item>();
- itemsList.Add(item);
- items._Items = itemsList;
-
- try {
- var result = await apiInstance.UpdateOrCreateItemsAsync(accessToken, xeroTenantId, items, summarizeErrors, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateOrCreateItems: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-$unitdp = 4;
-
-$item = new XeroAPI\XeroPHP\Models\Accounting\Item;
-$item->setCode('abcXYZ123');
-$item->setName('HelloWorld');
-$item->setDescription('Foobar');
-
-$items = new XeroAPI\XeroPHP\Models\Accounting\Items;
-$arr_items = [];
-array_push($arr_items, $item);
-$items->setItems($arr_items);
-
-try {
- $result = $apiInstance->updateOrCreateItems($xeroTenantId, $items, $summarizeErrors, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateOrCreateItems: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $items = ::Object::Items->new(); # Items |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->updateOrCreateItems(xeroTenantId => $xeroTenantId, items => $items, summarizeErrors => $summarizeErrors, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateOrCreateItems: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ updateOrCreateItems
+ Updates or creates one or more items
+
+
+
+
+
+
+
+ /Items
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -112346,55 +39953,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateOrCreateItems: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-unitdp = 4
-
-item = {
- code: "abcXYZ123",
- name: "HelloWorld",
- description: "Foobar"
-}
-
-items = {
- items: [item]
-}
-
-begin
- response = xero_client.accounting_api.update_or_create_items(xero_tenant_id, items, summarize_errors, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_or_create_items: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -112417,34 +39994,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- items *
-
-
-
-
- Items
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ items *
+
+
+
+
+ Items
+
+
+
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -112504,7 +40057,7 @@ Parameters
- unitdp
+ unitdp
@@ -112524,458 +40077,34 @@ Parameters
-
-
-
-
-
-
-
-
- updateOrCreateManualJournals
- Updates or creates a single manual journal
-
-
-
-
-
-
-
- /ManualJournals
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/ManualJournals?summarizeErrors=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
- LocalDate dateValue = LocalDate.of(2020, Month.OCTOBER, 10);
-
- List<ManualJournalLine> manualJournalLines = new ArrayList<ManualJournalLine>();
-
- ManualJournalLine credit = new ManualJournalLine();
- credit.setLineAmount(100.0);
- credit.setAccountCode("400");
- credit.setDescription("Hello there");
- manualJournalLines.add(credit);
-
- ManualJournalLine debit = new ManualJournalLine();
- debit.setLineAmount(-100.0);
- debit.setAccountCode("120");
- debit.setDescription("Hello there");
- manualJournalLines.add(debit);
-
- ManualJournal manualJournal = new ManualJournal();
- manualJournal.setNarration("Foobar");
- manualJournal.setDate(dateValue);
- manualJournal.setJournalLines(manualJournalLines);
-
- ManualJournals manualJournals = new ManualJournals();
- manualJournals.addManualJournalsItem(manualJournal);
-
- try {
- ManualJournals result = apiInstance.updateOrCreateManualJournals(accessToken, xeroTenantId, manualJournals, summarizeErrors);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreateManualJournals");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- ManualJournals manualJournals = { "ManualJournals": [ { "Narration": "Journal Desc", "JournalLines": [ { "LineAmount": 100, "AccountCode": "400", "Description": "Money Movement" }, { "LineAmount": -100, "AccountCode": "400", "Description": "Prepayment of things", "Tracking": [ { "Name": "North", "Option": "Region" } ] } ], "Date": "2019-03-14" } ] }; // ManualJournals |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- try {
- ManualJournals result = apiInstance.updateOrCreateManualJournals(xeroTenantId, manualJournals, summarizeErrors);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreateManualJournals");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-ManualJournals *manualJournals = { "ManualJournals": [ { "Narration": "Journal Desc", "JournalLines": [ { "LineAmount": 100, "AccountCode": "400", "Description": "Money Movement" }, { "LineAmount": -100, "AccountCode": "400", "Description": "Prepayment of things", "Tracking": [ { "Name": "North", "Option": "Region" } ] } ], "Date": "2019-03-14" } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates or creates a single manual journal
-[apiInstance updateOrCreateManualJournalsWith:xeroTenantId
- manualJournals:manualJournals
- summarizeErrors:summarizeErrors
- completionHandler: ^(ManualJournals output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-const dateValue = '2020-10-10'
-const manualJournalLines = [];
-
-const credit: ManualJournalLine = {
- lineAmount: 100.0,
- accountCode: "400",
- description: "Hello there" };
-manualJournalLines.push(credit)
-
-const debit: ManualJournalLine = {
- lineAmount: -100.0,
- accountCode: "120",
- description: "Hello there" };
-manualJournalLines.push(debit)
-
-const manualJournal: ManualJournal = {
- narration: "Foobar",
- date: dateValue,
- manualJournalLines: manualJournalLines };
-
-const manualJournals: ManualJournals = {
- manualJournals: [manualJournal] };
-
-try {
- const response = await xero.accountingApi.updateOrCreateManualJournals(xeroTenantId, manualJournals, summarizeErrors);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateOrCreateManualJournalsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
- var dateValue = new DateTime(2020, 10, 10);
- var manualJournalLines = new List<ManualJournalLine>();
-
- var credit = new ManualJournalLine();
- credit.LineAmount = new decimal(100.0);
- credit.AccountCode = "400";
- credit.Description = "Hello there";
- manualJournalLines.Add(credit);
-
- var debit = new ManualJournalLine();
- debit.LineAmount = new decimal(-100.0);
- debit.AccountCode = "120";
- debit.Description = "Hello there";
- manualJournalLines.Add(debit);
-
- var manualJournal = new ManualJournal();
- manualJournal.Narration = "Foobar";
- manualJournal.Date = dateValue;
- manualJournal.JournalLines = manualJournalLines;
-
- var manualJournals = new ManualJournals();
- var manualJournalsList = new List<ManualJournal>();
- manualJournalsList.Add(manualJournal);
- manualJournals._ManualJournals = manualJournalsList;
-
- try {
- var result = await apiInstance.UpdateOrCreateManualJournalsAsync(accessToken, xeroTenantId, manualJournals, summarizeErrors);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateOrCreateManualJournals: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-$dateValue = new DateTime('2020-10-10');
-$manualJournalLines = [];
-
-$credit = new XeroAPI\XeroPHP\Models\Accounting\ManualJournalLine;
-$credit->setLineAmount(100.0);
-$credit->setAccountCode('400');
-$credit->setDescription('Hello there');
-array_push($manualJournalLines, $credit);
-
-$debit = new XeroAPI\XeroPHP\Models\Accounting\ManualJournalLine;
-$debit->setLineAmount(-100.0);
-$debit->setAccountCode('120');
-$debit->setDescription('Hello there');
-array_push($manualJournalLines, $debit);
-
-$manualJournal = new XeroAPI\XeroPHP\Models\Accounting\ManualJournal;
-$manualJournal->setNarration('Foobar');
-$manualJournal->setDate($dateValue);
-$manualJournal->setJournalLines($manualJournalLines);
-
-$manualJournals = new XeroAPI\XeroPHP\Models\Accounting\ManualJournals;
-$arr_manual_journals = [];
-array_push($arr_manual_journals, $manualJournal);
-$manualJournals->setManualJournals($arr_manual_journals);
-
-try {
- $result = $apiInstance->updateOrCreateManualJournals($xeroTenantId, $manualJournals, $summarizeErrors);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateOrCreateManualJournals: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $manualJournals = ::Object::ManualJournals->new(); # ManualJournals |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-
-eval {
- my $result = $api_instance->updateOrCreateManualJournals(xeroTenantId => $xeroTenantId, manualJournals => $manualJournals, summarizeErrors => $summarizeErrors);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateOrCreateManualJournals: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ updateOrCreateManualJournals
+ Updates or creates a single manual journal
+
+
+
+
+
+
+
+ /ManualJournals
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -113021,70 +40150,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateOrCreateManualJournals: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-date_value = 'YYYY-MM-DD'
-manual_journal_lines = []
-
-credit = {
- line_amount: 100.0,
- account_code: "400",
- description: "Hello there"
-}
-manual_journal_lines << credit
-
-debit = {
- line_amount: -100.0,
- account_code: "120",
- description: "Hello there"
-}
-manual_journal_lines << debit
-
-manual_journal = {
- narration: "Foobar",
- date: date_value,
- journal_lines: manual_journal_lines
-}
-
-manualJournals = {
- manual_journals: [manual_journal]
-}
-
-begin
- response = xero_client.accounting_api.update_or_create_manual_journals(xero_tenant_id, manualJournals, summarize_errors)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_or_create_manual_journals: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -113107,34 +40191,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- manualJournals *
-
-
-
-
- ManualJournals
-
-
-
-ManualJournals array with ManualJournal object in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ manualJournals *
+
+
+
+
+ ManualJournals
+
+
+ ManualJournals array with ManualJournal object in body of request
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -113195,450 +40255,34 @@ Parameters
-
-
-
-
-
-
-
-
- updateOrCreatePurchaseOrders
- Updates or creates one or more purchase orders
-
-
-
-
-
-
-
- /PurchaseOrders
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/PurchaseOrders?summarizeErrors=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
- LocalDate dateValue = LocalDate.of(2020, Month.OCTOBER, 10);
-
- Contact contact = new Contact();
- contact.setContactID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- LineItem lineItem = new LineItem();
- lineItem.setDescription("Foobar");
- lineItem.setQuantity(1.0);
- lineItem.setUnitAmount(20.0);
- lineItem.setAccountCode("000");
-
- List<LineItem> lineItems = new ArrayList<LineItem>();
- lineItems.add(lineItem);
-
- PurchaseOrder purchaseOrder = new PurchaseOrder();
- purchaseOrder.setContact(contact);
- purchaseOrder.setLineItems(lineItems);
- purchaseOrder.setDate(dateValue);
-
- PurchaseOrders purchaseOrders = new PurchaseOrders();
- purchaseOrders.addPurchaseOrdersItem(purchaseOrder);
-
- try {
- PurchaseOrders result = apiInstance.updateOrCreatePurchaseOrders(accessToken, xeroTenantId, purchaseOrders, summarizeErrors);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreatePurchaseOrders");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- PurchaseOrders purchaseOrders = { "PurchaseOrders": [ { "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "710" } ], "Date": "2019-03-13" } ] }; // PurchaseOrders |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- try {
- PurchaseOrders result = apiInstance.updateOrCreatePurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreatePurchaseOrders");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-PurchaseOrders *purchaseOrders = { "PurchaseOrders": [ { "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "710" } ], "Date": "2019-03-13" } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates or creates one or more purchase orders
-[apiInstance updateOrCreatePurchaseOrdersWith:xeroTenantId
- purchaseOrders:purchaseOrders
- summarizeErrors:summarizeErrors
- completionHandler: ^(PurchaseOrders output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-const dateValue = '2020-10-10'
-
-const contact: Contact = {
- contactID: "00000000-0000-0000-0000-000000000000" };
-
-const lineItem: LineItem = {
- description: "Foobar",
- quantity: 1.0,
- unitAmount: 20.0,
- accountCode: "000" };
-const lineItems = [];
-lineItems.push(lineItem)
-
-const purchaseOrder: PurchaseOrder = {
- contact: contact,
- lineItems: lineItems,
- date: dateValue };
-
-const purchaseOrders: PurchaseOrders = {
- purchaseOrders: [purchaseOrder] };
-
-try {
- const response = await xero.accountingApi.updateOrCreatePurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateOrCreatePurchaseOrdersExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
- var dateValue = DateTime.Now;
-
- var contact = new Contact();
- contact.ContactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var lineItem = new LineItem();
- lineItem.Description = "Foobar";
- lineItem.Quantity = new decimal(1.0);
- lineItem.UnitAmount = new decimal(20.0);
- lineItem.AccountCode = "000";
- var lineItems = new List<LineItem>();
- lineItems.Add(lineItem);
-
- var purchaseOrder = new PurchaseOrder();
- purchaseOrder.Contact = contact;
- purchaseOrder.LineItems = lineItems;
- purchaseOrder.Date = dateValue;
-
- var purchaseOrders = new PurchaseOrders();
- var purchaseOrdersList = new List<PurchaseOrder>();
- purchaseOrdersList.Add(purchaseOrder);
- purchaseOrders._PurchaseOrders = purchaseOrdersList;
-
- try {
- var result = await apiInstance.UpdateOrCreatePurchaseOrdersAsync(accessToken, xeroTenantId, purchaseOrders, summarizeErrors);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateOrCreatePurchaseOrders: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-$dateValue = new DateTime('2020-12-10');
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setContactID('00000000-0000-0000-0000-000000000000');
-
-$lineItem = new XeroAPI\XeroPHP\Models\Accounting\LineItem;
-$lineItem->setDescription('Foobar');
-$lineItem->setQuantity(1.0);
-$lineItem->setUnitAmount(20.0);
-$lineItem->setAccountCode('000');
-$lineItems = [];
-array_push($lineItems, $lineItem);
-
-$purchaseOrder = new XeroAPI\XeroPHP\Models\Accounting\PurchaseOrder;
-$purchaseOrder->setContact($contact);
-$purchaseOrder->setLineItems($lineItems);
-$purchaseOrder->setDate($dateValue);
-
-$purchaseOrders = new XeroAPI\XeroPHP\Models\Accounting\PurchaseOrders;
-$arr_purchase_orders = [];
-array_push($arr_purchase_orders, $purchaseOrder);
-$purchaseOrders->setPurchaseOrders($arr_purchase_orders);
-
-try {
- $result = $apiInstance->updateOrCreatePurchaseOrders($xeroTenantId, $purchaseOrders, $summarizeErrors);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateOrCreatePurchaseOrders: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $purchaseOrders = ::Object::PurchaseOrders->new(); # PurchaseOrders |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-
-eval {
- my $result = $api_instance->updateOrCreatePurchaseOrders(xeroTenantId => $xeroTenantId, purchaseOrders => $purchaseOrders, summarizeErrors => $summarizeErrors);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateOrCreatePurchaseOrders: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ updateOrCreatePurchaseOrders
+ Updates or creates one or more purchase orders
+
+
+
+
+
+
+
+ /PurchaseOrders
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -113682,68 +40326,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateOrCreatePurchaseOrders: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-date_value = 'YYYY-MM-DD'
-
-contact = {
- contact_id: "00000000-0000-0000-0000-000000000000"
-}
-
-line_item = {
- description: "Foobar",
- quantity: 1.0,
- unit_amount: 20.0,
- account_code: "000"
-}
-line_items = []
-line_items << line_item
-
-purchase_order = {
- contact: contact,
- line_items: line_items,
- date: date_value
-}
-
-purchaseOrders = {
- purchase_orders: [purchase_order]
-}
-
-begin
- response = xero_client.accounting_api.update_or_create_purchase_orders(xero_tenant_id, purchaseOrders, summarize_errors)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_or_create_purchase_orders: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -113766,34 +40367,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- purchaseOrders *
-
-
-
-
- PurchaseOrders
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ purchaseOrders *
+
+
+
+
+ PurchaseOrders
+
+
+
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -113853,450 +40430,34 @@ Parameters
-
-
-
-
-
-
-
-
- updateOrCreateQuotes
- Updates or creates one or more quotes
-
-
-
-
-
-
-
- /Quotes
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Quotes?summarizeErrors=true"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- Boolean summarizeErrors = true;
- LocalDate dateValue = LocalDate.of(2020, Month.OCTOBER, 10);
-
- Contact contact = new Contact();
- contact.setContactID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- LineItem lineItem = new LineItem();
- lineItem.setDescription("Foobar");
- lineItem.setQuantity(1.0);
- lineItem.setUnitAmount(20.0);
- lineItem.setAccountCode("000");
-
- List<LineItem> lineItems = new ArrayList<LineItem>();
- lineItems.add(lineItem);
-
- Quote quote = new Quote();
- quote.setContact(contact);
- quote.setLineItems(lineItems);
- quote.setDate(dateValue);
-
- Quotes quotes = new Quotes();
- quotes.addQuotesItem(quote);
-
- try {
- Quotes result = apiInstance.updateOrCreateQuotes(accessToken, xeroTenantId, quotes, summarizeErrors);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreateQuotes");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- Quotes quotes = { "Quotes": [ { "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "12775" } ], "Date": "2020-02-01" } ] }; // Quotes |
- Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
- try {
- Quotes result = apiInstance.updateOrCreateQuotes(xeroTenantId, quotes, summarizeErrors);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateOrCreateQuotes");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-Quotes *quotes = { "Quotes": [ { "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "12775" } ], "Date": "2020-02-01" } ] }; //
-Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates or creates one or more quotes
-[apiInstance updateOrCreateQuotesWith:xeroTenantId
- quotes:quotes
- summarizeErrors:summarizeErrors
- completionHandler: ^(Quotes output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const summarizeErrors = true;
-const dateValue = '2020-10-10'
-
-const contact: Contact = {
- contactID: "00000000-0000-0000-0000-000000000000" };
-
-const lineItem: LineItem = {
- description: "Foobar",
- quantity: 1.0,
- unitAmount: 20.0,
- accountCode: "000" };
-const lineItems = [];
-lineItems.push(lineItem)
-
-const quote: Quote = {
- contact: contact,
- lineItems: lineItems,
- date: dateValue };
-
-const quotes: Quotes = {
- quotes: [quote] };
-
-try {
- const response = await xero.accountingApi.updateOrCreateQuotes(xeroTenantId, quotes, summarizeErrors);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateOrCreateQuotesExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var summarizeErrors = true;
- var dateValue = DateTime.Now;
-
- var contact = new Contact();
- contact.ContactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var lineItem = new LineItem();
- lineItem.Description = "Foobar";
- lineItem.Quantity = new decimal(1.0);
- lineItem.UnitAmount = new decimal(20.0);
- lineItem.AccountCode = "000";
- var lineItems = new List<LineItem>();
- lineItems.Add(lineItem);
-
- var quote = new Quote();
- quote.Contact = contact;
- quote.LineItems = lineItems;
- quote.Date = dateValue;
-
- var quotes = new Quotes();
- var quotesList = new List<Quote>();
- quotesList.Add(quote);
- quotes._Quotes = quotesList;
-
- try {
- var result = await apiInstance.UpdateOrCreateQuotesAsync(accessToken, xeroTenantId, quotes, summarizeErrors);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateOrCreateQuotes: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$summarizeErrors = true;
-$dateValue = new DateTime('2020-12-10');
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setContactID('00000000-0000-0000-0000-000000000000');
-
-$lineItem = new XeroAPI\XeroPHP\Models\Accounting\LineItem;
-$lineItem->setDescription('Foobar');
-$lineItem->setQuantity(1.0);
-$lineItem->setUnitAmount(20.0);
-$lineItem->setAccountCode('000');
-$lineItems = [];
-array_push($lineItems, $lineItem);
-
-$quote = new XeroAPI\XeroPHP\Models\Accounting\Quote;
-$quote->setContact($contact);
-$quote->setLineItems($lineItems);
-$quote->setDate($dateValue);
-
-$quotes = new XeroAPI\XeroPHP\Models\Accounting\Quotes;
-$arr_quotes = [];
-array_push($arr_quotes, $quote);
-$quotes->setQuotes($arr_quotes);
-
-try {
- $result = $apiInstance->updateOrCreateQuotes($xeroTenantId, $quotes, $summarizeErrors);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateOrCreateQuotes: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $quotes = ::Object::Quotes->new(); # Quotes |
-my $summarizeErrors = true; # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors
-
-eval {
- my $result = $api_instance->updateOrCreateQuotes(xeroTenantId => $xeroTenantId, quotes => $quotes, summarizeErrors => $summarizeErrors);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateOrCreateQuotes: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ updateOrCreateQuotes
+ Updates or creates one or more quotes
+
+
+
+
+
+
+
+ /Quotes
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -114340,68 +40501,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateOrCreateQuotes: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-summarize_errors = true
-date_value = 'YYYY-MM-DD'
-
-contact = {
- contact_id: "00000000-0000-0000-0000-000000000000"
-}
-
-line_item = {
- description: "Foobar",
- quantity: 1.0,
- unit_amount: 20.0,
- account_code: "000"
-}
-line_items = []
-line_items << line_item
-
-quote = {
- contact: contact,
- line_items: line_items,
- date: date_value
-}
-
-quotes = {
- quotes: [quote]
-}
-
-begin
- response = xero_client.accounting_api.update_or_create_quotes(xero_tenant_id, quotes, summarize_errors)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_or_create_quotes: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -114424,34 +40542,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- quotes *
-
-
-
-
- Quotes
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ quotes *
+
+
+
+
+ Quotes
+
+
+
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- summarizeErrors
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ summarizeErrors
@@ -114511,393 +40605,34 @@ Parameters
-
-
-
-
-
-
-
-
- updatePurchaseOrder
- Updates a specific purchase order
-
-
-
-
-
-
-
- /PurchaseOrders/{PurchaseOrderID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID purchaseOrderID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- PurchaseOrder purchaseOrder = new PurchaseOrder();
- purchaseOrder.setAttentionTo("Peter Parker");
-
- PurchaseOrders purchaseOrders = new PurchaseOrders();
- purchaseOrders.addPurchaseOrdersItem(purchaseOrder);
-
- try {
- PurchaseOrders result = apiInstance.updatePurchaseOrder(accessToken, xeroTenantId, purchaseOrderID, purchaseOrders);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updatePurchaseOrder");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID purchaseOrderID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Purchase Order
- PurchaseOrders purchaseOrders = { "PurchaseOrders": [ { "AttentionTo": "Peter Parker", "LineItems": [], "Contact": {} } ] }; // PurchaseOrders |
- try {
- PurchaseOrders result = apiInstance.updatePurchaseOrder(xeroTenantId, purchaseOrderID, purchaseOrders);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updatePurchaseOrder");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *purchaseOrderID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Purchase Order (default to null)
-PurchaseOrders *purchaseOrders = { "PurchaseOrders": [ { "AttentionTo": "Peter Parker", "LineItems": [], "Contact": {} } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific purchase order
-[apiInstance updatePurchaseOrderWith:xeroTenantId
- purchaseOrderID:purchaseOrderID
- purchaseOrders:purchaseOrders
- completionHandler: ^(PurchaseOrders output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const purchaseOrderID = '00000000-0000-0000-0000-000000000000';
-
-const purchaseOrder: PurchaseOrder = {
- attentionTo: "Peter Parker" };
-
-const purchaseOrders: PurchaseOrders = {
- purchaseOrders: [purchaseOrder] };
-
-try {
- const response = await xero.accountingApi.updatePurchaseOrder(xeroTenantId, purchaseOrderID, purchaseOrders);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdatePurchaseOrderExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var purchaseOrderID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var purchaseOrder = new PurchaseOrder();
- purchaseOrder.AttentionTo = "Peter Parker";
-
- var purchaseOrders = new PurchaseOrders();
- var purchaseOrdersList = new List<PurchaseOrder>();
- purchaseOrdersList.Add(purchaseOrder);
- purchaseOrders._PurchaseOrders = purchaseOrdersList;
-
- try {
- var result = await apiInstance.UpdatePurchaseOrderAsync(accessToken, xeroTenantId, purchaseOrderID, purchaseOrders);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdatePurchaseOrder: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$purchaseOrderID = "00000000-0000-0000-0000-000000000000";
-
-$purchaseOrder = new XeroAPI\XeroPHP\Models\Accounting\PurchaseOrder;
-$purchaseOrder->setAttentionTo('Peter Parker');
-
-$purchaseOrders = new XeroAPI\XeroPHP\Models\Accounting\PurchaseOrders;
-$arr_purchase_orders = [];
-array_push($arr_purchase_orders, $purchaseOrder);
-$purchaseOrders->setPurchaseOrders($arr_purchase_orders);
-
-try {
- $result = $apiInstance->updatePurchaseOrder($xeroTenantId, $purchaseOrderID, $purchaseOrders);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updatePurchaseOrder: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $purchaseOrderID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Purchase Order
-my $purchaseOrders = ::Object::PurchaseOrders->new(); # PurchaseOrders |
-
-eval {
- my $result = $api_instance->updatePurchaseOrder(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID, purchaseOrders => $purchaseOrders);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updatePurchaseOrder: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ updatePurchaseOrder
+ Updates a specific purchase order
+
+
+
+
+
+
+
+ /PurchaseOrders/{PurchaseOrderID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -114926,51 +40661,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updatePurchaseOrder: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-purchase_order_id = '00000000-0000-0000-0000-000000000000'
-
-purchase_order = {
- attentionTo: "Peter Parker"
-}
-
-purchaseOrders = {
- purchase_orders: [purchase_order]
-}
-
-begin
- response = xero_client.accounting_api.update_purchase_order(xero_tenant_id, purchase_order_id, purchaseOrders)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_purchase_order: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PurchaseOrderID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PurchaseOrderID*
@@ -114996,15 +40705,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -115027,34 +40735,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- purchaseOrders *
-
-
-
-
- PurchaseOrders
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ purchaseOrders *
+
+
+
+
+ PurchaseOrders
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updatePurchaseOrderAttachmentByFileName
- Updates a specific attachment for a specific purchase order by filename
-
-
-
-
-
-
-
- /PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID purchaseOrderID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.updatePurchaseOrderAttachmentByFileName(accessToken, xeroTenantId, purchaseOrderID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updatePurchaseOrderAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID purchaseOrderID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Purchase Order
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.updatePurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updatePurchaseOrderAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *purchaseOrderID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Purchase Order (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific attachment for a specific purchase order by filename
-[apiInstance updatePurchaseOrderAttachmentByFileNameWith:xeroTenantId
- purchaseOrderID:purchaseOrderID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const purchaseOrderID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.updatePurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdatePurchaseOrderAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var purchaseOrderID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.UpdatePurchaseOrderAttachmentByFileNameAsync(accessToken, xeroTenantId, purchaseOrderID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdatePurchaseOrderAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$purchaseOrderID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->updatePurchaseOrderAttachmentByFileName($xeroTenantId, $purchaseOrderID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updatePurchaseOrderAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $purchaseOrderID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Purchase Order
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->updatePurchaseOrderAttachmentByFileName(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updatePurchaseOrderAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updatePurchaseOrderAttachmentByFileName
+ Updates a specific attachment for a specific purchase order by filename
+
+
+
+
+
+
+
+ /PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -115500,44 +40826,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updatePurchaseOrderAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-purchase_order_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.update_purchase_order_attachment_by_file_name(xero_tenant_id, purchase_order_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_purchase_order_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- PurchaseOrderID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ PurchaseOrderID*
@@ -115563,7 +40870,7 @@ Parameters
- FileName*
+ FileName*
@@ -115586,15 +40893,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -115617,34 +40923,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateQuote
- Updates a specific quote
-
-
-
-
-
-
-
- /Quotes/{QuoteID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID quoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- LocalDate dateValue = LocalDate.of(2020, Month.OCTOBER, 10);
-
- Contact contact = new Contact();
- contact.setContactID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- Quote quote = new Quote();
- quote.setReference("I am an update");
- quote.setContact(contact);
- quote.setDate(dateValue);
-
- Quotes quotes = new Quotes();
- quotes.addQuotesItem(quote);
-
- try {
- Quotes result = apiInstance.updateQuote(accessToken, xeroTenantId, quoteID, quotes);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateQuote");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID quoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Quote
- Quotes quotes = { "Quotes": [ { "Reference": "I am an update", "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "Date": "2020-02-01" } ] }; // Quotes |
- try {
- Quotes result = apiInstance.updateQuote(xeroTenantId, quoteID, quotes);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateQuote");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *quoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Quote (default to null)
-Quotes *quotes = { "Quotes": [ { "Reference": "I am an update", "Contact": { "ContactID": "00000000-0000-0000-0000-000000000000" }, "Date": "2020-02-01" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific quote
-[apiInstance updateQuoteWith:xeroTenantId
- quoteID:quoteID
- quotes:quotes
- completionHandler: ^(Quotes output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const quoteID = '00000000-0000-0000-0000-000000000000';
-const dateValue = '2020-10-10'
-
-const contact: Contact = {
- contactID: "00000000-0000-0000-0000-000000000000" };
-
-const quote: Quote = {
- reference: "I am an update",
- contact: contact,
- date: dateValue };
-
-const quotes: Quotes = {
- quotes: [quote] };
-
-try {
- const response = await xero.accountingApi.updateQuote(xeroTenantId, quoteID, quotes);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateQuoteExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var quoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var dateValue = DateTime.Now;
-
- var contact = new Contact();
- contact.ContactID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var quote = new Quote();
- quote.Reference = "I am an update";
- quote.Contact = contact;
- quote.Date = dateValue;
-
- var quotes = new Quotes();
- var quotesList = new List<Quote>();
- quotesList.Add(quote);
- quotes._Quotes = quotesList;
-
- try {
- var result = await apiInstance.UpdateQuoteAsync(accessToken, xeroTenantId, quoteID, quotes);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateQuote: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$quoteID = "00000000-0000-0000-0000-000000000000";
-$dateValue = new DateTime('2020-12-10');
-
-$contact = new XeroAPI\XeroPHP\Models\Accounting\Contact;
-$contact->setContactID('00000000-0000-0000-0000-000000000000');
-
-$quote = new XeroAPI\XeroPHP\Models\Accounting\Quote;
-$quote->setReference('I am an update');
-$quote->setContact($contact);
-$quote->setDate($dateValue);
-
-$quotes = new XeroAPI\XeroPHP\Models\Accounting\Quotes;
-$arr_quotes = [];
-array_push($arr_quotes, $quote);
-$quotes->setQuotes($arr_quotes);
-
-try {
- $result = $apiInstance->updateQuote($xeroTenantId, $quoteID, $quotes);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateQuote: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $quoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Quote
-my $quotes = ::Object::Quotes->new(); # Quotes |
-
-eval {
- my $result = $api_instance->updateQuote(xeroTenantId => $xeroTenantId, quoteID => $quoteID, quotes => $quotes);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateQuote: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateQuote
+ Updates a specific quote
+
+
+
+
+
+
+
+ /Quotes/{QuoteID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -116124,58 +41022,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateQuote: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-quote_id = '00000000-0000-0000-0000-000000000000'
-date_value = 'YYYY-MM-DD'
-
-contact = {
- contact_id: "00000000-0000-0000-0000-000000000000"
-}
-
-quote = {
- reference: "I am an update",
- contact: contact,
- date: date_value
-}
-
-quotes = {
- quotes: [quote]
-}
-
-begin
- response = xero_client.accounting_api.update_quote(xero_tenant_id, quote_id, quotes)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_quote: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- QuoteID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ QuoteID*
@@ -116201,15 +41066,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -116232,34 +41096,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- quotes *
-
-
-
-
- Quotes
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ quotes *
+
+
+
+
+ Quotes
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateQuoteAttachmentByFileName
- Updates a specific attachment from a specific quote by filename
-
-
-
-
-
-
-
- /Quotes/{QuoteID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID quoteID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.updateQuoteAttachmentByFileName(accessToken, xeroTenantId, quoteID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateQuoteAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID quoteID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for an Quote
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.updateQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateQuoteAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *quoteID = 00000000-0000-0000-0000-000000000000; // Unique identifier for an Quote (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific attachment from a specific quote by filename
-[apiInstance updateQuoteAttachmentByFileNameWith:xeroTenantId
- quoteID:quoteID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const quoteID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.updateQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateQuoteAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var quoteID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.UpdateQuoteAttachmentByFileNameAsync(accessToken, xeroTenantId, quoteID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateQuoteAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$quoteID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->updateQuoteAttachmentByFileName($xeroTenantId, $quoteID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateQuoteAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $quoteID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for an Quote
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->updateQuoteAttachmentByFileName(xeroTenantId => $xeroTenantId, quoteID => $quoteID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateQuoteAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateQuoteAttachmentByFileName
+ Updates a specific attachment from a specific quote by filename
+
+
+
+
+
+
+
+ /Quotes/{QuoteID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -116705,44 +41187,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateQuoteAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-quote_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.update_quote_attachment_by_file_name(xero_tenant_id, quote_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_quote_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- QuoteID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ QuoteID*
@@ -116768,7 +41231,7 @@ Parameters
- FileName*
+ FileName*
@@ -116791,15 +41254,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -116822,34 +41284,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateReceipt
- Updates a specific draft expense claim receipts
-
-
-
-
-
-
-
- /Receipts/{ReceiptID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Receipts/{ReceiptID}?unitdp=4"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID receiptID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- Integer unitdp = 4;
- LocalDate dateValue = LocalDate.of(2020, Month.OCTOBER, 10);
-
- User user = new User();
- user.setUserID(UUID.fromString("00000000-0000-0000-0000-000000000000"));
-
- Receipt receipt = new Receipt();
- receipt.setUser(user);
- receipt.setReference("Foobar");
- receipt.setDate(dateValue);
-
- Receipts receipts = new Receipts();
- receipts.addReceiptsItem(receipt);
-
- try {
- Receipts result = apiInstance.updateReceipt(accessToken, xeroTenantId, receiptID, receipts, unitdp);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateReceipt");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID receiptID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Receipt
- Receipts receipts = { "Receipts": [ { "Lineitems": [], "User": { "UserID": "00000000-0000-0000-0000-000000000000" }, "Reference": "Foobar" } ] }; // Receipts |
- Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- try {
- Receipts result = apiInstance.updateReceipt(xeroTenantId, receiptID, receipts, unitdp);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateReceipt");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *receiptID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Receipt (default to null)
-Receipts *receipts = { "Receipts": [ { "Lineitems": [], "User": { "UserID": "00000000-0000-0000-0000-000000000000" }, "Reference": "Foobar" } ] }; //
-Integer *unitdp = 4; // e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null)
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific draft expense claim receipts
-[apiInstance updateReceiptWith:xeroTenantId
- receiptID:receiptID
- receipts:receipts
- unitdp:unitdp
- completionHandler: ^(Receipts output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const receiptID = '00000000-0000-0000-0000-000000000000';
-const unitdp = 4;
-const dateValue = '2020-10-10'
-
-const user: User = {
- userID: "00000000-0000-0000-0000-000000000000" };
-
-const receipt: Receipt = {
- user: user,
- reference: "Foobar",
- date: dateValue };
-
-const receipts: Receipts = {
- receipts: [receipt] };
-
-try {
- const response = await xero.accountingApi.updateReceipt(xeroTenantId, receiptID, receipts, unitdp);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateReceiptExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var receiptID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var unitdp = 4;
- var dateValue = DateTime.Now;
-
- var user = new User();
- user.UserID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var receipt = new Receipt();
- receipt.User = user;
- receipt.Reference = "Foobar";
- receipt.Date = dateValue;
-
- var receipts = new Receipts();
- var receiptsList = new List<Receipt>();
- receiptsList.Add(receipt);
- receipts._Receipts = receiptsList;
-
- try {
- var result = await apiInstance.UpdateReceiptAsync(accessToken, xeroTenantId, receiptID, receipts, unitdp);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateReceipt: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$receiptID = "00000000-0000-0000-0000-000000000000";
-$unitdp = 4;
-$dateValue = new DateTime('2020-12-10');
-
-$user = new XeroAPI\XeroPHP\Models\Accounting\User;
-$user->setUserID('00000000-0000-0000-0000-000000000000');
-
-$receipt = new XeroAPI\XeroPHP\Models\Accounting\Receipt;
-$receipt->setUser($user);
-$receipt->setReference('Foobar');
-$receipt->setDate($dateValue);
-
-$receipts = new XeroAPI\XeroPHP\Models\Accounting\Receipts;
-$arr_receipts = [];
-array_push($arr_receipts, $receipt);
-$receipts->setReceipts($arr_receipts);
-
-try {
- $result = $apiInstance->updateReceipt($xeroTenantId, $receiptID, $receipts, $unitdp);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateReceipt: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $receiptID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Receipt
-my $receipts = ::Object::Receipts->new(); # Receipts |
-my $unitdp = 4; # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
-
-eval {
- my $result = $api_instance->updateReceipt(xeroTenantId => $xeroTenantId, receiptID => $receiptID, receipts => $receipts, unitdp => $unitdp);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateReceipt: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateReceipt
+ Updates a specific draft expense claim receipts
+
+
+
+
+
+
+
+ /Receipts/{ReceiptID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -117337,59 +41383,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateReceipt: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-receipt_id = '00000000-0000-0000-0000-000000000000'
-unitdp = 4
-dateValue = 'YYYY-MM-DD'
-
-user = {
- user_id: "00000000-0000-0000-0000-000000000000"
-}
-
-receipt = {
- user: user,
- reference: "Foobar",
- date: dateValue
-}
-
-receipts = {
- receipts: [receipt]
-}
-
-begin
- response = xero_client.accounting_api.update_receipt(xero_tenant_id, receipt_id, receipts, unitdp)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_receipt: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.transactions
- Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ReceiptID*
+
+
+ Scopes
+
+
+
+ accounting.transactions
+ Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ReceiptID*
@@ -117415,15 +41427,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -117446,34 +41457,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- receipts *
-
-
-
-
- Receipts
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ receipts *
+
+
+
+
+ Receipts
+
+
+
-
-
-
-
-
-
-
-
-
- Query parameters
-
-
- Name
- Description
-
- unitdp
+}
+
+
+ Query parameters
+
+
+ Name
+ Description
+
+ unitdp
@@ -117533,392 +41520,34 @@ Parameters
-
-
-
-
-
-
-
-
- updateReceiptAttachmentByFileName
- Updates a specific attachment on a specific expense claim receipts by file name
-
-
-
-
-
-
-
- /Receipts/{ReceiptID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/Receipts/{ReceiptID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID receiptID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.updateReceiptAttachmentByFileName(accessToken, xeroTenantId, receiptID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateReceiptAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID receiptID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Receipt
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.updateReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateReceiptAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *receiptID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Receipt (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific attachment on a specific expense claim receipts by file name
-[apiInstance updateReceiptAttachmentByFileNameWith:xeroTenantId
- receiptID:receiptID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const receiptID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.updateReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateReceiptAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var receiptID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.UpdateReceiptAttachmentByFileNameAsync(accessToken, xeroTenantId, receiptID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateReceiptAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$receiptID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->updateReceiptAttachmentByFileName($xeroTenantId, $receiptID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateReceiptAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
-}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $receiptID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Receipt
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->updateReceiptAttachmentByFileName(xeroTenantId => $xeroTenantId, receiptID => $receiptID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateReceiptAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+ updateReceiptAttachmentByFileName
+ Updates a specific attachment on a specific expense claim receipts by file name
+
+
+
+
+
+
+
+ /Receipts/{ReceiptID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -117946,44 +41575,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateReceiptAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-receipt_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.update_receipt_attachment_by_file_name(xero_tenant_id, receipt_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_receipt_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- ReceiptID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ ReceiptID*
@@ -118009,7 +41619,7 @@ Parameters
- FileName*
+ FileName*
@@ -118032,15 +41642,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -118063,34 +41672,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateRepeatingInvoiceAttachmentByFileName
- Updates a specific attachment from a specific repeating invoices by file name
-
-
-
-
-
-
-
- /RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID repeatingInvoiceID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- String fileName = 'xero-dev.jpg';
-
- File input = new File("/path/to/local/xero-dev.jpg");
- java.nio.file.Path inputPath = input.toPath();
- byte[] body = FileUtils.readFileToByteArray(input);
- String mimeType = Files.probeContentType(inputPath);
-
- try {
- Attachments result = apiInstance.updateRepeatingInvoiceAttachmentByFileName(accessToken, xeroTenantId, repeatingInvoiceID, fileName, body, mimeType);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateRepeatingInvoiceAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Repeating Invoice
- String fileName = xero-dev.jpg; // String | Name of the attachment
- byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] |
- try {
- Attachments result = apiInstance.updateRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateRepeatingInvoiceAttachmentByFileName");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Repeating Invoice (default to null)
-String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
-byte[] *body = BYTE_ARRAY_DATA_HERE; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific attachment from a specific repeating invoices by file name
-[apiInstance updateRepeatingInvoiceAttachmentByFileNameWith:xeroTenantId
- repeatingInvoiceID:repeatingInvoiceID
- fileName:fileName
- body:body
- completionHandler: ^(Attachments output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const repeatingInvoiceID = '00000000-0000-0000-0000-000000000000';
-const fileName = 'xero-dev.jpg';
-const path = require("path");
-const mime = require("mime-types");
-const pathToUpload = path.resolve(__dirname, "../public/images/xero-dev.jpg"); // determine the path to your file
-const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file
-const contentType = mime.lookup(fileName);
-
-try {
- const response = await xero.accountingApi.updateRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body, {
- headers: {
- "Content-Type": contentType,
- }
- });
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateRepeatingInvoiceAttachmentByFileNameExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var repeatingInvoiceID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var fileName = "xero-dev.jpg";
- byte[] body = System.IO.File.ReadAllBytes(fileName);
-
- try {
- var result = await apiInstance.UpdateRepeatingInvoiceAttachmentByFileNameAsync(accessToken, xeroTenantId, repeatingInvoiceID, fileName, body);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateRepeatingInvoiceAttachmentByFileName: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$repeatingInvoiceID = "00000000-0000-0000-0000-000000000000";
-$fileName = "xero-dev.jpg";
-
-$handle = fopen($fileName, "r");
-$body = fread($handle, filesize($fileName));
-fclose($handle);
-
-try {
- $result = $apiInstance->updateRepeatingInvoiceAttachmentByFileName($xeroTenantId, $repeatingInvoiceID, $fileName, $body);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateRepeatingInvoiceAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $repeatingInvoiceID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Repeating Invoice
-my $fileName = xero-dev.jpg; # String | Name of the attachment
-my $body = ::Object::byte[]->new(); # byte[] |
-
-eval {
- my $result = $api_instance->updateRepeatingInvoiceAttachmentByFileName(xeroTenantId => $xeroTenantId, repeatingInvoiceID => $repeatingInvoiceID, fileName => $fileName, body => $body);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateRepeatingInvoiceAttachmentByFileName: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateRepeatingInvoiceAttachmentByFileName
+ Updates a specific attachment from a specific repeating invoices by file name
+
+
+
+
+
+
+
+ /RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -118538,44 +41764,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateRepeatingInvoiceAttachmentByFileName: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-repeating_invoice_id = '00000000-0000-0000-0000-000000000000'
-file_name = 'xero-dev.jpg'
-body = File.read('assets/images/xero-api.png')
-begin
- response = xero_client.accounting_api.update_repeating_invoice_attachment_by_file_name(xero_tenant_id, repeating_invoice_id, file_name, body)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_repeating_invoice_attachment_by_file_name: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.attachments
- Grant read-write access to attachments
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- RepeatingInvoiceID*
+
+
+ Scopes
+
+
+
+ accounting.attachments
+ Grant read-write access to attachments
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ RepeatingInvoiceID*
@@ -118601,7 +41808,7 @@ Parameters
- FileName*
+ FileName*
@@ -118624,15 +41831,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -118655,34 +41861,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- body *
-
-
-
-
- byte[]
-
-
-
-Byte array of file in body of request
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ body *
+
+
+
+
+ byte[]
+
+
+ Byte array of file in body of request
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateTaxRate
- Updates tax rates
-
-
-
-
-
-
-
- /TaxRates
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/TaxRates"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
- TaxComponent taxComponent = new TaxComponent();
- taxComponent.setName("State Tax");
- taxComponent.setRate(2.25);
-
- List<TaxComponents> taxComponents = new ArrayList<TaxComponents>();
- taxComponents.add(taxComponent);
-
- TaxRate taxRate = new TaxRate();
- taxRate.setName("CA State Tax");
- taxRate.setTaxComponents(taxComponents);
-
- TaxRates taxRates = new TaxRates();
- taxRates.addTaxRatesItem(taxRate);
-
- try {
- TaxRates result = apiInstance.updateTaxRate(accessToken, xeroTenantId, taxRates);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateTaxRate");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- TaxRates taxRates = { "TaxRates": [ { "Name": "State Tax NY", "TaxComponents": [ { "Name": "State Tax", "Rate": 2.25 } ], "Status": "DELETED", "ReportTaxType": "INPUT" } ] }; // TaxRates |
- try {
- TaxRates result = apiInstance.updateTaxRate(xeroTenantId, taxRates);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateTaxRate");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-TaxRates *taxRates = { "TaxRates": [ { "Name": "State Tax NY", "TaxComponents": [ { "Name": "State Tax", "Rate": 2.25 } ], "Status": "DELETED", "ReportTaxType": "INPUT" } ] }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates tax rates
-[apiInstance updateTaxRateWith:xeroTenantId
- taxRates:taxRates
- completionHandler: ^(TaxRates output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-
-const taxComponent: TaxComponent = {
- name: "State Tax",
- rate: 2.25 };
-const taxComponents = [];
-taxComponents.push(taxComponent)
-
-const taxRate: TaxRate = {
- name: "CA State Tax",
- taxComponents: taxComponents,
-
-const taxRates: TaxRates = {
- taxRates: [taxRate] };
-
-try {
- const response = await xero.accountingApi.updateTaxRate(xeroTenantId, taxRates);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateTaxRateExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
-
- var taxComponent = new TaxComponent();
- taxComponent.Name = "State Tax";
- taxComponent.Rate = new decimal(2.25);
- var taxComponents = new List<TaxComponent>();
- taxComponents.Add(taxComponent);
-
- var taxRate = new TaxRate();
- taxRate.Name = "CA State Tax";
- taxRate.TaxComponents = taxComponents;
-
- var taxRates = new TaxRates();
- var taxRatesList = new List<TaxRate>();
- taxRatesList.Add(taxRate);
- taxRates._TaxRates = taxRatesList;
-
- try {
- var result = await apiInstance.UpdateTaxRateAsync(accessToken, xeroTenantId, taxRates);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateTaxRate: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-
-$taxComponent = new XeroAPI\XeroPHP\Models\Accounting\TaxComponent;
-$taxComponent->setName('State Tax');
-$taxComponent->setRate(2.25);
-$taxComponents = [];
-array_push($taxComponents, $taxComponent);
-
-$taxRate = new XeroAPI\XeroPHP\Models\Accounting\TaxRate;
-$taxRate->setName('CA State Tax');
-$taxRate->setTaxComponents($taxComponents);
-
-$taxRates = new XeroAPI\XeroPHP\Models\Accounting\TaxRates;
-$arr_tax_rates = [];
-array_push($arr_tax_rates, $taxRate);
-$taxRates->setTaxRates($arr_tax_rates);
-
-try {
- $result = $apiInstance->updateTaxRate($xeroTenantId, $taxRates);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateTaxRate: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $taxRates = ::Object::TaxRates->new(); # TaxRates |
-
-eval {
- my $result = $api_instance->updateTaxRate(xeroTenantId => $xeroTenantId, taxRates => $taxRates);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateTaxRate: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateTaxRate
+ Updates tax rates
+
+
+
+
+
+
+
+ /TaxRates
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -119160,58 +41961,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateTaxRate: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-
-tax_component = {
- name: "State Tax",
- rate: 2.25
-}
-taxComponents = []
-tax_components << tax_component
-
-tax_rate = {
- name: "CA State Tax",
- taxComponents: taxComponents,
-
-taxRates = {
- tax_rates: [tax_rate]
-}
-
-begin
- response = xero_client.accounting_api.update_tax_rate(xero_tenant_id, taxRates)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_tax_rate: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -119234,34 +42002,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- taxRates *
-
-
-
-
- TaxRates
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ taxRates *
+
+
+
+
+ TaxRates
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateTrackingCategory
- Updates a specific tracking category
-
-
-
-
-
-
-
- /TrackingCategories/{TrackingCategoryID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/TrackingCategories/{TrackingCategoryID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID trackingCategoryID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- TrackingCategory trackingCategory = new TrackingCategory();
- trackingCategory.setName("Foobar");
-
- try {
- TrackingCategories result = apiInstance.updateTrackingCategory(accessToken, xeroTenantId, trackingCategoryID, trackingCategory);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateTrackingCategory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID trackingCategoryID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a TrackingCategory
- TrackingCategory trackingCategory = { "Name": "Avengers" }; // TrackingCategory |
- try {
- TrackingCategories result = apiInstance.updateTrackingCategory(xeroTenantId, trackingCategoryID, trackingCategory);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateTrackingCategory");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *trackingCategoryID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a TrackingCategory (default to null)
-TrackingCategory *trackingCategory = { "Name": "Avengers" }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific tracking category
-[apiInstance updateTrackingCategoryWith:xeroTenantId
- trackingCategoryID:trackingCategoryID
- trackingCategory:trackingCategory
- completionHandler: ^(TrackingCategories output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const trackingCategoryID = '00000000-0000-0000-0000-000000000000';
-
-const trackingCategory: TrackingCategory = {
- name: "Foobar" };
-
-try {
- const response = await xero.accountingApi.updateTrackingCategory(xeroTenantId, trackingCategoryID, trackingCategory);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateTrackingCategoryExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var trackingCategoryID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var trackingCategory = new TrackingCategory();
- trackingCategory.Name = "Foobar";
-
- try {
- var result = await apiInstance.UpdateTrackingCategoryAsync(accessToken, xeroTenantId, trackingCategoryID, trackingCategory);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateTrackingCategory: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$trackingCategoryID = "00000000-0000-0000-0000-000000000000";
-
-$trackingCategory = new XeroAPI\XeroPHP\Models\Accounting\TrackingCategory;
-$trackingCategory->setName('Foobar');
-
-try {
- $result = $apiInstance->updateTrackingCategory($xeroTenantId, $trackingCategoryID, $trackingCategory);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateTrackingCategory: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $trackingCategoryID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a TrackingCategory
-my $trackingCategory = ::Object::TrackingCategory->new(); # TrackingCategory |
-
-eval {
- my $result = $api_instance->updateTrackingCategory(xeroTenantId => $xeroTenantId, trackingCategoryID => $trackingCategoryID, trackingCategory => $trackingCategory);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateTrackingCategory: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateTrackingCategory
+ Updates a specific tracking category
+
+
+
+
+
+
+
+ /TrackingCategories/{TrackingCategoryID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -119690,47 +42091,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateTrackingCategory: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-tracking_category_id = '00000000-0000-0000-0000-000000000000'
-
-trackingCategory = {
- name: "Foobar"
-}
-
-begin
- response = xero_client.accounting_api.update_tracking_category(xero_tenant_id, tracking_category_id, trackingCategory)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_tracking_category: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- TrackingCategoryID*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ TrackingCategoryID*
@@ -119756,15 +42135,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -119787,34 +42165,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- trackingCategory *
-
-
-
-
- TrackingCategory
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ trackingCategory *
+
+
+
+
+ TrackingCategory
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- updateTrackingOptions
- Updates a specific option for a specific tracking category
-
-
-
-
-
-
-
- /TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}
-
-
Usage and SDK Samples
-
-
-
-
-
- curl -X "https://api.xero.com/api.xro/2.0/TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}"
-
-
- import org.openapitools.client.api.*;
-import org.openapitools.client.api.client.AccountingApi;
-import org.openapitools.client.models.accounting.*;
-
-import java.io.File;
-import java.util.*;
-
-public class AccountingApiExample {
- private AccountingApi apiInstance;
-
- public static void main(String[] args) {
- String accessToken = "YOUR_ACCESS_TOKEN";
- ApiClient defaultClient = new ApiClient();
-
- apiInstance = AccountingApi.getInstance(defaultClient);
- String xeroTenantId = 'YOUR_XERO_TENANT_ID';
- UUID trackingCategoryID = UUID.fromString("00000000-0000-0000-0000-000000000000");
- UUID trackingOptionID = UUID.fromString("00000000-0000-0000-0000-000000000000");
-
- TrackingOption trackingOption = new TrackingOption();
- trackingOption.setName("Foobar");
-
- try {
- TrackingOptions result = apiInstance.updateTrackingOptions(accessToken, xeroTenantId, trackingCategoryID, trackingOptionID, trackingOption);
- System.out.println(result);
- } catch (XeroException e) {
- System.err.println("Exception when calling AccountingApi#updateTrackingOptions");
- e.printStackTrace();
- }
- }
-}
-
-
-
- import org.openapitools.client.api.AccountingApi;
-
-public class AccountingApiExample {
-
- public static void main(String[] args) {
- AccountingApi apiInstance = new AccountingApi();
- String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
- UUID trackingCategoryID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a TrackingCategory
- UUID trackingOptionID = 00000000-0000-0000-0000-000000000000; // UUID | Unique identifier for a Tracking Option
- TrackingOption trackingOption = { name: "Vision" }; // TrackingOption |
- try {
- TrackingOptions result = apiInstance.updateTrackingOptions(xeroTenantId, trackingCategoryID, trackingOptionID, trackingOption);
- System.out.println(result);
- } catch (ApiException e) {
- System.err.println("Exception when calling AccountingApi#updateTrackingOptions");
- e.printStackTrace();
- }
- }
-}
-
-
-
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null)
-UUID *trackingCategoryID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a TrackingCategory (default to null)
-UUID *trackingOptionID = 00000000-0000-0000-0000-000000000000; // Unique identifier for a Tracking Option (default to null)
-TrackingOption *trackingOption = { name: "Vision" }; //
-
-AccountingApi *apiInstance = [[AccountingApi alloc] init];
-
-// Updates a specific option for a specific tracking category
-[apiInstance updateTrackingOptionsWith:xeroTenantId
- trackingCategoryID:trackingCategoryID
- trackingOptionID:trackingOptionID
- trackingOption:trackingOption
- completionHandler: ^(TrackingOptions output, NSError* error) {
- if (output) {
- NSLog(@"%@", output);
- }
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
-
-
-
- await xero.setTokenSet(tokenSet);
-
-const xeroTenantId = 'YOUR_XERO_TENANT_ID';
-const trackingCategoryID = '00000000-0000-0000-0000-000000000000';
-const trackingOptionID = '00000000-0000-0000-0000-000000000000';
-
-const trackingOption: TrackingOption = {
- name: "Foobar" };
-
-try {
- const response = await xero.accountingApi.updateTrackingOptions(xeroTenantId, trackingCategoryID, trackingOptionID, trackingOption);
- console.log(response.body || response.response.statusCode)
-} catch (err) {
- const error = JSON.stringify(err.response.body, null, 2)
- console.log(`Status Code: ${err.response.statusCode} => ${error}`);
-}
-
-
-
-
- using System;
-using System.Diagnostics;
-using Xero.NetStandard.OAuth2.Api;
-using Xero.NetStandard.OAuth2.Client;
-using Xero.NetStandard.OAuth2.Model;
-
-namespace Example
-{
- public class UpdateTrackingOptionsExample
- {
- public async Task Main()
- {
- var accessToken = "YOUR_ACCESS_TOKEN";
- var apiInstance = new AccountingApi();
- var xeroTenantId = "YOUR_XERO_TENANT_ID";
- var trackingCategoryID = Guid.Parse("00000000-0000-0000-0000-000000000000");
- var trackingOptionID = Guid.Parse("00000000-0000-0000-0000-000000000000");
-
- var trackingOption = new TrackingOption();
- trackingOption.Name = "Foobar";
-
- try {
- var result = await apiInstance.UpdateTrackingOptionsAsync(accessToken, xeroTenantId, trackingCategoryID, trackingOptionID, trackingOption);
- Console.WriteLine(result);
- }
- catch (Exception e)
- {
- Console.WriteLine("Exception when calling apiInstance.UpdateTrackingOptions: " + e.Message );
- }
- }
- }
-}
-
-
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: OAuth2
-$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
-
-$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
- new GuzzleHttp\Client(),
- $config
-);
-$xeroTenantId = "YOUR_XERO_TENANT_ID";
-$trackingCategoryID = "00000000-0000-0000-0000-000000000000";
-$trackingOptionID = "00000000-0000-0000-0000-000000000000";
-
-$trackingOption = new XeroAPI\XeroPHP\Models\Accounting\TrackingOption;
-$trackingOption->setName('Foobar');
-
-try {
- $result = $apiInstance->updateTrackingOptions($xeroTenantId, $trackingCategoryID, $trackingOptionID, $trackingOption);
-} catch (Exception $e) {
- echo 'Exception when calling AccountingApi->updateTrackingOptions: ', $e->getMessage(), PHP_EOL;
}
-?>
-
-
-
-
- use Data::Dumper;
-use ::Configuration;
-use ::AccountingApi;
-
-# Configure OAuth2 access token for authorization: OAuth2
-$::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = ::AccountingApi->new();
-my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant
-my $trackingCategoryID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a TrackingCategory
-my $trackingOptionID = 00000000-0000-0000-0000-000000000000; # UUID | Unique identifier for a Tracking Option
-my $trackingOption = ::Object::TrackingOption->new(); # TrackingOption |
-
-eval {
- my $result = $api_instance->updateTrackingOptions(xeroTenantId => $xeroTenantId, trackingCategoryID => $trackingCategoryID, trackingOptionID => $trackingOptionID, trackingOption => $trackingOption);
- print Dumper($result);
-};
-if ($@) {
- warn "Exception when calling AccountingApi->updateTrackingOptions: $@\n";
-}
-
-
-
- # configure api_client for use with xero-python sdk client
+
+
+
+
+
+
+
+
+ updateTrackingOptions
+ Updates a specific option for a specific tracking category
+
+
+
+
+
+
+
+ /TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}
+
+
Usage and SDK Samples
+
+
+
+
+
+ # configure api_client for use with xero-python sdk client
api_client = ApiClient(
Configuration(
debug=false,
@@ -120252,48 +42255,25 @@ Usage and SDK Samples
print(api_response)
except AccountingBadRequestException as e:
print("Exception when calling AccountingApi->updateTrackingOptions: %s\n" % e)
-
-
-
- xero_client.set_token_set(user.token_set)
-
-xero_tenant_id = 'YOUR_XERO_TENANT_ID'
-tracking_category_id = '00000000-0000-0000-0000-000000000000'
-tracking_option_id = '00000000-0000-0000-0000-000000000000'
-
-trackingOption = {
- name: "Foobar"
-}
-
-begin
- response = xero_client.accounting_api.update_tracking_options(xero_tenant_id, tracking_category_id, tracking_option_id, trackingOption)
- return response
-rescue XeroRuby::ApiError => e
- puts "Exception when calling update_tracking_options: #{e}"
-end
-
-
-
-
- Scopes
-
-
-
- accounting.settings
- Grant read-write access to organisation and account settings
-
-
-
-
- Parameters
-
- Path parameters
-
-
- Name
- Description
-
- TrackingCategoryID*
+
+
+ Scopes
+
+
+
+ accounting.settings
+ Grant read-write access to organisation and account settings
+
+
+
+ Parameters
+ Path parameters
+
+
+ Name
+ Description
+
+ TrackingCategoryID*
@@ -120319,7 +42299,7 @@ Parameters
- TrackingOptionID*
+ TrackingOptionID*
@@ -120345,15 +42325,14 @@ Parameters
-
-
- Header parameters
-
-
- Name
- Description
-
- xero-tenant-id*
+
+ Header parameters
+
+
+ Name
+ Description
+
+ xero-tenant-id*
@@ -120376,34 +42355,31 @@ Parameters
-
-
- Body parameters
-
-
- Name
- Description
-
- trackingOption *
-
-
-
-
- TrackingOption
-
-
-
-
-
-
-
- Required
-
+
+ Body parameters
+
+
+ Name
+ Description
+
+
+ trackingOption *
+
+
+
+
+ TrackingOption
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+}
+
+
+
+
+
+
+
+