From 32f6b9960c278fec4a0660173b810d095e081dfb Mon Sep 17 00:00:00 2001 From: serknight Date: Mon, 26 Oct 2020 13:13:25 -0600 Subject: [PATCH 1/3] actions and accounting docs --- docs/v4/accounting/index.html | 25312 +++++++++++++------------- src/gen/model/accounting/action.ts | 48 + src/gen/model/accounting/actions.ts | 31 + 3 files changed, 12469 insertions(+), 12922 deletions(-) create mode 100644 src/gen/model/accounting/action.ts create mode 100644 src/gen/model/accounting/actions.ts diff --git a/docs/v4/accounting/index.html b/docs/v4/accounting/index.html index 61b4e836d..d9b73022d 100644 --- a/docs/v4/accounting/index.html +++ b/docs/v4/accounting/index.html @@ -979,6 +979,39 @@ } }, "description" : "" +}; + defs["Action"] = { + "title" : "", + "properties" : { + "Name" : { + "type" : "string", + "description" : "Name of the actions for this organisation", + "example" : "UseMulticurrency" + }, + "Status" : { + "type" : "string", + "description" : "Status of the action for this organisation", + "enum" : [ "ALLOWED", "NOT-ALLOWED" ] + } + }, + "description" : "", + "externalDocs" : { + "url" : "http://developer.xero.com/documentation/api/organisation/" + } +}; + defs["Actions"] = { + "title" : "", + "type" : "object", + "properties" : { + "Actions" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Action" + } + } + }, + "description" : "", + "x-isObjectArray" : true }; defs["Address"] = { "title" : "", @@ -1501,7 +1534,6 @@ "example" : "ACME Bank" }, "Details" : { - "maxLength" : 18, "type" : "string", "description" : "(Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18", "example" : "Hello World" @@ -2154,8 +2186,8 @@ "title" : "", "type" : "string", "description" : "3 letter alpha code for the currency – see list of currency codes", - "enum" : [ "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR", "ISK", "JEP", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TVD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XDR", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZMK", "ZWD", "" ], - "x-enum-varnames" : [ "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR", "ISK", "JEP", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "_TRY", "TTD", "TVD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XDR", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZMK", "ZWD", "_EMPTY" ] + "enum" : [ "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYN", "BYR", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR", "ISK", "JEP", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TVD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XDR", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZMK", "ZWD", "" ], + "x-enum-varnames" : [ "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYN", "BYR", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR", "ISK", "JEP", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "_TRY", "TTD", "TVD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XDR", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZMK", "ZWD", "_EMPTY" ] }; defs["Element"] = { "title" : "", @@ -2369,7 +2401,7 @@ }, "ReceiptID" : { "type" : "string", - "description" : "The Xero identifier for the Receipt e.g. e59a2c7f-1306-4078-a0f3-73537afcbba9", + "description" : "The Xero identifier for the Receipt e.g. e59a2c7f-1306-4078-a0f3-73537afcbba9", "format" : "uuid" } }, @@ -5252,13 +5284,13 @@ "properties" : { "TrackingOptionID" : { "type" : "string", - "description" : "The Xero identifier for a tracking optione.g. ae777a87-5ef3-4fa0-a4f0-d10e1f13073a", + "description" : "The Xero identifier for a tracking option e.g. ae777a87-5ef3-4fa0-a4f0-d10e1f13073a", "format" : "uuid" }, "Name" : { - "maxLength" : 50, + "maxLength" : 100, "type" : "string", - "description" : "The name of the tracking option e.g. Marketing, East (max length = 50)" + "description" : "The name of the tracking option e.g. Marketing, East (max length = 100)" }, "Status" : { "type" : "string", @@ -5267,7 +5299,7 @@ }, "TrackingCategoryID" : { "type" : "string", - "description" : "Filter by a tracking categorye.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9", + "description" : "Filter by a tracking category e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9", "format" : "uuid" } }, @@ -5500,6 +5532,9 @@
  • createPrepaymentHistory
  • +
  • + createPurchaseOrderAttachmentByFileName +
  • createPurchaseOrderHistory
  • @@ -5764,6 +5799,9 @@
  • getOnlineInvoice
  • +
  • + getOrganisationActions +
  • getOrganisationCISSettings
  • @@ -5806,6 +5844,12 @@
  • getPurchaseOrderAsPdf
  • +
  • + getPurchaseOrderAttachmentById +
  • +
  • + getPurchaseOrderAttachments +
  • getPurchaseOrderByNumber
  • @@ -5815,6 +5859,9 @@
  • getPurchaseOrders
  • +
  • + getPurchaseOrder≠AttachmentByFileName +
  • getQuote
  • @@ -6001,6 +6048,9 @@
  • updatePurchaseOrder
  • +
  • + updatePurchaseOrderAttachmentByFileName +
  • updateQuote
  • @@ -6040,7 +6090,7 @@

    Accounting API

    API and SDK Documentation

    Version: 1.0.0
    - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/History"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -28938,20 +28312,21 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a PurchaseOrder - HistoryRecords historyRecords = { historyRecords:[ { details :"Hello World" } ] }; // HistoryRecords | + UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Purchase Order object + String fileName = xero-dev.png; // String | Name of the attachment + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - HistoryRecords result = apiInstance.createPurchaseOrderHistory(xeroTenantId, purchaseOrderID, historyRecords); + Attachments result = apiInstance.createPurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createPurchaseOrderHistory"); + System.err.println("Exception when calling AccountingApi#createPurchaseOrderAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -28959,39 +28334,42 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for a PurchaseOrder - HistoryRecords historyRecords = { historyRecords:[ { details :"Hello World" } ] }; // HistoryRecords | + UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Purchase Order object + String fileName = xero-dev.png; // String | Name of the attachment + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - HistoryRecords result = apiInstance.createPurchaseOrderHistory(xeroTenantId, purchaseOrderID, historyRecords); + Attachments result = apiInstance.createPurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createPurchaseOrderHistory"); + 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-000-000000000000; // Unique identifier for a PurchaseOrder (default to null)
    -HistoryRecords *historyRecords = { historyRecords:[ { details :"Hello World" } ] }; // 
    +UUID *purchaseOrderID = 00000000-0000-0000-000-000000000000; // Unique identifier for Purchase Order object (default to null)
    +String *fileName = xero-dev.png; // Name of the attachment (default to null)
    +byte[] *body = BYTE_ARRAY_DATA_HERE; // 
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to create HistoryRecord for purchase orders
    -[apiInstance createPurchaseOrderHistoryWith:xeroTenantId
    +// Allows you to create Attachment on Purchase Order
    +[apiInstance createPurchaseOrderAttachmentByFileNameWith:xeroTenantId
         purchaseOrderID:purchaseOrderID
    -    historyRecords:historyRecords
    -              completionHandler: ^(HistoryRecords output, NSError* error) {
    +    fileName:fileName
    +    body:body
    +              completionHandler: ^(Attachments output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -29002,7 +28380,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -29012,42 +28390,35 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const purchaseOrderID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a PurchaseOrder -const historyRecords:HistoryRecords = { historyRecords:[ { details :"Hello World" } ] }; // {HistoryRecords} + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const purchaseOrderID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for Purchase Order object +const fileName = "xero-dev.png"; // {String} Name of the attachment +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 +import * as fs from "fs"; +const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file +const contentType = mime.lookup(fileName); + try { - const response: any = await xero.accountingApi.createPurchaseOrderHistory(xeroTenantId, purchaseOrderID, historyRecords); + const response = await xero.accountingApi.createPurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body, { + headers: { + "Content-Type": contentType, + } + }); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -29056,7 +28427,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createPurchaseOrderHistoryExample + public class createPurchaseOrderAttachmentByFileNameExample { public void main() { @@ -29066,18 +28437,19 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var purchaseOrderID = new UUID(); // UUID | Unique identifier for a PurchaseOrder (default to null) - var historyRecords = new HistoryRecords(); // HistoryRecords | + var purchaseOrderID = new UUID(); // UUID | Unique identifier for Purchase Order object (default to null) + var fileName = xero-dev.png; // String | Name of the attachment (default to null) + var body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - // Allows you to create HistoryRecord for purchase orders - HistoryRecords result = apiInstance.createPurchaseOrderHistory(xeroTenantId, purchaseOrderID, historyRecords); + // Allows you to create Attachment on Purchase Order + Attachments result = apiInstance.createPurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.createPurchaseOrderHistory: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.createPurchaseOrderAttachmentByFileName: " + e.Message ); } } } @@ -29085,7 +28457,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -29103,12 +28475,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->createPurchaseOrderHistory: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->createPurchaseOrderAttachmentByFileName: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -29118,19 +28490,20 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $purchaseOrderID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a PurchaseOrder -my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords | +my $purchaseOrderID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for Purchase Order object +my $fileName = xero-dev.png; # String | Name of the attachment +my $body = ::Object::byte[]->new(); # byte[] | eval { - my $result = $api_instance->createPurchaseOrderHistory(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID, historyRecords => $historyRecords); + my $result = $api_instance->createPurchaseOrderAttachmentByFileName(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID, fileName => $fileName, body => $body); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->createPurchaseOrderHistory: $@\n"; + warn "Exception when calling AccountingApi->createPurchaseOrderAttachmentByFileName: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -29143,27 +28516,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -purchaseOrderID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a PurchaseOrder (default to null) -historyRecords = { historyRecords:[ { details :"Hello World" } ] } # HistoryRecords | +purchaseOrderID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Purchase Order object (default to null) +fileName = xero-dev.png # String | Name of the attachment (default to null) +body = BYTE_ARRAY_DATA_HERE # byte[] | try: - # Allows you to create HistoryRecord for purchase orders - api_response = api_instance.create_purchase_order_history(xeroTenantId, purchaseOrderID, historyRecords) + # Allows you to create Attachment on Purchase Order + api_response = api_instance.create_purchase_order_attachment_by_file_name(xeroTenantId, purchaseOrderID, fileName, body) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->createPurchaseOrderHistory: %s\n" % e)
    + print("Exception when calling AccountingApi->createPurchaseOrderAttachmentByFileName: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
         let purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID
    -    let historyRecords = { historyRecords:[ { details :"Hello World" } ] }; // HistoryRecords
    +    let fileName = xero-dev.png; // String
    +    let body = BYTE_ARRAY_DATA_HERE; // byte[]
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.createPurchaseOrderHistory(xeroTenantId, purchaseOrderID, historyRecords, &context).wait();
    +    let result = client.createPurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -29175,8 +28550,8 @@ 

    Scopes

    - - + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoicesaccounting.attachmentsGrant read-write access to attachments
    @@ -29193,7 +28568,7 @@

    Parameters

    -
    +
    @@ -29204,7 +28579,30 @@

    Parameters

    -Unique identifier for a PurchaseOrder +Unique identifier for Purchase Order object +
    +
    +
    + Required +
    +
    +
    + + + + FileName* + + + +
    +
    +
    + + String + + +
    +Name of the attachment
    @@ -29227,7 +28625,7 @@

    Parameters

    -
    +
    @@ -29254,33 +28652,33 @@

    Parameters

    Name Description - historyRecords * + body *
    - HistoryRecords + byte[]
    -HistoryRecords containing an array of HistoryRecord objects in body of request +Byte array of file in body of request
    Required
    - + -
    +
    @@ -29310,27 +28708,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/PurchaseOrders?summarizeErrors=true"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/History"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -29508,20 +28907,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - PurchaseOrders purchaseOrders = { purchaseOrders: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "710" }], date: "2019-03-13" }]}; // PurchaseOrders | - Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors + UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a PurchaseOrder + HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords | try { - PurchaseOrders result = apiInstance.createPurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors); + HistoryRecords result = apiInstance.createPurchaseOrderHistory(xeroTenantId, purchaseOrderID, historyRecords); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createPurchaseOrders"); + System.err.println("Exception when calling AccountingApi#createPurchaseOrderHistory"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -29529,39 +28928,39 @@ 

    Usage and SDK Samples

    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-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "710" }], date: "2019-03-13" }]}; // PurchaseOrders | - Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors + UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a PurchaseOrder + HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords | try { - PurchaseOrders result = apiInstance.createPurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors); + HistoryRecords result = apiInstance.createPurchaseOrderHistory(xeroTenantId, purchaseOrderID, historyRecords); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createPurchaseOrders"); + 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)
    -PurchaseOrders *purchaseOrders = { purchaseOrders: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "710" }], date: "2019-03-13" }]}; // 
    -Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false)
    +UUID *purchaseOrderID = 00000000-0000-0000-000-000000000000; // Unique identifier for a PurchaseOrder (default to null)
    +HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // 
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to create one or more purchase orders
    -[apiInstance createPurchaseOrdersWith:xeroTenantId
    -    purchaseOrders:purchaseOrders
    -    summarizeErrors:summarizeErrors
    -              completionHandler: ^(PurchaseOrders output, NSError* error) {
    +// Allows you to create HistoryRecord for purchase orders
    +[apiInstance createPurchaseOrderHistoryWith:xeroTenantId
    +    purchaseOrderID:purchaseOrderID
    +    historyRecords:historyRecords
    +              completionHandler: ^(HistoryRecords output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -29572,7 +28971,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -29582,43 +28981,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const purchaseOrders:PurchaseOrders = { purchaseOrders: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "710" }], date: "2019-03-13" }]}; // {PurchaseOrders} -const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created obejcts and any with validation errors +const historyRecords: HistoryRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // {HistoryRecords} +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const purchaseOrderID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a PurchaseOrder + try { - const response: any = await xero.accountingApi.createPurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors); + const response = await xero.accountingApi.createPurchaseOrderHistory(xeroTenantId, purchaseOrderID, historyRecords); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -29627,7 +29008,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createPurchaseOrdersExample + public class createPurchaseOrderHistoryExample { public void main() { @@ -29637,18 +29018,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var purchaseOrders = new PurchaseOrders(); // PurchaseOrders | - var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) + var purchaseOrderID = new UUID(); // UUID | Unique identifier for a PurchaseOrder (default to null) + var historyRecords = new HistoryRecords(); // HistoryRecords | try { - // Allows you to create one or more purchase orders - PurchaseOrders result = apiInstance.createPurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors); + // Allows you to create HistoryRecord for purchase orders + HistoryRecords result = apiInstance.createPurchaseOrderHistory(xeroTenantId, purchaseOrderID, historyRecords); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.createPurchaseOrders: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.createPurchaseOrderHistory: " + e.Message ); } } } @@ -29656,7 +29037,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -29674,12 +29055,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->createPurchaseOrders: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->createPurchaseOrderHistory: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -29689,19 +29070,19 @@ 

    Usage and SDK Samples

    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 obejcts and any with validation errors +my $purchaseOrderID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a PurchaseOrder +my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords | eval { - my $result = $api_instance->createPurchaseOrders(xeroTenantId => $xeroTenantId, purchaseOrders => $purchaseOrders, summarizeErrors => $summarizeErrors); + my $result = $api_instance->createPurchaseOrderHistory(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID, historyRecords => $historyRecords); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->createPurchaseOrders: $@\n"; + warn "Exception when calling AccountingApi->createPurchaseOrderHistory: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -29714,27 +29095,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -purchaseOrders = { purchaseOrders: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "710" }], date: "2019-03-13" }]} # PurchaseOrders | -summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) +purchaseOrderID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a PurchaseOrder (default to null) +historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | try: - # Allows you to create one or more purchase orders - api_response = api_instance.create_purchase_orders(xeroTenantId, purchaseOrders, summarizeErrors=summarizeErrors) + # Allows you to create HistoryRecord for purchase orders + api_response = api_instance.create_purchase_order_history(xeroTenantId, purchaseOrderID, historyRecords) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->createPurchaseOrders: %s\n" % e)
    + print("Exception when calling AccountingApi->createPurchaseOrderHistory: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let purchaseOrders = { purchaseOrders: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "710" }], date: "2019-03-13" }]}; // PurchaseOrders
    -    let summarizeErrors = true; // Boolean
    +    let purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID
    +    let historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.createPurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors, &context).wait();
    +    let result = client.createPurchaseOrderHistory(xeroTenantId, purchaseOrderID, historyRecords, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -29754,6 +29135,39 @@ 

    Scopes

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    PurchaseOrderID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for a PurchaseOrder +
    +
    +
    + Required +
    +
    +
    +
    Header parameters
    @@ -29765,7 +29179,7 @@

    Parameters

    - +
    -
    +
    @@ -29792,33 +29206,33 @@

    Parameters

    Name Description
    purchaseOrders *
    historyRecords *
    - PurchaseOrders + HistoryRecords
    -PurchaseOrders with an array of PurchaseOrder object in body of request +HistoryRecords containing an array of HistoryRecord objects in body of request
    Required
    - + -
    +
    -
    Query parameters
    - - - - - - - - - -
    NameDescription
    summarizeErrors - - -
    -
    -
    - - Boolean - - -
    -If false return 200 OK and mix of successfully created obejcts and any with validation errors -
    -
    -
    -
    -
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/Attachments/{FileName}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/PurchaseOrders?summarizeErrors=true"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -30073,21 +29460,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Quote object - String fileName = xero-dev.jpg; // String | Name of the attachment - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + PurchaseOrders purchaseOrders = { "PurchaseOrders": [ { "Contact": { "ContactID": "00000000-0000-0000-000-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 { - Attachments result = apiInstance.createQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body); + PurchaseOrders result = apiInstance.createPurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createQuoteAttachmentByFileName"); + System.err.println("Exception when calling AccountingApi#createPurchaseOrders"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -30095,42 +29481,39 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for Quote object - String fileName = xero-dev.jpg; // String | Name of the attachment - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + PurchaseOrders purchaseOrders = { "PurchaseOrders": [ { "Contact": { "ContactID": "00000000-0000-0000-000-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 { - Attachments result = apiInstance.createQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body); + PurchaseOrders result = apiInstance.createPurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createQuoteAttachmentByFileName"); + 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)
    -UUID *quoteID = 00000000-0000-0000-000-000000000000; // Unique identifier for Quote object (default to null)
    -String *fileName = xero-dev.jpg; // Name of the attachment (default to null)
    -byte[] *body = BYTE_ARRAY_DATA_HERE; // 
    +PurchaseOrders *purchaseOrders = { "PurchaseOrders": [ { "Contact": { "ContactID": "00000000-0000-0000-000-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];
     
    -// Allows you to create Attachment on Quote
    -[apiInstance createQuoteAttachmentByFileNameWith:xeroTenantId
    -    quoteID:quoteID
    -    fileName:fileName
    -    body:body
    -              completionHandler: ^(Attachments output, NSError* error) {
    +// Allows you to create one or more purchase orders
    +[apiInstance createPurchaseOrdersWith:xeroTenantId
    +    purchaseOrders:purchaseOrders
    +    summarizeErrors:summarizeErrors
    +              completionHandler: ^(PurchaseOrders output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -30141,7 +29524,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -30151,54 +29534,27 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const quoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for Quote object -const fileName = "xero-dev.jpg"; // {String} Name of the attachment -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 -// You'll need to add the import below to read your file -// import * as fs from "fs"; -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + + +const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created objects and any with validation errors +const purchaseOrders: PurchaseOrders = { purchaseOrders: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "710" }], date: "2019-03-13" }]} + try { - const response: any = await xero.accountingApi.createQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.createPurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -30207,7 +29563,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createQuoteAttachmentByFileNameExample + public class createPurchaseOrdersExample { public void main() { @@ -30217,19 +29573,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var quoteID = new UUID(); // UUID | Unique identifier for Quote object (default to null) - var fileName = xero-dev.jpg; // String | Name of the attachment (default to null) - var body = BYTE_ARRAY_DATA_HERE; // byte[] | + var purchaseOrders = new PurchaseOrders(); // PurchaseOrders | + var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) try { - // Allows you to create Attachment on Quote - Attachments result = apiInstance.createQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body); + // Allows you to create one or more purchase orders + PurchaseOrders result = apiInstance.createPurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.createQuoteAttachmentByFileName: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.createPurchaseOrders: " + e.Message ); } } } @@ -30237,7 +29592,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -30255,12 +29610,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->createQuoteAttachmentByFileName: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->createPurchaseOrders: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -30270,20 +29625,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $quoteID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for Quote object -my $fileName = xero-dev.jpg; # String | Name of the attachment -my $body = ::Object::byte[]->new(); # byte[] | +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->createQuoteAttachmentByFileName(xeroTenantId => $xeroTenantId, quoteID => $quoteID, fileName => $fileName, body => $body); + my $result = $api_instance->createPurchaseOrders(xeroTenantId => $xeroTenantId, purchaseOrders => $purchaseOrders, summarizeErrors => $summarizeErrors); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->createQuoteAttachmentByFileName: $@\n"; + warn "Exception when calling AccountingApi->createPurchaseOrders: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -30296,29 +29650,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -quoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Quote object (default to null) -fileName = xero-dev.jpg # String | Name of the attachment (default to null) -body = BYTE_ARRAY_DATA_HERE # byte[] | +purchaseOrders = { "PurchaseOrders": [ { "Contact": { "ContactID": "00000000-0000-0000-000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "710" } ], "Date": "2019-03-13" } ] } # PurchaseOrders | +summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) try: - # Allows you to create Attachment on Quote - api_response = api_instance.create_quote_attachment_by_file_name(xeroTenantId, quoteID, fileName, body) + # Allows you to create one or more purchase orders + api_response = api_instance.create_purchase_orders(xeroTenantId, purchaseOrders, summarizeErrors=summarizeErrors) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->createQuoteAttachmentByFileName: %s\n" % e)
    + print("Exception when calling AccountingApi->createPurchaseOrders: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let quoteID = 00000000-0000-0000-000-000000000000; // UUID
    -    let fileName = xero-dev.jpg; // String
    -    let body = BYTE_ARRAY_DATA_HERE; // byte[]
    +    let purchaseOrders = { "PurchaseOrders": [ { "Contact": { "ContactID": "00000000-0000-0000-000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "710" } ], "Date": "2019-03-13" } ] }; // PurchaseOrders
    +    let summarizeErrors = true; // Boolean
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.createQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body, &context).wait();
    +    let result = client.createPurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -30330,70 +29682,14 @@ 

    Scopes

    - - + +
    accounting.attachmentsGrant read-write access to attachmentsaccounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices

    Parameters

    -
    Path parameters
    - - - - - - - - - - - - - -
    NameDescription
    QuoteID* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Unique identifier for Quote object -
    -
    -
    - Required -
    -
    -
    -
    FileName* - - -
    -
    -
    - - String - - -
    -Name of the attachment -
    -
    -
    - Required -
    -
    -
    -
    Header parameters
    @@ -30405,7 +29701,7 @@

    Parameters

    - +
    -
    +
    @@ -30432,33 +29728,33 @@

    Parameters

    Name Description
    body *
    purchaseOrders *
    - byte[] + PurchaseOrders
    -Byte array of file in body of request +PurchaseOrders with an array of PurchaseOrder object in body of request
    Required
    - + -
    +
    +
    Query parameters
    + + + + + + + + + +
    NameDescription
    summarizeErrors + + +
    +
    +
    + + Boolean + + +
    +If false return 200 OK and mix of successfully created objects and any with validation errors +
    +
    +
    +
    +
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/History"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/Attachments/{FileName}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -30687,20 +30009,21 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for an Quote - HistoryRecords historyRecords = { historyRecords:[ { details :"Hello World" } ] }; // HistoryRecords | + UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Quote object + String fileName = xero-dev.jpg; // String | Name of the attachment + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - HistoryRecords result = apiInstance.createQuoteHistory(xeroTenantId, quoteID, historyRecords); + Attachments result = apiInstance.createQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createQuoteHistory"); + System.err.println("Exception when calling AccountingApi#createQuoteAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -30708,39 +30031,42 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for an Quote - HistoryRecords historyRecords = { historyRecords:[ { details :"Hello World" } ] }; // HistoryRecords | + UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Quote object + String fileName = xero-dev.jpg; // String | Name of the attachment + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - HistoryRecords result = apiInstance.createQuoteHistory(xeroTenantId, quoteID, historyRecords); + Attachments result = apiInstance.createQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createQuoteHistory"); + 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-000-000000000000; // Unique identifier for an Quote (default to null)
    -HistoryRecords *historyRecords = { historyRecords:[ { details :"Hello World" } ] }; // 
    +UUID *quoteID = 00000000-0000-0000-000-000000000000; // Unique identifier for Quote 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];
     
    -// Allows you to retrieve a history records of an quote
    -[apiInstance createQuoteHistoryWith:xeroTenantId
    +// Allows you to create Attachment on Quote
    +[apiInstance createQuoteAttachmentByFileNameWith:xeroTenantId
         quoteID:quoteID
    -    historyRecords:historyRecords
    -              completionHandler: ^(HistoryRecords output, NSError* error) {
    +    fileName:fileName
    +    body:body
    +              completionHandler: ^(Attachments output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -30751,7 +30077,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -30761,42 +30087,35 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const quoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for an Quote -const historyRecords:HistoryRecords = { historyRecords:[ { details :"Hello World" } ] }; // {HistoryRecords} + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const quoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for Quote object +const fileName = "xero-dev.jpg"; // {String} Name of the attachment +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 +import * as fs from "fs"; +const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file +const contentType = mime.lookup(fileName); + try { - const response: any = await xero.accountingApi.createQuoteHistory(xeroTenantId, quoteID, historyRecords); + const response = await xero.accountingApi.createQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body, { + headers: { + "Content-Type": contentType, + } + }); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -30805,7 +30124,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createQuoteHistoryExample + public class createQuoteAttachmentByFileNameExample { public void main() { @@ -30815,18 +30134,19 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var quoteID = new UUID(); // UUID | Unique identifier for an Quote (default to null) - var historyRecords = new HistoryRecords(); // HistoryRecords | + var quoteID = new UUID(); // UUID | Unique identifier for Quote object (default to null) + var fileName = xero-dev.jpg; // String | Name of the attachment (default to null) + var body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - // Allows you to retrieve a history records of an quote - HistoryRecords result = apiInstance.createQuoteHistory(xeroTenantId, quoteID, historyRecords); + // Allows you to create Attachment on Quote + Attachments result = apiInstance.createQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.createQuoteHistory: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.createQuoteAttachmentByFileName: " + e.Message ); } } } @@ -30834,7 +30154,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -30852,12 +30172,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->createQuoteHistory: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->createQuoteAttachmentByFileName: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -30867,19 +30187,20 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $quoteID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for an Quote -my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords | +my $quoteID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for Quote object +my $fileName = xero-dev.jpg; # String | Name of the attachment +my $body = ::Object::byte[]->new(); # byte[] | eval { - my $result = $api_instance->createQuoteHistory(xeroTenantId => $xeroTenantId, quoteID => $quoteID, historyRecords => $historyRecords); + my $result = $api_instance->createQuoteAttachmentByFileName(xeroTenantId => $xeroTenantId, quoteID => $quoteID, fileName => $fileName, body => $body); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->createQuoteHistory: $@\n"; + warn "Exception when calling AccountingApi->createQuoteAttachmentByFileName: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -30892,27 +30213,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -quoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for an Quote (default to null) -historyRecords = { historyRecords:[ { details :"Hello World" } ] } # HistoryRecords | +quoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Quote object (default to null) +fileName = xero-dev.jpg # String | Name of the attachment (default to null) +body = BYTE_ARRAY_DATA_HERE # byte[] | try: - # Allows you to retrieve a history records of an quote - api_response = api_instance.create_quote_history(xeroTenantId, quoteID, historyRecords) + # Allows you to create Attachment on Quote + api_response = api_instance.create_quote_attachment_by_file_name(xeroTenantId, quoteID, fileName, body) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->createQuoteHistory: %s\n" % e)
    + print("Exception when calling AccountingApi->createQuoteAttachmentByFileName: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
         let quoteID = 00000000-0000-0000-000-000000000000; // UUID
    -    let historyRecords = { historyRecords:[ { details :"Hello World" } ] }; // HistoryRecords
    +    let fileName = xero-dev.jpg; // String
    +    let body = BYTE_ARRAY_DATA_HERE; // byte[]
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.createQuoteHistory(xeroTenantId, quoteID, historyRecords, &context).wait();
    +    let result = client.createQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, body, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -30924,8 +30247,8 @@ 

    Scopes

    - - + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoicesaccounting.attachmentsGrant read-write access to attachments
    @@ -30942,7 +30265,7 @@

    Parameters

    -
    +
    @@ -30953,7 +30276,30 @@

    Parameters

    -Unique identifier for an Quote +Unique identifier for Quote object +
    +
    +
    + Required +
    +
    +
    + + + + FileName* + + + +
    +
    +
    + + String + + +
    +Name of the attachment
    @@ -30976,7 +30322,7 @@

    Parameters

    -
    +
    @@ -31003,33 +30349,33 @@

    Parameters

    Name Description - historyRecords * + body *
    - HistoryRecords + byte[]
    -HistoryRecords containing an array of HistoryRecord objects in body of request +Byte array of file in body of request
    Required
    - + -
    +
    @@ -31059,27 +30405,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes?summarizeErrors=true"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/History"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -31257,20 +30604,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - Quotes quotes = { quotes: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "12775" }], date:"2020-02-01" }]}; // Quotes | - Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors + UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for an Quote + HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords | try { - Quotes result = apiInstance.createQuotes(xeroTenantId, quotes, summarizeErrors); + HistoryRecords result = apiInstance.createQuoteHistory(xeroTenantId, quoteID, historyRecords); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createQuotes"); + System.err.println("Exception when calling AccountingApi#createQuoteHistory"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -31278,39 +30625,39 @@ 

    Usage and SDK Samples

    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-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "12775" }], date:"2020-02-01" }]}; // Quotes | - Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors + UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for an Quote + HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords | try { - Quotes result = apiInstance.createQuotes(xeroTenantId, quotes, summarizeErrors); + HistoryRecords result = apiInstance.createQuoteHistory(xeroTenantId, quoteID, historyRecords); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createQuotes"); + 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)
    -Quotes *quotes = { quotes: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "12775" }], date:"2020-02-01" }]}; // 
    -Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false)
    +UUID *quoteID = 00000000-0000-0000-000-000000000000; // Unique identifier for an Quote (default to null)
    +HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // 
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to create one or more quotes
    -[apiInstance createQuotesWith:xeroTenantId
    -    quotes:quotes
    -    summarizeErrors:summarizeErrors
    -              completionHandler: ^(Quotes output, NSError* error) {
    +// Allows you to retrieve a history records of an quote
    +[apiInstance createQuoteHistoryWith:xeroTenantId
    +    quoteID:quoteID
    +    historyRecords:historyRecords
    +              completionHandler: ^(HistoryRecords output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -31321,7 +30668,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -31331,43 +30678,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const quotes:Quotes = { quotes: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "12775" }], date:"2020-02-01" }]}; // {Quotes} -const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created obejcts and any with validation errors +const historyRecords: HistoryRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // {HistoryRecords} +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const quoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for an Quote + try { - const response: any = await xero.accountingApi.createQuotes(xeroTenantId, quotes, summarizeErrors); + const response = await xero.accountingApi.createQuoteHistory(xeroTenantId, quoteID, historyRecords); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -31376,7 +30705,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createQuotesExample + public class createQuoteHistoryExample { public void main() { @@ -31386,18 +30715,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var quotes = new Quotes(); // Quotes | - var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) + var quoteID = new UUID(); // UUID | Unique identifier for an Quote (default to null) + var historyRecords = new HistoryRecords(); // HistoryRecords | try { - // Allows you to create one or more quotes - Quotes result = apiInstance.createQuotes(xeroTenantId, quotes, summarizeErrors); + // Allows you to retrieve a history records of an quote + HistoryRecords result = apiInstance.createQuoteHistory(xeroTenantId, quoteID, historyRecords); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.createQuotes: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.createQuoteHistory: " + e.Message ); } } } @@ -31405,7 +30734,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -31423,12 +30752,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->createQuotes: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->createQuoteHistory: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -31438,19 +30767,19 @@ 

    Usage and SDK Samples

    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 obejcts and any with validation errors +my $quoteID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for an Quote +my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords | eval { - my $result = $api_instance->createQuotes(xeroTenantId => $xeroTenantId, quotes => $quotes, summarizeErrors => $summarizeErrors); + my $result = $api_instance->createQuoteHistory(xeroTenantId => $xeroTenantId, quoteID => $quoteID, historyRecords => $historyRecords); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->createQuotes: $@\n"; + warn "Exception when calling AccountingApi->createQuoteHistory: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -31463,27 +30792,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -quotes = { quotes: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "12775" }], date:"2020-02-01" }]} # Quotes | -summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) +quoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for an Quote (default to null) +historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | try: - # Allows you to create one or more quotes - api_response = api_instance.create_quotes(xeroTenantId, quotes, summarizeErrors=summarizeErrors) + # Allows you to retrieve a history records of an quote + api_response = api_instance.create_quote_history(xeroTenantId, quoteID, historyRecords) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->createQuotes: %s\n" % e)
    + print("Exception when calling AccountingApi->createQuoteHistory: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let quotes = { quotes: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "12775" }], date:"2020-02-01" }]}; // Quotes
    -    let summarizeErrors = true; // Boolean
    +    let quoteID = 00000000-0000-0000-000-000000000000; // UUID
    +    let historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.createQuotes(xeroTenantId, quotes, summarizeErrors, &context).wait();
    +    let result = client.createQuoteHistory(xeroTenantId, quoteID, historyRecords, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -31503,6 +30832,39 @@ 

    Scopes

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    QuoteID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for an Quote +
    +
    +
    + Required +
    +
    +
    +
    Header parameters
    @@ -31514,7 +30876,7 @@

    Parameters

    - +
    -
    +
    @@ -31541,33 +30903,33 @@

    Parameters

    Name Description
    quotes *
    historyRecords *
    - Quotes + HistoryRecords
    -Quotes with an array of Quote object in body of request +HistoryRecords containing an array of HistoryRecord objects in body of request
    Required
    - + -
    +
    -
    Query parameters
    - - - - - - - - - -
    NameDescription
    summarizeErrors - - -
    -
    -
    - - Boolean - - -
    -If false return 200 OK and mix of successfully created obejcts and any with validation errors -
    -
    -
    -
    -
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Receipts?unitdp=4"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes?summarizeErrors=true"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -31822,20 +31157,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - Receipts receipts = { receipts: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 2.0, unitAmount: 20.0, accountCode: "400", taxType: TaxType.NONE, lineAmount: 40.0 }], user: { userID: "00000000-0000-0000-000-000000000000" }, lineAmountTypes: LineAmountTypes.Inclusive, status: Receipt.StatusEnum.DRAFT, date: null} ] }; // Receipts | - Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + Quotes quotes = { "Quotes": [ { "Contact": { "ContactID": "00000000-0000-0000-000-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 { - Receipts result = apiInstance.createReceipt(xeroTenantId, receipts, unitdp); + Quotes result = apiInstance.createQuotes(xeroTenantId, quotes, summarizeErrors); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createReceipt"); + System.err.println("Exception when calling AccountingApi#createQuotes"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -31843,39 +31178,39 @@ 

    Usage and SDK Samples

    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-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 2.0, unitAmount: 20.0, accountCode: "400", taxType: TaxType.NONE, lineAmount: 40.0 }], user: { userID: "00000000-0000-0000-000-000000000000" }, lineAmountTypes: LineAmountTypes.Inclusive, status: Receipt.StatusEnum.DRAFT, date: null} ] }; // Receipts | - Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + Quotes quotes = { "Quotes": [ { "Contact": { "ContactID": "00000000-0000-0000-000-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 { - Receipts result = apiInstance.createReceipt(xeroTenantId, receipts, unitdp); + Quotes result = apiInstance.createQuotes(xeroTenantId, quotes, summarizeErrors); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createReceipt"); + 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)
    -Receipts *receipts = { receipts: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 2.0, unitAmount: 20.0, accountCode: "400", taxType: TaxType.NONE, lineAmount: 40.0 }], user: { userID: "00000000-0000-0000-000-000000000000" }, lineAmountTypes: LineAmountTypes.Inclusive, status: Receipt.StatusEnum.DRAFT, date: 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)
    +Quotes *quotes = { "Quotes": [ { "Contact": { "ContactID": "00000000-0000-0000-000-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];
     
    -// Allows you to create draft expense claim receipts for any user
    -[apiInstance createReceiptWith:xeroTenantId
    -    receipts:receipts
    -    unitdp:unitdp
    -              completionHandler: ^(Receipts output, NSError* error) {
    +// Allows you to create one or more quotes
    +[apiInstance createQuotesWith:xeroTenantId
    +    quotes:quotes
    +    summarizeErrors:summarizeErrors
    +              completionHandler: ^(Quotes output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -31886,7 +31221,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -31896,43 +31231,27 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const receipts:Receipts = { receipts: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 2.0, unitAmount: 20.0, accountCode: "400", taxType: TaxType.NONE, lineAmount: 40.0 }], user: { userID: "00000000-0000-0000-000-000000000000" }, lineAmountTypes: LineAmountTypes.Inclusive, status: Receipt.StatusEnum.DRAFT, date: null} ] }; // {Receipts} -const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + + +const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created objects and any with validation errors +const quotes: Quotes = { quotes: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "12775" }], date: "2020-02-01" }]} try { - const response: any = await xero.accountingApi.createReceipt(xeroTenantId, receipts, unitdp); + const response = await xero.accountingApi.createQuotes(xeroTenantId, quotes, summarizeErrors); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -31941,7 +31260,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createReceiptExample + public class createQuotesExample { public void main() { @@ -31951,18 +31270,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var receipts = new Receipts(); // Receipts | - var unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) + var quotes = new Quotes(); // Quotes | + var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) try { - // Allows you to create draft expense claim receipts for any user - Receipts result = apiInstance.createReceipt(xeroTenantId, receipts, unitdp); + // Allows you to create one or more quotes + Quotes result = apiInstance.createQuotes(xeroTenantId, quotes, summarizeErrors); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.createReceipt: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.createQuotes: " + e.Message ); } } } @@ -31970,7 +31289,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -31988,12 +31307,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->createReceipt: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->createQuotes: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -32003,19 +31322,19 @@ 

    Usage and SDK Samples

    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 +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->createReceipt(xeroTenantId => $xeroTenantId, receipts => $receipts, unitdp => $unitdp); + my $result = $api_instance->createQuotes(xeroTenantId => $xeroTenantId, quotes => $quotes, summarizeErrors => $summarizeErrors); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->createReceipt: $@\n"; + warn "Exception when calling AccountingApi->createQuotes: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -32028,27 +31347,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -receipts = { receipts: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 2.0, unitAmount: 20.0, accountCode: "400", taxType: TaxType.NONE, lineAmount: 40.0 }], user: { userID: "00000000-0000-0000-000-000000000000" }, lineAmountTypes: LineAmountTypes.Inclusive, status: Receipt.StatusEnum.DRAFT, date: null} ] } # Receipts | -unitdp = 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) +quotes = { "Quotes": [ { "Contact": { "ContactID": "00000000-0000-0000-000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "12775" } ], "Date": "2020-02-01" } ] } # Quotes | +summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) try: - # Allows you to create draft expense claim receipts for any user - api_response = api_instance.create_receipt(xeroTenantId, receipts, unitdp=unitdp) + # Allows you to create one or more quotes + api_response = api_instance.create_quotes(xeroTenantId, quotes, summarizeErrors=summarizeErrors) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->createReceipt: %s\n" % e)
    + print("Exception when calling AccountingApi->createQuotes: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let receipts = { receipts: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 2.0, unitAmount: 20.0, accountCode: "400", taxType: TaxType.NONE, lineAmount: 40.0 }], user: { userID: "00000000-0000-0000-000-000000000000" }, lineAmountTypes: LineAmountTypes.Inclusive, status: Receipt.StatusEnum.DRAFT, date: null} ] }; // Receipts
    -    let unitdp = 4; // Integer
    +    let quotes = { "Quotes": [ { "Contact": { "ContactID": "00000000-0000-0000-000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "12775" } ], "Date": "2020-02-01" } ] }; // Quotes
    +    let summarizeErrors = true; // Boolean
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.createReceipt(xeroTenantId, receipts, unitdp, &context).wait();
    +    let result = client.createQuotes(xeroTenantId, quotes, summarizeErrors, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -32079,7 +31398,7 @@ 

    Parameters

    -
    +
    @@ -32106,33 +31425,33 @@

    Parameters

    Name Description - receipts * + quotes *
    - Receipts + Quotes
    -Receipts with an array of Receipt object in body of request +Quotes with an array of Quote object in body of request
    Required
    - + -
    +
    @@ -32166,19 +31485,19 @@

    Parameters

    Name Description - unitdp + summarizeErrors -
    +
    - Integer + Boolean
    -e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts +If false return 200 OK and mix of successfully created objects and any with validation errors
    @@ -32189,27 +31508,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Receipts/{ReceiptID}/Attachments/{FileName}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Receipts?unitdp=4"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -32387,21 +31706,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID receiptID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Receipt - String fileName = xero-dev.jpg; // String | The name of the file being attached to the Receipt - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + Receipts receipts = { "Receipts": [ { "Contact": { "ContactID": "00000000-0000-0000-000-000000000000" }, "Lineitems": [ { "Description": "Foobar", "Quantity": 2, "UnitAmount": 20, "AccountCode": "400", "TaxType": "NONE", "LineAmount": 40 } ], "User": { "UserID": "00000000-0000-0000-000-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 { - Attachments result = apiInstance.createReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body); + Receipts result = apiInstance.createReceipt(xeroTenantId, receipts, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createReceiptAttachmentByFileName"); + System.err.println("Exception when calling AccountingApi#createReceipt"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -32409,42 +31727,39 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for a Receipt - String fileName = xero-dev.jpg; // String | The name of the file being attached to the Receipt - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + Receipts receipts = { "Receipts": [ { "Contact": { "ContactID": "00000000-0000-0000-000-000000000000" }, "Lineitems": [ { "Description": "Foobar", "Quantity": 2, "UnitAmount": 20, "AccountCode": "400", "TaxType": "NONE", "LineAmount": 40 } ], "User": { "UserID": "00000000-0000-0000-000-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 { - Attachments result = apiInstance.createReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body); + Receipts result = apiInstance.createReceipt(xeroTenantId, receipts, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createReceiptAttachmentByFileName"); + 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)
    -UUID *receiptID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Receipt (default to null)
    -String *fileName = xero-dev.jpg; // The name of the file being attached to the Receipt (default to null)
    -byte[] *body = BYTE_ARRAY_DATA_HERE; // 
    +Receipts *receipts = { "Receipts": [ { "Contact": { "ContactID": "00000000-0000-0000-000-000000000000" }, "Lineitems": [ { "Description": "Foobar", "Quantity": 2, "UnitAmount": 20, "AccountCode": "400", "TaxType": "NONE", "LineAmount": 40 } ], "User": { "UserID": "00000000-0000-0000-000-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];
     
    -// Allows you to create Attachment on expense claim receipts by file name
    -[apiInstance createReceiptAttachmentByFileNameWith:xeroTenantId
    -    receiptID:receiptID
    -    fileName:fileName
    -    body:body
    -              completionHandler: ^(Attachments output, NSError* error) {
    +// Allows you to create draft expense claim receipts for any user
    +[apiInstance createReceiptWith:xeroTenantId
    +    receipts:receipts
    +    unitdp:unitdp
    +              completionHandler: ^(Receipts output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -32455,7 +31770,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -32465,54 +31780,27 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const receiptID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Receipt -const fileName = "xero-dev.jpg"; // {String} The name of the file being attached to the Receipt -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 -// You'll need to add the import below to read your file -// import * as fs from "fs"; -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + + +const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts +const receipts: Receipts = { receipts: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 2.0, unitAmount: 20.0, accountCode: "400", taxType: TaxType.NONE, lineAmount: 40.0 }], user: { userID: "00000000-0000-0000-000-000000000000" }, lineAmountTypes: LineAmountTypes.Inclusive, status: Receipt.StatusEnum.DRAFT, date: null} ] } + try { - const response: any = await xero.accountingApi.createReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.createReceipt(xeroTenantId, receipts, unitdp); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -32521,7 +31809,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createReceiptAttachmentByFileNameExample + public class createReceiptExample { public void main() { @@ -32531,19 +31819,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var receiptID = new UUID(); // UUID | Unique identifier for a Receipt (default to null) - var fileName = xero-dev.jpg; // String | The name of the file being attached to the Receipt (default to null) - var body = BYTE_ARRAY_DATA_HERE; // byte[] | + var receipts = new Receipts(); // Receipts | + var unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try { - // Allows you to create Attachment on expense claim receipts by file name - Attachments result = apiInstance.createReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body); + // Allows you to create draft expense claim receipts for any user + Receipts result = apiInstance.createReceipt(xeroTenantId, receipts, unitdp); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.createReceiptAttachmentByFileName: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.createReceipt: " + e.Message ); } } } @@ -32551,7 +31838,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -32569,12 +31856,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->createReceiptAttachmentByFileName: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->createReceipt: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -32584,20 +31871,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $receiptID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a Receipt -my $fileName = xero-dev.jpg; # String | The name of the file being attached to the Receipt -my $body = ::Object::byte[]->new(); # byte[] | +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->createReceiptAttachmentByFileName(xeroTenantId => $xeroTenantId, receiptID => $receiptID, fileName => $fileName, body => $body); + my $result = $api_instance->createReceipt(xeroTenantId => $xeroTenantId, receipts => $receipts, unitdp => $unitdp); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->createReceiptAttachmentByFileName: $@\n"; + warn "Exception when calling AccountingApi->createReceipt: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -32610,29 +31896,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -receiptID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Receipt (default to null) -fileName = xero-dev.jpg # String | The name of the file being attached to the Receipt (default to null) -body = BYTE_ARRAY_DATA_HERE # byte[] | +receipts = { "Receipts": [ { "Contact": { "ContactID": "00000000-0000-0000-000-000000000000" }, "Lineitems": [ { "Description": "Foobar", "Quantity": 2, "UnitAmount": 20, "AccountCode": "400", "TaxType": "NONE", "LineAmount": 40 } ], "User": { "UserID": "00000000-0000-0000-000-000000000000" }, "LineAmountTypes": "NoTax", "Status": "DRAFT" } ] } # Receipts | +unitdp = 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try: - # Allows you to create Attachment on expense claim receipts by file name - api_response = api_instance.create_receipt_attachment_by_file_name(xeroTenantId, receiptID, fileName, body) + # Allows you to create draft expense claim receipts for any user + api_response = api_instance.create_receipt(xeroTenantId, receipts, unitdp=unitdp) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->createReceiptAttachmentByFileName: %s\n" % e)
    + print("Exception when calling AccountingApi->createReceipt: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let receiptID = 00000000-0000-0000-000-000000000000; // UUID
    -    let fileName = xero-dev.jpg; // String
    -    let body = BYTE_ARRAY_DATA_HERE; // byte[]
    +    let receipts = { "Receipts": [ { "Contact": { "ContactID": "00000000-0000-0000-000-000000000000" }, "Lineitems": [ { "Description": "Foobar", "Quantity": 2, "UnitAmount": 20, "AccountCode": "400", "TaxType": "NONE", "LineAmount": 40 } ], "User": { "UserID": "00000000-0000-0000-000-000000000000" }, "LineAmountTypes": "NoTax", "Status": "DRAFT" } ] }; // Receipts
    +    let unitdp = 4; // Integer
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.createReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body, &context).wait();
    +    let result = client.createReceipt(xeroTenantId, receipts, unitdp, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -32644,70 +31928,14 @@ 

    Scopes

    - - + +
    accounting.attachmentsGrant read-write access to attachmentsaccounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices

    Parameters

    -
    Path parameters
    - - - - - - - - - - - - - -
    NameDescription
    ReceiptID* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Unique identifier for a Receipt -
    -
    -
    - Required -
    -
    -
    -
    FileName* - - -
    -
    -
    - - String - - -
    -The name of the file being attached to the Receipt -
    -
    -
    - Required -
    -
    -
    -
    Header parameters
    @@ -32719,7 +31947,7 @@

    Parameters

    - +
    -
    +
    @@ -32746,33 +31974,33 @@

    Parameters

    Name Description
    body *
    receipts *
    - byte[] + Receipts
    -Byte array of file in body of request +Receipts with an array of Receipt object in body of request
    Required
    - + -
    +
    +
    Query parameters
    + + + + + + + + + +
    NameDescription
    unitdp + + +
    +
    +
    + + Integer + + +
    +e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts +
    +
    +
    +
    +
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Receipts/{ReceiptID}/History"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Receipts/{ReceiptID}/Attachments/{FileName}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -33002,19 +32256,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID receiptID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Receipt - HistoryRecords historyRecords = { historyRecords:[ { details :"Hello World" } ] }; // HistoryRecords | + String fileName = xero-dev.jpg; // String | The name of the file being attached to the Receipt + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - HistoryRecords result = apiInstance.createReceiptHistory(xeroTenantId, receiptID, historyRecords); + Attachments result = apiInstance.createReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createReceiptHistory"); + System.err.println("Exception when calling AccountingApi#createReceiptAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -33023,22 +32278,23 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID receiptID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Receipt - HistoryRecords historyRecords = { historyRecords:[ { details :"Hello World" } ] }; // HistoryRecords | + String fileName = xero-dev.jpg; // String | The name of the file being attached to the Receipt + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - HistoryRecords result = apiInstance.createReceiptHistory(xeroTenantId, receiptID, historyRecords); + Attachments result = apiInstance.createReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createReceiptHistory"); + System.err.println("Exception when calling AccountingApi#createReceiptAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -33046,15 +32302,17 @@ 

    Usage and SDK Samples

    String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null) UUID *receiptID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Receipt (default to null) -HistoryRecords *historyRecords = { historyRecords:[ { details :"Hello World" } ] }; // +String *fileName = xero-dev.jpg; // The name of the file being attached to the Receipt (default to null) +byte[] *body = BYTE_ARRAY_DATA_HERE; // AccountingApi *apiInstance = [[AccountingApi alloc] init]; -// Allows you to retrieve a history records of an Receipt -[apiInstance createReceiptHistoryWith:xeroTenantId +// Allows you to create Attachment on expense claim receipts by file name +[apiInstance createReceiptAttachmentByFileNameWith:xeroTenantId receiptID:receiptID - historyRecords:historyRecords - completionHandler: ^(HistoryRecords output, NSError* error) { + fileName:fileName + body:body + completionHandler: ^(Attachments output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -33065,7 +32323,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -33075,42 +32333,35 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const receiptID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Receipt -const historyRecords:HistoryRecords = { historyRecords:[ { details :"Hello World" } ] }; // {HistoryRecords} + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const receiptID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Receipt +const fileName = "xero-dev.jpg"; // {String} The name of the file being attached to the Receipt +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 +import * as fs from "fs"; +const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file +const contentType = mime.lookup(fileName); + try { - const response: any = await xero.accountingApi.createReceiptHistory(xeroTenantId, receiptID, historyRecords); + const response = await xero.accountingApi.createReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body, { + headers: { + "Content-Type": contentType, + } + }); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -33119,7 +32370,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createReceiptHistoryExample + public class createReceiptAttachmentByFileNameExample { public void main() { @@ -33130,17 +32381,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) var receiptID = new UUID(); // UUID | Unique identifier for a Receipt (default to null) - var historyRecords = new HistoryRecords(); // HistoryRecords | + var fileName = xero-dev.jpg; // String | The name of the file being attached to the Receipt (default to null) + var body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - // Allows you to retrieve a history records of an Receipt - HistoryRecords result = apiInstance.createReceiptHistory(xeroTenantId, receiptID, historyRecords); + // Allows you to create Attachment on expense claim receipts by file name + Attachments result = apiInstance.createReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.createReceiptHistory: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.createReceiptAttachmentByFileName: " + e.Message ); } } } @@ -33148,7 +32400,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -33166,12 +32418,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->createReceiptHistory: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->createReceiptAttachmentByFileName: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -33182,18 +32434,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant my $receiptID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a Receipt -my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords | +my $fileName = xero-dev.jpg; # String | The name of the file being attached to the Receipt +my $body = ::Object::byte[]->new(); # byte[] | eval { - my $result = $api_instance->createReceiptHistory(xeroTenantId => $xeroTenantId, receiptID => $receiptID, historyRecords => $historyRecords); + my $result = $api_instance->createReceiptAttachmentByFileName(xeroTenantId => $xeroTenantId, receiptID => $receiptID, fileName => $fileName, body => $body); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->createReceiptHistory: $@\n"; + warn "Exception when calling AccountingApi->createReceiptAttachmentByFileName: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -33207,26 +32460,28 @@ 

    Usage and SDK Samples

    api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) receiptID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Receipt (default to null) -historyRecords = { historyRecords:[ { details :"Hello World" } ] } # HistoryRecords | +fileName = xero-dev.jpg # String | The name of the file being attached to the Receipt (default to null) +body = BYTE_ARRAY_DATA_HERE # byte[] | try: - # Allows you to retrieve a history records of an Receipt - api_response = api_instance.create_receipt_history(xeroTenantId, receiptID, historyRecords) + # Allows you to create Attachment on expense claim receipts by file name + api_response = api_instance.create_receipt_attachment_by_file_name(xeroTenantId, receiptID, fileName, body) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->createReceiptHistory: %s\n" % e)
    + print("Exception when calling AccountingApi->createReceiptAttachmentByFileName: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
         let receiptID = 00000000-0000-0000-000-000000000000; // UUID
    -    let historyRecords = { historyRecords:[ { details :"Hello World" } ] }; // HistoryRecords
    +    let fileName = xero-dev.jpg; // String
    +    let body = BYTE_ARRAY_DATA_HERE; // byte[]
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.createReceiptHistory(xeroTenantId, receiptID, historyRecords, &context).wait();
    +    let result = client.createReceiptAttachmentByFileName(xeroTenantId, receiptID, fileName, body, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -33238,8 +32493,8 @@ 

    Scopes

    - - + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoicesaccounting.attachmentsGrant read-write access to attachments
    @@ -33256,7 +32511,7 @@

    Parameters

    -
    +
    @@ -33276,6 +32531,29 @@

    Parameters

    + + + FileName* + + + +
    +
    +
    + + String + + +
    +The name of the file being attached to the Receipt +
    +
    +
    + Required +
    +
    +
    + @@ -33290,7 +32568,7 @@

    Parameters

    -
    +
    @@ -33317,33 +32595,33 @@

    Parameters

    Name Description - historyRecords * + body *
    - HistoryRecords + byte[]
    -HistoryRecords containing an array of HistoryRecord objects in body of request +Byte array of file in body of request
    Required
    - + -
    +
    @@ -33373,27 +32651,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Receipts/{ReceiptID}/History"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -33572,21 +32850,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID repeatingInvoiceID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Repeating Invoice - String fileName = xero-dev.jpg; // String | The name of the file being attached to a Repeating Invoice - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + UUID receiptID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Receipt + HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords | try { - Attachments result = apiInstance.createRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body); + HistoryRecords result = apiInstance.createReceiptHistory(xeroTenantId, receiptID, historyRecords); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createRepeatingInvoiceAttachmentByFileName"); + System.err.println("Exception when calling AccountingApi#createReceiptHistory"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -33594,42 +32871,39 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for a Repeating Invoice - String fileName = xero-dev.jpg; // String | The name of the file being attached to a Repeating Invoice - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + UUID receiptID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Receipt + HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords | try { - Attachments result = apiInstance.createRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body); + HistoryRecords result = apiInstance.createReceiptHistory(xeroTenantId, receiptID, historyRecords); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createRepeatingInvoiceAttachmentByFileName"); + 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 *repeatingInvoiceID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Repeating Invoice (default to null)
    -String *fileName = xero-dev.jpg; // The name of the file being attached to a Repeating Invoice (default to null)
    -byte[] *body = BYTE_ARRAY_DATA_HERE; // 
    +UUID *receiptID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Receipt (default to null)
    +HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // 
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to create attachment on repeating invoices by file name
    -[apiInstance createRepeatingInvoiceAttachmentByFileNameWith:xeroTenantId
    -    repeatingInvoiceID:repeatingInvoiceID
    -    fileName:fileName
    -    body:body
    -              completionHandler: ^(Attachments output, NSError* error) {
    +// Allows you to retrieve a history records of an Receipt
    +[apiInstance createReceiptHistoryWith:xeroTenantId
    +    receiptID:receiptID
    +    historyRecords:historyRecords
    +              completionHandler: ^(HistoryRecords output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -33640,7 +32914,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -33650,54 +32924,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const repeatingInvoiceID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Repeating Invoice -const fileName = "xero-dev.jpg"; // {String} The name of the file being attached to a Repeating Invoice -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 historyRecords: HistoryRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // {HistoryRecords} +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const receiptID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Receipt + -// You'll need to add the import below to read your file -// import * as fs from "fs"; -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); try { - const response: any = await xero.accountingApi.createRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.createReceiptHistory(xeroTenantId, receiptID, historyRecords); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -33706,7 +32951,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createRepeatingInvoiceAttachmentByFileNameExample + public class createReceiptHistoryExample { public void main() { @@ -33716,19 +32961,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var repeatingInvoiceID = new UUID(); // UUID | Unique identifier for a Repeating Invoice (default to null) - var fileName = xero-dev.jpg; // String | The name of the file being attached to a Repeating Invoice (default to null) - var body = BYTE_ARRAY_DATA_HERE; // byte[] | + var receiptID = new UUID(); // UUID | Unique identifier for a Receipt (default to null) + var historyRecords = new HistoryRecords(); // HistoryRecords | try { - // Allows you to create attachment on repeating invoices by file name - Attachments result = apiInstance.createRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body); + // Allows you to retrieve a history records of an Receipt + HistoryRecords result = apiInstance.createReceiptHistory(xeroTenantId, receiptID, historyRecords); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.createRepeatingInvoiceAttachmentByFileName: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.createReceiptHistory: " + e.Message ); } } } @@ -33736,7 +32980,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -33754,12 +32998,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->createRepeatingInvoiceAttachmentByFileName: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->createReceiptHistory: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -33769,20 +33013,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $repeatingInvoiceID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a Repeating Invoice -my $fileName = xero-dev.jpg; # String | The name of the file being attached to a Repeating Invoice -my $body = ::Object::byte[]->new(); # byte[] | +my $receiptID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a Receipt +my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords | eval { - my $result = $api_instance->createRepeatingInvoiceAttachmentByFileName(xeroTenantId => $xeroTenantId, repeatingInvoiceID => $repeatingInvoiceID, fileName => $fileName, body => $body); + my $result = $api_instance->createReceiptHistory(xeroTenantId => $xeroTenantId, receiptID => $receiptID, historyRecords => $historyRecords); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->createRepeatingInvoiceAttachmentByFileName: $@\n"; + warn "Exception when calling AccountingApi->createReceiptHistory: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -33795,29 +33038,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -repeatingInvoiceID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Repeating Invoice (default to null) -fileName = xero-dev.jpg # String | The name of the file being attached to a Repeating Invoice (default to null) -body = BYTE_ARRAY_DATA_HERE # byte[] | +receiptID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Receipt (default to null) +historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | try: - # Allows you to create attachment on repeating invoices by file name - api_response = api_instance.create_repeating_invoice_attachment_by_file_name(xeroTenantId, repeatingInvoiceID, fileName, body) + # Allows you to retrieve a history records of an Receipt + api_response = api_instance.create_receipt_history(xeroTenantId, receiptID, historyRecords) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->createRepeatingInvoiceAttachmentByFileName: %s\n" % e)
    + print("Exception when calling AccountingApi->createReceiptHistory: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let repeatingInvoiceID = 00000000-0000-0000-000-000000000000; // UUID
    -    let fileName = xero-dev.jpg; // String
    -    let body = BYTE_ARRAY_DATA_HERE; // byte[]
    +    let receiptID = 00000000-0000-0000-000-000000000000; // UUID
    +    let historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.createRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body, &context).wait();
    +    let result = client.createReceiptHistory(xeroTenantId, receiptID, historyRecords, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -33829,8 +33070,8 @@ 

    Scopes

    - - + +
    accounting.attachmentsGrant read-write access to attachmentsaccounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    @@ -33843,11 +33084,11 @@

    Parameters

    Name Description - RepeatingInvoiceID* + ReceiptID* -
    +
    @@ -33858,30 +33099,7 @@

    Parameters

    -Unique identifier for a Repeating Invoice -
    -
    -
    - Required -
    -
    -
    - - - - FileName* - - - -
    -
    -
    - - String - - -
    -The name of the file being attached to a Repeating Invoice +Unique identifier for a Receipt
    @@ -33904,7 +33122,7 @@

    Parameters

    -
    +
    @@ -33931,33 +33149,33 @@

    Parameters

    Name Description - body * + historyRecords *
    - byte[] + HistoryRecords
    -Byte array of file in body of request +HistoryRecords containing an array of HistoryRecord objects in body of request
    Required
    - + -
    +
    @@ -33987,27 +33205,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/RepeatingInvoices/{RepeatingInvoiceID}/History"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -34187,19 +33405,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID repeatingInvoiceID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Repeating Invoice - HistoryRecords historyRecords = { historyRecords:[ { details :"Hello World" } ] }; // HistoryRecords | + String fileName = xero-dev.jpg; // String | The name of the file being attached to a Repeating Invoice + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - HistoryRecords result = apiInstance.createRepeatingInvoiceHistory(xeroTenantId, repeatingInvoiceID, historyRecords); + Attachments result = apiInstance.createRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createRepeatingInvoiceHistory"); + System.err.println("Exception when calling AccountingApi#createRepeatingInvoiceAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -34208,22 +33427,23 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID repeatingInvoiceID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Repeating Invoice - HistoryRecords historyRecords = { historyRecords:[ { details :"Hello World" } ] }; // HistoryRecords | + String fileName = xero-dev.jpg; // String | The name of the file being attached to a Repeating Invoice + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - HistoryRecords result = apiInstance.createRepeatingInvoiceHistory(xeroTenantId, repeatingInvoiceID, historyRecords); + Attachments result = apiInstance.createRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createRepeatingInvoiceHistory"); + System.err.println("Exception when calling AccountingApi#createRepeatingInvoiceAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -34231,15 +33451,17 @@ 

    Usage and SDK Samples

    String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null) UUID *repeatingInvoiceID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Repeating Invoice (default to null) -HistoryRecords *historyRecords = { historyRecords:[ { details :"Hello World" } ] }; // +String *fileName = xero-dev.jpg; // The name of the file being attached to a Repeating Invoice (default to null) +byte[] *body = BYTE_ARRAY_DATA_HERE; // AccountingApi *apiInstance = [[AccountingApi alloc] init]; -// Allows you to create history for a repeating invoice -[apiInstance createRepeatingInvoiceHistoryWith:xeroTenantId +// Allows you to create attachment on repeating invoices by file name +[apiInstance createRepeatingInvoiceAttachmentByFileNameWith:xeroTenantId repeatingInvoiceID:repeatingInvoiceID - historyRecords:historyRecords - completionHandler: ^(HistoryRecords output, NSError* error) { + fileName:fileName + body:body + completionHandler: ^(Attachments output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -34250,7 +33472,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -34260,42 +33482,35 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const repeatingInvoiceID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Repeating Invoice -const historyRecords:HistoryRecords = { historyRecords:[ { details :"Hello World" } ] }; // {HistoryRecords} + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const repeatingInvoiceID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Repeating Invoice +const fileName = "xero-dev.jpg"; // {String} The name of the file being attached to a Repeating Invoice +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 +import * as fs from "fs"; +const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file +const contentType = mime.lookup(fileName); + try { - const response: any = await xero.accountingApi.createRepeatingInvoiceHistory(xeroTenantId, repeatingInvoiceID, historyRecords); + const response = await xero.accountingApi.createRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body, { + headers: { + "Content-Type": contentType, + } + }); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -34304,7 +33519,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createRepeatingInvoiceHistoryExample + public class createRepeatingInvoiceAttachmentByFileNameExample { public void main() { @@ -34315,17 +33530,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) var repeatingInvoiceID = new UUID(); // UUID | Unique identifier for a Repeating Invoice (default to null) - var historyRecords = new HistoryRecords(); // HistoryRecords | + var fileName = xero-dev.jpg; // String | The name of the file being attached to a Repeating Invoice (default to null) + var body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - // Allows you to create history for a repeating invoice - HistoryRecords result = apiInstance.createRepeatingInvoiceHistory(xeroTenantId, repeatingInvoiceID, historyRecords); + // Allows you to create attachment on repeating invoices by file name + Attachments result = apiInstance.createRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.createRepeatingInvoiceHistory: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.createRepeatingInvoiceAttachmentByFileName: " + e.Message ); } } } @@ -34333,7 +33549,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -34351,12 +33567,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->createRepeatingInvoiceHistory: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->createRepeatingInvoiceAttachmentByFileName: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -34367,18 +33583,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant my $repeatingInvoiceID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a Repeating Invoice -my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords | +my $fileName = xero-dev.jpg; # String | The name of the file being attached to a Repeating Invoice +my $body = ::Object::byte[]->new(); # byte[] | eval { - my $result = $api_instance->createRepeatingInvoiceHistory(xeroTenantId => $xeroTenantId, repeatingInvoiceID => $repeatingInvoiceID, historyRecords => $historyRecords); + my $result = $api_instance->createRepeatingInvoiceAttachmentByFileName(xeroTenantId => $xeroTenantId, repeatingInvoiceID => $repeatingInvoiceID, fileName => $fileName, body => $body); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->createRepeatingInvoiceHistory: $@\n"; + warn "Exception when calling AccountingApi->createRepeatingInvoiceAttachmentByFileName: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -34392,26 +33609,28 @@ 

    Usage and SDK Samples

    api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) repeatingInvoiceID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Repeating Invoice (default to null) -historyRecords = { historyRecords:[ { details :"Hello World" } ] } # HistoryRecords | +fileName = xero-dev.jpg # String | The name of the file being attached to a Repeating Invoice (default to null) +body = BYTE_ARRAY_DATA_HERE # byte[] | try: - # Allows you to create history for a repeating invoice - api_response = api_instance.create_repeating_invoice_history(xeroTenantId, repeatingInvoiceID, historyRecords) + # Allows you to create attachment on repeating invoices by file name + api_response = api_instance.create_repeating_invoice_attachment_by_file_name(xeroTenantId, repeatingInvoiceID, fileName, body) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->createRepeatingInvoiceHistory: %s\n" % e)
    + print("Exception when calling AccountingApi->createRepeatingInvoiceAttachmentByFileName: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
         let repeatingInvoiceID = 00000000-0000-0000-000-000000000000; // UUID
    -    let historyRecords = { historyRecords:[ { details :"Hello World" } ] }; // HistoryRecords
    +    let fileName = xero-dev.jpg; // String
    +    let body = BYTE_ARRAY_DATA_HERE; // byte[]
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.createRepeatingInvoiceHistory(xeroTenantId, repeatingInvoiceID, historyRecords, &context).wait();
    +    let result = client.createRepeatingInvoiceAttachmentByFileName(xeroTenantId, repeatingInvoiceID, fileName, body, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -34423,8 +33642,8 @@ 

    Scopes

    - - + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoicesaccounting.attachmentsGrant read-write access to attachments
    @@ -34441,7 +33660,7 @@

    Parameters

    -
    +
    @@ -34461,6 +33680,29 @@

    Parameters

    + + + FileName* + + + +
    +
    +
    + + String + + +
    +The name of the file being attached to a Repeating Invoice +
    +
    +
    + Required +
    +
    +
    + @@ -34475,7 +33717,7 @@

    Parameters

    -
    +
    @@ -34502,33 +33744,33 @@

    Parameters

    Name Description - historyRecords * + body *
    - HistoryRecords + byte[]
    -HistoryRecords containing an array of HistoryRecord objects in body of request +Byte array of file in body of request
    Required
    - + -
    +
    @@ -34558,27 +33800,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/TaxRates"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/RepeatingInvoices/{RepeatingInvoiceID}/History"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -34756,19 +33999,20 @@ 

    Usage and SDK Samples

    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 | + UUID repeatingInvoiceID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Repeating Invoice + HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords | try { - TaxRates result = apiInstance.createTaxRates(xeroTenantId, taxRates); + HistoryRecords result = apiInstance.createRepeatingInvoiceHistory(xeroTenantId, repeatingInvoiceID, historyRecords); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createTaxRates"); + System.err.println("Exception when calling AccountingApi#createRepeatingInvoiceHistory"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -34776,36 +34020,39 @@ 

    Usage and SDK Samples

    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 | + UUID repeatingInvoiceID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Repeating Invoice + HistoryRecords historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords | try { - TaxRates result = apiInstance.createTaxRates(xeroTenantId, taxRates); + HistoryRecords result = apiInstance.createRepeatingInvoiceHistory(xeroTenantId, repeatingInvoiceID, historyRecords); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createTaxRates"); + 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)
    -TaxRates *taxRates = { taxRates: [{ name: "CA State Tax", taxComponents: [{ name: "State Tax", rate: 2.25 }]}]}; // 
    +UUID *repeatingInvoiceID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Repeating Invoice (default to null)
    +HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // 
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to create one or more Tax Rates
    -[apiInstance createTaxRatesWith:xeroTenantId
    -    taxRates:taxRates
    -              completionHandler: ^(TaxRates output, NSError* error) {
    +// Allows you to create history for a repeating invoice
    +[apiInstance createRepeatingInvoiceHistoryWith:xeroTenantId
    +    repeatingInvoiceID:repeatingInvoiceID
    +    historyRecords:historyRecords
    +              completionHandler: ^(HistoryRecords output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -34816,7 +34063,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -34826,41 +34073,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const taxRates:TaxRates = { taxRates: [{ name: "CA State Tax", taxComponents: [{ name: "State Tax", rate: 2.25 }]}]}; // {TaxRates} +const historyRecords: HistoryRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // {HistoryRecords} +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const repeatingInvoiceID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Repeating Invoice + + try { - const response: any = await xero.accountingApi.createTaxRates(xeroTenantId, taxRates); + const response = await xero.accountingApi.createRepeatingInvoiceHistory(xeroTenantId, repeatingInvoiceID, historyRecords); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -34869,7 +34100,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createTaxRatesExample + public class createRepeatingInvoiceHistoryExample { public void main() { @@ -34879,17 +34110,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var taxRates = new TaxRates(); // TaxRates | + var repeatingInvoiceID = new UUID(); // UUID | Unique identifier for a Repeating Invoice (default to null) + var historyRecords = new HistoryRecords(); // HistoryRecords | try { - // Allows you to create one or more Tax Rates - TaxRates result = apiInstance.createTaxRates(xeroTenantId, taxRates); + // Allows you to create history for a repeating invoice + HistoryRecords result = apiInstance.createRepeatingInvoiceHistory(xeroTenantId, repeatingInvoiceID, historyRecords); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.createTaxRates: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.createRepeatingInvoiceHistory: " + e.Message ); } } } @@ -34897,7 +34129,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -34915,12 +34147,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->createTaxRates: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->createRepeatingInvoiceHistory: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -34930,18 +34162,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $taxRates = ::Object::TaxRates->new(); # TaxRates | +my $repeatingInvoiceID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a Repeating Invoice +my $historyRecords = ::Object::HistoryRecords->new(); # HistoryRecords | eval { - my $result = $api_instance->createTaxRates(xeroTenantId => $xeroTenantId, taxRates => $taxRates); + my $result = $api_instance->createRepeatingInvoiceHistory(xeroTenantId => $xeroTenantId, repeatingInvoiceID => $repeatingInvoiceID, historyRecords => $historyRecords); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->createTaxRates: $@\n"; + warn "Exception when calling AccountingApi->createRepeatingInvoiceHistory: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -34954,25 +34187,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -taxRates = { taxRates: [{ name: "CA State Tax", taxComponents: [{ name: "State Tax", rate: 2.25 }]}]} # TaxRates | +repeatingInvoiceID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Repeating Invoice (default to null) +historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | try: - # Allows you to create one or more Tax Rates - api_response = api_instance.create_tax_rates(xeroTenantId, taxRates) + # Allows you to create history for a repeating invoice + api_response = api_instance.create_repeating_invoice_history(xeroTenantId, repeatingInvoiceID, historyRecords) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->createTaxRates: %s\n" % e)
    + print("Exception when calling AccountingApi->createRepeatingInvoiceHistory: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let taxRates = { taxRates: [{ name: "CA State Tax", taxComponents: [{ name: "State Tax", rate: 2.25 }]}]}; // TaxRates
    +    let repeatingInvoiceID = 00000000-0000-0000-000-000000000000; // UUID
    +    let historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.createTaxRates(xeroTenantId, taxRates, &context).wait();
    +    let result = client.createRepeatingInvoiceHistory(xeroTenantId, repeatingInvoiceID, historyRecords, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -34984,14 +34219,47 @@ 

    Scopes

    - - + +
    accounting.settingsGrant read-write access to organisation and account settingsaccounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    RepeatingInvoiceID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for a Repeating Invoice +
    +
    +
    + Required +
    +
    +
    +
    Header parameters
    @@ -35003,7 +34271,7 @@

    Parameters

    - + @@ -35086,27 +34354,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/TrackingCategories"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/TaxRates"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -35284,19 +34552,19 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - TrackingCategory trackingCategory = { name: "FooBar" }; // TrackingCategory | + TaxRates taxRates = { "TaxRates": [ { "Name": "CA State Tax", "TaxComponents": [ { "Name": "State Tax", "Rate": 2.25 } ] } ] }; // TaxRates | try { - TrackingCategories result = apiInstance.createTrackingCategory(xeroTenantId, trackingCategory); + TaxRates result = apiInstance.createTaxRates(xeroTenantId, taxRates); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createTrackingCategory"); + System.err.println("Exception when calling AccountingApi#createTaxRates"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -35304,36 +34572,36 @@ 

    Usage and SDK Samples

    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 | + TaxRates taxRates = { "TaxRates": [ { "Name": "CA State Tax", "TaxComponents": [ { "Name": "State Tax", "Rate": 2.25 } ] } ] }; // TaxRates | try { - TrackingCategories result = apiInstance.createTrackingCategory(xeroTenantId, trackingCategory); + TaxRates result = apiInstance.createTaxRates(xeroTenantId, taxRates); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createTrackingCategory"); + 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)
    -TrackingCategory *trackingCategory = { name: "FooBar" }; // 
    +TaxRates *taxRates = { "TaxRates": [ { "Name": "CA State Tax", "TaxComponents": [ { "Name": "State Tax", "Rate": 2.25 } ] } ] }; // 
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to create tracking categories
    -[apiInstance createTrackingCategoryWith:xeroTenantId
    -    trackingCategory:trackingCategory
    -              completionHandler: ^(TrackingCategories output, NSError* error) {
    +// Allows you to create one or more Tax Rates
    +[apiInstance createTaxRatesWith:xeroTenantId
    +    taxRates:taxRates
    +              completionHandler: ^(TaxRates output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -35344,7 +34612,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -35354,41 +34622,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const trackingCategory:TrackingCategory = { name: "FooBar" }; // {TrackingCategory} + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const taxRates: TaxRates = { taxRates: [{ name: "CA State Tax", taxComponents: [{ name: "State Tax", rate: 2.25 }]}]} + try { - const response: any = await xero.accountingApi.createTrackingCategory(xeroTenantId, trackingCategory); + const response = await xero.accountingApi.createTaxRates(xeroTenantId, taxRates); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -35397,7 +34648,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createTrackingCategoryExample + public class createTaxRatesExample { public void main() { @@ -35407,17 +34658,17 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var trackingCategory = new TrackingCategory(); // TrackingCategory | + var taxRates = new TaxRates(); // TaxRates | try { - // Allows you to create tracking categories - TrackingCategories result = apiInstance.createTrackingCategory(xeroTenantId, trackingCategory); + // Allows you to create one or more Tax Rates + TaxRates result = apiInstance.createTaxRates(xeroTenantId, taxRates); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.createTrackingCategory: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.createTaxRates: " + e.Message ); } } } @@ -35425,7 +34676,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -35443,12 +34694,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->createTrackingCategory: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->createTaxRates: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -35458,18 +34709,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $trackingCategory = ::Object::TrackingCategory->new(); # TrackingCategory | +my $taxRates = ::Object::TaxRates->new(); # TaxRates | eval { - my $result = $api_instance->createTrackingCategory(xeroTenantId => $xeroTenantId, trackingCategory => $trackingCategory); + my $result = $api_instance->createTaxRates(xeroTenantId => $xeroTenantId, taxRates => $taxRates); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->createTrackingCategory: $@\n"; + warn "Exception when calling AccountingApi->createTaxRates: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -35482,25 +34733,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -trackingCategory = { name: "FooBar" } # TrackingCategory | +taxRates = { "TaxRates": [ { "Name": "CA State Tax", "TaxComponents": [ { "Name": "State Tax", "Rate": 2.25 } ] } ] } # TaxRates | try: - # Allows you to create tracking categories - api_response = api_instance.create_tracking_category(xeroTenantId, trackingCategory) + # Allows you to create one or more Tax Rates + api_response = api_instance.create_tax_rates(xeroTenantId, taxRates) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->createTrackingCategory: %s\n" % e)
    + print("Exception when calling AccountingApi->createTaxRates: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let trackingCategory = { name: "FooBar" }; // TrackingCategory
    +    let taxRates = { "TaxRates": [ { "Name": "CA State Tax", "TaxComponents": [ { "Name": "State Tax", "Rate": 2.25 } ] } ] }; // TaxRates
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.createTrackingCategory(xeroTenantId, trackingCategory, &context).wait();
    +    let result = client.createTaxRates(xeroTenantId, taxRates, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -35531,7 +34782,7 @@ 

    Parameters

    - + @@ -35614,27 +34865,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/TrackingCategories/{TrackingCategoryID}/Options"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/TrackingCategories"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -35812,20 +35063,19 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID trackingCategoryID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a TrackingCategory - TrackingOption trackingOption = { name: " Bar" }; // TrackingOption | + TrackingCategory trackingCategory = { name: "FooBar" }; // TrackingCategory | try { - TrackingOptions result = apiInstance.createTrackingOptions(xeroTenantId, trackingCategoryID, trackingOption); + TrackingCategories result = apiInstance.createTrackingCategory(xeroTenantId, trackingCategory); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createTrackingOptions"); + System.err.println("Exception when calling AccountingApi#createTrackingCategory"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -35833,39 +35083,36 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for a TrackingCategory - TrackingOption trackingOption = { name: " Bar" }; // TrackingOption | + TrackingCategory trackingCategory = { name: "FooBar" }; // TrackingCategory | try { - TrackingOptions result = apiInstance.createTrackingOptions(xeroTenantId, trackingCategoryID, trackingOption); + TrackingCategories result = apiInstance.createTrackingCategory(xeroTenantId, trackingCategory); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#createTrackingOptions"); + 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)
    -UUID *trackingCategoryID = 00000000-0000-0000-000-000000000000; // Unique identifier for a TrackingCategory (default to null)
    -TrackingOption *trackingOption = { name: " Bar" }; // 
    +TrackingCategory *trackingCategory = { name: "FooBar" }; // 
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to create options for a specified tracking category
    -[apiInstance createTrackingOptionsWith:xeroTenantId
    -    trackingCategoryID:trackingCategoryID
    -    trackingOption:trackingOption
    -              completionHandler: ^(TrackingOptions output, NSError* error) {
    +// Allows you to create tracking categories
    +[apiInstance createTrackingCategoryWith:xeroTenantId
    +    trackingCategory:trackingCategory
    +              completionHandler: ^(TrackingCategories output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -35876,7 +35123,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -35886,42 +35133,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const trackingCategoryID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a TrackingCategory -const trackingOption:TrackingOption = { name: " Bar" }; // {TrackingOption} +const trackingCategory: TrackingCategory = { name: "FooBar" }; // {TrackingCategory} +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + + try { - const response: any = await xero.accountingApi.createTrackingOptions(xeroTenantId, trackingCategoryID, trackingOption); + const response = await xero.accountingApi.createTrackingCategory(xeroTenantId, trackingCategory); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -35930,7 +35159,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createTrackingOptionsExample + public class createTrackingCategoryExample { public void main() { @@ -35940,18 +35169,17 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var trackingCategoryID = new UUID(); // UUID | Unique identifier for a TrackingCategory (default to null) - var trackingOption = new TrackingOption(); // TrackingOption | + var trackingCategory = new TrackingCategory(); // TrackingCategory | try { - // Allows you to create options for a specified tracking category - TrackingOptions result = apiInstance.createTrackingOptions(xeroTenantId, trackingCategoryID, trackingOption); + // Allows you to create tracking categories + TrackingCategories result = apiInstance.createTrackingCategory(xeroTenantId, trackingCategory); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.createTrackingOptions: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.createTrackingCategory: " + e.Message ); } } } @@ -35959,7 +35187,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -35977,12 +35205,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->createTrackingOptions: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->createTrackingCategory: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -35992,19 +35220,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $trackingCategoryID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a TrackingCategory -my $trackingOption = ::Object::TrackingOption->new(); # TrackingOption | +my $trackingCategory = ::Object::TrackingCategory->new(); # TrackingCategory | eval { - my $result = $api_instance->createTrackingOptions(xeroTenantId => $xeroTenantId, trackingCategoryID => $trackingCategoryID, trackingOption => $trackingOption); + my $result = $api_instance->createTrackingCategory(xeroTenantId => $xeroTenantId, trackingCategory => $trackingCategory); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->createTrackingOptions: $@\n"; + warn "Exception when calling AccountingApi->createTrackingCategory: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -36017,27 +35244,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -trackingCategoryID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a TrackingCategory (default to null) -trackingOption = { name: " Bar" } # TrackingOption | +trackingCategory = { name: "FooBar" } # TrackingCategory | try: - # Allows you to create options for a specified tracking category - api_response = api_instance.create_tracking_options(xeroTenantId, trackingCategoryID, trackingOption) + # Allows you to create tracking categories + api_response = api_instance.create_tracking_category(xeroTenantId, trackingCategory) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->createTrackingOptions: %s\n" % e)
    + print("Exception when calling AccountingApi->createTrackingCategory: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let trackingCategoryID = 00000000-0000-0000-000-000000000000; // UUID
    -    let trackingOption = { name: " Bar" }; // TrackingOption
    +    let trackingCategory = { name: "FooBar" }; // TrackingCategory
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.createTrackingOptions(xeroTenantId, trackingCategoryID, trackingOption, &context).wait();
    +    let result = client.createTrackingCategory(xeroTenantId, trackingCategory, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -36057,39 +35282,6 @@ 

    Scopes

    Parameters

    -
    Path parameters
    -
    -
    +
    @@ -35030,33 +34298,33 @@

    Parameters

    Name Description
    taxRates *
    historyRecords *
    - TaxRates + HistoryRecords
    -TaxRates array with TaxRate object in body of request +HistoryRecords containing an array of HistoryRecord objects in body of request
    Required
    - + -
    +
    -
    +
    @@ -35558,33 +34809,33 @@

    Parameters

    Name Description
    trackingCategory *
    taxRates *
    - TrackingCategory + TaxRates
    -TrackingCategory object in body of request +TaxRates array with TaxRate object in body of request
    Required
    - + -
    +
    - - - - - - - - -
    NameDescription
    TrackingCategoryID* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Unique identifier for a TrackingCategory -
    -
    -
    - Required -
    -
    -
    -
    Header parameters
    @@ -36101,7 +35293,7 @@

    Parameters

    - + @@ -36184,27 +35376,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Accounts/{AccountID}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/TrackingCategories/{TrackingCategoryID}/Options"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -36382,19 +35574,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID accountID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for retrieving single object + UUID trackingCategoryID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a TrackingCategory + TrackingOption trackingOption = { name: " Bar" }; // TrackingOption | try { - Accounts result = apiInstance.deleteAccount(xeroTenantId, accountID); + TrackingOptions result = apiInstance.createTrackingOptions(xeroTenantId, trackingCategoryID, trackingOption); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#deleteAccount"); + System.err.println("Exception when calling AccountingApi#createTrackingOptions"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -36402,36 +35595,39 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for retrieving single object + UUID trackingCategoryID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a TrackingCategory + TrackingOption trackingOption = { name: " Bar" }; // TrackingOption | try { - Accounts result = apiInstance.deleteAccount(xeroTenantId, accountID); + TrackingOptions result = apiInstance.createTrackingOptions(xeroTenantId, trackingCategoryID, trackingOption); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#deleteAccount"); + 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 *accountID = 00000000-0000-0000-000-000000000000; // Unique identifier for retrieving single object (default to null)
    +UUID *trackingCategoryID = 00000000-0000-0000-000-000000000000; // Unique identifier for a TrackingCategory (default to null)
    +TrackingOption *trackingOption = { name: " Bar" }; // 
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to delete a chart of accounts
    -[apiInstance deleteAccountWith:xeroTenantId
    -    accountID:accountID
    -              completionHandler: ^(Accounts output, NSError* error) {
    +// Allows you to create options for a specified tracking category
    +[apiInstance createTrackingOptionsWith:xeroTenantId
    +    trackingCategoryID:trackingCategoryID
    +    trackingOption:trackingOption
    +              completionHandler: ^(TrackingOptions output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -36442,7 +35638,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -36452,41 +35648,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const accountID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for retrieving single object +const trackingOption: TrackingOption = { name: " Bar" }; // {TrackingOption} +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const trackingCategoryID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a TrackingCategory + + try { - const response: any = await xero.accountingApi.deleteAccount(xeroTenantId, accountID); + const response = await xero.accountingApi.createTrackingOptions(xeroTenantId, trackingCategoryID, trackingOption); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -36495,7 +35675,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class deleteAccountExample + public class createTrackingOptionsExample { public void main() { @@ -36505,17 +35685,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var accountID = new UUID(); // UUID | Unique identifier for retrieving single object (default to null) + var trackingCategoryID = new UUID(); // UUID | Unique identifier for a TrackingCategory (default to null) + var trackingOption = new TrackingOption(); // TrackingOption | try { - // Allows you to delete a chart of accounts - Accounts result = apiInstance.deleteAccount(xeroTenantId, accountID); + // Allows you to create options for a specified tracking category + TrackingOptions result = apiInstance.createTrackingOptions(xeroTenantId, trackingCategoryID, trackingOption); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.deleteAccount: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.createTrackingOptions: " + e.Message ); } } } @@ -36523,7 +35704,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -36541,12 +35722,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->deleteAccount: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->createTrackingOptions: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -36556,18 +35737,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $accountID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for retrieving single object +my $trackingCategoryID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a TrackingCategory +my $trackingOption = ::Object::TrackingOption->new(); # TrackingOption | eval { - my $result = $api_instance->deleteAccount(xeroTenantId => $xeroTenantId, accountID => $accountID); + my $result = $api_instance->createTrackingOptions(xeroTenantId => $xeroTenantId, trackingCategoryID => $trackingCategoryID, trackingOption => $trackingOption); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->deleteAccount: $@\n"; + warn "Exception when calling AccountingApi->createTrackingOptions: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -36580,25 +35762,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -accountID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for retrieving single object (default to null) +trackingCategoryID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a TrackingCategory (default to null) +trackingOption = { name: " Bar" } # TrackingOption | try: - # Allows you to delete a chart of accounts - api_response = api_instance.delete_account(xeroTenantId, accountID) + # Allows you to create options for a specified tracking category + api_response = api_instance.create_tracking_options(xeroTenantId, trackingCategoryID, trackingOption) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->deleteAccount: %s\n" % e)
    + print("Exception when calling AccountingApi->createTrackingOptions: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let accountID = 00000000-0000-0000-000-000000000000; // UUID
    +    let trackingCategoryID = 00000000-0000-0000-000-000000000000; // UUID
    +    let trackingOption = { name: " Bar" }; // TrackingOption
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.deleteAccount(xeroTenantId, accountID, &context).wait();
    +    let result = client.createTrackingOptions(xeroTenantId, trackingCategoryID, trackingOption, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -36624,11 +35808,11 @@ 

    Parameters

    - +
    -
    +
    @@ -36128,33 +35320,33 @@

    Parameters

    Name Description
    trackingOption *
    trackingCategory *
    - TrackingOption + TrackingCategory
    -TrackingOption object in body of request +TrackingCategory object in body of request
    Required
    - + -
    +
    Name Description
    AccountID*
    TrackingCategoryID* -
    +
    @@ -36639,7 +35823,7 @@

    Parameters

    -Unique identifier for retrieving single object +Unique identifier for a TrackingCategory
    @@ -36662,7 +35846,7 @@

    Parameters

    -
    +
    @@ -36683,31 +35867,89 @@

    Parameters

    +
    Body parameters
    + + + + + + + + + +
    NameDescription
    trackingOption * +
    +
    + + TrackingOption + + +
    +TrackingOption object in body of request +
    +
    +
    + Required +
    +
    + + +
    +
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/ContactGroups/{ContactGroupID}/Contacts/{ContactID}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Accounts/{AccountID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -36886,19 +36127,19 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID contactGroupID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Contact Group - UUID contactID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Contact + UUID accountID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for retrieving single object try { - apiInstance.deleteContactGroupContact(xeroTenantId, contactGroupID, contactID); + Accounts result = apiInstance.deleteAccount(xeroTenantId, accountID); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#deleteContactGroupContact"); + System.err.println("Exception when calling AccountingApi#deleteAccount"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -36906,38 +36147,39 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for a Contact Group - UUID contactID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Contact + UUID accountID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for retrieving single object try { - apiInstance.deleteContactGroupContact(xeroTenantId, contactGroupID, contactID); + Accounts result = apiInstance.deleteAccount(xeroTenantId, accountID); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#deleteContactGroupContact"); + 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 *contactGroupID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Contact Group (default to null)
    -UUID *contactID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Contact (default to null)
    +UUID *accountID = 00000000-0000-0000-000-000000000000; // Unique identifier for retrieving single object (default to null)
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to delete a specific Contact from a Contact Group
    -[apiInstance deleteContactGroupContactWith:xeroTenantId
    -    contactGroupID:contactGroupID
    -    contactID:contactID
    -              completionHandler: ^(NSError* error) {
    +// Allows you to delete a chart of accounts
    +[apiInstance deleteAccountWith:xeroTenantId
    +    accountID:accountID
    +              completionHandler: ^(Accounts output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
                                 if (error) {
                                     NSLog(@"Error: %@", error);
                                 }
    @@ -36945,7 +36187,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -36955,42 +36197,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const contactGroupID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Contact Group -const contactID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Contact + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const accountID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for retrieving single object + try { - const response: any = await xero.accountingApi.deleteContactGroupContact(xeroTenantId, contactGroupID, contactID); + const response = await xero.accountingApi.deleteAccount(xeroTenantId, accountID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -36999,7 +36223,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class deleteContactGroupContactExample + public class deleteAccountExample { public void main() { @@ -37009,17 +36233,17 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var contactGroupID = new UUID(); // UUID | Unique identifier for a Contact Group (default to null) - var contactID = new UUID(); // UUID | Unique identifier for a Contact (default to null) + var accountID = new UUID(); // UUID | Unique identifier for retrieving single object (default to null) try { - // Allows you to delete a specific Contact from a Contact Group - apiInstance.deleteContactGroupContact(xeroTenantId, contactGroupID, contactID); + // Allows you to delete a chart of accounts + Accounts result = apiInstance.deleteAccount(xeroTenantId, accountID); + Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.deleteContactGroupContact: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.deleteAccount: " + e.Message ); } } } @@ -37027,7 +36251,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -37045,12 +36269,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->deleteContactGroupContact: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->deleteAccount: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -37060,18 +36284,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $contactGroupID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a Contact Group -my $contactID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a Contact +my $accountID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for retrieving single object eval { - $api_instance->deleteContactGroupContact(xeroTenantId => $xeroTenantId, contactGroupID => $contactGroupID, contactID => $contactID); + my $result = $api_instance->deleteAccount(xeroTenantId => $xeroTenantId, accountID => $accountID); + print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->deleteContactGroupContact: $@\n"; + warn "Exception when calling AccountingApi->deleteAccount: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -37084,26 +36308,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -contactGroupID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Contact Group (default to null) -contactID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Contact (default to null) +accountID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for retrieving single object (default to null) try: - # Allows you to delete a specific Contact from a Contact Group - api_instance.delete_contact_group_contact(xeroTenantId, contactGroupID, contactID) + # Allows you to delete a chart of accounts + api_response = api_instance.delete_account(xeroTenantId, accountID) + pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->deleteContactGroupContact: %s\n" % e)
    + print("Exception when calling AccountingApi->deleteAccount: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let contactGroupID = 00000000-0000-0000-000-000000000000; // UUID
    -    let contactID = 00000000-0000-0000-000-000000000000; // UUID
    +    let accountID = 00000000-0000-0000-000-000000000000; // UUID
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.deleteContactGroupContact(xeroTenantId, contactGroupID, contactID, &context).wait();
    +    let result = client.deleteAccount(xeroTenantId, accountID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -37115,8 +36338,8 @@ 

    Scopes

    - - + +
    accounting.contactsGrant read-write access to contacts and contact groupsaccounting.settingsGrant read-write access to organisation and account settings
    @@ -37129,37 +36352,11 @@

    Parameters

    Name Description - ContactGroupID* - - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Unique identifier for a Contact Group -
    -
    -
    - Required -
    -
    -
    - - - - ContactID* + AccountID* -
    +
    @@ -37170,7 +36367,7 @@

    Parameters

    -Unique identifier for a Contact +Unique identifier for retrieving single object
    @@ -37193,7 +36390,7 @@

    Parameters

    -
    +
    @@ -37218,51 +36415,97 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/ContactGroups/{ContactGroupID}/Contacts"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/ContactGroups/{ContactGroupID}/Contacts/{ContactID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -37371,17 +36615,18 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID contactGroupID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Contact Group + UUID contactID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Contact try { - apiInstance.deleteContactGroupContacts(xeroTenantId, contactGroupID); + apiInstance.deleteContactGroupContact(xeroTenantId, contactGroupID, contactID); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#deleteContactGroupContacts"); + System.err.println("Exception when calling AccountingApi#deleteContactGroupContact"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -37390,20 +36635,21 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID contactGroupID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Contact Group + UUID contactID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Contact try { - apiInstance.deleteContactGroupContacts(xeroTenantId, contactGroupID); + apiInstance.deleteContactGroupContact(xeroTenantId, contactGroupID, contactID); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#deleteContactGroupContacts"); + System.err.println("Exception when calling AccountingApi#deleteContactGroupContact"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -37411,12 +36657,14 @@ 

    Usage and SDK Samples

    String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null) UUID *contactGroupID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Contact Group (default to null) +UUID *contactID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Contact (default to null) AccountingApi *apiInstance = [[AccountingApi alloc] init]; -// Allows you to delete all Contacts from a Contact Group -[apiInstance deleteContactGroupContactsWith:xeroTenantId +// Allows you to delete a specific Contact from a Contact Group +[apiInstance deleteContactGroupContactWith:xeroTenantId contactGroupID:contactGroupID + contactID:contactID completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error: %@", error); @@ -37425,7 +36673,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -37435,41 +36683,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant const contactGroupID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Contact Group +const contactID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Contact + try { - const response: any = await xero.accountingApi.deleteContactGroupContacts(xeroTenantId, contactGroupID); + const response = await xero.accountingApi.deleteContactGroupContact(xeroTenantId, contactGroupID, contactID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -37478,7 +36710,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class deleteContactGroupContactsExample + public class deleteContactGroupContactExample { public void main() { @@ -37489,15 +36721,477 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) var contactGroupID = new UUID(); // UUID | Unique identifier for a Contact Group (default to null) + var contactID = new UUID(); // UUID | Unique identifier for a Contact (default to null) try { - // Allows you to delete all Contacts from a Contact Group - apiInstance.deleteContactGroupContacts(xeroTenantId, contactGroupID); + // Allows you to delete a specific Contact from a Contact Group + apiInstance.deleteContactGroupContact(xeroTenantId, contactGroupID, contactID); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.deleteContactGroupContacts: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.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' );	
    +$config->setHost("https://api.xero.com/api.xro/2.0");        
    +
    +$xeroTenantId =  'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
    +
    +$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
    +    new GuzzleHttp\Client(),
    +    $config
    +);
    +
    +try { 
    +} 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-000-000000000000; # UUID | Unique identifier for a Contact Group
    +my $contactID = 00000000-0000-0000-000-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";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import 
    +from .rest import ApiException
    +from pprint import pprint
    +
    +# Configure OAuth2 access token for authorization: OAuth2
    +.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    +
    +# create an instance of the API class
    +api_instance = .AccountingApi()
    +xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null)
    +contactGroupID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Contact Group (default to null)
    +contactID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Contact (default to null)
    +
    +try: 
    +    # Allows you to delete a specific Contact from a Contact Group
    +    api_instance.delete_contact_group_contact(xeroTenantId, contactGroupID, contactID)
    +except ApiException as e:
    +    print("Exception when calling AccountingApi->deleteContactGroupContact: %s\n" % e)
    +
    + +
    +
    extern crate AccountingApi;
    +
    +pub fn main() {
    +    let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    +    let contactGroupID = 00000000-0000-0000-000-000000000000; // UUID
    +    let contactID = 00000000-0000-0000-000-000000000000; // UUID
    +
    +    let mut context = AccountingApi::Context::default();
    +    let result = client.deleteContactGroupContact(xeroTenantId, contactGroupID, contactID, &context).wait();
    +    println!("{:?}", result);
    +
    +}
    +
    +
    +
    + +

    Scopes

    + + + + + + + +
    accounting.contactsGrant read-write access to contacts and contact groups
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    ContactGroupID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for a Contact Group +
    +
    +
    + Required +
    +
    +
    +
    ContactID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for a Contact +
    +
    +
    + Required +
    +
    +
    +
    + +
    Header parameters
    + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +
    +
    +
    +
    +
    +

    deleteContactGroupContacts

    +

    Allows you to delete all Contacts from a 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.*;
    +import org.openapitools.client.auth.*;
    +import org.openapitools.client.model.*;
    +import org.openapitools.client.api.AccountingApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class AccountingApiExample {
    +
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +        
    +        // Configure OAuth2 access token for authorization: OAuth2
    +        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
    +        OAuth2.setAccessToken("YOUR ACCESS TOKEN");
    +
    +        AccountingApi apiInstance = new AccountingApi();
    +        String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
    +        UUID contactGroupID = 00000000-0000-0000-000-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();
    +        }
    +    }
    +}
    +
    + +
    +
    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-000-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-000-000000000000; // Unique identifier for a Contact Group (default to null)
    +
    +AccountingApi *apiInstance = [[AccountingApi alloc] init];
    +
    +// Allows you to delete  all Contacts from a Contact Group
    +[apiInstance deleteContactGroupContactsWith:xeroTenantId
    +    contactGroupID:contactGroupID
    +              completionHandler: ^(NSError* error) {
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    const tokenSet: TokenSet =  {
    +  id_token: 'xxx',
    +  access_token: 'yyy',
    +  expires_at: 1582308862,
    +  token_type: 'Bearer',
    +  refresh_token: 'zzz',
    +  session_state: 'xxx'
    +}
    +await xero.setTokenSet(tokenSet);
    +
    +const xeroTenantId = "YOUR_XERO_TENANT_ID";  // {String} Xero identifier for Tenant
    +const contactGroupID = "00000000-0000-0000-000-000000000000";  // {UUID} Unique identifier for a Contact Group
    +
    +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 .Api;
    +using .Client;
    +using .Model;
    +
    +namespace Example
    +{
    +    public class deleteContactGroupContactsExample
    +    {
    +        public void main()
    +        {
    +            
    +            // Configure OAuth2 access token for authorization: OAuth2
    +            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    +
    +            var apiInstance = new AccountingApi();
    +            var xeroTenantId = YOUR_XERO_TENANT_ID;  // String | Xero identifier for Tenant (default to null)
    +            var contactGroupID = new UUID(); // UUID | Unique identifier for a Contact Group (default to null)
    +
    +            try
    +            {
    +                // Allows you to delete  all Contacts from a Contact Group
    +                apiInstance.deleteContactGroupContacts(xeroTenantId, contactGroupID);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling AccountingApi.deleteContactGroupContacts: " + e.Message );
                 }
             }
         }
    @@ -37815,35 +37509,18 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant const itemID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for an Item + try { - const response: any = await xero.accountingApi.deleteItem(xeroTenantId, itemID); + const response = await xero.accountingApi.deleteItem(xeroTenantId, itemID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    -
    +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - + - + - + - + - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Organisation/{OrganisationID}/CISSettings"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Organisation/Actions"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -71763,19 +70288,18 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID organisationID = 00000000-0000-0000-000-000000000000; // UUID | The unique Xero identifier for an organisation try { - CISOrgSetting result = apiInstance.getOrganisationCISSettings(xeroTenantId, organisationID); + Actions result = apiInstance.getOrganisationActions(xeroTenantId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getOrganisationCISSettings"); + System.err.println("Exception when calling AccountingApi#getOrganisationActions"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -71783,36 +70307,33 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | The unique Xero identifier for an organisation try { - CISOrgSetting result = apiInstance.getOrganisationCISSettings(xeroTenantId, organisationID); + Actions result = apiInstance.getOrganisationActions(xeroTenantId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getOrganisationCISSettings"); + 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)
    -UUID *organisationID = 00000000-0000-0000-000-000000000000; // The unique Xero identifier for an organisation (default to null)
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you To verify if an organisation is using contruction industry scheme, you can retrieve the CIS settings for the organistaion.
    -[apiInstance getOrganisationCISSettingsWith:xeroTenantId
    -    organisationID:organisationID
    -              completionHandler: ^(CISOrgSetting output, NSError* error) {
    +// Retrieve a list of the key actions your app has permission to perform in the connected organisation.
    +[apiInstance getOrganisationActionsWith:xeroTenantId
    +              completionHandler: ^(Actions output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -71823,7 +70344,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -71833,41 +70354,23 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const organisationID = "00000000-0000-0000-000-000000000000"; // {UUID} The unique Xero identifier for an organisation + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + try { - const response: any = await xero.accountingApi.getOrganisationCISSettings(xeroTenantId, organisationID); + const response = await xero.accountingApi.getOrganisationActions(xeroTenantId); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -71876,7 +70379,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getOrganisationCISSettingsExample + public class getOrganisationActionsExample { public void main() { @@ -71886,17 +70389,16 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var organisationID = new UUID(); // UUID | The unique Xero identifier for an organisation (default to null) try { - // Allows you To verify if an organisation is using contruction industry scheme, you can retrieve the CIS settings for the organistaion. - CISOrgSetting result = apiInstance.getOrganisationCISSettings(xeroTenantId, organisationID); + // Retrieve a list of the key actions your app has permission to perform in the connected organisation. + Actions result = apiInstance.getOrganisationActions(xeroTenantId); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.getOrganisationCISSettings: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.getOrganisationActions: " + e.Message ); } } } @@ -71904,7 +70406,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -71922,12 +70424,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->getOrganisationCISSettings: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->getOrganisationActions: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -71937,18 +70439,17 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $organisationID = 00000000-0000-0000-000-000000000000; # UUID | The unique Xero identifier for an organisation eval { - my $result = $api_instance->getOrganisationCISSettings(xeroTenantId => $xeroTenantId, organisationID => $organisationID); + my $result = $api_instance->getOrganisationActions(xeroTenantId => $xeroTenantId); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->getOrganisationCISSettings: $@\n"; + warn "Exception when calling AccountingApi->getOrganisationActions: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -71961,25 +70462,23 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -organisationID = 00000000-0000-0000-000-000000000000 # UUID | The unique Xero identifier for an organisation (default to null) try: - # Allows you To verify if an organisation is using contruction industry scheme, you can retrieve the CIS settings for the organistaion. - api_response = api_instance.get_organisation_cis_settings(xeroTenantId, organisationID) + # Retrieve a list of the key actions your app has permission to perform in the connected organisation. + api_response = api_instance.get_organisation_actions(xeroTenantId) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->getOrganisationCISSettings: %s\n" % e)
    + print("Exception when calling AccountingApi->getOrganisationActions: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let organisationID = 00000000-0000-0000-000-000000000000; // UUID
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.getOrganisationCISSettings(xeroTenantId, organisationID, &context).wait();
    +    let result = client.getOrganisationActions(xeroTenantId, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -71999,39 +70498,6 @@ 

    Scopes

    Parameters

    -
    Path parameters
    - - - - - - - - - -
    NameDescription
    OrganisationID* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -The unique Xero identifier for an organisation -
    -
    -
    - Required -
    -
    -
    -
    Header parameters
    @@ -72043,7 +70509,7 @@

    Parameters

    - + + + + + + + + + + + + + + + +
    -
    +
    @@ -72068,27 +70534,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Organisation"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Organisation/{OrganisationID}/CISSettings"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -72196,18 +70663,19 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant + UUID organisationID = 00000000-0000-0000-000-000000000000; // UUID | The unique Xero identifier for an organisation try { - Organisations result = apiInstance.getOrganisations(xeroTenantId); + CISOrgSetting result = apiInstance.getOrganisationCISSettings(xeroTenantId, organisationID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getOrganisations"); + System.err.println("Exception when calling AccountingApi#getOrganisationCISSettings"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -72215,33 +70683,36 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | The unique Xero identifier for an organisation try { - Organisations result = apiInstance.getOrganisations(xeroTenantId); + CISOrgSetting result = apiInstance.getOrganisationCISSettings(xeroTenantId, organisationID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getOrganisations"); + 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-000-000000000000; // The unique Xero identifier for an organisation (default to null)
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to retrieve Organisation details
    -[apiInstance getOrganisationsWith:xeroTenantId
    -              completionHandler: ^(Organisations output, NSError* error) {
    +// Allows you To verify if an organisation is using contruction industry scheme, you can retrieve the CIS settings for the organistaion.
    +[apiInstance getOrganisationCISSettingsWith:xeroTenantId
    +    organisationID:organisationID
    +              completionHandler: ^(CISOrgSetting output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -72252,7 +70723,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -72262,40 +70733,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - + const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const organisationID = "00000000-0000-0000-000-000000000000"; // {UUID} The unique Xero identifier for an organisation + try { - const response: any = await xero.accountingApi.getOrganisations(xeroTenantId); + const response = await xero.accountingApi.getOrganisationCISSettings(xeroTenantId, organisationID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -72304,7 +70759,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getOrganisationsExample + public class getOrganisationCISSettingsExample { public void main() { @@ -72314,16 +70769,17 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) + var organisationID = new UUID(); // UUID | The unique Xero identifier for an organisation (default to null) try { - // Allows you to retrieve Organisation details - Organisations result = apiInstance.getOrganisations(xeroTenantId); + // Allows you To verify if an organisation is using contruction industry scheme, you can retrieve the CIS settings for the organistaion. + CISOrgSetting result = apiInstance.getOrganisationCISSettings(xeroTenantId, organisationID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.getOrganisations: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.getOrganisationCISSettings: " + e.Message ); } } } @@ -72331,7 +70787,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -72349,12 +70805,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->getOrganisations: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->getOrganisationCISSettings: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -72364,17 +70820,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant +my $organisationID = 00000000-0000-0000-000-000000000000; # UUID | The unique Xero identifier for an organisation eval { - my $result = $api_instance->getOrganisations(xeroTenantId => $xeroTenantId); + my $result = $api_instance->getOrganisationCISSettings(xeroTenantId => $xeroTenantId, organisationID => $organisationID); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->getOrganisations: $@\n"; + warn "Exception when calling AccountingApi->getOrganisationCISSettings: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -72387,23 +70844,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) +organisationID = 00000000-0000-0000-000-000000000000 # UUID | The unique Xero identifier for an organisation (default to null) try: - # Allows you to retrieve Organisation details - api_response = api_instance.get_organisations(xeroTenantId) + # Allows you To verify if an organisation is using contruction industry scheme, you can retrieve the CIS settings for the organistaion. + api_response = api_instance.get_organisation_cis_settings(xeroTenantId, organisationID) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->getOrganisations: %s\n" % e)
    + print("Exception when calling AccountingApi->getOrganisationCISSettings: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    +    let organisationID = 00000000-0000-0000-000-000000000000; // UUID
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.getOrganisations(xeroTenantId, &context).wait();
    +    let result = client.getOrganisationCISSettings(xeroTenantId, organisationID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -72423,6 +70882,39 @@ 

    Scopes

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    OrganisationID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +The unique Xero identifier for an organisation +
    +
    +
    + Required +
    +
    +
    +
    Header parameters
    @@ -72434,7 +70926,7 @@

    Parameters

    - -
    -
    +
    @@ -72459,27 +70951,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Overpayments/{OverpaymentID}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Organisation"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -72588,19 +71079,18 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID overpaymentID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Overpayment try { - Overpayments result = apiInstance.getOverpayment(xeroTenantId, overpaymentID); + Organisations result = apiInstance.getOrganisations(xeroTenantId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getOverpayment"); + System.err.println("Exception when calling AccountingApi#getOrganisations"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -72608,36 +71098,33 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for a Overpayment try { - Overpayments result = apiInstance.getOverpayment(xeroTenantId, overpaymentID); + Organisations result = apiInstance.getOrganisations(xeroTenantId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getOverpayment"); + 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)
    -UUID *overpaymentID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Overpayment (default to null)
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to retrieve a specified overpayments
    -[apiInstance getOverpaymentWith:xeroTenantId
    -    overpaymentID:overpaymentID
    -              completionHandler: ^(Overpayments output, NSError* error) {
    +// Allows you to retrieve Organisation details
    +[apiInstance getOrganisationsWith:xeroTenantId
    +              completionHandler: ^(Organisations output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -72648,7 +71135,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -72658,41 +71145,23 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const overpaymentID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Overpayment + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + try { - const response: any = await xero.accountingApi.getOverpayment(xeroTenantId, overpaymentID); + const response = await xero.accountingApi.getOrganisations(xeroTenantId); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -72701,7 +71170,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getOverpaymentExample + public class getOrganisationsExample { public void main() { @@ -72711,17 +71180,16 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var overpaymentID = new UUID(); // UUID | Unique identifier for a Overpayment (default to null) try { - // Allows you to retrieve a specified overpayments - Overpayments result = apiInstance.getOverpayment(xeroTenantId, overpaymentID); + // Allows you to retrieve Organisation details + Organisations result = apiInstance.getOrganisations(xeroTenantId); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.getOverpayment: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.getOrganisations: " + e.Message ); } } } @@ -72729,7 +71197,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -72747,12 +71215,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->getOverpayment: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->getOrganisations: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -72762,18 +71230,17 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $overpaymentID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a Overpayment eval { - my $result = $api_instance->getOverpayment(xeroTenantId => $xeroTenantId, overpaymentID => $overpaymentID); + my $result = $api_instance->getOrganisations(xeroTenantId => $xeroTenantId); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->getOverpayment: $@\n"; + warn "Exception when calling AccountingApi->getOrganisations: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -72786,25 +71253,23 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -overpaymentID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Overpayment (default to null) try: - # Allows you to retrieve a specified overpayments - api_response = api_instance.get_overpayment(xeroTenantId, overpaymentID) + # Allows you to retrieve Organisation details + api_response = api_instance.get_organisations(xeroTenantId) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->getOverpayment: %s\n" % e)
    + print("Exception when calling AccountingApi->getOrganisations: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let overpaymentID = 00000000-0000-0000-000-000000000000; // UUID
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.getOverpayment(xeroTenantId, overpaymentID, &context).wait();
    +    let result = client.getOrganisations(xeroTenantId, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -72816,47 +71281,14 @@ 

    Scopes

    - - + +
    accounting.transactions.readGrant read-only access to invoicesaccounting.settings.readGrant read-only access to organisation and account settings

    Parameters

    -
    Path parameters
    - - - - - - - - - -
    NameDescription
    OverpaymentID* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Unique identifier for a Overpayment -
    -
    -
    - Required -
    -
    -
    -
    Header parameters
    @@ -72868,7 +71300,7 @@

    Parameters

    - + + + + + + + + +
    -
    +
    @@ -72893,27 +71325,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Overpayments/{OverpaymentID}/History"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Overpayments/{OverpaymentID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -73024,17 +71456,17 @@ 

    Usage and SDK Samples

    String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID overpaymentID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Overpayment try { - HistoryRecords result = apiInstance.getOverpaymentHistory(xeroTenantId, overpaymentID); + Overpayments result = apiInstance.getOverpayment(xeroTenantId, overpaymentID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getOverpaymentHistory"); + System.err.println("Exception when calling AccountingApi#getOverpayment"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -73044,20 +71476,20 @@ 

    Usage and SDK Samples

    String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID overpaymentID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Overpayment try { - HistoryRecords result = apiInstance.getOverpaymentHistory(xeroTenantId, overpaymentID); + Overpayments result = apiInstance.getOverpayment(xeroTenantId, overpaymentID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getOverpaymentHistory"); + System.err.println("Exception when calling AccountingApi#getOverpayment"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -73068,10 +71500,10 @@ 

    Usage and SDK Samples

    AccountingApi *apiInstance = [[AccountingApi alloc] init]; -// Allows you to retrieve a history records of an Overpayment -[apiInstance getOverpaymentHistoryWith:xeroTenantId +// Allows you to retrieve a specified overpayments +[apiInstance getOverpaymentWith:xeroTenantId overpaymentID:overpaymentID - completionHandler: ^(HistoryRecords output, NSError* error) { + completionHandler: ^(Overpayments output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -73082,7 +71514,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -73092,41 +71524,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant const overpaymentID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Overpayment + try { - const response: any = await xero.accountingApi.getOverpaymentHistory(xeroTenantId, overpaymentID); + const response = await xero.accountingApi.getOverpayment(xeroTenantId, overpaymentID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -73135,7 +71550,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getOverpaymentHistoryExample + public class getOverpaymentExample { public void main() { @@ -73149,13 +71564,13 @@

    Usage and SDK Samples

    try { - // Allows you to retrieve a history records of an Overpayment - HistoryRecords result = apiInstance.getOverpaymentHistory(xeroTenantId, overpaymentID); + // Allows you to retrieve a specified overpayments + Overpayments result = apiInstance.getOverpayment(xeroTenantId, overpaymentID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.getOverpaymentHistory: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.getOverpayment: " + e.Message ); } } } @@ -73163,7 +71578,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -73181,12 +71596,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->getOverpaymentHistory: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->getOverpayment: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -73199,15 +71614,15 @@ 

    Usage and SDK Samples

    my $overpaymentID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a Overpayment eval { - my $result = $api_instance->getOverpaymentHistory(xeroTenantId => $xeroTenantId, overpaymentID => $overpaymentID); + my $result = $api_instance->getOverpayment(xeroTenantId => $xeroTenantId, overpaymentID => $overpaymentID); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->getOverpaymentHistory: $@\n"; + warn "Exception when calling AccountingApi->getOverpayment: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -73223,14 +71638,14 @@ 

    Usage and SDK Samples

    overpaymentID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Overpayment (default to null) try: - # Allows you to retrieve a history records of an Overpayment - api_response = api_instance.get_overpayment_history(xeroTenantId, overpaymentID) + # Allows you to retrieve a specified overpayments + api_response = api_instance.get_overpayment(xeroTenantId, overpaymentID) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->getOverpaymentHistory: %s\n" % e)
    + print("Exception when calling AccountingApi->getOverpayment: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
    @@ -73238,7 +71653,424 @@ 

    Usage and SDK Samples

    let overpaymentID = 00000000-0000-0000-000-000000000000; // UUID let mut context = AccountingApi::Context::default(); - let result = client.getOverpaymentHistory(xeroTenantId, overpaymentID, &context).wait(); + let result = client.getOverpayment(xeroTenantId, overpaymentID, &context).wait(); + println!("{:?}", result); + +} +
    +
    +
    + +

    Scopes

    + + + + + + + +
    accounting.transactions.readGrant read-only access to invoices
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    OverpaymentID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for a Overpayment +
    +
    +
    + Required +
    +
    +
    +
    + +
    Header parameters
    + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +
    +
    +
    +
    +
    +

    getOverpaymentHistory

    +

    Allows you to retrieve a history records of an 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.*;
    +import org.openapitools.client.auth.*;
    +import org.openapitools.client.model.*;
    +import org.openapitools.client.api.AccountingApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class AccountingApiExample {
    +
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +        
    +        // Configure OAuth2 access token for authorization: OAuth2
    +        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
    +        OAuth2.setAccessToken("YOUR ACCESS TOKEN");
    +
    +        AccountingApi apiInstance = new AccountingApi();
    +        String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
    +        UUID overpaymentID = 00000000-0000-0000-000-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();
    +        }
    +    }
    +}
    +
    + +
    +
    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-000-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-000-000000000000; // Unique identifier for a Overpayment (default to null)
    +
    +AccountingApi *apiInstance = [[AccountingApi alloc] init];
    +
    +// Allows you to retrieve a history records of an Overpayment
    +[apiInstance getOverpaymentHistoryWith:xeroTenantId
    +    overpaymentID:overpaymentID
    +              completionHandler: ^(HistoryRecords output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    const tokenSet: TokenSet =  {
    +  id_token: 'xxx',
    +  access_token: 'yyy',
    +  expires_at: 1582308862,
    +  token_type: 'Bearer',
    +  refresh_token: 'zzz',
    +  session_state: 'xxx'
    +}
    +await xero.setTokenSet(tokenSet);
    +
    +const xeroTenantId = "YOUR_XERO_TENANT_ID";  // {String} Xero identifier for Tenant
    +const overpaymentID = "00000000-0000-0000-000-000000000000";  // {UUID} Unique identifier for a Overpayment
    +
    +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 .Api;
    +using .Client;
    +using .Model;
    +
    +namespace Example
    +{
    +    public class getOverpaymentHistoryExample
    +    {
    +        public void main()
    +        {
    +            
    +            // Configure OAuth2 access token for authorization: OAuth2
    +            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    +
    +            var apiInstance = new AccountingApi();
    +            var xeroTenantId = YOUR_XERO_TENANT_ID;  // String | Xero identifier for Tenant (default to null)
    +            var overpaymentID = new UUID(); // UUID | Unique identifier for a Overpayment (default to null)
    +
    +            try
    +            {
    +                // Allows you to retrieve a history records of an Overpayment
    +                HistoryRecords result = apiInstance.getOverpaymentHistory(xeroTenantId, overpaymentID);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling AccountingApi.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' );	
    +$config->setHost("https://api.xero.com/api.xro/2.0");        
    +
    +$xeroTenantId =  'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
    +
    +$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
    +    new GuzzleHttp\Client(),
    +    $config
    +);
    +
    +try { 
    +} 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-000-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";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import 
    +from .rest import ApiException
    +from pprint import pprint
    +
    +# Configure OAuth2 access token for authorization: OAuth2
    +.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    +
    +# create an instance of the API class
    +api_instance = .AccountingApi()
    +xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null)
    +overpaymentID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Overpayment (default to null)
    +
    +try: 
    +    # Allows you to retrieve a history records of an Overpayment
    +    api_response = api_instance.get_overpayment_history(xeroTenantId, overpaymentID)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling AccountingApi->getOverpaymentHistory: %s\n" % e)
    +
    + +
    +
    extern crate AccountingApi;
    +
    +pub fn main() {
    +    let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    +    let overpaymentID = 00000000-0000-0000-000-000000000000; // UUID
    +
    +    let mut context = AccountingApi::Context::default();
    +    let result = client.getOverpaymentHistory(xeroTenantId, overpaymentID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -73542,40 +72374,27 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - + const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const ifModifiedSince:Date = new Date("2020-02-06T12:17:43.202-08:00"); -const where = 'Status=="' + Overpayment.StatusEnum.AUTHORISED + '"'; // {String} Filter by an any element -const order = 'RemainingCredit ASC'; // {String} Order by an any element -const 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 -const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + +const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00"); +const where = 'Status=="' + Overpayment.StatusEnum.AUTHORISED + '"'; // {String} Filter by an any element + +const order = 'RemainingCredit ASC'; // {String} Order by an any element + +const 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 + +const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + try { - const response: any = await xero.accountingApi.getOverpayments(xeroTenantId, ifModifiedSince, where, order, page, unitdp); + const response = await xero.accountingApi.getOverpayments(xeroTenantId, ifModifiedSince, where, order, page, unitdp); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderNumber}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/Attachments/{AttachmentID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -78067,19 +76740,21 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - String purchaseOrderNumber = PO1234; // String | Unique identifier for a PurchaseOrder + UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Purchase Order object + UUID attachmentID = 00000000-0000-0000-000-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 { - PurchaseOrders result = apiInstance.getPurchaseOrderByNumber(xeroTenantId, purchaseOrderNumber); + File result = apiInstance.getPurchaseOrderAttachmentById(xeroTenantId, purchaseOrderID, attachmentID, contentType); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getPurchaseOrderByNumber"); + System.err.println("Exception when calling AccountingApi#getPurchaseOrderAttachmentById"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -78087,36 +76762,42 @@ 

    Usage and SDK Samples

    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 + UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Purchase Order object + UUID attachmentID = 00000000-0000-0000-000-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 { - PurchaseOrders result = apiInstance.getPurchaseOrderByNumber(xeroTenantId, purchaseOrderNumber); + File result = apiInstance.getPurchaseOrderAttachmentById(xeroTenantId, purchaseOrderID, attachmentID, contentType); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getPurchaseOrderByNumber"); + 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)
    -String *purchaseOrderNumber = PO1234; // Unique identifier for a PurchaseOrder (default to null)
    +UUID *purchaseOrderID = 00000000-0000-0000-000-000000000000; // Unique identifier for Purchase Order object (default to null)
    +UUID *attachmentID = 00000000-0000-0000-000-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 specified purchase orders
    -[apiInstance getPurchaseOrderByNumberWith:xeroTenantId
    -    purchaseOrderNumber:purchaseOrderNumber
    -              completionHandler: ^(PurchaseOrders output, NSError* error) {
    +// Allows you to retrieve specific Attachment on purchase order
    +[apiInstance getPurchaseOrderAttachmentByIdWith:xeroTenantId
    +    purchaseOrderID:purchaseOrderID
    +    attachmentID:attachmentID
    +    contentType:contentType
    +              completionHandler: ^(File output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -78127,7 +76808,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -78137,41 +76818,26 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const purchaseOrderNumber = "PO1234"; // {String} Unique identifier for a PurchaseOrder + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const purchaseOrderID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for Purchase Order object +const attachmentID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for Attachment object +const contentType = "image/jpg"; // {String} The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf + try { - const response: any = await xero.accountingApi.getPurchaseOrderByNumber(xeroTenantId, purchaseOrderNumber); + const response = await xero.accountingApi.getPurchaseOrderAttachmentById(xeroTenantId, purchaseOrderID, attachmentID, contentType); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -78180,7 +76846,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getPurchaseOrderByNumberExample + public class getPurchaseOrderAttachmentByIdExample { public void main() { @@ -78190,17 +76856,19 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var purchaseOrderNumber = PO1234; // String | Unique identifier for a PurchaseOrder (default to null) + var purchaseOrderID = new UUID(); // UUID | Unique identifier for Purchase Order object (default to null) + var attachmentID = new UUID(); // UUID | Unique identifier for Attachment object (default to null) + var contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null) try { - // Allows you to retrieve a specified purchase orders - PurchaseOrders result = apiInstance.getPurchaseOrderByNumber(xeroTenantId, purchaseOrderNumber); + // Allows you to retrieve specific Attachment on purchase order + File result = apiInstance.getPurchaseOrderAttachmentById(xeroTenantId, purchaseOrderID, attachmentID, contentType); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.getPurchaseOrderByNumber: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.getPurchaseOrderAttachmentById: " + e.Message ); } } } @@ -78208,7 +76876,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -78226,12 +76894,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->getPurchaseOrderByNumber: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->getPurchaseOrderAttachmentById: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -78241,18 +76909,20 @@ 

    Usage and SDK Samples

    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 +my $purchaseOrderID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for Purchase Order object +my $attachmentID = 00000000-0000-0000-000-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->getPurchaseOrderByNumber(xeroTenantId => $xeroTenantId, purchaseOrderNumber => $purchaseOrderNumber); + my $result = $api_instance->getPurchaseOrderAttachmentById(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID, attachmentID => $attachmentID, contentType => $contentType); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->getPurchaseOrderByNumber: $@\n"; + warn "Exception when calling AccountingApi->getPurchaseOrderAttachmentById: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -78265,25 +76935,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -purchaseOrderNumber = PO1234 # String | Unique identifier for a PurchaseOrder (default to null) +purchaseOrderID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Purchase Order object (default to null) +attachmentID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Attachment object (default to null) +contentType = image/jpg # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null) try: - # Allows you to retrieve a specified purchase orders - api_response = api_instance.get_purchase_order_by_number(xeroTenantId, purchaseOrderNumber) + # Allows you to retrieve specific Attachment on purchase order + api_response = api_instance.get_purchase_order_attachment_by_id(xeroTenantId, purchaseOrderID, attachmentID, contentType) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->getPurchaseOrderByNumber: %s\n" % e)
    + print("Exception when calling AccountingApi->getPurchaseOrderAttachmentById: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let purchaseOrderNumber = PO1234; // String
    +    let purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID
    +    let attachmentID = 00000000-0000-0000-000-000000000000; // UUID
    +    let contentType = image/jpg; // String
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.getPurchaseOrderByNumber(xeroTenantId, purchaseOrderNumber, &context).wait();
    +    let result = client.getPurchaseOrderAttachmentById(xeroTenantId, purchaseOrderID, attachmentID, contentType, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -78295,8 +76969,8 @@ 

    Scopes

    - - + +
    accounting.transactions.readGrant read-only access to invoicesaccounting.attachments.readGrant read-only access to attachments
    @@ -78309,19 +76983,48 @@

    Parameters

    Name Description
    PurchaseOrderNumber*
    PurchaseOrderID* -
    +
    - String + UUID + + (uuid) +
    -Unique identifier for a PurchaseOrder +Unique identifier for Purchase Order object +
    +
    +
    + Required +
    +
    +
    +
    AttachmentID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for Attachment object
    @@ -78344,7 +77047,7 @@

    Parameters

    -
    +
    @@ -78361,6 +77064,29 @@

    Parameters

    contentType* + + +
    +
    +
    + + String + + +
    +The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf +
    +
    +
    + Required +
    +
    +
    +
    @@ -78369,27 +77095,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/History"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/Attachments"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -78498,19 +77224,19 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a PurchaseOrder + UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Purchase Orders object try { - HistoryRecords result = apiInstance.getPurchaseOrderHistory(xeroTenantId, purchaseOrderID); + Attachments result = apiInstance.getPurchaseOrderAttachments(xeroTenantId, purchaseOrderID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getPurchaseOrderHistory"); + System.err.println("Exception when calling AccountingApi#getPurchaseOrderAttachments"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -78518,36 +77244,36 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for a PurchaseOrder + UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Purchase Orders object try { - HistoryRecords result = apiInstance.getPurchaseOrderHistory(xeroTenantId, purchaseOrderID); + Attachments result = apiInstance.getPurchaseOrderAttachments(xeroTenantId, purchaseOrderID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getPurchaseOrderHistory"); + 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-000-000000000000; // Unique identifier for a PurchaseOrder (default to null)
    +UUID *purchaseOrderID = 00000000-0000-0000-000-000000000000; // Unique identifier for Purchase Orders object (default to null)
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to retrieve history for PurchaseOrder
    -[apiInstance getPurchaseOrderHistoryWith:xeroTenantId
    +// Allows you to retrieve attachments for purchase orders
    +[apiInstance getPurchaseOrderAttachmentsWith:xeroTenantId
         purchaseOrderID:purchaseOrderID
    -              completionHandler: ^(HistoryRecords output, NSError* error) {
    +              completionHandler: ^(Attachments output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -78558,7 +77284,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -78568,41 +77294,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const purchaseOrderID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a PurchaseOrder + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const purchaseOrderID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for Purchase Orders object + try { - const response: any = await xero.accountingApi.getPurchaseOrderHistory(xeroTenantId, purchaseOrderID); + const response = await xero.accountingApi.getPurchaseOrderAttachments(xeroTenantId, purchaseOrderID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -78611,7 +77320,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getPurchaseOrderHistoryExample + public class getPurchaseOrderAttachmentsExample { public void main() { @@ -78621,17 +77330,17 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var purchaseOrderID = new UUID(); // UUID | Unique identifier for a PurchaseOrder (default to null) + var purchaseOrderID = new UUID(); // UUID | Unique identifier for Purchase Orders object (default to null) try { - // Allows you to retrieve history for PurchaseOrder - HistoryRecords result = apiInstance.getPurchaseOrderHistory(xeroTenantId, purchaseOrderID); + // Allows you to retrieve attachments for purchase orders + Attachments result = apiInstance.getPurchaseOrderAttachments(xeroTenantId, purchaseOrderID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.getPurchaseOrderHistory: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.getPurchaseOrderAttachments: " + e.Message ); } } } @@ -78639,7 +77348,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -78657,12 +77366,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->getPurchaseOrderHistory: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->getPurchaseOrderAttachments: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -78672,18 +77381,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $purchaseOrderID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a PurchaseOrder +my $purchaseOrderID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for Purchase Orders object eval { - my $result = $api_instance->getPurchaseOrderHistory(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID); + my $result = $api_instance->getPurchaseOrderAttachments(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->getPurchaseOrderHistory: $@\n"; + warn "Exception when calling AccountingApi->getPurchaseOrderAttachments: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -78696,17 +77405,17 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -purchaseOrderID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a PurchaseOrder (default to null) +purchaseOrderID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Purchase Orders object (default to null) try: - # Allows you to retrieve history for PurchaseOrder - api_response = api_instance.get_purchase_order_history(xeroTenantId, purchaseOrderID) + # Allows you to retrieve attachments for purchase orders + api_response = api_instance.get_purchase_order_attachments(xeroTenantId, purchaseOrderID) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->getPurchaseOrderHistory: %s\n" % e)
    + print("Exception when calling AccountingApi->getPurchaseOrderAttachments: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
    @@ -78714,7 +77423,7 @@ 

    Usage and SDK Samples

    let purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID let mut context = AccountingApi::Context::default(); - let result = client.getPurchaseOrderHistory(xeroTenantId, purchaseOrderID, &context).wait(); + let result = client.getPurchaseOrderAttachments(xeroTenantId, purchaseOrderID, &context).wait(); println!("{:?}", result); } @@ -78726,8 +77435,8 @@

    Scopes

    - - + +
    accounting.transactions.readGrant read-only access to invoicesaccounting.attachments.readGrant read-only access to attachments
    @@ -78744,7 +77453,7 @@

    Parameters

    -
    +
    @@ -78755,7 +77464,7 @@

    Parameters

    -Unique identifier for a PurchaseOrder +Unique identifier for Purchase Orders object
    @@ -78778,7 +77487,7 @@

    Parameters

    -
    +
    @@ -78803,27 +77512,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    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"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderNumber}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -78932,24 +77642,19 @@ 

    Usage and SDK Samples

    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. + String purchaseOrderNumber = PO1234; // String | Unique identifier for a PurchaseOrder try { - PurchaseOrders result = apiInstance.getPurchaseOrders(xeroTenantId, ifModifiedSince, status, dateFrom, dateTo, order, page); + PurchaseOrders result = apiInstance.getPurchaseOrderByNumber(xeroTenantId, purchaseOrderNumber); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getPurchaseOrders"); + System.err.println("Exception when calling AccountingApi#getPurchaseOrderByNumber"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -78957,50 +77662,35 @@ 

    Usage and SDK Samples

    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. + String purchaseOrderNumber = PO1234; // String | Unique identifier for a PurchaseOrder try { - PurchaseOrders result = apiInstance.getPurchaseOrders(xeroTenantId, ifModifiedSince, status, dateFrom, dateTo, order, page); + PurchaseOrders result = apiInstance.getPurchaseOrderByNumber(xeroTenantId, purchaseOrderNumber); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getPurchaseOrders"); + 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)
    -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)
    +String *purchaseOrderNumber = PO1234; // Unique identifier for a PurchaseOrder (default to null)
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to retrieve purchase orders
    -[apiInstance getPurchaseOrdersWith:xeroTenantId
    -    ifModifiedSince:ifModifiedSince
    -    status:status
    -    dateFrom:dateFrom
    -    dateTo:dateTo
    -    order:order
    -    page:page
    +// Allows you to retrieve a specified purchase orders
    +[apiInstance getPurchaseOrderByNumberWith:xeroTenantId
    +    purchaseOrderNumber:purchaseOrderNumber
                   completionHandler: ^(PurchaseOrders output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
    @@ -79012,7 +77702,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -79022,47 +77712,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - + const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const ifModifiedSince:Date = new Date("2020-02-06T12:17:43.202-08:00"); -const status = 'SUBMITTED'; // {String} Filter by purchase order status -const dateFrom = '2019-12-01'; // {String} Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 -const dateTo = '2019-12-31'; // {String} Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 -const order = 'PurchaseOrderNumber ASC'; // {String} Order by an any element -const 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. +const purchaseOrderNumber = "PO1234"; // {String} Unique identifier for a PurchaseOrder try { - const response: any = await xero.accountingApi.getPurchaseOrders(xeroTenantId, ifModifiedSince, status, dateFrom, dateTo, order, page); + const response = await xero.accountingApi.getPurchaseOrderByNumber(xeroTenantId, purchaseOrderNumber); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -79071,7 +77738,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getPurchaseOrdersExample + public class getPurchaseOrderByNumberExample { public void main() { @@ -79081,22 +77748,17 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned (optional) (default to null) - var status = SUBMITTED; // String | Filter by purchase order status (optional) (default to null) - var dateFrom = 2019-12-01; // String | Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) (default to null) - var dateTo = 2019-12-31; // String | Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) (default to null) - var order = PurchaseOrderNumber ASC; // String | Order by an any element (optional) (default to null) - var 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. (optional) (default to null) + var purchaseOrderNumber = PO1234; // String | Unique identifier for a PurchaseOrder (default to null) try { - // Allows you to retrieve purchase orders - PurchaseOrders result = apiInstance.getPurchaseOrders(xeroTenantId, ifModifiedSince, status, dateFrom, dateTo, order, page); + // Allows you to retrieve a specified purchase orders + PurchaseOrders result = apiInstance.getPurchaseOrderByNumber(xeroTenantId, purchaseOrderNumber); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.getPurchaseOrders: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.getPurchaseOrderByNumber: " + e.Message ); } } } @@ -79104,7 +77766,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -79122,12 +77784,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->getPurchaseOrders: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->getPurchaseOrderByNumber: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -79137,23 +77799,18 @@ 

    Usage and SDK Samples

    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. +my $purchaseOrderNumber = PO1234; # String | Unique identifier for a PurchaseOrder eval { - my $result = $api_instance->getPurchaseOrders(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, status => $status, dateFrom => $dateFrom, dateTo => $dateTo, order => $order, page => $page); + my $result = $api_instance->getPurchaseOrderByNumber(xeroTenantId => $xeroTenantId, purchaseOrderNumber => $purchaseOrderNumber); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->getPurchaseOrders: $@\n"; + warn "Exception when calling AccountingApi->getPurchaseOrderByNumber: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -79166,35 +77823,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -ifModifiedSince = 2020-02-06T12:17:43.202-08:00 # Date | Only records created or modified since this timestamp will be returned (optional) (default to null) -status = SUBMITTED # String | Filter by purchase order status (optional) (default to null) -dateFrom = 2019-12-01 # String | Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) (default to null) -dateTo = 2019-12-31 # String | Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) (default to null) -order = PurchaseOrderNumber ASC # String | Order by an any element (optional) (default to null) -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. (optional) (default to null) +purchaseOrderNumber = PO1234 # String | Unique identifier for a PurchaseOrder (default to null) try: - # Allows you to retrieve purchase orders - api_response = api_instance.get_purchase_orders(xeroTenantId, ifModifiedSince=ifModifiedSince, status=status, dateFrom=dateFrom, dateTo=dateTo, order=order, page=page) + # Allows you to retrieve a specified purchase orders + api_response = api_instance.get_purchase_order_by_number(xeroTenantId, purchaseOrderNumber) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->getPurchaseOrders: %s\n" % e)
    + print("Exception when calling AccountingApi->getPurchaseOrderByNumber: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date
    -    let status = SUBMITTED; // String
    -    let dateFrom = 2019-12-01; // String
    -    let dateTo = 2019-12-31; // String
    -    let order = PurchaseOrderNumber ASC; // String
    -    let page = 1; // Integer
    +    let purchaseOrderNumber = PO1234; // String
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.getPurchaseOrders(xeroTenantId, ifModifiedSince, status, dateFrom, dateTo, order, page, &context).wait();
    +    let result = client.getPurchaseOrderByNumber(xeroTenantId, purchaseOrderNumber, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -79214,18 +77861,17 @@ 

    Scopes

    Parameters

    - -
    Header parameters
    +
    Path parameters
    - - - - - + + + + + - - - -
    NameDescription
    xero-tenant-id*
    NameDescription
    PurchaseOrderNumber* -
    +
    @@ -79233,7 +77879,7 @@

    Parameters

    -Xero identifier for Tenant +Unique identifier for a PurchaseOrder
    @@ -79242,106 +77888,21 @@

    Parameters

    If-Modified-Since - - -
    -
    -
    - - Date - - - (date-time) - - -
    -Only records created or modified since this timestamp will be returned -
    -
    -
    -
    -
    - - -
    Query parameters
    +
    Header parameters
    - - - - - - - - - - - - - + - -
    Name Description
    Status - - -
    -
    -
    - - String - - -
    -Filter by purchase order status -
    -
    -
    -
    -
    DateFrom - - -
    -
    -
    - - String - - -
    -Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 -
    -
    -
    -
    -
    DateTo - - -
    -
    -
    - - String - - -
    -Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 -
    -
    -
    -
    -
    order
    xero-tenant-id* -
    +
    @@ -79349,58 +77910,44 @@

    Parameters

    -Order by an any element +Xero identifier for Tenant
    +
    + Required +
    page - +
    -
    -
    -
    - - 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. -
    -
    -
    -
    -
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/History"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -79509,19 +78056,19 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for an Quote + UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a PurchaseOrder try { - Quotes result = apiInstance.getQuote(xeroTenantId, quoteID); + HistoryRecords result = apiInstance.getPurchaseOrderHistory(xeroTenantId, purchaseOrderID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getQuote"); + System.err.println("Exception when calling AccountingApi#getPurchaseOrderHistory"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -79529,36 +78076,36 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for an Quote + UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a PurchaseOrder try { - Quotes result = apiInstance.getQuote(xeroTenantId, quoteID); + HistoryRecords result = apiInstance.getPurchaseOrderHistory(xeroTenantId, purchaseOrderID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getQuote"); + 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 *quoteID = 00000000-0000-0000-000-000000000000; // Unique identifier for an Quote (default to null)
    +UUID *purchaseOrderID = 00000000-0000-0000-000-000000000000; // Unique identifier for a PurchaseOrder (default to null)
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to retrieve a specified quote
    -[apiInstance getQuoteWith:xeroTenantId
    -    quoteID:quoteID
    -              completionHandler: ^(Quotes output, NSError* error) {
    +// Allows you to retrieve history for PurchaseOrder
    +[apiInstance getPurchaseOrderHistoryWith:xeroTenantId
    +    purchaseOrderID:purchaseOrderID
    +              completionHandler: ^(HistoryRecords output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -79569,7 +78116,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -79579,41 +78126,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const quoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for an Quote + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const purchaseOrderID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a PurchaseOrder + try { - const response: any = await xero.accountingApi.getQuote(xeroTenantId, quoteID); + const response = await xero.accountingApi.getPurchaseOrderHistory(xeroTenantId, purchaseOrderID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -79622,7 +78152,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getQuoteExample + public class getPurchaseOrderHistoryExample { public void main() { @@ -79632,17 +78162,17 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var quoteID = new UUID(); // UUID | Unique identifier for an Quote (default to null) + var purchaseOrderID = new UUID(); // UUID | Unique identifier for a PurchaseOrder (default to null) try { - // Allows you to retrieve a specified quote - Quotes result = apiInstance.getQuote(xeroTenantId, quoteID); + // Allows you to retrieve history for PurchaseOrder + HistoryRecords result = apiInstance.getPurchaseOrderHistory(xeroTenantId, purchaseOrderID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.getQuote: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.getPurchaseOrderHistory: " + e.Message ); } } } @@ -79650,7 +78180,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -79668,12 +78198,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->getQuote: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->getPurchaseOrderHistory: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -79683,18 +78213,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $quoteID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for an Quote +my $purchaseOrderID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a PurchaseOrder eval { - my $result = $api_instance->getQuote(xeroTenantId => $xeroTenantId, quoteID => $quoteID); + my $result = $api_instance->getPurchaseOrderHistory(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->getQuote: $@\n"; + warn "Exception when calling AccountingApi->getPurchaseOrderHistory: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -79707,25 +78237,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -quoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for an Quote (default to null) +purchaseOrderID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a PurchaseOrder (default to null) try: - # Allows you to retrieve a specified quote - api_response = api_instance.get_quote(xeroTenantId, quoteID) + # Allows you to retrieve history for PurchaseOrder + api_response = api_instance.get_purchase_order_history(xeroTenantId, purchaseOrderID) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->getQuote: %s\n" % e)
    + print("Exception when calling AccountingApi->getPurchaseOrderHistory: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let quoteID = 00000000-0000-0000-000-000000000000; // UUID
    +    let purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.getQuote(xeroTenantId, quoteID, &context).wait();
    +    let result = client.getPurchaseOrderHistory(xeroTenantId, purchaseOrderID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -79751,11 +78281,11 @@ 

    Parameters

    Name Description
    QuoteID*
    PurchaseOrderID* -
    +
    @@ -79766,7 +78296,7 @@

    Parameters

    -Unique identifier for an Quote +Unique identifier for a PurchaseOrder
    @@ -79789,7 +78319,7 @@

    Parameters

    -
    +
    @@ -79814,27 +78344,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/pdf"
    +
    +
    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.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -79943,19 +78473,24 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for an Quote + 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 { - File result = apiInstance.getQuoteAsPdf(xeroTenantId, quoteID); + 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#getQuoteAsPdf"); + System.err.println("Exception when calling AccountingApi#getPurchaseOrders"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -79963,36 +78498,51 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for an Quote + 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 { - File result = apiInstance.getQuoteAsPdf(xeroTenantId, quoteID); + 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#getQuoteAsPdf"); + 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)
    -UUID *quoteID = 00000000-0000-0000-000-000000000000; // Unique identifier for an Quote (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];
     
    -// Allows you to retrieve quotes as PDF files
    -[apiInstance getQuoteAsPdfWith:xeroTenantId
    -    quoteID:quoteID
    -              completionHandler: ^(File output, NSError* error) {
    +// Allows you to retrieve 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);
                                 }
    @@ -80003,7 +78553,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -80013,41 +78563,35 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const quoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for an Quote + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + +const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00"); +const status = 'SUBMITTED'; // {String} Filter by purchase order status + +const dateFrom = '2019-12-01'; // {String} Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 + +const dateTo = '2019-12-31'; // {String} Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 + +const order = 'PurchaseOrderNumber ASC'; // {String} Order by an any element + +const 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 { - const response: any = await xero.accountingApi.getQuoteAsPdf(xeroTenantId, quoteID); + const response = await xero.accountingApi.getPurchaseOrders(xeroTenantId, ifModifiedSince, status, dateFrom, dateTo, order, page); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -80056,7 +78600,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getQuoteAsPdfExample + public class getPurchaseOrdersExample { public void main() { @@ -80066,17 +78610,22 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var quoteID = new UUID(); // UUID | Unique identifier for an Quote (default to null) + var ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned (optional) (default to null) + var status = SUBMITTED; // String | Filter by purchase order status (optional) (default to null) + var dateFrom = 2019-12-01; // String | Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) (default to null) + var dateTo = 2019-12-31; // String | Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) (default to null) + var order = PurchaseOrderNumber ASC; // String | Order by an any element (optional) (default to null) + var 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. (optional) (default to null) try { - // Allows you to retrieve quotes as PDF files - File result = apiInstance.getQuoteAsPdf(xeroTenantId, quoteID); + // Allows you to retrieve purchase orders + PurchaseOrders result = apiInstance.getPurchaseOrders(xeroTenantId, ifModifiedSince, status, dateFrom, dateTo, order, page); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.getQuoteAsPdf: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.getPurchaseOrders: " + e.Message ); } } } @@ -80084,7 +78633,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -80102,12 +78651,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->getQuoteAsPdf: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->getPurchaseOrders: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -80117,18 +78666,23 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $quoteID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for an Quote +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->getQuoteAsPdf(xeroTenantId => $xeroTenantId, quoteID => $quoteID); + 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->getQuoteAsPdf: $@\n"; + warn "Exception when calling AccountingApi->getPurchaseOrders: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -80141,25 +78695,35 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -quoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for an Quote (default to null) +ifModifiedSince = 2020-02-06T12:17:43.202-08:00 # Date | Only records created or modified since this timestamp will be returned (optional) (default to null) +status = SUBMITTED # String | Filter by purchase order status (optional) (default to null) +dateFrom = 2019-12-01 # String | Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) (default to null) +dateTo = 2019-12-31 # String | Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 (optional) (default to null) +order = PurchaseOrderNumber ASC # String | Order by an any element (optional) (default to null) +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. (optional) (default to null) try: - # Allows you to retrieve quotes as PDF files - api_response = api_instance.get_quote_as_pdf(xeroTenantId, quoteID) + # Allows you to retrieve purchase orders + api_response = api_instance.get_purchase_orders(xeroTenantId, ifModifiedSince=ifModifiedSince, status=status, dateFrom=dateFrom, dateTo=dateTo, order=order, page=page) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->getQuoteAsPdf: %s\n" % e)
    + print("Exception when calling AccountingApi->getPurchaseOrders: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let quoteID = 00000000-0000-0000-000-000000000000; // UUID
    +    let ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date
    +    let status = SUBMITTED; // String
    +    let dateFrom = 2019-12-01; // String
    +    let dateTo = 2019-12-31; // String
    +    let order = PurchaseOrderNumber ASC; // String
    +    let page = 1; // Integer
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.getQuoteAsPdf(xeroTenantId, quoteID, &context).wait();
    +    let result = client.getPurchaseOrders(xeroTenantId, ifModifiedSince, status, dateFrom, dateTo, order, page, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -80179,28 +78743,26 @@ 

    Scopes

    Parameters

    -
    Path parameters
    + +
    Header parameters
    - - - - - + + + + + + + + +
    NameDescription
    QuoteID*
    NameDescription
    xero-tenant-id* -
    +
    - UUID + String - - (uuid) -
    -Unique identifier for an Quote +Xero identifier for Tenant
    @@ -80209,21 +78771,46 @@

    Parameters

    If-Modified-Since + + +
    +
    +
    + + Date + + + (date-time) + + +
    +Only records created or modified since this timestamp will be returned +
    +
    +
    +
    +
    -
    Header parameters
    + + +
    Query parameters
    - + -
    Name Description
    xero-tenant-id*
    Status -
    +
    @@ -80231,44 +78818,118 @@

    Parameters

    -Xero identifier for Tenant +Filter by purchase order status
    -
    - Required -
    +
    DateFrom + + +
    +
    +
    + + String + + +
    +Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 +
    +
    +
    +
    +
    DateTo + + +
    +
    +
    + + String + + +
    +Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 +
    +
    +
    +
    +
    order + + +
    +
    +
    + + String + + +
    +Order by an any element +
    +
    +
    +
    +
    page + +
    +
    +
    + + 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. +
    +
    +
    +
    +
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/Attachments/{FileName}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -80377,21 +79038,21 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Quote object + UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Purchase Order 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.getQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, contentType); + File result = apiInstance.getPurchaseOrder≠AttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, contentType); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getQuoteAttachmentByFileName"); + System.err.println("Exception when calling AccountingApi#getPurchaseOrder≠AttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -80399,39 +79060,39 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for Quote object + UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Purchase Order 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.getQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, contentType); + File result = apiInstance.getPurchaseOrder≠AttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, contentType); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getQuoteAttachmentByFileName"); + 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 *quoteID = 00000000-0000-0000-000-000000000000; // Unique identifier for Quote object (default to null)
    +UUID *purchaseOrderID = 00000000-0000-0000-000-000000000000; // Unique identifier for Purchase Order 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];
     
    -// Allows you to retrieve Attachment on Quote by Filename
    -[apiInstance getQuoteAttachmentByFileNameWith:xeroTenantId
    -    quoteID:quoteID
    +// Allows you to retrieve Attachment on a Purchase Order by Filename
    +[apiInstance getPurchaseOrder≠AttachmentByFileNameWith:xeroTenantId
    +    purchaseOrderID:purchaseOrderID
         fileName:fileName
         contentType:contentType
                   completionHandler: ^(File output, NSError* error) {
    @@ -80445,7 +79106,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -80455,43 +79116,26 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const quoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for Quote object -const fileName = "xero-dev.jpg"; // {String} Name of the attachment + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const purchaseOrderID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for Purchase Order object +const fileName = "xero-dev.jpg"; // {String} Name of the attachment const contentType = "image/jpg"; // {String} The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf + try { - const response: any = await xero.accountingApi.getQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, contentType); + const response = await xero.accountingApi.getPurchaseOrder≠AttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, contentType); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -80500,7 +79144,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getQuoteAttachmentByFileNameExample + public class getPurchaseOrder≠AttachmentByFileNameExample { public void main() { @@ -80510,19 +79154,19 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var quoteID = new UUID(); // UUID | Unique identifier for Quote object (default to null) + var purchaseOrderID = new UUID(); // UUID | Unique identifier for Purchase Order object (default to null) var fileName = xero-dev.jpg; // String | Name of the attachment (default to null) var contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null) try { - // Allows you to retrieve Attachment on Quote by Filename - File result = apiInstance.getQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, contentType); + // Allows you to retrieve Attachment on a Purchase Order by Filename + File result = apiInstance.getPurchaseOrder≠AttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, contentType); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.getQuoteAttachmentByFileName: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.getPurchaseOrder≠AttachmentByFileName: " + e.Message ); } } } @@ -80530,7 +79174,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -80548,12 +79192,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->getQuoteAttachmentByFileName: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->getPurchaseOrder≠AttachmentByFileName: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -80563,20 +79207,20 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $quoteID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for Quote object +my $purchaseOrderID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for Purchase Order 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->getQuoteAttachmentByFileName(xeroTenantId => $xeroTenantId, quoteID => $quoteID, fileName => $fileName, contentType => $contentType); + my $result = $api_instance->getPurchaseOrder≠AttachmentByFileName(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID, fileName => $fileName, contentType => $contentType); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->getQuoteAttachmentByFileName: $@\n"; + warn "Exception when calling AccountingApi->getPurchaseOrder≠AttachmentByFileName: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -80589,29 +79233,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -quoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Quote object (default to null) +purchaseOrderID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Purchase Order object (default to null) fileName = xero-dev.jpg # String | Name of the attachment (default to null) contentType = image/jpg # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null) try: - # Allows you to retrieve Attachment on Quote by Filename - api_response = api_instance.get_quote_attachment_by_file_name(xeroTenantId, quoteID, fileName, contentType) + # Allows you to retrieve Attachment on a Purchase Order by Filename + api_response = api_instance.get_purchase_order≠attachment_by_file_name(xeroTenantId, purchaseOrderID, fileName, contentType) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->getQuoteAttachmentByFileName: %s\n" % e)
    + print("Exception when calling AccountingApi->getPurchaseOrder≠AttachmentByFileName: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let quoteID = 00000000-0000-0000-000-000000000000; // UUID
    +    let purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID
         let fileName = xero-dev.jpg; // String
         let contentType = image/jpg; // String
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.getQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, contentType, &context).wait();
    +    let result = client.getPurchaseOrder≠AttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, contentType, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -80637,11 +79281,11 @@ 

    Parameters

    Name Description - QuoteID* + PurchaseOrderID* -
    +
    @@ -80652,7 +79296,7 @@

    Parameters

    -Unique identifier for Quote object +Unique identifier for Purchase Order object
    @@ -80667,7 +79311,7 @@

    Parameters

    -
    +
    @@ -80698,7 +79342,7 @@

    Parameters

    -
    +
    @@ -80721,7 +79365,7 @@

    Parameters

    -
    +
    @@ -80746,27 +79390,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/Attachments/{AttachmentID}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -80875,21 +79519,19 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Quote object - UUID attachmentID = 00000000-0000-0000-000-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 + UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for an Quote try { - File result = apiInstance.getQuoteAttachmentById(xeroTenantId, quoteID, attachmentID, contentType); + Quotes result = apiInstance.getQuote(xeroTenantId, quoteID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getQuoteAttachmentById"); + System.err.println("Exception when calling AccountingApi#getQuote"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -80897,42 +79539,36 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for Quote object - UUID attachmentID = 00000000-0000-0000-000-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 + UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for an Quote try { - File result = apiInstance.getQuoteAttachmentById(xeroTenantId, quoteID, attachmentID, contentType); + Quotes result = apiInstance.getQuote(xeroTenantId, quoteID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getQuoteAttachmentById"); + 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-000-000000000000; // Unique identifier for Quote object (default to null)
    -UUID *attachmentID = 00000000-0000-0000-000-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)
    +UUID *quoteID = 00000000-0000-0000-000-000000000000; // Unique identifier for an Quote (default to null)
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to retrieve specific Attachment on Quote
    -[apiInstance getQuoteAttachmentByIdWith:xeroTenantId
    +// Allows you to retrieve a specified quote
    +[apiInstance getQuoteWith:xeroTenantId
         quoteID:quoteID
    -    attachmentID:attachmentID
    -    contentType:contentType
    -              completionHandler: ^(File output, NSError* error) {
    +              completionHandler: ^(Quotes output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -80943,7 +79579,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -80953,43 +79589,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const quoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for Quote object -const attachmentID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for Attachment object -const contentType = "image/jpg"; // {String} The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const quoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for an Quote + try { - const response: any = await xero.accountingApi.getQuoteAttachmentById(xeroTenantId, quoteID, attachmentID, contentType); + const response = await xero.accountingApi.getQuote(xeroTenantId, quoteID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -80998,7 +79615,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getQuoteAttachmentByIdExample + public class getQuoteExample { public void main() { @@ -81008,19 +79625,17 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var quoteID = new UUID(); // UUID | Unique identifier for Quote object (default to null) - var attachmentID = new UUID(); // UUID | Unique identifier for Attachment object (default to null) - var contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null) + var quoteID = new UUID(); // UUID | Unique identifier for an Quote (default to null) try { - // Allows you to retrieve specific Attachment on Quote - File result = apiInstance.getQuoteAttachmentById(xeroTenantId, quoteID, attachmentID, contentType); + // Allows you to retrieve a specified quote + Quotes result = apiInstance.getQuote(xeroTenantId, quoteID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.getQuoteAttachmentById: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.getQuote: " + e.Message ); } } } @@ -81028,7 +79643,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -81046,12 +79661,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->getQuoteAttachmentById: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->getQuote: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -81061,20 +79676,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $quoteID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for Quote object -my $attachmentID = 00000000-0000-0000-000-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 +my $quoteID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for an Quote eval { - my $result = $api_instance->getQuoteAttachmentById(xeroTenantId => $xeroTenantId, quoteID => $quoteID, attachmentID => $attachmentID, contentType => $contentType); + my $result = $api_instance->getQuote(xeroTenantId => $xeroTenantId, quoteID => $quoteID); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->getQuoteAttachmentById: $@\n"; + warn "Exception when calling AccountingApi->getQuote: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -81087,29 +79700,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -quoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Quote object (default to null) -attachmentID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Attachment object (default to null) -contentType = image/jpg # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null) +quoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for an Quote (default to null) try: - # Allows you to retrieve specific Attachment on Quote - api_response = api_instance.get_quote_attachment_by_id(xeroTenantId, quoteID, attachmentID, contentType) + # Allows you to retrieve a specified quote + api_response = api_instance.get_quote(xeroTenantId, quoteID) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->getQuoteAttachmentById: %s\n" % e)
    + print("Exception when calling AccountingApi->getQuote: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
         let quoteID = 00000000-0000-0000-000-000000000000; // UUID
    -    let attachmentID = 00000000-0000-0000-000-000000000000; // UUID
    -    let contentType = image/jpg; // String
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.getQuoteAttachmentById(xeroTenantId, quoteID, attachmentID, contentType, &context).wait();
    +    let result = client.getQuote(xeroTenantId, quoteID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -81121,8 +79730,8 @@ 

    Scopes

    - - + +
    accounting.attachments.readGrant read-only access to attachmentsaccounting.transactions.readGrant read-only access to invoices
    @@ -81139,33 +79748,7 @@

    Parameters

    -
    -
    -
    - - UUID - - - (uuid) - - -
    -Unique identifier for Quote object -
    -
    -
    - Required -
    -
    -
    - - - - AttachmentID* - - - -
    +
    @@ -81176,7 +79759,7 @@

    Parameters

    -Unique identifier for Attachment object +Unique identifier for an Quote
    @@ -81199,7 +79782,7 @@

    Parameters

    -
    +
    @@ -81216,29 +79799,6 @@

    Parameters

    - - - contentType* - - - -
    -
    -
    - - String - - -
    -The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf -
    -
    -
    - Required -
    -
    -
    - @@ -81247,27 +79807,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/Attachments"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/pdf"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -81376,19 +79936,19 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Quote object + UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for an Quote try { - Attachments result = apiInstance.getQuoteAttachments(xeroTenantId, quoteID); + File result = apiInstance.getQuoteAsPdf(xeroTenantId, quoteID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getQuoteAttachments"); + System.err.println("Exception when calling AccountingApi#getQuoteAsPdf"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -81396,36 +79956,36 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for Quote object + UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for an Quote try { - Attachments result = apiInstance.getQuoteAttachments(xeroTenantId, quoteID); + File result = apiInstance.getQuoteAsPdf(xeroTenantId, quoteID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getQuoteAttachments"); + 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-000-000000000000; // Unique identifier for Quote object (default to null)
    +UUID *quoteID = 00000000-0000-0000-000-000000000000; // Unique identifier for an Quote (default to null)
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to retrieve Attachments for Quotes
    -[apiInstance getQuoteAttachmentsWith:xeroTenantId
    +// Allows you to retrieve quotes as PDF files
    +[apiInstance getQuoteAsPdfWith:xeroTenantId
         quoteID:quoteID
    -              completionHandler: ^(Attachments output, NSError* error) {
    +              completionHandler: ^(File output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -81436,7 +79996,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -81446,41 +80006,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const quoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for Quote object + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const quoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for an Quote + try { - const response: any = await xero.accountingApi.getQuoteAttachments(xeroTenantId, quoteID); + const response = await xero.accountingApi.getQuoteAsPdf(xeroTenantId, quoteID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -81489,7 +80032,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getQuoteAttachmentsExample + public class getQuoteAsPdfExample { public void main() { @@ -81499,17 +80042,17 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var quoteID = new UUID(); // UUID | Unique identifier for Quote object (default to null) + var quoteID = new UUID(); // UUID | Unique identifier for an Quote (default to null) try { - // Allows you to retrieve Attachments for Quotes - Attachments result = apiInstance.getQuoteAttachments(xeroTenantId, quoteID); + // Allows you to retrieve quotes as PDF files + File result = apiInstance.getQuoteAsPdf(xeroTenantId, quoteID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.getQuoteAttachments: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.getQuoteAsPdf: " + e.Message ); } } } @@ -81517,7 +80060,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -81535,12 +80078,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->getQuoteAttachments: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->getQuoteAsPdf: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -81550,18 +80093,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $quoteID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for Quote object +my $quoteID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for an Quote eval { - my $result = $api_instance->getQuoteAttachments(xeroTenantId => $xeroTenantId, quoteID => $quoteID); + my $result = $api_instance->getQuoteAsPdf(xeroTenantId => $xeroTenantId, quoteID => $quoteID); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->getQuoteAttachments: $@\n"; + warn "Exception when calling AccountingApi->getQuoteAsPdf: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -81574,17 +80117,17 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -quoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Quote object (default to null) +quoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for an Quote (default to null) try: - # Allows you to retrieve Attachments for Quotes - api_response = api_instance.get_quote_attachments(xeroTenantId, quoteID) + # Allows you to retrieve quotes as PDF files + api_response = api_instance.get_quote_as_pdf(xeroTenantId, quoteID) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->getQuoteAttachments: %s\n" % e)
    + print("Exception when calling AccountingApi->getQuoteAsPdf: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
    @@ -81592,7 +80135,7 @@ 

    Usage and SDK Samples

    let quoteID = 00000000-0000-0000-000-000000000000; // UUID let mut context = AccountingApi::Context::default(); - let result = client.getQuoteAttachments(xeroTenantId, quoteID, &context).wait(); + let result = client.getQuoteAsPdf(xeroTenantId, quoteID, &context).wait(); println!("{:?}", result); } @@ -81604,8 +80147,8 @@

    Scopes

    - - + +
    accounting.attachments.readGrant read-only access to attachmentsaccounting.transactions.readGrant read-only access to invoices
    @@ -81622,7 +80165,7 @@

    Parameters

    -
    +
    @@ -81633,7 +80176,7 @@

    Parameters

    -Unique identifier for Quote object +Unique identifier for an Quote
    @@ -81656,7 +80199,7 @@

    Parameters

    -
    +
    @@ -81681,27 +80224,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/History"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/Attachments/{FileName}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -81811,19 +80353,21 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for an Quote + UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Quote 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 { - HistoryRecords result = apiInstance.getQuoteHistory(xeroTenantId, quoteID); + File result = apiInstance.getQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, contentType); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getQuoteHistory"); + System.err.println("Exception when calling AccountingApi#getQuoteAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -81831,36 +80375,42 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for an Quote + UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Quote 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 { - HistoryRecords result = apiInstance.getQuoteHistory(xeroTenantId, quoteID); + File result = apiInstance.getQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, contentType); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getQuoteHistory"); + 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-000-000000000000; // Unique identifier for an Quote (default to null)
    +UUID *quoteID = 00000000-0000-0000-000-000000000000; // Unique identifier for Quote 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];
     
    -// Allows you to retrieve a history records of an quote
    -[apiInstance getQuoteHistoryWith:xeroTenantId
    +// Allows you to retrieve Attachment on Quote by Filename
    +[apiInstance getQuoteAttachmentByFileNameWith:xeroTenantId
         quoteID:quoteID
    -              completionHandler: ^(HistoryRecords output, NSError* error) {
    +    fileName:fileName
    +    contentType:contentType
    +              completionHandler: ^(File output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -81871,7 +80421,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -81881,41 +80431,26 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const quoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for an Quote + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const quoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for Quote object +const fileName = "xero-dev.jpg"; // {String} Name of the attachment +const contentType = "image/jpg"; // {String} The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf + try { - const response: any = await xero.accountingApi.getQuoteHistory(xeroTenantId, quoteID); + const response = await xero.accountingApi.getQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, contentType); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -81924,7 +80459,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getQuoteHistoryExample + public class getQuoteAttachmentByFileNameExample { public void main() { @@ -81934,17 +80469,19 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var quoteID = new UUID(); // UUID | Unique identifier for an Quote (default to null) + var quoteID = new UUID(); // UUID | Unique identifier for Quote object (default to null) + var fileName = xero-dev.jpg; // String | Name of the attachment (default to null) + var contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null) try { - // Allows you to retrieve a history records of an quote - HistoryRecords result = apiInstance.getQuoteHistory(xeroTenantId, quoteID); + // Allows you to retrieve Attachment on Quote by Filename + File result = apiInstance.getQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, contentType); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.getQuoteHistory: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.getQuoteAttachmentByFileName: " + e.Message ); } } } @@ -81952,7 +80489,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -81970,12 +80507,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->getQuoteHistory: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->getQuoteAttachmentByFileName: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -81985,18 +80522,20 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $quoteID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for an Quote +my $quoteID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for Quote 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->getQuoteHistory(xeroTenantId => $xeroTenantId, quoteID => $quoteID); + my $result = $api_instance->getQuoteAttachmentByFileName(xeroTenantId => $xeroTenantId, quoteID => $quoteID, fileName => $fileName, contentType => $contentType); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->getQuoteHistory: $@\n"; + warn "Exception when calling AccountingApi->getQuoteAttachmentByFileName: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -82009,25 +80548,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -quoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for an Quote (default to null) +quoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Quote object (default to null) +fileName = xero-dev.jpg # String | Name of the attachment (default to null) +contentType = image/jpg # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null) try: - # Allows you to retrieve a history records of an quote - api_response = api_instance.get_quote_history(xeroTenantId, quoteID) + # Allows you to retrieve Attachment on Quote by Filename + api_response = api_instance.get_quote_attachment_by_file_name(xeroTenantId, quoteID, fileName, contentType) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->getQuoteHistory: %s\n" % e)
    + print("Exception when calling AccountingApi->getQuoteAttachmentByFileName: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
         let quoteID = 00000000-0000-0000-000-000000000000; // UUID
    +    let fileName = xero-dev.jpg; // String
    +    let contentType = image/jpg; // String
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.getQuoteHistory(xeroTenantId, quoteID, &context).wait();
    +    let result = client.getQuoteAttachmentByFileName(xeroTenantId, quoteID, fileName, contentType, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -82039,8 +80582,8 @@ 

    Scopes

    - - + +
    accounting.transactions.readGrant read-only access to invoicesaccounting.attachments.readGrant read-only access to attachments
    @@ -82057,7 +80600,7 @@

    Parameters

    -
    +
    @@ -82068,7 +80611,30 @@

    Parameters

    -Unique identifier for an Quote +Unique identifier for Quote object +
    +
    +
    + Required +
    +
    +
    + + + + FileName* + + + +
    +
    +
    + + String + + +
    +Name of the attachment
    @@ -82091,7 +80657,7 @@

    Parameters

    -
    +
    @@ -82108,6 +80674,29 @@

    Parameters

    + + + contentType* + + + +
    +
    +
    + + String + + +
    +The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf +
    +
    +
    + Required +
    +
    +
    + @@ -82116,27 +80705,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    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-000-000000000000&Status=status_example&page=1&order=ASC&QuoteNumber=quoteNumber_example"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/Attachments/{AttachmentID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -82245,28 +80834,21 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Filter for quotes belonging to a particular contact - String status = status_example; // 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 = ASC; // String | Order by an any element - String quoteNumber = quoteNumber_example; // String | Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001) + UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Quote object + UUID attachmentID = 00000000-0000-0000-000-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 { - Quotes result = apiInstance.getQuotes(xeroTenantId, ifModifiedSince, dateFrom, dateTo, expiryDateFrom, expiryDateTo, contactID, status, page, order, quoteNumber); + File result = apiInstance.getQuoteAttachmentById(xeroTenantId, quoteID, attachmentID, contentType); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getQuotes"); + System.err.println("Exception when calling AccountingApi#getQuoteAttachmentById"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -82274,63 +80856,42 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Filter for quotes belonging to a particular contact - String status = status_example; // 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 = ASC; // String | Order by an any element - String quoteNumber = quoteNumber_example; // String | Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001) + UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Quote object + UUID attachmentID = 00000000-0000-0000-000-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 { - Quotes result = apiInstance.getQuotes(xeroTenantId, ifModifiedSince, dateFrom, dateTo, expiryDateFrom, expiryDateTo, contactID, status, page, order, quoteNumber); + File result = apiInstance.getQuoteAttachmentById(xeroTenantId, quoteID, attachmentID, contentType); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#getQuotes"); + 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)
    -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-000-000000000000; // Filter for quotes belonging to a particular contact (optional) (default to null)
    -String *status = status_example; // 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 = ASC; // Order by an any element (optional) (default to null)
    -String *quoteNumber = quoteNumber_example; // Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001) (optional) (default to null)
    +UUID *quoteID = 00000000-0000-0000-000-000000000000; // Unique identifier for Quote object (default to null)
    +UUID *attachmentID = 00000000-0000-0000-000-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 any 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) {
    +// Allows you to retrieve specific Attachment on Quote
    +[apiInstance getQuoteAttachmentByIdWith:xeroTenantId
    +    quoteID:quoteID
    +    attachmentID:attachmentID
    +    contentType:contentType
    +              completionHandler: ^(File output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -82341,7 +80902,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -82351,51 +80912,26 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - + const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const ifModifiedSince:Date = new Date("2020-02-06T12:17:43.202-08:00"); -const dateFrom = new Date("2013-10-20"); // {date} Filter for quotes after a particular date -const dateTo = new Date("2013-10-20"); // {date} Filter for quotes before a particular date -const expiryDateFrom = new Date("2013-10-20"); // {date} Filter for quotes expiring after a particular date -const expiryDateTo = new Date("2013-10-20"); // {date} Filter for quotes before a particular date -const contactID = '00000000-0000-0000-000-000000000000'; // {UUID} Filter for quotes belonging to a particular contact -const status = 'status_example'; // {String} Filter for quotes of a particular Status -const 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 -const order = 'ASC'; // {String} Order by an any element -const quoteNumber = 'quoteNumber_example'; // {String} Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001) +const quoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for Quote object +const attachmentID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for Attachment object +const contentType = "image/jpg"; // {String} The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf try { - const response: any = await xero.accountingApi.getQuotes(xeroTenantId, ifModifiedSince, dateFrom, dateTo, expiryDateFrom, expiryDateTo, contactID, status, page, order, quoteNumber); + const response = await xero.accountingApi.getQuoteAttachmentById(xeroTenantId, quoteID, attachmentID, contentType); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -82404,7 +80940,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getQuotesExample + public class getQuoteAttachmentByIdExample { public void main() { @@ -82414,26 +80950,19 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date | Only records created or modified since this timestamp will be returned (optional) (default to null) - var dateFrom = 2013-10-20; // date | Filter for quotes after a particular date (optional) (default to null) - var dateTo = 2013-10-20; // date | Filter for quotes before a particular date (optional) (default to null) - var expiryDateFrom = 2013-10-20; // date | Filter for quotes expiring after a particular date (optional) (default to null) - var expiryDateTo = 2013-10-20; // date | Filter for quotes before a particular date (optional) (default to null) - var contactID = new UUID(); // UUID | Filter for quotes belonging to a particular contact (optional) (default to null) - var status = status_example; // String | Filter for quotes of a particular Status (optional) (default to null) - var 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 (optional) (default to null) - var order = ASC; // String | Order by an any element (optional) (default to null) - var quoteNumber = quoteNumber_example; // String | Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001) (optional) (default to null) + var quoteID = new UUID(); // UUID | Unique identifier for Quote object (default to null) + var attachmentID = new UUID(); // UUID | Unique identifier for Attachment object (default to null) + var contentType = image/jpg; // String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null) try { - // Allows you to retrieve any sales quotes - Quotes result = apiInstance.getQuotes(xeroTenantId, ifModifiedSince, dateFrom, dateTo, expiryDateFrom, expiryDateTo, contactID, status, page, order, quoteNumber); + // Allows you to retrieve specific Attachment on Quote + File result = apiInstance.getQuoteAttachmentById(xeroTenantId, quoteID, attachmentID, contentType); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.getQuotes: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.getQuoteAttachmentById: " + e.Message ); } } } @@ -82441,7 +80970,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -82459,12 +80988,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->getQuotes: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->getQuoteAttachmentById: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -82474,27 +81003,20 @@ 

    Usage and SDK Samples

    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-000-000000000000; # UUID | Filter for quotes belonging to a particular contact -my $status = status_example; # 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 = ASC; # String | Order by an any element -my $quoteNumber = quoteNumber_example; # String | Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001) +my $quoteID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for Quote object +my $attachmentID = 00000000-0000-0000-000-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->getQuotes(xeroTenantId => $xeroTenantId, ifModifiedSince => $ifModifiedSince, dateFrom => $dateFrom, dateTo => $dateTo, expiryDateFrom => $expiryDateFrom, expiryDateTo => $expiryDateTo, contactID => $contactID, status => $status, page => $page, order => $order, quoteNumber => $quoteNumber); + my $result = $api_instance->getQuoteAttachmentById(xeroTenantId => $xeroTenantId, quoteID => $quoteID, attachmentID => $attachmentID, contentType => $contentType); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->getQuotes: $@\n"; + warn "Exception when calling AccountingApi->getQuoteAttachmentById: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -82507,43 +81029,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -ifModifiedSince = 2020-02-06T12:17:43.202-08:00 # Date | Only records created or modified since this timestamp will be returned (optional) (default to null) -dateFrom = 2013-10-20 # date | Filter for quotes after a particular date (optional) (default to null) -dateTo = 2013-10-20 # date | Filter for quotes before a particular date (optional) (default to null) -expiryDateFrom = 2013-10-20 # date | Filter for quotes expiring after a particular date (optional) (default to null) -expiryDateTo = 2013-10-20 # date | Filter for quotes before a particular date (optional) (default to null) -contactID = 00000000-0000-0000-000-000000000000 # UUID | Filter for quotes belonging to a particular contact (optional) (default to null) -status = status_example # String | Filter for quotes of a particular Status (optional) (default to null) -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 (optional) (default to null) -order = ASC # String | Order by an any element (optional) (default to null) -quoteNumber = quoteNumber_example # String | Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001) (optional) (default to null) +quoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Quote object (default to null) +attachmentID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Attachment object (default to null) +contentType = image/jpg # String | The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf (default to null) try: - # Allows you to retrieve any sales quotes - api_response = api_instance.get_quotes(xeroTenantId, ifModifiedSince=ifModifiedSince, dateFrom=dateFrom, dateTo=dateTo, expiryDateFrom=expiryDateFrom, expiryDateTo=expiryDateTo, contactID=contactID, status=status, page=page, order=order, quoteNumber=quoteNumber) + # Allows you to retrieve specific Attachment on Quote + api_response = api_instance.get_quote_attachment_by_id(xeroTenantId, quoteID, attachmentID, contentType) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->getQuotes: %s\n" % e)
    + print("Exception when calling AccountingApi->getQuoteAttachmentById: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date
    -    let dateFrom = 2013-10-20; // date
    -    let dateTo = 2013-10-20; // date
    -    let expiryDateFrom = 2013-10-20; // date
    -    let expiryDateTo = 2013-10-20; // date
    -    let contactID = 00000000-0000-0000-000-000000000000; // UUID
    -    let status = status_example; // String
    -    let page = 1; // Integer
    -    let order = ASC; // String
    -    let quoteNumber = quoteNumber_example; // String
    +    let quoteID = 00000000-0000-0000-000-000000000000; // UUID
    +    let attachmentID = 00000000-0000-0000-000-000000000000; // UUID
    +    let contentType = image/jpg; // String
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.getQuotes(xeroTenantId, ifModifiedSince, dateFrom, dateTo, expiryDateFrom, expiryDateTo, contactID, status, page, order, quoteNumber, &context).wait();
    +    let result = client.getQuoteAttachmentById(xeroTenantId, quoteID, attachmentID, contentType, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -82555,26 +81063,1418 @@ 

    Scopes

    - - + +
    accounting.transactions.readGrant read-only access to invoicesaccounting.attachments.readGrant read-only access to attachments

    Parameters

    - -
    Header parameters
    +
    Path parameters
    - - - - - + + + + + + + + + + + +
    NameDescription
    xero-tenant-id*
    NameDescription
    QuoteID* -
    +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for Quote object +
    +
    +
    + Required +
    +
    +
    +
    AttachmentID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for Attachment object +
    +
    +
    + Required +
    +
    +
    +
    + +
    Header parameters
    + + + + + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    contentType* + + +
    +
    +
    + + String + + +
    +The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf +
    +
    +
    + Required +
    +
    +
    +
    + + + + + +
    +
    +
    +
    +
    +

    getQuoteAttachments

    +

    Allows you to retrieve Attachments for Quotes

    +
    +
    +
    +

    +

    +

    +
    +
    /Quotes/{QuoteID}/Attachments
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes/{QuoteID}/Attachments"
    +
    +
    +
    import org.openapitools.client.*;
    +import org.openapitools.client.auth.*;
    +import org.openapitools.client.model.*;
    +import org.openapitools.client.api.AccountingApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class AccountingApiExample {
    +
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +        
    +        // Configure OAuth2 access token for authorization: OAuth2
    +        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
    +        OAuth2.setAccessToken("YOUR ACCESS TOKEN");
    +
    +        AccountingApi apiInstance = new AccountingApi();
    +        String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
    +        UUID quoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Quote object
    +        try {
    +            Attachments result = apiInstance.getQuoteAttachments(xeroTenantId, quoteID);
    +            System.out.println(result);
    +        } catch (ApiException 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-000-000000000000; // UUID | Unique identifier for Quote object
    +        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-000-000000000000; // Unique identifier for Quote object (default to null)
    +
    +AccountingApi *apiInstance = [[AccountingApi alloc] init];
    +
    +// Allows you to retrieve Attachments for Quotes
    +[apiInstance getQuoteAttachmentsWith:xeroTenantId
    +    quoteID:quoteID
    +              completionHandler: ^(Attachments output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    const tokenSet: TokenSet =  {
    +  id_token: 'xxx',
    +  access_token: 'yyy',
    +  expires_at: 1582308862,
    +  token_type: 'Bearer',
    +  refresh_token: 'zzz',
    +  session_state: 'xxx'
    +}
    +await xero.setTokenSet(tokenSet);
    +
    +const xeroTenantId = "YOUR_XERO_TENANT_ID";  // {String} Xero identifier for Tenant
    +const quoteID = "00000000-0000-0000-000-000000000000";  // {UUID} Unique identifier for Quote object
    +
    +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 .Api;
    +using .Client;
    +using .Model;
    +
    +namespace Example
    +{
    +    public class getQuoteAttachmentsExample
    +    {
    +        public void main()
    +        {
    +            
    +            // Configure OAuth2 access token for authorization: OAuth2
    +            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    +
    +            var apiInstance = new AccountingApi();
    +            var xeroTenantId = YOUR_XERO_TENANT_ID;  // String | Xero identifier for Tenant (default to null)
    +            var quoteID = new UUID(); // UUID | Unique identifier for Quote object (default to null)
    +
    +            try
    +            {
    +                // Allows you to retrieve Attachments for Quotes
    +                Attachments result = apiInstance.getQuoteAttachments(xeroTenantId, quoteID);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling AccountingApi.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' );	
    +$config->setHost("https://api.xero.com/api.xro/2.0");        
    +
    +$xeroTenantId =  'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
    +
    +$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
    +    new GuzzleHttp\Client(),
    +    $config
    +);
    +
    +try { 
    +} 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-000-000000000000; # UUID | Unique identifier for Quote object
    +
    +eval { 
    +    my $result = $api_instance->getQuoteAttachments(xeroTenantId => $xeroTenantId, quoteID => $quoteID);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling AccountingApi->getQuoteAttachments: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import 
    +from .rest import ApiException
    +from pprint import pprint
    +
    +# Configure OAuth2 access token for authorization: OAuth2
    +.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    +
    +# create an instance of the API class
    +api_instance = .AccountingApi()
    +xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null)
    +quoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Quote object (default to null)
    +
    +try: 
    +    # Allows you to retrieve Attachments for Quotes
    +    api_response = api_instance.get_quote_attachments(xeroTenantId, quoteID)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling AccountingApi->getQuoteAttachments: %s\n" % e)
    +
    + +
    +
    extern crate AccountingApi;
    +
    +pub fn main() {
    +    let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    +    let quoteID = 00000000-0000-0000-000-000000000000; // UUID
    +
    +    let mut context = AccountingApi::Context::default();
    +    let result = client.getQuoteAttachments(xeroTenantId, quoteID, &context).wait();
    +    println!("{:?}", result);
    +
    +}
    +
    +
    +
    + +

    Scopes

    + + + + + + + +
    accounting.attachments.readGrant read-only access to attachments
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    QuoteID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for Quote object +
    +
    +
    + Required +
    +
    +
    +
    + +
    Header parameters
    + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    + + + + +
    +
    +
    +
    +
    +
    +

    getQuoteHistory

    +

    Allows you to retrieve a history records of an 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.*;
    +import org.openapitools.client.auth.*;
    +import org.openapitools.client.model.*;
    +import org.openapitools.client.api.AccountingApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class AccountingApiExample {
    +
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +        
    +        // Configure OAuth2 access token for authorization: OAuth2
    +        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
    +        OAuth2.setAccessToken("YOUR ACCESS TOKEN");
    +
    +        AccountingApi apiInstance = new AccountingApi();
    +        String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
    +        UUID quoteID = 00000000-0000-0000-000-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();
    +        }
    +    }
    +}
    +
    + +
    +
    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-000-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-000-000000000000; // Unique identifier for an Quote (default to null)
    +
    +AccountingApi *apiInstance = [[AccountingApi alloc] init];
    +
    +// Allows you to retrieve a history records of an quote
    +[apiInstance getQuoteHistoryWith:xeroTenantId
    +    quoteID:quoteID
    +              completionHandler: ^(HistoryRecords output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    const tokenSet: TokenSet =  {
    +  id_token: 'xxx',
    +  access_token: 'yyy',
    +  expires_at: 1582308862,
    +  token_type: 'Bearer',
    +  refresh_token: 'zzz',
    +  session_state: 'xxx'
    +}
    +await xero.setTokenSet(tokenSet);
    +
    +const xeroTenantId = "YOUR_XERO_TENANT_ID";  // {String} Xero identifier for Tenant
    +const quoteID = "00000000-0000-0000-000-000000000000";  // {UUID} Unique identifier for an Quote
    +
    +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 .Api;
    +using .Client;
    +using .Model;
    +
    +namespace Example
    +{
    +    public class getQuoteHistoryExample
    +    {
    +        public void main()
    +        {
    +            
    +            // Configure OAuth2 access token for authorization: OAuth2
    +            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    +
    +            var apiInstance = new AccountingApi();
    +            var xeroTenantId = YOUR_XERO_TENANT_ID;  // String | Xero identifier for Tenant (default to null)
    +            var quoteID = new UUID(); // UUID | Unique identifier for an Quote (default to null)
    +
    +            try
    +            {
    +                // Allows you to retrieve a history records of an quote
    +                HistoryRecords result = apiInstance.getQuoteHistory(xeroTenantId, quoteID);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling AccountingApi.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' );	
    +$config->setHost("https://api.xero.com/api.xro/2.0");        
    +
    +$xeroTenantId =  'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
    +
    +$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
    +    new GuzzleHttp\Client(),
    +    $config
    +);
    +
    +try { 
    +} 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-000-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";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import 
    +from .rest import ApiException
    +from pprint import pprint
    +
    +# Configure OAuth2 access token for authorization: OAuth2
    +.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    +
    +# create an instance of the API class
    +api_instance = .AccountingApi()
    +xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null)
    +quoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for an Quote (default to null)
    +
    +try: 
    +    # Allows you to retrieve a history records of an quote
    +    api_response = api_instance.get_quote_history(xeroTenantId, quoteID)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling AccountingApi->getQuoteHistory: %s\n" % e)
    +
    + +
    +
    extern crate AccountingApi;
    +
    +pub fn main() {
    +    let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    +    let quoteID = 00000000-0000-0000-000-000000000000; // UUID
    +
    +    let mut context = AccountingApi::Context::default();
    +    let result = client.getQuoteHistory(xeroTenantId, quoteID, &context).wait();
    +    println!("{:?}", result);
    +
    +}
    +
    +
    +
    + +

    Scopes

    + + + + + + + +
    accounting.transactions.readGrant read-only access to invoices
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    QuoteID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for an Quote +
    +
    +
    + Required +
    +
    +
    +
    + +
    Header parameters
    + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    + + + + +
    +
    +
    +
    +
    +
    +

    getQuotes

    +

    Allows you to retrieve any 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-000-000000000000&Status=status_example&page=1&order=ASC&QuoteNumber=quoteNumber_example"
    +
    +
    +
    import org.openapitools.client.*;
    +import org.openapitools.client.auth.*;
    +import org.openapitools.client.model.*;
    +import org.openapitools.client.api.AccountingApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class AccountingApiExample {
    +
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +        
    +        // Configure OAuth2 access token for authorization: OAuth2
    +        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
    +        OAuth2.setAccessToken("YOUR ACCESS TOKEN");
    +
    +        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-000-000000000000; // UUID | Filter for quotes belonging to a particular contact
    +        String status = status_example; // 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 = ASC; // String | Order by an any element
    +        String quoteNumber = quoteNumber_example; // 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();
    +        }
    +    }
    +}
    +
    + +
    +
    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-000-000000000000; // UUID | Filter for quotes belonging to a particular contact
    +        String status = status_example; // 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 = ASC; // String | Order by an any element
    +        String quoteNumber = quoteNumber_example; // 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-000-000000000000; // Filter for quotes belonging to a particular contact (optional) (default to null)
    +String *status = status_example; // 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 = ASC; // Order by an any element (optional) (default to null)
    +String *quoteNumber = quoteNumber_example; // Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001) (optional) (default to null)
    +
    +AccountingApi *apiInstance = [[AccountingApi alloc] init];
    +
    +// Allows you to retrieve any 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);
    +                            }
    +                        }];
    +
    +
    + +
    +
    const tokenSet: TokenSet =  {
    +  id_token: 'xxx',
    +  access_token: 'yyy',
    +  expires_at: 1582308862,
    +  token_type: 'Bearer',
    +  refresh_token: 'zzz',
    +  session_state: 'xxx'
    +}
    +await xero.setTokenSet(tokenSet);
    +
    +const xeroTenantId = "YOUR_XERO_TENANT_ID";  // {String} Xero identifier for Tenant
    +
    +const ifModifiedSince: Date = new Date("2020-02-06T12:17:43.202-08:00");
    +const dateFrom = new Date("2013-10-20");  // {date} Filter for quotes after a particular date
    +
    +const dateTo = new Date("2013-10-20");  // {date} Filter for quotes before a particular date
    +
    +const expiryDateFrom = new Date("2013-10-20");  // {date} Filter for quotes expiring after a particular date
    +
    +const expiryDateTo = new Date("2013-10-20");  // {date} Filter for quotes before a particular date
    +
    +const contactID = '00000000-0000-0000-000-000000000000';  // {UUID} Filter for quotes belonging to a particular contact
    +
    +const status = 'status_example';  // {String} Filter for quotes of a particular Status
    +
    +const 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
    +
    +const order = 'ASC';  // {String} Order by an any element
    +
    +const quoteNumber = 'quoteNumber_example';  // {String} Filter by quote number (e.g. GET https://.../Quotes?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 .Api;
    +using .Client;
    +using .Model;
    +
    +namespace Example
    +{
    +    public class getQuotesExample
    +    {
    +        public void main()
    +        {
    +            
    +            // Configure OAuth2 access token for authorization: OAuth2
    +            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    +
    +            var apiInstance = new AccountingApi();
    +            var xeroTenantId = YOUR_XERO_TENANT_ID;  // String | Xero identifier for Tenant (default to null)
    +            var ifModifiedSince = 2020-02-06T12:17:43.202-08:00;  // Date | Only records created or modified since this timestamp will be returned (optional)  (default to null)
    +            var dateFrom = 2013-10-20;  // date | Filter for quotes after a particular date (optional)  (default to null)
    +            var dateTo = 2013-10-20;  // date | Filter for quotes before a particular date (optional)  (default to null)
    +            var expiryDateFrom = 2013-10-20;  // date | Filter for quotes expiring after a particular date (optional)  (default to null)
    +            var expiryDateTo = 2013-10-20;  // date | Filter for quotes before a particular date (optional)  (default to null)
    +            var contactID = new UUID(); // UUID | Filter for quotes belonging to a particular contact (optional)  (default to null)
    +            var status = status_example;  // String | Filter for quotes of a particular Status (optional)  (default to null)
    +            var 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 (optional)  (default to null)
    +            var order = ASC;  // String | Order by an any element (optional)  (default to null)
    +            var quoteNumber = quoteNumber_example;  // String | Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001) (optional)  (default to null)
    +
    +            try
    +            {
    +                // Allows you to retrieve any sales quotes
    +                Quotes result = apiInstance.getQuotes(xeroTenantId, ifModifiedSince, dateFrom, dateTo, expiryDateFrom, expiryDateTo, contactID, status, page, order, quoteNumber);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling AccountingApi.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' );	
    +$config->setHost("https://api.xero.com/api.xro/2.0");        
    +
    +$xeroTenantId =  'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
    +
    +$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
    +    new GuzzleHttp\Client(),
    +    $config
    +);
    +
    +try { 
    +} 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-000-000000000000; # UUID | Filter for quotes belonging to a particular contact
    +my $status = status_example; # 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 = ASC; # String | Order by an any element
    +my $quoteNumber = quoteNumber_example; # 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";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import 
    +from .rest import ApiException
    +from pprint import pprint
    +
    +# Configure OAuth2 access token for authorization: OAuth2
    +.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    +
    +# create an instance of the API class
    +api_instance = .AccountingApi()
    +xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null)
    +ifModifiedSince = 2020-02-06T12:17:43.202-08:00 # Date | Only records created or modified since this timestamp will be returned (optional) (default to null)
    +dateFrom = 2013-10-20 # date | Filter for quotes after a particular date (optional) (default to null)
    +dateTo = 2013-10-20 # date | Filter for quotes before a particular date (optional) (default to null)
    +expiryDateFrom = 2013-10-20 # date | Filter for quotes expiring after a particular date (optional) (default to null)
    +expiryDateTo = 2013-10-20 # date | Filter for quotes before a particular date (optional) (default to null)
    +contactID = 00000000-0000-0000-000-000000000000 # UUID | Filter for quotes belonging to a particular contact (optional) (default to null)
    +status = status_example # String | Filter for quotes of a particular Status (optional) (default to null)
    +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 (optional) (default to null)
    +order = ASC # String | Order by an any element (optional) (default to null)
    +quoteNumber = quoteNumber_example # String | Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001) (optional) (default to null)
    +
    +try: 
    +    # Allows you to retrieve any sales quotes
    +    api_response = api_instance.get_quotes(xeroTenantId, ifModifiedSince=ifModifiedSince, dateFrom=dateFrom, dateTo=dateTo, expiryDateFrom=expiryDateFrom, expiryDateTo=expiryDateTo, contactID=contactID, status=status, page=page, order=order, quoteNumber=quoteNumber)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling AccountingApi->getQuotes: %s\n" % e)
    +
    + +
    +
    extern crate AccountingApi;
    +
    +pub fn main() {
    +    let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    +    let ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date
    +    let dateFrom = 2013-10-20; // date
    +    let dateTo = 2013-10-20; // date
    +    let expiryDateFrom = 2013-10-20; // date
    +    let expiryDateTo = 2013-10-20; // date
    +    let contactID = 00000000-0000-0000-000-000000000000; // UUID
    +    let status = status_example; // String
    +    let page = 1; // Integer
    +    let order = ASC; // String
    +    let quoteNumber = quoteNumber_example; // String
    +
    +    let mut context = AccountingApi::Context::default();
    +    let result = client.getQuotes(xeroTenantId, ifModifiedSince, dateFrom, dateTo, expiryDateFrom, expiryDateTo, contactID, status, page, order, quoteNumber, &context).wait();
    +    println!("{:?}", result);
    +
    +}
    +
    +
    +
    + +

    Scopes

    + + + + + + + +
    accounting.transactions.readGrant read-only access to invoices
    + +

    Parameters

    + + +
    Header parameters
    + + + + + + + + + + + - + @@ -96732,27 +96780,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Accounts/{AccountID}/Attachments/{FileName}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/BankTransactions/{BankTransactionID}?unitdp=4"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -96931,21 +96979,21 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID accountID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Account object - String fileName = xero-dev.jpg; // String | Name of the attachment - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + UUID bankTransactionID = 00000000-0000-0000-000-000000000000; // UUID | Xero generated unique identifier for a bank transaction + BankTransactions bankTransactions = { "BankTransactions": [ { "Type": "SPEND", "Contact": { "ContactID": "00000000-0000-0000-000-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-000-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-000-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 { - Attachments result = apiInstance.updateAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body); + BankTransactions result = apiInstance.updateBankTransaction(xeroTenantId, bankTransactionID, bankTransactions, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateAccountAttachmentByFileName"); + System.err.println("Exception when calling AccountingApi#updateBankTransaction"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -96953,42 +97001,42 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for Account object - String fileName = xero-dev.jpg; // String | Name of the attachment - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + UUID bankTransactionID = 00000000-0000-0000-000-000000000000; // UUID | Xero generated unique identifier for a bank transaction + BankTransactions bankTransactions = { "BankTransactions": [ { "Type": "SPEND", "Contact": { "ContactID": "00000000-0000-0000-000-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-000-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-000-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 { - Attachments result = apiInstance.updateAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body); + BankTransactions result = apiInstance.updateBankTransaction(xeroTenantId, bankTransactionID, bankTransactions, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateAccountAttachmentByFileName"); + 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 *accountID = 00000000-0000-0000-000-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; // 
    +UUID *bankTransactionID = 00000000-0000-0000-000-000000000000; // Xero generated unique identifier for a bank transaction (default to null)
    +BankTransactions *bankTransactions = { "BankTransactions": [ { "Type": "SPEND", "Contact": { "ContactID": "00000000-0000-0000-000-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-000-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-000-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];
     
    -// Allows you to update Attachment on Account by Filename
    -[apiInstance updateAccountAttachmentByFileNameWith:xeroTenantId
    -    accountID:accountID
    -    fileName:fileName
    -    body:body
    -              completionHandler: ^(Attachments output, NSError* error) {
    +// Allows you to update a single spend or receive money transaction
    +[apiInstance updateBankTransactionWith:xeroTenantId
    +    bankTransactionID:bankTransactionID
    +    bankTransactions:bankTransactions
    +    unitdp:unitdp
    +              completionHandler: ^(BankTransactions output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -96999,7 +97047,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -97009,54 +97057,28 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const accountID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for Account object -const fileName = "xero-dev.jpg"; // {String} Name of the attachment -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 -// You'll need to add the import below to read your file -// import * as fs from "fs"; -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const bankTransactionID = "00000000-0000-0000-000-000000000000"; // {UUID} Xero generated unique identifier for a bank transaction + + +const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts +const bankTransactions: BankTransactions = { bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, date: "2019-02-25", reference: "You just updated", status: BankTransaction.StatusEnum.AUTHORISED, bankTransactionID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, bankAccount: { accountID: "00000000-0000-0000-000-000000000000" }}]} + try { - const response: any = await xero.accountingApi.updateAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.updateBankTransaction(xeroTenantId, bankTransactionID, bankTransactions, unitdp); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -97065,7 +97087,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateAccountAttachmentByFileNameExample + public class updateBankTransactionExample { public void main() { @@ -97075,19 +97097,19 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var accountID = new UUID(); // UUID | Unique identifier for Account object (default to null) - var fileName = xero-dev.jpg; // String | Name of the attachment (default to null) - var body = BYTE_ARRAY_DATA_HERE; // byte[] | + var bankTransactionID = new UUID(); // UUID | Xero generated unique identifier for a bank transaction (default to null) + var bankTransactions = new BankTransactions(); // BankTransactions | + var unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try { - // Allows you to update Attachment on Account by Filename - Attachments result = apiInstance.updateAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body); + // Allows you to update a single spend or receive money transaction + BankTransactions result = apiInstance.updateBankTransaction(xeroTenantId, bankTransactionID, bankTransactions, unitdp); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateAccountAttachmentByFileName: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateBankTransaction: " + e.Message ); } } } @@ -97095,7 +97117,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -97113,12 +97135,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateAccountAttachmentByFileName: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateBankTransaction: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -97128,20 +97150,20 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $accountID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for Account object -my $fileName = xero-dev.jpg; # String | Name of the attachment -my $body = ::Object::byte[]->new(); # byte[] | +my $bankTransactionID = 00000000-0000-0000-000-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->updateAccountAttachmentByFileName(xeroTenantId => $xeroTenantId, accountID => $accountID, fileName => $fileName, body => $body); + my $result = $api_instance->updateBankTransaction(xeroTenantId => $xeroTenantId, bankTransactionID => $bankTransactionID, bankTransactions => $bankTransactions, unitdp => $unitdp); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateAccountAttachmentByFileName: $@\n"; + warn "Exception when calling AccountingApi->updateBankTransaction: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -97154,29 +97176,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -accountID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Account object (default to null) -fileName = xero-dev.jpg # String | Name of the attachment (default to null) -body = BYTE_ARRAY_DATA_HERE # byte[] | +bankTransactionID = 00000000-0000-0000-000-000000000000 # UUID | Xero generated unique identifier for a bank transaction (default to null) +bankTransactions = { "BankTransactions": [ { "Type": "SPEND", "Contact": { "ContactID": "00000000-0000-0000-000-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-000-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-000-000000000000", "UpdatedDateUTC": "2019-02-26T12:39:27.813-08:00" } ] } # BankTransactions | +unitdp = 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try: - # Allows you to update Attachment on Account by Filename - api_response = api_instance.update_account_attachment_by_file_name(xeroTenantId, accountID, fileName, body) + # Allows you to update a single spend or receive money transaction + api_response = api_instance.update_bank_transaction(xeroTenantId, bankTransactionID, bankTransactions, unitdp=unitdp) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateAccountAttachmentByFileName: %s\n" % e)
    + print("Exception when calling AccountingApi->updateBankTransaction: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let accountID = 00000000-0000-0000-000-000000000000; // UUID
    -    let fileName = xero-dev.jpg; // String
    -    let body = BYTE_ARRAY_DATA_HERE; // byte[]
    +    let bankTransactionID = 00000000-0000-0000-000-000000000000; // UUID
    +    let bankTransactions = { "BankTransactions": [ { "Type": "SPEND", "Contact": { "ContactID": "00000000-0000-0000-000-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-000-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-000-000000000000", "UpdatedDateUTC": "2019-02-26T12:39:27.813-08:00" } ] }; // BankTransactions
    +    let unitdp = 4; // Integer
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body, &context).wait();
    +    let result = client.updateBankTransaction(xeroTenantId, bankTransactionID, bankTransactions, unitdp, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -97188,8 +97210,8 @@ 

    Scopes

    NameDescription
    xero-tenant-id* + + +
    @@ -83027,37 +82927,21 @@

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant const receiptID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Receipt -const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + +const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + try { - const response: any = await xero.accountingApi.getReceipt(xeroTenantId, receiptID, unitdp); + const response = await xero.accountingApi.getReceipt(xeroTenantId, receiptID, unitdp); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - - +
    - +
    - +
    - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + +
    +
    +
    +
    +

    updateAccount

    +

    Allows you to update 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.*;
    +import org.openapitools.client.auth.*;
    +import org.openapitools.client.model.*;
    +import org.openapitools.client.api.AccountingApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class AccountingApiExample {
    +
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +        
    +        // Configure OAuth2 access token for authorization: OAuth2
    +        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
    +        OAuth2.setAccessToken("YOUR ACCESS TOKEN");
    +
    +        AccountingApi apiInstance = new AccountingApi();
    +        String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
    +        UUID accountID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for retrieving single 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();
    +        }
    +    }
    +}
    +
    + +
    +
    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-000-000000000000; // UUID | Unique identifier for retrieving single 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-000-000000000000; // Unique identifier for retrieving single 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];
    +
    +// Allows you to update 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);
    +                            }
    +                        }];
    +
    +
    + +
    +
    const tokenSet: TokenSet =  {
    +  id_token: 'xxx',
    +  access_token: 'yyy',
    +  expires_at: 1582308862,
    +  token_type: 'Bearer',
    +  refresh_token: 'zzz',
    +  session_state: 'xxx'
    +}
    +await xero.setTokenSet(tokenSet);
    +
    +const xeroTenantId = "YOUR_XERO_TENANT_ID";  // {String} Xero identifier for Tenant
    +const accountID = "00000000-0000-0000-000-000000000000";  // {UUID} Unique identifier for retrieving single object
    +const accounts: Accounts = { accounts: [{ code: "123456", name: "BarFoo", accountID: "00000000-0000-0000-000-000000000000", type: AccountType.EXPENSE, description: "GoodBye World", taxType: TaxType.INPUT }]}
    +
    +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 .Api;
    +using .Client;
    +using .Model;
    +
    +namespace Example
    +{
    +    public class updateAccountExample
    +    {
    +        public void main()
    +        {
    +            
    +            // Configure OAuth2 access token for authorization: OAuth2
    +            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    +
    +            var apiInstance = new AccountingApi();
    +            var xeroTenantId = YOUR_XERO_TENANT_ID;  // String | Xero identifier for Tenant (default to null)
    +            var accountID = new UUID(); // UUID | Unique identifier for retrieving single object (default to null)
    +            var accounts = new Accounts(); // Accounts | 
    +
    +            try
    +            {
    +                // Allows you to update a chart of accounts
    +                Accounts result = apiInstance.updateAccount(xeroTenantId, accountID, accounts);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling AccountingApi.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' );	
    +$config->setHost("https://api.xero.com/api.xro/2.0");        
    +
    +$xeroTenantId =  'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
    +
    +$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
    +    new GuzzleHttp\Client(),
    +    $config
    +);
    +
    +try { 
    +} 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-000-000000000000; # UUID | Unique identifier for retrieving single 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->getUsers: $@\n";
    +    warn "Exception when calling AccountingApi->updateAccount: $@\n";
     }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -96083,29 +96018,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -ifModifiedSince = 2020-02-06T12:17:43.202-08:00 # Date | Only records created or modified since this timestamp will be returned (optional) (default to null) -where = IsSubscriber==true # String | Filter by an any element (optional) (default to null) -order = LastName ASC # String | Order by an any element (optional) (default to null) +accountID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for retrieving single object (default to null) +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: - # Allows you to retrieve users - api_response = api_instance.get_users(xeroTenantId, ifModifiedSince=ifModifiedSince, where=where, order=order) + # Allows you to update a chart of accounts + api_response = api_instance.update_account(xeroTenantId, accountID, accounts) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->getUsers: %s\n" % e)
    + print("Exception when calling AccountingApi->updateAccount: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let ifModifiedSince = 2020-02-06T12:17:43.202-08:00; // Date
    -    let where = IsSubscriber==true; // String
    -    let order = LastName ASC; // String
    +    let accountID = 00000000-0000-0000-000-000000000000; // UUID
    +    let 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
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.getUsers(xeroTenantId, ifModifiedSince, where, order, &context).wait();
    +    let result = client.updateAccount(xeroTenantId, accountID, accounts, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -96117,34 +96050,36 @@ 

    Scopes

    - - + +
    accounting.settings.readGrant read-only access to organisation and account settingsaccounting.settingsGrant read-write access to organisation and account settings

    Parameters

    - -
    Header parameters
    +
    Path parameters
    - - - - - + + + + + - - - -
    NameDescription
    xero-tenant-id*
    NameDescription
    AccountID* -
    +
    - String + UUID + + (uuid) +
    -Xero identifier for Tenant +Unique identifier for retrieving single object
    @@ -96153,46 +96088,21 @@

    Parameters

    If-Modified-Since - - -
    -
    -
    - - Date - - - (date-time) - - -
    -Only records created or modified since this timestamp will be returned -
    -
    -
    -
    -
    - - -
    Query parameters
    +
    Header parameters
    - + - -
    Name Description
    where
    xero-tenant-id* -
    +
    @@ -96200,58 +96110,102 @@

    Parameters

    -Filter by an any element +Xero identifier for Tenant
    +
    + Required +
    order - +
    -
    -
    +
    Body parameters
    + + + + + + +
    NameDescription
    accounts * +
    - String + Accounts
    -Order by an any element +Request of type Accounts array with one Account
    +
    + Required +
    - + + +
    + + - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Accounts/{AccountID}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Accounts/{AccountID}/Attachments/{FileName}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -96360,20 +96384,21 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID accountID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for retrieving single object - Accounts accounts = { accounts: [{ code: "123456", name: "BarFoo", accountID: "00000000-0000-0000-000-000000000000", type: AccountType.EXPENSE, description: "GoodBye World", taxType: TaxType.INPUT }]}; // Accounts | + UUID accountID = 00000000-0000-0000-000-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 { - Accounts result = apiInstance.updateAccount(xeroTenantId, accountID, accounts); + Attachments result = apiInstance.updateAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateAccount"); + System.err.println("Exception when calling AccountingApi#updateAccountAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -96381,39 +96406,42 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for retrieving single object - Accounts accounts = { accounts: [{ code: "123456", name: "BarFoo", accountID: "00000000-0000-0000-000-000000000000", type: AccountType.EXPENSE, description: "GoodBye World", taxType: TaxType.INPUT }]}; // Accounts | + UUID accountID = 00000000-0000-0000-000-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 { - Accounts result = apiInstance.updateAccount(xeroTenantId, accountID, accounts); + Attachments result = apiInstance.updateAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateAccount"); + 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-000-000000000000; // Unique identifier for retrieving single object (default to null)
    -Accounts *accounts = { accounts: [{ code: "123456", name: "BarFoo", accountID: "00000000-0000-0000-000-000000000000", type: AccountType.EXPENSE, description: "GoodBye World", taxType: TaxType.INPUT }]}; // 
    +UUID *accountID = 00000000-0000-0000-000-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];
     
    -// Allows you to update a chart of accounts
    -[apiInstance updateAccountWith:xeroTenantId
    +// Allows you to update Attachment on Account by Filename
    +[apiInstance updateAccountAttachmentByFileNameWith:xeroTenantId
         accountID:accountID
    -    accounts:accounts
    -              completionHandler: ^(Accounts output, NSError* error) {
    +    fileName:fileName
    +    body:body
    +              completionHandler: ^(Attachments output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -96424,7 +96452,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -96434,42 +96462,35 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const accountID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for retrieving single object -const accounts:Accounts = { accounts: [{ code: "123456", name: "BarFoo", accountID: "00000000-0000-0000-000-000000000000", type: AccountType.EXPENSE, description: "GoodBye World", taxType: TaxType.INPUT }]}; // {Accounts} + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const accountID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for Account object +const fileName = "xero-dev.jpg"; // {String} Name of the attachment +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 +import * as fs from "fs"; +const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file +const contentType = mime.lookup(fileName); + try { - const response: any = await xero.accountingApi.updateAccount(xeroTenantId, accountID, accounts); + const response = await xero.accountingApi.updateAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body, { + headers: { + "Content-Type": contentType, + } + }); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -96478,7 +96499,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateAccountExample + public class updateAccountAttachmentByFileNameExample { public void main() { @@ -96488,18 +96509,19 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var accountID = new UUID(); // UUID | Unique identifier for retrieving single object (default to null) - var accounts = new Accounts(); // Accounts | + var accountID = new UUID(); // UUID | Unique identifier for Account object (default to null) + var fileName = xero-dev.jpg; // String | Name of the attachment (default to null) + var body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - // Allows you to update a chart of accounts - Accounts result = apiInstance.updateAccount(xeroTenantId, accountID, accounts); + // Allows you to update Attachment on Account by Filename + Attachments result = apiInstance.updateAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateAccount: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateAccountAttachmentByFileName: " + e.Message ); } } } @@ -96507,7 +96529,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -96525,12 +96547,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateAccount: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateAccountAttachmentByFileName: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -96540,19 +96562,20 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $accountID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for retrieving single object -my $accounts = ::Object::Accounts->new(); # Accounts | +my $accountID = 00000000-0000-0000-000-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->updateAccount(xeroTenantId => $xeroTenantId, accountID => $accountID, accounts => $accounts); + my $result = $api_instance->updateAccountAttachmentByFileName(xeroTenantId => $xeroTenantId, accountID => $accountID, fileName => $fileName, body => $body); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateAccount: $@\n"; + warn "Exception when calling AccountingApi->updateAccountAttachmentByFileName: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -96565,27 +96588,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -accountID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for retrieving single object (default to null) -accounts = { accounts: [{ code: "123456", name: "BarFoo", accountID: "00000000-0000-0000-000-000000000000", type: AccountType.EXPENSE, description: "GoodBye World", taxType: TaxType.INPUT }]} # Accounts | +accountID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Account object (default to null) +fileName = xero-dev.jpg # String | Name of the attachment (default to null) +body = BYTE_ARRAY_DATA_HERE # byte[] | try: - # Allows you to update a chart of accounts - api_response = api_instance.update_account(xeroTenantId, accountID, accounts) + # Allows you to update Attachment on Account by Filename + api_response = api_instance.update_account_attachment_by_file_name(xeroTenantId, accountID, fileName, body) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateAccount: %s\n" % e)
    + print("Exception when calling AccountingApi->updateAccountAttachmentByFileName: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
         let accountID = 00000000-0000-0000-000-000000000000; // UUID
    -    let accounts = { accounts: [{ code: "123456", name: "BarFoo", accountID: "00000000-0000-0000-000-000000000000", type: AccountType.EXPENSE, description: "GoodBye World", taxType: TaxType.INPUT }]}; // Accounts
    +    let fileName = xero-dev.jpg; // String
    +    let body = BYTE_ARRAY_DATA_HERE; // byte[]
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateAccount(xeroTenantId, accountID, accounts, &context).wait();
    +    let result = client.updateAccountAttachmentByFileName(xeroTenantId, accountID, fileName, body, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -96597,8 +96622,8 @@ 

    Scopes

    - - + +
    accounting.settingsGrant read-write access to organisation and account settingsaccounting.attachmentsGrant read-write access to attachments
    @@ -96615,7 +96640,7 @@

    Parameters

    -
    +
    @@ -96626,7 +96651,30 @@

    Parameters

    -Unique identifier for retrieving single object +Unique identifier for Account object +
    +
    +
    + Required +
    +
    +
    +
    FileName* + + +
    +
    +
    + + String + + +
    +Name of the attachment
    @@ -96649,7 +96697,7 @@

    Parameters

    -
    +
    @@ -96676,33 +96724,33 @@

    Parameters

    Name Description
    accounts *
    body *
    - Accounts + byte[]
    -Request of type Accounts array with one Account +Byte array of file in body of request
    Required
    - + -
    +
    - - + +
    accounting.attachmentsGrant read-write access to attachmentsaccounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    @@ -97202,11 +97224,11 @@

    Parameters

    Name Description - AccountID* + BankTransactionID* -
    +
    @@ -97217,30 +97239,7 @@

    Parameters

    -Unique identifier for Account object -
    -
    -
    - Required -
    -
    -
    - - - - FileName* - - - -
    -
    -
    - - String - - -
    -Name of the attachment +Xero generated unique identifier for a bank transaction
    @@ -97263,7 +97262,7 @@

    Parameters

    -
    +
    @@ -97290,33 +97289,32 @@

    Parameters

    Name Description - body * + bankTransactions *
    - byte[] + BankTransactions
    -Byte array of file in body of request +
    Required
    - + -
    +
    +
    Query parameters
    + + + + + + + + + +
    NameDescription
    unitdp + + +
    +
    +
    + + Integer + + +
    +e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts +
    +
    +
    +
    +
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/BankTransactions/{BankTransactionID}?unitdp=4"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/BankTransactions/{BankTransactionID}/Attachments/{FileName}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -97546,20 +97570,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID bankTransactionID = 00000000-0000-0000-000-000000000000; // UUID | Xero generated unique identifier for a bank transaction - BankTransactions bankTransactions = { bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, date: "2019-02-25", reference: "You just updated", status: BankTransaction.StatusEnum.AUTHORISED, bankTransactionID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, bankAccount: { accountID: "00000000-0000-0000-000-000000000000" }}]}; // BankTransactions | - Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + String fileName = xero-dev.jpg; // String | The name of the file being attached + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - BankTransactions result = apiInstance.updateBankTransaction(xeroTenantId, bankTransactionID, bankTransactions, unitdp); + Attachments result = apiInstance.updateBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateBankTransaction"); + System.err.println("Exception when calling AccountingApi#updateBankTransactionAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -97568,23 +97592,23 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID bankTransactionID = 00000000-0000-0000-000-000000000000; // UUID | Xero generated unique identifier for a bank transaction - BankTransactions bankTransactions = { bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, date: "2019-02-25", reference: "You just updated", status: BankTransaction.StatusEnum.AUTHORISED, bankTransactionID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, bankAccount: { accountID: "00000000-0000-0000-000-000000000000" }}]}; // BankTransactions | - Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + String fileName = xero-dev.jpg; // String | The name of the file being attached + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - BankTransactions result = apiInstance.updateBankTransaction(xeroTenantId, bankTransactionID, bankTransactions, unitdp); + Attachments result = apiInstance.updateBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateBankTransaction"); + System.err.println("Exception when calling AccountingApi#updateBankTransactionAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -97592,17 +97616,17 @@ 

    Usage and SDK Samples

    String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null) UUID *bankTransactionID = 00000000-0000-0000-000-000000000000; // Xero generated unique identifier for a bank transaction (default to null) -BankTransactions *bankTransactions = { bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, date: "2019-02-25", reference: "You just updated", status: BankTransaction.StatusEnum.AUTHORISED, bankTransactionID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, bankAccount: { accountID: "00000000-0000-0000-000-000000000000" }}]}; // -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) +String *fileName = xero-dev.jpg; // The name of the file being attached (default to null) +byte[] *body = BYTE_ARRAY_DATA_HERE; // AccountingApi *apiInstance = [[AccountingApi alloc] init]; -// Allows you to update a single spend or receive money transaction -[apiInstance updateBankTransactionWith:xeroTenantId +// Allows you to update an Attachment on BankTransaction by Filename +[apiInstance updateBankTransactionAttachmentByFileNameWith:xeroTenantId bankTransactionID:bankTransactionID - bankTransactions:bankTransactions - unitdp:unitdp - completionHandler: ^(BankTransactions output, NSError* error) { + fileName:fileName + body:body + completionHandler: ^(Attachments output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -97613,7 +97637,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -97623,44 +97647,35 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const bankTransactionID = "00000000-0000-0000-000-000000000000"; // {UUID} Xero generated unique identifier for a bank transaction -const bankTransactions:BankTransactions = { bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, date: "2019-02-25", reference: "You just updated", status: BankTransaction.StatusEnum.AUTHORISED, bankTransactionID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, bankAccount: { accountID: "00000000-0000-0000-000-000000000000" }}]}; // {BankTransactions} -const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const bankTransactionID = "00000000-0000-0000-000-000000000000"; // {UUID} Xero generated unique identifier for a bank transaction +const fileName = "xero-dev.jpg"; // {String} The name of the file being attached +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 +import * as fs from "fs"; +const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file +const contentType = mime.lookup(fileName); try { - const response: any = await xero.accountingApi.updateBankTransaction(xeroTenantId, bankTransactionID, bankTransactions, unitdp); + const response = await xero.accountingApi.updateBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body, { + headers: { + "Content-Type": contentType, + } + }); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -97669,7 +97684,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateBankTransactionExample + public class updateBankTransactionAttachmentByFileNameExample { public void main() { @@ -97680,18 +97695,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) var bankTransactionID = new UUID(); // UUID | Xero generated unique identifier for a bank transaction (default to null) - var bankTransactions = new BankTransactions(); // BankTransactions | - var unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) + var fileName = xero-dev.jpg; // String | The name of the file being attached (default to null) + var body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - // Allows you to update a single spend or receive money transaction - BankTransactions result = apiInstance.updateBankTransaction(xeroTenantId, bankTransactionID, bankTransactions, unitdp); + // Allows you to update an Attachment on BankTransaction by Filename + Attachments result = apiInstance.updateBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateBankTransaction: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateBankTransactionAttachmentByFileName: " + e.Message ); } } } @@ -97699,7 +97714,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -97717,12 +97732,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateBankTransaction: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateBankTransactionAttachmentByFileName: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -97733,19 +97748,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant my $bankTransactionID = 00000000-0000-0000-000-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 +my $fileName = xero-dev.jpg; # String | The name of the file being attached +my $body = ::Object::byte[]->new(); # byte[] | eval { - my $result = $api_instance->updateBankTransaction(xeroTenantId => $xeroTenantId, bankTransactionID => $bankTransactionID, bankTransactions => $bankTransactions, unitdp => $unitdp); + my $result = $api_instance->updateBankTransactionAttachmentByFileName(xeroTenantId => $xeroTenantId, bankTransactionID => $bankTransactionID, fileName => $fileName, body => $body); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateBankTransaction: $@\n"; + warn "Exception when calling AccountingApi->updateBankTransactionAttachmentByFileName: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -97759,28 +97774,28 @@ 

    Usage and SDK Samples

    api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) bankTransactionID = 00000000-0000-0000-000-000000000000 # UUID | Xero generated unique identifier for a bank transaction (default to null) -bankTransactions = { bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, date: "2019-02-25", reference: "You just updated", status: BankTransaction.StatusEnum.AUTHORISED, bankTransactionID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, bankAccount: { accountID: "00000000-0000-0000-000-000000000000" }}]} # BankTransactions | -unitdp = 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) +fileName = xero-dev.jpg # String | The name of the file being attached (default to null) +body = BYTE_ARRAY_DATA_HERE # byte[] | try: - # Allows you to update a single spend or receive money transaction - api_response = api_instance.update_bank_transaction(xeroTenantId, bankTransactionID, bankTransactions, unitdp=unitdp) + # Allows you to update an Attachment on BankTransaction by Filename + api_response = api_instance.update_bank_transaction_attachment_by_file_name(xeroTenantId, bankTransactionID, fileName, body) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateBankTransaction: %s\n" % e)
    + print("Exception when calling AccountingApi->updateBankTransactionAttachmentByFileName: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
         let bankTransactionID = 00000000-0000-0000-000-000000000000; // UUID
    -    let bankTransactions = { bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, date: "2019-02-25", reference: "You just updated", status: BankTransaction.StatusEnum.AUTHORISED, bankTransactionID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, bankAccount: { accountID: "00000000-0000-0000-000-000000000000" }}]}; // BankTransactions
    -    let unitdp = 4; // Integer
    +    let fileName = xero-dev.jpg; // String
    +    let body = BYTE_ARRAY_DATA_HERE; // byte[]
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateBankTransaction(xeroTenantId, bankTransactionID, bankTransactions, unitdp, &context).wait();
    +    let result = client.updateBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -97792,8 +97807,8 @@ 

    Scopes

    - - + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoicesaccounting.attachmentsGrant read-write access to attachments
    @@ -97810,7 +97825,7 @@

    Parameters

    -
    +
    @@ -97830,6 +97845,29 @@

    Parameters

    + + + FileName* + + + +
    +
    +
    + + String + + +
    +The name of the file being attached +
    +
    +
    + Required +
    +
    +
    + @@ -97844,7 +97882,7 @@

    Parameters

    -
    +
    @@ -97871,32 +97909,33 @@

    Parameters

    Name Description - bankTransactions * + body *
    - BankTransactions + byte[]
    - +Byte array of file in body of request
    Required
    - + -
    +
    -
    Query parameters
    - - - - - - - - - -
    NameDescription
    unitdp - - -
    -
    -
    - - Integer - - -
    -e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts -
    -
    -
    -
    -
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/BankTransactions/{BankTransactionID}/Attachments/{FileName}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/BankTransfers/{BankTransferID}/Attachments/{FileName}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -98151,21 +98164,21 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID bankTransactionID = 00000000-0000-0000-000-000000000000; // UUID | Xero generated unique identifier for a bank transaction - String fileName = xero-dev.jpg; // String | The name of the file being attached + UUID bankTransferID = 00000000-0000-0000-000-000000000000; // UUID | Xero generated unique identifier for a bank transfer + String fileName = xero-dev.jpg; // String | The name of the file being attached to a Bank Transfer byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - Attachments result = apiInstance.updateBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body); + Attachments result = apiInstance.updateBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateBankTransactionAttachmentByFileName"); + System.err.println("Exception when calling AccountingApi#updateBankTransferAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -98173,39 +98186,39 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Xero generated unique identifier for a bank transaction - String fileName = xero-dev.jpg; // String | The name of the file being attached + UUID bankTransferID = 00000000-0000-0000-000-000000000000; // UUID | Xero generated unique identifier for a bank transfer + String fileName = xero-dev.jpg; // String | The name of the file being attached to a Bank Transfer byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - Attachments result = apiInstance.updateBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body); + Attachments result = apiInstance.updateBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateBankTransactionAttachmentByFileName"); + 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 *bankTransactionID = 00000000-0000-0000-000-000000000000; // Xero generated unique identifier for a bank transaction (default to null)
    -String *fileName = xero-dev.jpg; // The name of the file being attached (default to null)
    +UUID *bankTransferID = 00000000-0000-0000-000-000000000000; // Xero generated unique identifier for a bank transfer (default to null)
    +String *fileName = xero-dev.jpg; // The name of the file being attached to a Bank Transfer (default to null)
     byte[] *body = BYTE_ARRAY_DATA_HERE; // 
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to update an Attachment on BankTransaction by Filename
    -[apiInstance updateBankTransactionAttachmentByFileNameWith:xeroTenantId
    -    bankTransactionID:bankTransactionID
    +// 
    +[apiInstance updateBankTransferAttachmentByFileNameWith:xeroTenantId
    +    bankTransferID:bankTransferID
         fileName:fileName
         body:body
                   completionHandler: ^(Attachments output, NSError* error) {
    @@ -98219,7 +98232,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -98229,54 +98242,35 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const bankTransactionID = "00000000-0000-0000-000-000000000000"; // {UUID} Xero generated unique identifier for a bank transaction -const fileName = "xero-dev.jpg"; // {String} The name of the file being attached + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const bankTransferID = "00000000-0000-0000-000-000000000000"; // {UUID} Xero generated unique identifier for a bank transfer +const fileName = "xero-dev.jpg"; // {String} The name of the file being attached to a Bank Transfer 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 - -// You'll need to add the import below to read your file -// import * as fs from "fs"; +import * as fs from "fs"; const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file const contentType = mime.lookup(fileName); + try { - const response: any = await xero.accountingApi.updateBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body, { + const response = await xero.accountingApi.updateBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body, { headers: { "Content-Type": contentType, } }); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -98285,7 +98279,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateBankTransactionAttachmentByFileNameExample + public class updateBankTransferAttachmentByFileNameExample { public void main() { @@ -98295,19 +98289,19 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var bankTransactionID = new UUID(); // UUID | Xero generated unique identifier for a bank transaction (default to null) - var fileName = xero-dev.jpg; // String | The name of the file being attached (default to null) + var bankTransferID = new UUID(); // UUID | Xero generated unique identifier for a bank transfer (default to null) + var fileName = xero-dev.jpg; // String | The name of the file being attached to a Bank Transfer (default to null) var body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - // Allows you to update an Attachment on BankTransaction by Filename - Attachments result = apiInstance.updateBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body); + // + Attachments result = apiInstance.updateBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateBankTransactionAttachmentByFileName: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateBankTransferAttachmentByFileName: " + e.Message ); } } } @@ -98315,7 +98309,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -98333,12 +98327,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateBankTransactionAttachmentByFileName: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateBankTransferAttachmentByFileName: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -98348,20 +98342,20 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $bankTransactionID = 00000000-0000-0000-000-000000000000; # UUID | Xero generated unique identifier for a bank transaction -my $fileName = xero-dev.jpg; # String | The name of the file being attached +my $bankTransferID = 00000000-0000-0000-000-000000000000; # UUID | Xero generated unique identifier for a bank transfer +my $fileName = xero-dev.jpg; # String | The name of the file being attached to a Bank Transfer my $body = ::Object::byte[]->new(); # byte[] | eval { - my $result = $api_instance->updateBankTransactionAttachmentByFileName(xeroTenantId => $xeroTenantId, bankTransactionID => $bankTransactionID, fileName => $fileName, body => $body); + my $result = $api_instance->updateBankTransferAttachmentByFileName(xeroTenantId => $xeroTenantId, bankTransferID => $bankTransferID, fileName => $fileName, body => $body); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateBankTransactionAttachmentByFileName: $@\n"; + warn "Exception when calling AccountingApi->updateBankTransferAttachmentByFileName: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -98374,29 +98368,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -bankTransactionID = 00000000-0000-0000-000-000000000000 # UUID | Xero generated unique identifier for a bank transaction (default to null) -fileName = xero-dev.jpg # String | The name of the file being attached (default to null) +bankTransferID = 00000000-0000-0000-000-000000000000 # UUID | Xero generated unique identifier for a bank transfer (default to null) +fileName = xero-dev.jpg # String | The name of the file being attached to a Bank Transfer (default to null) body = BYTE_ARRAY_DATA_HERE # byte[] | try: - # Allows you to update an Attachment on BankTransaction by Filename - api_response = api_instance.update_bank_transaction_attachment_by_file_name(xeroTenantId, bankTransactionID, fileName, body) + # + api_response = api_instance.update_bank_transfer_attachment_by_file_name(xeroTenantId, bankTransferID, fileName, body) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateBankTransactionAttachmentByFileName: %s\n" % e)
    + print("Exception when calling AccountingApi->updateBankTransferAttachmentByFileName: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let bankTransactionID = 00000000-0000-0000-000-000000000000; // UUID
    +    let bankTransferID = 00000000-0000-0000-000-000000000000; // UUID
         let fileName = xero-dev.jpg; // String
         let body = BYTE_ARRAY_DATA_HERE; // byte[]
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateBankTransactionAttachmentByFileName(xeroTenantId, bankTransactionID, fileName, body, &context).wait();
    +    let result = client.updateBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -98422,11 +98416,11 @@ 

    Parameters

    Name Description - BankTransactionID* + BankTransferID* -
    +
    @@ -98437,7 +98431,7 @@

    Parameters

    -Xero generated unique identifier for a bank transaction +Xero generated unique identifier for a bank transfer
    @@ -98452,7 +98446,7 @@

    Parameters

    -
    +
    @@ -98460,7 +98454,7 @@

    Parameters

    -The name of the file being attached +The name of the file being attached to a Bank Transfer
    @@ -98483,7 +98477,7 @@

    Parameters

    -
    +
    @@ -98552,12 +98546,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_updateBankTransactionAttachmentByFileName_body'); + var result = $('#d2e199_updateBankTransferAttachmentByFileName_body'); result.empty(); result.append(view.render()); }); -
    +
    @@ -98566,27 +98560,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/BankTransfers/{BankTransferID}/Attachments/{FileName}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Contacts/{ContactID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -98765,21 +98759,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID bankTransferID = 00000000-0000-0000-000-000000000000; // UUID | Xero generated unique identifier for a bank transfer - String fileName = xero-dev.jpg; // String | The name of the file being attached to a Bank Transfer - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + UUID contactID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Contact + Contacts contacts = { "Contacts": [{ "ContactID": "00000000-0000-0000-000-000000000000", "Name": "Thanos" }]}; // Contacts | try { - Attachments result = apiInstance.updateBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body); + Contacts result = apiInstance.updateContact(xeroTenantId, contactID, contacts); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateBankTransferAttachmentByFileName"); + System.err.println("Exception when calling AccountingApi#updateContact"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -98787,42 +98780,39 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Xero generated unique identifier for a bank transfer - String fileName = xero-dev.jpg; // String | The name of the file being attached to a Bank Transfer - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + UUID contactID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Contact + Contacts contacts = { "Contacts": [{ "ContactID": "00000000-0000-0000-000-000000000000", "Name": "Thanos" }]}; // Contacts | try { - Attachments result = apiInstance.updateBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body); + Contacts result = apiInstance.updateContact(xeroTenantId, contactID, contacts); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateBankTransferAttachmentByFileName"); + 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 *bankTransferID = 00000000-0000-0000-000-000000000000; // Xero generated unique identifier for a bank transfer (default to null)
    -String *fileName = xero-dev.jpg; // The name of the file being attached to a Bank Transfer (default to null)
    -byte[] *body = BYTE_ARRAY_DATA_HERE; // 
    +UUID *contactID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Contact (default to null)
    +Contacts *contacts = { "Contacts": [{ "ContactID": "00000000-0000-0000-000-000000000000", "Name": "Thanos" }]}; // 
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
     // 
    -[apiInstance updateBankTransferAttachmentByFileNameWith:xeroTenantId
    -    bankTransferID:bankTransferID
    -    fileName:fileName
    -    body:body
    -              completionHandler: ^(Attachments output, NSError* error) {
    +[apiInstance updateContactWith:xeroTenantId
    +    contactID:contactID
    +    contacts:contacts
    +              completionHandler: ^(Contacts output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -98833,7 +98823,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -98843,54 +98833,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const bankTransferID = "00000000-0000-0000-000-000000000000"; // {UUID} Xero generated unique identifier for a bank transfer -const fileName = "xero-dev.jpg"; // {String} The name of the file being attached to a Bank Transfer -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 -// You'll need to add the import below to read your file -// import * as fs from "fs"; -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const contactID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Contact +const contacts: Contacts = { contacts: [{ contactID: "00000000-0000-0000-000-000000000000", name: "Thanos" }]} + try { - const response: any = await xero.accountingApi.updateBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.updateContact(xeroTenantId, contactID, contacts); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -98899,7 +98860,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateBankTransferAttachmentByFileNameExample + public class updateContactExample { public void main() { @@ -98909,19 +98870,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var bankTransferID = new UUID(); // UUID | Xero generated unique identifier for a bank transfer (default to null) - var fileName = xero-dev.jpg; // String | The name of the file being attached to a Bank Transfer (default to null) - var body = BYTE_ARRAY_DATA_HERE; // byte[] | + var contactID = new UUID(); // UUID | Unique identifier for a Contact (default to null) + var contacts = new Contacts(); // Contacts | try { // - Attachments result = apiInstance.updateBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body); + Contacts result = apiInstance.updateContact(xeroTenantId, contactID, contacts); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateBankTransferAttachmentByFileName: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateContact: " + e.Message ); } } } @@ -98929,7 +98889,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -98947,12 +98907,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateBankTransferAttachmentByFileName: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateContact: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -98962,20 +98922,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $bankTransferID = 00000000-0000-0000-000-000000000000; # UUID | Xero generated unique identifier for a bank transfer -my $fileName = xero-dev.jpg; # String | The name of the file being attached to a Bank Transfer -my $body = ::Object::byte[]->new(); # byte[] | +my $contactID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a Contact +my $contacts = ::Object::Contacts->new(); # Contacts | eval { - my $result = $api_instance->updateBankTransferAttachmentByFileName(xeroTenantId => $xeroTenantId, bankTransferID => $bankTransferID, fileName => $fileName, body => $body); + my $result = $api_instance->updateContact(xeroTenantId => $xeroTenantId, contactID => $contactID, contacts => $contacts); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateBankTransferAttachmentByFileName: $@\n"; + warn "Exception when calling AccountingApi->updateContact: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -98988,29 +98947,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -bankTransferID = 00000000-0000-0000-000-000000000000 # UUID | Xero generated unique identifier for a bank transfer (default to null) -fileName = xero-dev.jpg # String | The name of the file being attached to a Bank Transfer (default to null) -body = BYTE_ARRAY_DATA_HERE # byte[] | +contactID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Contact (default to null) +contacts = { "Contacts": [{ "ContactID": "00000000-0000-0000-000-000000000000", "Name": "Thanos" }]} # Contacts | try: # - api_response = api_instance.update_bank_transfer_attachment_by_file_name(xeroTenantId, bankTransferID, fileName, body) + api_response = api_instance.update_contact(xeroTenantId, contactID, contacts) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateBankTransferAttachmentByFileName: %s\n" % e)
    + print("Exception when calling AccountingApi->updateContact: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let bankTransferID = 00000000-0000-0000-000-000000000000; // UUID
    -    let fileName = xero-dev.jpg; // String
    -    let body = BYTE_ARRAY_DATA_HERE; // byte[]
    +    let contactID = 00000000-0000-0000-000-000000000000; // UUID
    +    let contacts = { "Contacts": [{ "ContactID": "00000000-0000-0000-000-000000000000", "Name": "Thanos" }]}; // Contacts
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateBankTransferAttachmentByFileName(xeroTenantId, bankTransferID, fileName, body, &context).wait();
    +    let result = client.updateContact(xeroTenantId, contactID, contacts, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -99022,8 +98979,8 @@ 

    Scopes

    - - + +
    accounting.attachmentsGrant read-write access to attachmentsaccounting.contactsGrant read-write access to contacts and contact groups
    @@ -99036,11 +98993,11 @@

    Parameters

    Name Description - BankTransferID* + ContactID* -
    +
    @@ -99051,30 +99008,7 @@

    Parameters

    -Xero generated unique identifier for a bank transfer -
    -
    -
    - Required -
    -
    -
    - - - - FileName* - - - -
    -
    -
    - - String - - -
    -The name of the file being attached to a Bank Transfer +Unique identifier for a Contact
    @@ -99097,7 +99031,7 @@

    Parameters

    -
    +
    @@ -99124,33 +99058,33 @@

    Parameters

    Name Description - body * + contacts *
    - byte[] + Contacts
    -Byte array of file in body of request +an array of Contacts containing single Contact object with properties to update
    Required
    - + -
    +
    @@ -99180,27 +99114,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Contacts/{ContactID}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Contacts/{ContactID}/Attachments/{FileName}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -99380,19 +99313,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID contactID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Contact - Contacts contacts = { contacts: [{ contactID: "00000000-0000-0000-000-000000000000", name: "Thanos" }]}; // Contacts | + String fileName = xero-dev.jpg; // String | Name for the file you are attaching + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - Contacts result = apiInstance.updateContact(xeroTenantId, contactID, contacts); + Attachments result = apiInstance.updateContactAttachmentByFileName(xeroTenantId, contactID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateContact"); + System.err.println("Exception when calling AccountingApi#updateContactAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -99401,22 +99335,23 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID contactID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Contact - Contacts contacts = { contacts: [{ contactID: "00000000-0000-0000-000-000000000000", name: "Thanos" }]}; // Contacts | + String fileName = xero-dev.jpg; // String | Name for the file you are attaching + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - Contacts result = apiInstance.updateContact(xeroTenantId, contactID, contacts); + Attachments result = apiInstance.updateContactAttachmentByFileName(xeroTenantId, contactID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateContact"); + System.err.println("Exception when calling AccountingApi#updateContactAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -99424,15 +99359,17 @@ 

    Usage and SDK Samples

    String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null) UUID *contactID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Contact (default to null) -Contacts *contacts = { contacts: [{ contactID: "00000000-0000-0000-000-000000000000", name: "Thanos" }]}; // +String *fileName = xero-dev.jpg; // Name for the file you are attaching (default to null) +byte[] *body = BYTE_ARRAY_DATA_HERE; // AccountingApi *apiInstance = [[AccountingApi alloc] init]; // -[apiInstance updateContactWith:xeroTenantId +[apiInstance updateContactAttachmentByFileNameWith:xeroTenantId contactID:contactID - contacts:contacts - completionHandler: ^(Contacts output, NSError* error) { + fileName:fileName + body:body + completionHandler: ^(Attachments output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -99443,7 +99380,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -99453,42 +99390,35 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const contactID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Contact -const contacts:Contacts = { contacts: [{ contactID: "00000000-0000-0000-000-000000000000", name: "Thanos" }]}; // {Contacts} + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const contactID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Contact +const fileName = "xero-dev.jpg"; // {String} Name for the file you are attaching +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 +import * as fs from "fs"; +const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file +const contentType = mime.lookup(fileName); + try { - const response: any = await xero.accountingApi.updateContact(xeroTenantId, contactID, contacts); + const response = await xero.accountingApi.updateContactAttachmentByFileName(xeroTenantId, contactID, fileName, body, { + headers: { + "Content-Type": contentType, + } + }); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -99497,7 +99427,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateContactExample + public class updateContactAttachmentByFileNameExample { public void main() { @@ -99508,17 +99438,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) var contactID = new UUID(); // UUID | Unique identifier for a Contact (default to null) - var contacts = new Contacts(); // Contacts | + var fileName = xero-dev.jpg; // String | Name for the file you are attaching (default to null) + var body = BYTE_ARRAY_DATA_HERE; // byte[] | try { // - Contacts result = apiInstance.updateContact(xeroTenantId, contactID, contacts); + Attachments result = apiInstance.updateContactAttachmentByFileName(xeroTenantId, contactID, fileName, body); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateContact: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateContactAttachmentByFileName: " + e.Message ); } } } @@ -99526,7 +99457,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -99544,12 +99475,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateContact: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateContactAttachmentByFileName: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -99560,18 +99491,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant my $contactID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a Contact -my $contacts = ::Object::Contacts->new(); # Contacts | +my $fileName = xero-dev.jpg; # String | Name for the file you are attaching +my $body = ::Object::byte[]->new(); # byte[] | eval { - my $result = $api_instance->updateContact(xeroTenantId => $xeroTenantId, contactID => $contactID, contacts => $contacts); + my $result = $api_instance->updateContactAttachmentByFileName(xeroTenantId => $xeroTenantId, contactID => $contactID, fileName => $fileName, body => $body); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateContact: $@\n"; + warn "Exception when calling AccountingApi->updateContactAttachmentByFileName: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -99585,26 +99517,28 @@ 

    Usage and SDK Samples

    api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) contactID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Contact (default to null) -contacts = { contacts: [{ contactID: "00000000-0000-0000-000-000000000000", name: "Thanos" }]} # Contacts | +fileName = xero-dev.jpg # String | Name for the file you are attaching (default to null) +body = BYTE_ARRAY_DATA_HERE # byte[] | try: # - api_response = api_instance.update_contact(xeroTenantId, contactID, contacts) + api_response = api_instance.update_contact_attachment_by_file_name(xeroTenantId, contactID, fileName, body) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateContact: %s\n" % e)
    + print("Exception when calling AccountingApi->updateContactAttachmentByFileName: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
         let contactID = 00000000-0000-0000-000-000000000000; // UUID
    -    let contacts = { contacts: [{ contactID: "00000000-0000-0000-000-000000000000", name: "Thanos" }]}; // Contacts
    +    let fileName = xero-dev.jpg; // String
    +    let body = BYTE_ARRAY_DATA_HERE; // byte[]
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateContact(xeroTenantId, contactID, contacts, &context).wait();
    +    let result = client.updateContactAttachmentByFileName(xeroTenantId, contactID, fileName, body, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -99616,8 +99550,8 @@ 

    Scopes

    - - + +
    accounting.contactsGrant read-write access to contacts and contact groupsaccounting.attachmentsGrant read-write access to attachments
    @@ -99634,7 +99568,7 @@

    Parameters

    -
    +
    @@ -99654,6 +99588,29 @@

    Parameters

    + + + FileName* + + + +
    +
    +
    + + String + + +
    +Name for the file you are attaching +
    +
    +
    + Required +
    +
    +
    + @@ -99668,7 +99625,7 @@

    Parameters

    -
    +
    @@ -99695,33 +99652,33 @@

    Parameters

    Name Description - contacts * + body *
    - Contacts + byte[]
    -an array of Contacts containing single Contact object with properties to update +Byte array of file in body of request
    Required
    - + -
    +
    @@ -99751,27 +99708,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Contacts/{ContactID}/Attachments/{FileName}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/ContactGroups/{ContactGroupID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -99949,21 +99907,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID contactID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Contact - String fileName = xero-dev.jpg; // String | Name for the file you are attaching - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + UUID contactGroupID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Contact Group + ContactGroups contactGroups = { "ContactGroups":[ { "Name":"Suppliers" } ] }; // ContactGroups | try { - Attachments result = apiInstance.updateContactAttachmentByFileName(xeroTenantId, contactID, fileName, body); + ContactGroups result = apiInstance.updateContactGroup(xeroTenantId, contactGroupID, contactGroups); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateContactAttachmentByFileName"); + System.err.println("Exception when calling AccountingApi#updateContactGroup"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -99971,42 +99928,39 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for a Contact - String fileName = xero-dev.jpg; // String | Name for the file you are attaching - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + UUID contactGroupID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Contact Group + ContactGroups contactGroups = { "ContactGroups":[ { "Name":"Suppliers" } ] }; // ContactGroups | try { - Attachments result = apiInstance.updateContactAttachmentByFileName(xeroTenantId, contactID, fileName, body); + ContactGroups result = apiInstance.updateContactGroup(xeroTenantId, contactGroupID, contactGroups); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateContactAttachmentByFileName"); + 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 *contactID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Contact (default to null)
    -String *fileName = xero-dev.jpg; // Name for the file you are attaching (default to null)
    -byte[] *body = BYTE_ARRAY_DATA_HERE; // 
    +UUID *contactGroupID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Contact Group (default to null)
    +ContactGroups *contactGroups = { "ContactGroups":[ { "Name":"Suppliers" } ] }; // 
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// 
    -[apiInstance updateContactAttachmentByFileNameWith:xeroTenantId
    -    contactID:contactID
    -    fileName:fileName
    -    body:body
    -              completionHandler: ^(Attachments output, NSError* error) {
    +// Allows you to update a Contact Group
    +[apiInstance updateContactGroupWith:xeroTenantId
    +    contactGroupID:contactGroupID
    +    contactGroups:contactGroups
    +              completionHandler: ^(ContactGroups output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -100017,7 +99971,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -100027,54 +99981,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const contactID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Contact -const fileName = "xero-dev.jpg"; // {String} Name for the file you are attaching -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 -// You'll need to add the import below to read your file -// import * as fs from "fs"; -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const contactGroupID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Contact Group +const contactGroups: ContactGroups = { contactGroups: [{ name: "Vendor" }]} + try { - const response: any = await xero.accountingApi.updateContactAttachmentByFileName(xeroTenantId, contactID, fileName, body, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.updateContactGroup(xeroTenantId, contactGroupID, contactGroups); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -100083,7 +100008,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateContactAttachmentByFileNameExample + public class updateContactGroupExample { public void main() { @@ -100093,19 +100018,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var contactID = new UUID(); // UUID | Unique identifier for a Contact (default to null) - var fileName = xero-dev.jpg; // String | Name for the file you are attaching (default to null) - var body = BYTE_ARRAY_DATA_HERE; // byte[] | + var contactGroupID = new UUID(); // UUID | Unique identifier for a Contact Group (default to null) + var contactGroups = new ContactGroups(); // ContactGroups | try { - // - Attachments result = apiInstance.updateContactAttachmentByFileName(xeroTenantId, contactID, fileName, body); + // Allows you to update a Contact Group + ContactGroups result = apiInstance.updateContactGroup(xeroTenantId, contactGroupID, contactGroups); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateContactAttachmentByFileName: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateContactGroup: " + e.Message ); } } } @@ -100113,7 +100037,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -100131,12 +100055,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateContactAttachmentByFileName: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateContactGroup: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -100146,20 +100070,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $contactID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a Contact -my $fileName = xero-dev.jpg; # String | Name for the file you are attaching -my $body = ::Object::byte[]->new(); # byte[] | +my $contactGroupID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a Contact Group +my $contactGroups = ::Object::ContactGroups->new(); # ContactGroups | eval { - my $result = $api_instance->updateContactAttachmentByFileName(xeroTenantId => $xeroTenantId, contactID => $contactID, fileName => $fileName, body => $body); + my $result = $api_instance->updateContactGroup(xeroTenantId => $xeroTenantId, contactGroupID => $contactGroupID, contactGroups => $contactGroups); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateContactAttachmentByFileName: $@\n"; + warn "Exception when calling AccountingApi->updateContactGroup: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -100172,29 +100095,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -contactID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Contact (default to null) -fileName = xero-dev.jpg # String | Name for the file you are attaching (default to null) -body = BYTE_ARRAY_DATA_HERE # byte[] | +contactGroupID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Contact Group (default to null) +contactGroups = { "ContactGroups":[ { "Name":"Suppliers" } ] } # ContactGroups | try: - # - api_response = api_instance.update_contact_attachment_by_file_name(xeroTenantId, contactID, fileName, body) + # Allows you to update a Contact Group + api_response = api_instance.update_contact_group(xeroTenantId, contactGroupID, contactGroups) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateContactAttachmentByFileName: %s\n" % e)
    + print("Exception when calling AccountingApi->updateContactGroup: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let contactID = 00000000-0000-0000-000-000000000000; // UUID
    -    let fileName = xero-dev.jpg; // String
    -    let body = BYTE_ARRAY_DATA_HERE; // byte[]
    +    let contactGroupID = 00000000-0000-0000-000-000000000000; // UUID
    +    let contactGroups = { "ContactGroups":[ { "Name":"Suppliers" } ] }; // ContactGroups
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateContactAttachmentByFileName(xeroTenantId, contactID, fileName, body, &context).wait();
    +    let result = client.updateContactGroup(xeroTenantId, contactGroupID, contactGroups, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -100206,8 +100127,8 @@ 

    Scopes

    - - + +
    accounting.attachmentsGrant read-write access to attachmentsaccounting.contactsGrant read-write access to contacts and contact groups
    @@ -100220,11 +100141,11 @@

    Parameters

    Name Description - ContactID* + ContactGroupID* -
    +
    @@ -100235,30 +100156,7 @@

    Parameters

    -Unique identifier for a Contact -
    -
    -
    - Required -
    -
    -
    - - - - FileName* - - - -
    -
    -
    - - String - - -
    -Name for the file you are attaching +Unique identifier for a Contact Group
    @@ -100281,7 +100179,7 @@

    Parameters

    -
    +
    @@ -100308,33 +100206,33 @@

    Parameters

    Name Description - body * + contactGroups *
    - byte[] + ContactGroups
    -Byte array of file in body of request +an array of Contact groups with Name of specific group to update
    Required
    - + -
    +
    @@ -100364,27 +100262,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/ContactGroups/{ContactGroupID}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/CreditNotes/{CreditNoteID}?unitdp=4"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -100563,20 +100460,21 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID contactGroupID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Contact Group - ContactGroups contactGroups = { contactGroups: [{ name: "Vendor" }]}; // ContactGroups | + UUID creditNoteID = 00000000-0000-0000-000-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 { - ContactGroups result = apiInstance.updateContactGroup(xeroTenantId, contactGroupID, contactGroups); + CreditNotes result = apiInstance.updateCreditNote(xeroTenantId, creditNoteID, creditNotes, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateContactGroup"); + System.err.println("Exception when calling AccountingApi#updateCreditNote"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -100584,39 +100482,42 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for a Contact Group - ContactGroups contactGroups = { contactGroups: [{ name: "Vendor" }]}; // ContactGroups | + UUID creditNoteID = 00000000-0000-0000-000-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 { - ContactGroups result = apiInstance.updateContactGroup(xeroTenantId, contactGroupID, contactGroups); + CreditNotes result = apiInstance.updateCreditNote(xeroTenantId, creditNoteID, creditNotes, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateContactGroup"); + 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 *contactGroupID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Contact Group (default to null)
    -ContactGroups *contactGroups = { contactGroups: [{ name: "Vendor" }]}; // 
    +UUID *creditNoteID = 00000000-0000-0000-000-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];
     
    -// Allows you to update a Contact Group
    -[apiInstance updateContactGroupWith:xeroTenantId
    -    contactGroupID:contactGroupID
    -    contactGroups:contactGroups
    -              completionHandler: ^(ContactGroups output, NSError* error) {
    +// Allows you to update a specific credit note
    +[apiInstance updateCreditNoteWith:xeroTenantId
    +    creditNoteID:creditNoteID
    +    creditNotes:creditNotes
    +    unitdp:unitdp
    +              completionHandler: ^(CreditNotes output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -100627,7 +100528,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -100637,42 +100538,28 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const contactGroupID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Contact Group -const contactGroups:ContactGroups = { contactGroups: [{ name: "Vendor" }]}; // {ContactGroups} + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const creditNoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Credit Note + + +const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts +const creditNotes: CreditNotes = { creditNotes: [{ type: CreditNote.TypeEnum.ACCPAYCREDIT, contact: { contactID: "00000000-0000-0000-000-000000000000" }, date: "2019-01-05", status: CreditNote.StatusEnum.AUTHORISED, reference: "Mind stone", lineItems: [{ description: "Infinity Stones", quantity: 1.0, unitAmount: 100.0, accountCode: "400" } ]}]} + try { - const response: any = await xero.accountingApi.updateContactGroup(xeroTenantId, contactGroupID, contactGroups); + const response = await xero.accountingApi.updateCreditNote(xeroTenantId, creditNoteID, creditNotes, unitdp); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -100681,7 +100568,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateContactGroupExample + public class updateCreditNoteExample { public void main() { @@ -100691,18 +100578,19 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var contactGroupID = new UUID(); // UUID | Unique identifier for a Contact Group (default to null) - var contactGroups = new ContactGroups(); // ContactGroups | + var creditNoteID = new UUID(); // UUID | Unique identifier for a Credit Note (default to null) + var creditNotes = new CreditNotes(); // CreditNotes | + var unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try { - // Allows you to update a Contact Group - ContactGroups result = apiInstance.updateContactGroup(xeroTenantId, contactGroupID, contactGroups); + // Allows you to update a specific credit note + CreditNotes result = apiInstance.updateCreditNote(xeroTenantId, creditNoteID, creditNotes, unitdp); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateContactGroup: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateCreditNote: " + e.Message ); } } } @@ -100710,7 +100598,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -100728,12 +100616,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateContactGroup: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateCreditNote: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -100743,19 +100631,20 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $contactGroupID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a Contact Group -my $contactGroups = ::Object::ContactGroups->new(); # ContactGroups | +my $creditNoteID = 00000000-0000-0000-000-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->updateContactGroup(xeroTenantId => $xeroTenantId, contactGroupID => $contactGroupID, contactGroups => $contactGroups); + my $result = $api_instance->updateCreditNote(xeroTenantId => $xeroTenantId, creditNoteID => $creditNoteID, creditNotes => $creditNotes, unitdp => $unitdp); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateContactGroup: $@\n"; + warn "Exception when calling AccountingApi->updateCreditNote: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -100768,27 +100657,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -contactGroupID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Contact Group (default to null) -contactGroups = { contactGroups: [{ name: "Vendor" }]} # ContactGroups | +creditNoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Credit Note (default to null) +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 | +unitdp = 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try: - # Allows you to update a Contact Group - api_response = api_instance.update_contact_group(xeroTenantId, contactGroupID, contactGroups) + # Allows you to update a specific credit note + api_response = api_instance.update_credit_note(xeroTenantId, creditNoteID, creditNotes, unitdp=unitdp) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateContactGroup: %s\n" % e)
    + print("Exception when calling AccountingApi->updateCreditNote: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let contactGroupID = 00000000-0000-0000-000-000000000000; // UUID
    -    let contactGroups = { contactGroups: [{ name: "Vendor" }]}; // ContactGroups
    +    let creditNoteID = 00000000-0000-0000-000-000000000000; // UUID
    +    let 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
    +    let unitdp = 4; // Integer
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateContactGroup(xeroTenantId, contactGroupID, contactGroups, &context).wait();
    +    let result = client.updateCreditNote(xeroTenantId, creditNoteID, creditNotes, unitdp, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -100800,8 +100691,8 @@ 

    Scopes

    - - + +
    accounting.contactsGrant read-write access to contacts and contact groupsaccounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    @@ -100814,11 +100705,11 @@

    Parameters

    Name Description - ContactGroupID* + CreditNoteID* -
    +
    @@ -100829,7 +100720,7 @@

    Parameters

    -Unique identifier for a Contact Group +Unique identifier for a Credit Note
    @@ -100852,7 +100743,7 @@

    Parameters

    -
    +
    @@ -100879,33 +100770,33 @@

    Parameters

    Name Description - contactGroups * + creditNotes *
    - ContactGroups + CreditNotes
    -an array of Contact groups with Name of specific group to update +an array of Credit Notes containing credit note details to update
    Required
    - + -
    +
    +
    Query parameters
    + + + + + + + + + +
    NameDescription
    unitdp + + +
    +
    +
    + + Integer + + +
    +e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts +
    +
    +
    +
    +
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/CreditNotes/{CreditNoteID}?unitdp=4"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/CreditNotes/{CreditNoteID}/Attachments/{FileName}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -101134,20 +101052,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID creditNoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Credit Note - CreditNotes creditNotes = { creditNotes: [{ type: CreditNote.TypeEnum.ACCPAYCREDIT, contact: { contactID: "00000000-0000-0000-000-000000000000" }, date: "2019-01-05", status: CreditNote.StatusEnum.AUTHORISED, reference: "Mind stone", lineItems: [{ description: "Infinity Stones", quantity: 1.0, unitAmount: 100.0, 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 + String fileName = xero-dev.jpg; // String | Name of the file you are attaching to Credit Note + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - CreditNotes result = apiInstance.updateCreditNote(xeroTenantId, creditNoteID, creditNotes, unitdp); + Attachments result = apiInstance.updateCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateCreditNote"); + System.err.println("Exception when calling AccountingApi#updateCreditNoteAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -101156,23 +101074,23 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID creditNoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Credit Note - CreditNotes creditNotes = { creditNotes: [{ type: CreditNote.TypeEnum.ACCPAYCREDIT, contact: { contactID: "00000000-0000-0000-000-000000000000" }, date: "2019-01-05", status: CreditNote.StatusEnum.AUTHORISED, reference: "Mind stone", lineItems: [{ description: "Infinity Stones", quantity: 1.0, unitAmount: 100.0, 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 + String fileName = xero-dev.jpg; // String | Name of the file you are attaching to Credit Note + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - CreditNotes result = apiInstance.updateCreditNote(xeroTenantId, creditNoteID, creditNotes, unitdp); + Attachments result = apiInstance.updateCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateCreditNote"); + System.err.println("Exception when calling AccountingApi#updateCreditNoteAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -101180,17 +101098,17 @@ 

    Usage and SDK Samples

    String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null) UUID *creditNoteID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Credit Note (default to null) -CreditNotes *creditNotes = { creditNotes: [{ type: CreditNote.TypeEnum.ACCPAYCREDIT, contact: { contactID: "00000000-0000-0000-000-000000000000" }, date: "2019-01-05", status: CreditNote.StatusEnum.AUTHORISED, reference: "Mind stone", lineItems: [{ description: "Infinity Stones", quantity: 1.0, unitAmount: 100.0, 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) +String *fileName = xero-dev.jpg; // Name of the file you are attaching to Credit Note (default to null) +byte[] *body = BYTE_ARRAY_DATA_HERE; // AccountingApi *apiInstance = [[AccountingApi alloc] init]; -// Allows you to update a specific credit note -[apiInstance updateCreditNoteWith:xeroTenantId +// Allows you to update Attachments on CreditNote by file name +[apiInstance updateCreditNoteAttachmentByFileNameWith:xeroTenantId creditNoteID:creditNoteID - creditNotes:creditNotes - unitdp:unitdp - completionHandler: ^(CreditNotes output, NSError* error) { + fileName:fileName + body:body + completionHandler: ^(Attachments output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -101201,7 +101119,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -101211,44 +101129,35 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const creditNoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Credit Note -const creditNotes:CreditNotes = { creditNotes: [{ type: CreditNote.TypeEnum.ACCPAYCREDIT, contact: { contactID: "00000000-0000-0000-000-000000000000" }, date: "2019-01-05", status: CreditNote.StatusEnum.AUTHORISED, reference: "Mind stone", lineItems: [{ description: "Infinity Stones", quantity: 1.0, unitAmount: 100.0, accountCode: "400" } ]}]}; // {CreditNotes} -const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const creditNoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Credit Note +const fileName = "xero-dev.jpg"; // {String} Name of the file you are attaching to Credit Note +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 +import * as fs from "fs"; +const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file +const contentType = mime.lookup(fileName); try { - const response: any = await xero.accountingApi.updateCreditNote(xeroTenantId, creditNoteID, creditNotes, unitdp); + const response = await xero.accountingApi.updateCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body, { + headers: { + "Content-Type": contentType, + } + }); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -101257,7 +101166,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateCreditNoteExample + public class updateCreditNoteAttachmentByFileNameExample { public void main() { @@ -101268,18 +101177,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) var creditNoteID = new UUID(); // UUID | Unique identifier for a Credit Note (default to null) - var creditNotes = new CreditNotes(); // CreditNotes | - var unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) + var fileName = xero-dev.jpg; // String | Name of the file you are attaching to Credit Note (default to null) + var body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - // Allows you to update a specific credit note - CreditNotes result = apiInstance.updateCreditNote(xeroTenantId, creditNoteID, creditNotes, unitdp); + // Allows you to update Attachments on CreditNote by file name + Attachments result = apiInstance.updateCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateCreditNote: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateCreditNoteAttachmentByFileName: " + e.Message ); } } } @@ -101287,7 +101196,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -101305,12 +101214,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateCreditNote: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateCreditNoteAttachmentByFileName: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -101321,19 +101230,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant my $creditNoteID = 00000000-0000-0000-000-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 +my $fileName = xero-dev.jpg; # String | Name of the file you are attaching to Credit Note +my $body = ::Object::byte[]->new(); # byte[] | eval { - my $result = $api_instance->updateCreditNote(xeroTenantId => $xeroTenantId, creditNoteID => $creditNoteID, creditNotes => $creditNotes, unitdp => $unitdp); + my $result = $api_instance->updateCreditNoteAttachmentByFileName(xeroTenantId => $xeroTenantId, creditNoteID => $creditNoteID, fileName => $fileName, body => $body); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateCreditNote: $@\n"; + warn "Exception when calling AccountingApi->updateCreditNoteAttachmentByFileName: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -101347,28 +101256,28 @@ 

    Usage and SDK Samples

    api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) creditNoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Credit Note (default to null) -creditNotes = { creditNotes: [{ type: CreditNote.TypeEnum.ACCPAYCREDIT, contact: { contactID: "00000000-0000-0000-000-000000000000" }, date: "2019-01-05", status: CreditNote.StatusEnum.AUTHORISED, reference: "Mind stone", lineItems: [{ description: "Infinity Stones", quantity: 1.0, unitAmount: 100.0, accountCode: "400" } ]}]} # CreditNotes | -unitdp = 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) +fileName = xero-dev.jpg # String | Name of the file you are attaching to Credit Note (default to null) +body = BYTE_ARRAY_DATA_HERE # byte[] | try: - # Allows you to update a specific credit note - api_response = api_instance.update_credit_note(xeroTenantId, creditNoteID, creditNotes, unitdp=unitdp) + # Allows you to update Attachments on CreditNote by file name + api_response = api_instance.update_credit_note_attachment_by_file_name(xeroTenantId, creditNoteID, fileName, body) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateCreditNote: %s\n" % e)
    + print("Exception when calling AccountingApi->updateCreditNoteAttachmentByFileName: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
         let creditNoteID = 00000000-0000-0000-000-000000000000; // UUID
    -    let creditNotes = { creditNotes: [{ type: CreditNote.TypeEnum.ACCPAYCREDIT, contact: { contactID: "00000000-0000-0000-000-000000000000" }, date: "2019-01-05", status: CreditNote.StatusEnum.AUTHORISED, reference: "Mind stone", lineItems: [{ description: "Infinity Stones", quantity: 1.0, unitAmount: 100.0, accountCode: "400" } ]}]}; // CreditNotes
    -    let unitdp = 4; // Integer
    +    let fileName = xero-dev.jpg; // String
    +    let body = BYTE_ARRAY_DATA_HERE; // byte[]
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateCreditNote(xeroTenantId, creditNoteID, creditNotes, unitdp, &context).wait();
    +    let result = client.updateCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -101380,8 +101289,8 @@ 

    Scopes

    - - + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoicesaccounting.attachmentsGrant read-write access to attachments
    @@ -101398,7 +101307,7 @@

    Parameters

    -
    +
    @@ -101418,6 +101327,29 @@

    Parameters

    + + + FileName* + + + +
    +
    +
    + + String + + +
    +Name of the file you are attaching to Credit Note +
    +
    +
    + Required +
    +
    +
    + @@ -101432,7 +101364,7 @@

    Parameters

    -
    +
    @@ -101459,33 +101391,33 @@

    Parameters

    Name Description - creditNotes * + body *
    - CreditNotes + byte[]
    -an array of Credit Notes containing credit note details to update +Byte array of file in body of request
    Required
    - + -
    +
    -
    Query parameters
    - - - - - - - - - -
    NameDescription
    unitdp - - -
    -
    -
    - - Integer - - -
    -e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts -
    -
    -
    -
    -
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/CreditNotes/{CreditNoteID}/Attachments/{FileName}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/ExpenseClaims/{ExpenseClaimID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -101740,21 +101646,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID creditNoteID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a Credit Note - String fileName = xero-dev.jpg; // String | Name of the file you are attaching to Credit Note - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + UUID expenseClaimID = 00000000-0000-0000-000-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 { - Attachments result = apiInstance.updateCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body); + ExpenseClaims result = apiInstance.updateExpenseClaim(xeroTenantId, expenseClaimID, expenseClaims); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateCreditNoteAttachmentByFileName"); + System.err.println("Exception when calling AccountingApi#updateExpenseClaim"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -101762,42 +101667,39 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for a Credit Note - String fileName = xero-dev.jpg; // String | Name of the file you are attaching to Credit Note - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + UUID expenseClaimID = 00000000-0000-0000-000-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 { - Attachments result = apiInstance.updateCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body); + ExpenseClaims result = apiInstance.updateExpenseClaim(xeroTenantId, expenseClaimID, expenseClaims); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateCreditNoteAttachmentByFileName"); + 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 *creditNoteID = 00000000-0000-0000-000-000000000000; // Unique identifier for a Credit Note (default to null)
    -String *fileName = xero-dev.jpg; // Name of the file you are attaching to Credit Note (default to null)
    -byte[] *body = BYTE_ARRAY_DATA_HERE; // 
    +UUID *expenseClaimID = 00000000-0000-0000-000-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];
     
    -// Allows you to update Attachments on CreditNote by file name
    -[apiInstance updateCreditNoteAttachmentByFileNameWith:xeroTenantId
    -    creditNoteID:creditNoteID
    -    fileName:fileName
    -    body:body
    -              completionHandler: ^(Attachments output, NSError* error) {
    +// Allows you to update specified expense claims
    +[apiInstance updateExpenseClaimWith:xeroTenantId
    +    expenseClaimID:expenseClaimID
    +    expenseClaims:expenseClaims
    +              completionHandler: ^(ExpenseClaims output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -101808,7 +101710,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -101818,54 +101720,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const creditNoteID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a Credit Note -const fileName = "xero-dev.jpg"; // {String} Name of the file you are attaching to Credit Note -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 -// You'll need to add the import below to read your file -// import * as fs from "fs"; -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const expenseClaimID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a ExpenseClaim +const expenseClaims: ExpenseClaims = { expenseClaims: [{ status: ExpenseClaim.StatusEnum.AUTHORISED, user: { userID: "00000000-0000-0000-000-000000000000" }, receipts: [{ receiptID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, date: "2020-01-01", user: {} }]}]} + try { - const response: any = await xero.accountingApi.updateCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.updateExpenseClaim(xeroTenantId, expenseClaimID, expenseClaims); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -101874,7 +101747,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateCreditNoteAttachmentByFileNameExample + public class updateExpenseClaimExample { public void main() { @@ -101884,19 +101757,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var creditNoteID = new UUID(); // UUID | Unique identifier for a Credit Note (default to null) - var fileName = xero-dev.jpg; // String | Name of the file you are attaching to Credit Note (default to null) - var body = BYTE_ARRAY_DATA_HERE; // byte[] | + var expenseClaimID = new UUID(); // UUID | Unique identifier for a ExpenseClaim (default to null) + var expenseClaims = new ExpenseClaims(); // ExpenseClaims | try { - // Allows you to update Attachments on CreditNote by file name - Attachments result = apiInstance.updateCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body); + // Allows you to update specified expense claims + ExpenseClaims result = apiInstance.updateExpenseClaim(xeroTenantId, expenseClaimID, expenseClaims); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateCreditNoteAttachmentByFileName: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateExpenseClaim: " + e.Message ); } } } @@ -101904,7 +101776,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -101922,12 +101794,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateCreditNoteAttachmentByFileName: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateExpenseClaim: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -101937,20 +101809,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $creditNoteID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a Credit Note -my $fileName = xero-dev.jpg; # String | Name of the file you are attaching to Credit Note -my $body = ::Object::byte[]->new(); # byte[] | +my $expenseClaimID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a ExpenseClaim +my $expenseClaims = ::Object::ExpenseClaims->new(); # ExpenseClaims | eval { - my $result = $api_instance->updateCreditNoteAttachmentByFileName(xeroTenantId => $xeroTenantId, creditNoteID => $creditNoteID, fileName => $fileName, body => $body); + my $result = $api_instance->updateExpenseClaim(xeroTenantId => $xeroTenantId, expenseClaimID => $expenseClaimID, expenseClaims => $expenseClaims); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateCreditNoteAttachmentByFileName: $@\n"; + warn "Exception when calling AccountingApi->updateExpenseClaim: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -101963,29 +101834,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -creditNoteID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a Credit Note (default to null) -fileName = xero-dev.jpg # String | Name of the file you are attaching to Credit Note (default to null) -body = BYTE_ARRAY_DATA_HERE # byte[] | +expenseClaimID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a ExpenseClaim (default to null) +expenseClaims = { "ExpenseClaims": [ { "Status": "SUBMITTED", "User": { "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273" }, "Receipts": [ { "Lineitems": [], "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816" } ] } ] } # ExpenseClaims | try: - # Allows you to update Attachments on CreditNote by file name - api_response = api_instance.update_credit_note_attachment_by_file_name(xeroTenantId, creditNoteID, fileName, body) + # Allows you to update specified expense claims + api_response = api_instance.update_expense_claim(xeroTenantId, expenseClaimID, expenseClaims) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateCreditNoteAttachmentByFileName: %s\n" % e)
    + print("Exception when calling AccountingApi->updateExpenseClaim: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let creditNoteID = 00000000-0000-0000-000-000000000000; // UUID
    -    let fileName = xero-dev.jpg; // String
    -    let body = BYTE_ARRAY_DATA_HERE; // byte[]
    +    let expenseClaimID = 00000000-0000-0000-000-000000000000; // UUID
    +    let expenseClaims = { "ExpenseClaims": [ { "Status": "SUBMITTED", "User": { "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273" }, "Receipts": [ { "Lineitems": [], "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816" } ] } ] }; // ExpenseClaims
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateCreditNoteAttachmentByFileName(xeroTenantId, creditNoteID, fileName, body, &context).wait();
    +    let result = client.updateExpenseClaim(xeroTenantId, expenseClaimID, expenseClaims, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -101997,8 +101866,8 @@ 

    Scopes

    - - + +
    accounting.attachmentsGrant read-write access to attachmentsaccounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    @@ -102011,11 +101880,11 @@

    Parameters

    Name Description - CreditNoteID* + ExpenseClaimID* -
    +
    @@ -102026,30 +101895,7 @@

    Parameters

    -Unique identifier for a Credit Note -
    -
    -
    - Required -
    -
    -
    - - - - FileName* - - - -
    -
    -
    - - String - - -
    -Name of the file you are attaching to Credit Note +Unique identifier for a ExpenseClaim
    @@ -102072,7 +101918,7 @@

    Parameters

    -
    +
    @@ -102099,33 +101945,32 @@

    Parameters

    Name Description - body * + expenseClaims *
    - byte[] + ExpenseClaims
    -Byte array of file in body of request +
    Required
    - + -
    +
    @@ -102155,27 +102000,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/ExpenseClaims/{ExpenseClaimID}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Invoices/{InvoiceID}?unitdp=4"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -102354,20 +102198,21 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID expenseClaimID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a ExpenseClaim - ExpenseClaims expenseClaims = { expenseClaims: [{ status: ExpenseClaim.StatusEnum.AUTHORISED, user: { userID: "00000000-0000-0000-000-000000000000" }, receipts: [{ receiptID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, date:"2020-01-01", user: {} }]}]}; // ExpenseClaims | + UUID invoiceID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for an Invoice + Invoices invoices = { "Invoices": [{ Reference: "May the force be with you", "InvoiceID": "00000000-0000-0000-000-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 { - ExpenseClaims result = apiInstance.updateExpenseClaim(xeroTenantId, expenseClaimID, expenseClaims); + Invoices result = apiInstance.updateInvoice(xeroTenantId, invoiceID, invoices, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateExpenseClaim"); + System.err.println("Exception when calling AccountingApi#updateInvoice"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -102375,39 +102220,42 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for a ExpenseClaim - ExpenseClaims expenseClaims = { expenseClaims: [{ status: ExpenseClaim.StatusEnum.AUTHORISED, user: { userID: "00000000-0000-0000-000-000000000000" }, receipts: [{ receiptID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, date:"2020-01-01", user: {} }]}]}; // ExpenseClaims | + UUID invoiceID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for an Invoice + Invoices invoices = { "Invoices": [{ Reference: "May the force be with you", "InvoiceID": "00000000-0000-0000-000-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 { - ExpenseClaims result = apiInstance.updateExpenseClaim(xeroTenantId, expenseClaimID, expenseClaims); + Invoices result = apiInstance.updateInvoice(xeroTenantId, invoiceID, invoices, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateExpenseClaim"); + 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 *expenseClaimID = 00000000-0000-0000-000-000000000000; // Unique identifier for a ExpenseClaim (default to null)
    -ExpenseClaims *expenseClaims = { expenseClaims: [{ status: ExpenseClaim.StatusEnum.AUTHORISED, user: { userID: "00000000-0000-0000-000-000000000000" }, receipts: [{ receiptID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, date:"2020-01-01", user: {} }]}]}; // 
    +UUID *invoiceID = 00000000-0000-0000-000-000000000000; // Unique identifier for an Invoice (default to null)
    +Invoices *invoices = { "Invoices": [{ Reference: "May the force be with you", "InvoiceID": "00000000-0000-0000-000-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];
     
    -// Allows you to update specified expense claims
    -[apiInstance updateExpenseClaimWith:xeroTenantId
    -    expenseClaimID:expenseClaimID
    -    expenseClaims:expenseClaims
    -              completionHandler: ^(ExpenseClaims output, NSError* error) {
    +// Allows you to update a specified sales invoices or purchase bills
    +[apiInstance updateInvoiceWith:xeroTenantId
    +    invoiceID:invoiceID
    +    invoices:invoices
    +    unitdp:unitdp
    +              completionHandler: ^(Invoices output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -102418,7 +102266,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -102428,42 +102276,28 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const expenseClaimID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a ExpenseClaim -const expenseClaims:ExpenseClaims = { expenseClaims: [{ status: ExpenseClaim.StatusEnum.AUTHORISED, user: { userID: "00000000-0000-0000-000-000000000000" }, receipts: [{ receiptID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, date:"2020-01-01", user: {} }]}]}; // {ExpenseClaims} + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const invoiceID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for an Invoice + + +const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts +const invoices: Invoices = { invoices: [{ reference: "I am Iron Man", invoiceID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, type: Invoice.TypeEnum.ACCPAY }]} + try { - const response: any = await xero.accountingApi.updateExpenseClaim(xeroTenantId, expenseClaimID, expenseClaims); + const response = await xero.accountingApi.updateInvoice(xeroTenantId, invoiceID, invoices, unitdp); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -102472,7 +102306,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateExpenseClaimExample + public class updateInvoiceExample { public void main() { @@ -102482,18 +102316,19 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var expenseClaimID = new UUID(); // UUID | Unique identifier for a ExpenseClaim (default to null) - var expenseClaims = new ExpenseClaims(); // ExpenseClaims | + var invoiceID = new UUID(); // UUID | Unique identifier for an Invoice (default to null) + var invoices = new Invoices(); // Invoices | + var unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try { - // Allows you to update specified expense claims - ExpenseClaims result = apiInstance.updateExpenseClaim(xeroTenantId, expenseClaimID, expenseClaims); + // Allows you to update a specified sales invoices or purchase bills + Invoices result = apiInstance.updateInvoice(xeroTenantId, invoiceID, invoices, unitdp); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateExpenseClaim: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateInvoice: " + e.Message ); } } } @@ -102501,7 +102336,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -102519,12 +102354,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateExpenseClaim: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateInvoice: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -102534,19 +102369,20 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $expenseClaimID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a ExpenseClaim -my $expenseClaims = ::Object::ExpenseClaims->new(); # ExpenseClaims | +my $invoiceID = 00000000-0000-0000-000-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->updateExpenseClaim(xeroTenantId => $xeroTenantId, expenseClaimID => $expenseClaimID, expenseClaims => $expenseClaims); + my $result = $api_instance->updateInvoice(xeroTenantId => $xeroTenantId, invoiceID => $invoiceID, invoices => $invoices, unitdp => $unitdp); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateExpenseClaim: $@\n"; + warn "Exception when calling AccountingApi->updateInvoice: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -102559,27 +102395,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -expenseClaimID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a ExpenseClaim (default to null) -expenseClaims = { expenseClaims: [{ status: ExpenseClaim.StatusEnum.AUTHORISED, user: { userID: "00000000-0000-0000-000-000000000000" }, receipts: [{ receiptID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, date:"2020-01-01", user: {} }]}]} # ExpenseClaims | +invoiceID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for an Invoice (default to null) +invoices = { "Invoices": [{ Reference: "May the force be with you", "InvoiceID": "00000000-0000-0000-000-000000000000", "LineItems": [], "Contact": {}, "Type": "ACCPAY" }]} # Invoices | +unitdp = 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try: - # Allows you to update specified expense claims - api_response = api_instance.update_expense_claim(xeroTenantId, expenseClaimID, expenseClaims) + # Allows you to update a specified sales invoices or purchase bills + api_response = api_instance.update_invoice(xeroTenantId, invoiceID, invoices, unitdp=unitdp) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateExpenseClaim: %s\n" % e)
    + print("Exception when calling AccountingApi->updateInvoice: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let expenseClaimID = 00000000-0000-0000-000-000000000000; // UUID
    -    let expenseClaims = { expenseClaims: [{ status: ExpenseClaim.StatusEnum.AUTHORISED, user: { userID: "00000000-0000-0000-000-000000000000" }, receipts: [{ receiptID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, date:"2020-01-01", user: {} }]}]}; // ExpenseClaims
    +    let invoiceID = 00000000-0000-0000-000-000000000000; // UUID
    +    let invoices = { "Invoices": [{ Reference: "May the force be with you", "InvoiceID": "00000000-0000-0000-000-000000000000", "LineItems": [], "Contact": {}, "Type": "ACCPAY" }]}; // Invoices
    +    let unitdp = 4; // Integer
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateExpenseClaim(xeroTenantId, expenseClaimID, expenseClaims, &context).wait();
    +    let result = client.updateInvoice(xeroTenantId, invoiceID, invoices, unitdp, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -102605,11 +102443,11 @@ 

    Parameters

    Name Description - ExpenseClaimID* + InvoiceID* -
    +
    @@ -102620,7 +102458,7 @@

    Parameters

    -Unique identifier for a ExpenseClaim +Unique identifier for an Invoice
    @@ -102643,7 +102481,7 @@

    Parameters

    -
    +
    @@ -102670,12 +102508,12 @@

    Parameters

    Name Description - expenseClaims * + invoices *
    - ExpenseClaims + Invoices
    @@ -102693,9 +102531,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/ExpenseClaims" + "$ref" : "#/components/schemas/Invoices" }, - "example" : "{ expenseClaims: [{ status: ExpenseClaim.StatusEnum.AUTHORISED, user: { userID: \"00000000-0000-0000-000-000000000000\" }, receipts: [{ receiptID: \"00000000-0000-0000-000-000000000000\", lineItems: [], contact: {}, date:\"2020-01-01\", user: {} }]}]}" + "example" : "{ \"Invoices\": [{ Reference: \"May the force be with you\", \"InvoiceID\": \"00000000-0000-0000-000-000000000000\", \"LineItems\": [], \"Contact\": {}, \"Type\": \"ACCPAY\" }]}" } }, "required" : true @@ -102711,41 +102549,68 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_updateExpenseClaim_expenseClaims'); + var result = $('#d2e199_updateInvoice_invoices'); result.empty(); result.append(view.render()); }); -
    +
    +
    Query parameters
    + + + + + + + + + +
    NameDescription
    unitdp + + +
    +
    +
    + + Integer + + +
    +e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts +
    +
    +
    +
    +
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Invoices/{InvoiceID}?unitdp=4"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Invoices/{InvoiceID}/Attachments/{FileName}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -102924,20 +102789,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID invoiceID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for an Invoice - Invoices invoices = { invoices: [{ reference: "I am Iron Man", invoiceID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, type: Invoice.TypeEnum.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 + String fileName = xero-dev.jpg; // String | Name of the file you are attaching + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - Invoices result = apiInstance.updateInvoice(xeroTenantId, invoiceID, invoices, unitdp); + Attachments result = apiInstance.updateInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateInvoice"); + System.err.println("Exception when calling AccountingApi#updateInvoiceAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -102946,23 +102811,23 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID invoiceID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for an Invoice - Invoices invoices = { invoices: [{ reference: "I am Iron Man", invoiceID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, type: Invoice.TypeEnum.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 + String fileName = xero-dev.jpg; // String | Name of the file you are attaching + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - Invoices result = apiInstance.updateInvoice(xeroTenantId, invoiceID, invoices, unitdp); + Attachments result = apiInstance.updateInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateInvoice"); + System.err.println("Exception when calling AccountingApi#updateInvoiceAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -102970,17 +102835,17 @@ 

    Usage and SDK Samples

    String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null) UUID *invoiceID = 00000000-0000-0000-000-000000000000; // Unique identifier for an Invoice (default to null) -Invoices *invoices = { invoices: [{ reference: "I am Iron Man", invoiceID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, type: Invoice.TypeEnum.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) +String *fileName = xero-dev.jpg; // Name of the file you are attaching (default to null) +byte[] *body = BYTE_ARRAY_DATA_HERE; // AccountingApi *apiInstance = [[AccountingApi alloc] init]; -// Allows you to update a specified sales invoices or purchase bills -[apiInstance updateInvoiceWith:xeroTenantId +// Allows you to update Attachment on invoices or purchase bills by it's filename +[apiInstance updateInvoiceAttachmentByFileNameWith:xeroTenantId invoiceID:invoiceID - invoices:invoices - unitdp:unitdp - completionHandler: ^(Invoices output, NSError* error) { + fileName:fileName + body:body + completionHandler: ^(Attachments output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -102991,7 +102856,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -103001,44 +102866,35 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const invoiceID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for an Invoice -const invoices:Invoices = { invoices: [{ reference: "I am Iron Man", invoiceID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, type: Invoice.TypeEnum.ACCPAY }]}; // {Invoices} -const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const invoiceID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for an Invoice +const fileName = "xero-dev.jpg"; // {String} Name of the file you are attaching +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 +import * as fs from "fs"; +const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file +const contentType = mime.lookup(fileName); try { - const response: any = await xero.accountingApi.updateInvoice(xeroTenantId, invoiceID, invoices, unitdp); + const response = await xero.accountingApi.updateInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body, { + headers: { + "Content-Type": contentType, + } + }); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -103047,7 +102903,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateInvoiceExample + public class updateInvoiceAttachmentByFileNameExample { public void main() { @@ -103058,18 +102914,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) var invoiceID = new UUID(); // UUID | Unique identifier for an Invoice (default to null) - var invoices = new Invoices(); // Invoices | - var unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) + var fileName = xero-dev.jpg; // String | Name of the file you are attaching (default to null) + var body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - // Allows you to update a specified sales invoices or purchase bills - Invoices result = apiInstance.updateInvoice(xeroTenantId, invoiceID, invoices, unitdp); + // Allows you to update Attachment on invoices or purchase bills by it's filename + Attachments result = apiInstance.updateInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateInvoice: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateInvoiceAttachmentByFileName: " + e.Message ); } } } @@ -103077,7 +102933,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -103095,12 +102951,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateInvoice: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateInvoiceAttachmentByFileName: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -103111,19 +102967,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant my $invoiceID = 00000000-0000-0000-000-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 +my $fileName = xero-dev.jpg; # String | Name of the file you are attaching +my $body = ::Object::byte[]->new(); # byte[] | eval { - my $result = $api_instance->updateInvoice(xeroTenantId => $xeroTenantId, invoiceID => $invoiceID, invoices => $invoices, unitdp => $unitdp); + my $result = $api_instance->updateInvoiceAttachmentByFileName(xeroTenantId => $xeroTenantId, invoiceID => $invoiceID, fileName => $fileName, body => $body); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateInvoice: $@\n"; + warn "Exception when calling AccountingApi->updateInvoiceAttachmentByFileName: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -103137,28 +102993,28 @@ 

    Usage and SDK Samples

    api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) invoiceID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for an Invoice (default to null) -invoices = { invoices: [{ reference: "I am Iron Man", invoiceID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, type: Invoice.TypeEnum.ACCPAY }]} # Invoices | -unitdp = 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) +fileName = xero-dev.jpg # String | Name of the file you are attaching (default to null) +body = BYTE_ARRAY_DATA_HERE # byte[] | try: - # Allows you to update a specified sales invoices or purchase bills - api_response = api_instance.update_invoice(xeroTenantId, invoiceID, invoices, unitdp=unitdp) + # Allows you to update Attachment on invoices or purchase bills by it's filename + api_response = api_instance.update_invoice_attachment_by_file_name(xeroTenantId, invoiceID, fileName, body) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateInvoice: %s\n" % e)
    + print("Exception when calling AccountingApi->updateInvoiceAttachmentByFileName: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
         let invoiceID = 00000000-0000-0000-000-000000000000; // UUID
    -    let invoices = { invoices: [{ reference: "I am Iron Man", invoiceID: "00000000-0000-0000-000-000000000000", lineItems: [], contact: {}, type: Invoice.TypeEnum.ACCPAY }]}; // Invoices
    -    let unitdp = 4; // Integer
    +    let fileName = xero-dev.jpg; // String
    +    let body = BYTE_ARRAY_DATA_HERE; // byte[]
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateInvoice(xeroTenantId, invoiceID, invoices, unitdp, &context).wait();
    +    let result = client.updateInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -103170,8 +103026,8 @@ 

    Scopes

    - - + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoicesaccounting.attachmentsGrant read-write access to attachments
    @@ -103188,7 +103044,7 @@

    Parameters

    -
    +
    @@ -103208,6 +103064,29 @@

    Parameters

    + + + FileName* + + + +
    +
    +
    + + String + + +
    +Name of the file you are attaching +
    +
    +
    + Required +
    +
    +
    + @@ -103222,7 +103101,7 @@

    Parameters

    -
    +
    @@ -103249,32 +103128,33 @@

    Parameters

    Name Description - invoices * + body *
    - Invoices + byte[]
    - +Byte array of file in body of request
    Required
    - + -
    +
    -
    Query parameters
    - - - - - - - - - -
    NameDescription
    unitdp - - -
    -
    -
    - - Integer - - -
    -e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts -
    -
    -
    -
    -
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Invoices/{InvoiceID}/Attachments/{FileName}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Items/{ItemID}?unitdp=4"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -103529,21 +103383,21 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID invoiceID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for an Invoice - String fileName = xero-dev.jpg; // String | Name of the file you are attaching - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + UUID itemID = 00000000-0000-0000-000-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 { - Attachments result = apiInstance.updateInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body); + Items result = apiInstance.updateItem(xeroTenantId, itemID, items, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateInvoiceAttachmentByFileName"); + System.err.println("Exception when calling AccountingApi#updateItem"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -103551,42 +103405,42 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for an Invoice - String fileName = xero-dev.jpg; // String | Name of the file you are attaching - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + UUID itemID = 00000000-0000-0000-000-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 { - Attachments result = apiInstance.updateInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body); + Items result = apiInstance.updateItem(xeroTenantId, itemID, items, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateInvoiceAttachmentByFileName"); + 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 *invoiceID = 00000000-0000-0000-000-000000000000; // Unique identifier for an Invoice (default to null)
    -String *fileName = xero-dev.jpg; // Name of the file you are attaching (default to null)
    -byte[] *body = BYTE_ARRAY_DATA_HERE; // 
    +UUID *itemID = 00000000-0000-0000-000-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];
     
    -// Allows you to update Attachment on invoices or purchase bills by it's filename
    -[apiInstance updateInvoiceAttachmentByFileNameWith:xeroTenantId
    -    invoiceID:invoiceID
    -    fileName:fileName
    -    body:body
    -              completionHandler: ^(Attachments output, NSError* error) {
    +// Allows you to update a specified item
    +[apiInstance updateItemWith:xeroTenantId
    +    itemID:itemID
    +    items:items
    +    unitdp:unitdp
    +              completionHandler: ^(Items output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -103597,7 +103451,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -103607,54 +103461,28 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const invoiceID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for an Invoice -const fileName = "xero-dev.jpg"; // {String} Name of the file you are attaching -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 -// You'll need to add the import below to read your file -// import * as fs from "fs"; -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const itemID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for an Item + + +const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts +const items: Items = { items: [{ code: "ItemCode123", description: "Description 123" }]} + try { - const response: any = await xero.accountingApi.updateInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.updateItem(xeroTenantId, itemID, items, unitdp); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -103663,7 +103491,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateInvoiceAttachmentByFileNameExample + public class updateItemExample { public void main() { @@ -103673,19 +103501,19 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var invoiceID = new UUID(); // UUID | Unique identifier for an Invoice (default to null) - var fileName = xero-dev.jpg; // String | Name of the file you are attaching (default to null) - var body = BYTE_ARRAY_DATA_HERE; // byte[] | + var itemID = new UUID(); // UUID | Unique identifier for an Item (default to null) + var items = new Items(); // Items | + var unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try { - // Allows you to update Attachment on invoices or purchase bills by it's filename - Attachments result = apiInstance.updateInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body); + // Allows you to update a specified item + Items result = apiInstance.updateItem(xeroTenantId, itemID, items, unitdp); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateInvoiceAttachmentByFileName: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateItem: " + e.Message ); } } } @@ -103693,7 +103521,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -103711,12 +103539,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateInvoiceAttachmentByFileName: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateItem: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -103726,20 +103554,20 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $invoiceID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for an Invoice -my $fileName = xero-dev.jpg; # String | Name of the file you are attaching -my $body = ::Object::byte[]->new(); # byte[] | +my $itemID = 00000000-0000-0000-000-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->updateInvoiceAttachmentByFileName(xeroTenantId => $xeroTenantId, invoiceID => $invoiceID, fileName => $fileName, body => $body); + my $result = $api_instance->updateItem(xeroTenantId => $xeroTenantId, itemID => $itemID, items => $items, unitdp => $unitdp); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateInvoiceAttachmentByFileName: $@\n"; + warn "Exception when calling AccountingApi->updateItem: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -103752,29 +103580,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -invoiceID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for an Invoice (default to null) -fileName = xero-dev.jpg # String | Name of the file you are attaching (default to null) -body = BYTE_ARRAY_DATA_HERE # byte[] | +itemID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for an Item (default to null) +items = { "Items": [ { "Code": "ItemCode123", "Description": "Description 123" } ] } # Items | +unitdp = 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try: - # Allows you to update Attachment on invoices or purchase bills by it's filename - api_response = api_instance.update_invoice_attachment_by_file_name(xeroTenantId, invoiceID, fileName, body) + # Allows you to update a specified item + api_response = api_instance.update_item(xeroTenantId, itemID, items, unitdp=unitdp) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateInvoiceAttachmentByFileName: %s\n" % e)
    + print("Exception when calling AccountingApi->updateItem: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let invoiceID = 00000000-0000-0000-000-000000000000; // UUID
    -    let fileName = xero-dev.jpg; // String
    -    let body = BYTE_ARRAY_DATA_HERE; // byte[]
    +    let itemID = 00000000-0000-0000-000-000000000000; // UUID
    +    let items = { "Items": [ { "Code": "ItemCode123", "Description": "Description 123" } ] }; // Items
    +    let unitdp = 4; // Integer
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateInvoiceAttachmentByFileName(xeroTenantId, invoiceID, fileName, body, &context).wait();
    +    let result = client.updateItem(xeroTenantId, itemID, items, unitdp, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -103786,8 +103614,8 @@ 

    Scopes

    - - + +
    accounting.attachmentsGrant read-write access to attachmentsaccounting.settingsGrant read-write access to organisation and account settings
    @@ -103800,11 +103628,11 @@

    Parameters

    Name Description - InvoiceID* + ItemID* -
    +
    @@ -103815,30 +103643,7 @@

    Parameters

    -Unique identifier for an Invoice -
    -
    -
    - Required -
    -
    -
    - - - - FileName* - - - -
    -
    -
    - - String - - -
    -Name of the file you are attaching +Unique identifier for an Item
    @@ -103861,7 +103666,7 @@

    Parameters

    -
    +
    @@ -103888,33 +103693,32 @@

    Parameters

    Name Description - body * + items *
    - byte[] + Items
    -Byte array of file in body of request +
    Required
    - + -
    +
    +
    Query parameters
    + + + + + + + + + +
    NameDescription
    unitdp + + +
    +
    +
    + + Integer + + +
    +e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts +
    +
    +
    +
    +
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Items/{ItemID}?unitdp=4"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/LinkedTransactions/{LinkedTransactionID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -104143,21 +103973,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID itemID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for an Item - Items items = { items:[ { code:"abc123", description:"Hello Xero" } ] }; // Items | - Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + UUID linkedTransactionID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a LinkedTransaction + LinkedTransactions linkedTransactions = { "LinkedTransactions": [ { "SourceTransactionID": "00000000-0000-0000-000-000000000000", "SourceLineItemID": "00000000-0000-0000-000-000000000000" } ] }; // LinkedTransactions | try { - Items result = apiInstance.updateItem(xeroTenantId, itemID, items, unitdp); + LinkedTransactions result = apiInstance.updateLinkedTransaction(xeroTenantId, linkedTransactionID, linkedTransactions); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateItem"); + System.err.println("Exception when calling AccountingApi#updateLinkedTransaction"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -104165,42 +103994,39 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for an Item - Items items = { items:[ { code:"abc123", description:"Hello Xero" } ] }; // Items | - Integer unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + UUID linkedTransactionID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a LinkedTransaction + LinkedTransactions linkedTransactions = { "LinkedTransactions": [ { "SourceTransactionID": "00000000-0000-0000-000-000000000000", "SourceLineItemID": "00000000-0000-0000-000-000000000000" } ] }; // LinkedTransactions | try { - Items result = apiInstance.updateItem(xeroTenantId, itemID, items, unitdp); + LinkedTransactions result = apiInstance.updateLinkedTransaction(xeroTenantId, linkedTransactionID, linkedTransactions); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateItem"); + 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 *itemID = 00000000-0000-0000-000-000000000000; // Unique identifier for an Item (default to null)
    -Items *items = { items:[ { code:"abc123", description:"Hello Xero" } ] }; // 
    -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)
    +UUID *linkedTransactionID = 00000000-0000-0000-000-000000000000; // Unique identifier for a LinkedTransaction (default to null)
    +LinkedTransactions *linkedTransactions = { "LinkedTransactions": [ { "SourceTransactionID": "00000000-0000-0000-000-000000000000", "SourceLineItemID": "00000000-0000-0000-000-000000000000" } ] }; // 
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to update a specified item
    -[apiInstance updateItemWith:xeroTenantId
    -    itemID:itemID
    -    items:items
    -    unitdp:unitdp
    -              completionHandler: ^(Items output, NSError* error) {
    +// Allows you to update a specified linked transactions (billable expenses)
    +[apiInstance updateLinkedTransactionWith:xeroTenantId
    +    linkedTransactionID:linkedTransactionID
    +    linkedTransactions:linkedTransactions
    +              completionHandler: ^(LinkedTransactions output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -104211,7 +104037,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -104221,44 +104047,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const itemID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for an Item -const items:Items = { items:[ { code:"abc123", description:"Hello Xero" } ] }; // {Items} -const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const linkedTransactionID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a LinkedTransaction +const linkedTransactions: LinkedTransactions = { linkedTransactions: [{ sourceLineItemID: "00000000-0000-0000-000-000000000000", contactID: "00000000-0000-0000-000-000000000000" }]} try { - const response: any = await xero.accountingApi.updateItem(xeroTenantId, itemID, items, unitdp); + const response = await xero.accountingApi.updateLinkedTransaction(xeroTenantId, linkedTransactionID, linkedTransactions); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -104267,7 +104074,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateItemExample + public class updateLinkedTransactionExample { public void main() { @@ -104277,19 +104084,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var itemID = new UUID(); // UUID | Unique identifier for an Item (default to null) - var items = new Items(); // Items | - var unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) + var linkedTransactionID = new UUID(); // UUID | Unique identifier for a LinkedTransaction (default to null) + var linkedTransactions = new LinkedTransactions(); // LinkedTransactions | try { - // Allows you to update a specified item - Items result = apiInstance.updateItem(xeroTenantId, itemID, items, unitdp); + // Allows you to update a specified linked transactions (billable expenses) + LinkedTransactions result = apiInstance.updateLinkedTransaction(xeroTenantId, linkedTransactionID, linkedTransactions); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateItem: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateLinkedTransaction: " + e.Message ); } } } @@ -104297,7 +104103,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -104315,12 +104121,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateItem: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateLinkedTransaction: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -104330,20 +104136,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $itemID = 00000000-0000-0000-000-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 +my $linkedTransactionID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a LinkedTransaction +my $linkedTransactions = ::Object::LinkedTransactions->new(); # LinkedTransactions | eval { - my $result = $api_instance->updateItem(xeroTenantId => $xeroTenantId, itemID => $itemID, items => $items, unitdp => $unitdp); + my $result = $api_instance->updateLinkedTransaction(xeroTenantId => $xeroTenantId, linkedTransactionID => $linkedTransactionID, linkedTransactions => $linkedTransactions); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateItem: $@\n"; + warn "Exception when calling AccountingApi->updateLinkedTransaction: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -104356,29 +104161,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -itemID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for an Item (default to null) -items = { items:[ { code:"abc123", description:"Hello Xero" } ] } # Items | -unitdp = 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) +linkedTransactionID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a LinkedTransaction (default to null) +linkedTransactions = { "LinkedTransactions": [ { "SourceTransactionID": "00000000-0000-0000-000-000000000000", "SourceLineItemID": "00000000-0000-0000-000-000000000000" } ] } # LinkedTransactions | try: - # Allows you to update a specified item - api_response = api_instance.update_item(xeroTenantId, itemID, items, unitdp=unitdp) + # Allows you to update a specified linked transactions (billable expenses) + api_response = api_instance.update_linked_transaction(xeroTenantId, linkedTransactionID, linkedTransactions) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateItem: %s\n" % e)
    + print("Exception when calling AccountingApi->updateLinkedTransaction: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let itemID = 00000000-0000-0000-000-000000000000; // UUID
    -    let items = { items:[ { code:"abc123", description:"Hello Xero" } ] }; // Items
    -    let unitdp = 4; // Integer
    +    let linkedTransactionID = 00000000-0000-0000-000-000000000000; // UUID
    +    let linkedTransactions = { "LinkedTransactions": [ { "SourceTransactionID": "00000000-0000-0000-000-000000000000", "SourceLineItemID": "00000000-0000-0000-000-000000000000" } ] }; // LinkedTransactions
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateItem(xeroTenantId, itemID, items, unitdp, &context).wait();
    +    let result = client.updateLinkedTransaction(xeroTenantId, linkedTransactionID, linkedTransactions, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -104390,8 +104193,8 @@ 

    Scopes

    - - + +
    accounting.settingsGrant read-write access to organisation and account settingsaccounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    @@ -104404,11 +104207,11 @@

    Parameters

    Name Description - ItemID* + LinkedTransactionID* -
    +
    @@ -104419,7 +104222,7 @@

    Parameters

    -Unique identifier for an Item +Unique identifier for a LinkedTransaction
    @@ -104442,7 +104245,7 @@

    Parameters

    -
    +
    @@ -104469,12 +104272,12 @@

    Parameters

    Name Description - items * + linkedTransactions *
    - Items + LinkedTransactions
    @@ -104492,9 +104295,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/Items" + "$ref" : "#/components/schemas/LinkedTransactions" }, - "example" : "{ items:[ { code:\"abc123\", description:\"Hello Xero\" } ] }" + "example" : "{ \"LinkedTransactions\": [ { \"SourceTransactionID\": \"00000000-0000-0000-000-000000000000\", \"SourceLineItemID\": \"00000000-0000-0000-000-000000000000\" } ] }" } }, "required" : true @@ -104510,68 +104313,41 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_updateItem_items'); + var result = $('#d2e199_updateLinkedTransaction_linkedTransactions'); result.empty(); result.append(view.render()); }); -
    +
    -
    Query parameters
    - - - - - - - - - -
    NameDescription
    unitdp - - -
    -
    -
    - - Integer - - -
    -e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts -
    -
    -
    -
    -
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/LinkedTransactions/{LinkedTransactionID}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/ManualJournals/{ManualJournalID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -104749,20 +104526,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID linkedTransactionID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a LinkedTransaction - LinkedTransactions linkedTransactions = { linkedTransactions: [{ sourceLineItemID: "00000000-0000-0000-000-000000000000", contactID: "00000000-0000-0000-000-000000000000" }]}; // LinkedTransactions | + UUID manualJournalID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a ManualJournal + ManualJournals manualJournals = { "ManualJournals": [ { "Narration": "Hello Xero", "ManualJournalID": "00000000-0000-0000-000-000000000000", "JournalLines": [] } ] }; // ManualJournals | try { - LinkedTransactions result = apiInstance.updateLinkedTransaction(xeroTenantId, linkedTransactionID, linkedTransactions); + ManualJournals result = apiInstance.updateManualJournal(xeroTenantId, manualJournalID, manualJournals); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateLinkedTransaction"); + System.err.println("Exception when calling AccountingApi#updateManualJournal"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -104770,39 +104547,39 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for a LinkedTransaction - LinkedTransactions linkedTransactions = { linkedTransactions: [{ sourceLineItemID: "00000000-0000-0000-000-000000000000", contactID: "00000000-0000-0000-000-000000000000" }]}; // LinkedTransactions | + UUID manualJournalID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a ManualJournal + ManualJournals manualJournals = { "ManualJournals": [ { "Narration": "Hello Xero", "ManualJournalID": "00000000-0000-0000-000-000000000000", "JournalLines": [] } ] }; // ManualJournals | try { - LinkedTransactions result = apiInstance.updateLinkedTransaction(xeroTenantId, linkedTransactionID, linkedTransactions); + ManualJournals result = apiInstance.updateManualJournal(xeroTenantId, manualJournalID, manualJournals); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateLinkedTransaction"); + 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 *linkedTransactionID = 00000000-0000-0000-000-000000000000; // Unique identifier for a LinkedTransaction (default to null)
    -LinkedTransactions *linkedTransactions = { linkedTransactions: [{ sourceLineItemID: "00000000-0000-0000-000-000000000000", contactID: "00000000-0000-0000-000-000000000000" }]}; // 
    +UUID *manualJournalID = 00000000-0000-0000-000-000000000000; // Unique identifier for a ManualJournal (default to null)
    +ManualJournals *manualJournals = { "ManualJournals": [ { "Narration": "Hello Xero", "ManualJournalID": "00000000-0000-0000-000-000000000000", "JournalLines": [] } ] }; // 
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to update a specified linked transactions (billable expenses)
    -[apiInstance updateLinkedTransactionWith:xeroTenantId
    -    linkedTransactionID:linkedTransactionID
    -    linkedTransactions:linkedTransactions
    -              completionHandler: ^(LinkedTransactions output, NSError* error) {
    +// Allows you to update a specified manual journal
    +[apiInstance updateManualJournalWith:xeroTenantId
    +    manualJournalID:manualJournalID
    +    manualJournals:manualJournals
    +              completionHandler: ^(ManualJournals output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -104813,7 +104590,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -104823,42 +104600,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const linkedTransactionID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a LinkedTransaction -const linkedTransactions:LinkedTransactions = { linkedTransactions: [{ sourceLineItemID: "00000000-0000-0000-000-000000000000", contactID: "00000000-0000-0000-000-000000000000" }]}; // {LinkedTransactions} + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const manualJournalID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a ManualJournal +const manualJournals: ManualJournals = { manualJournals: [{ narration: "Hello Xero", manualJournalId: "00000000-0000-0000-000-000000000000", journalLines: [] }]} + try { - const response: any = await xero.accountingApi.updateLinkedTransaction(xeroTenantId, linkedTransactionID, linkedTransactions); + const response = await xero.accountingApi.updateManualJournal(xeroTenantId, manualJournalID, manualJournals); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -104867,7 +104627,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateLinkedTransactionExample + public class updateManualJournalExample { public void main() { @@ -104877,18 +104637,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var linkedTransactionID = new UUID(); // UUID | Unique identifier for a LinkedTransaction (default to null) - var linkedTransactions = new LinkedTransactions(); // LinkedTransactions | + var manualJournalID = new UUID(); // UUID | Unique identifier for a ManualJournal (default to null) + var manualJournals = new ManualJournals(); // ManualJournals | try { - // Allows you to update a specified linked transactions (billable expenses) - LinkedTransactions result = apiInstance.updateLinkedTransaction(xeroTenantId, linkedTransactionID, linkedTransactions); + // Allows you to update a specified manual journal + ManualJournals result = apiInstance.updateManualJournal(xeroTenantId, manualJournalID, manualJournals); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateLinkedTransaction: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateManualJournal: " + e.Message ); } } } @@ -104896,7 +104656,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -104914,12 +104674,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateLinkedTransaction: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateManualJournal: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -104929,19 +104689,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $linkedTransactionID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a LinkedTransaction -my $linkedTransactions = ::Object::LinkedTransactions->new(); # LinkedTransactions | +my $manualJournalID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a ManualJournal +my $manualJournals = ::Object::ManualJournals->new(); # ManualJournals | eval { - my $result = $api_instance->updateLinkedTransaction(xeroTenantId => $xeroTenantId, linkedTransactionID => $linkedTransactionID, linkedTransactions => $linkedTransactions); + my $result = $api_instance->updateManualJournal(xeroTenantId => $xeroTenantId, manualJournalID => $manualJournalID, manualJournals => $manualJournals); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateLinkedTransaction: $@\n"; + warn "Exception when calling AccountingApi->updateManualJournal: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -104954,27 +104714,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -linkedTransactionID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a LinkedTransaction (default to null) -linkedTransactions = { linkedTransactions: [{ sourceLineItemID: "00000000-0000-0000-000-000000000000", contactID: "00000000-0000-0000-000-000000000000" }]} # LinkedTransactions | +manualJournalID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a ManualJournal (default to null) +manualJournals = { "ManualJournals": [ { "Narration": "Hello Xero", "ManualJournalID": "00000000-0000-0000-000-000000000000", "JournalLines": [] } ] } # ManualJournals | try: - # Allows you to update a specified linked transactions (billable expenses) - api_response = api_instance.update_linked_transaction(xeroTenantId, linkedTransactionID, linkedTransactions) + # Allows you to update a specified manual journal + api_response = api_instance.update_manual_journal(xeroTenantId, manualJournalID, manualJournals) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateLinkedTransaction: %s\n" % e)
    + print("Exception when calling AccountingApi->updateManualJournal: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let linkedTransactionID = 00000000-0000-0000-000-000000000000; // UUID
    -    let linkedTransactions = { linkedTransactions: [{ sourceLineItemID: "00000000-0000-0000-000-000000000000", contactID: "00000000-0000-0000-000-000000000000" }]}; // LinkedTransactions
    +    let manualJournalID = 00000000-0000-0000-000-000000000000; // UUID
    +    let manualJournals = { "ManualJournals": [ { "Narration": "Hello Xero", "ManualJournalID": "00000000-0000-0000-000-000000000000", "JournalLines": [] } ] }; // ManualJournals
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateLinkedTransaction(xeroTenantId, linkedTransactionID, linkedTransactions, &context).wait();
    +    let result = client.updateManualJournal(xeroTenantId, manualJournalID, manualJournals, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -105000,11 +104760,11 @@ 

    Parameters

    Name Description - LinkedTransactionID* + ManualJournalID* -
    +
    @@ -105015,7 +104775,7 @@

    Parameters

    -Unique identifier for a LinkedTransaction +Unique identifier for a ManualJournal
    @@ -105038,7 +104798,7 @@

    Parameters

    -
    +
    @@ -105065,12 +104825,12 @@

    Parameters

    Name Description - linkedTransactions * + manualJournals *
    - LinkedTransactions + ManualJournals
    @@ -105088,9 +104848,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/LinkedTransactions" + "$ref" : "#/components/schemas/ManualJournals" }, - "example" : "{ linkedTransactions: [{ sourceLineItemID: \"00000000-0000-0000-000-000000000000\", contactID: \"00000000-0000-0000-000-000000000000\" }]}" + "example" : "{ \"ManualJournals\": [ { \"Narration\": \"Hello Xero\", \"ManualJournalID\": \"00000000-0000-0000-000-000000000000\", \"JournalLines\": [] } ] }" } }, "required" : true @@ -105106,12 +104866,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_updateLinkedTransaction_linkedTransactions'); + var result = $('#d2e199_updateManualJournal_manualJournals'); result.empty(); result.append(view.render()); }); -
    +
    @@ -105120,27 +104880,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/ManualJournals/{ManualJournalID}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/ManualJournals/{ManualJournalID}/Attachments/{FileName}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -105320,19 +105079,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID manualJournalID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a ManualJournal - ManualJournals manualJournals = { manualJournals: [{ narration: "Hello Xero", manualJournalID: "00000000-0000-0000-000-000000000000", journalLines: [] }]}; // ManualJournals | + String fileName = xero-dev.jpg; // String | The name of the file being attached to a ManualJournal + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - ManualJournals result = apiInstance.updateManualJournal(xeroTenantId, manualJournalID, manualJournals); + Attachments result = apiInstance.updateManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateManualJournal"); + System.err.println("Exception when calling AccountingApi#updateManualJournalAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -105341,22 +105101,23 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant UUID manualJournalID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a ManualJournal - ManualJournals manualJournals = { manualJournals: [{ narration: "Hello Xero", manualJournalID: "00000000-0000-0000-000-000000000000", journalLines: [] }]}; // ManualJournals | + String fileName = xero-dev.jpg; // String | The name of the file being attached to a ManualJournal + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - ManualJournals result = apiInstance.updateManualJournal(xeroTenantId, manualJournalID, manualJournals); + Attachments result = apiInstance.updateManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateManualJournal"); + System.err.println("Exception when calling AccountingApi#updateManualJournalAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -105364,15 +105125,17 @@ 

    Usage and SDK Samples

    String *xeroTenantId = YOUR_XERO_TENANT_ID; // Xero identifier for Tenant (default to null) UUID *manualJournalID = 00000000-0000-0000-000-000000000000; // Unique identifier for a ManualJournal (default to null) -ManualJournals *manualJournals = { manualJournals: [{ narration: "Hello Xero", manualJournalID: "00000000-0000-0000-000-000000000000", journalLines: [] }]}; // +String *fileName = xero-dev.jpg; // The name of the file being attached to a ManualJournal (default to null) +byte[] *body = BYTE_ARRAY_DATA_HERE; // AccountingApi *apiInstance = [[AccountingApi alloc] init]; -// Allows you to update a specified manual journal -[apiInstance updateManualJournalWith:xeroTenantId +// Allows you to update a specified Attachment on ManualJournal by file name +[apiInstance updateManualJournalAttachmentByFileNameWith:xeroTenantId manualJournalID:manualJournalID - manualJournals:manualJournals - completionHandler: ^(ManualJournals output, NSError* error) { + fileName:fileName + body:body + completionHandler: ^(Attachments output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -105383,7 +105146,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -105393,42 +105156,35 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const manualJournalID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a ManualJournal -const manualJournals:ManualJournals = { manualJournals: [{ narration: "Hello Xero", manualJournalID: "00000000-0000-0000-000-000000000000", journalLines: [] }]}; // {ManualJournals} + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const manualJournalID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a ManualJournal +const fileName = "xero-dev.jpg"; // {String} The name of the file being attached to a ManualJournal +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 +import * as fs from "fs"; +const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file +const contentType = mime.lookup(fileName); + try { - const response: any = await xero.accountingApi.updateManualJournal(xeroTenantId, manualJournalID, manualJournals); + const response = await xero.accountingApi.updateManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body, { + headers: { + "Content-Type": contentType, + } + }); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); -} - -
    + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); +} +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -105437,7 +105193,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateManualJournalExample + public class updateManualJournalAttachmentByFileNameExample { public void main() { @@ -105448,17 +105204,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) var manualJournalID = new UUID(); // UUID | Unique identifier for a ManualJournal (default to null) - var manualJournals = new ManualJournals(); // ManualJournals | + var fileName = xero-dev.jpg; // String | The name of the file being attached to a ManualJournal (default to null) + var body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - // Allows you to update a specified manual journal - ManualJournals result = apiInstance.updateManualJournal(xeroTenantId, manualJournalID, manualJournals); + // Allows you to update a specified Attachment on ManualJournal by file name + Attachments result = apiInstance.updateManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateManualJournal: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateManualJournalAttachmentByFileName: " + e.Message ); } } } @@ -105466,7 +105223,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -105484,12 +105241,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateManualJournal: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateManualJournalAttachmentByFileName: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -105500,18 +105257,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant my $manualJournalID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a ManualJournal -my $manualJournals = ::Object::ManualJournals->new(); # ManualJournals | +my $fileName = xero-dev.jpg; # String | The name of the file being attached to a ManualJournal +my $body = ::Object::byte[]->new(); # byte[] | eval { - my $result = $api_instance->updateManualJournal(xeroTenantId => $xeroTenantId, manualJournalID => $manualJournalID, manualJournals => $manualJournals); + my $result = $api_instance->updateManualJournalAttachmentByFileName(xeroTenantId => $xeroTenantId, manualJournalID => $manualJournalID, fileName => $fileName, body => $body); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateManualJournal: $@\n"; + warn "Exception when calling AccountingApi->updateManualJournalAttachmentByFileName: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -105525,26 +105283,28 @@ 

    Usage and SDK Samples

    api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) manualJournalID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a ManualJournal (default to null) -manualJournals = { manualJournals: [{ narration: "Hello Xero", manualJournalID: "00000000-0000-0000-000-000000000000", journalLines: [] }]} # ManualJournals | +fileName = xero-dev.jpg # String | The name of the file being attached to a ManualJournal (default to null) +body = BYTE_ARRAY_DATA_HERE # byte[] | try: - # Allows you to update a specified manual journal - api_response = api_instance.update_manual_journal(xeroTenantId, manualJournalID, manualJournals) + # Allows you to update a specified Attachment on ManualJournal by file name + api_response = api_instance.update_manual_journal_attachment_by_file_name(xeroTenantId, manualJournalID, fileName, body) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateManualJournal: %s\n" % e)
    + print("Exception when calling AccountingApi->updateManualJournalAttachmentByFileName: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
         let manualJournalID = 00000000-0000-0000-000-000000000000; // UUID
    -    let manualJournals = { manualJournals: [{ narration: "Hello Xero", manualJournalID: "00000000-0000-0000-000-000000000000", journalLines: [] }]}; // ManualJournals
    +    let fileName = xero-dev.jpg; // String
    +    let body = BYTE_ARRAY_DATA_HERE; // byte[]
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateManualJournal(xeroTenantId, manualJournalID, manualJournals, &context).wait();
    +    let result = client.updateManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -105556,8 +105316,8 @@ 

    Scopes

    - - + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoicesaccounting.attachmentsGrant read-write access to attachments
    @@ -105574,7 +105334,7 @@

    Parameters

    -
    +
    @@ -105594,6 +105354,29 @@

    Parameters

    + + + FileName* + + + +
    +
    +
    + + String + + +
    +The name of the file being attached to a ManualJournal +
    +
    +
    + Required +
    +
    +
    + @@ -105608,7 +105391,7 @@

    Parameters

    -
    +
    @@ -105635,32 +105418,33 @@

    Parameters

    Name Description - manualJournals * + body *
    - ManualJournals + byte[]
    - +Byte array of file in body of request
    Required
    - + -
    +
    @@ -105690,27 +105474,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/ManualJournals/{ManualJournalID}/Attachments/{FileName}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/BankTransactions?summarizeErrors=true&unitdp=4"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -105888,21 +105673,21 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID manualJournalID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a ManualJournal - String fileName = xero-dev.jpg; // String | The name of the file being attached to a ManualJournal - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + BankTransactions bankTransactions = { "BankTransactions": [ { "Type": "SPEND", "Contact": { "ContactID": "00000000-0000-0000-000-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 { - Attachments result = apiInstance.updateManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body); + BankTransactions result = apiInstance.updateOrCreateBankTransactions(xeroTenantId, bankTransactions, summarizeErrors, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateManualJournalAttachmentByFileName"); + System.err.println("Exception when calling AccountingApi#updateOrCreateBankTransactions"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -105910,42 +105695,42 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for a ManualJournal - String fileName = xero-dev.jpg; // String | The name of the file being attached to a ManualJournal - byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | + BankTransactions bankTransactions = { "BankTransactions": [ { "Type": "SPEND", "Contact": { "ContactID": "00000000-0000-0000-000-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 { - Attachments result = apiInstance.updateManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body); + BankTransactions result = apiInstance.updateOrCreateBankTransactions(xeroTenantId, bankTransactions, summarizeErrors, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateManualJournalAttachmentByFileName"); + 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)
    -UUID *manualJournalID = 00000000-0000-0000-000-000000000000; // Unique identifier for a ManualJournal (default to null)
    -String *fileName = xero-dev.jpg; // The name of the file being attached to a ManualJournal (default to null)
    -byte[] *body = BYTE_ARRAY_DATA_HERE; // 
    +BankTransactions *bankTransactions = { "BankTransactions": [ { "Type": "SPEND", "Contact": { "ContactID": "00000000-0000-0000-000-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];
     
    -// Allows you to update a specified Attachment on ManualJournal by file name
    -[apiInstance updateManualJournalAttachmentByFileNameWith:xeroTenantId
    -    manualJournalID:manualJournalID
    -    fileName:fileName
    -    body:body
    -              completionHandler: ^(Attachments output, NSError* error) {
    +// Allows you to update or create one or more spend or receive money transaction
    +[apiInstance updateOrCreateBankTransactionsWith:xeroTenantId
    +    bankTransactions:bankTransactions
    +    summarizeErrors:summarizeErrors
    +    unitdp:unitdp
    +              completionHandler: ^(BankTransactions output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -105956,7 +105741,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -105966,54 +105751,29 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const manualJournalID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a ManualJournal -const fileName = "xero-dev.jpg"; // {String} The name of the file being attached to a ManualJournal -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 -// You'll need to add the import below to read your file -// import * as fs from "fs"; -const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file -const contentType = mime.lookup(fileName); +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + + +const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created objects and any with validation errors + +const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts +const bankTransactions: BankTransactions = { bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, contact: { contactId: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "000" }], bankAccount: { code: "000" }}]} + try { - const response: any = await xero.accountingApi.updateManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body, { - headers: { - "Content-Type": contentType, - } - }); + const response = await xero.accountingApi.updateOrCreateBankTransactions(xeroTenantId, bankTransactions, summarizeErrors, unitdp); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -106022,7 +105782,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateManualJournalAttachmentByFileNameExample + public class updateOrCreateBankTransactionsExample { public void main() { @@ -106032,19 +105792,19 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var manualJournalID = new UUID(); // UUID | Unique identifier for a ManualJournal (default to null) - var fileName = xero-dev.jpg; // String | The name of the file being attached to a ManualJournal (default to null) - var body = BYTE_ARRAY_DATA_HERE; // byte[] | + var bankTransactions = new BankTransactions(); // BankTransactions | + var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) + var unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try { - // Allows you to update a specified Attachment on ManualJournal by file name - Attachments result = apiInstance.updateManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body); + // Allows you to update or create one or more spend or receive money transaction + BankTransactions result = apiInstance.updateOrCreateBankTransactions(xeroTenantId, bankTransactions, summarizeErrors, unitdp); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateManualJournalAttachmentByFileName: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateOrCreateBankTransactions: " + e.Message ); } } } @@ -106052,7 +105812,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -106070,12 +105830,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateManualJournalAttachmentByFileName: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateOrCreateBankTransactions: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -106085,20 +105845,20 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $manualJournalID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a ManualJournal -my $fileName = xero-dev.jpg; # String | The name of the file being attached to a ManualJournal -my $body = ::Object::byte[]->new(); # byte[] | +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->updateManualJournalAttachmentByFileName(xeroTenantId => $xeroTenantId, manualJournalID => $manualJournalID, fileName => $fileName, body => $body); + my $result = $api_instance->updateOrCreateBankTransactions(xeroTenantId => $xeroTenantId, bankTransactions => $bankTransactions, summarizeErrors => $summarizeErrors, unitdp => $unitdp); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateManualJournalAttachmentByFileName: $@\n"; + warn "Exception when calling AccountingApi->updateOrCreateBankTransactions: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -106111,29 +105871,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -manualJournalID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a ManualJournal (default to null) -fileName = xero-dev.jpg # String | The name of the file being attached to a ManualJournal (default to null) -body = BYTE_ARRAY_DATA_HERE # byte[] | +bankTransactions = { "BankTransactions": [ { "Type": "SPEND", "Contact": { "ContactID": "00000000-0000-0000-000-000000000000" }, "Lineitems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "400" } ], "BankAccount": { "Code": "088" } } ] } # BankTransactions | +summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) +unitdp = 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try: - # Allows you to update a specified Attachment on ManualJournal by file name - api_response = api_instance.update_manual_journal_attachment_by_file_name(xeroTenantId, manualJournalID, fileName, body) + # Allows you to update or create one or more spend or receive money transaction + api_response = api_instance.update_or_create_bank_transactions(xeroTenantId, bankTransactions, summarizeErrors=summarizeErrors, unitdp=unitdp) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateManualJournalAttachmentByFileName: %s\n" % e)
    + print("Exception when calling AccountingApi->updateOrCreateBankTransactions: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let manualJournalID = 00000000-0000-0000-000-000000000000; // UUID
    -    let fileName = xero-dev.jpg; // String
    -    let body = BYTE_ARRAY_DATA_HERE; // byte[]
    +    let bankTransactions = { "BankTransactions": [ { "Type": "SPEND", "Contact": { "ContactID": "00000000-0000-0000-000-000000000000" }, "Lineitems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "400" } ], "BankAccount": { "Code": "088" } } ] }; // BankTransactions
    +    let summarizeErrors = true; // Boolean
    +    let unitdp = 4; // Integer
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateManualJournalAttachmentByFileName(xeroTenantId, manualJournalID, fileName, body, &context).wait();
    +    let result = client.updateOrCreateBankTransactions(xeroTenantId, bankTransactions, summarizeErrors, unitdp, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -106145,70 +105905,14 @@ 

    Scopes

    - - + +
    accounting.attachmentsGrant read-write access to attachmentsaccounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices

    Parameters

    -
    Path parameters
    - - - - - - - - - - - - - -
    NameDescription
    ManualJournalID* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Unique identifier for a ManualJournal -
    -
    -
    - Required -
    -
    -
    -
    FileName* - - -
    -
    -
    - - String - - -
    -The name of the file being attached to a ManualJournal -
    -
    -
    - Required -
    -
    -
    -
    Header parameters
    @@ -106220,7 +105924,7 @@

    Parameters

    - +
    -
    +
    @@ -106247,33 +105951,32 @@

    Parameters

    Name Description
    body *
    bankTransactions *
    - byte[] + BankTransactions
    -Byte array of file in body of request +
    Required
    - + -
    +
    +
    Query parameters
    + + + + + + + + + + + + + +
    NameDescription
    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 +
    +
    +
    +
    +
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/BankTransactions?summarizeErrors=true&unitdp=4"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Contacts?summarizeErrors=true"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -106502,21 +106251,20 @@ 

    Usage and SDK Samples

    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-000-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 obejcts 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 + 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 { - BankTransactions result = apiInstance.updateOrCreateBankTransactions(xeroTenantId, bankTransactions, summarizeErrors, unitdp); + Contacts result = apiInstance.updateOrCreateContacts(xeroTenantId, contacts, summarizeErrors); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreateBankTransactions"); + System.err.println("Exception when calling AccountingApi#updateOrCreateContacts"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -106524,42 +106272,39 @@ 

    Usage and SDK Samples

    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-000-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 obejcts 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 + 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 { - BankTransactions result = apiInstance.updateOrCreateBankTransactions(xeroTenantId, bankTransactions, summarizeErrors, unitdp); + Contacts result = apiInstance.updateOrCreateContacts(xeroTenantId, contacts, summarizeErrors); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreateBankTransactions"); + 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)
    -BankTransactions *bankTransactions = { bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, contact: { contactID: "00000000-0000-0000-000-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 obejcts 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)
    +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];
     
    -// Allows you to update or create one or more spend or receive money transaction
    -[apiInstance updateOrCreateBankTransactionsWith:xeroTenantId
    -    bankTransactions:bankTransactions
    +// Allows you to update OR create one or more contacts in a Xero organisation
    +[apiInstance updateOrCreateContactsWith:xeroTenantId
    +    contacts:contacts
         summarizeErrors:summarizeErrors
    -    unitdp:unitdp
    -              completionHandler: ^(BankTransactions output, NSError* error) {
    +              completionHandler: ^(Contacts output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -106570,7 +106315,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -106580,44 +106325,27 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const bankTransactions:BankTransactions = { bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "000" } ], bankAccount: { code: "000" }}]}; // {BankTransactions} -const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created obejcts and any with validation errors -const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + + +const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created objects and any with validation errors +const contacts: Contacts = { contacts: [{ name: "Bruce Banner", emailAddress: "hulk@avengers.com", phones: [{ phoneType: Phone.PhoneTypeEnum.MOBILE, phoneNumber: "555-1212", phoneAreaCode: "415" }], paymentTerms: { bills: { day: 15, type: PaymentTermType.OFCURRENTMONTH }, sales: { day: 10, type: PaymentTermType.DAYSAFTERBILLMONTH }}}]} try { - const response: any = await xero.accountingApi.updateOrCreateBankTransactions(xeroTenantId, bankTransactions, summarizeErrors, unitdp); + const response = await xero.accountingApi.updateOrCreateContacts(xeroTenantId, contacts, summarizeErrors); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -106626,7 +106354,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateOrCreateBankTransactionsExample + public class updateOrCreateContactsExample { public void main() { @@ -106636,19 +106364,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var bankTransactions = new BankTransactions(); // BankTransactions | - var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) - var unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) + var contacts = new Contacts(); // Contacts | + var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) try { - // Allows you to update or create one or more spend or receive money transaction - BankTransactions result = apiInstance.updateOrCreateBankTransactions(xeroTenantId, bankTransactions, summarizeErrors, unitdp); + // Allows you to update OR create one or more contacts in a Xero organisation + Contacts result = apiInstance.updateOrCreateContacts(xeroTenantId, contacts, summarizeErrors); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateOrCreateBankTransactions: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateOrCreateContacts: " + e.Message ); } } } @@ -106656,7 +106383,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -106674,12 +106401,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateOrCreateBankTransactions: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateOrCreateContacts: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -106689,20 +106416,19 @@ 

    Usage and SDK Samples

    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 obejcts 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 +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->updateOrCreateBankTransactions(xeroTenantId => $xeroTenantId, bankTransactions => $bankTransactions, summarizeErrors => $summarizeErrors, unitdp => $unitdp); + my $result = $api_instance->updateOrCreateContacts(xeroTenantId => $xeroTenantId, contacts => $contacts, summarizeErrors => $summarizeErrors); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateOrCreateBankTransactions: $@\n"; + warn "Exception when calling AccountingApi->updateOrCreateContacts: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -106715,29 +106441,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -bankTransactions = { bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "000" } ], bankAccount: { code: "000" }}]} # BankTransactions | -summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) -unitdp = 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) +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 | +summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) try: - # Allows you to update or create one or more spend or receive money transaction - api_response = api_instance.update_or_create_bank_transactions(xeroTenantId, bankTransactions, summarizeErrors=summarizeErrors, unitdp=unitdp) + # Allows you to update OR create one or more contacts in a Xero organisation + api_response = api_instance.update_or_create_contacts(xeroTenantId, contacts, summarizeErrors=summarizeErrors) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateOrCreateBankTransactions: %s\n" % e)
    + print("Exception when calling AccountingApi->updateOrCreateContacts: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let bankTransactions = { bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "000" } ], bankAccount: { code: "000" }}]}; // BankTransactions
    +    let 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
         let summarizeErrors = true; // Boolean
    -    let unitdp = 4; // Integer
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateOrCreateBankTransactions(xeroTenantId, bankTransactions, summarizeErrors, unitdp, &context).wait();
    +    let result = client.updateOrCreateContacts(xeroTenantId, contacts, summarizeErrors, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -106749,8 +106473,8 @@ 

    Scopes

    - - + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoicesaccounting.contactsGrant read-write access to contacts and contact groups
    @@ -106768,7 +106492,7 @@

    Parameters

    -
    +
    @@ -106795,12 +106519,12 @@

    Parameters

    Name Description - bankTransactions * + contacts *
    - BankTransactions + Contacts
    @@ -106818,9 +106542,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/BankTransactions" + "$ref" : "#/components/schemas/Contacts" }, - "example" : "{ bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, contact: { contactID: \"00000000-0000-0000-000-000000000000\" }, lineItems: [{ description: \"Foobar\", quantity: 1.0, unitAmount: 20.0, accountCode: \"000\" } ], bankAccount: { code: \"000\" }}]}" + "example" : "{ \"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\" } } } ] }" } }, "required" : true @@ -106836,12 +106560,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_updateOrCreateBankTransactions_bankTransactions'); + var result = $('#d2e199_updateOrCreateContacts_contacts'); result.empty(); result.append(view.render()); }); -
    +
    @@ -106858,7 +106582,7 @@

    Parameters

    -
    +
    @@ -106866,27 +106590,7 @@

    Parameters

    -If false return 200 OK and mix of successfully created obejcts 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 +If false return 200 OK and mix of successfully created objects and any with validation errors
    @@ -106897,27 +106601,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Contacts?summarizeErrors=true"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/CreditNotes?summarizeErrors=true&unitdp=4"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -107095,20 +106800,21 @@ 

    Usage and SDK Samples

    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: Phone.PhoneTypeEnum.MOBILE, phoneNumber: "555-1212", phoneAreaCode: "415" }], paymentTerms: { bills: { day: 15, type: PaymentTermType.OFCURRENTMONTH }, sales: { day: 10, type: PaymentTermType.DAYSAFTERBILLMONTH }}}]}; // Contacts | - Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors + 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 { - Contacts result = apiInstance.updateOrCreateContacts(xeroTenantId, contacts, summarizeErrors); + CreditNotes result = apiInstance.updateOrCreateCreditNotes(xeroTenantId, creditNotes, summarizeErrors, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreateContacts"); + System.err.println("Exception when calling AccountingApi#updateOrCreateCreditNotes"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -107116,39 +106822,42 @@ 

    Usage and SDK Samples

    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: Phone.PhoneTypeEnum.MOBILE, phoneNumber: "555-1212", phoneAreaCode: "415" }], paymentTerms: { bills: { day: 15, type: PaymentTermType.OFCURRENTMONTH }, sales: { day: 10, type: PaymentTermType.DAYSAFTERBILLMONTH }}}]}; // Contacts | - Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors + 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 { - Contacts result = apiInstance.updateOrCreateContacts(xeroTenantId, contacts, summarizeErrors); + CreditNotes result = apiInstance.updateOrCreateCreditNotes(xeroTenantId, creditNotes, summarizeErrors, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreateContacts"); + 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)
    -Contacts *contacts = { contacts: [{ name: "Bruce Banner", emailAddress: "hulk@avengers.com", phones: [{ phoneType: Phone.PhoneTypeEnum.MOBILE, phoneNumber: "555-1212", phoneAreaCode: "415" }], paymentTerms: { bills: { day: 15, type: PaymentTermType.OFCURRENTMONTH }, sales: { day: 10, type: PaymentTermType.DAYSAFTERBILLMONTH }}}]}; // 
    -Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false)
    +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];
     
    -// Allows you to update OR create one or more contacts in a Xero organisation
    -[apiInstance updateOrCreateContactsWith:xeroTenantId
    -    contacts:contacts
    +// Allows you to update OR create one or more credit notes
    +[apiInstance updateOrCreateCreditNotesWith:xeroTenantId
    +    creditNotes:creditNotes
         summarizeErrors:summarizeErrors
    -              completionHandler: ^(Contacts output, NSError* error) {
    +    unitdp:unitdp
    +              completionHandler: ^(CreditNotes output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -107159,7 +106868,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -107169,43 +106878,29 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const contacts:Contacts = { contacts: [{ name: "Bruce Banner", emailAddress: "hulk@avengers.com", phones: [{ phoneType: Phone.PhoneTypeEnum.MOBILE, phoneNumber: "555-1212", phoneAreaCode: "415" }], paymentTerms: { bills: { day: 15, type: PaymentTermType.OFCURRENTMONTH }, sales: { day: 10, type: PaymentTermType.DAYSAFTERBILLMONTH }}}]}; // {Contacts} -const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created obejcts and any with validation errors + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + + +const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created objects and any with validation errors + +const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts +const creditNotes: CreditNotes = { creditNotes: [{ type: CreditNote.TypeEnum.ACCPAYCREDIT, contact: { contactID: "00000000-0000-0000-000-000000000000" }, date: "2019-01-05", lineItems: [{ description: "Foobar", quantity: 2.0, unitAmount: 20.0, accountCode: "400" }]}]} try { - const response: any = await xero.accountingApi.updateOrCreateContacts(xeroTenantId, contacts, summarizeErrors); + const response = await xero.accountingApi.updateOrCreateCreditNotes(xeroTenantId, creditNotes, summarizeErrors, unitdp); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -107214,7 +106909,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateOrCreateContactsExample + public class updateOrCreateCreditNotesExample { public void main() { @@ -107224,18 +106919,19 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var contacts = new Contacts(); // Contacts | - var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) + var creditNotes = new CreditNotes(); // CreditNotes | + var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) + var unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try { - // Allows you to update OR create one or more contacts in a Xero organisation - Contacts result = apiInstance.updateOrCreateContacts(xeroTenantId, contacts, summarizeErrors); + // Allows you to update OR create one or more credit notes + CreditNotes result = apiInstance.updateOrCreateCreditNotes(xeroTenantId, creditNotes, summarizeErrors, unitdp); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateOrCreateContacts: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateOrCreateCreditNotes: " + e.Message ); } } } @@ -107243,7 +106939,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -107261,12 +106957,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateOrCreateContacts: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateOrCreateCreditNotes: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -107276,19 +106972,20 @@ 

    Usage and SDK Samples

    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 obejcts and any with validation errors +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->updateOrCreateContacts(xeroTenantId => $xeroTenantId, contacts => $contacts, summarizeErrors => $summarizeErrors); + my $result = $api_instance->updateOrCreateCreditNotes(xeroTenantId => $xeroTenantId, creditNotes => $creditNotes, summarizeErrors => $summarizeErrors, unitdp => $unitdp); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateOrCreateContacts: $@\n"; + warn "Exception when calling AccountingApi->updateOrCreateCreditNotes: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -107301,27 +106998,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -contacts = { contacts: [{ name: "Bruce Banner", emailAddress: "hulk@avengers.com", phones: [{ phoneType: Phone.PhoneTypeEnum.MOBILE, phoneNumber: "555-1212", phoneAreaCode: "415" }], paymentTerms: { bills: { day: 15, type: PaymentTermType.OFCURRENTMONTH }, sales: { day: 10, type: PaymentTermType.DAYSAFTERBILLMONTH }}}]} # Contacts | -summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) +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 | +summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) +unitdp = 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try: - # Allows you to update OR create one or more contacts in a Xero organisation - api_response = api_instance.update_or_create_contacts(xeroTenantId, contacts, summarizeErrors=summarizeErrors) + # Allows you to update OR create one or more credit notes + api_response = api_instance.update_or_create_credit_notes(xeroTenantId, creditNotes, summarizeErrors=summarizeErrors, unitdp=unitdp) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateOrCreateContacts: %s\n" % e)
    + print("Exception when calling AccountingApi->updateOrCreateCreditNotes: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let contacts = { contacts: [{ name: "Bruce Banner", emailAddress: "hulk@avengers.com", phones: [{ phoneType: Phone.PhoneTypeEnum.MOBILE, phoneNumber: "555-1212", phoneAreaCode: "415" }], paymentTerms: { bills: { day: 15, type: PaymentTermType.OFCURRENTMONTH }, sales: { day: 10, type: PaymentTermType.DAYSAFTERBILLMONTH }}}]}; // Contacts
    +    let 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
         let summarizeErrors = true; // Boolean
    +    let unitdp = 4; // Integer
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateOrCreateContacts(xeroTenantId, contacts, summarizeErrors, &context).wait();
    +    let result = client.updateOrCreateCreditNotes(xeroTenantId, creditNotes, summarizeErrors, unitdp, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -107333,8 +107032,8 @@ 

    Scopes

    - - + +
    accounting.contactsGrant read-write access to contacts and contact groupsaccounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    @@ -107352,7 +107051,7 @@

    Parameters

    -
    +
    @@ -107379,32 +107078,33 @@

    Parameters

    Name Description - contacts * + creditNotes *
    - Contacts + CreditNotes
    - +an array of Credit Notes with a single CreditNote object.
    Required
    - + -
    +
    @@ -107442,7 +107142,7 @@

    Parameters

    -
    +
    @@ -107450,7 +107150,27 @@

    Parameters

    -If false return 200 OK and mix of successfully created obejcts and any with validation errors +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
    @@ -107461,27 +107181,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/CreditNotes?summarizeErrors=true&unitdp=4"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Employees?summarizeErrors=true"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -107660,21 +107379,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - CreditNotes creditNotes = { creditNotes: [{ type: CreditNote.TypeEnum.ACCPAYCREDIT, contact: { contactID: "00000000-0000-0000-000-000000000000" }, 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 obejcts 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 + 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 { - CreditNotes result = apiInstance.updateOrCreateCreditNotes(xeroTenantId, creditNotes, summarizeErrors, unitdp); + Employees result = apiInstance.updateOrCreateEmployees(xeroTenantId, employees, summarizeErrors); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreateCreditNotes"); + System.err.println("Exception when calling AccountingApi#updateOrCreateEmployees"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -107682,42 +107400,39 @@ 

    Usage and SDK Samples

    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: CreditNote.TypeEnum.ACCPAYCREDIT, contact: { contactID: "00000000-0000-0000-000-000000000000" }, 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 obejcts 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 + 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 { - CreditNotes result = apiInstance.updateOrCreateCreditNotes(xeroTenantId, creditNotes, summarizeErrors, unitdp); + Employees result = apiInstance.updateOrCreateEmployees(xeroTenantId, employees, summarizeErrors); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreateCreditNotes"); + 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)
    -CreditNotes *creditNotes = { creditNotes: [{ type: CreditNote.TypeEnum.ACCPAYCREDIT, contact: { contactID: "00000000-0000-0000-000-000000000000" }, 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 obejcts 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)
    +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];
     
    -// Allows you to update OR create one or more credit notes
    -[apiInstance updateOrCreateCreditNotesWith:xeroTenantId
    -    creditNotes:creditNotes
    +// Allows you to create a single new employees used in Xero payrun
    +[apiInstance updateOrCreateEmployeesWith:xeroTenantId
    +    employees:employees
         summarizeErrors:summarizeErrors
    -    unitdp:unitdp
    -              completionHandler: ^(CreditNotes output, NSError* error) {
    +              completionHandler: ^(Employees output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -107728,7 +107443,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -107738,44 +107453,27 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const creditNotes:CreditNotes = { creditNotes: [{ type: CreditNote.TypeEnum.ACCPAYCREDIT, contact: { contactID: "00000000-0000-0000-000-000000000000" }, date: "2019-01-05", lineItems: [{ description: "Foobar", quantity: 2.0, unitAmount: 20.0, accountCode: "400" }]}]}; // {CreditNotes} -const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created obejcts and any with validation errors -const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + + +const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created objects and any with validation errors +const employees: Employees = { employees: [{ firstName: "Nick", lastName: "Fury", externalLink: { url: "http://twitter.com/#!/search/Nick+Fury" }}]} try { - const response: any = await xero.accountingApi.updateOrCreateCreditNotes(xeroTenantId, creditNotes, summarizeErrors, unitdp); + const response = await xero.accountingApi.updateOrCreateEmployees(xeroTenantId, employees, summarizeErrors); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -107784,7 +107482,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateOrCreateCreditNotesExample + public class updateOrCreateEmployeesExample { public void main() { @@ -107794,19 +107492,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var creditNotes = new CreditNotes(); // CreditNotes | - var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) - var unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) + var employees = new Employees(); // Employees | + var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) try { - // Allows you to update OR create one or more credit notes - CreditNotes result = apiInstance.updateOrCreateCreditNotes(xeroTenantId, creditNotes, summarizeErrors, unitdp); + // Allows you to create a single new employees used in Xero payrun + Employees result = apiInstance.updateOrCreateEmployees(xeroTenantId, employees, summarizeErrors); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateOrCreateCreditNotes: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateOrCreateEmployees: " + e.Message ); } } } @@ -107814,7 +107511,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -107832,12 +107529,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateOrCreateCreditNotes: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateOrCreateEmployees: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -107847,20 +107544,19 @@ 

    Usage and SDK Samples

    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 obejcts 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 +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->updateOrCreateCreditNotes(xeroTenantId => $xeroTenantId, creditNotes => $creditNotes, summarizeErrors => $summarizeErrors, unitdp => $unitdp); + my $result = $api_instance->updateOrCreateEmployees(xeroTenantId => $xeroTenantId, employees => $employees, summarizeErrors => $summarizeErrors); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateOrCreateCreditNotes: $@\n"; + warn "Exception when calling AccountingApi->updateOrCreateEmployees: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -107873,29 +107569,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -creditNotes = { creditNotes: [{ type: CreditNote.TypeEnum.ACCPAYCREDIT, contact: { contactID: "00000000-0000-0000-000-000000000000" }, date: "2019-01-05", lineItems: [{ description: "Foobar", quantity: 2.0, unitAmount: 20.0, accountCode: "400" }]}]} # CreditNotes | -summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) -unitdp = 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) +employees = { "Employees": [ { "FirstName": "Nick", "LastName": "Fury", "ExternalLink": { "Url": "http://twitter.com/#!/search/Nick+Fury" } } ] } # Employees | +summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) try: - # Allows you to update OR create one or more credit notes - api_response = api_instance.update_or_create_credit_notes(xeroTenantId, creditNotes, summarizeErrors=summarizeErrors, unitdp=unitdp) + # Allows you to create a single new employees used in Xero payrun + api_response = api_instance.update_or_create_employees(xeroTenantId, employees, summarizeErrors=summarizeErrors) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateOrCreateCreditNotes: %s\n" % e)
    + print("Exception when calling AccountingApi->updateOrCreateEmployees: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let creditNotes = { creditNotes: [{ type: CreditNote.TypeEnum.ACCPAYCREDIT, contact: { contactID: "00000000-0000-0000-000-000000000000" }, date: "2019-01-05", lineItems: [{ description: "Foobar", quantity: 2.0, unitAmount: 20.0, accountCode: "400" }]}]}; // CreditNotes
    +    let employees = { "Employees": [ { "FirstName": "Nick", "LastName": "Fury", "ExternalLink": { "Url": "http://twitter.com/#!/search/Nick+Fury" } } ] }; // Employees
         let summarizeErrors = true; // Boolean
    -    let unitdp = 4; // Integer
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateOrCreateCreditNotes(xeroTenantId, creditNotes, summarizeErrors, unitdp, &context).wait();
    +    let result = client.updateOrCreateEmployees(xeroTenantId, employees, summarizeErrors, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -107907,8 +107601,8 @@ 

    Scopes

    - - + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoicesaccounting.settingsGrant read-write access to organisation and account settings
    @@ -107926,7 +107620,7 @@

    Parameters

    -
    +
    @@ -107953,33 +107647,33 @@

    Parameters

    Name Description - creditNotes * + employees *
    - CreditNotes + Employees
    -an array of Credit Notes with a single CreditNote object. +Employees with array of Employee object in body of request
    Required
    - + -
    +
    @@ -108017,7 +107711,7 @@

    Parameters

    -
    +
    @@ -108025,27 +107719,7 @@

    Parameters

    -If false return 200 OK and mix of successfully created obejcts 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 +If false return 200 OK and mix of successfully created objects and any with validation errors
    @@ -108056,27 +107730,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Employees?summarizeErrors=true"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Invoices?summarizeErrors=true&unitdp=4"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -108254,20 +107928,21 @@ 

    Usage and SDK Samples

    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 obejcts and any with validation errors + 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 { - Employees result = apiInstance.updateOrCreateEmployees(xeroTenantId, employees, summarizeErrors); + Invoices result = apiInstance.updateOrCreateInvoices(xeroTenantId, invoices, summarizeErrors, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreateEmployees"); + System.err.println("Exception when calling AccountingApi#updateOrCreateInvoices"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -108275,39 +107950,42 @@ 

    Usage and SDK Samples

    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 obejcts and any with validation errors + 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 { - Employees result = apiInstance.updateOrCreateEmployees(xeroTenantId, employees, summarizeErrors); + Invoices result = apiInstance.updateOrCreateInvoices(xeroTenantId, invoices, summarizeErrors, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreateEmployees"); + 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)
    -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 obejcts and any with validation errors (optional) (default to false)
    +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];
     
    -// Allows you to create a single new employees used in Xero payrun
    -[apiInstance updateOrCreateEmployeesWith:xeroTenantId
    -    employees:employees
    +// Allows you to update OR create one or more sales invoices or purchase bills
    +[apiInstance updateOrCreateInvoicesWith:xeroTenantId
    +    invoices:invoices
         summarizeErrors:summarizeErrors
    -              completionHandler: ^(Employees output, NSError* error) {
    +    unitdp:unitdp
    +              completionHandler: ^(Invoices output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -108318,7 +107996,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -108328,43 +108006,29 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const employees:Employees = { employees: [{ firstName: "Nick", lastName: "Fury", externalLink: { url: "http://twitter.com/#!/search/Nick+Fury" }}]}; // {Employees} -const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created obejcts and any with validation errors + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + + +const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created objects and any with validation errors + +const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts +const invoices: Invoices = { invoices: [{ type: Invoice.TypeEnum.ACCREC, contact: { contactID:"00000000-0000-0000-000-000000000000" }, lineItems:[ { description:"Acme Tires", quantity:2.0, unitAmount:20.0, accountCode:"200", taxType:"NONE", lineAmount:40.0 } ], date: "2019-03-11", dueDate:"2018-12-10", reference:"Website Design", status: Invoice.StatusEnum.AUTHORISED } ] } try { - const response: any = await xero.accountingApi.updateOrCreateEmployees(xeroTenantId, employees, summarizeErrors); + const response = await xero.accountingApi.updateOrCreateInvoices(xeroTenantId, invoices, summarizeErrors, unitdp); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -108373,7 +108037,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateOrCreateEmployeesExample + public class updateOrCreateInvoicesExample { public void main() { @@ -108383,18 +108047,19 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var employees = new Employees(); // Employees | - var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) + var invoices = new Invoices(); // Invoices | + var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) + var unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try { - // Allows you to create a single new employees used in Xero payrun - Employees result = apiInstance.updateOrCreateEmployees(xeroTenantId, employees, summarizeErrors); + // Allows you to update OR create one or more sales invoices or purchase bills + Invoices result = apiInstance.updateOrCreateInvoices(xeroTenantId, invoices, summarizeErrors, unitdp); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateOrCreateEmployees: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateOrCreateInvoices: " + e.Message ); } } } @@ -108402,7 +108067,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -108420,12 +108085,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateOrCreateEmployees: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateOrCreateInvoices: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -108435,19 +108100,20 @@ 

    Usage and SDK Samples

    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 obejcts and any with validation errors +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->updateOrCreateEmployees(xeroTenantId => $xeroTenantId, employees => $employees, summarizeErrors => $summarizeErrors); + my $result = $api_instance->updateOrCreateInvoices(xeroTenantId => $xeroTenantId, invoices => $invoices, summarizeErrors => $summarizeErrors, unitdp => $unitdp); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateOrCreateEmployees: $@\n"; + warn "Exception when calling AccountingApi->updateOrCreateInvoices: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -108460,27 +108126,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -employees = { employees: [{ firstName: "Nick", lastName: "Fury", externalLink: { url: "http://twitter.com/#!/search/Nick+Fury" }}]} # Employees | -summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) +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 | +summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) +unitdp = 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try: - # Allows you to create a single new employees used in Xero payrun - api_response = api_instance.update_or_create_employees(xeroTenantId, employees, summarizeErrors=summarizeErrors) + # Allows you to update OR create one or more sales invoices or purchase bills + api_response = api_instance.update_or_create_invoices(xeroTenantId, invoices, summarizeErrors=summarizeErrors, unitdp=unitdp) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateOrCreateEmployees: %s\n" % e)
    + print("Exception when calling AccountingApi->updateOrCreateInvoices: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let employees = { employees: [{ firstName: "Nick", lastName: "Fury", externalLink: { url: "http://twitter.com/#!/search/Nick+Fury" }}]}; // Employees
    +    let 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
         let summarizeErrors = true; // Boolean
    +    let unitdp = 4; // Integer
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateOrCreateEmployees(xeroTenantId, employees, summarizeErrors, &context).wait();
    +    let result = client.updateOrCreateInvoices(xeroTenantId, invoices, summarizeErrors, unitdp, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -108492,8 +108160,8 @@ 

    Scopes

    - - + +
    accounting.settingsGrant read-write access to organisation and account settingsaccounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    @@ -108511,7 +108179,7 @@

    Parameters

    -
    +
    @@ -108538,33 +108206,32 @@

    Parameters

    Name Description - employees * + invoices *
    - Employees + Invoices
    -Employees with array of Employee object in body of request +
    Required
    - + -
    +
    @@ -108602,7 +108269,7 @@

    Parameters

    -
    +
    @@ -108610,7 +108277,27 @@

    Parameters

    -If false return 200 OK and mix of successfully created obejcts and any with validation errors +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
    @@ -108621,27 +108308,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Invoices?summarizeErrors=true&unitdp=4"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Items?summarizeErrors=true&unitdp=4"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -108819,21 +108506,21 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - Invoices invoices = { invoices: [{ type: Invoice.TypeEnum.ACCREC, contact: { contactID:"00000000-0000-0000-000-000000000000" }, lineItems:[ { description:"Acme Tires", quantity:2.0, unitAmount:20.0, accountCode:"200", taxType:"NONE", lineAmount:40.0 } ], date:"2019-03-11", dueDate:"2018-12-10", reference:"Website Design", status: Invoice.StatusEnum.AUTHORISED } ] }; // Invoices | - Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors + 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 { - Invoices result = apiInstance.updateOrCreateInvoices(xeroTenantId, invoices, summarizeErrors, unitdp); + Items result = apiInstance.updateOrCreateItems(xeroTenantId, items, summarizeErrors, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreateInvoices"); + System.err.println("Exception when calling AccountingApi#updateOrCreateItems"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -108841,42 +108528,42 @@ 

    Usage and SDK Samples

    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: Invoice.TypeEnum.ACCREC, contact: { contactID:"00000000-0000-0000-000-000000000000" }, lineItems:[ { description:"Acme Tires", quantity:2.0, unitAmount:20.0, accountCode:"200", taxType:"NONE", lineAmount:40.0 } ], date:"2019-03-11", dueDate:"2018-12-10", reference:"Website Design", status: Invoice.StatusEnum.AUTHORISED } ] }; // Invoices | - Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors + 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 { - Invoices result = apiInstance.updateOrCreateInvoices(xeroTenantId, invoices, summarizeErrors, unitdp); + Items result = apiInstance.updateOrCreateItems(xeroTenantId, items, summarizeErrors, unitdp); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreateInvoices"); + 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)
    -Invoices *invoices = { invoices: [{ type: Invoice.TypeEnum.ACCREC, contact: { contactID:"00000000-0000-0000-000-000000000000" }, lineItems:[ { description:"Acme Tires", quantity:2.0, unitAmount:20.0, accountCode:"200", taxType:"NONE", lineAmount:40.0 } ], date:"2019-03-11", dueDate:"2018-12-10", reference:"Website Design", status: Invoice.StatusEnum.AUTHORISED } ] }; // 
    -Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false)
    +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];
     
    -// Allows you to update OR create one or more sales invoices or purchase bills
    -[apiInstance updateOrCreateInvoicesWith:xeroTenantId
    -    invoices:invoices
    +// Allows you to update or create one or more items
    +[apiInstance updateOrCreateItemsWith:xeroTenantId
    +    items:items
         summarizeErrors:summarizeErrors
         unitdp:unitdp
    -              completionHandler: ^(Invoices output, NSError* error) {
    +              completionHandler: ^(Items output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -108887,7 +108574,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -108897,44 +108584,29 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const invoices:Invoices = { invoices: [{ type: Invoice.TypeEnum.ACCREC, contact: { contactID:"00000000-0000-0000-000-000000000000" }, lineItems:[ { description:"Acme Tires", quantity:2.0, unitAmount:20.0, accountCode:"200", taxType:"NONE", lineAmount:40.0 } ], date:"2019-03-11", dueDate:"2018-12-10", reference:"Website Design", status: Invoice.StatusEnum.AUTHORISED } ] }; // {Invoices} -const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created obejcts and any with validation errors -const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + + +const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created objects and any with validation errors + +const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts +const items: Items = { items: [{ code: "ItemCode123", name: "ItemName XYZ", description: "Item Description ABC" }]} try { - const response: any = await xero.accountingApi.updateOrCreateInvoices(xeroTenantId, invoices, summarizeErrors, unitdp); + const response = await xero.accountingApi.updateOrCreateItems(xeroTenantId, items, summarizeErrors, unitdp); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -108943,7 +108615,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateOrCreateInvoicesExample + public class updateOrCreateItemsExample { public void main() { @@ -108953,19 +108625,19 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var invoices = new Invoices(); // Invoices | - var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) + var items = new Items(); // Items | + var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) var unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try { - // Allows you to update OR create one or more sales invoices or purchase bills - Invoices result = apiInstance.updateOrCreateInvoices(xeroTenantId, invoices, summarizeErrors, unitdp); + // Allows you to update or create one or more items + Items result = apiInstance.updateOrCreateItems(xeroTenantId, items, summarizeErrors, unitdp); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateOrCreateInvoices: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateOrCreateItems: " + e.Message ); } } } @@ -108973,7 +108645,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -108991,12 +108663,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateOrCreateInvoices: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateOrCreateItems: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -109006,20 +108678,20 @@ 

    Usage and SDK Samples

    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 obejcts and any with validation errors +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->updateOrCreateInvoices(xeroTenantId => $xeroTenantId, invoices => $invoices, summarizeErrors => $summarizeErrors, unitdp => $unitdp); + my $result = $api_instance->updateOrCreateItems(xeroTenantId => $xeroTenantId, items => $items, summarizeErrors => $summarizeErrors, unitdp => $unitdp); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateOrCreateInvoices: $@\n"; + warn "Exception when calling AccountingApi->updateOrCreateItems: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -109032,29 +108704,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -invoices = { invoices: [{ type: Invoice.TypeEnum.ACCREC, contact: { contactID:"00000000-0000-0000-000-000000000000" }, lineItems:[ { description:"Acme Tires", quantity:2.0, unitAmount:20.0, accountCode:"200", taxType:"NONE", lineAmount:40.0 } ], date:"2019-03-11", dueDate:"2018-12-10", reference:"Website Design", status: Invoice.StatusEnum.AUTHORISED } ] } # Invoices | -summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) +items = { "Items": [ { "Code": "ItemCode123", "Name": "ItemName XYZ", "Description": "Item Description ABC" } ] } # Items | +summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) unitdp = 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) try: - # Allows you to update OR create one or more sales invoices or purchase bills - api_response = api_instance.update_or_create_invoices(xeroTenantId, invoices, summarizeErrors=summarizeErrors, unitdp=unitdp) + # Allows you to update or create one or more items + api_response = api_instance.update_or_create_items(xeroTenantId, items, summarizeErrors=summarizeErrors, unitdp=unitdp) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateOrCreateInvoices: %s\n" % e)
    + print("Exception when calling AccountingApi->updateOrCreateItems: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let invoices = { invoices: [{ type: Invoice.TypeEnum.ACCREC, contact: { contactID:"00000000-0000-0000-000-000000000000" }, lineItems:[ { description:"Acme Tires", quantity:2.0, unitAmount:20.0, accountCode:"200", taxType:"NONE", lineAmount:40.0 } ], date:"2019-03-11", dueDate:"2018-12-10", reference:"Website Design", status: Invoice.StatusEnum.AUTHORISED } ] }; // Invoices
    +    let items = { "Items": [ { "Code": "ItemCode123", "Name": "ItemName XYZ", "Description": "Item Description ABC" } ] }; // Items
         let summarizeErrors = true; // Boolean
         let unitdp = 4; // Integer
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateOrCreateInvoices(xeroTenantId, invoices, summarizeErrors, unitdp, &context).wait();
    +    let result = client.updateOrCreateItems(xeroTenantId, items, summarizeErrors, unitdp, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -109066,8 +108738,8 @@ 

    Scopes

    - - + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoicesaccounting.settingsGrant read-write access to organisation and account settings
    @@ -109085,7 +108757,7 @@

    Parameters

    -
    +
    @@ -109112,12 +108784,12 @@

    Parameters

    Name Description - invoices * + items *
    - Invoices + Items
    @@ -109135,9 +108807,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/Invoices" + "$ref" : "#/components/schemas/Items" }, - "example" : "{ invoices: [{ type: Invoice.TypeEnum.ACCREC, contact: { contactID:\"00000000-0000-0000-000-000000000000\" }, lineItems:[ { description:\"Acme Tires\", quantity:2.0, unitAmount:20.0, accountCode:\"200\", taxType:\"NONE\", lineAmount:40.0 } ], date:\"2019-03-11\", dueDate:\"2018-12-10\", reference:\"Website Design\", status: Invoice.StatusEnum.AUTHORISED } ] }" + "example" : "{ \"Items\": [ { \"Code\": \"ItemCode123\", \"Name\": \"ItemName XYZ\", \"Description\": \"Item Description ABC\" } ] }" } }, "required" : true @@ -109153,12 +108825,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_updateOrCreateInvoices_invoices'); + var result = $('#d2e199_updateOrCreateItems_items'); result.empty(); result.append(view.render()); }); -
    +
    @@ -109175,7 +108847,7 @@

    Parameters

    -
    +
    @@ -109183,7 +108855,7 @@

    Parameters

    -If false return 200 OK and mix of successfully created obejcts and any with validation errors +If false return 200 OK and mix of successfully created objects and any with validation errors
    @@ -109195,7 +108867,7 @@

    Parameters

    -
    +
    @@ -109214,27 +108886,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Items?summarizeErrors=true&unitdp=4"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/ManualJournals?summarizeErrors=true"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -109412,21 +109084,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - Items items = { items: [{ code: "abcXYZ", name: "HelloWorld", description: "Foobar" }]}; // Items | - Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts 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 + 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 { - Items result = apiInstance.updateOrCreateItems(xeroTenantId, items, summarizeErrors, unitdp); + ManualJournals result = apiInstance.updateOrCreateManualJournals(xeroTenantId, manualJournals, summarizeErrors); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreateItems"); + System.err.println("Exception when calling AccountingApi#updateOrCreateManualJournals"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -109434,42 +109105,39 @@ 

    Usage and SDK Samples

    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: "abcXYZ", name: "HelloWorld", description: "Foobar" }]}; // Items | - Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts 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 + 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 { - Items result = apiInstance.updateOrCreateItems(xeroTenantId, items, summarizeErrors, unitdp); + ManualJournals result = apiInstance.updateOrCreateManualJournals(xeroTenantId, manualJournals, summarizeErrors); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreateItems"); + 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)
    -Items *items = { items: [{ code: "abcXYZ", name: "HelloWorld", description: "Foobar" }]}; // 
    -Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created obejcts 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)
    +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];
     
    -// Allows you to update or create one or more items
    -[apiInstance updateOrCreateItemsWith:xeroTenantId
    -    items:items
    +// Allows you to create a single manual journal
    +[apiInstance updateOrCreateManualJournalsWith:xeroTenantId
    +    manualJournals:manualJournals
         summarizeErrors:summarizeErrors
    -    unitdp:unitdp
    -              completionHandler: ^(Items output, NSError* error) {
    +              completionHandler: ^(ManualJournals output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -109480,7 +109148,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -109490,44 +109158,27 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const items:Items = { items: [{ code: "abcXYZ", name: "HelloWorld", description: "Foobar" }]}; // {Items} -const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created obejcts and any with validation errors -const unitdp = 4; // {Integer} e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + + +const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created objects and any with validation errors +const manualJournals: ManualJournals = { manualJournals: [{ narration: "Foo bar", journalLines: [{ lineAmount: 100.0, accountCode: "400", description: "Hello there" },{ lineAmount: -100.0, accountCode: "400", description: "Goodbye", tracking: [{ name: "Simpsons", option: "Bart" }]}], date: "2019-03-14" }]} try { - const response: any = await xero.accountingApi.updateOrCreateItems(xeroTenantId, items, summarizeErrors, unitdp); + const response = await xero.accountingApi.updateOrCreateManualJournals(xeroTenantId, manualJournals, summarizeErrors); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -109536,7 +109187,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateOrCreateItemsExample + public class updateOrCreateManualJournalsExample { public void main() { @@ -109546,19 +109197,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var items = new Items(); // Items | - var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) - var unitdp = 4; // Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) + var manualJournals = new ManualJournals(); // ManualJournals | + var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) try { - // Allows you to update or create one or more items - Items result = apiInstance.updateOrCreateItems(xeroTenantId, items, summarizeErrors, unitdp); + // Allows you to create a single manual journal + ManualJournals result = apiInstance.updateOrCreateManualJournals(xeroTenantId, manualJournals, summarizeErrors); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateOrCreateItems: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateOrCreateManualJournals: " + e.Message ); } } } @@ -109566,7 +109216,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -109584,12 +109234,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateOrCreateItems: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateOrCreateManualJournals: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -109599,20 +109249,19 @@ 

    Usage and SDK Samples

    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 obejcts 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 +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->updateOrCreateItems(xeroTenantId => $xeroTenantId, items => $items, summarizeErrors => $summarizeErrors, unitdp => $unitdp); + my $result = $api_instance->updateOrCreateManualJournals(xeroTenantId => $xeroTenantId, manualJournals => $manualJournals, summarizeErrors => $summarizeErrors); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateOrCreateItems: $@\n"; + warn "Exception when calling AccountingApi->updateOrCreateManualJournals: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -109625,29 +109274,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -items = { items: [{ code: "abcXYZ", name: "HelloWorld", description: "Foobar" }]} # Items | -summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) -unitdp = 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts (optional) (default to null) +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 | +summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) try: - # Allows you to update or create one or more items - api_response = api_instance.update_or_create_items(xeroTenantId, items, summarizeErrors=summarizeErrors, unitdp=unitdp) + # Allows you to create a single manual journal + api_response = api_instance.update_or_create_manual_journals(xeroTenantId, manualJournals, summarizeErrors=summarizeErrors) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateOrCreateItems: %s\n" % e)
    + print("Exception when calling AccountingApi->updateOrCreateManualJournals: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let items = { items: [{ code: "abcXYZ", name: "HelloWorld", description: "Foobar" }]}; // Items
    +    let 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
         let summarizeErrors = true; // Boolean
    -    let unitdp = 4; // Integer
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateOrCreateItems(xeroTenantId, items, summarizeErrors, unitdp, &context).wait();
    +    let result = client.updateOrCreateManualJournals(xeroTenantId, manualJournals, summarizeErrors, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -109659,8 +109306,8 @@ 

    Scopes

    - - + +
    accounting.settingsGrant read-write access to organisation and account settingsaccounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    @@ -109678,7 +109325,7 @@

    Parameters

    -
    +
    @@ -109705,32 +109352,33 @@

    Parameters

    Name Description - items * + manualJournals *
    - Items + ManualJournals
    - +ManualJournals array with ManualJournal object in body of request
    Required
    - + -
    +
    @@ -109768,7 +109416,7 @@

    Parameters

    -
    +
    @@ -109776,27 +109424,7 @@

    Parameters

    -If false return 200 OK and mix of successfully created obejcts 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 +If false return 200 OK and mix of successfully created objects and any with validation errors
    @@ -109807,27 +109435,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/ManualJournals?summarizeErrors=true"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/PurchaseOrders?summarizeErrors=true"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -110005,20 +109633,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - ManualJournals manualJournals = { manualJournals: [{ narration: "Foo bar", journalLines: [{ lineAmount: 100.0, accountCode: "400", description: "Hello there" },{ lineAmount: -100.0, accountCode: "400", description: "Goodbye", tracking: [{ name: "Simpsons", option: "Bart" }]}], date: "2019-03-14" }]}; // ManualJournals | - Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors + PurchaseOrders purchaseOrders = { "PurchaseOrders": [ { "Contact": { "ContactID": "00000000-0000-0000-000-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 { - ManualJournals result = apiInstance.updateOrCreateManualJournals(xeroTenantId, manualJournals, summarizeErrors); + PurchaseOrders result = apiInstance.updateOrCreatePurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreateManualJournals"); + System.err.println("Exception when calling AccountingApi#updateOrCreatePurchaseOrders"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -110026,39 +109654,39 @@ 

    Usage and SDK Samples

    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: "Foo bar", journalLines: [{ lineAmount: 100.0, accountCode: "400", description: "Hello there" },{ lineAmount: -100.0, accountCode: "400", description: "Goodbye", tracking: [{ name: "Simpsons", option: "Bart" }]}], date: "2019-03-14" }]}; // ManualJournals | - Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors + PurchaseOrders purchaseOrders = { "PurchaseOrders": [ { "Contact": { "ContactID": "00000000-0000-0000-000-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 { - ManualJournals result = apiInstance.updateOrCreateManualJournals(xeroTenantId, manualJournals, summarizeErrors); + PurchaseOrders result = apiInstance.updateOrCreatePurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreateManualJournals"); + 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)
    -ManualJournals *manualJournals = { manualJournals: [{ narration: "Foo bar", journalLines: [{ lineAmount: 100.0, accountCode: "400", description: "Hello there" },{ lineAmount: -100.0, accountCode: "400", description: "Goodbye", tracking: [{ name: "Simpsons", option: "Bart" }]}], date: "2019-03-14" }]}; // 
    -Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false)
    +PurchaseOrders *purchaseOrders = { "PurchaseOrders": [ { "Contact": { "ContactID": "00000000-0000-0000-000-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];
     
    -// Allows you to create a single manual journal
    -[apiInstance updateOrCreateManualJournalsWith:xeroTenantId
    -    manualJournals:manualJournals
    +// Allows you to update or create one or more purchase orders
    +[apiInstance updateOrCreatePurchaseOrdersWith:xeroTenantId
    +    purchaseOrders:purchaseOrders
         summarizeErrors:summarizeErrors
    -              completionHandler: ^(ManualJournals output, NSError* error) {
    +              completionHandler: ^(PurchaseOrders output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -110069,7 +109697,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -110079,43 +109707,27 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const manualJournals:ManualJournals = { manualJournals: [{ narration: "Foo bar", journalLines: [{ lineAmount: 100.0, accountCode: "400", description: "Hello there" },{ lineAmount: -100.0, accountCode: "400", description: "Goodbye", tracking: [{ name: "Simpsons", option: "Bart" }]}], date: "2019-03-14" }]}; // {ManualJournals} -const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created obejcts and any with validation errors + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + + +const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created objects and any with validation errors +const purchaseOrders: PurchaseOrders = { purchaseOrders: [ { contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "710" }], date: "2019-03-13" }]} try { - const response: any = await xero.accountingApi.updateOrCreateManualJournals(xeroTenantId, manualJournals, summarizeErrors); + const response = await xero.accountingApi.updateOrCreatePurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -110124,7 +109736,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateOrCreateManualJournalsExample + public class updateOrCreatePurchaseOrdersExample { public void main() { @@ -110134,18 +109746,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var manualJournals = new ManualJournals(); // ManualJournals | - var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) + var purchaseOrders = new PurchaseOrders(); // PurchaseOrders | + var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) try { - // Allows you to create a single manual journal - ManualJournals result = apiInstance.updateOrCreateManualJournals(xeroTenantId, manualJournals, summarizeErrors); + // Allows you to update or create one or more purchase orders + PurchaseOrders result = apiInstance.updateOrCreatePurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateOrCreateManualJournals: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateOrCreatePurchaseOrders: " + e.Message ); } } } @@ -110153,7 +109765,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -110171,12 +109783,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateOrCreateManualJournals: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateOrCreatePurchaseOrders: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -110186,19 +109798,19 @@ 

    Usage and SDK Samples

    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 obejcts and any with validation errors +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->updateOrCreateManualJournals(xeroTenantId => $xeroTenantId, manualJournals => $manualJournals, summarizeErrors => $summarizeErrors); + my $result = $api_instance->updateOrCreatePurchaseOrders(xeroTenantId => $xeroTenantId, purchaseOrders => $purchaseOrders, summarizeErrors => $summarizeErrors); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateOrCreateManualJournals: $@\n"; + warn "Exception when calling AccountingApi->updateOrCreatePurchaseOrders: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -110211,27 +109823,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -manualJournals = { manualJournals: [{ narration: "Foo bar", journalLines: [{ lineAmount: 100.0, accountCode: "400", description: "Hello there" },{ lineAmount: -100.0, accountCode: "400", description: "Goodbye", tracking: [{ name: "Simpsons", option: "Bart" }]}], date: "2019-03-14" }]} # ManualJournals | -summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) +purchaseOrders = { "PurchaseOrders": [ { "Contact": { "ContactID": "00000000-0000-0000-000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "710" } ], "Date": "2019-03-13" } ] } # PurchaseOrders | +summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) try: - # Allows you to create a single manual journal - api_response = api_instance.update_or_create_manual_journals(xeroTenantId, manualJournals, summarizeErrors=summarizeErrors) + # Allows you to update or create one or more purchase orders + api_response = api_instance.update_or_create_purchase_orders(xeroTenantId, purchaseOrders, summarizeErrors=summarizeErrors) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateOrCreateManualJournals: %s\n" % e)
    + print("Exception when calling AccountingApi->updateOrCreatePurchaseOrders: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let manualJournals = { manualJournals: [{ narration: "Foo bar", journalLines: [{ lineAmount: 100.0, accountCode: "400", description: "Hello there" },{ lineAmount: -100.0, accountCode: "400", description: "Goodbye", tracking: [{ name: "Simpsons", option: "Bart" }]}], date: "2019-03-14" }]}; // ManualJournals
    +    let purchaseOrders = { "PurchaseOrders": [ { "Contact": { "ContactID": "00000000-0000-0000-000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "710" } ], "Date": "2019-03-13" } ] }; // PurchaseOrders
         let summarizeErrors = true; // Boolean
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateOrCreateManualJournals(xeroTenantId, manualJournals, summarizeErrors, &context).wait();
    +    let result = client.updateOrCreatePurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -110262,7 +109874,7 @@ 

    Parameters

    -
    +
    @@ -110289,33 +109901,32 @@

    Parameters

    Name Description - manualJournals * + purchaseOrders *
    - ManualJournals + PurchaseOrders
    -ManualJournals array with ManualJournal object in body of request +
    Required
    - + -
    +
    @@ -110353,7 +109964,7 @@

    Parameters

    -
    +
    @@ -110361,7 +109972,7 @@

    Parameters

    -If false return 200 OK and mix of successfully created obejcts and any with validation errors +If false return 200 OK and mix of successfully created objects and any with validation errors
    @@ -110372,27 +109983,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/PurchaseOrders?summarizeErrors=true"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes?summarizeErrors=true"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -110570,20 +110181,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - PurchaseOrders purchaseOrders = { purchaseOrders: [ { contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "710" }], date: "2019-03-13" }]}; // PurchaseOrders | - Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors + Quotes quotes = { "Quotes": [ { "Contact": { "ContactID": "00000000-0000-0000-000-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 { - PurchaseOrders result = apiInstance.updateOrCreatePurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors); + Quotes result = apiInstance.updateOrCreateQuotes(xeroTenantId, quotes, summarizeErrors); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreatePurchaseOrders"); + System.err.println("Exception when calling AccountingApi#updateOrCreateQuotes"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -110591,39 +110202,39 @@ 

    Usage and SDK Samples

    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-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "710" }], date: "2019-03-13" }]}; // PurchaseOrders | - Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors + Quotes quotes = { "Quotes": [ { "Contact": { "ContactID": "00000000-0000-0000-000-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 { - PurchaseOrders result = apiInstance.updateOrCreatePurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors); + Quotes result = apiInstance.updateOrCreateQuotes(xeroTenantId, quotes, summarizeErrors); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreatePurchaseOrders"); + 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)
    -PurchaseOrders *purchaseOrders = { purchaseOrders: [ { contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "710" }], date: "2019-03-13" }]}; // 
    -Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false)
    +Quotes *quotes = { "Quotes": [ { "Contact": { "ContactID": "00000000-0000-0000-000-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];
     
    -// Allows you to update or create one or more purchase orders
    -[apiInstance updateOrCreatePurchaseOrdersWith:xeroTenantId
    -    purchaseOrders:purchaseOrders
    +// Allows you to update OR create one or more quotes
    +[apiInstance updateOrCreateQuotesWith:xeroTenantId
    +    quotes:quotes
         summarizeErrors:summarizeErrors
    -              completionHandler: ^(PurchaseOrders output, NSError* error) {
    +              completionHandler: ^(Quotes output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -110634,7 +110245,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -110644,43 +110255,27 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const purchaseOrders:PurchaseOrders = { purchaseOrders: [ { contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "710" }], date: "2019-03-13" }]}; // {PurchaseOrders} -const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created obejcts and any with validation errors + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant + + +const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created objects and any with validation errors +const quotes: Quotes = { quotes: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "12775" }], date: "2020-02-01" }]} try { - const response: any = await xero.accountingApi.updateOrCreatePurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors); + const response = await xero.accountingApi.updateOrCreateQuotes(xeroTenantId, quotes, summarizeErrors); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -110689,7 +110284,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateOrCreatePurchaseOrdersExample + public class updateOrCreateQuotesExample { public void main() { @@ -110699,18 +110294,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var purchaseOrders = new PurchaseOrders(); // PurchaseOrders | - var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) + var quotes = new Quotes(); // Quotes | + var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) try { - // Allows you to update or create one or more purchase orders - PurchaseOrders result = apiInstance.updateOrCreatePurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors); + // Allows you to update OR create one or more quotes + Quotes result = apiInstance.updateOrCreateQuotes(xeroTenantId, quotes, summarizeErrors); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateOrCreatePurchaseOrders: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updateOrCreateQuotes: " + e.Message ); } } } @@ -110718,7 +110313,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -110736,12 +110331,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateOrCreatePurchaseOrders: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updateOrCreateQuotes: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -110751,19 +110346,19 @@ 

    Usage and SDK Samples

    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 obejcts and any with validation errors +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->updateOrCreatePurchaseOrders(xeroTenantId => $xeroTenantId, purchaseOrders => $purchaseOrders, summarizeErrors => $summarizeErrors); + my $result = $api_instance->updateOrCreateQuotes(xeroTenantId => $xeroTenantId, quotes => $quotes, summarizeErrors => $summarizeErrors); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateOrCreatePurchaseOrders: $@\n"; + warn "Exception when calling AccountingApi->updateOrCreateQuotes: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -110776,27 +110371,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -purchaseOrders = { purchaseOrders: [ { contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "710" }], date: "2019-03-13" }]} # PurchaseOrders | -summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) +quotes = { "Quotes": [ { "Contact": { "ContactID": "00000000-0000-0000-000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "12775" } ], "Date": "2020-02-01" } ] } # Quotes | +summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created objects and any with validation errors (optional) (default to false) try: - # Allows you to update or create one or more purchase orders - api_response = api_instance.update_or_create_purchase_orders(xeroTenantId, purchaseOrders, summarizeErrors=summarizeErrors) + # Allows you to update OR create one or more quotes + api_response = api_instance.update_or_create_quotes(xeroTenantId, quotes, summarizeErrors=summarizeErrors) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateOrCreatePurchaseOrders: %s\n" % e)
    + print("Exception when calling AccountingApi->updateOrCreateQuotes: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let purchaseOrders = { purchaseOrders: [ { contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "710" }], date: "2019-03-13" }]}; // PurchaseOrders
    +    let quotes = { "Quotes": [ { "Contact": { "ContactID": "00000000-0000-0000-000-000000000000" }, "LineItems": [ { "Description": "Foobar", "Quantity": 1, "UnitAmount": 20, "AccountCode": "12775" } ], "Date": "2020-02-01" } ] }; // Quotes
         let summarizeErrors = true; // Boolean
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateOrCreatePurchaseOrders(xeroTenantId, purchaseOrders, summarizeErrors, &context).wait();
    +    let result = client.updateOrCreateQuotes(xeroTenantId, quotes, summarizeErrors, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -110827,7 +110422,7 @@ 

    Parameters

    -
    +
    @@ -110854,12 +110449,12 @@

    Parameters

    Name Description - purchaseOrders * + quotes *
    - PurchaseOrders + Quotes
    @@ -110877,9 +110472,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/PurchaseOrders" + "$ref" : "#/components/schemas/Quotes" }, - "example" : "{ purchaseOrders: [ { contact: { contactID: \"00000000-0000-0000-000-000000000000\" }, lineItems: [{ description: \"Foobar\", quantity: 1.0, unitAmount: 20.0, accountCode: \"710\" }], date: \"2019-03-13\" }]}" + "example" : "{ \"Quotes\": [ { \"Contact\": { \"ContactID\": \"00000000-0000-0000-000-000000000000\" }, \"LineItems\": [ { \"Description\": \"Foobar\", \"Quantity\": 1, \"UnitAmount\": 20, \"AccountCode\": \"12775\" } ], \"Date\": \"2020-02-01\" } ] }" } }, "required" : true @@ -110895,12 +110490,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_updateOrCreatePurchaseOrders_purchaseOrders'); + var result = $('#d2e199_updateOrCreateQuotes_quotes'); result.empty(); result.append(view.render()); }); -
    +
    @@ -110917,7 +110512,7 @@

    Parameters

    -
    +
    @@ -110925,7 +110520,7 @@

    Parameters

    -If false return 200 OK and mix of successfully created obejcts and any with validation errors +If false return 200 OK and mix of successfully created objects and any with validation errors
    @@ -110936,27 +110531,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/Quotes?summarizeErrors=true"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -111134,20 +110729,20 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - Quotes quotes = { quotes: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "12775" }], date: "2020-02-01" }]}; // Quotes | - Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors + UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a PurchaseOrder + PurchaseOrders purchaseOrders = { "PurchaseOrders": [ { "AttentionTo": "Peter Parker", "LineItems": [], "Contact": {} } ] }; // PurchaseOrders | try { - Quotes result = apiInstance.updateOrCreateQuotes(xeroTenantId, quotes, summarizeErrors); + PurchaseOrders result = apiInstance.updatePurchaseOrder(xeroTenantId, purchaseOrderID, purchaseOrders); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreateQuotes"); + System.err.println("Exception when calling AccountingApi#updatePurchaseOrder"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -111155,39 +110750,39 @@ 

    Usage and SDK Samples

    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-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "12775" }], date: "2020-02-01" }]}; // Quotes | - Boolean summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors + UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a PurchaseOrder + PurchaseOrders purchaseOrders = { "PurchaseOrders": [ { "AttentionTo": "Peter Parker", "LineItems": [], "Contact": {} } ] }; // PurchaseOrders | try { - Quotes result = apiInstance.updateOrCreateQuotes(xeroTenantId, quotes, summarizeErrors); + PurchaseOrders result = apiInstance.updatePurchaseOrder(xeroTenantId, purchaseOrderID, purchaseOrders); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updateOrCreateQuotes"); + 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)
    -Quotes *quotes = { quotes: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "12775" }], date: "2020-02-01" }]}; // 
    -Boolean *summarizeErrors = true; // If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false)
    +UUID *purchaseOrderID = 00000000-0000-0000-000-000000000000; // Unique identifier for a PurchaseOrder (default to null)
    +PurchaseOrders *purchaseOrders = { "PurchaseOrders": [ { "AttentionTo": "Peter Parker", "LineItems": [], "Contact": {} } ] }; // 
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to update OR create one or more quotes
    -[apiInstance updateOrCreateQuotesWith:xeroTenantId
    -    quotes:quotes
    -    summarizeErrors:summarizeErrors
    -              completionHandler: ^(Quotes output, NSError* error) {
    +// Allows you to update a specified purchase order
    +[apiInstance updatePurchaseOrderWith:xeroTenantId
    +    purchaseOrderID:purchaseOrderID
    +    purchaseOrders:purchaseOrders
    +              completionHandler: ^(PurchaseOrders output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -111198,7 +110793,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -111208,43 +110803,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const quotes:Quotes = { quotes: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "12775" }], date: "2020-02-01" }]}; // {Quotes} -const summarizeErrors = true; // {Boolean} If false return 200 OK and mix of successfully created obejcts and any with validation errors + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const purchaseOrderID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a PurchaseOrder +const purchaseOrders: PurchaseOrders = { purchaseOrders:[ { attentionTo: "Peter Parker", lineItems: [], contact: {} }]} try { - const response: any = await xero.accountingApi.updateOrCreateQuotes(xeroTenantId, quotes, summarizeErrors); + const response = await xero.accountingApi.updatePurchaseOrder(xeroTenantId, purchaseOrderID, purchaseOrders); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -111253,7 +110830,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updateOrCreateQuotesExample + public class updatePurchaseOrderExample { public void main() { @@ -111263,18 +110840,18 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var quotes = new Quotes(); // Quotes | - var summarizeErrors = true; // Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) + var purchaseOrderID = new UUID(); // UUID | Unique identifier for a PurchaseOrder (default to null) + var purchaseOrders = new PurchaseOrders(); // PurchaseOrders | try { - // Allows you to update OR create one or more quotes - Quotes result = apiInstance.updateOrCreateQuotes(xeroTenantId, quotes, summarizeErrors); + // Allows you to update a specified purchase order + PurchaseOrders result = apiInstance.updatePurchaseOrder(xeroTenantId, purchaseOrderID, purchaseOrders); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updateOrCreateQuotes: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updatePurchaseOrder: " + e.Message ); } } } @@ -111282,7 +110859,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -111300,12 +110877,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updateOrCreateQuotes: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updatePurchaseOrder: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -111315,19 +110892,19 @@ 

    Usage and SDK Samples

    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 obejcts and any with validation errors +my $purchaseOrderID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a PurchaseOrder +my $purchaseOrders = ::Object::PurchaseOrders->new(); # PurchaseOrders | eval { - my $result = $api_instance->updateOrCreateQuotes(xeroTenantId => $xeroTenantId, quotes => $quotes, summarizeErrors => $summarizeErrors); + my $result = $api_instance->updatePurchaseOrder(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID, purchaseOrders => $purchaseOrders); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updateOrCreateQuotes: $@\n"; + warn "Exception when calling AccountingApi->updatePurchaseOrder: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -111340,27 +110917,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -quotes = { quotes: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "12775" }], date: "2020-02-01" }]} # Quotes | -summarizeErrors = true # Boolean | If false return 200 OK and mix of successfully created obejcts and any with validation errors (optional) (default to false) +purchaseOrderID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a PurchaseOrder (default to null) +purchaseOrders = { "PurchaseOrders": [ { "AttentionTo": "Peter Parker", "LineItems": [], "Contact": {} } ] } # PurchaseOrders | try: - # Allows you to update OR create one or more quotes - api_response = api_instance.update_or_create_quotes(xeroTenantId, quotes, summarizeErrors=summarizeErrors) + # Allows you to update a specified purchase order + api_response = api_instance.update_purchase_order(xeroTenantId, purchaseOrderID, purchaseOrders) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updateOrCreateQuotes: %s\n" % e)
    + print("Exception when calling AccountingApi->updatePurchaseOrder: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    -    let quotes = { quotes: [{ contact: { contactID: "00000000-0000-0000-000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "12775" }], date: "2020-02-01" }]}; // Quotes
    -    let summarizeErrors = true; // Boolean
    +    let purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID
    +    let purchaseOrders = { "PurchaseOrders": [ { "AttentionTo": "Peter Parker", "LineItems": [], "Contact": {} } ] }; // PurchaseOrders
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updateOrCreateQuotes(xeroTenantId, quotes, summarizeErrors, &context).wait();
    +    let result = client.updatePurchaseOrder(xeroTenantId, purchaseOrderID, purchaseOrders, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -111380,6 +110957,39 @@ 

    Scopes

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    PurchaseOrderID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Unique identifier for a PurchaseOrder +
    +
    +
    + Required +
    +
    +
    +
    Header parameters
    @@ -111391,7 +111001,7 @@

    Parameters

    - +
    -
    +
    @@ -111418,12 +111028,12 @@

    Parameters

    Name Description
    quotes *
    purchaseOrders *
    - Quotes + PurchaseOrders
    @@ -111441,9 +111051,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/Quotes" + "$ref" : "#/components/schemas/PurchaseOrders" }, - "example" : "{ quotes: [{ contact: { contactID: \"00000000-0000-0000-000-000000000000\" }, lineItems: [{ description: \"Foobar\", quantity: 1.0, unitAmount: 20.0, accountCode: \"12775\" }], date: \"2020-02-01\" }]}" + "example" : "{ \"PurchaseOrders\": [ { \"AttentionTo\": \"Peter Parker\", \"LineItems\": [], \"Contact\": {} } ] }" } }, "required" : true @@ -111459,68 +111069,41 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_updateOrCreateQuotes_quotes'); + var result = $('#d2e199_updatePurchaseOrder_purchaseOrders'); result.empty(); result.append(view.render()); }); -
    +
    -
    Query parameters
    - - - - - - - - - -
    NameDescription
    summarizeErrors - - -
    -
    -
    - - Boolean - - -
    -If false return 200 OK and mix of successfully created obejcts and any with validation errors -
    -
    -
    -
    -
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}"
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -111698,20 +111281,21 @@ 

    Usage and SDK Samples

    AccountingApi apiInstance = new AccountingApi(); String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant - UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for a PurchaseOrder - PurchaseOrders purchaseOrders = { purchaseOrders:[ { attentionTo: "Peter Parker", lineItems: [], contact: {} }]}; // PurchaseOrders | + UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Purchase Order object + String fileName = xero-dev.png; // String | Name of the attachment + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - PurchaseOrders result = apiInstance.updatePurchaseOrder(xeroTenantId, purchaseOrderID, purchaseOrders); + Attachments result = apiInstance.updatePurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updatePurchaseOrder"); + System.err.println("Exception when calling AccountingApi#updatePurchaseOrderAttachmentByFileName"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.AccountingApi;
     
     public class AccountingApiExample {
    @@ -111719,39 +111303,42 @@ 

    Usage and SDK Samples

    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-000-000000000000; // UUID | Unique identifier for a PurchaseOrder - PurchaseOrders purchaseOrders = { purchaseOrders:[ { attentionTo: "Peter Parker", lineItems: [], contact: {} }]}; // PurchaseOrders | + UUID purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID | Unique identifier for Purchase Order object + String fileName = xero-dev.png; // String | Name of the attachment + byte[] body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - PurchaseOrders result = apiInstance.updatePurchaseOrder(xeroTenantId, purchaseOrderID, purchaseOrders); + Attachments result = apiInstance.updatePurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AccountingApi#updatePurchaseOrder"); + 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-000-000000000000; // Unique identifier for a PurchaseOrder (default to null)
    -PurchaseOrders *purchaseOrders = { purchaseOrders:[ { attentionTo: "Peter Parker", lineItems: [], contact: {} }]}; // 
    +UUID *purchaseOrderID = 00000000-0000-0000-000-000000000000; // Unique identifier for Purchase Order object (default to null)
    +String *fileName = xero-dev.png; // Name of the attachment (default to null)
    +byte[] *body = BYTE_ARRAY_DATA_HERE; // 
     
     AccountingApi *apiInstance = [[AccountingApi alloc] init];
     
    -// Allows you to update a specified purchase order
    -[apiInstance updatePurchaseOrderWith:xeroTenantId
    +// Allows you to update Attachment on Purchase Order by Filename
    +[apiInstance updatePurchaseOrderAttachmentByFileNameWith:xeroTenantId
         purchaseOrderID:purchaseOrderID
    -    purchaseOrders:purchaseOrders
    -              completionHandler: ^(PurchaseOrders output, NSError* error) {
    +    fileName:fileName
    +    body:body
    +              completionHandler: ^(Attachments output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -111762,7 +111349,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -111772,42 +111359,35 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant -const purchaseOrderID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for a PurchaseOrder -const purchaseOrders:PurchaseOrders = { purchaseOrders:[ { attentionTo: "Peter Parker", lineItems: [], contact: {} }]}; // {PurchaseOrders} + +const xeroTenantId = "YOUR_XERO_TENANT_ID"; // {String} Xero identifier for Tenant +const purchaseOrderID = "00000000-0000-0000-000-000000000000"; // {UUID} Unique identifier for Purchase Order object +const fileName = "xero-dev.png"; // {String} Name of the attachment +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 +import * as fs from "fs"; +const body = fs.createReadStream(pathToUpload); // {fs.ReadStream} read the file +const contentType = mime.lookup(fileName); + try { - const response: any = await xero.accountingApi.updatePurchaseOrder(xeroTenantId, purchaseOrderID, purchaseOrders); + const response = await xero.accountingApi.updatePurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body, { + headers: { + "Content-Type": contentType, + } + }); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -111816,7 +111396,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class updatePurchaseOrderExample + public class updatePurchaseOrderAttachmentByFileNameExample { public void main() { @@ -111826,18 +111406,19 @@

    Usage and SDK Samples

    var apiInstance = new AccountingApi(); var xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant (default to null) - var purchaseOrderID = new UUID(); // UUID | Unique identifier for a PurchaseOrder (default to null) - var purchaseOrders = new PurchaseOrders(); // PurchaseOrders | + var purchaseOrderID = new UUID(); // UUID | Unique identifier for Purchase Order object (default to null) + var fileName = xero-dev.png; // String | Name of the attachment (default to null) + var body = BYTE_ARRAY_DATA_HERE; // byte[] | try { - // Allows you to update a specified purchase order - PurchaseOrders result = apiInstance.updatePurchaseOrder(xeroTenantId, purchaseOrderID, purchaseOrders); + // Allows you to update Attachment on Purchase Order by Filename + Attachments result = apiInstance.updatePurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AccountingApi.updatePurchaseOrder: " + e.Message ); + Debug.Print("Exception when calling AccountingApi.updatePurchaseOrderAttachmentByFileName: " + e.Message ); } } } @@ -111845,7 +111426,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -111863,12 +111444,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling AccountingApi->updatePurchaseOrder: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling AccountingApi->updatePurchaseOrderAttachmentByFileName: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::AccountingApi;
    @@ -111878,19 +111459,20 @@ 

    Usage and SDK Samples

    my $api_instance = ::AccountingApi->new(); my $xeroTenantId = YOUR_XERO_TENANT_ID; # String | Xero identifier for Tenant -my $purchaseOrderID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for a PurchaseOrder -my $purchaseOrders = ::Object::PurchaseOrders->new(); # PurchaseOrders | +my $purchaseOrderID = 00000000-0000-0000-000-000000000000; # UUID | Unique identifier for Purchase Order object +my $fileName = xero-dev.png; # String | Name of the attachment +my $body = ::Object::byte[]->new(); # byte[] | eval { - my $result = $api_instance->updatePurchaseOrder(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID, purchaseOrders => $purchaseOrders); + my $result = $api_instance->updatePurchaseOrderAttachmentByFileName(xeroTenantId => $xeroTenantId, purchaseOrderID => $purchaseOrderID, fileName => $fileName, body => $body); print Dumper($result); }; if ($@) { - warn "Exception when calling AccountingApi->updatePurchaseOrder: $@\n"; + warn "Exception when calling AccountingApi->updatePurchaseOrderAttachmentByFileName: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -111903,27 +111485,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .AccountingApi() xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null) -purchaseOrderID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for a PurchaseOrder (default to null) -purchaseOrders = { purchaseOrders:[ { attentionTo: "Peter Parker", lineItems: [], contact: {} }]} # PurchaseOrders | +purchaseOrderID = 00000000-0000-0000-000-000000000000 # UUID | Unique identifier for Purchase Order object (default to null) +fileName = xero-dev.png # String | Name of the attachment (default to null) +body = BYTE_ARRAY_DATA_HERE # byte[] | try: - # Allows you to update a specified purchase order - api_response = api_instance.update_purchase_order(xeroTenantId, purchaseOrderID, purchaseOrders) + # Allows you to update Attachment on Purchase Order by Filename + api_response = api_instance.update_purchase_order_attachment_by_file_name(xeroTenantId, purchaseOrderID, fileName, body) pprint(api_response) except ApiException as e: - print("Exception when calling AccountingApi->updatePurchaseOrder: %s\n" % e)
    + print("Exception when calling AccountingApi->updatePurchaseOrderAttachmentByFileName: %s\n" % e)
    -
    +
    extern crate AccountingApi;
     
     pub fn main() {
         let xeroTenantId = YOUR_XERO_TENANT_ID; // String
         let purchaseOrderID = 00000000-0000-0000-000-000000000000; // UUID
    -    let purchaseOrders = { purchaseOrders:[ { attentionTo: "Peter Parker", lineItems: [], contact: {} }]}; // PurchaseOrders
    +    let fileName = xero-dev.png; // String
    +    let body = BYTE_ARRAY_DATA_HERE; // byte[]
     
         let mut context = AccountingApi::Context::default();
    -    let result = client.updatePurchaseOrder(xeroTenantId, purchaseOrderID, purchaseOrders, &context).wait();
    +    let result = client.updatePurchaseOrderAttachmentByFileName(xeroTenantId, purchaseOrderID, fileName, body, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -111935,8 +111519,8 @@ 

    Scopes

    - - + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoicesaccounting.attachmentsGrant read-write access to attachments
    @@ -111953,7 +111537,7 @@

    Parameters

    -
    +
    @@ -111964,7 +111548,30 @@

    Parameters

    -Unique identifier for a PurchaseOrder +Unique identifier for Purchase Order object +
    +
    +
    + Required +
    +
    +
    + + + + FileName* + + + +
    +
    +
    + + String + + +
    +Name of the attachment
    @@ -111987,7 +111594,7 @@

    Parameters

    -
    +
    @@ -112014,32 +111621,33 @@

    Parameters

    Name Description - purchaseOrders * + body *
    - PurchaseOrders + byte[]
    - +Byte array of file in body of request
    Required
    - + -
    +
    @@ -112069,27 +111677,27 @@

    Parameters

    -
    +
    - +
    - +
    - +
    - +
    - +
    - +
    -
    +
    + + + + +
  • NodeJS
  • + + + + + + + + +
    +
    +
    curl -X  "https://api.xero.com/api.xro/2.0/ManualJournals/{ManualJournalID}/History"
    +
    +
    +
    import org.openapitools.client.*;
    +import org.openapitools.client.auth.*;
    +import org.openapitools.client.model.*;
    +import org.openapitools.client.api.AccountingApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class AccountingApiExample {
    +
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +        
    +        // Configure OAuth2 access token for authorization: OAuth2
    +        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
    +        OAuth2.setAccessToken("YOUR ACCESS TOKEN");
    +
    +        AccountingApi apiInstance = new AccountingApi();
    +        String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
    +        UUID manualJournalID = 00000000-0000-0000-000-000000000000; // UUID | Xero generated unique identifier for a manual journal
    +        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();
    +        }
    +    }
    +}
    +
    + +
    +
    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-000-000000000000; // UUID | Xero generated unique identifier for a manual journal
    +        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-000-000000000000; // Xero generated unique identifier for a manual journal (default to null)
    +HistoryRecords *historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // 
    +
    +AccountingApi *apiInstance = [[AccountingApi alloc] init];
    +
    +// Allows you to create history record for a manual journal
    +[apiInstance createManualJournalHistoryRecordWith:xeroTenantId
    +    manualJournalID:manualJournalID
    +    historyRecords:historyRecords
    +              completionHandler: ^(HistoryRecords output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    const tokenSet: TokenSet =  {
    +  id_token: 'xxx',
    +  access_token: 'yyy',
    +  expires_at: 1582308862,
    +  token_type: 'Bearer',
    +  refresh_token: 'zzz',
    +  session_state: 'xxx'
    +}
    +await xero.setTokenSet(tokenSet);
    +const historyRecords: HistoryRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] };  // {HistoryRecords} 
    +const xeroTenantId = "YOUR_XERO_TENANT_ID";  // {String} Xero identifier for Tenant
    +const manualJournalID = "00000000-0000-0000-000-000000000000";  // {UUID} Xero generated unique identifier for a manual journal
    +
    +
    +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 .Api;
    +using .Client;
    +using .Model;
    +
    +namespace Example
    +{
    +    public class createManualJournalHistoryRecordExample
    +    {
    +        public void main()
    +        {
    +            
    +            // Configure OAuth2 access token for authorization: OAuth2
    +            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    +
    +            var apiInstance = new AccountingApi();
    +            var xeroTenantId = YOUR_XERO_TENANT_ID;  // String | Xero identifier for Tenant (default to null)
    +            var manualJournalID = new UUID(); // UUID | Xero generated unique identifier for a manual journal (default to null)
    +            var historyRecords = new HistoryRecords(); // HistoryRecords | 
    +
    +            try
    +            {
    +                // Allows you to create history record for a manual journal
    +                HistoryRecords result = apiInstance.createManualJournalHistoryRecord(xeroTenantId, manualJournalID, historyRecords);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling AccountingApi.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' );	
    +$config->setHost("https://api.xero.com/api.xro/2.0");        
    +
    +$xeroTenantId =  'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
    +
    +$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
    +    new GuzzleHttp\Client(),
    +    $config
    +);
    +
    +try { 
    +} 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-000-000000000000; # UUID | Xero generated unique identifier for a manual journal
    +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";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import 
    +from .rest import ApiException
    +from pprint import pprint
    +
    +# Configure OAuth2 access token for authorization: OAuth2
    +.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    +
    +# create an instance of the API class
    +api_instance = .AccountingApi()
    +xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null)
    +manualJournalID = 00000000-0000-0000-000-000000000000 # UUID | Xero generated unique identifier for a manual journal (default to null)
    +historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] } # HistoryRecords | 
    +
    +try: 
    +    # Allows you to create history record for a manual journal
    +    api_response = api_instance.create_manual_journal_history_record(xeroTenantId, manualJournalID, historyRecords)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling AccountingApi->createManualJournalHistoryRecord: %s\n" % e)
    +
    + +
    +
    extern crate AccountingApi;
    +
    +pub fn main() {
    +    let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    +    let manualJournalID = 00000000-0000-0000-000-000000000000; // UUID
    +    let historyRecords = { "HistoryRecords": [ { "Details": "Hello World" } ] }; // HistoryRecords
    +
    +    let mut context = AccountingApi::Context::default();
    +    let result = client.createManualJournalHistoryRecord(xeroTenantId, manualJournalID, historyRecords, &context).wait();
    +    println!("{:?}", result);
    +
    +}
    +
    +
    +
    + +

    Scopes

    + + + + + + + +
    accounting.transactionsGrant read-write access to bank transactions, credit notes, invoices, repeating invoices
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    ManualJournalID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Xero generated unique identifier for a manual journal +
    +
    +
    + Required +
    +
    +
    +
    + +
    Header parameters
    + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    + +
    Body parameters
    + + + + + + + + + +
    NameDescription
    historyRecords * +
    +
    + + HistoryRecords + + +
    +HistoryRecords containing an array of HistoryRecord objects in body of request +
    +
    +
    + Required +
    +
    + + +
    +
    + + + +
    +
    +
    @@ -69816,6 +70375,423 @@


    +
    +
    +
    +

    getManualJournalsHistory

    +

    Allows you to retrieve history from a 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.*;
    +import org.openapitools.client.auth.*;
    +import org.openapitools.client.model.*;
    +import org.openapitools.client.api.AccountingApi;
    +
    +import java.io.File;
    +import java.util.*;
    +
    +public class AccountingApiExample {
    +
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +        
    +        // Configure OAuth2 access token for authorization: OAuth2
    +        OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
    +        OAuth2.setAccessToken("YOUR ACCESS TOKEN");
    +
    +        AccountingApi apiInstance = new AccountingApi();
    +        String xeroTenantId = YOUR_XERO_TENANT_ID; // String | Xero identifier for Tenant
    +        UUID manualJournalID = 00000000-0000-0000-000-000000000000; // UUID | Xero generated unique identifier for a manual journal
    +        try {
    +            HistoryRecords result = apiInstance.getManualJournalsHistory(xeroTenantId, manualJournalID);
    +            System.out.println(result);
    +        } catch (ApiException 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-000-000000000000; // UUID | Xero generated unique identifier for a manual journal
    +        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-000-000000000000; // Xero generated unique identifier for a manual journal (default to null)
    +
    +AccountingApi *apiInstance = [[AccountingApi alloc] init];
    +
    +// Allows you to retrieve history from a manual journal
    +[apiInstance getManualJournalsHistoryWith:xeroTenantId
    +    manualJournalID:manualJournalID
    +              completionHandler: ^(HistoryRecords output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    + +
    +
    const tokenSet: TokenSet =  {
    +  id_token: 'xxx',
    +  access_token: 'yyy',
    +  expires_at: 1582308862,
    +  token_type: 'Bearer',
    +  refresh_token: 'zzz',
    +  session_state: 'xxx'
    +}
    +await xero.setTokenSet(tokenSet);
    +
    +const xeroTenantId = "YOUR_XERO_TENANT_ID";  // {String} Xero identifier for Tenant
    +const manualJournalID = "00000000-0000-0000-000-000000000000";  // {UUID} Xero generated unique identifier for a manual journal
    +
    +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 .Api;
    +using .Client;
    +using .Model;
    +
    +namespace Example
    +{
    +    public class getManualJournalsHistoryExample
    +    {
    +        public void main()
    +        {
    +            
    +            // Configure OAuth2 access token for authorization: OAuth2
    +            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    +
    +            var apiInstance = new AccountingApi();
    +            var xeroTenantId = YOUR_XERO_TENANT_ID;  // String | Xero identifier for Tenant (default to null)
    +            var manualJournalID = new UUID(); // UUID | Xero generated unique identifier for a manual journal (default to null)
    +
    +            try
    +            {
    +                // Allows you to retrieve history from a manual journal
    +                HistoryRecords result = apiInstance.getManualJournalsHistory(xeroTenantId, manualJournalID);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling AccountingApi.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' );	
    +$config->setHost("https://api.xero.com/api.xro/2.0");        
    +
    +$xeroTenantId =  'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant
    +
    +$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
    +    new GuzzleHttp\Client(),
    +    $config
    +);
    +
    +try { 
    +} 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-000-000000000000; # UUID | Xero generated unique identifier for a manual journal
    +
    +eval { 
    +    my $result = $api_instance->getManualJournalsHistory(xeroTenantId => $xeroTenantId, manualJournalID => $manualJournalID);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling AccountingApi->getManualJournalsHistory: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import 
    +from .rest import ApiException
    +from pprint import pprint
    +
    +# Configure OAuth2 access token for authorization: OAuth2
    +.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    +
    +# create an instance of the API class
    +api_instance = .AccountingApi()
    +xeroTenantId = YOUR_XERO_TENANT_ID # String | Xero identifier for Tenant (default to null)
    +manualJournalID = 00000000-0000-0000-000-000000000000 # UUID | Xero generated unique identifier for a manual journal (default to null)
    +
    +try: 
    +    # Allows you to retrieve history from a manual journal
    +    api_response = api_instance.get_manual_journals_history(xeroTenantId, manualJournalID)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling AccountingApi->getManualJournalsHistory: %s\n" % e)
    +
    + +
    +
    extern crate AccountingApi;
    +
    +pub fn main() {
    +    let xeroTenantId = YOUR_XERO_TENANT_ID; // String
    +    let manualJournalID = 00000000-0000-0000-000-000000000000; // UUID
    +
    +    let mut context = AccountingApi::Context::default();
    +    let result = client.getManualJournalsHistory(xeroTenantId, manualJournalID, &context).wait();
    +    println!("{:?}", result);
    +
    +}
    +
    +
    +
    + +

    Scopes

    + + + + + + + +
    accounting.transactions.readGrant read-only access to invoices
    + +

    Parameters

    + +
    Path parameters
    + + + + + + + + + +
    NameDescription
    ManualJournalID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Xero generated unique identifier for a manual journal +
    +
    +
    + Required +
    +
    +
    +
    + +
    Header parameters
    + + + + + + + + + +
    NameDescription
    xero-tenant-id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    + + + + +
    +
    +
    diff --git a/docs/v4/assets/index.html b/docs/v4/assets/index.html index 957289c60..127059e93 100644 --- a/docs/v4/assets/index.html +++ b/docs/v4/assets/index.html @@ -1309,7 +1309,7 @@

    Xero Assets API

    API and SDK Documentation

    Version: 1.0.0
    -
    +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - + - + - + - + - -
  • - getStatutoryDeductions -
  • -
  • - getSuperannuation -
  • -
  • - getSuperannuations -
  • approveTimesheet @@ -3814,6 +3884,15 @@
  • getStatutoryDeduction
  • +
  • + getStatutoryDeductions +
  • +
  • + getSuperannuation +
  • +
  • + getSuperannuations +
  • getTimesheet
  • @@ -3865,7 +3944,7 @@

    Xero Payroll NZ

    API and SDK Documentation

    Version: 1.0.0
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/StatutoryDeductions?page=56"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Timesheets/{TimesheetID}/Approve"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    -import org.openapitools.client.api.PayrollNZApi;
    +import org.openapitools.client.api.PayrollNzApi;
     
     import java.io.File;
     import java.util.*;
     
    -public class PayrollNZApiExample {
    +public class PayrollNzApiExample {
     
         public static void main(String[] args) {
             ApiClient defaultClient = Configuration.getDefaultApiClient();
    @@ -3929,58 +4008,58 @@ 

    Usage and SDK Samples

    OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); OAuth2.setAccessToken("YOUR ACCESS TOKEN"); - PayrollNZApi apiInstance = new PayrollNZApi(); + PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet try { - StatutoryDeductions result = apiInstance.getStatutoryDeductions(xeroTenantId, page); + TimesheetObject result = apiInstance.approveTimesheet(xeroTenantId, timesheetID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNZApi#getStatutoryDeductions"); + System.err.println("Exception when calling PayrollNzApi#approveTimesheet"); e.printStackTrace(); } } }
    -
    -
    import org.openapitools.client.api.PayrollNZApi;
    +                          
    +
    import org.openapitools.client.api.PayrollNzApi;
     
    -public class PayrollNZApiExample {
    +public class PayrollNzApiExample {
     
         public static void main(String[] args) {
    -        PayrollNZApi apiInstance = new PayrollNZApi();
    +        PayrollNzApi apiInstance = new PayrollNzApi();
             String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
    -        Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
    +        UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet
             try {
    -            StatutoryDeductions result = apiInstance.getStatutoryDeductions(xeroTenantId, page);
    +            TimesheetObject result = apiInstance.approveTimesheet(xeroTenantId, timesheetID);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling PayrollNZApi#getStatutoryDeductions");
    +            System.err.println("Exception when calling PayrollNzApi#approveTimesheet");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
    +UUID *timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet (default to null)
     
    -PayrollNZApi *apiInstance = [[PayrollNZApi alloc] init];
    +PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// searches statutory deductions
    -[apiInstance getStatutoryDeductionsWith:xeroTenantId
    -    page:page
    -              completionHandler: ^(StatutoryDeductions output, NSError* error) {
    +// approve a timesheet
    +[apiInstance approveTimesheetWith:xeroTenantId
    +    timesheetID:timesheetID
    +              completionHandler: ^(TimesheetObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -3991,7 +4070,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -4001,42 +4080,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - + const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +const timesheetID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet try { - const response: any = await xero.accountingApi.getStatutoryDeductions(xeroTenantId, page); + const response = await xero.accountingApi.approveTimesheet(xeroTenantId, timesheetID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -4045,7 +4106,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getStatutoryDeductionsExample + public class approveTimesheetExample { public void main() { @@ -4053,19 +4114,19 @@

    Usage and SDK Samples

    // Configure OAuth2 access token for authorization: OAuth2 Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PayrollNZApi(); + var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) + var timesheetID = new UUID(); // UUID | Identifier for the timesheet (default to null) try { - // searches statutory deductions - StatutoryDeductions result = apiInstance.getStatutoryDeductions(xeroTenantId, page); + // approve a timesheet + TimesheetObject result = apiInstance.approveTimesheet(xeroTenantId, timesheetID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNZApi.getStatutoryDeductions: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.approveTimesheet: " + e.Message ); } } } @@ -4073,7 +4134,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -4084,40 +4145,40 @@ 

    Usage and SDK Samples

    $xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant -$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNZApi( +$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi( new GuzzleHttp\Client(), $config ); try { } catch (Exception $e) { - echo 'Exception when calling PayrollNZApi->getStatutoryDeductions: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->approveTimesheet: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
    -use ::PayrollNZApi;
    +use ::PayrollNzApi;
     
     # Configure OAuth2 access token for authorization: OAuth2
     $::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
     
    -my $api_instance = ::PayrollNZApi->new();
    +my $api_instance = ::PayrollNzApi->new();
     my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
    -my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
    +my $timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet
     
     eval { 
    -    my $result = $api_instance->getStatutoryDeductions(xeroTenantId => $xeroTenantId, page => $page);
    +    my $result = $api_instance->approveTimesheet(xeroTenantId => $xeroTenantId, timesheetID => $timesheetID);
         print Dumper($result);
     };
     if ($@) {
    -    warn "Exception when calling PayrollNZApi->getStatutoryDeductions: $@\n";
    +    warn "Exception when calling PayrollNzApi->approveTimesheet: $@\n";
     }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -4128,27 +4189,27 @@ 

    Usage and SDK Samples

    .configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class -api_instance = .PayrollNZApi() +api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) +timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet (default to null) try: - # searches statutory deductions - api_response = api_instance.get_statutory_deductions(xeroTenantId, page=page) + # approve a timesheet + api_response = api_instance.approve_timesheet(xeroTenantId, timesheetID) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNZApi->getStatutoryDeductions: %s\n" % e)
    + print("Exception when calling PayrollNzApi->approveTimesheet: %s\n" % e)
    -
    -
    extern crate PayrollNZApi;
    +                            
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let page = 56; // Integer
    +    let timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
     
    -    let mut context = PayrollNZApi::Context::default();
    -    let result = client.getStatutoryDeductions(xeroTenantId, page, &context).wait();
    +    let mut context = PayrollNzApi::Context::default();
    +    let result = client.approveTimesheet(xeroTenantId, timesheetID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -4160,39 +4221,36 @@ 

    Scopes

    - - - - - - - + +
    payroll.settings.readGrant read-only access to payroll settings
    payroll.settingsGrant read-write access to payroll settingspayroll.timesheetsGrant read-write access to payroll timesheets

    Parameters

    - -
    Header parameters
    +
    Path parameters
    - - - - - + + + + +
    NameDescription
    Xero-Tenant-Id*
    NameDescription
    TimesheetID* -
    +
    - String + UUID + + (uuid) +
    -Xero identifier for Tenant +Identifier for the timesheet
    @@ -4205,58 +4263,62 @@

    Parameters

    - - -
    Query parameters
    +
    Header parameters
    - +
    Name Description
    page
    Xero-Tenant-Id* -
    +
    - Integer + String
    -Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +Xero identifier for Tenant
    +
    + Required +
    + + + - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/superannuations/{SuperannuationID}"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Deductions"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    -import org.openapitools.client.api.PayrollNZApi;
    +import org.openapitools.client.api.PayrollNzApi;
     
     import java.io.File;
     import java.util.*;
     
    -public class PayrollNZApiExample {
    +public class PayrollNzApiExample {
     
         public static void main(String[] args) {
             ApiClient defaultClient = Configuration.getDefaultApiClient();
    @@ -4363,58 +4494,58 @@ 

    Usage and SDK Samples

    OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); OAuth2.setAccessToken("YOUR ACCESS TOKEN"); - PayrollNZApi apiInstance = new PayrollNZApi(); + PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the superannuation + Deduction deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" }; // Deduction | try { - SuperannuationObject result = apiInstance.getSuperannuation(xeroTenantId, superannuationID); + DeductionObject result = apiInstance.createDeduction(xeroTenantId, deduction); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNZApi#getSuperannuation"); + System.err.println("Exception when calling PayrollNzApi#createDeduction"); e.printStackTrace(); } } }
    -
    -
    import org.openapitools.client.api.PayrollNZApi;
    +                          
    +
    import org.openapitools.client.api.PayrollNzApi;
     
    -public class PayrollNZApiExample {
    +public class PayrollNzApiExample {
     
         public static void main(String[] args) {
    -        PayrollNZApi apiInstance = new PayrollNZApi();
    +        PayrollNzApi apiInstance = new PayrollNzApi();
             String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
    -        UUID superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the superannuation
    +        Deduction deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" }; // Deduction | 
             try {
    -            SuperannuationObject result = apiInstance.getSuperannuation(xeroTenantId, superannuationID);
    +            DeductionObject result = apiInstance.createDeduction(xeroTenantId, deduction);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling PayrollNZApi#getSuperannuation");
    +            System.err.println("Exception when calling PayrollNzApi#createDeduction");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the superannuation (default to null)
    +Deduction *deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" }; // 
     
    -PayrollNZApi *apiInstance = [[PayrollNZApi alloc] init];
    +PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// searches for a unique superannuation
    -[apiInstance getSuperannuationWith:xeroTenantId
    -    superannuationID:superannuationID
    -              completionHandler: ^(SuperannuationObject output, NSError* error) {
    +// create a new deduction
    +[apiInstance createDeductionWith:xeroTenantId
    +    deduction:deduction
    +              completionHandler: ^(DeductionObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -4425,7 +4556,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -4435,41 +4566,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const superannuationID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the superannuation +const deduction: Deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" }; // {Deduction} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + + try { - const response: any = await xero.accountingApi.getSuperannuation(xeroTenantId, superannuationID); + const response = await xero.accountingApi.createDeduction(xeroTenantId, deduction); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -4478,7 +4592,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getSuperannuationExample + public class createDeductionExample { public void main() { @@ -4486,19 +4600,19 @@

    Usage and SDK Samples

    // Configure OAuth2 access token for authorization: OAuth2 Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PayrollNZApi(); + var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var superannuationID = new UUID(); // UUID | Identifier for the superannuation (default to null) + var deduction = new Deduction(); // Deduction | try { - // searches for a unique superannuation - SuperannuationObject result = apiInstance.getSuperannuation(xeroTenantId, superannuationID); + // create a new deduction + DeductionObject result = apiInstance.createDeduction(xeroTenantId, deduction); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNZApi.getSuperannuation: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createDeduction: " + e.Message ); } } } @@ -4506,7 +4620,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -4517,40 +4631,40 @@ 

    Usage and SDK Samples

    $xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant -$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNZApi( +$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi( new GuzzleHttp\Client(), $config ); try { } catch (Exception $e) { - echo 'Exception when calling PayrollNZApi->getSuperannuation: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createDeduction: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
    -use ::PayrollNZApi;
    +use ::PayrollNzApi;
     
     # Configure OAuth2 access token for authorization: OAuth2
     $::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
     
    -my $api_instance = ::PayrollNZApi->new();
    +my $api_instance = ::PayrollNzApi->new();
     my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
    -my $superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the superannuation
    +my $deduction = ::Object::Deduction->new(); # Deduction | 
     
     eval { 
    -    my $result = $api_instance->getSuperannuation(xeroTenantId => $xeroTenantId, superannuationID => $superannuationID);
    +    my $result = $api_instance->createDeduction(xeroTenantId => $xeroTenantId, deduction => $deduction);
         print Dumper($result);
     };
     if ($@) {
    -    warn "Exception when calling PayrollNZApi->getSuperannuation: $@\n";
    +    warn "Exception when calling PayrollNzApi->createDeduction: $@\n";
     }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -4561,27 +4675,27 @@ 

    Usage and SDK Samples

    .configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class -api_instance = .PayrollNZApi() +api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the superannuation (default to null) +deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" } # Deduction | try: - # searches for a unique superannuation - api_response = api_instance.get_superannuation(xeroTenantId, superannuationID) + # create a new deduction + api_response = api_instance.create_deduction(xeroTenantId, deduction) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNZApi->getSuperannuation: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createDeduction: %s\n" % e)
    -
    -
    extern crate PayrollNZApi;
    +                            
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    +    let deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" }; // Deduction
     
    -    let mut context = PayrollNZApi::Context::default();
    -    let result = client.getSuperannuation(xeroTenantId, superannuationID, &context).wait();
    +    let mut context = PayrollNzApi::Context::default();
    +    let result = client.createDeduction(xeroTenantId, deduction, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -4592,11 +4706,6 @@ 

    Usage and SDK Samples

    Scopes

    - - - - - @@ -4606,28 +4715,26 @@

    Scopes

    Parameters

    -
    Path parameters
    + +
    Header parameters
    payroll.settings.readGrant read-only access to payroll settings
    payroll.settings Grant read-write access to payroll settings
    - - - - - + + + + +
    NameDescription
    SuperannuationID*
    NameDescription
    Xero-Tenant-Id* -
    +
    - UUID + String - - (uuid) -
    -Identifier for the superannuation +Xero identifier for Tenant
    @@ -4640,62 +4747,88 @@

    Parameters

    -
    Header parameters
    +
    Body parameters
    - +
    Name Description
    Xero-Tenant-Id*
    deduction * - - -
    -
    +
    - String + Deduction
    -Xero identifier for Tenant +
    Required
    -
    + + +
    - - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/superannuations?page=56"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/EarningsRates"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    -import org.openapitools.client.api.PayrollNZApi;
    +import org.openapitools.client.api.PayrollNzApi;
     
     import java.io.File;
     import java.util.*;
     
    -public class PayrollNZApiExample {
    +public class PayrollNzApiExample {
     
         public static void main(String[] args) {
             ApiClient defaultClient = Configuration.getDefaultApiClient();
    @@ -4802,58 +5004,58 @@ 

    Usage and SDK Samples

    OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); OAuth2.setAccessToken("YOUR ACCESS TOKEN"); - PayrollNZApi apiInstance = new PayrollNZApi(); + PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + EarningsRate earningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" }; // EarningsRate | try { - Superannuations result = apiInstance.getSuperannuations(xeroTenantId, page); + EarningsRateObject result = apiInstance.createEarningsRate(xeroTenantId, earningsRate); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNZApi#getSuperannuations"); + System.err.println("Exception when calling PayrollNzApi#createEarningsRate"); e.printStackTrace(); } } }
    -
    -
    import org.openapitools.client.api.PayrollNZApi;
    +                          
    +
    import org.openapitools.client.api.PayrollNzApi;
     
    -public class PayrollNZApiExample {
    +public class PayrollNzApiExample {
     
         public static void main(String[] args) {
    -        PayrollNZApi apiInstance = new PayrollNZApi();
    +        PayrollNzApi apiInstance = new PayrollNzApi();
             String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant
    -        Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
    +        EarningsRate earningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" }; // EarningsRate | 
             try {
    -            Superannuations result = apiInstance.getSuperannuations(xeroTenantId, page);
    +            EarningsRateObject result = apiInstance.createEarningsRate(xeroTenantId, earningsRate);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling PayrollNZApi#getSuperannuations");
    +            System.err.println("Exception when calling PayrollNzApi#createEarningsRate");
                 e.printStackTrace();
             }
         }
     }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
    +EarningsRate *earningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" }; // 
     
    -PayrollNZApi *apiInstance = [[PayrollNZApi alloc] init];
    +PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// searches statutory deductions
    -[apiInstance getSuperannuationsWith:xeroTenantId
    -    page:page
    -              completionHandler: ^(Superannuations output, NSError* error) {
    +// create a new earnings rate
    +[apiInstance createEarningsRateWith:xeroTenantId
    +    earningsRate:earningsRate
    +              completionHandler: ^(EarningsRateObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -4864,7 +5066,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -4874,42 +5076,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - +const earningsRate: EarningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" }; // {EarningsRate} const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + try { - const response: any = await xero.accountingApi.getSuperannuations(xeroTenantId, page); + const response = await xero.accountingApi.createEarningsRate(xeroTenantId, earningsRate); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -4918,7 +5102,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getSuperannuationsExample + public class createEarningsRateExample { public void main() { @@ -4926,19 +5110,19 @@

    Usage and SDK Samples

    // Configure OAuth2 access token for authorization: OAuth2 Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PayrollNZApi(); + var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) + var earningsRate = new EarningsRate(); // EarningsRate | try { - // searches statutory deductions - Superannuations result = apiInstance.getSuperannuations(xeroTenantId, page); + // create a new earnings rate + EarningsRateObject result = apiInstance.createEarningsRate(xeroTenantId, earningsRate); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNZApi.getSuperannuations: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createEarningsRate: " + e.Message ); } } } @@ -4946,7 +5130,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -4957,40 +5141,40 @@ 

    Usage and SDK Samples

    $xeroTenantId = 'YOUR_XERO_TENANT_ID'; // String | Xero identifier for Tenant -$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNZApi( +$apiInstance = new XeroAPI\XeroPHP\Api\PayrollNzApi( new GuzzleHttp\Client(), $config ); try { } catch (Exception $e) { - echo 'Exception when calling PayrollNZApi->getSuperannuations: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createEarningsRate: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
    -use ::PayrollNZApi;
    +use ::PayrollNzApi;
     
     # Configure OAuth2 access token for authorization: OAuth2
     $::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
     
    -my $api_instance = ::PayrollNZApi->new();
    +my $api_instance = ::PayrollNzApi->new();
     my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant
    -my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
    +my $earningsRate = ::Object::EarningsRate->new(); # EarningsRate | 
     
     eval { 
    -    my $result = $api_instance->getSuperannuations(xeroTenantId => $xeroTenantId, page => $page);
    +    my $result = $api_instance->createEarningsRate(xeroTenantId => $xeroTenantId, earningsRate => $earningsRate);
         print Dumper($result);
     };
     if ($@) {
    -    warn "Exception when calling PayrollNZApi->getSuperannuations: $@\n";
    +    warn "Exception when calling PayrollNzApi->createEarningsRate: $@\n";
     }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -5001,27 +5185,27 @@ 

    Usage and SDK Samples

    .configuration.access_token = 'YOUR_ACCESS_TOKEN' # create an instance of the API class -api_instance = .PayrollNZApi() +api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) +earningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" } # EarningsRate | try: - # searches statutory deductions - api_response = api_instance.get_superannuations(xeroTenantId, page=page) + # create a new earnings rate + api_response = api_instance.create_earnings_rate(xeroTenantId, earningsRate) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNZApi->getSuperannuations: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createEarningsRate: %s\n" % e)
    -
    -
    extern crate PayrollNZApi;
    +                            
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let page = 56; // Integer
    +    let earningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" }; // EarningsRate
     
    -    let mut context = PayrollNZApi::Context::default();
    -    let result = client.getSuperannuations(xeroTenantId, page, &context).wait();
    +    let mut context = PayrollNzApi::Context::default();
    +    let result = client.createEarningsRate(xeroTenantId, earningsRate, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -5032,11 +5216,6 @@ 

    Usage and SDK Samples

    Scopes

    - - - - - @@ -5057,7 +5236,7 @@

    Parameters

    payroll.settings.readGrant read-only access to payroll settings
    payroll.settings Grant read-write access to payroll settings -
    +
    @@ -5078,58 +5257,88 @@

    Parameters

    - - -
    Query parameters
    +
    Body parameters
    - +
    Name Description
    page
    earningsRate * - - -
    -
    +
    - Integer + EarningsRate
    -Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +
    +
    + Required +
    -
    + + +
    + + - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Timesheets/{TimesheetID}/Approve"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -5241,19 +5516,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet + Employee employee = { "title": "Mr", "firstName": "Mike", "lastName": "Johntzxzpxhmkgson", "dateOfBirth": "2000-01-01", "address": { "addressLine1": "101 Green St", "city": "San Francisco", "postCode": "4351", "countryName": "United Kingdom" }, "email": "83139@starkindustries.com", "gender": "M" }; // Employee | try { - TimesheetObject result = apiInstance.approveTimesheet(xeroTenantId, timesheetID); + EmployeeObject result = apiInstance.createEmployee(xeroTenantId, employee); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#approveTimesheet"); + System.err.println("Exception when calling PayrollNzApi#createEmployee"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -5261,36 +5536,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet + Employee employee = { "title": "Mr", "firstName": "Mike", "lastName": "Johntzxzpxhmkgson", "dateOfBirth": "2000-01-01", "address": { "addressLine1": "101 Green St", "city": "San Francisco", "postCode": "4351", "countryName": "United Kingdom" }, "email": "83139@starkindustries.com", "gender": "M" }; // Employee | try { - TimesheetObject result = apiInstance.approveTimesheet(xeroTenantId, timesheetID); + EmployeeObject result = apiInstance.createEmployee(xeroTenantId, employee); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#approveTimesheet"); + System.err.println("Exception when calling PayrollNzApi#createEmployee"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet (default to null)
    +Employee *employee = { "title": "Mr", "firstName": "Mike", "lastName": "Johntzxzpxhmkgson", "dateOfBirth": "2000-01-01", "address": { "addressLine1": "101 Green St", "city": "San Francisco", "postCode": "4351", "countryName": "United Kingdom" }, "email": "83139@starkindustries.com", "gender": "M" }; // 
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// approve a timesheet
    -[apiInstance approveTimesheetWith:xeroTenantId
    -    timesheetID:timesheetID
    -              completionHandler: ^(TimesheetObject output, NSError* error) {
    +// creates employees
    +[apiInstance createEmployeeWith:xeroTenantId
    +    employee:employee
    +              completionHandler: ^(EmployeeObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -5301,7 +5576,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -5311,41 +5586,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const timesheetID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet +const employee: Employee = { "title": "Mr", "firstName": "Mike", "lastName": "Johntzxzpxhmkgson", "dateOfBirth": "2000-01-01", "address": { "addressLine1": "101 Green St", "city": "San Francisco", "postCode": "4351", "countryName": "United Kingdom" }, "email": "83139@starkindustries.com", "gender": "M" }; // {Employee} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + + try { - const response: any = await xero.accountingApi.approveTimesheet(xeroTenantId, timesheetID); + const response = await xero.accountingApi.createEmployee(xeroTenantId, employee); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -5354,7 +5612,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class approveTimesheetExample + public class createEmployeeExample { public void main() { @@ -5364,17 +5622,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var timesheetID = new UUID(); // UUID | Identifier for the timesheet (default to null) + var employee = new Employee(); // Employee | try { - // approve a timesheet - TimesheetObject result = apiInstance.approveTimesheet(xeroTenantId, timesheetID); + // creates employees + EmployeeObject result = apiInstance.createEmployee(xeroTenantId, employee); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.approveTimesheet: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createEmployee: " + e.Message ); } } } @@ -5382,7 +5640,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -5400,12 +5658,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->approveTimesheet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createEmployee: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -5415,18 +5673,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet +my $employee = ::Object::Employee->new(); # Employee | eval { - my $result = $api_instance->approveTimesheet(xeroTenantId => $xeroTenantId, timesheetID => $timesheetID); + my $result = $api_instance->createEmployee(xeroTenantId => $xeroTenantId, employee => $employee); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->approveTimesheet: $@\n"; + warn "Exception when calling PayrollNzApi->createEmployee: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -5439,25 +5697,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet (default to null) +employee = { "title": "Mr", "firstName": "Mike", "lastName": "Johntzxzpxhmkgson", "dateOfBirth": "2000-01-01", "address": { "addressLine1": "101 Green St", "city": "San Francisco", "postCode": "4351", "countryName": "United Kingdom" }, "email": "83139@starkindustries.com", "gender": "M" } # Employee | try: - # approve a timesheet - api_response = api_instance.approve_timesheet(xeroTenantId, timesheetID) + # creates employees + api_response = api_instance.create_employee(xeroTenantId, employee) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->approveTimesheet: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createEmployee: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    +    let employee = { "title": "Mr", "firstName": "Mike", "lastName": "Johntzxzpxhmkgson", "dateOfBirth": "2000-01-01", "address": { "addressLine1": "101 Green St", "city": "San Francisco", "postCode": "4351", "countryName": "United Kingdom" }, "email": "83139@starkindustries.com", "gender": "M" }; // Employee
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.approveTimesheet(xeroTenantId, timesheetID, &context).wait();
    +    let result = client.createEmployee(xeroTenantId, employee, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -5469,36 +5727,34 @@ 

    Scopes

    - - + +
    payroll.timesheetsGrant read-write access to payroll timesheetspayroll.employeesGrant read-write access to payroll employees

    Parameters

    -
    Path parameters
    + +
    Header parameters
    - - - - - + + + + +
    NameDescription
    TimesheetID*
    NameDescription
    Xero-Tenant-Id* -
    +
    - UUID + String - - (uuid) -
    -Identifier for the timesheet +Xero identifier for Tenant
    @@ -5511,62 +5767,88 @@

    Parameters

    -
    Header parameters
    +
    Body parameters
    - + - - -
    Name Description
    Xero-Tenant-Id*
    employee * - - -
    -
    +
    - String + Employee
    -Xero identifier for Tenant +
    Required
    -
    -
    - - - - + +
    + + + + + + + - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Deductions"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/PayTemplates/earnings"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -5744,19 +6026,20 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Deduction deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" }; // Deduction | + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + EarningsTemplate earningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" }; // EarningsTemplate | try { - DeductionObject result = apiInstance.createDeduction(xeroTenantId, deduction); + EarningsTemplateObject result = apiInstance.createEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createDeduction"); + System.err.println("Exception when calling PayrollNzApi#createEmployeeEarningsTemplate"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -5764,36 +6047,39 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Deduction deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" }; // Deduction | + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + EarningsTemplate earningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" }; // EarningsTemplate | try { - DeductionObject result = apiInstance.createDeduction(xeroTenantId, deduction); + EarningsTemplateObject result = apiInstance.createEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createDeduction"); + System.err.println("Exception when calling PayrollNzApi#createEmployeeEarningsTemplate"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -Deduction *deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" }; // 
    +UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
    +EarningsTemplate *earningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" }; // 
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// create a new deduction
    -[apiInstance createDeductionWith:xeroTenantId
    -    deduction:deduction
    -              completionHandler: ^(DeductionObject output, NSError* error) {
    +// creates employee earnings template records
    +[apiInstance createEmployeeEarningsTemplateWith:xeroTenantId
    +    employeeId:employeeId
    +    earningsTemplate:earningsTemplate
    +              completionHandler: ^(EarningsTemplateObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -5804,7 +6090,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -5814,41 +6100,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const deduction:Deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" }; // {Deduction} +const earningsTemplate: EarningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" }; // {EarningsTemplate} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + + try { - const response: any = await xero.accountingApi.createDeduction(xeroTenantId, deduction); + const response = await xero.accountingApi.createEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -5857,7 +6127,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createDeductionExample + public class createEmployeeEarningsTemplateExample { public void main() { @@ -5867,17 +6137,18 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var deduction = new Deduction(); // Deduction | + var employeeId = new UUID(); // UUID | Employee id for single object (default to null) + var earningsTemplate = new EarningsTemplate(); // EarningsTemplate | try { - // create a new deduction - DeductionObject result = apiInstance.createDeduction(xeroTenantId, deduction); + // creates employee earnings template records + EarningsTemplateObject result = apiInstance.createEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createDeduction: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createEmployeeEarningsTemplate: " + e.Message ); } } } @@ -5885,7 +6156,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -5903,12 +6174,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createDeduction: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createEmployeeEarningsTemplate: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -5918,18 +6189,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $deduction = ::Object::Deduction->new(); # Deduction | +my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object +my $earningsTemplate = ::Object::EarningsTemplate->new(); # EarningsTemplate | eval { - my $result = $api_instance->createDeduction(xeroTenantId => $xeroTenantId, deduction => $deduction); + my $result = $api_instance->createEmployeeEarningsTemplate(xeroTenantId => $xeroTenantId, employeeId => $employeeId, earningsTemplate => $earningsTemplate); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createDeduction: $@\n"; + warn "Exception when calling PayrollNzApi->createEmployeeEarningsTemplate: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -5942,25 +6214,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" } # Deduction | +employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) +earningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" } # EarningsTemplate | try: - # create a new deduction - api_response = api_instance.create_deduction(xeroTenantId, deduction) + # creates employee earnings template records + api_response = api_instance.create_employee_earnings_template(xeroTenantId, employeeId, earningsTemplate) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createDeduction: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createEmployeeEarningsTemplate: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let deduction = { "deductionName": "My new deducation", "deductionCategory": "NzOther", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3" }; // Deduction
    +    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    +    let earningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" }; // EarningsTemplate
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createDeduction(xeroTenantId, deduction, &context).wait();
    +    let result = client.createEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -5972,14 +6246,47 @@ 

    Scopes

    - - + +
    payroll.settingsGrant read-write access to payroll settingspayroll.employeesGrant read-write access to payroll employees

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    EmployeeId* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Employee id for single object +
    +
    +
    + Required +
    +
    +
    +
    Header parameters
    @@ -5991,7 +6298,7 @@

    Parameters

    - + @@ -6073,27 +6380,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/EarningsRates"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/Leave"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -6271,19 +6578,20 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - EarningsRate earningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" }; // EarningsRate | + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + EmployeeLeave employeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" }; // EmployeeLeave | try { - EarningsRateObject result = apiInstance.createEarningsRate(xeroTenantId, earningsRate); + EmployeeLeaveObject result = apiInstance.createEmployeeLeave(xeroTenantId, employeeId, employeeLeave); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEarningsRate"); + System.err.println("Exception when calling PayrollNzApi#createEmployeeLeave"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -6291,36 +6599,39 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - EarningsRate earningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" }; // EarningsRate | + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + EmployeeLeave employeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" }; // EmployeeLeave | try { - EarningsRateObject result = apiInstance.createEarningsRate(xeroTenantId, earningsRate); + EmployeeLeaveObject result = apiInstance.createEmployeeLeave(xeroTenantId, employeeId, employeeLeave); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEarningsRate"); + System.err.println("Exception when calling PayrollNzApi#createEmployeeLeave"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -EarningsRate *earningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" }; // 
    +UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
    +EmployeeLeave *employeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" }; // 
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// create a new earnings rate
    -[apiInstance createEarningsRateWith:xeroTenantId
    -    earningsRate:earningsRate
    -              completionHandler: ^(EarningsRateObject output, NSError* error) {
    +// creates employee leave records
    +[apiInstance createEmployeeLeaveWith:xeroTenantId
    +    employeeId:employeeId
    +    employeeLeave:employeeLeave
    +              completionHandler: ^(EmployeeLeaveObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -6331,7 +6642,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -6341,41 +6652,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const earningsRate:EarningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" }; // {EarningsRate} +const employeeLeave: EmployeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" }; // {EmployeeLeave} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + + try { - const response: any = await xero.accountingApi.createEarningsRate(xeroTenantId, earningsRate); + const response = await xero.accountingApi.createEmployeeLeave(xeroTenantId, employeeId, employeeLeave); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -6384,7 +6679,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createEarningsRateExample + public class createEmployeeLeaveExample { public void main() { @@ -6394,17 +6689,18 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var earningsRate = new EarningsRate(); // EarningsRate | + var employeeId = new UUID(); // UUID | Employee id for single object (default to null) + var employeeLeave = new EmployeeLeave(); // EmployeeLeave | try { - // create a new earnings rate - EarningsRateObject result = apiInstance.createEarningsRate(xeroTenantId, earningsRate); + // creates employee leave records + EmployeeLeaveObject result = apiInstance.createEmployeeLeave(xeroTenantId, employeeId, employeeLeave); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createEarningsRate: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createEmployeeLeave: " + e.Message ); } } } @@ -6412,7 +6708,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -6430,12 +6726,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createEarningsRate: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createEmployeeLeave: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -6445,18 +6741,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $earningsRate = ::Object::EarningsRate->new(); # EarningsRate | +my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object +my $employeeLeave = ::Object::EmployeeLeave->new(); # EmployeeLeave | eval { - my $result = $api_instance->createEarningsRate(xeroTenantId => $xeroTenantId, earningsRate => $earningsRate); + my $result = $api_instance->createEmployeeLeave(xeroTenantId => $xeroTenantId, employeeId => $employeeId, employeeLeave => $employeeLeave); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createEarningsRate: $@\n"; + warn "Exception when calling PayrollNzApi->createEmployeeLeave: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -6469,25 +6766,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -earningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" } # EarningsRate | +employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) +employeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" } # EmployeeLeave | try: - # create a new earnings rate - api_response = api_instance.create_earnings_rate(xeroTenantId, earningsRate) + # creates employee leave records + api_response = api_instance.create_employee_leave(xeroTenantId, employeeId, employeeLeave) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createEarningsRate: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createEmployeeLeave: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let earningsRate = { "name": "My Earnings Rate", "earningsType": "RegularEarnings", "rateType": "RatePerUnit", "typeOfUnits": "hours", "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e" }; // EarningsRate
    +    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    +    let employeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" }; // EmployeeLeave
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createEarningsRate(xeroTenantId, earningsRate, &context).wait();
    +    let result = client.createEmployeeLeave(xeroTenantId, employeeId, employeeLeave, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -6499,34 +6798,36 @@ 

    Scopes

    -
    +
    @@ -6018,12 +6325,12 @@

    Parameters

    Name Description
    deduction *
    earningsTemplate *
    - Deduction + EarningsTemplate
    @@ -6041,9 +6348,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/Deduction" + "$ref" : "#/components/schemas/EarningsTemplate" }, - "example" : "{ \"deductionName\": \"My new deducation\", \"deductionCategory\": \"NzOther\", \"liabilityAccountId\": \"568f2e9a-0870-46cc-8678-f83f132ed4e3\" }" + "example" : "{ \"ratePerUnit\": 20, \"numberOfUnits\": 8, \"earningsRateID\": \"f9d8f5b5-9049-47f4-8541-35e200f750a5\", \"name\": \"My New One\" }" } }, "required" : true @@ -6059,12 +6366,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_createDeduction_deduction'); + var result = $('#d2e199_createEmployeeEarningsTemplate_earningsTemplate'); result.empty(); result.append(view.render()); }); -
    +
    - - + +
    payroll.settingsGrant read-write access to payroll settingspayroll.employeesGrant read-write access to payroll employees

    Parameters

    - -
    Header parameters
    +
    Path parameters
    - - - - - + + + + +
    NameDescription
    Xero-Tenant-Id*
    NameDescription
    EmployeeId* -
    +
    - String + UUID + + (uuid) +
    -Xero identifier for Tenant +Employee id for single object
    @@ -6539,18 +6840,49 @@

    Parameters

    -
    Body parameters
    +
    Header parameters
    - + + + + +
    Name Description
    earningsRate *
    Xero-Tenant-Id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    + +
    Body parameters
    + + + + + + @@ -6600,27 +6932,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/leaveSetup"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -6798,19 +7130,20 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Employee employee = { "title": "Mr", "firstName": "Mike", "lastName": "Johntzxzpxhmkgson", "dateOfBirth": "2000-01-01", "address": { "addressLine1": "101 Green St", "city": "San Francisco", "postCode": "4351", "countryName": "United Kingdom" }, "email": "83139@starkindustries.com", "gender": "M" }; // Employee | + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + EmployeeLeaveSetup employeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 }; // EmployeeLeaveSetup | try { - EmployeeObject result = apiInstance.createEmployee(xeroTenantId, employee); + EmployeeLeaveSetupObject result = apiInstance.createEmployeeLeaveSetup(xeroTenantId, employeeId, employeeLeaveSetup); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployee"); + System.err.println("Exception when calling PayrollNzApi#createEmployeeLeaveSetup"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -6818,36 +7151,39 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Employee employee = { "title": "Mr", "firstName": "Mike", "lastName": "Johntzxzpxhmkgson", "dateOfBirth": "2000-01-01", "address": { "addressLine1": "101 Green St", "city": "San Francisco", "postCode": "4351", "countryName": "United Kingdom" }, "email": "83139@starkindustries.com", "gender": "M" }; // Employee | + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + EmployeeLeaveSetup employeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 }; // EmployeeLeaveSetup | try { - EmployeeObject result = apiInstance.createEmployee(xeroTenantId, employee); + EmployeeLeaveSetupObject result = apiInstance.createEmployeeLeaveSetup(xeroTenantId, employeeId, employeeLeaveSetup); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployee"); + System.err.println("Exception when calling PayrollNzApi#createEmployeeLeaveSetup"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -Employee *employee = { "title": "Mr", "firstName": "Mike", "lastName": "Johntzxzpxhmkgson", "dateOfBirth": "2000-01-01", "address": { "addressLine1": "101 Green St", "city": "San Francisco", "postCode": "4351", "countryName": "United Kingdom" }, "email": "83139@starkindustries.com", "gender": "M" }; // 
    +UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
    +EmployeeLeaveSetup *employeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 }; // 
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// creates employees
    -[apiInstance createEmployeeWith:xeroTenantId
    -    employee:employee
    -              completionHandler: ^(EmployeeObject output, NSError* error) {
    +// Allows you to set-up leave for a specific employee. This is required before viewing, configuring and requesting leave for an employee
    +[apiInstance createEmployeeLeaveSetupWith:xeroTenantId
    +    employeeId:employeeId
    +    employeeLeaveSetup:employeeLeaveSetup
    +              completionHandler: ^(EmployeeLeaveSetupObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -6858,7 +7194,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -6868,41 +7204,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const employee:Employee = { "title": "Mr", "firstName": "Mike", "lastName": "Johntzxzpxhmkgson", "dateOfBirth": "2000-01-01", "address": { "addressLine1": "101 Green St", "city": "San Francisco", "postCode": "4351", "countryName": "United Kingdom" }, "email": "83139@starkindustries.com", "gender": "M" }; // {Employee} +const employeeLeaveSetup: EmployeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 }; // {EmployeeLeaveSetup} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + + try { - const response: any = await xero.accountingApi.createEmployee(xeroTenantId, employee); + const response = await xero.accountingApi.createEmployeeLeaveSetup(xeroTenantId, employeeId, employeeLeaveSetup); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -6911,7 +7231,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createEmployeeExample + public class createEmployeeLeaveSetupExample { public void main() { @@ -6921,17 +7241,18 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var employee = new Employee(); // Employee | + var employeeId = new UUID(); // UUID | Employee id for single object (default to null) + var employeeLeaveSetup = new EmployeeLeaveSetup(); // EmployeeLeaveSetup | try { - // creates employees - EmployeeObject result = apiInstance.createEmployee(xeroTenantId, employee); + // Allows you to set-up leave for a specific employee. This is required before viewing, configuring and requesting leave for an employee + EmployeeLeaveSetupObject result = apiInstance.createEmployeeLeaveSetup(xeroTenantId, employeeId, employeeLeaveSetup); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createEmployee: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createEmployeeLeaveSetup: " + e.Message ); } } } @@ -6939,7 +7260,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -6957,12 +7278,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createEmployee: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createEmployeeLeaveSetup: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -6972,18 +7293,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $employee = ::Object::Employee->new(); # Employee | +my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object +my $employeeLeaveSetup = ::Object::EmployeeLeaveSetup->new(); # EmployeeLeaveSetup | eval { - my $result = $api_instance->createEmployee(xeroTenantId => $xeroTenantId, employee => $employee); + my $result = $api_instance->createEmployeeLeaveSetup(xeroTenantId => $xeroTenantId, employeeId => $employeeId, employeeLeaveSetup => $employeeLeaveSetup); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createEmployee: $@\n"; + warn "Exception when calling PayrollNzApi->createEmployeeLeaveSetup: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -6996,25 +7318,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -employee = { "title": "Mr", "firstName": "Mike", "lastName": "Johntzxzpxhmkgson", "dateOfBirth": "2000-01-01", "address": { "addressLine1": "101 Green St", "city": "San Francisco", "postCode": "4351", "countryName": "United Kingdom" }, "email": "83139@starkindustries.com", "gender": "M" } # Employee | +employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) +employeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 } # EmployeeLeaveSetup | try: - # creates employees - api_response = api_instance.create_employee(xeroTenantId, employee) + # Allows you to set-up leave for a specific employee. This is required before viewing, configuring and requesting leave for an employee + api_response = api_instance.create_employee_leave_setup(xeroTenantId, employeeId, employeeLeaveSetup) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createEmployee: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createEmployeeLeaveSetup: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let employee = { "title": "Mr", "firstName": "Mike", "lastName": "Johntzxzpxhmkgson", "dateOfBirth": "2000-01-01", "address": { "addressLine1": "101 Green St", "city": "San Francisco", "postCode": "4351", "countryName": "United Kingdom" }, "email": "83139@starkindustries.com", "gender": "M" }; // Employee
    +    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    +    let employeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 }; // EmployeeLeaveSetup
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createEmployee(xeroTenantId, employee, &context).wait();
    +    let result = client.createEmployeeLeaveSetup(xeroTenantId, employeeId, employeeLeaveSetup, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -7034,6 +7358,39 @@ 

    Scopes

    Parameters

    +
    Path parameters
    +
    NameDescription
    employeeLeave *
    - EarningsRate + EmployeeLeave
    @@ -6568,9 +6900,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/EarningsRate" + "$ref" : "#/components/schemas/EmployeeLeave" }, - "example" : "{ \"name\": \"My Earnings Rate\", \"earningsType\": \"RegularEarnings\", \"rateType\": \"RatePerUnit\", \"typeOfUnits\": \"hours\", \"expenseAccountID\": \"e4eb36f6-97e3-4427-a394-dd4e1b355c2e\" }" + "example" : "{ \"leaveTypeID\": \"b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4\", \"description\": \"Creating a Desription\", \"startDate\": \"2020-04-24\", \"endDate\": \"2020-04-26\" }" } }, "required" : true @@ -6586,12 +6918,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_createEarningsRate_earningsRate'); + var result = $('#d2e199_createEmployeeLeave_employeeLeave'); result.empty(); result.append(view.render()); }); -
    +
    + + + + + + + + +
    NameDescription
    EmployeeId* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Employee id for single object +
    +
    +
    + Required +
    +
    +
    +
    Header parameters
    @@ -7045,7 +7402,7 @@

    Parameters

    - + @@ -7127,27 +7484,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/PayTemplates/earnings"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/LeaveTypes"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -7326,19 +7683,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - EarningsTemplate earningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" }; // EarningsTemplate | + EmployeeLeaveType employeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 }; // EmployeeLeaveType | try { - EarningsTemplateObject result = apiInstance.createEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate); + EmployeeLeaveTypeObject result = apiInstance.createEmployeeLeaveType(xeroTenantId, employeeId, employeeLeaveType); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployeeEarningsTemplate"); + System.err.println("Exception when calling PayrollNzApi#createEmployeeLeaveType"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -7347,22 +7704,22 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - EarningsTemplate earningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" }; // EarningsTemplate | + EmployeeLeaveType employeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 }; // EmployeeLeaveType | try { - EarningsTemplateObject result = apiInstance.createEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate); + EmployeeLeaveTypeObject result = apiInstance.createEmployeeLeaveType(xeroTenantId, employeeId, employeeLeaveType); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployeeEarningsTemplate"); + System.err.println("Exception when calling PayrollNzApi#createEmployeeLeaveType"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -7370,15 +7727,15 @@ 

    Usage and SDK Samples

    String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null) UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null) -EarningsTemplate *earningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" }; // +EmployeeLeaveType *employeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 }; // PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init]; -// creates employee earnings template records -[apiInstance createEmployeeEarningsTemplateWith:xeroTenantId +// creates employee leave type records +[apiInstance createEmployeeLeaveTypeWith:xeroTenantId employeeId:employeeId - earningsTemplate:earningsTemplate - completionHandler: ^(EarningsTemplateObject output, NSError* error) { + employeeLeaveType:employeeLeaveType + completionHandler: ^(EmployeeLeaveTypeObject output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -7389,7 +7746,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -7399,42 +7756,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object -const earningsTemplate:EarningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" }; // {EarningsTemplate} +const employeeLeaveType: EmployeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 }; // {EmployeeLeaveType} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + + try { - const response: any = await xero.accountingApi.createEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate); + const response = await xero.accountingApi.createEmployeeLeaveType(xeroTenantId, employeeId, employeeLeaveType); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -7443,7 +7783,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createEmployeeEarningsTemplateExample + public class createEmployeeLeaveTypeExample { public void main() { @@ -7454,17 +7794,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) var employeeId = new UUID(); // UUID | Employee id for single object (default to null) - var earningsTemplate = new EarningsTemplate(); // EarningsTemplate | + var employeeLeaveType = new EmployeeLeaveType(); // EmployeeLeaveType | try { - // creates employee earnings template records - EarningsTemplateObject result = apiInstance.createEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate); + // creates employee leave type records + EmployeeLeaveTypeObject result = apiInstance.createEmployeeLeaveType(xeroTenantId, employeeId, employeeLeaveType); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createEmployeeEarningsTemplate: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createEmployeeLeaveType: " + e.Message ); } } } @@ -7472,7 +7812,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -7490,12 +7830,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createEmployeeEarningsTemplate: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createEmployeeLeaveType: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -7506,18 +7846,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object -my $earningsTemplate = ::Object::EarningsTemplate->new(); # EarningsTemplate | +my $employeeLeaveType = ::Object::EmployeeLeaveType->new(); # EmployeeLeaveType | eval { - my $result = $api_instance->createEmployeeEarningsTemplate(xeroTenantId => $xeroTenantId, employeeId => $employeeId, earningsTemplate => $earningsTemplate); + my $result = $api_instance->createEmployeeLeaveType(xeroTenantId => $xeroTenantId, employeeId => $employeeId, employeeLeaveType => $employeeLeaveType); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createEmployeeEarningsTemplate: $@\n"; + warn "Exception when calling PayrollNzApi->createEmployeeLeaveType: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -7531,26 +7871,26 @@ 

    Usage and SDK Samples

    api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) -earningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" } # EarningsTemplate | +employeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 } # EmployeeLeaveType | try: - # creates employee earnings template records - api_response = api_instance.create_employee_earnings_template(xeroTenantId, employeeId, earningsTemplate) + # creates employee leave type records + api_response = api_instance.create_employee_leave_type(xeroTenantId, employeeId, employeeLeaveType) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createEmployeeEarningsTemplate: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createEmployeeLeaveType: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
         let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    -    let earningsTemplate = { "ratePerUnit": 20, "numberOfUnits": 8, "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "name": "My New One" }; // EarningsTemplate
    +    let employeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 }; // EmployeeLeaveType
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate, &context).wait();
    +    let result = client.createEmployeeLeaveType(xeroTenantId, employeeId, employeeLeaveType, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -7580,7 +7920,7 @@ 

    Parameters

    - + @@ -7696,27 +8036,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/Leave"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/openingBalances"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -7895,19 +8235,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - EmployeeLeave employeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" }; // EmployeeLeave | + array[EmployeeOpeningBalance] employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}]; // array[EmployeeOpeningBalance] | try { - EmployeeLeaveObject result = apiInstance.createEmployeeLeave(xeroTenantId, employeeId, employeeLeave); + EmployeeOpeningBalancesObject result = apiInstance.createEmployeeOpeningBalances(xeroTenantId, employeeId, employeeOpeningBalance); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployeeLeave"); + System.err.println("Exception when calling PayrollNzApi#createEmployeeOpeningBalances"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -7916,22 +8256,22 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - EmployeeLeave employeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" }; // EmployeeLeave | + array[EmployeeOpeningBalance] employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}]; // array[EmployeeOpeningBalance] | try { - EmployeeLeaveObject result = apiInstance.createEmployeeLeave(xeroTenantId, employeeId, employeeLeave); + EmployeeOpeningBalancesObject result = apiInstance.createEmployeeOpeningBalances(xeroTenantId, employeeId, employeeOpeningBalance); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployeeLeave"); + System.err.println("Exception when calling PayrollNzApi#createEmployeeOpeningBalances"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -7939,15 +8279,15 @@ 

    Usage and SDK Samples

    String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null) UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null) -EmployeeLeave *employeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" }; // +array[EmployeeOpeningBalance] *employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}]; // PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init]; -// creates employee leave records -[apiInstance createEmployeeLeaveWith:xeroTenantId +// creates employee opening balances +[apiInstance createEmployeeOpeningBalancesWith:xeroTenantId employeeId:employeeId - employeeLeave:employeeLeave - completionHandler: ^(EmployeeLeaveObject output, NSError* error) { + employeeOpeningBalance:employeeOpeningBalance + completionHandler: ^(EmployeeOpeningBalancesObject output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -7958,7 +8298,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -7968,42 +8308,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object -const employeeLeave:EmployeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" }; // {EmployeeLeave} +const employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}]; // {array[EmployeeOpeningBalance]} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + + try { - const response: any = await xero.accountingApi.createEmployeeLeave(xeroTenantId, employeeId, employeeLeave); + const response = await xero.accountingApi.createEmployeeOpeningBalances(xeroTenantId, employeeId, employeeOpeningBalance); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -8012,7 +8335,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createEmployeeLeaveExample + public class createEmployeeOpeningBalancesExample { public void main() { @@ -8023,17 +8346,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) var employeeId = new UUID(); // UUID | Employee id for single object (default to null) - var employeeLeave = new EmployeeLeave(); // EmployeeLeave | + var employeeOpeningBalance = new array[EmployeeOpeningBalance](); // array[EmployeeOpeningBalance] | try { - // creates employee leave records - EmployeeLeaveObject result = apiInstance.createEmployeeLeave(xeroTenantId, employeeId, employeeLeave); + // creates employee opening balances + EmployeeOpeningBalancesObject result = apiInstance.createEmployeeOpeningBalances(xeroTenantId, employeeId, employeeOpeningBalance); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createEmployeeLeave: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createEmployeeOpeningBalances: " + e.Message ); } } } @@ -8041,7 +8364,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -8059,12 +8382,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createEmployeeLeave: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createEmployeeOpeningBalances: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -8075,18 +8398,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object -my $employeeLeave = ::Object::EmployeeLeave->new(); # EmployeeLeave | +my $employeeOpeningBalance = [::Object::array[EmployeeOpeningBalance]->new()]; # array[EmployeeOpeningBalance] | eval { - my $result = $api_instance->createEmployeeLeave(xeroTenantId => $xeroTenantId, employeeId => $employeeId, employeeLeave => $employeeLeave); + my $result = $api_instance->createEmployeeOpeningBalances(xeroTenantId => $xeroTenantId, employeeId => $employeeId, employeeOpeningBalance => $employeeOpeningBalance); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createEmployeeLeave: $@\n"; + warn "Exception when calling PayrollNzApi->createEmployeeOpeningBalances: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -8100,26 +8423,26 @@ 

    Usage and SDK Samples

    api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) -employeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" } # EmployeeLeave | +employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}] # array[EmployeeOpeningBalance] | try: - # creates employee leave records - api_response = api_instance.create_employee_leave(xeroTenantId, employeeId, employeeLeave) + # creates employee opening balances + api_response = api_instance.create_employee_opening_balances(xeroTenantId, employeeId, employeeOpeningBalance) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createEmployeeLeave: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createEmployeeOpeningBalances: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
         let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    -    let employeeLeave = { "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4", "description": "Creating a Desription", "startDate": "2020-04-24", "endDate": "2020-04-26" }; // EmployeeLeave
    +    let employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}]; // array[EmployeeOpeningBalance]
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createEmployeeLeave(xeroTenantId, employeeId, employeeLeave, &context).wait();
    +    let result = client.createEmployeeOpeningBalances(xeroTenantId, employeeId, employeeOpeningBalance, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -8149,7 +8472,7 @@ 

    Parameters

    - + @@ -8265,27 +8588,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/leaveSetup"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/PaymentMethods"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -8464,19 +8787,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - EmployeeLeaveSetup employeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 }; // EmployeeLeaveSetup | + PaymentMethod paymentMethod = ; // PaymentMethod | try { - EmployeeLeaveSetupObject result = apiInstance.createEmployeeLeaveSetup(xeroTenantId, employeeId, employeeLeaveSetup); + PaymentMethodObject result = apiInstance.createEmployeePaymentMethod(xeroTenantId, employeeId, paymentMethod); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployeeLeaveSetup"); + System.err.println("Exception when calling PayrollNzApi#createEmployeePaymentMethod"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -8485,22 +8808,22 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - EmployeeLeaveSetup employeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 }; // EmployeeLeaveSetup | + PaymentMethod paymentMethod = ; // PaymentMethod | try { - EmployeeLeaveSetupObject result = apiInstance.createEmployeeLeaveSetup(xeroTenantId, employeeId, employeeLeaveSetup); + PaymentMethodObject result = apiInstance.createEmployeePaymentMethod(xeroTenantId, employeeId, paymentMethod); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployeeLeaveSetup"); + System.err.println("Exception when calling PayrollNzApi#createEmployeePaymentMethod"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -8508,15 +8831,15 @@ 

    Usage and SDK Samples

    String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null) UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null) -EmployeeLeaveSetup *employeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 }; // +PaymentMethod *paymentMethod = ; // PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init]; -// Allows you to set-up leave for a specific employee. This is required before viewing, configuring and requesting leave for an employee -[apiInstance createEmployeeLeaveSetupWith:xeroTenantId +// creates employee payment method +[apiInstance createEmployeePaymentMethodWith:xeroTenantId employeeId:employeeId - employeeLeaveSetup:employeeLeaveSetup - completionHandler: ^(EmployeeLeaveSetupObject output, NSError* error) { + paymentMethod:paymentMethod + completionHandler: ^(PaymentMethodObject output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -8527,7 +8850,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -8537,42 +8860,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object -const employeeLeaveSetup:EmployeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 }; // {EmployeeLeaveSetup} +const paymentMethod: PaymentMethod = ; // {PaymentMethod} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + + try { - const response: any = await xero.accountingApi.createEmployeeLeaveSetup(xeroTenantId, employeeId, employeeLeaveSetup); + const response = await xero.accountingApi.createEmployeePaymentMethod(xeroTenantId, employeeId, paymentMethod); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -8581,7 +8887,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createEmployeeLeaveSetupExample + public class createEmployeePaymentMethodExample { public void main() { @@ -8592,17 +8898,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) var employeeId = new UUID(); // UUID | Employee id for single object (default to null) - var employeeLeaveSetup = new EmployeeLeaveSetup(); // EmployeeLeaveSetup | + var paymentMethod = new PaymentMethod(); // PaymentMethod | try { - // Allows you to set-up leave for a specific employee. This is required before viewing, configuring and requesting leave for an employee - EmployeeLeaveSetupObject result = apiInstance.createEmployeeLeaveSetup(xeroTenantId, employeeId, employeeLeaveSetup); + // creates employee payment method + PaymentMethodObject result = apiInstance.createEmployeePaymentMethod(xeroTenantId, employeeId, paymentMethod); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createEmployeeLeaveSetup: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createEmployeePaymentMethod: " + e.Message ); } } } @@ -8610,7 +8916,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -8628,12 +8934,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createEmployeeLeaveSetup: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createEmployeePaymentMethod: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -8644,18 +8950,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object -my $employeeLeaveSetup = ::Object::EmployeeLeaveSetup->new(); # EmployeeLeaveSetup | +my $paymentMethod = ::Object::PaymentMethod->new(); # PaymentMethod | eval { - my $result = $api_instance->createEmployeeLeaveSetup(xeroTenantId => $xeroTenantId, employeeId => $employeeId, employeeLeaveSetup => $employeeLeaveSetup); + my $result = $api_instance->createEmployeePaymentMethod(xeroTenantId => $xeroTenantId, employeeId => $employeeId, paymentMethod => $paymentMethod); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createEmployeeLeaveSetup: $@\n"; + warn "Exception when calling PayrollNzApi->createEmployeePaymentMethod: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -8669,26 +8975,26 @@ 

    Usage and SDK Samples

    api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) -employeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 } # EmployeeLeaveSetup | +paymentMethod = # PaymentMethod | try: - # Allows you to set-up leave for a specific employee. This is required before viewing, configuring and requesting leave for an employee - api_response = api_instance.create_employee_leave_setup(xeroTenantId, employeeId, employeeLeaveSetup) + # creates employee payment method + api_response = api_instance.create_employee_payment_method(xeroTenantId, employeeId, paymentMethod) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createEmployeeLeaveSetup: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createEmployeePaymentMethod: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
         let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    -    let employeeLeaveSetup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 }; // EmployeeLeaveSetup
    +    let paymentMethod = ; // PaymentMethod
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createEmployeeLeaveSetup(xeroTenantId, employeeId, employeeLeaveSetup, &context).wait();
    +    let result = client.createEmployeePaymentMethod(xeroTenantId, employeeId, paymentMethod, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -8718,7 +9024,7 @@ 

    Parameters

    - + @@ -8834,27 +9139,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/LeaveTypes"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/SalaryAndWages"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -9033,19 +9337,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - EmployeeLeaveType employeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 }; // EmployeeLeaveType | + SalaryAndWage salaryAndWage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": 10, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01", "annualSalary": 100, "status": "Active", "paymentType": "Salary" }; // SalaryAndWage | try { - EmployeeLeaveTypeObject result = apiInstance.createEmployeeLeaveType(xeroTenantId, employeeId, employeeLeaveType); + SalaryAndWageObject result = apiInstance.createEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWage); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployeeLeaveType"); + System.err.println("Exception when calling PayrollNzApi#createEmployeeSalaryAndWage"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -9054,22 +9358,22 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - EmployeeLeaveType employeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 }; // EmployeeLeaveType | + SalaryAndWage salaryAndWage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": 10, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01", "annualSalary": 100, "status": "Active", "paymentType": "Salary" }; // SalaryAndWage | try { - EmployeeLeaveTypeObject result = apiInstance.createEmployeeLeaveType(xeroTenantId, employeeId, employeeLeaveType); + SalaryAndWageObject result = apiInstance.createEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWage); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployeeLeaveType"); + System.err.println("Exception when calling PayrollNzApi#createEmployeeSalaryAndWage"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -9077,15 +9381,15 @@ 

    Usage and SDK Samples

    String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null) UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null) -EmployeeLeaveType *employeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 }; // +SalaryAndWage *salaryAndWage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": 10, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01", "annualSalary": 100, "status": "Active", "paymentType": "Salary" }; // PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init]; -// creates employee leave type records -[apiInstance createEmployeeLeaveTypeWith:xeroTenantId +// creates employee salary and wage record +[apiInstance createEmployeeSalaryAndWageWith:xeroTenantId employeeId:employeeId - employeeLeaveType:employeeLeaveType - completionHandler: ^(EmployeeLeaveTypeObject output, NSError* error) { + salaryAndWage:salaryAndWage + completionHandler: ^(SalaryAndWageObject output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -9096,7 +9400,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -9106,42 +9410,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object -const employeeLeaveType:EmployeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 }; // {EmployeeLeaveType} +const salaryAndWage: SalaryAndWage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": 10, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01", "annualSalary": 100, "status": "Active", "paymentType": "Salary" }; // {SalaryAndWage} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + + try { - const response: any = await xero.accountingApi.createEmployeeLeaveType(xeroTenantId, employeeId, employeeLeaveType); + const response = await xero.accountingApi.createEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWage); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -9150,7 +9437,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createEmployeeLeaveTypeExample + public class createEmployeeSalaryAndWageExample { public void main() { @@ -9161,17 +9448,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) var employeeId = new UUID(); // UUID | Employee id for single object (default to null) - var employeeLeaveType = new EmployeeLeaveType(); // EmployeeLeaveType | + var salaryAndWage = new SalaryAndWage(); // SalaryAndWage | try { - // creates employee leave type records - EmployeeLeaveTypeObject result = apiInstance.createEmployeeLeaveType(xeroTenantId, employeeId, employeeLeaveType); + // creates employee salary and wage record + SalaryAndWageObject result = apiInstance.createEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWage); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createEmployeeLeaveType: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createEmployeeSalaryAndWage: " + e.Message ); } } } @@ -9179,7 +9466,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -9197,12 +9484,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createEmployeeLeaveType: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createEmployeeSalaryAndWage: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -9213,18 +9500,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object -my $employeeLeaveType = ::Object::EmployeeLeaveType->new(); # EmployeeLeaveType | +my $salaryAndWage = ::Object::SalaryAndWage->new(); # SalaryAndWage | eval { - my $result = $api_instance->createEmployeeLeaveType(xeroTenantId => $xeroTenantId, employeeId => $employeeId, employeeLeaveType => $employeeLeaveType); + my $result = $api_instance->createEmployeeSalaryAndWage(xeroTenantId => $xeroTenantId, employeeId => $employeeId, salaryAndWage => $salaryAndWage); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createEmployeeLeaveType: $@\n"; + warn "Exception when calling PayrollNzApi->createEmployeeSalaryAndWage: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -9238,26 +9525,26 @@ 

    Usage and SDK Samples

    api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) -employeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 } # EmployeeLeaveType | +salaryAndWage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": 10, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01", "annualSalary": 100, "status": "Active", "paymentType": "Salary" } # SalaryAndWage | try: - # creates employee leave type records - api_response = api_instance.create_employee_leave_type(xeroTenantId, employeeId, employeeLeaveType) + # creates employee salary and wage record + api_response = api_instance.create_employee_salary_and_wage(xeroTenantId, employeeId, salaryAndWage) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createEmployeeLeaveType: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createEmployeeSalaryAndWage: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
         let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    -    let employeeLeaveType = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 }; // EmployeeLeaveType
    +    let salaryAndWage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": 10, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01", "annualSalary": 100, "status": "Active", "paymentType": "Salary" }; // SalaryAndWage
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createEmployeeLeaveType(xeroTenantId, employeeId, employeeLeaveType, &context).wait();
    +    let result = client.createEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWage, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -9287,7 +9574,7 @@ 

    Parameters

    - + @@ -9403,27 +9690,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/openingBalances"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/Employment"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -9602,19 +9889,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - array[EmployeeOpeningBalance] employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}]; // array[EmployeeOpeningBalance] | + Employment employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" }; // Employment | try { - EmployeeOpeningBalancesObject result = apiInstance.createEmployeeOpeningBalances(xeroTenantId, employeeId, employeeOpeningBalance); + EmploymentObject result = apiInstance.createEmployment(xeroTenantId, employeeId, employment); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployeeOpeningBalances"); + System.err.println("Exception when calling PayrollNzApi#createEmployment"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -9623,22 +9910,22 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - array[EmployeeOpeningBalance] employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}]; // array[EmployeeOpeningBalance] | + Employment employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" }; // Employment | try { - EmployeeOpeningBalancesObject result = apiInstance.createEmployeeOpeningBalances(xeroTenantId, employeeId, employeeOpeningBalance); + EmploymentObject result = apiInstance.createEmployment(xeroTenantId, employeeId, employment); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployeeOpeningBalances"); + System.err.println("Exception when calling PayrollNzApi#createEmployment"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -9646,15 +9933,15 @@ 

    Usage and SDK Samples

    String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null) UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null) -array[EmployeeOpeningBalance] *employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}]; // +Employment *employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" }; // PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init]; -// creates employee opening balances -[apiInstance createEmployeeOpeningBalancesWith:xeroTenantId +// creates employment +[apiInstance createEmploymentWith:xeroTenantId employeeId:employeeId - employeeOpeningBalance:employeeOpeningBalance - completionHandler: ^(EmployeeOpeningBalancesObject output, NSError* error) { + employment:employment + completionHandler: ^(EmploymentObject output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -9665,7 +9952,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -9675,42 +9962,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object -const employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}]; // {array[EmployeeOpeningBalance]} +const employment: Employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" }; // {Employment} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + + try { - const response: any = await xero.accountingApi.createEmployeeOpeningBalances(xeroTenantId, employeeId, employeeOpeningBalance); + const response = await xero.accountingApi.createEmployment(xeroTenantId, employeeId, employment); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -9719,7 +9989,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createEmployeeOpeningBalancesExample + public class createEmploymentExample { public void main() { @@ -9730,17 +10000,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) var employeeId = new UUID(); // UUID | Employee id for single object (default to null) - var employeeOpeningBalance = new array[EmployeeOpeningBalance](); // array[EmployeeOpeningBalance] | + var employment = new Employment(); // Employment | try { - // creates employee opening balances - EmployeeOpeningBalancesObject result = apiInstance.createEmployeeOpeningBalances(xeroTenantId, employeeId, employeeOpeningBalance); + // creates employment + EmploymentObject result = apiInstance.createEmployment(xeroTenantId, employeeId, employment); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createEmployeeOpeningBalances: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createEmployment: " + e.Message ); } } } @@ -9748,7 +10018,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -9766,12 +10036,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createEmployeeOpeningBalances: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createEmployment: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -9782,18 +10052,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object -my $employeeOpeningBalance = [::Object::array[EmployeeOpeningBalance]->new()]; # array[EmployeeOpeningBalance] | +my $employment = ::Object::Employment->new(); # Employment | eval { - my $result = $api_instance->createEmployeeOpeningBalances(xeroTenantId => $xeroTenantId, employeeId => $employeeId, employeeOpeningBalance => $employeeOpeningBalance); + my $result = $api_instance->createEmployment(xeroTenantId => $xeroTenantId, employeeId => $employeeId, employment => $employment); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createEmployeeOpeningBalances: $@\n"; + warn "Exception when calling PayrollNzApi->createEmployment: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -9807,26 +10077,26 @@ 

    Usage and SDK Samples

    api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) -employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}] # array[EmployeeOpeningBalance] | +employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" } # Employment | try: - # creates employee opening balances - api_response = api_instance.create_employee_opening_balances(xeroTenantId, employeeId, employeeOpeningBalance) + # creates employment + api_response = api_instance.create_employment(xeroTenantId, employeeId, employment) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createEmployeeOpeningBalances: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createEmployment: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
         let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    -    let employeeOpeningBalance = [{"periodEndDate":"2020-10-01","daysPaid":3,"unpaidWeeks":2,"grossEarnings":40.0}]; // array[EmployeeOpeningBalance]
    +    let employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" }; // Employment
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createEmployeeOpeningBalances(xeroTenantId, employeeId, employeeOpeningBalance, &context).wait();
    +    let result = client.createEmployment(xeroTenantId, employeeId, employment, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -9856,7 +10126,7 @@ 

    Parameters

    - + @@ -9972,27 +10242,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/PaymentMethods"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/LeaveTypes"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -10170,20 +10440,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - PaymentMethod paymentMethod = ; // PaymentMethod | + LeaveType leaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true }; // LeaveType | try { - PaymentMethodObject result = apiInstance.createEmployeePaymentMethod(xeroTenantId, employeeId, paymentMethod); + LeaveTypeObject result = apiInstance.createLeaveType(xeroTenantId, leaveType); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployeePaymentMethod"); + System.err.println("Exception when calling PayrollNzApi#createLeaveType"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -10191,39 +10460,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - PaymentMethod paymentMethod = ; // PaymentMethod | + LeaveType leaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true }; // LeaveType | try { - PaymentMethodObject result = apiInstance.createEmployeePaymentMethod(xeroTenantId, employeeId, paymentMethod); + LeaveTypeObject result = apiInstance.createLeaveType(xeroTenantId, leaveType); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployeePaymentMethod"); + System.err.println("Exception when calling PayrollNzApi#createLeaveType"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
    -PaymentMethod *paymentMethod = ; // 
    +LeaveType *leaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true }; // 
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// creates employee payment method
    -[apiInstance createEmployeePaymentMethodWith:xeroTenantId
    -    employeeId:employeeId
    -    paymentMethod:paymentMethod
    -              completionHandler: ^(PaymentMethodObject output, NSError* error) {
    +// create a new leave type
    +[apiInstance createLeaveTypeWith:xeroTenantId
    +    leaveType:leaveType
    +              completionHandler: ^(LeaveTypeObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -10234,7 +10500,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -10244,42 +10510,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object -const paymentMethod:PaymentMethod = ; // {PaymentMethod} +const leaveType: LeaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true }; // {LeaveType} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + + try { - const response: any = await xero.accountingApi.createEmployeePaymentMethod(xeroTenantId, employeeId, paymentMethod); + const response = await xero.accountingApi.createLeaveType(xeroTenantId, leaveType); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -10288,7 +10536,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createEmployeePaymentMethodExample + public class createLeaveTypeExample { public void main() { @@ -10298,18 +10546,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var employeeId = new UUID(); // UUID | Employee id for single object (default to null) - var paymentMethod = new PaymentMethod(); // PaymentMethod | + var leaveType = new LeaveType(); // LeaveType | try { - // creates employee payment method - PaymentMethodObject result = apiInstance.createEmployeePaymentMethod(xeroTenantId, employeeId, paymentMethod); + // create a new leave type + LeaveTypeObject result = apiInstance.createLeaveType(xeroTenantId, leaveType); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createEmployeePaymentMethod: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createLeaveType: " + e.Message ); } } } @@ -10317,7 +10564,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -10335,12 +10582,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createEmployeePaymentMethod: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createLeaveType: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -10350,19 +10597,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object -my $paymentMethod = ::Object::PaymentMethod->new(); # PaymentMethod | +my $leaveType = ::Object::LeaveType->new(); # LeaveType | eval { - my $result = $api_instance->createEmployeePaymentMethod(xeroTenantId => $xeroTenantId, employeeId => $employeeId, paymentMethod => $paymentMethod); + my $result = $api_instance->createLeaveType(xeroTenantId => $xeroTenantId, leaveType => $leaveType); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createEmployeePaymentMethod: $@\n"; + warn "Exception when calling PayrollNzApi->createLeaveType: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -10375,27 +10621,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) -paymentMethod = # PaymentMethod | +leaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true } # LeaveType | try: - # creates employee payment method - api_response = api_instance.create_employee_payment_method(xeroTenantId, employeeId, paymentMethod) + # create a new leave type + api_response = api_instance.create_leave_type(xeroTenantId, leaveType) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createEmployeePaymentMethod: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createLeaveType: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    -    let paymentMethod = ; // PaymentMethod
    +    let leaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true }; // LeaveType
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createEmployeePaymentMethod(xeroTenantId, employeeId, paymentMethod, &context).wait();
    +    let result = client.createLeaveType(xeroTenantId, leaveType, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -10407,47 +10651,14 @@ 

    Scopes

    -
    +
    @@ -7072,12 +7429,12 @@

    Parameters

    Name Description
    employee *
    employeeLeaveSetup *
    - Employee + EmployeeLeaveSetup
    @@ -7095,9 +7452,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/Employee" + "$ref" : "#/components/schemas/EmployeeLeaveSetup" }, - "example" : "{ \"title\": \"Mr\", \"firstName\": \"Mike\", \"lastName\": \"Johntzxzpxhmkgson\", \"dateOfBirth\": \"2000-01-01\", \"address\": { \"addressLine1\": \"101 Green St\", \"city\": \"San Francisco\", \"postCode\": \"4351\", \"countryName\": \"United Kingdom\" }, \"email\": \"83139@starkindustries.com\", \"gender\": \"M\" }" + "example" : "{ \"holidayPayOpeningBalance\": 10, \"annualLeaveOpeningBalance\": 100, \"sickLeaveHoursToAccrueAnnually\": 20, \"sickLeaveOpeningBalance\": 10 }" } }, "required" : true @@ -7113,12 +7470,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_createEmployee_employee'); + var result = $('#d2e199_createEmployeeLeaveSetup_employeeLeaveSetup'); result.empty(); result.append(view.render()); }); -
    +
    -
    +
    @@ -7614,7 +7954,7 @@

    Parameters

    -
    +
    @@ -7641,12 +7981,12 @@

    Parameters

    Name Description
    earningsTemplate *
    employeeLeaveType *
    - EarningsTemplate + EmployeeLeaveType
    @@ -7664,9 +8004,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/EarningsTemplate" + "$ref" : "#/components/schemas/EmployeeLeaveType" }, - "example" : "{ \"ratePerUnit\": 20, \"numberOfUnits\": 8, \"earningsRateID\": \"f9d8f5b5-9049-47f4-8541-35e200f750a5\", \"name\": \"My New One\" }" + "example" : "{ \"leaveTypeID\": \"35da97ae-05b9-427f-9a98-69157ba42cec\", \"scheduleOfAccrual\": \"AnnuallyAfter6Months\", \"hoursAccruedAnnually\": 10, \"maximumToAccrue\": 80, \"openingBalance\": 100, \"rateAccruedHourly\": 3.5 }" } }, "required" : true @@ -7682,12 +8022,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_createEmployeeEarningsTemplate_earningsTemplate'); + var result = $('#d2e199_createEmployeeLeaveType_employeeLeaveType'); result.empty(); result.append(view.render()); }); -
    +
    -
    +
    @@ -8183,7 +8506,7 @@

    Parameters

    -
    +
    @@ -8210,12 +8533,12 @@

    Parameters

    Name Description
    employeeLeave *
    employeeOpeningBalance *
    - EmployeeLeave + array[EmployeeOpeningBalance]
    @@ -8233,9 +8556,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/EmployeeLeave" + "$ref" : "#/components/schemas/EmployeeOpeningBalances" }, - "example" : "{ \"leaveTypeID\": \"b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4\", \"description\": \"Creating a Desription\", \"startDate\": \"2020-04-24\", \"endDate\": \"2020-04-26\" }" + "example" : "[{\"periodEndDate\":\"2020-10-01\",\"daysPaid\":3,\"unpaidWeeks\":2,\"grossEarnings\":40.0}]" } }, "required" : true @@ -8251,12 +8574,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_createEmployeeLeave_employeeLeave'); + var result = $('#d2e199_createEmployeeOpeningBalances_employeeOpeningBalance'); result.empty(); result.append(view.render()); }); -
    +
    -
    +
    @@ -8752,7 +9058,7 @@

    Parameters

    -
    +
    @@ -8779,12 +9085,12 @@

    Parameters

    Name Description
    employeeLeaveSetup *
    paymentMethod *
    - EmployeeLeaveSetup + PaymentMethod
    @@ -8802,9 +9108,8 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/EmployeeLeaveSetup" - }, - "example" : "{ \"holidayPayOpeningBalance\": 10, \"annualLeaveOpeningBalance\": 100, \"sickLeaveHoursToAccrueAnnually\": 20, \"sickLeaveOpeningBalance\": 10 }" + "$ref" : "#/components/schemas/PaymentMethod" + } } }, "required" : true @@ -8820,12 +9125,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_createEmployeeLeaveSetup_employeeLeaveSetup'); + var result = $('#d2e199_createEmployeePaymentMethod_paymentMethod'); result.empty(); result.append(view.render()); }); -
    +
    -
    +
    @@ -9321,7 +9608,7 @@

    Parameters

    -
    +
    @@ -9348,12 +9635,12 @@

    Parameters

    Name Description
    employeeLeaveType *
    salaryAndWage *
    - EmployeeLeaveType + SalaryAndWage
    @@ -9371,9 +9658,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/EmployeeLeaveType" + "$ref" : "#/components/schemas/SalaryAndWage" }, - "example" : "{ \"leaveTypeID\": \"35da97ae-05b9-427f-9a98-69157ba42cec\", \"scheduleOfAccrual\": \"AnnuallyAfter6Months\", \"hoursAccruedAnnually\": 10, \"maximumToAccrue\": 80, \"openingBalance\": 100, \"rateAccruedHourly\": 3.5 }" + "example" : "{ \"earningsRateID\": \"f9d8f5b5-9049-47f4-8541-35e200f750a5\", \"numberOfUnitsPerWeek\": 2, \"ratePerUnit\": 10, \"numberOfUnitsPerDay\": 2, \"daysPerWeek\": 1, \"effectiveFrom\": \"2020-05-01\", \"annualSalary\": 100, \"status\": \"Active\", \"paymentType\": \"Salary\" }" } }, "required" : true @@ -9389,12 +9676,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_createEmployeeLeaveType_employeeLeaveType'); + var result = $('#d2e199_createEmployeeSalaryAndWage_salaryAndWage'); result.empty(); result.append(view.render()); }); -
    +
    -
    +
    @@ -9890,7 +10160,7 @@

    Parameters

    -
    +
    @@ -9917,12 +10187,12 @@

    Parameters

    Name Description
    employeeOpeningBalance *
    employment *
    - array[EmployeeOpeningBalance] + Employment
    @@ -9940,9 +10210,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/EmployeeOpeningBalances" + "$ref" : "#/components/schemas/Employment" }, - "example" : "[{\"periodEndDate\":\"2020-10-01\",\"daysPaid\":3,\"unpaidWeeks\":2,\"grossEarnings\":40.0}]" + "example" : "{ \"payrollCalendarID\": \"9aa56064-990f-4ad3-a189-d966d8f6a030\", \"startDate\": \"2020-09-02\" }" } }, "required" : true @@ -9958,12 +10228,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_createEmployeeOpeningBalances_employeeOpeningBalance'); + var result = $('#d2e199_createEmployment_employment'); result.empty(); result.append(view.render()); }); -
    +
    - - + +
    payroll.employeesGrant read-write access to payroll employeespayroll.settingsGrant read-write access to payroll settings

    Parameters

    -
    Path parameters
    - - - - - - - - - -
    NameDescription
    EmployeeId* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Employee id for single object -
    -
    -
    - Required -
    -
    -
    -
    Header parameters
    @@ -10459,7 +10670,7 @@

    Parameters

    - + @@ -10540,27 +10752,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/SalaryAndWages"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/paytemplateearnings"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -10738,19 +10951,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - SalaryAndWage salaryAndWage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": 10, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01", "annualSalary": 100, "status": "Active", "paymentType": "Salary" }; // SalaryAndWage | + array[EarningsTemplate] earningsTemplate = [{"ratePerUnit":20.0,"numberOfUnits":8.0,"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5"},{"ratePerUnit":0.0,"numberOfUnits":8.0,"earningsRateID":"65b83d94-f20f-45e1-85ae-387fcf460c26"}]; // array[EarningsTemplate] | try { - SalaryAndWageObject result = apiInstance.createEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWage); + EmployeeEarningsTemplates result = apiInstance.createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployeeSalaryAndWage"); + System.err.println("Exception when calling PayrollNzApi#createMultipleEmployeeEarningsTemplate"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -10759,22 +10972,22 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - SalaryAndWage salaryAndWage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": 10, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01", "annualSalary": 100, "status": "Active", "paymentType": "Salary" }; // SalaryAndWage | + array[EarningsTemplate] earningsTemplate = [{"ratePerUnit":20.0,"numberOfUnits":8.0,"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5"},{"ratePerUnit":0.0,"numberOfUnits":8.0,"earningsRateID":"65b83d94-f20f-45e1-85ae-387fcf460c26"}]; // array[EarningsTemplate] | try { - SalaryAndWageObject result = apiInstance.createEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWage); + EmployeeEarningsTemplates result = apiInstance.createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployeeSalaryAndWage"); + System.err.println("Exception when calling PayrollNzApi#createMultipleEmployeeEarningsTemplate"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -10782,15 +10995,15 @@ 

    Usage and SDK Samples

    String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null) UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null) -SalaryAndWage *salaryAndWage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": 10, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01", "annualSalary": 100, "status": "Active", "paymentType": "Salary" }; // +array[EarningsTemplate] *earningsTemplate = [{"ratePerUnit":20.0,"numberOfUnits":8.0,"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5"},{"ratePerUnit":0.0,"numberOfUnits":8.0,"earningsRateID":"65b83d94-f20f-45e1-85ae-387fcf460c26"}]; // PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init]; -// creates employee salary and wage record -[apiInstance createEmployeeSalaryAndWageWith:xeroTenantId +// creates multiple employee earnings template records +[apiInstance createMultipleEmployeeEarningsTemplateWith:xeroTenantId employeeId:employeeId - salaryAndWage:salaryAndWage - completionHandler: ^(SalaryAndWageObject output, NSError* error) { + earningsTemplate:earningsTemplate + completionHandler: ^(EmployeeEarningsTemplates output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -10801,7 +11014,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -10811,42 +11024,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object -const salaryAndWage:SalaryAndWage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": 10, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01", "annualSalary": 100, "status": "Active", "paymentType": "Salary" }; // {SalaryAndWage} +const earningsTemplate = [{"ratePerUnit":20.0,"numberOfUnits":8.0,"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5"},{"ratePerUnit":0.0,"numberOfUnits":8.0,"earningsRateID":"65b83d94-f20f-45e1-85ae-387fcf460c26"}]; // {array[EarningsTemplate]} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + + try { - const response: any = await xero.accountingApi.createEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWage); + const response = await xero.accountingApi.createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -10855,7 +11051,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createEmployeeSalaryAndWageExample + public class createMultipleEmployeeEarningsTemplateExample { public void main() { @@ -10866,17 +11062,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) var employeeId = new UUID(); // UUID | Employee id for single object (default to null) - var salaryAndWage = new SalaryAndWage(); // SalaryAndWage | + var earningsTemplate = new array[EarningsTemplate](); // array[EarningsTemplate] | try { - // creates employee salary and wage record - SalaryAndWageObject result = apiInstance.createEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWage); + // creates multiple employee earnings template records + EmployeeEarningsTemplates result = apiInstance.createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createEmployeeSalaryAndWage: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createMultipleEmployeeEarningsTemplate: " + e.Message ); } } } @@ -10884,7 +11080,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -10902,12 +11098,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createEmployeeSalaryAndWage: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createMultipleEmployeeEarningsTemplate: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -10918,18 +11114,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object -my $salaryAndWage = ::Object::SalaryAndWage->new(); # SalaryAndWage | +my $earningsTemplate = [::Object::array[EarningsTemplate]->new()]; # array[EarningsTemplate] | eval { - my $result = $api_instance->createEmployeeSalaryAndWage(xeroTenantId => $xeroTenantId, employeeId => $employeeId, salaryAndWage => $salaryAndWage); + my $result = $api_instance->createMultipleEmployeeEarningsTemplate(xeroTenantId => $xeroTenantId, employeeId => $employeeId, earningsTemplate => $earningsTemplate); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createEmployeeSalaryAndWage: $@\n"; + warn "Exception when calling PayrollNzApi->createMultipleEmployeeEarningsTemplate: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -10943,26 +11139,26 @@ 

    Usage and SDK Samples

    api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) -salaryAndWage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": 10, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01", "annualSalary": 100, "status": "Active", "paymentType": "Salary" } # SalaryAndWage | +earningsTemplate = [{"ratePerUnit":20.0,"numberOfUnits":8.0,"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5"},{"ratePerUnit":0.0,"numberOfUnits":8.0,"earningsRateID":"65b83d94-f20f-45e1-85ae-387fcf460c26"}] # array[EarningsTemplate] | try: - # creates employee salary and wage record - api_response = api_instance.create_employee_salary_and_wage(xeroTenantId, employeeId, salaryAndWage) + # creates multiple employee earnings template records + api_response = api_instance.create_multiple_employee_earnings_template(xeroTenantId, employeeId, earningsTemplate) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createEmployeeSalaryAndWage: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createMultipleEmployeeEarningsTemplate: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
         let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    -    let salaryAndWage = { "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnitsPerWeek": 2, "ratePerUnit": 10, "numberOfUnitsPerDay": 2, "daysPerWeek": 1, "effectiveFrom": "2020-05-01", "annualSalary": 100, "status": "Active", "paymentType": "Salary" }; // SalaryAndWage
    +    let earningsTemplate = [{"ratePerUnit":20.0,"numberOfUnits":8.0,"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5"},{"ratePerUnit":0.0,"numberOfUnits":8.0,"earningsRateID":"65b83d94-f20f-45e1-85ae-387fcf460c26"}]; // array[EarningsTemplate]
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWage, &context).wait();
    +    let result = client.createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -10992,7 +11188,7 @@ 

    Parameters

    - + @@ -11108,27 +11304,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/Employment"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/PayRuns"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -11306,20 +11502,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - Employment employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" }; // Employment | + PayRun payRun = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2020-09-08", "periodEndDate": "2020-09-15", "paymentDate": "2020-09-20", "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly" }; // PayRun | try { - EmploymentObject result = apiInstance.createEmployment(xeroTenantId, employeeId, employment); + PayRunObject result = apiInstance.createPayRun(xeroTenantId, payRun); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployment"); + System.err.println("Exception when calling PayrollNzApi#createPayRun"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -11327,39 +11522,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - Employment employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" }; // Employment | + PayRun payRun = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2020-09-08", "periodEndDate": "2020-09-15", "paymentDate": "2020-09-20", "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly" }; // PayRun | try { - EmploymentObject result = apiInstance.createEmployment(xeroTenantId, employeeId, employment); + PayRunObject result = apiInstance.createPayRun(xeroTenantId, payRun); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createEmployment"); + System.err.println("Exception when calling PayrollNzApi#createPayRun"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
    -Employment *employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" }; // 
    +PayRun *payRun = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2020-09-08", "periodEndDate": "2020-09-15", "paymentDate": "2020-09-20", "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly" }; // 
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// creates employment
    -[apiInstance createEmploymentWith:xeroTenantId
    -    employeeId:employeeId
    -    employment:employment
    -              completionHandler: ^(EmploymentObject output, NSError* error) {
    +// create a pay run
    +[apiInstance createPayRunWith:xeroTenantId
    +    payRun:payRun
    +              completionHandler: ^(PayRunObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -11370,7 +11562,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -11380,42 +11572,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object -const employment:Employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" }; // {Employment} +const payRun: PayRun = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2020-09-08", "periodEndDate": "2020-09-15", "paymentDate": "2020-09-20", "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly" }; // {PayRun} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + + try { - const response: any = await xero.accountingApi.createEmployment(xeroTenantId, employeeId, employment); + const response = await xero.accountingApi.createPayRun(xeroTenantId, payRun); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -11424,7 +11598,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createEmploymentExample + public class createPayRunExample { public void main() { @@ -11434,18 +11608,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var employeeId = new UUID(); // UUID | Employee id for single object (default to null) - var employment = new Employment(); // Employment | + var payRun = new PayRun(); // PayRun | try { - // creates employment - EmploymentObject result = apiInstance.createEmployment(xeroTenantId, employeeId, employment); + // create a pay run + PayRunObject result = apiInstance.createPayRun(xeroTenantId, payRun); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createEmployment: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createPayRun: " + e.Message ); } } } @@ -11453,7 +11626,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -11471,12 +11644,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createEmployment: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createPayRun: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -11486,19 +11659,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object -my $employment = ::Object::Employment->new(); # Employment | +my $payRun = ::Object::PayRun->new(); # PayRun | eval { - my $result = $api_instance->createEmployment(xeroTenantId => $xeroTenantId, employeeId => $employeeId, employment => $employment); + my $result = $api_instance->createPayRun(xeroTenantId => $xeroTenantId, payRun => $payRun); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createEmployment: $@\n"; + warn "Exception when calling PayrollNzApi->createPayRun: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -11511,27 +11683,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) -employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" } # Employment | +payRun = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2020-09-08", "periodEndDate": "2020-09-15", "paymentDate": "2020-09-20", "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly" } # PayRun | try: - # creates employment - api_response = api_instance.create_employment(xeroTenantId, employeeId, employment) + # create a pay run + api_response = api_instance.create_pay_run(xeroTenantId, payRun) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createEmployment: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createPayRun: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    -    let employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" }; // Employment
    +    let payRun = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2020-09-08", "periodEndDate": "2020-09-15", "paymentDate": "2020-09-20", "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly" }; // PayRun
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createEmployment(xeroTenantId, employeeId, employment, &context).wait();
    +    let result = client.createPayRun(xeroTenantId, payRun, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -11543,47 +11713,14 @@ 

    Scopes

    -
    +
    @@ -10486,12 +10697,12 @@

    Parameters

    Name Description
    paymentMethod *
    leaveType *
    - PaymentMethod + LeaveType
    @@ -10509,8 +10720,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/PaymentMethod" - } + "$ref" : "#/components/schemas/LeaveType" + }, + "example" : "{ \"name\": \"My wqwhhiktun Leave\", \"isPaidLeave\": false, \"showOnPayslip\": true }" } }, "required" : true @@ -10526,12 +10738,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_createEmployeePaymentMethod_paymentMethod'); + var result = $('#d2e199_createLeaveType_leaveType'); result.empty(); result.append(view.render()); }); -
    +
    -
    +
    @@ -11026,7 +11222,7 @@

    Parameters

    -
    +
    @@ -11053,12 +11249,12 @@

    Parameters

    Name Description
    salaryAndWage *
    earningsTemplate *
    - SalaryAndWage + array[EarningsTemplate]
    @@ -11076,9 +11272,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/SalaryAndWage" + "$ref" : "#/components/schemas/EarningsTemplates" }, - "example" : "{ \"earningsRateID\": \"f9d8f5b5-9049-47f4-8541-35e200f750a5\", \"numberOfUnitsPerWeek\": 2, \"ratePerUnit\": 10, \"numberOfUnitsPerDay\": 2, \"daysPerWeek\": 1, \"effectiveFrom\": \"2020-05-01\", \"annualSalary\": 100, \"status\": \"Active\", \"paymentType\": \"Salary\" }" + "example" : "[{\"ratePerUnit\":20.0,\"numberOfUnits\":8.0,\"earningsRateID\":\"f9d8f5b5-9049-47f4-8541-35e200f750a5\"},{\"ratePerUnit\":0.0,\"numberOfUnits\":8.0,\"earningsRateID\":\"65b83d94-f20f-45e1-85ae-387fcf460c26\"}]" } }, "required" : true @@ -11094,12 +11290,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_createEmployeeSalaryAndWage_salaryAndWage'); + var result = $('#d2e199_createMultipleEmployeeEarningsTemplate_earningsTemplate'); result.empty(); result.append(view.render()); }); -
    +
    - - + +
    payroll.employeesGrant read-write access to payroll employeespayroll.payrunsGrant read-write access to payroll payruns

    Parameters

    -
    Path parameters
    - - - - - - - - - -
    NameDescription
    EmployeeId* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Employee id for single object -
    -
    -
    - Required -
    -
    -
    -
    Header parameters
    @@ -11595,7 +11732,7 @@

    Parameters

    - + @@ -11677,27 +11814,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/LeaveTypes"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/PayRunCalendars"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -11875,19 +12012,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - LeaveType leaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true }; // LeaveType | + PayRunCalendar payRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" }; // PayRunCalendar | try { - LeaveTypeObject result = apiInstance.createLeaveType(xeroTenantId, leaveType); + PayRunCalendarObject result = apiInstance.createPayRunCalendar(xeroTenantId, payRunCalendar); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createLeaveType"); + System.err.println("Exception when calling PayrollNzApi#createPayRunCalendar"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -11895,36 +12032,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - LeaveType leaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true }; // LeaveType | + PayRunCalendar payRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" }; // PayRunCalendar | try { - LeaveTypeObject result = apiInstance.createLeaveType(xeroTenantId, leaveType); + PayRunCalendarObject result = apiInstance.createPayRunCalendar(xeroTenantId, payRunCalendar); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createLeaveType"); + System.err.println("Exception when calling PayrollNzApi#createPayRunCalendar"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -LeaveType *leaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true }; // 
    +PayRunCalendar *payRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" }; // 
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// create a new leave type
    -[apiInstance createLeaveTypeWith:xeroTenantId
    -    leaveType:leaveType
    -              completionHandler: ^(LeaveTypeObject output, NSError* error) {
    +// create a new payrun calendar
    +[apiInstance createPayRunCalendarWith:xeroTenantId
    +    payRunCalendar:payRunCalendar
    +              completionHandler: ^(PayRunCalendarObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -11935,7 +12072,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -11945,41 +12082,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const leaveType:LeaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true }; // {LeaveType} +const payRunCalendar: PayRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" }; // {PayRunCalendar} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + + try { - const response: any = await xero.accountingApi.createLeaveType(xeroTenantId, leaveType); + const response = await xero.accountingApi.createPayRunCalendar(xeroTenantId, payRunCalendar); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -11988,7 +12108,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createLeaveTypeExample + public class createPayRunCalendarExample { public void main() { @@ -11998,17 +12118,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var leaveType = new LeaveType(); // LeaveType | + var payRunCalendar = new PayRunCalendar(); // PayRunCalendar | try { - // create a new leave type - LeaveTypeObject result = apiInstance.createLeaveType(xeroTenantId, leaveType); + // create a new payrun calendar + PayRunCalendarObject result = apiInstance.createPayRunCalendar(xeroTenantId, payRunCalendar); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createLeaveType: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createPayRunCalendar: " + e.Message ); } } } @@ -12016,7 +12136,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -12034,12 +12154,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createLeaveType: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createPayRunCalendar: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -12049,18 +12169,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $leaveType = ::Object::LeaveType->new(); # LeaveType | +my $payRunCalendar = ::Object::PayRunCalendar->new(); # PayRunCalendar | eval { - my $result = $api_instance->createLeaveType(xeroTenantId => $xeroTenantId, leaveType => $leaveType); + my $result = $api_instance->createPayRunCalendar(xeroTenantId => $xeroTenantId, payRunCalendar => $payRunCalendar); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createLeaveType: $@\n"; + warn "Exception when calling PayrollNzApi->createPayRunCalendar: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -12073,25 +12193,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -leaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true } # LeaveType | +payRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" } # PayRunCalendar | try: - # create a new leave type - api_response = api_instance.create_leave_type(xeroTenantId, leaveType) + # create a new payrun calendar + api_response = api_instance.create_pay_run_calendar(xeroTenantId, payRunCalendar) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createLeaveType: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createPayRunCalendar: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let leaveType = { "name": "My wqwhhiktun Leave", "isPaidLeave": false, "showOnPayslip": true }; // LeaveType
    +    let payRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" }; // PayRunCalendar
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createLeaveType(xeroTenantId, leaveType, &context).wait();
    +    let result = client.createPayRunCalendar(xeroTenantId, payRunCalendar, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -12122,7 +12242,7 @@ 

    Parameters

    - + @@ -12204,27 +12324,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/paytemplateearnings"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Reimbursements"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -12402,20 +12522,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - array[EarningsTemplate] earningsTemplate = [{"ratePerUnit":20.0,"numberOfUnits":8.0,"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5"},{"ratePerUnit":0.0,"numberOfUnits":8.0,"earningsRateID":"65b83d94-f20f-45e1-85ae-387fcf460c26"}]; // array[EarningsTemplate] | + Reimbursement reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" }; // Reimbursement | try { - EmployeeEarningsTemplates result = apiInstance.createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate); + ReimbursementObject result = apiInstance.createReimbursement(xeroTenantId, reimbursement); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createMultipleEmployeeEarningsTemplate"); + System.err.println("Exception when calling PayrollNzApi#createReimbursement"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -12423,39 +12542,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - array[EarningsTemplate] earningsTemplate = [{"ratePerUnit":20.0,"numberOfUnits":8.0,"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5"},{"ratePerUnit":0.0,"numberOfUnits":8.0,"earningsRateID":"65b83d94-f20f-45e1-85ae-387fcf460c26"}]; // array[EarningsTemplate] | + Reimbursement reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" }; // Reimbursement | try { - EmployeeEarningsTemplates result = apiInstance.createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate); + ReimbursementObject result = apiInstance.createReimbursement(xeroTenantId, reimbursement); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createMultipleEmployeeEarningsTemplate"); + System.err.println("Exception when calling PayrollNzApi#createReimbursement"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
    -array[EarningsTemplate] *earningsTemplate = [{"ratePerUnit":20.0,"numberOfUnits":8.0,"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5"},{"ratePerUnit":0.0,"numberOfUnits":8.0,"earningsRateID":"65b83d94-f20f-45e1-85ae-387fcf460c26"}]; // 
    +Reimbursement *reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" }; // 
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// creates multiple employee earnings template records
    -[apiInstance createMultipleEmployeeEarningsTemplateWith:xeroTenantId
    -    employeeId:employeeId
    -    earningsTemplate:earningsTemplate
    -              completionHandler: ^(EmployeeEarningsTemplates output, NSError* error) {
    +// create a new reimbursement
    +[apiInstance createReimbursementWith:xeroTenantId
    +    reimbursement:reimbursement
    +              completionHandler: ^(ReimbursementObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -12466,7 +12582,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -12476,42 +12592,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object -const earningsTemplate = [{"ratePerUnit":20.0,"numberOfUnits":8.0,"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5"},{"ratePerUnit":0.0,"numberOfUnits":8.0,"earningsRateID":"65b83d94-f20f-45e1-85ae-387fcf460c26"}]; // {array[EarningsTemplate]} +const reimbursement: Reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" }; // {Reimbursement} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + + try { - const response: any = await xero.accountingApi.createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate); + const response = await xero.accountingApi.createReimbursement(xeroTenantId, reimbursement); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -12520,7 +12618,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createMultipleEmployeeEarningsTemplateExample + public class createReimbursementExample { public void main() { @@ -12530,18 +12628,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var employeeId = new UUID(); // UUID | Employee id for single object (default to null) - var earningsTemplate = new array[EarningsTemplate](); // array[EarningsTemplate] | + var reimbursement = new Reimbursement(); // Reimbursement | try { - // creates multiple employee earnings template records - EmployeeEarningsTemplates result = apiInstance.createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate); + // create a new reimbursement + ReimbursementObject result = apiInstance.createReimbursement(xeroTenantId, reimbursement); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createMultipleEmployeeEarningsTemplate: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createReimbursement: " + e.Message ); } } } @@ -12549,7 +12646,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -12567,12 +12664,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createMultipleEmployeeEarningsTemplate: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createReimbursement: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -12582,19 +12679,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object -my $earningsTemplate = [::Object::array[EarningsTemplate]->new()]; # array[EarningsTemplate] | +my $reimbursement = ::Object::Reimbursement->new(); # Reimbursement | eval { - my $result = $api_instance->createMultipleEmployeeEarningsTemplate(xeroTenantId => $xeroTenantId, employeeId => $employeeId, earningsTemplate => $earningsTemplate); + my $result = $api_instance->createReimbursement(xeroTenantId => $xeroTenantId, reimbursement => $reimbursement); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createMultipleEmployeeEarningsTemplate: $@\n"; + warn "Exception when calling PayrollNzApi->createReimbursement: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -12607,27 +12703,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) -earningsTemplate = [{"ratePerUnit":20.0,"numberOfUnits":8.0,"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5"},{"ratePerUnit":0.0,"numberOfUnits":8.0,"earningsRateID":"65b83d94-f20f-45e1-85ae-387fcf460c26"}] # array[EarningsTemplate] | +reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" } # Reimbursement | try: - # creates multiple employee earnings template records - api_response = api_instance.create_multiple_employee_earnings_template(xeroTenantId, employeeId, earningsTemplate) + # create a new reimbursement + api_response = api_instance.create_reimbursement(xeroTenantId, reimbursement) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createMultipleEmployeeEarningsTemplate: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createReimbursement: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    -    let earningsTemplate = [{"ratePerUnit":20.0,"numberOfUnits":8.0,"earningsRateID":"f9d8f5b5-9049-47f4-8541-35e200f750a5"},{"ratePerUnit":0.0,"numberOfUnits":8.0,"earningsRateID":"65b83d94-f20f-45e1-85ae-387fcf460c26"}]; // array[EarningsTemplate]
    +    let reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" }; // Reimbursement
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createMultipleEmployeeEarningsTemplate(xeroTenantId, employeeId, earningsTemplate, &context).wait();
    +    let result = client.createReimbursement(xeroTenantId, reimbursement, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -12639,47 +12733,14 @@ 

    Scopes

    -
    +
    @@ -11622,12 +11759,12 @@

    Parameters

    Name Description
    employment *
    payRun *
    - Employment + PayRun
    @@ -11645,9 +11782,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/Employment" + "$ref" : "#/components/schemas/PayRun" }, - "example" : "{ \"payrollCalendarID\": \"9aa56064-990f-4ad3-a189-d966d8f6a030\", \"startDate\": \"2020-09-02\" }" + "example" : "{ \"payrollCalendarID\": \"9aa56064-990f-4ad3-a189-d966d8f6a030\", \"periodStartDate\": \"2020-09-08\", \"periodEndDate\": \"2020-09-15\", \"paymentDate\": \"2020-09-20\", \"payRunStatus\": \"Draft\", \"payRunType\": \"Scheduled\", \"calendarType\": \"Weekly\" }" } }, "required" : true @@ -11663,12 +11800,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_createEmployment_employment'); + var result = $('#d2e199_createPayRun_payRun'); result.empty(); result.append(view.render()); }); -
    +
    -
    +
    @@ -12149,12 +12269,12 @@

    Parameters

    Name Description
    leaveType *
    payRunCalendar *
    - LeaveType + PayRunCalendar
    @@ -12172,9 +12292,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/LeaveType" + "$ref" : "#/components/schemas/PayRunCalendar" }, - "example" : "{ \"name\": \"My wqwhhiktun Leave\", \"isPaidLeave\": false, \"showOnPayslip\": true }" + "example" : "{ \"name\": \"My Weekly Cal\", \"calendarType\": \"Weekly\", \"periodStartDate\": \"2020-05-01\", \"paymentDate\": \"2020-05-15\" }" } }, "required" : true @@ -12190,12 +12310,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_createLeaveType_leaveType'); + var result = $('#d2e199_createPayRunCalendar_payRunCalendar'); result.empty(); result.append(view.render()); }); -
    +
    - - + +
    payroll.employeesGrant read-write access to payroll employeespayroll.settingsGrant read-write access to payroll settings

    Parameters

    -
    Path parameters
    - - - - - - - - - -
    NameDescription
    EmployeeId* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Employee id for single object -
    -
    -
    - Required -
    -
    -
    -
    Header parameters
    @@ -12691,7 +12752,7 @@

    Parameters

    - + @@ -12773,27 +12834,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/PayRuns"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/superannuations"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -12971,19 +13032,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - PayRun payRun = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2020-09-08", "periodEndDate": "2020-09-15", "paymentDate": "2020-09-20", "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly" }; // PayRun | + Benefit benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 }; // Benefit | try { - PayRunObject result = apiInstance.createPayRun(xeroTenantId, payRun); + SuperannuationObject result = apiInstance.createSuperannuation(xeroTenantId, benefit); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createPayRun"); + System.err.println("Exception when calling PayrollNzApi#createSuperannuation"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -12991,36 +13052,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - PayRun payRun = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2020-09-08", "periodEndDate": "2020-09-15", "paymentDate": "2020-09-20", "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly" }; // PayRun | + Benefit benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 }; // Benefit | try { - PayRunObject result = apiInstance.createPayRun(xeroTenantId, payRun); + SuperannuationObject result = apiInstance.createSuperannuation(xeroTenantId, benefit); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createPayRun"); + System.err.println("Exception when calling PayrollNzApi#createSuperannuation"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -PayRun *payRun = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2020-09-08", "periodEndDate": "2020-09-15", "paymentDate": "2020-09-20", "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly" }; // 
    +Benefit *benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 }; // 
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// create a pay run
    -[apiInstance createPayRunWith:xeroTenantId
    -    payRun:payRun
    -              completionHandler: ^(PayRunObject output, NSError* error) {
    +// create a new superannuation
    +[apiInstance createSuperannuationWith:xeroTenantId
    +    benefit:benefit
    +              completionHandler: ^(SuperannuationObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -13031,7 +13092,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -13041,41 +13102,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const payRun:PayRun = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2020-09-08", "periodEndDate": "2020-09-15", "paymentDate": "2020-09-20", "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly" }; // {PayRun} +const benefit: Benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 }; // {Benefit} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + + try { - const response: any = await xero.accountingApi.createPayRun(xeroTenantId, payRun); + const response = await xero.accountingApi.createSuperannuation(xeroTenantId, benefit); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -13084,7 +13128,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createPayRunExample + public class createSuperannuationExample { public void main() { @@ -13094,17 +13138,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var payRun = new PayRun(); // PayRun | + var benefit = new Benefit(); // Benefit | try { - // create a pay run - PayRunObject result = apiInstance.createPayRun(xeroTenantId, payRun); + // create a new superannuation + SuperannuationObject result = apiInstance.createSuperannuation(xeroTenantId, benefit); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createPayRun: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createSuperannuation: " + e.Message ); } } } @@ -13112,7 +13156,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -13130,12 +13174,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createPayRun: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createSuperannuation: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -13145,18 +13189,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $payRun = ::Object::PayRun->new(); # PayRun | +my $benefit = ::Object::Benefit->new(); # Benefit | eval { - my $result = $api_instance->createPayRun(xeroTenantId => $xeroTenantId, payRun => $payRun); + my $result = $api_instance->createSuperannuation(xeroTenantId => $xeroTenantId, benefit => $benefit); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createPayRun: $@\n"; + warn "Exception when calling PayrollNzApi->createSuperannuation: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -13169,25 +13213,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -payRun = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2020-09-08", "periodEndDate": "2020-09-15", "paymentDate": "2020-09-20", "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly" } # PayRun | +benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 } # Benefit | try: - # create a pay run - api_response = api_instance.create_pay_run(xeroTenantId, payRun) + # create a new superannuation + api_response = api_instance.create_superannuation(xeroTenantId, benefit) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createPayRun: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createSuperannuation: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let payRun = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "periodStartDate": "2020-09-08", "periodEndDate": "2020-09-15", "paymentDate": "2020-09-20", "payRunStatus": "Draft", "payRunType": "Scheduled", "calendarType": "Weekly" }; // PayRun
    +    let benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 }; // Benefit
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createPayRun(xeroTenantId, payRun, &context).wait();
    +    let result = client.createSuperannuation(xeroTenantId, benefit, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -13199,8 +13243,8 @@ 

    Scopes

    -
    +
    @@ -12718,12 +12779,12 @@

    Parameters

    Name Description
    earningsTemplate *
    reimbursement *
    - array[EarningsTemplate] + Reimbursement
    @@ -12741,9 +12802,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/EarningsTemplates" + "$ref" : "#/components/schemas/Reimbursement" }, - "example" : "[{\"ratePerUnit\":20.0,\"numberOfUnits\":8.0,\"earningsRateID\":\"f9d8f5b5-9049-47f4-8541-35e200f750a5\"},{\"ratePerUnit\":0.0,\"numberOfUnits\":8.0,\"earningsRateID\":\"65b83d94-f20f-45e1-85ae-387fcf460c26\"}]" + "example" : "{ \"name\": \"My new Reimburse\", \"accountID\": \"fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488\", \"reimbursementCategory\": \"GSTInclusive\", \"calculationType\": \"FixedAmount\" }" } }, "required" : true @@ -12759,12 +12820,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_createMultipleEmployeeEarningsTemplate_earningsTemplate'); + var result = $('#d2e199_createReimbursement_reimbursement'); result.empty(); result.append(view.render()); }); -
    +
    - - + +
    payroll.payrunsGrant read-write access to payroll payrunspayroll.settingsGrant read-write access to payroll settings
    @@ -13218,7 +13262,7 @@

    Parameters

    -
    +
    @@ -13245,12 +13289,12 @@

    Parameters

    Name Description - payRun * + benefit *
    - PayRun + Benefit
    @@ -13268,9 +13312,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/PayRun" + "$ref" : "#/components/schemas/Benefit" }, - "example" : "{ \"payrollCalendarID\": \"9aa56064-990f-4ad3-a189-d966d8f6a030\", \"periodStartDate\": \"2020-09-08\", \"periodEndDate\": \"2020-09-15\", \"paymentDate\": \"2020-09-20\", \"payRunStatus\": \"Draft\", \"payRunType\": \"Scheduled\", \"calendarType\": \"Weekly\" }" + "example" : "{ \"name\": \"SidSaver\", \"category\": \"Other\", \"liabilityAccountId\": \"568f2e9a-0870-46cc-8678-f83f132ed4e3\", \"expenseAccountId\": \"e4eb36f6-97e3-4427-a394-dd4e1b355c2e\", \"CalculationTypeNZ\": \"FixedAmount\", \"standardAmount\": 10 }" } }, "required" : true @@ -13286,12 +13330,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_createPayRun_payRun'); + var result = $('#d2e199_createSuperannuation_benefit'); result.empty(); result.append(view.render()); }); -
    +
    @@ -13300,27 +13344,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/PayRunCalendars"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Timesheets"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -13498,19 +13542,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - PayRunCalendar payRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" }; // PayRunCalendar | + Timesheet timesheet = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "startDate": "2020-04-13", "endDate": "2020-04-19", "timesheetLines": [ { "date": "2020-04-13", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 8 }, { "date": "2020-04-15", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 6 } ] }; // Timesheet | try { - PayRunCalendarObject result = apiInstance.createPayRunCalendar(xeroTenantId, payRunCalendar); + TimesheetObject result = apiInstance.createTimesheet(xeroTenantId, timesheet); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createPayRunCalendar"); + System.err.println("Exception when calling PayrollNzApi#createTimesheet"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -13518,36 +13562,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - PayRunCalendar payRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" }; // PayRunCalendar | + Timesheet timesheet = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "startDate": "2020-04-13", "endDate": "2020-04-19", "timesheetLines": [ { "date": "2020-04-13", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 8 }, { "date": "2020-04-15", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 6 } ] }; // Timesheet | try { - PayRunCalendarObject result = apiInstance.createPayRunCalendar(xeroTenantId, payRunCalendar); + TimesheetObject result = apiInstance.createTimesheet(xeroTenantId, timesheet); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createPayRunCalendar"); + System.err.println("Exception when calling PayrollNzApi#createTimesheet"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -PayRunCalendar *payRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" }; // 
    +Timesheet *timesheet = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "startDate": "2020-04-13", "endDate": "2020-04-19", "timesheetLines": [ { "date": "2020-04-13", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 8 }, { "date": "2020-04-15", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 6 } ] }; // 
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// create a new payrun calendar
    -[apiInstance createPayRunCalendarWith:xeroTenantId
    -    payRunCalendar:payRunCalendar
    -              completionHandler: ^(PayRunCalendarObject output, NSError* error) {
    +// create a new timesheet
    +[apiInstance createTimesheetWith:xeroTenantId
    +    timesheet:timesheet
    +              completionHandler: ^(TimesheetObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -13558,7 +13602,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -13568,41 +13612,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const payRunCalendar:PayRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" }; // {PayRunCalendar} +const timesheet: Timesheet = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "startDate": "2020-04-13", "endDate": "2020-04-19", "timesheetLines": [ { "date": "2020-04-13", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 8 }, { "date": "2020-04-15", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 6 } ] }; // {Timesheet} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + + try { - const response: any = await xero.accountingApi.createPayRunCalendar(xeroTenantId, payRunCalendar); + const response = await xero.accountingApi.createTimesheet(xeroTenantId, timesheet); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -13611,7 +13638,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createPayRunCalendarExample + public class createTimesheetExample { public void main() { @@ -13621,17 +13648,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var payRunCalendar = new PayRunCalendar(); // PayRunCalendar | + var timesheet = new Timesheet(); // Timesheet | try { - // create a new payrun calendar - PayRunCalendarObject result = apiInstance.createPayRunCalendar(xeroTenantId, payRunCalendar); + // create a new timesheet + TimesheetObject result = apiInstance.createTimesheet(xeroTenantId, timesheet); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createPayRunCalendar: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createTimesheet: " + e.Message ); } } } @@ -13639,7 +13666,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -13657,12 +13684,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createPayRunCalendar: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createTimesheet: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -13672,18 +13699,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $payRunCalendar = ::Object::PayRunCalendar->new(); # PayRunCalendar | +my $timesheet = ::Object::Timesheet->new(); # Timesheet | eval { - my $result = $api_instance->createPayRunCalendar(xeroTenantId => $xeroTenantId, payRunCalendar => $payRunCalendar); + my $result = $api_instance->createTimesheet(xeroTenantId => $xeroTenantId, timesheet => $timesheet); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createPayRunCalendar: $@\n"; + warn "Exception when calling PayrollNzApi->createTimesheet: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -13696,25 +13723,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -payRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" } # PayRunCalendar | +timesheet = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "startDate": "2020-04-13", "endDate": "2020-04-19", "timesheetLines": [ { "date": "2020-04-13", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 8 }, { "date": "2020-04-15", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 6 } ] } # Timesheet | try: - # create a new payrun calendar - api_response = api_instance.create_pay_run_calendar(xeroTenantId, payRunCalendar) + # create a new timesheet + api_response = api_instance.create_timesheet(xeroTenantId, timesheet) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createPayRunCalendar: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createTimesheet: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let payRunCalendar = { "name": "My Weekly Cal", "calendarType": "Weekly", "periodStartDate": "2020-05-01", "paymentDate": "2020-05-15" }; // PayRunCalendar
    +    let timesheet = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "startDate": "2020-04-13", "endDate": "2020-04-19", "timesheetLines": [ { "date": "2020-04-13", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 8 }, { "date": "2020-04-15", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 6 } ] }; // Timesheet
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createPayRunCalendar(xeroTenantId, payRunCalendar, &context).wait();
    +    let result = client.createTimesheet(xeroTenantId, timesheet, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -13726,8 +13753,8 @@ 

    Scopes

    - - + +
    payroll.settingsGrant read-write access to payroll settingspayroll.timesheetsGrant read-write access to payroll timesheets
    @@ -13745,7 +13772,7 @@

    Parameters

    -
    +
    @@ -13772,12 +13799,12 @@

    Parameters

    Name Description - payRunCalendar * + timesheet *
    - PayRunCalendar + Timesheet
    @@ -13795,9 +13822,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/PayRunCalendar" + "$ref" : "#/components/schemas/Timesheet" }, - "example" : "{ \"name\": \"My Weekly Cal\", \"calendarType\": \"Weekly\", \"periodStartDate\": \"2020-05-01\", \"paymentDate\": \"2020-05-15\" }" + "example" : "{ \"payrollCalendarID\": \"9aa56064-990f-4ad3-a189-d966d8f6a030\", \"employeeID\": \"68342973-c405-4b86-b5d3-d7b877c27995\", \"startDate\": \"2020-04-13\", \"endDate\": \"2020-04-19\", \"timesheetLines\": [ { \"date\": \"2020-04-13\", \"earningsRateID\": \"f9d8f5b5-9049-47f4-8541-35e200f750a5\", \"numberOfUnits\": 8 }, { \"date\": \"2020-04-15\", \"earningsRateID\": \"f9d8f5b5-9049-47f4-8541-35e200f750a5\", \"numberOfUnits\": 6 } ] }" } }, "required" : true @@ -13813,12 +13840,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_createPayRunCalendar_payRunCalendar'); + var result = $('#d2e199_createTimesheet_timesheet'); result.empty(); result.append(view.render()); }); -
    +
    @@ -13827,27 +13854,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Reimbursements"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Timesheets/{TimesheetID}/Lines"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -14025,19 +14052,20 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Reimbursement reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" }; // Reimbursement | + UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet + TimesheetLine timesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 }; // TimesheetLine | try { - ReimbursementObject result = apiInstance.createReimbursement(xeroTenantId, reimbursement); + TimesheetLineObject result = apiInstance.createTimesheetLine(xeroTenantId, timesheetID, timesheetLine); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createReimbursement"); + System.err.println("Exception when calling PayrollNzApi#createTimesheetLine"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -14045,36 +14073,39 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Reimbursement reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" }; // Reimbursement | + UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet + TimesheetLine timesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 }; // TimesheetLine | try { - ReimbursementObject result = apiInstance.createReimbursement(xeroTenantId, reimbursement); + TimesheetLineObject result = apiInstance.createTimesheetLine(xeroTenantId, timesheetID, timesheetLine); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createReimbursement"); + System.err.println("Exception when calling PayrollNzApi#createTimesheetLine"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -Reimbursement *reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" }; // 
    +UUID *timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet (default to null)
    +TimesheetLine *timesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 }; // 
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// create a new reimbursement
    -[apiInstance createReimbursementWith:xeroTenantId
    -    reimbursement:reimbursement
    -              completionHandler: ^(ReimbursementObject output, NSError* error) {
    +// create a new timesheet line
    +[apiInstance createTimesheetLineWith:xeroTenantId
    +    timesheetID:timesheetID
    +    timesheetLine:timesheetLine
    +              completionHandler: ^(TimesheetLineObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -14085,7 +14116,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -14095,41 +14126,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const reimbursement:Reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" }; // {Reimbursement} +const timesheetLine: TimesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 }; // {TimesheetLine} +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const timesheetID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet + + try { - const response: any = await xero.accountingApi.createReimbursement(xeroTenantId, reimbursement); + const response = await xero.accountingApi.createTimesheetLine(xeroTenantId, timesheetID, timesheetLine); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -14138,7 +14153,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createReimbursementExample + public class createTimesheetLineExample { public void main() { @@ -14148,17 +14163,18 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var reimbursement = new Reimbursement(); // Reimbursement | + var timesheetID = new UUID(); // UUID | Identifier for the timesheet (default to null) + var timesheetLine = new TimesheetLine(); // TimesheetLine | try { - // create a new reimbursement - ReimbursementObject result = apiInstance.createReimbursement(xeroTenantId, reimbursement); + // create a new timesheet line + TimesheetLineObject result = apiInstance.createTimesheetLine(xeroTenantId, timesheetID, timesheetLine); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createReimbursement: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.createTimesheetLine: " + e.Message ); } } } @@ -14166,7 +14182,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -14184,12 +14200,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createReimbursement: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->createTimesheetLine: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -14199,18 +14215,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $reimbursement = ::Object::Reimbursement->new(); # Reimbursement | +my $timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet +my $timesheetLine = ::Object::TimesheetLine->new(); # TimesheetLine | eval { - my $result = $api_instance->createReimbursement(xeroTenantId => $xeroTenantId, reimbursement => $reimbursement); + my $result = $api_instance->createTimesheetLine(xeroTenantId => $xeroTenantId, timesheetID => $timesheetID, timesheetLine => $timesheetLine); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createReimbursement: $@\n"; + warn "Exception when calling PayrollNzApi->createTimesheetLine: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -14223,25 +14240,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" } # Reimbursement | +timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet (default to null) +timesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 } # TimesheetLine | try: - # create a new reimbursement - api_response = api_instance.create_reimbursement(xeroTenantId, reimbursement) + # create a new timesheet line + api_response = api_instance.create_timesheet_line(xeroTenantId, timesheetID, timesheetLine) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createReimbursement: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createTimesheetLine: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let reimbursement = { "name": "My new Reimburse", "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488", "reimbursementCategory": "GSTInclusive", "calculationType": "FixedAmount" }; // Reimbursement
    +    let timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    +    let timesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 }; // TimesheetLine
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createReimbursement(xeroTenantId, reimbursement, &context).wait();
    +    let result = client.createTimesheetLine(xeroTenantId, timesheetID, timesheetLine, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -14253,14 +14272,47 @@ 

    Scopes

    - - + +
    payroll.settingsGrant read-write access to payroll settingspayroll.timesheetsGrant read-write access to payroll timesheets

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    TimesheetID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Identifier for the timesheet +
    +
    +
    + Required +
    +
    +
    +
    Header parameters
    @@ -14272,7 +14324,7 @@

    Parameters

    - + @@ -14354,27 +14406,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/superannuations"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/PayTemplates/earnings/{PayTemplateEarningID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -14552,19 +14604,20 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Benefit benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 }; // Benefit | + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + UUID payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single pay template earnings object try { - SuperannuationObject result = apiInstance.createSuperannuation(xeroTenantId, benefit); + EarningsTemplateObject result = apiInstance.deleteEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createSuperannuation"); + System.err.println("Exception when calling PayrollNzApi#deleteEmployeeEarningsTemplate"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -14572,36 +14625,39 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Benefit benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 }; // Benefit | + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + UUID payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single pay template earnings object try { - SuperannuationObject result = apiInstance.createSuperannuation(xeroTenantId, benefit); + EarningsTemplateObject result = apiInstance.deleteEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createSuperannuation"); + System.err.println("Exception when calling PayrollNzApi#deleteEmployeeEarningsTemplate"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -Benefit *benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 }; // 
    +UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
    +UUID *payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // Id for single pay template earnings object (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// create a new superannuation
    -[apiInstance createSuperannuationWith:xeroTenantId
    -    benefit:benefit
    -              completionHandler: ^(SuperannuationObject output, NSError* error) {
    +// deletes an employee earnings template record
    +[apiInstance deleteEmployeeEarningsTemplateWith:xeroTenantId
    +    employeeId:employeeId
    +    payTemplateEarningID:payTemplateEarningID
    +              completionHandler: ^(EarningsTemplateObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -14612,7 +14668,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -14622,41 +14678,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const benefit:Benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 }; // {Benefit} + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object +const payTemplateEarningID = "3fa85f64-5717-4562-b3fc-2c963f66afa6"; // {UUID} Id for single pay template earnings object + try { - const response: any = await xero.accountingApi.createSuperannuation(xeroTenantId, benefit); + const response = await xero.accountingApi.deleteEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -14665,7 +14705,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createSuperannuationExample + public class deleteEmployeeEarningsTemplateExample { public void main() { @@ -14675,17 +14715,18 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var benefit = new Benefit(); // Benefit | + var employeeId = new UUID(); // UUID | Employee id for single object (default to null) + var payTemplateEarningID = new UUID(); // UUID | Id for single pay template earnings object (default to null) try { - // create a new superannuation - SuperannuationObject result = apiInstance.createSuperannuation(xeroTenantId, benefit); + // deletes an employee earnings template record + EarningsTemplateObject result = apiInstance.deleteEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createSuperannuation: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.deleteEmployeeEarningsTemplate: " + e.Message ); } } } @@ -14693,7 +14734,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -14711,12 +14752,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createSuperannuation: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->deleteEmployeeEarningsTemplate: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -14726,18 +14767,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $benefit = ::Object::Benefit->new(); # Benefit | +my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object +my $payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; # UUID | Id for single pay template earnings object eval { - my $result = $api_instance->createSuperannuation(xeroTenantId => $xeroTenantId, benefit => $benefit); + my $result = $api_instance->deleteEmployeeEarningsTemplate(xeroTenantId => $xeroTenantId, employeeId => $employeeId, payTemplateEarningID => $payTemplateEarningID); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createSuperannuation: $@\n"; + warn "Exception when calling PayrollNzApi->deleteEmployeeEarningsTemplate: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -14750,25 +14792,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 } # Benefit | +employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) +payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6 # UUID | Id for single pay template earnings object (default to null) try: - # create a new superannuation - api_response = api_instance.create_superannuation(xeroTenantId, benefit) + # deletes an employee earnings template record + api_response = api_instance.delete_employee_earnings_template(xeroTenantId, employeeId, payTemplateEarningID) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createSuperannuation: %s\n" % e)
    + print("Exception when calling PayrollNzApi->deleteEmployeeEarningsTemplate: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let benefit = { "name": "SidSaver", "category": "Other", "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3", "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e", "CalculationTypeNZ": "FixedAmount", "standardAmount": 10 }; // Benefit
    +    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    +    let payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createSuperannuation(xeroTenantId, benefit, &context).wait();
    +    let result = client.deleteEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -14780,34 +14824,62 @@ 

    Scopes

    -
    +
    @@ -14299,12 +14351,12 @@

    Parameters

    Name Description
    reimbursement *
    timesheetLine *
    - Reimbursement + TimesheetLine
    @@ -14322,9 +14374,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/Reimbursement" + "$ref" : "#/components/schemas/TimesheetLine" }, - "example" : "{ \"name\": \"My new Reimburse\", \"accountID\": \"fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488\", \"reimbursementCategory\": \"GSTInclusive\", \"calculationType\": \"FixedAmount\" }" + "example" : "{ \"date\": \"2020-08-03\", \"earningsRateID\": \"f9d8f5b5-9049-47f4-8541-35e200f750a5\", \"numberOfUnits\": 1 }" } }, "required" : true @@ -14340,12 +14392,12 @@

    Parameters

    } var view = new JSONSchemaView(schema,2,{isBodyParam: true}); - var result = $('#d2e199_createReimbursement_reimbursement'); + var result = $('#d2e199_createTimesheetLine_timesheetLine'); result.empty(); result.append(view.render()); }); -
    +
    - - + +
    payroll.settingsGrant read-write access to payroll settingspayroll.employeesGrant read-write access to payroll employees

    Parameters

    - -
    Header parameters
    +
    Path parameters
    - - - - - + + + + + + + + +
    NameDescription
    Xero-Tenant-Id*
    NameDescription
    EmployeeId* -
    +
    - String + UUID + + (uuid) +
    -Xero identifier for Tenant +Employee id for single object +
    +
    +
    + Required +
    +
    +
    +
    PayTemplateEarningID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Id for single pay template earnings object
    @@ -14820,88 +14892,62 @@

    Parameters

    -
    Body parameters
    +
    Header parameters
    - +
    Name Description
    benefit *
    Xero-Tenant-Id* -
    + + +
    +
    - Benefit + String
    - +Xero identifier for Tenant
    Required
    - - -
    +
    + - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Timesheets"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/Leave/{LeaveID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -15079,19 +15056,20 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Timesheet timesheet = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "startDate": "2020-04-13", "endDate": "2020-04-19", "timesheetLines": [ { "date": "2020-04-13", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 8 }, { "date": "2020-04-15", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 6 } ] }; // Timesheet | + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + UUID leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; // UUID | Leave id for single object try { - TimesheetObject result = apiInstance.createTimesheet(xeroTenantId, timesheet); + EmployeeLeaveObject result = apiInstance.deleteEmployeeLeave(xeroTenantId, employeeId, leaveID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createTimesheet"); + System.err.println("Exception when calling PayrollNzApi#deleteEmployeeLeave"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -15099,36 +15077,39 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Timesheet timesheet = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "startDate": "2020-04-13", "endDate": "2020-04-19", "timesheetLines": [ { "date": "2020-04-13", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 8 }, { "date": "2020-04-15", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 6 } ] }; // Timesheet | + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + UUID leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; // UUID | Leave id for single object try { - TimesheetObject result = apiInstance.createTimesheet(xeroTenantId, timesheet); + EmployeeLeaveObject result = apiInstance.deleteEmployeeLeave(xeroTenantId, employeeId, leaveID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createTimesheet"); + System.err.println("Exception when calling PayrollNzApi#deleteEmployeeLeave"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -Timesheet *timesheet = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "startDate": "2020-04-13", "endDate": "2020-04-19", "timesheetLines": [ { "date": "2020-04-13", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 8 }, { "date": "2020-04-15", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 6 } ] }; // 
    +UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
    +UUID *leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; // Leave id for single object (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// create a new timesheet
    -[apiInstance createTimesheetWith:xeroTenantId
    -    timesheet:timesheet
    -              completionHandler: ^(TimesheetObject output, NSError* error) {
    +// deletes an employee leave record
    +[apiInstance deleteEmployeeLeaveWith:xeroTenantId
    +    employeeId:employeeId
    +    leaveID:leaveID
    +              completionHandler: ^(EmployeeLeaveObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -15139,7 +15120,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -15149,41 +15130,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const timesheet:Timesheet = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "startDate": "2020-04-13", "endDate": "2020-04-19", "timesheetLines": [ { "date": "2020-04-13", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 8 }, { "date": "2020-04-15", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 6 } ] }; // {Timesheet} + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object +const leaveID = "c4be24e5-e840-4c92-9eaa-2d86cd596314"; // {UUID} Leave id for single object + try { - const response: any = await xero.accountingApi.createTimesheet(xeroTenantId, timesheet); + const response = await xero.accountingApi.deleteEmployeeLeave(xeroTenantId, employeeId, leaveID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -15192,7 +15157,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createTimesheetExample + public class deleteEmployeeLeaveExample { public void main() { @@ -15202,17 +15167,18 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var timesheet = new Timesheet(); // Timesheet | + var employeeId = new UUID(); // UUID | Employee id for single object (default to null) + var leaveID = new UUID(); // UUID | Leave id for single object (default to null) try { - // create a new timesheet - TimesheetObject result = apiInstance.createTimesheet(xeroTenantId, timesheet); + // deletes an employee leave record + EmployeeLeaveObject result = apiInstance.deleteEmployeeLeave(xeroTenantId, employeeId, leaveID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createTimesheet: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.deleteEmployeeLeave: " + e.Message ); } } } @@ -15220,7 +15186,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -15238,12 +15204,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createTimesheet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->deleteEmployeeLeave: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -15253,18 +15219,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $timesheet = ::Object::Timesheet->new(); # Timesheet | +my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object +my $leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; # UUID | Leave id for single object eval { - my $result = $api_instance->createTimesheet(xeroTenantId => $xeroTenantId, timesheet => $timesheet); + my $result = $api_instance->deleteEmployeeLeave(xeroTenantId => $xeroTenantId, employeeId => $employeeId, leaveID => $leaveID); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createTimesheet: $@\n"; + warn "Exception when calling PayrollNzApi->deleteEmployeeLeave: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -15277,25 +15244,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -timesheet = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "startDate": "2020-04-13", "endDate": "2020-04-19", "timesheetLines": [ { "date": "2020-04-13", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 8 }, { "date": "2020-04-15", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 6 } ] } # Timesheet | +employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) +leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314 # UUID | Leave id for single object (default to null) try: - # create a new timesheet - api_response = api_instance.create_timesheet(xeroTenantId, timesheet) + # deletes an employee leave record + api_response = api_instance.delete_employee_leave(xeroTenantId, employeeId, leaveID) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createTimesheet: %s\n" % e)
    + print("Exception when calling PayrollNzApi->deleteEmployeeLeave: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let timesheet = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995", "startDate": "2020-04-13", "endDate": "2020-04-19", "timesheetLines": [ { "date": "2020-04-13", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 8 }, { "date": "2020-04-15", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 6 } ] }; // Timesheet
    +    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    +    let leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; // UUID
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createTimesheet(xeroTenantId, timesheet, &context).wait();
    +    let result = client.deleteEmployeeLeave(xeroTenantId, employeeId, leaveID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -15307,34 +15276,62 @@ 

    Scopes

    - - + +
    payroll.timesheetsGrant read-write access to payroll timesheetspayroll.employeesGrant read-write access to payroll employees

    Parameters

    - -
    Header parameters
    +
    Path parameters
    - - - - - + + + + + + + + +
    NameDescription
    Xero-Tenant-Id*
    NameDescription
    EmployeeId* -
    +
    - String + UUID + + (uuid) +
    -Xero identifier for Tenant +Employee id for single object +
    +
    +
    + Required +
    +
    +
    +
    LeaveID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Leave id for single object
    @@ -15347,88 +15344,62 @@

    Parameters

    -
    Body parameters
    +
    Header parameters
    - +
    Name Description
    timesheet *
    Xero-Tenant-Id* -
    + + +
    +
    - Timesheet + String
    - +Xero identifier for Tenant
    Required
    - - -
    +
    + - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Timesheets/{TimesheetID}/Lines"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/SalaryAndWages/{SalaryAndWagesID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -15606,20 +15508,20 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet - TimesheetLine timesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 }; // TimesheetLine | + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + UUID salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single salary and wages object try { - TimesheetLineObject result = apiInstance.createTimesheetLine(xeroTenantId, timesheetID, timesheetLine); + SalaryAndWageObject result = apiInstance.deleteEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createTimesheetLine"); + System.err.println("Exception when calling PayrollNzApi#deleteEmployeeSalaryAndWage"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -15627,39 +15529,39 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet - TimesheetLine timesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 }; // TimesheetLine | + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + UUID salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single salary and wages object try { - TimesheetLineObject result = apiInstance.createTimesheetLine(xeroTenantId, timesheetID, timesheetLine); + SalaryAndWageObject result = apiInstance.deleteEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#createTimesheetLine"); + System.err.println("Exception when calling PayrollNzApi#deleteEmployeeSalaryAndWage"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet (default to null)
    -TimesheetLine *timesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 }; // 
    +UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
    +UUID *salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // Id for single salary and wages object (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// create a new timesheet line
    -[apiInstance createTimesheetLineWith:xeroTenantId
    -    timesheetID:timesheetID
    -    timesheetLine:timesheetLine
    -              completionHandler: ^(TimesheetLineObject output, NSError* error) {
    +// deletes an employee salary and wages record
    +[apiInstance deleteEmployeeSalaryAndWageWith:xeroTenantId
    +    employeeId:employeeId
    +    salaryAndWagesID:salaryAndWagesID
    +              completionHandler: ^(SalaryAndWageObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -15670,7 +15572,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -15680,42 +15582,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const timesheetID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet -const timesheetLine:TimesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 }; // {TimesheetLine} + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object +const salaryAndWagesID = "3fa85f64-5717-4562-b3fc-2c963f66afa6"; // {UUID} Id for single salary and wages object + try { - const response: any = await xero.accountingApi.createTimesheetLine(xeroTenantId, timesheetID, timesheetLine); + const response = await xero.accountingApi.deleteEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -15724,7 +15609,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class createTimesheetLineExample + public class deleteEmployeeSalaryAndWageExample { public void main() { @@ -15734,18 +15619,18 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var timesheetID = new UUID(); // UUID | Identifier for the timesheet (default to null) - var timesheetLine = new TimesheetLine(); // TimesheetLine | + var employeeId = new UUID(); // UUID | Employee id for single object (default to null) + var salaryAndWagesID = new UUID(); // UUID | Id for single salary and wages object (default to null) try { - // create a new timesheet line - TimesheetLineObject result = apiInstance.createTimesheetLine(xeroTenantId, timesheetID, timesheetLine); + // deletes an employee salary and wages record + SalaryAndWageObject result = apiInstance.deleteEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.createTimesheetLine: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.deleteEmployeeSalaryAndWage: " + e.Message ); } } } @@ -15753,7 +15638,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -15771,12 +15656,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->createTimesheetLine: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->deleteEmployeeSalaryAndWage: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -15786,19 +15671,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet -my $timesheetLine = ::Object::TimesheetLine->new(); # TimesheetLine | +my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object +my $salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; # UUID | Id for single salary and wages object eval { - my $result = $api_instance->createTimesheetLine(xeroTenantId => $xeroTenantId, timesheetID => $timesheetID, timesheetLine => $timesheetLine); + my $result = $api_instance->deleteEmployeeSalaryAndWage(xeroTenantId => $xeroTenantId, employeeId => $employeeId, salaryAndWagesID => $salaryAndWagesID); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->createTimesheetLine: $@\n"; + warn "Exception when calling PayrollNzApi->deleteEmployeeSalaryAndWage: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -15811,27 +15696,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet (default to null) -timesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 } # TimesheetLine | +employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) +salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6 # UUID | Id for single salary and wages object (default to null) try: - # create a new timesheet line - api_response = api_instance.create_timesheet_line(xeroTenantId, timesheetID, timesheetLine) + # deletes an employee salary and wages record + api_response = api_instance.delete_employee_salary_and_wage(xeroTenantId, employeeId, salaryAndWagesID) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->createTimesheetLine: %s\n" % e)
    + print("Exception when calling PayrollNzApi->deleteEmployeeSalaryAndWage: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    -    let timesheetLine = { "date": "2020-08-03", "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5", "numberOfUnits": 1 }; // TimesheetLine
    +    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    +    let salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.createTimesheetLine(xeroTenantId, timesheetID, timesheetLine, &context).wait();
    +    let result = client.deleteEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -15843,8 +15728,8 @@ 

    Scopes

    - - + +
    payroll.timesheetsGrant read-write access to payroll timesheetspayroll.employeesGrant read-write access to payroll employees
    @@ -15857,11 +15742,11 @@

    Parameters

    Name Description - TimesheetID* + EmployeeId* -
    +
    @@ -15872,7 +15757,7 @@

    Parameters

    -Identifier for the timesheet +Employee id for single object
    @@ -15883,27 +15768,22 @@

    Parameters

    - - -
    Header parameters
    - - - - - - +
    NameDescription
    Xero-Tenant-Id*
    SalaryAndWagesID* -
    +
    - String + UUID + + (uuid) +
    -Xero identifier for Tenant +Id for single salary and wages object
    @@ -15916,88 +15796,62 @@

    Parameters

    -
    Body parameters
    +
    Header parameters
    - +
    Name Description
    timesheetLine *
    Xero-Tenant-Id* -
    + + +
    +
    - TimesheetLine + String
    - +Xero identifier for Tenant
    Required
    - - -
    +
    + - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/PayTemplates/earnings/{PayTemplateEarningID}"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Timesheets/{TimesheetID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -16175,20 +15960,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - UUID payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single pay template earnings object + UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet try { - EarningsTemplateObject result = apiInstance.deleteEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID); + TimesheetLine result = apiInstance.deleteTimesheet(xeroTenantId, timesheetID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#deleteEmployeeEarningsTemplate"); + System.err.println("Exception when calling PayrollNzApi#deleteTimesheet"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -16196,39 +15980,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - UUID payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single pay template earnings object + UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet try { - EarningsTemplateObject result = apiInstance.deleteEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID); + TimesheetLine result = apiInstance.deleteTimesheet(xeroTenantId, timesheetID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#deleteEmployeeEarningsTemplate"); + System.err.println("Exception when calling PayrollNzApi#deleteTimesheet"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
    -UUID *payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // Id for single pay template earnings object (default to null)
    +UUID *timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// deletes an employee earnings template record
    -[apiInstance deleteEmployeeEarningsTemplateWith:xeroTenantId
    -    employeeId:employeeId
    -    payTemplateEarningID:payTemplateEarningID
    -              completionHandler: ^(EarningsTemplateObject output, NSError* error) {
    +// delete a timesheet
    +[apiInstance deleteTimesheetWith:xeroTenantId
    +    timesheetID:timesheetID
    +              completionHandler: ^(TimesheetLine output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -16239,7 +16020,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -16249,42 +16030,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object -const payTemplateEarningID = "3fa85f64-5717-4562-b3fc-2c963f66afa6"; // {UUID} Id for single pay template earnings object + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const timesheetID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet + try { - const response: any = await xero.accountingApi.deleteEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID); + const response = await xero.accountingApi.deleteTimesheet(xeroTenantId, timesheetID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -16293,7 +16056,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class deleteEmployeeEarningsTemplateExample + public class deleteTimesheetExample { public void main() { @@ -16303,18 +16066,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var employeeId = new UUID(); // UUID | Employee id for single object (default to null) - var payTemplateEarningID = new UUID(); // UUID | Id for single pay template earnings object (default to null) + var timesheetID = new UUID(); // UUID | Identifier for the timesheet (default to null) try { - // deletes an employee earnings template record - EarningsTemplateObject result = apiInstance.deleteEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID); + // delete a timesheet + TimesheetLine result = apiInstance.deleteTimesheet(xeroTenantId, timesheetID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.deleteEmployeeEarningsTemplate: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.deleteTimesheet: " + e.Message ); } } } @@ -16322,7 +16084,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -16340,12 +16102,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->deleteEmployeeEarningsTemplate: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->deleteTimesheet: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -16355,19 +16117,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object -my $payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; # UUID | Id for single pay template earnings object +my $timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet eval { - my $result = $api_instance->deleteEmployeeEarningsTemplate(xeroTenantId => $xeroTenantId, employeeId => $employeeId, payTemplateEarningID => $payTemplateEarningID); + my $result = $api_instance->deleteTimesheet(xeroTenantId => $xeroTenantId, timesheetID => $timesheetID); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->deleteEmployeeEarningsTemplate: $@\n"; + warn "Exception when calling PayrollNzApi->deleteTimesheet: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -16380,27 +16141,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) -payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6 # UUID | Id for single pay template earnings object (default to null) +timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet (default to null) try: - # deletes an employee earnings template record - api_response = api_instance.delete_employee_earnings_template(xeroTenantId, employeeId, payTemplateEarningID) + # delete a timesheet + api_response = api_instance.delete_timesheet(xeroTenantId, timesheetID) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->deleteEmployeeEarningsTemplate: %s\n" % e)
    + print("Exception when calling PayrollNzApi->deleteTimesheet: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    -    let payTemplateEarningID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID
    +    let timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.deleteEmployeeEarningsTemplate(xeroTenantId, employeeId, payTemplateEarningID, &context).wait();
    +    let result = client.deleteTimesheet(xeroTenantId, timesheetID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -16412,8 +16171,8 @@ 

    Scopes

    - - + +
    payroll.employeesGrant read-write access to payroll employeespayroll.timesheetsGrant read-write access to payroll timesheets
    @@ -16426,37 +16185,11 @@

    Parameters

    Name Description - EmployeeId* - - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Employee id for single object -
    -
    -
    - Required -
    -
    -
    - - - - PayTemplateEarningID* + TimesheetID* -
    +
    @@ -16467,7 +16200,7 @@

    Parameters

    -Id for single pay template earnings object +Identifier for the timesheet
    @@ -16490,7 +16223,7 @@

    Parameters

    -
    +
    @@ -16515,27 +16248,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/Leave/{LeaveID}"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Timesheets/{TimesheetID}/Lines/{TimesheetLineID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -16644,20 +16446,20 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - UUID leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; // UUID | Leave id for single object + UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet + UUID timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet line try { - EmployeeLeaveObject result = apiInstance.deleteEmployeeLeave(xeroTenantId, employeeId, leaveID); + TimesheetLine result = apiInstance.deleteTimesheetLine(xeroTenantId, timesheetID, timesheetLineID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#deleteEmployeeLeave"); + System.err.println("Exception when calling PayrollNzApi#deleteTimesheetLine"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -16665,39 +16467,39 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - UUID leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; // UUID | Leave id for single object + UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet + UUID timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet line try { - EmployeeLeaveObject result = apiInstance.deleteEmployeeLeave(xeroTenantId, employeeId, leaveID); + TimesheetLine result = apiInstance.deleteTimesheetLine(xeroTenantId, timesheetID, timesheetLineID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#deleteEmployeeLeave"); + System.err.println("Exception when calling PayrollNzApi#deleteTimesheetLine"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
    -UUID *leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; // Leave id for single object (default to null)
    +UUID *timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet (default to null)
    +UUID *timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet line (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// deletes an employee leave record
    -[apiInstance deleteEmployeeLeaveWith:xeroTenantId
    -    employeeId:employeeId
    -    leaveID:leaveID
    -              completionHandler: ^(EmployeeLeaveObject output, NSError* error) {
    +// delete a timesheet line
    +[apiInstance deleteTimesheetLineWith:xeroTenantId
    +    timesheetID:timesheetID
    +    timesheetLineID:timesheetLineID
    +              completionHandler: ^(TimesheetLine output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -16708,7 +16510,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -16718,42 +16520,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object -const leaveID = "c4be24e5-e840-4c92-9eaa-2d86cd596314"; // {UUID} Leave id for single object + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const timesheetID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet +const timesheetLineID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet line + try { - const response: any = await xero.accountingApi.deleteEmployeeLeave(xeroTenantId, employeeId, leaveID); + const response = await xero.accountingApi.deleteTimesheetLine(xeroTenantId, timesheetID, timesheetLineID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -16762,7 +16547,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class deleteEmployeeLeaveExample + public class deleteTimesheetLineExample { public void main() { @@ -16772,18 +16557,18 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var employeeId = new UUID(); // UUID | Employee id for single object (default to null) - var leaveID = new UUID(); // UUID | Leave id for single object (default to null) + var timesheetID = new UUID(); // UUID | Identifier for the timesheet (default to null) + var timesheetLineID = new UUID(); // UUID | Identifier for the timesheet line (default to null) try { - // deletes an employee leave record - EmployeeLeaveObject result = apiInstance.deleteEmployeeLeave(xeroTenantId, employeeId, leaveID); + // delete a timesheet line + TimesheetLine result = apiInstance.deleteTimesheetLine(xeroTenantId, timesheetID, timesheetLineID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.deleteEmployeeLeave: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.deleteTimesheetLine: " + e.Message ); } } } @@ -16791,7 +16576,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -16809,12 +16594,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->deleteEmployeeLeave: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->deleteTimesheetLine: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -16824,19 +16609,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object -my $leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; # UUID | Leave id for single object +my $timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet +my $timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet line eval { - my $result = $api_instance->deleteEmployeeLeave(xeroTenantId => $xeroTenantId, employeeId => $employeeId, leaveID => $leaveID); + my $result = $api_instance->deleteTimesheetLine(xeroTenantId => $xeroTenantId, timesheetID => $timesheetID, timesheetLineID => $timesheetLineID); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->deleteEmployeeLeave: $@\n"; + warn "Exception when calling PayrollNzApi->deleteTimesheetLine: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -16849,27 +16634,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) -leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314 # UUID | Leave id for single object (default to null) +timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet (default to null) +timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet line (default to null) try: - # deletes an employee leave record - api_response = api_instance.delete_employee_leave(xeroTenantId, employeeId, leaveID) + # delete a timesheet line + api_response = api_instance.delete_timesheet_line(xeroTenantId, timesheetID, timesheetLineID) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->deleteEmployeeLeave: %s\n" % e)
    + print("Exception when calling PayrollNzApi->deleteTimesheetLine: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    -    let leaveID = c4be24e5-e840-4c92-9eaa-2d86cd596314; // UUID
    +    let timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    +    let timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.deleteEmployeeLeave(xeroTenantId, employeeId, leaveID, &context).wait();
    +    let result = client.deleteTimesheetLine(xeroTenantId, timesheetID, timesheetLineID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -16881,8 +16666,8 @@ 

    Scopes

    - - + +
    payroll.employeesGrant read-write access to payroll employeespayroll.timesheetsGrant read-write access to payroll timesheets
    @@ -16895,11 +16680,11 @@

    Parameters

    Name Description - EmployeeId* + TimesheetID* -
    +
    @@ -16910,7 +16695,7 @@

    Parameters

    -Employee id for single object +Identifier for the timesheet
    @@ -16921,11 +16706,11 @@

    Parameters

    - LeaveID* + TimesheetLineID* -
    +
    @@ -16936,7 +16721,7 @@

    Parameters

    -Leave id for single object +Identifier for the timesheet line
    @@ -16959,7 +16744,7 @@

    Parameters

    -
    +
    @@ -16984,27 +16769,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/SalaryAndWages/{SalaryAndWagesID}"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Deductions/{deductionId}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -17113,20 +16967,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - UUID salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single salary and wages object + UUID deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the deduction try { - SalaryAndWageObject result = apiInstance.deleteEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID); + DeductionObject result = apiInstance.getDeduction(xeroTenantId, deductionId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#deleteEmployeeSalaryAndWage"); + System.err.println("Exception when calling PayrollNzApi#getDeduction"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -17134,39 +16987,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - UUID salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single salary and wages object + UUID deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the deduction try { - SalaryAndWageObject result = apiInstance.deleteEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID); + DeductionObject result = apiInstance.getDeduction(xeroTenantId, deductionId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#deleteEmployeeSalaryAndWage"); + System.err.println("Exception when calling PayrollNzApi#getDeduction"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
    -UUID *salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // Id for single salary and wages object (default to null)
    +UUID *deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the deduction (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// deletes an employee salary and wages record
    -[apiInstance deleteEmployeeSalaryAndWageWith:xeroTenantId
    -    employeeId:employeeId
    -    salaryAndWagesID:salaryAndWagesID
    -              completionHandler: ^(SalaryAndWageObject output, NSError* error) {
    +// retrieve a single deduction by id
    +[apiInstance getDeductionWith:xeroTenantId
    +    deductionId:deductionId
    +              completionHandler: ^(DeductionObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -17177,7 +17027,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -17187,42 +17037,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object -const salaryAndWagesID = "3fa85f64-5717-4562-b3fc-2c963f66afa6"; // {UUID} Id for single salary and wages object + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const deductionId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the deduction + try { - const response: any = await xero.accountingApi.deleteEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID); + const response = await xero.accountingApi.getDeduction(xeroTenantId, deductionId); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -17231,7 +17063,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class deleteEmployeeSalaryAndWageExample + public class getDeductionExample { public void main() { @@ -17241,18 +17073,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var employeeId = new UUID(); // UUID | Employee id for single object (default to null) - var salaryAndWagesID = new UUID(); // UUID | Id for single salary and wages object (default to null) + var deductionId = new UUID(); // UUID | Identifier for the deduction (default to null) try { - // deletes an employee salary and wages record - SalaryAndWageObject result = apiInstance.deleteEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID); + // retrieve a single deduction by id + DeductionObject result = apiInstance.getDeduction(xeroTenantId, deductionId); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.deleteEmployeeSalaryAndWage: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getDeduction: " + e.Message ); } } } @@ -17260,7 +17091,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -17278,12 +17109,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->deleteEmployeeSalaryAndWage: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getDeduction: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -17293,19 +17124,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object -my $salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; # UUID | Id for single salary and wages object +my $deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the deduction eval { - my $result = $api_instance->deleteEmployeeSalaryAndWage(xeroTenantId => $xeroTenantId, employeeId => $employeeId, salaryAndWagesID => $salaryAndWagesID); + my $result = $api_instance->getDeduction(xeroTenantId => $xeroTenantId, deductionId => $deductionId); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->deleteEmployeeSalaryAndWage: $@\n"; + warn "Exception when calling PayrollNzApi->getDeduction: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -17318,27 +17148,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) -salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6 # UUID | Id for single salary and wages object (default to null) +deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the deduction (default to null) try: - # deletes an employee salary and wages record - api_response = api_instance.delete_employee_salary_and_wage(xeroTenantId, employeeId, salaryAndWagesID) + # retrieve a single deduction by id + api_response = api_instance.get_deduction(xeroTenantId, deductionId) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->deleteEmployeeSalaryAndWage: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getDeduction: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    -    let salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID
    +    let deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.deleteEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID, &context).wait();
    +    let result = client.getDeduction(xeroTenantId, deductionId, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -17350,8 +17178,13 @@ 

    Scopes

    - - + + + + + + +
    payroll.employeesGrant read-write access to payroll employeespayroll.settings.readGrant read-only access to payroll settings
    payroll.settingsGrant read-write access to payroll settings
    @@ -17364,37 +17197,11 @@

    Parameters

    Name Description - EmployeeId* - - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Employee id for single object -
    -
    -
    - Required -
    -
    -
    - - - - SalaryAndWagesID* + deductionId* -
    +
    @@ -17405,7 +17212,7 @@

    Parameters

    -Id for single salary and wages object +Identifier for the deduction
    @@ -17428,7 +17235,7 @@

    Parameters

    -
    +
    @@ -17453,27 +17260,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Timesheets/{TimesheetID}"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Deductions?page=56"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -17582,19 +17389,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet + Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - TimesheetLine result = apiInstance.deleteTimesheet(xeroTenantId, timesheetID); + Deductions result = apiInstance.getDeductions(xeroTenantId, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#deleteTimesheet"); + System.err.println("Exception when calling PayrollNzApi#getDeductions"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -17602,36 +17409,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet + Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - TimesheetLine result = apiInstance.deleteTimesheet(xeroTenantId, timesheetID); + Deductions result = apiInstance.getDeductions(xeroTenantId, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#deleteTimesheet"); + System.err.println("Exception when calling PayrollNzApi#getDeductions"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet (default to null)
    +Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// delete a timesheet
    -[apiInstance deleteTimesheetWith:xeroTenantId
    -    timesheetID:timesheetID
    -              completionHandler: ^(TimesheetLine output, NSError* error) {
    +// searches deductions
    +[apiInstance getDeductionsWith:xeroTenantId
    +    page:page
    +              completionHandler: ^(Deductions output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -17642,7 +17449,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -17652,41 +17459,26 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const timesheetID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + +const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + + try { - const response: any = await xero.accountingApi.deleteTimesheet(xeroTenantId, timesheetID); + const response = await xero.accountingApi.getDeductions(xeroTenantId, page); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -17695,7 +17487,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class deleteTimesheetExample + public class getDeductionsExample { public void main() { @@ -17705,17 +17497,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var timesheetID = new UUID(); // UUID | Identifier for the timesheet (default to null) + var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) try { - // delete a timesheet - TimesheetLine result = apiInstance.deleteTimesheet(xeroTenantId, timesheetID); + // searches deductions + Deductions result = apiInstance.getDeductions(xeroTenantId, page); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.deleteTimesheet: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getDeductions: " + e.Message ); } } } @@ -17723,7 +17515,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -17741,12 +17533,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->deleteTimesheet: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getDeductions: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -17756,18 +17548,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet +my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. eval { - my $result = $api_instance->deleteTimesheet(xeroTenantId => $xeroTenantId, timesheetID => $timesheetID); + my $result = $api_instance->getDeductions(xeroTenantId => $xeroTenantId, page => $page); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->deleteTimesheet: $@\n"; + warn "Exception when calling PayrollNzApi->getDeductions: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -17780,25 +17572,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet (default to null) +page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) try: - # delete a timesheet - api_response = api_instance.delete_timesheet(xeroTenantId, timesheetID) + # searches deductions + api_response = api_instance.get_deductions(xeroTenantId, page=page) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->deleteTimesheet: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getDeductions: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    +    let page = 56; // Integer
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.deleteTimesheet(xeroTenantId, timesheetID, &context).wait();
    +    let result = client.getDeductions(xeroTenantId, page, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -17810,36 +17602,39 @@ 

    Scopes

    - - + + + + + + +
    payroll.timesheetsGrant read-write access to payroll timesheetspayroll.settings.readGrant read-only access to payroll settings
    payroll.settingsGrant read-write access to payroll settings

    Parameters

    -
    Path parameters
    + +
    Header parameters
    - - - - - + + + + +
    NameDescription
    TimesheetID*
    NameDescription
    Xero-Tenant-Id* -
    +
    - UUID + String - - (uuid) -
    -Identifier for the timesheet +Xero identifier for Tenant
    @@ -17852,62 +17647,58 @@

    Parameters

    -
    Header parameters
    + + +
    Query parameters
    - +
    Name Description
    Xero-Tenant-Id*
    page -
    +
    - String + Integer
    -Xero identifier for Tenant +Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
    -
    - Required -
    - - - - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Timesheets/{TimesheetID}/Lines/{TimesheetLineID}"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/EarningsRates/{EarningsRateID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -18085,20 +17807,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet - UUID timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet line + UUID earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the earnings rate try { - TimesheetLine result = apiInstance.deleteTimesheetLine(xeroTenantId, timesheetID, timesheetLineID); + EarningsRateObject result = apiInstance.getEarningsRate(xeroTenantId, earningsRateID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#deleteTimesheetLine"); + System.err.println("Exception when calling PayrollNzApi#getEarningsRate"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -18106,39 +17827,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet - UUID timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the timesheet line + UUID earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the earnings rate try { - TimesheetLine result = apiInstance.deleteTimesheetLine(xeroTenantId, timesheetID, timesheetLineID); + EarningsRateObject result = apiInstance.getEarningsRate(xeroTenantId, earningsRateID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#deleteTimesheetLine"); + System.err.println("Exception when calling PayrollNzApi#getEarningsRate"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet (default to null)
    -UUID *timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the timesheet line (default to null)
    +UUID *earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the earnings rate (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// delete a timesheet line
    -[apiInstance deleteTimesheetLineWith:xeroTenantId
    -    timesheetID:timesheetID
    -    timesheetLineID:timesheetLineID
    -              completionHandler: ^(TimesheetLine output, NSError* error) {
    +// retrieve a single earnings rates by id
    +[apiInstance getEarningsRateWith:xeroTenantId
    +    earningsRateID:earningsRateID
    +              completionHandler: ^(EarningsRateObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -18149,7 +17867,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -18159,42 +17877,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const timesheetID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet -const timesheetLineID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the timesheet line + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const earningsRateID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the earnings rate + try { - const response: any = await xero.accountingApi.deleteTimesheetLine(xeroTenantId, timesheetID, timesheetLineID); + const response = await xero.accountingApi.getEarningsRate(xeroTenantId, earningsRateID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -18203,7 +17903,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class deleteTimesheetLineExample + public class getEarningsRateExample { public void main() { @@ -18213,18 +17913,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var timesheetID = new UUID(); // UUID | Identifier for the timesheet (default to null) - var timesheetLineID = new UUID(); // UUID | Identifier for the timesheet line (default to null) + var earningsRateID = new UUID(); // UUID | Identifier for the earnings rate (default to null) try { - // delete a timesheet line - TimesheetLine result = apiInstance.deleteTimesheetLine(xeroTenantId, timesheetID, timesheetLineID); + // retrieve a single earnings rates by id + EarningsRateObject result = apiInstance.getEarningsRate(xeroTenantId, earningsRateID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.deleteTimesheetLine: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getEarningsRate: " + e.Message ); } } } @@ -18232,7 +17931,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -18250,12 +17949,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->deleteTimesheetLine: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getEarningsRate: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -18265,19 +17964,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet -my $timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the timesheet line +my $earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the earnings rate eval { - my $result = $api_instance->deleteTimesheetLine(xeroTenantId => $xeroTenantId, timesheetID => $timesheetID, timesheetLineID => $timesheetLineID); + my $result = $api_instance->getEarningsRate(xeroTenantId => $xeroTenantId, earningsRateID => $earningsRateID); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->deleteTimesheetLine: $@\n"; + warn "Exception when calling PayrollNzApi->getEarningsRate: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -18290,27 +17988,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet (default to null) -timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the timesheet line (default to null) +earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the earnings rate (default to null) try: - # delete a timesheet line - api_response = api_instance.delete_timesheet_line(xeroTenantId, timesheetID, timesheetLineID) + # retrieve a single earnings rates by id + api_response = api_instance.get_earnings_rate(xeroTenantId, earningsRateID) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->deleteTimesheetLine: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getEarningsRate: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let timesheetID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    -    let timesheetLineID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    +    let earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.deleteTimesheetLine(xeroTenantId, timesheetID, timesheetLineID, &context).wait();
    +    let result = client.getEarningsRate(xeroTenantId, earningsRateID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -18322,8 +18018,13 @@ 

    Scopes

    - - + + + + + + +
    payroll.timesheetsGrant read-write access to payroll timesheetspayroll.settings.readGrant read-only access to payroll settings
    payroll.settingsGrant read-write access to payroll settings
    @@ -18336,37 +18037,11 @@

    Parameters

    Name Description - TimesheetID* - - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Identifier for the timesheet -
    -
    -
    - Required -
    -
    -
    - - - - TimesheetLineID* + EarningsRateID* -
    +
    @@ -18377,7 +18052,7 @@

    Parameters

    -Identifier for the timesheet line +Identifier for the earnings rate
    @@ -18400,7 +18075,7 @@

    Parameters

    -
    +
    @@ -18425,27 +18100,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Deductions/{deductionId}"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/EarningsRates?page=56"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -18623,19 +18229,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the deduction + Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - DeductionObject result = apiInstance.getDeduction(xeroTenantId, deductionId); + EarningsRates result = apiInstance.getEarningsRates(xeroTenantId, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getDeduction"); + System.err.println("Exception when calling PayrollNzApi#getEarningsRates"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -18643,36 +18249,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the deduction + Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - DeductionObject result = apiInstance.getDeduction(xeroTenantId, deductionId); + EarningsRates result = apiInstance.getEarningsRates(xeroTenantId, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getDeduction"); + System.err.println("Exception when calling PayrollNzApi#getEarningsRates"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the deduction (default to null)
    +Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// retrieve a single deduction by id
    -[apiInstance getDeductionWith:xeroTenantId
    -    deductionId:deductionId
    -              completionHandler: ^(DeductionObject output, NSError* error) {
    +// searches earnings rates
    +[apiInstance getEarningsRatesWith:xeroTenantId
    +    page:page
    +              completionHandler: ^(EarningsRates output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -18683,7 +18289,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -18693,41 +18299,26 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const deductionId = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the deduction + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + +const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + + try { - const response: any = await xero.accountingApi.getDeduction(xeroTenantId, deductionId); + const response = await xero.accountingApi.getEarningsRates(xeroTenantId, page); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -18736,7 +18327,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getDeductionExample + public class getEarningsRatesExample { public void main() { @@ -18746,17 +18337,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var deductionId = new UUID(); // UUID | Identifier for the deduction (default to null) + var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) try { - // retrieve a single deduction by id - DeductionObject result = apiInstance.getDeduction(xeroTenantId, deductionId); + // searches earnings rates + EarningsRates result = apiInstance.getEarningsRates(xeroTenantId, page); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getDeduction: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getEarningsRates: " + e.Message ); } } } @@ -18764,7 +18355,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -18782,12 +18373,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getDeduction: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getEarningsRates: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -18797,18 +18388,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the deduction +my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. eval { - my $result = $api_instance->getDeduction(xeroTenantId => $xeroTenantId, deductionId => $deductionId); + my $result = $api_instance->getEarningsRates(xeroTenantId => $xeroTenantId, page => $page); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getDeduction: $@\n"; + warn "Exception when calling PayrollNzApi->getEarningsRates: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -18821,25 +18412,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the deduction (default to null) +page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) try: - # retrieve a single deduction by id - api_response = api_instance.get_deduction(xeroTenantId, deductionId) + # searches earnings rates + api_response = api_instance.get_earnings_rates(xeroTenantId, page=page) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getDeduction: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getEarningsRates: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let deductionId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    +    let page = 56; // Integer
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getDeduction(xeroTenantId, deductionId, &context).wait();
    +    let result = client.getEarningsRates(xeroTenantId, page, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -18864,28 +18455,26 @@ 

    Scopes

    Parameters

    -
    Path parameters
    + +
    Header parameters
    - - - - - + + + + +
    NameDescription
    deductionId*
    NameDescription
    Xero-Tenant-Id* -
    +
    - UUID + String - - (uuid) -
    -Identifier for the deduction +Xero identifier for Tenant
    @@ -18898,62 +18487,58 @@

    Parameters

    -
    Header parameters
    + + +
    Query parameters
    - +
    Name Description
    Xero-Tenant-Id*
    page -
    +
    - String + Integer
    -Xero identifier for Tenant +Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
    -
    - Required -
    - - - - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Deductions?page=56"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -19062,19 +18647,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object try { - Deductions result = apiInstance.getDeductions(xeroTenantId, page); + EmployeeObject result = apiInstance.getEmployee(xeroTenantId, employeeId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getDeductions"); + System.err.println("Exception when calling PayrollNzApi#getEmployee"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -19082,36 +18667,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object try { - Deductions result = apiInstance.getDeductions(xeroTenantId, page); + EmployeeObject result = apiInstance.getEmployee(xeroTenantId, employeeId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getDeductions"); + System.err.println("Exception when calling PayrollNzApi#getEmployee"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
    +UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// searches deductions
    -[apiInstance getDeductionsWith:xeroTenantId
    -    page:page
    -              completionHandler: ^(Deductions output, NSError* error) {
    +// searches employees
    +[apiInstance getEmployeeWith:xeroTenantId
    +    employeeId:employeeId
    +              completionHandler: ^(EmployeeObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -19122,7 +18707,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -19132,42 +18717,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - + const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object try { - const response: any = await xero.accountingApi.getDeductions(xeroTenantId, page); + const response = await xero.accountingApi.getEmployee(xeroTenantId, employeeId); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -19176,7 +18743,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getDeductionsExample + public class getEmployeeExample { public void main() { @@ -19186,17 +18753,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) + var employeeId = new UUID(); // UUID | Employee id for single object (default to null) try { - // searches deductions - Deductions result = apiInstance.getDeductions(xeroTenantId, page); + // searches employees + EmployeeObject result = apiInstance.getEmployee(xeroTenantId, employeeId); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getDeductions: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getEmployee: " + e.Message ); } } } @@ -19204,7 +18771,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -19222,12 +18789,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getDeductions: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getEmployee: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -19237,18 +18804,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object eval { - my $result = $api_instance->getDeductions(xeroTenantId => $xeroTenantId, page => $page); + my $result = $api_instance->getEmployee(xeroTenantId => $xeroTenantId, employeeId => $employeeId); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getDeductions: $@\n"; + warn "Exception when calling PayrollNzApi->getEmployee: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -19261,25 +18828,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) +employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) try: - # searches deductions - api_response = api_instance.get_deductions(xeroTenantId, page=page) + # searches employees + api_response = api_instance.get_employee(xeroTenantId, employeeId) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getDeductions: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getEmployee: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let page = 56; // Integer
    +    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getDeductions(xeroTenantId, page, &context).wait();
    +    let result = client.getEmployee(xeroTenantId, employeeId, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -19291,39 +18858,41 @@ 

    Scopes

    - - + + - - + +
    payroll.settings.readGrant read-only access to payroll settingspayroll.employees.readGrant read-only access to payroll employees
    payroll.settingsGrant read-write access to payroll settingspayroll.employeesGrant read-write access to payroll employees

    Parameters

    - -
    Header parameters
    +
    Path parameters
    - - - - - + + + + +
    NameDescription
    Xero-Tenant-Id*
    NameDescription
    EmployeeId* -
    +
    - String + UUID + + (uuid) +
    -Xero identifier for Tenant +Employee id for single object
    @@ -19336,58 +18905,62 @@

    Parameters

    - - -
    Query parameters
    +
    Header parameters
    - +
    Name Description
    page
    Xero-Tenant-Id* -
    +
    - Integer + String
    -Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +Xero identifier for Tenant
    +
    + Required +
    + + + - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/EarningsRates/{EarningsRateID}"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/LeaveBalances"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -19496,19 +19069,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the earnings rate + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object try { - EarningsRateObject result = apiInstance.getEarningsRate(xeroTenantId, earningsRateID); + EmployeeLeaveBalances result = apiInstance.getEmployeeLeaveBalances(xeroTenantId, employeeId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEarningsRate"); + System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaveBalances"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -19516,36 +19089,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the earnings rate + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object try { - EarningsRateObject result = apiInstance.getEarningsRate(xeroTenantId, earningsRateID); + EmployeeLeaveBalances result = apiInstance.getEmployeeLeaveBalances(xeroTenantId, employeeId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEarningsRate"); + System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaveBalances"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the earnings rate (default to null)
    +UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// retrieve a single earnings rates by id
    -[apiInstance getEarningsRateWith:xeroTenantId
    -    earningsRateID:earningsRateID
    -              completionHandler: ^(EarningsRateObject output, NSError* error) {
    +// search employee leave balances
    +[apiInstance getEmployeeLeaveBalancesWith:xeroTenantId
    +    employeeId:employeeId
    +              completionHandler: ^(EmployeeLeaveBalances output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -19556,7 +19129,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -19566,41 +19139,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const earningsRateID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the earnings rate + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + try { - const response: any = await xero.accountingApi.getEarningsRate(xeroTenantId, earningsRateID); + const response = await xero.accountingApi.getEmployeeLeaveBalances(xeroTenantId, employeeId); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -19609,7 +19165,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getEarningsRateExample + public class getEmployeeLeaveBalancesExample { public void main() { @@ -19619,17 +19175,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var earningsRateID = new UUID(); // UUID | Identifier for the earnings rate (default to null) + var employeeId = new UUID(); // UUID | Employee id for single object (default to null) try { - // retrieve a single earnings rates by id - EarningsRateObject result = apiInstance.getEarningsRate(xeroTenantId, earningsRateID); + // search employee leave balances + EmployeeLeaveBalances result = apiInstance.getEmployeeLeaveBalances(xeroTenantId, employeeId); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getEarningsRate: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getEmployeeLeaveBalances: " + e.Message ); } } } @@ -19637,7 +19193,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -19655,12 +19211,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getEarningsRate: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getEmployeeLeaveBalances: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -19670,18 +19226,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the earnings rate +my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object eval { - my $result = $api_instance->getEarningsRate(xeroTenantId => $xeroTenantId, earningsRateID => $earningsRateID); + my $result = $api_instance->getEmployeeLeaveBalances(xeroTenantId => $xeroTenantId, employeeId => $employeeId); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getEarningsRate: $@\n"; + warn "Exception when calling PayrollNzApi->getEmployeeLeaveBalances: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -19694,25 +19250,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the earnings rate (default to null) +employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) try: - # retrieve a single earnings rates by id - api_response = api_instance.get_earnings_rate(xeroTenantId, earningsRateID) + # search employee leave balances + api_response = api_instance.get_employee_leave_balances(xeroTenantId, employeeId) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getEarningsRate: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getEmployeeLeaveBalances: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let earningsRateID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    +    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getEarningsRate(xeroTenantId, earningsRateID, &context).wait();
    +    let result = client.getEmployeeLeaveBalances(xeroTenantId, employeeId, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -19724,13 +19280,13 @@ 

    Scopes

    - - + + - - + +
    payroll.settings.readGrant read-only access to payroll settingspayroll.employees.readGrant read-only access to payroll employees
    payroll.settingsGrant read-write access to payroll settingspayroll.employeesGrant read-write access to payroll employees
    @@ -19743,11 +19299,11 @@

    Parameters

    Name Description - EarningsRateID* + EmployeeId* -
    +
    @@ -19758,7 +19314,7 @@

    Parameters

    -Identifier for the earnings rate +Employee id for single object
    @@ -19781,7 +19337,7 @@

    Parameters

    -
    +
    @@ -19806,27 +19362,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/EarningsRates?page=56"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/LeavePeriods?startDate=2013-10-20&endDate=Johnson"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -19935,19 +19491,21 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + date startDate = 2013-10-20; // date | Filter by start date + date endDate = Johnson; // date | Filter by end date try { - EarningsRates result = apiInstance.getEarningsRates(xeroTenantId, page); + LeavePeriods result = apiInstance.getEmployeeLeavePeriods(xeroTenantId, employeeId, startDate, endDate); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEarningsRates"); + System.err.println("Exception when calling PayrollNzApi#getEmployeeLeavePeriods"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -19955,36 +19513,42 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + date startDate = 2013-10-20; // date | Filter by start date + date endDate = Johnson; // date | Filter by end date try { - EarningsRates result = apiInstance.getEarningsRates(xeroTenantId, page); + LeavePeriods result = apiInstance.getEmployeeLeavePeriods(xeroTenantId, employeeId, startDate, endDate); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEarningsRates"); + System.err.println("Exception when calling PayrollNzApi#getEmployeeLeavePeriods"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
    +UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
    +date *startDate = 2013-10-20; // Filter by start date (optional) (default to null)
    +date *endDate = Johnson; // Filter by end date (optional) (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// searches earnings rates
    -[apiInstance getEarningsRatesWith:xeroTenantId
    -    page:page
    -              completionHandler: ^(EarningsRates output, NSError* error) {
    +// searches employee leave periods
    +[apiInstance getEmployeeLeavePeriodsWith:xeroTenantId
    +    employeeId:employeeId
    +    startDate:startDate
    +    endDate:endDate
    +              completionHandler: ^(LeavePeriods output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -19995,7 +19559,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -20005,42 +19569,29 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - + const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + +const startDate = new Date("2013-10-20"); // {date} Filter by start date + +const endDate = new Date("Johnson"); // {date} Filter by end date + try { - const response: any = await xero.accountingApi.getEarningsRates(xeroTenantId, page); + const response = await xero.accountingApi.getEmployeeLeavePeriods(xeroTenantId, employeeId, startDate, endDate); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -20049,7 +19600,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getEarningsRatesExample + public class getEmployeeLeavePeriodsExample { public void main() { @@ -20059,17 +19610,19 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) + var employeeId = new UUID(); // UUID | Employee id for single object (default to null) + var startDate = 2013-10-20; // date | Filter by start date (optional) (default to null) + var endDate = Johnson; // date | Filter by end date (optional) (default to null) try { - // searches earnings rates - EarningsRates result = apiInstance.getEarningsRates(xeroTenantId, page); + // searches employee leave periods + LeavePeriods result = apiInstance.getEmployeeLeavePeriods(xeroTenantId, employeeId, startDate, endDate); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getEarningsRates: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getEmployeeLeavePeriods: " + e.Message ); } } } @@ -20077,7 +19630,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -20095,12 +19648,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getEarningsRates: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getEmployeeLeavePeriods: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -20110,18 +19663,20 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object +my $startDate = 2013-10-20; # date | Filter by start date +my $endDate = Johnson; # date | Filter by end date eval { - my $result = $api_instance->getEarningsRates(xeroTenantId => $xeroTenantId, page => $page); + my $result = $api_instance->getEmployeeLeavePeriods(xeroTenantId => $xeroTenantId, employeeId => $employeeId, startDate => $startDate, endDate => $endDate); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getEarningsRates: $@\n"; + warn "Exception when calling PayrollNzApi->getEmployeeLeavePeriods: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -20134,25 +19689,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) +employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) +startDate = 2013-10-20 # date | Filter by start date (optional) (default to null) +endDate = Johnson # date | Filter by end date (optional) (default to null) try: - # searches earnings rates - api_response = api_instance.get_earnings_rates(xeroTenantId, page=page) + # searches employee leave periods + api_response = api_instance.get_employee_leave_periods(xeroTenantId, employeeId, startDate=startDate, endDate=endDate) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getEarningsRates: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getEmployeeLeavePeriods: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let page = 56; // Integer
    +    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    +    let startDate = 2013-10-20; // date
    +    let endDate = Johnson; // date
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getEarningsRates(xeroTenantId, page, &context).wait();
    +    let result = client.getEmployeeLeavePeriods(xeroTenantId, employeeId, startDate, endDate, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -20164,19 +19723,52 @@ 

    Scopes

    - - + + - - + +
    payroll.settings.readGrant read-only access to payroll settingspayroll.employees.readGrant read-only access to payroll employees
    payroll.settingsGrant read-write access to payroll settingspayroll.employeesGrant read-write access to payroll employees

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    EmployeeId* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Employee id for single object +
    +
    +
    + Required +
    +
    +
    +
    Header parameters
    @@ -20188,7 +19780,7 @@

    Parameters

    - + + + + +
    -
    +
    @@ -20217,19 +19809,45 @@

    Parameters

    Name Description
    page
    startDate -
    +
    - Integer + date + + (date) +
    -Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +Filter by start date +
    +
    +
    +
    +
    endDate + + +
    +
    +
    + + date + + + (date) + + +
    +Filter by end date
    @@ -20240,27 +19858,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/LeaveTypes"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -20371,17 +20058,17 @@ 

    Usage and SDK Samples

    String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object try { - EmployeeObject result = apiInstance.getEmployee(xeroTenantId, employeeId); + EmployeeLeaveTypes result = apiInstance.getEmployeeLeaveTypes(xeroTenantId, employeeId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployee"); + System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaveTypes"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -20391,20 +20078,20 @@ 

    Usage and SDK Samples

    String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object try { - EmployeeObject result = apiInstance.getEmployee(xeroTenantId, employeeId); + EmployeeLeaveTypes result = apiInstance.getEmployeeLeaveTypes(xeroTenantId, employeeId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployee"); + System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaveTypes"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -20415,10 +20102,10 @@ 

    Usage and SDK Samples

    PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init]; -// searches employees -[apiInstance getEmployeeWith:xeroTenantId +// searches employee leave types +[apiInstance getEmployeeLeaveTypesWith:xeroTenantId employeeId:employeeId - completionHandler: ^(EmployeeObject output, NSError* error) { + completionHandler: ^(EmployeeLeaveTypes output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -20429,7 +20116,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -20439,41 +20126,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + try { - const response: any = await xero.accountingApi.getEmployee(xeroTenantId, employeeId); + const response = await xero.accountingApi.getEmployeeLeaveTypes(xeroTenantId, employeeId); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -20482,7 +20152,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getEmployeeExample + public class getEmployeeLeaveTypesExample { public void main() { @@ -20496,13 +20166,13 @@

    Usage and SDK Samples

    try { - // searches employees - EmployeeObject result = apiInstance.getEmployee(xeroTenantId, employeeId); + // searches employee leave types + EmployeeLeaveTypes result = apiInstance.getEmployeeLeaveTypes(xeroTenantId, employeeId); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getEmployee: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getEmployeeLeaveTypes: " + e.Message ); } } } @@ -20510,7 +20180,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -20528,12 +20198,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getEmployee: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getEmployeeLeaveTypes: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -20546,15 +20216,15 @@ 

    Usage and SDK Samples

    my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object eval { - my $result = $api_instance->getEmployee(xeroTenantId => $xeroTenantId, employeeId => $employeeId); + my $result = $api_instance->getEmployeeLeaveTypes(xeroTenantId => $xeroTenantId, employeeId => $employeeId); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getEmployee: $@\n"; + warn "Exception when calling PayrollNzApi->getEmployeeLeaveTypes: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -20570,14 +20240,14 @@ 

    Usage and SDK Samples

    employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) try: - # searches employees - api_response = api_instance.get_employee(xeroTenantId, employeeId) + # searches employee leave types + api_response = api_instance.get_employee_leave_types(xeroTenantId, employeeId) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getEmployee: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getEmployeeLeaveTypes: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
    @@ -20585,7 +20255,7 @@ 

    Usage and SDK Samples

    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID let mut context = PayrollNzApi::Context::default(); - let result = client.getEmployee(xeroTenantId, employeeId, &context).wait(); + let result = client.getEmployeeLeaveTypes(xeroTenantId, employeeId, &context).wait(); println!("{:?}", result); } @@ -20620,7 +20290,7 @@

    Parameters

    -
    +
    @@ -20654,7 +20324,7 @@

    Parameters

    -
    +
    @@ -20679,27 +20349,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/LeaveBalances"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/Leave"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -20810,17 +20549,17 @@ 

    Usage and SDK Samples

    String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object try { - EmployeeLeaveBalances result = apiInstance.getEmployeeLeaveBalances(xeroTenantId, employeeId); + EmployeeLeaves result = apiInstance.getEmployeeLeaves(xeroTenantId, employeeId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaveBalances"); + System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaves"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -20830,20 +20569,20 @@ 

    Usage and SDK Samples

    String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object try { - EmployeeLeaveBalances result = apiInstance.getEmployeeLeaveBalances(xeroTenantId, employeeId); + EmployeeLeaves result = apiInstance.getEmployeeLeaves(xeroTenantId, employeeId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaveBalances"); + System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaves"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -20854,10 +20593,10 @@ 

    Usage and SDK Samples

    PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init]; -// search employee leave balances -[apiInstance getEmployeeLeaveBalancesWith:xeroTenantId +// search employee leave records +[apiInstance getEmployeeLeavesWith:xeroTenantId employeeId:employeeId - completionHandler: ^(EmployeeLeaveBalances output, NSError* error) { + completionHandler: ^(EmployeeLeaves output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -20868,7 +20607,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -20878,41 +20617,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + try { - const response: any = await xero.accountingApi.getEmployeeLeaveBalances(xeroTenantId, employeeId); + const response = await xero.accountingApi.getEmployeeLeaves(xeroTenantId, employeeId); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -20921,7 +20643,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getEmployeeLeaveBalancesExample + public class getEmployeeLeavesExample { public void main() { @@ -20935,13 +20657,13 @@

    Usage and SDK Samples

    try { - // search employee leave balances - EmployeeLeaveBalances result = apiInstance.getEmployeeLeaveBalances(xeroTenantId, employeeId); + // search employee leave records + EmployeeLeaves result = apiInstance.getEmployeeLeaves(xeroTenantId, employeeId); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getEmployeeLeaveBalances: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getEmployeeLeaves: " + e.Message ); } } } @@ -20949,7 +20671,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -20967,12 +20689,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getEmployeeLeaveBalances: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getEmployeeLeaves: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -20985,15 +20707,15 @@ 

    Usage and SDK Samples

    my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object eval { - my $result = $api_instance->getEmployeeLeaveBalances(xeroTenantId => $xeroTenantId, employeeId => $employeeId); + my $result = $api_instance->getEmployeeLeaves(xeroTenantId => $xeroTenantId, employeeId => $employeeId); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getEmployeeLeaveBalances: $@\n"; + warn "Exception when calling PayrollNzApi->getEmployeeLeaves: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -21009,14 +20731,14 @@ 

    Usage and SDK Samples

    employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) try: - # search employee leave balances - api_response = api_instance.get_employee_leave_balances(xeroTenantId, employeeId) + # search employee leave records + api_response = api_instance.get_employee_leaves(xeroTenantId, employeeId) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getEmployeeLeaveBalances: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getEmployeeLeaves: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
    @@ -21024,7 +20746,7 @@ 

    Usage and SDK Samples

    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID let mut context = PayrollNzApi::Context::default(); - let result = client.getEmployeeLeaveBalances(xeroTenantId, employeeId, &context).wait(); + let result = client.getEmployeeLeaves(xeroTenantId, employeeId, &context).wait(); println!("{:?}", result); } @@ -21059,7 +20781,7 @@

    Parameters

    -
    +
    @@ -21093,7 +20815,7 @@

    Parameters

    -
    +
    @@ -21118,27 +20840,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/LeavePeriods?startDate=2013-10-20&endDate=Johnson"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/openingBalances"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -21248,20 +20970,18 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - date startDate = 2013-10-20; // date | Filter by start date - date endDate = Johnson; // date | Filter by end date try { - LeavePeriods result = apiInstance.getEmployeeLeavePeriods(xeroTenantId, employeeId, startDate, endDate); + EmployeeOpeningBalancesObject result = apiInstance.getEmployeeOpeningBalances(xeroTenantId, employeeId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeeLeavePeriods"); + System.err.println("Exception when calling PayrollNzApi#getEmployeeOpeningBalances"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -21270,23 +20990,21 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - date startDate = 2013-10-20; // date | Filter by start date - date endDate = Johnson; // date | Filter by end date try { - LeavePeriods result = apiInstance.getEmployeeLeavePeriods(xeroTenantId, employeeId, startDate, endDate); + EmployeeOpeningBalancesObject result = apiInstance.getEmployeeOpeningBalances(xeroTenantId, employeeId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeeLeavePeriods"); + System.err.println("Exception when calling PayrollNzApi#getEmployeeOpeningBalances"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -21294,17 +21012,13 @@ 

    Usage and SDK Samples

    String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null) UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null) -date *startDate = 2013-10-20; // Filter by start date (optional) (default to null) -date *endDate = Johnson; // Filter by end date (optional) (default to null) PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init]; -// searches employee leave periods -[apiInstance getEmployeeLeavePeriodsWith:xeroTenantId +// retrieve employee openingbalances +[apiInstance getEmployeeOpeningBalancesWith:xeroTenantId employeeId:employeeId - startDate:startDate - endDate:endDate - completionHandler: ^(LeavePeriods output, NSError* error) { + completionHandler: ^(EmployeeOpeningBalancesObject output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -21315,7 +21029,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -21325,44 +21039,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object -const startDate = new Date("2013-10-20"); // {date} Filter by start date -const endDate = new Date("Johnson"); // {date} Filter by end date try { - const response: any = await xero.accountingApi.getEmployeeLeavePeriods(xeroTenantId, employeeId, startDate, endDate); + const response = await xero.accountingApi.getEmployeeOpeningBalances(xeroTenantId, employeeId); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -21371,7 +21065,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getEmployeeLeavePeriodsExample + public class getEmployeeOpeningBalancesExample { public void main() { @@ -21382,18 +21076,16 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) var employeeId = new UUID(); // UUID | Employee id for single object (default to null) - var startDate = 2013-10-20; // date | Filter by start date (optional) (default to null) - var endDate = Johnson; // date | Filter by end date (optional) (default to null) try { - // searches employee leave periods - LeavePeriods result = apiInstance.getEmployeeLeavePeriods(xeroTenantId, employeeId, startDate, endDate); + // retrieve employee openingbalances + EmployeeOpeningBalancesObject result = apiInstance.getEmployeeOpeningBalances(xeroTenantId, employeeId); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getEmployeeLeavePeriods: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getEmployeeOpeningBalances: " + e.Message ); } } } @@ -21401,7 +21093,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -21419,12 +21111,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getEmployeeLeavePeriods: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getEmployeeOpeningBalances: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -21435,19 +21127,17 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object -my $startDate = 2013-10-20; # date | Filter by start date -my $endDate = Johnson; # date | Filter by end date eval { - my $result = $api_instance->getEmployeeLeavePeriods(xeroTenantId => $xeroTenantId, employeeId => $employeeId, startDate => $startDate, endDate => $endDate); + my $result = $api_instance->getEmployeeOpeningBalances(xeroTenantId => $xeroTenantId, employeeId => $employeeId); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getEmployeeLeavePeriods: $@\n"; + warn "Exception when calling PayrollNzApi->getEmployeeOpeningBalances: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -21461,28 +21151,24 @@ 

    Usage and SDK Samples

    api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) -startDate = 2013-10-20 # date | Filter by start date (optional) (default to null) -endDate = Johnson # date | Filter by end date (optional) (default to null) try: - # searches employee leave periods - api_response = api_instance.get_employee_leave_periods(xeroTenantId, employeeId, startDate=startDate, endDate=endDate) + # retrieve employee openingbalances + api_response = api_instance.get_employee_opening_balances(xeroTenantId, employeeId) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getEmployeeLeavePeriods: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getEmployeeOpeningBalances: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
         let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    -    let startDate = 2013-10-20; // date
    -    let endDate = Johnson; // date
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getEmployeeLeavePeriods(xeroTenantId, employeeId, startDate, endDate, &context).wait();
    +    let result = client.getEmployeeOpeningBalances(xeroTenantId, employeeId, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -21517,7 +21203,7 @@ 

    Parameters

    -
    +
    @@ -21551,7 +21237,7 @@

    Parameters

    -
    +
    @@ -21574,82 +21260,29 @@

    Parameters

    -
    Query parameters
    - - - - - - - - - - - - - -
    NameDescription
    startDate - - -
    -
    -
    - - date - - - (date) - - -
    -Filter by start date -
    -
    -
    -
    -
    endDate - - -
    -
    -
    - - date - - - (date) - - -
    -Filter by end date -
    -
    -
    -
    -
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/LeaveTypes"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/PayTemplates"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -21829,17 +21393,17 @@ 

    Usage and SDK Samples

    String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object try { - EmployeeLeaveTypes result = apiInstance.getEmployeeLeaveTypes(xeroTenantId, employeeId); + EmployeePayTemplates result = apiInstance.getEmployeePayTemplates(xeroTenantId, employeeId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaveTypes"); + System.err.println("Exception when calling PayrollNzApi#getEmployeePayTemplates"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -21849,20 +21413,20 @@ 

    Usage and SDK Samples

    String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object try { - EmployeeLeaveTypes result = apiInstance.getEmployeeLeaveTypes(xeroTenantId, employeeId); + EmployeePayTemplates result = apiInstance.getEmployeePayTemplates(xeroTenantId, employeeId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaveTypes"); + System.err.println("Exception when calling PayrollNzApi#getEmployeePayTemplates"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -21873,10 +21437,10 @@ 

    Usage and SDK Samples

    PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init]; -// searches employee leave types -[apiInstance getEmployeeLeaveTypesWith:xeroTenantId +// searches employee pay templates +[apiInstance getEmployeePayTemplatesWith:xeroTenantId employeeId:employeeId - completionHandler: ^(EmployeeLeaveTypes output, NSError* error) { + completionHandler: ^(EmployeePayTemplates output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -21887,7 +21451,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -21897,41 +21461,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + try { - const response: any = await xero.accountingApi.getEmployeeLeaveTypes(xeroTenantId, employeeId); + const response = await xero.accountingApi.getEmployeePayTemplates(xeroTenantId, employeeId); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -21940,7 +21487,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getEmployeeLeaveTypesExample + public class getEmployeePayTemplatesExample { public void main() { @@ -21954,13 +21501,13 @@

    Usage and SDK Samples

    try { - // searches employee leave types - EmployeeLeaveTypes result = apiInstance.getEmployeeLeaveTypes(xeroTenantId, employeeId); + // searches employee pay templates + EmployeePayTemplates result = apiInstance.getEmployeePayTemplates(xeroTenantId, employeeId); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getEmployeeLeaveTypes: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getEmployeePayTemplates: " + e.Message ); } } } @@ -21968,7 +21515,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -21986,12 +21533,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getEmployeeLeaveTypes: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getEmployeePayTemplates: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -22004,15 +21551,15 @@ 

    Usage and SDK Samples

    my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object eval { - my $result = $api_instance->getEmployeeLeaveTypes(xeroTenantId => $xeroTenantId, employeeId => $employeeId); + my $result = $api_instance->getEmployeePayTemplates(xeroTenantId => $xeroTenantId, employeeId => $employeeId); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getEmployeeLeaveTypes: $@\n"; + warn "Exception when calling PayrollNzApi->getEmployeePayTemplates: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -22028,14 +21575,14 @@ 

    Usage and SDK Samples

    employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) try: - # searches employee leave types - api_response = api_instance.get_employee_leave_types(xeroTenantId, employeeId) + # searches employee pay templates + api_response = api_instance.get_employee_pay_templates(xeroTenantId, employeeId) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getEmployeeLeaveTypes: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getEmployeePayTemplates: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
    @@ -22043,7 +21590,7 @@ 

    Usage and SDK Samples

    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID let mut context = PayrollNzApi::Context::default(); - let result = client.getEmployeeLeaveTypes(xeroTenantId, employeeId, &context).wait(); + let result = client.getEmployeePayTemplates(xeroTenantId, employeeId, &context).wait(); println!("{:?}", result); } @@ -22078,7 +21625,7 @@

    Parameters

    -
    +
    @@ -22112,7 +21659,7 @@

    Parameters

    -
    +
    @@ -22137,27 +21684,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/Leave"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/PaymentMethods"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -22337,17 +21884,17 @@ 

    Usage and SDK Samples

    String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object try { - EmployeeLeaves result = apiInstance.getEmployeeLeaves(xeroTenantId, employeeId); + PaymentMethodObject result = apiInstance.getEmployeePaymentMethod(xeroTenantId, employeeId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaves"); + System.err.println("Exception when calling PayrollNzApi#getEmployeePaymentMethod"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -22357,20 +21904,20 @@ 

    Usage and SDK Samples

    String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object try { - EmployeeLeaves result = apiInstance.getEmployeeLeaves(xeroTenantId, employeeId); + PaymentMethodObject result = apiInstance.getEmployeePaymentMethod(xeroTenantId, employeeId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeeLeaves"); + System.err.println("Exception when calling PayrollNzApi#getEmployeePaymentMethod"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -22381,10 +21928,10 @@ 

    Usage and SDK Samples

    PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init]; -// search employee leave records -[apiInstance getEmployeeLeavesWith:xeroTenantId +// retrieves an employee's payment method +[apiInstance getEmployeePaymentMethodWith:xeroTenantId employeeId:employeeId - completionHandler: ^(EmployeeLeaves output, NSError* error) { + completionHandler: ^(PaymentMethodObject output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -22395,7 +21942,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -22405,41 +21952,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + try { - const response: any = await xero.accountingApi.getEmployeeLeaves(xeroTenantId, employeeId); + const response = await xero.accountingApi.getEmployeePaymentMethod(xeroTenantId, employeeId); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -22448,7 +21978,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getEmployeeLeavesExample + public class getEmployeePaymentMethodExample { public void main() { @@ -22462,13 +21992,13 @@

    Usage and SDK Samples

    try { - // search employee leave records - EmployeeLeaves result = apiInstance.getEmployeeLeaves(xeroTenantId, employeeId); + // retrieves an employee's payment method + PaymentMethodObject result = apiInstance.getEmployeePaymentMethod(xeroTenantId, employeeId); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getEmployeeLeaves: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getEmployeePaymentMethod: " + e.Message ); } } } @@ -22476,7 +22006,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -22494,12 +22024,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getEmployeeLeaves: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getEmployeePaymentMethod: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -22512,15 +22042,15 @@ 

    Usage and SDK Samples

    my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object eval { - my $result = $api_instance->getEmployeeLeaves(xeroTenantId => $xeroTenantId, employeeId => $employeeId); + my $result = $api_instance->getEmployeePaymentMethod(xeroTenantId => $xeroTenantId, employeeId => $employeeId); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getEmployeeLeaves: $@\n"; + warn "Exception when calling PayrollNzApi->getEmployeePaymentMethod: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -22536,14 +22066,14 @@ 

    Usage and SDK Samples

    employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) try: - # search employee leave records - api_response = api_instance.get_employee_leaves(xeroTenantId, employeeId) + # retrieves an employee's payment method + api_response = api_instance.get_employee_payment_method(xeroTenantId, employeeId) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getEmployeeLeaves: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getEmployeePaymentMethod: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
    @@ -22551,7 +22081,7 @@ 

    Usage and SDK Samples

    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID let mut context = PayrollNzApi::Context::default(); - let result = client.getEmployeeLeaves(xeroTenantId, employeeId, &context).wait(); + let result = client.getEmployeePaymentMethod(xeroTenantId, employeeId, &context).wait(); println!("{:?}", result); } @@ -22586,7 +22116,7 @@

    Parameters

    -
    +
    @@ -22620,7 +22150,7 @@

    Parameters

    -
    +
    @@ -22645,27 +22175,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/openingBalances"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/SalaryAndWages/{SalaryAndWagesID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -22775,18 +22374,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + UUID salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single pay template earnings object try { - EmployeeOpeningBalancesObject result = apiInstance.getEmployeeOpeningBalances(xeroTenantId, employeeId); + SalaryAndWages result = apiInstance.getEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeeOpeningBalances"); + System.err.println("Exception when calling PayrollNzApi#getEmployeeSalaryAndWage"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -22795,21 +22395,22 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + UUID salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single pay template earnings object try { - EmployeeOpeningBalancesObject result = apiInstance.getEmployeeOpeningBalances(xeroTenantId, employeeId); + SalaryAndWages result = apiInstance.getEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeeOpeningBalances"); + System.err.println("Exception when calling PayrollNzApi#getEmployeeSalaryAndWage"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -22817,13 +22418,15 @@ 

    Usage and SDK Samples

    String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null) UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null) +UUID *salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // Id for single pay template earnings object (default to null) PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init]; -// retrieve employee openingbalances -[apiInstance getEmployeeOpeningBalancesWith:xeroTenantId +// get employee salary and wages record by id +[apiInstance getEmployeeSalaryAndWageWith:xeroTenantId employeeId:employeeId - completionHandler: ^(EmployeeOpeningBalancesObject output, NSError* error) { + salaryAndWagesID:salaryAndWagesID + completionHandler: ^(SalaryAndWages output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -22834,7 +22437,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -22844,41 +22447,25 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object +const salaryAndWagesID = "3fa85f64-5717-4562-b3fc-2c963f66afa6"; // {UUID} Id for single pay template earnings object + try { - const response: any = await xero.accountingApi.getEmployeeOpeningBalances(xeroTenantId, employeeId); + const response = await xero.accountingApi.getEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -22887,7 +22474,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getEmployeeOpeningBalancesExample + public class getEmployeeSalaryAndWageExample { public void main() { @@ -22898,16 +22485,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) var employeeId = new UUID(); // UUID | Employee id for single object (default to null) + var salaryAndWagesID = new UUID(); // UUID | Id for single pay template earnings object (default to null) try { - // retrieve employee openingbalances - EmployeeOpeningBalancesObject result = apiInstance.getEmployeeOpeningBalances(xeroTenantId, employeeId); + // get employee salary and wages record by id + SalaryAndWages result = apiInstance.getEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getEmployeeOpeningBalances: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getEmployeeSalaryAndWage: " + e.Message ); } } } @@ -22915,7 +22503,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -22933,12 +22521,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getEmployeeOpeningBalances: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getEmployeeSalaryAndWage: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -22949,17 +22537,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object +my $salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; # UUID | Id for single pay template earnings object eval { - my $result = $api_instance->getEmployeeOpeningBalances(xeroTenantId => $xeroTenantId, employeeId => $employeeId); + my $result = $api_instance->getEmployeeSalaryAndWage(xeroTenantId => $xeroTenantId, employeeId => $employeeId, salaryAndWagesID => $salaryAndWagesID); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getEmployeeOpeningBalances: $@\n"; + warn "Exception when calling PayrollNzApi->getEmployeeSalaryAndWage: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -22973,24 +22562,26 @@ 

    Usage and SDK Samples

    api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) +salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6 # UUID | Id for single pay template earnings object (default to null) try: - # retrieve employee openingbalances - api_response = api_instance.get_employee_opening_balances(xeroTenantId, employeeId) + # get employee salary and wages record by id + api_response = api_instance.get_employee_salary_and_wage(xeroTenantId, employeeId, salaryAndWagesID) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getEmployeeOpeningBalances: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getEmployeeSalaryAndWage: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
         let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    +    let salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getEmployeeOpeningBalances(xeroTenantId, employeeId, &context).wait();
    +    let result = client.getEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -23002,13 +22593,13 @@ 

    Scopes

    - - + + - - + +
    payroll.employees.readGrant read-only access to payroll employeespayroll.employeesGrant read-write access to payroll employees
    payroll.employeesGrant read-write access to payroll employeespayroll.employees.readGrant read-only access to payroll employees
    @@ -23025,7 +22616,7 @@

    Parameters

    -
    +
    @@ -23045,6 +22636,32 @@

    Parameters

    + + + SalaryAndWagesID* + + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Id for single pay template earnings object +
    +
    +
    + Required +
    +
    +
    + @@ -23059,7 +22676,7 @@

    Parameters

    -
    +
    @@ -23084,27 +22701,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/PayTemplates"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/SalaryAndWages?page=56"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -23214,18 +22831,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - EmployeePayTemplates result = apiInstance.getEmployeePayTemplates(xeroTenantId, employeeId); + SalaryAndWages result = apiInstance.getEmployeeSalaryAndWages(xeroTenantId, employeeId, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeePayTemplates"); + System.err.println("Exception when calling PayrollNzApi#getEmployeeSalaryAndWages"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -23234,21 +22852,22 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - EmployeePayTemplates result = apiInstance.getEmployeePayTemplates(xeroTenantId, employeeId); + SalaryAndWages result = apiInstance.getEmployeeSalaryAndWages(xeroTenantId, employeeId, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeePayTemplates"); + System.err.println("Exception when calling PayrollNzApi#getEmployeeSalaryAndWages"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -23256,13 +22875,15 @@ 

    Usage and SDK Samples

    String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null) UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null) +Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init]; -// searches employee pay templates -[apiInstance getEmployeePayTemplatesWith:xeroTenantId +// retrieves an employee's salary and wages +[apiInstance getEmployeeSalaryAndWagesWith:xeroTenantId employeeId:employeeId - completionHandler: ^(EmployeePayTemplates output, NSError* error) { + page:page + completionHandler: ^(SalaryAndWages output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -23273,7 +22894,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -23283,41 +22904,27 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + +const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + + try { - const response: any = await xero.accountingApi.getEmployeePayTemplates(xeroTenantId, employeeId); + const response = await xero.accountingApi.getEmployeeSalaryAndWages(xeroTenantId, employeeId, page); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -23326,7 +22933,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getEmployeePayTemplatesExample + public class getEmployeeSalaryAndWagesExample { public void main() { @@ -23337,16 +22944,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) var employeeId = new UUID(); // UUID | Employee id for single object (default to null) + var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) try { - // searches employee pay templates - EmployeePayTemplates result = apiInstance.getEmployeePayTemplates(xeroTenantId, employeeId); + // retrieves an employee's salary and wages + SalaryAndWages result = apiInstance.getEmployeeSalaryAndWages(xeroTenantId, employeeId, page); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getEmployeePayTemplates: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getEmployeeSalaryAndWages: " + e.Message ); } } } @@ -23354,7 +22962,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -23372,12 +22980,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getEmployeePayTemplates: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getEmployeeSalaryAndWages: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -23388,17 +22996,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object +my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. eval { - my $result = $api_instance->getEmployeePayTemplates(xeroTenantId => $xeroTenantId, employeeId => $employeeId); + my $result = $api_instance->getEmployeeSalaryAndWages(xeroTenantId => $xeroTenantId, employeeId => $employeeId, page => $page); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getEmployeePayTemplates: $@\n"; + warn "Exception when calling PayrollNzApi->getEmployeeSalaryAndWages: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -23412,24 +23021,26 @@ 

    Usage and SDK Samples

    api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) +page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) try: - # searches employee pay templates - api_response = api_instance.get_employee_pay_templates(xeroTenantId, employeeId) + # retrieves an employee's salary and wages + api_response = api_instance.get_employee_salary_and_wages(xeroTenantId, employeeId, page=page) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getEmployeePayTemplates: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getEmployeeSalaryAndWages: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
         let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    +    let page = 56; // Integer
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getEmployeePayTemplates(xeroTenantId, employeeId, &context).wait();
    +    let result = client.getEmployeeSalaryAndWages(xeroTenantId, employeeId, page, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -23464,7 +23075,7 @@ 

    Parameters

    -
    +
    @@ -23498,7 +23109,7 @@

    Parameters

    -
    +
    @@ -23521,29 +23132,56 @@

    Parameters

    +
    Query parameters
    + + + + + + + + + +
    NameDescription
    page + + +
    +
    +
    + + Integer + + +
    +Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +
    +
    +
    +
    +
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/PaymentMethods"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/Tax"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -23723,17 +23361,17 @@ 

    Usage and SDK Samples

    String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object try { - PaymentMethodObject result = apiInstance.getEmployeePaymentMethod(xeroTenantId, employeeId); + EmployeeTaxObject result = apiInstance.getEmployeeTax(xeroTenantId, employeeId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeePaymentMethod"); + System.err.println("Exception when calling PayrollNzApi#getEmployeeTax"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -23743,20 +23381,20 @@ 

    Usage and SDK Samples

    String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object try { - PaymentMethodObject result = apiInstance.getEmployeePaymentMethod(xeroTenantId, employeeId); + EmployeeTaxObject result = apiInstance.getEmployeeTax(xeroTenantId, employeeId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeePaymentMethod"); + System.err.println("Exception when calling PayrollNzApi#getEmployeeTax"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -23767,10 +23405,10 @@ 

    Usage and SDK Samples

    PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init]; -// retrieves an employee's payment method -[apiInstance getEmployeePaymentMethodWith:xeroTenantId +// searches tax records for an employee +[apiInstance getEmployeeTaxWith:xeroTenantId employeeId:employeeId - completionHandler: ^(PaymentMethodObject output, NSError* error) { + completionHandler: ^(EmployeeTaxObject output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -23781,7 +23419,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -23791,41 +23429,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + try { - const response: any = await xero.accountingApi.getEmployeePaymentMethod(xeroTenantId, employeeId); + const response = await xero.accountingApi.getEmployeeTax(xeroTenantId, employeeId); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -23834,7 +23455,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getEmployeePaymentMethodExample + public class getEmployeeTaxExample { public void main() { @@ -23848,13 +23469,13 @@

    Usage and SDK Samples

    try { - // retrieves an employee's payment method - PaymentMethodObject result = apiInstance.getEmployeePaymentMethod(xeroTenantId, employeeId); + // searches tax records for an employee + EmployeeTaxObject result = apiInstance.getEmployeeTax(xeroTenantId, employeeId); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getEmployeePaymentMethod: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getEmployeeTax: " + e.Message ); } } } @@ -23862,7 +23483,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -23880,12 +23501,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getEmployeePaymentMethod: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getEmployeeTax: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -23898,15 +23519,15 @@ 

    Usage and SDK Samples

    my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object eval { - my $result = $api_instance->getEmployeePaymentMethod(xeroTenantId => $xeroTenantId, employeeId => $employeeId); + my $result = $api_instance->getEmployeeTax(xeroTenantId => $xeroTenantId, employeeId => $employeeId); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getEmployeePaymentMethod: $@\n"; + warn "Exception when calling PayrollNzApi->getEmployeeTax: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -23922,14 +23543,14 @@ 

    Usage and SDK Samples

    employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) try: - # retrieves an employee's payment method - api_response = api_instance.get_employee_payment_method(xeroTenantId, employeeId) + # searches tax records for an employee + api_response = api_instance.get_employee_tax(xeroTenantId, employeeId) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getEmployeePaymentMethod: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getEmployeeTax: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
    @@ -23937,7 +23558,7 @@ 

    Usage and SDK Samples

    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID let mut context = PayrollNzApi::Context::default(); - let result = client.getEmployeePaymentMethod(xeroTenantId, employeeId, &context).wait(); + let result = client.getEmployeeTax(xeroTenantId, employeeId, &context).wait(); println!("{:?}", result); } @@ -23972,7 +23593,7 @@

    Parameters

    -
    +
    @@ -24006,7 +23627,7 @@

    Parameters

    -
    +
    @@ -24018,110 +23639,40 @@

    Parameters

    - Required -
    -
    -
    - - - - - - - - - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/SalaryAndWages/{SalaryAndWagesID}"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees?firstName=John&lastName=Johnson&page=56"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -24229,20 +23781,21 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - UUID salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single pay template earnings object + String firstName = John; // String | Filter by first name + String lastName = Johnson; // String | Filter by last name + Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - SalaryAndWages result = apiInstance.getEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID); + Employees result = apiInstance.getEmployees(xeroTenantId, firstName, lastName, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeeSalaryAndWage"); + System.err.println("Exception when calling PayrollNzApi#getEmployees"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -24250,39 +23803,42 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - UUID salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID | Id for single pay template earnings object + String firstName = John; // String | Filter by first name + String lastName = Johnson; // String | Filter by last name + Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - SalaryAndWages result = apiInstance.getEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID); + Employees result = apiInstance.getEmployees(xeroTenantId, firstName, lastName, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeeSalaryAndWage"); + System.err.println("Exception when calling PayrollNzApi#getEmployees"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
    -UUID *salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // Id for single pay template earnings object (default to null)
    +String *firstName = John; // Filter by first name (optional) (default to null)
    +String *lastName = Johnson; // Filter by last name (optional) (default to null)
    +Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// get employee salary and wages record by id
    -[apiInstance getEmployeeSalaryAndWageWith:xeroTenantId
    -    employeeId:employeeId
    -    salaryAndWagesID:salaryAndWagesID
    -              completionHandler: ^(SalaryAndWages output, NSError* error) {
    +// searches employees
    +[apiInstance getEmployeesWith:xeroTenantId
    +    firstName:firstName
    +    lastName:lastName
    +    page:page
    +              completionHandler: ^(Employees output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -24293,7 +23849,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -24303,42 +23859,30 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object -const salaryAndWagesID = "3fa85f64-5717-4562-b3fc-2c963f66afa6"; // {UUID} Id for single pay template earnings object + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + +const firstName = 'John'; // {String} Filter by first name + +const lastName = 'Johnson'; // {String} Filter by last name + +const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + + try { - const response: any = await xero.accountingApi.getEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID); + const response = await xero.accountingApi.getEmployees(xeroTenantId, firstName, lastName, page); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -24347,7 +23891,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getEmployeeSalaryAndWageExample + public class getEmployeesExample { public void main() { @@ -24357,18 +23901,19 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var employeeId = new UUID(); // UUID | Employee id for single object (default to null) - var salaryAndWagesID = new UUID(); // UUID | Id for single pay template earnings object (default to null) + var firstName = John; // String | Filter by first name (optional) (default to null) + var lastName = Johnson; // String | Filter by last name (optional) (default to null) + var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) try { - // get employee salary and wages record by id - SalaryAndWages result = apiInstance.getEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID); + // searches employees + Employees result = apiInstance.getEmployees(xeroTenantId, firstName, lastName, page); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getEmployeeSalaryAndWage: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getEmployees: " + e.Message ); } } } @@ -24376,7 +23921,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -24394,12 +23939,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getEmployeeSalaryAndWage: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getEmployees: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -24409,19 +23954,20 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object -my $salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; # UUID | Id for single pay template earnings object +my $firstName = John; # String | Filter by first name +my $lastName = Johnson; # String | Filter by last name +my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. eval { - my $result = $api_instance->getEmployeeSalaryAndWage(xeroTenantId => $xeroTenantId, employeeId => $employeeId, salaryAndWagesID => $salaryAndWagesID); + my $result = $api_instance->getEmployees(xeroTenantId => $xeroTenantId, firstName => $firstName, lastName => $lastName, page => $page); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getEmployeeSalaryAndWage: $@\n"; + warn "Exception when calling PayrollNzApi->getEmployees: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -24434,27 +23980,29 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) -salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6 # UUID | Id for single pay template earnings object (default to null) +firstName = John # String | Filter by first name (optional) (default to null) +lastName = Johnson # String | Filter by last name (optional) (default to null) +page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) try: - # get employee salary and wages record by id - api_response = api_instance.get_employee_salary_and_wage(xeroTenantId, employeeId, salaryAndWagesID) + # searches employees + api_response = api_instance.get_employees(xeroTenantId, firstName=firstName, lastName=lastName, page=page) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getEmployeeSalaryAndWage: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getEmployees: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    -    let salaryAndWagesID = 3fa85f64-5717-4562-b3fc-2c963f66afa6; // UUID
    +    let firstName = John; // String
    +    let lastName = Johnson; // String
    +    let page = 56; // Integer
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getEmployeeSalaryAndWage(xeroTenantId, employeeId, salaryAndWagesID, &context).wait();
    +    let result = client.getEmployees(xeroTenantId, firstName, lastName, page, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -24465,11 +24013,6 @@ 

    Usage and SDK Samples

    Scopes

    - - - - - @@ -24479,28 +24022,26 @@

    Scopes

    Parameters

    -
    Path parameters
    + +
    Header parameters
    payroll.employeesGrant read-write access to payroll employees
    payroll.employees.read Grant read-only access to payroll employees
    - - - - - + + + + + - +
    NameDescription
    EmployeeId*
    NameDescription
    Xero-Tenant-Id* -
    +
    - UUID + String - - (uuid) -
    -Employee id for single object +Xero identifier for Tenant
    @@ -24511,45 +24052,41 @@

    Parameters

    SalaryAndWagesID*
    + + + +
    Query parameters
    + + + + + + -
    NameDescription
    firstName -
    +
    - UUID + String - - (uuid) -
    -Id for single pay template earnings object +Filter by first name
    -
    - Required -
    - -
    Header parameters
    - - - - - - + -
    NameDescription
    Xero-Tenant-Id*
    lastName -
    +
    @@ -24557,44 +24094,58 @@

    Parameters

    -Xero identifier for Tenant +Filter by last name
    -
    - Required -
    + page + + +
    +
    +
    + + Integer + +
    +Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +
    +
    +
    +
    + + + - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/SalaryAndWages?page=56"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/LeaveTypes/{LeaveTypeID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -24703,20 +24323,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + UUID leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the leave type try { - SalaryAndWages result = apiInstance.getEmployeeSalaryAndWages(xeroTenantId, employeeId, page); + LeaveTypeObject result = apiInstance.getLeaveType(xeroTenantId, leaveTypeID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeeSalaryAndWages"); + System.err.println("Exception when calling PayrollNzApi#getLeaveType"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -24724,39 +24343,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object - Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + UUID leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the leave type try { - SalaryAndWages result = apiInstance.getEmployeeSalaryAndWages(xeroTenantId, employeeId, page); + LeaveTypeObject result = apiInstance.getLeaveType(xeroTenantId, leaveTypeID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeeSalaryAndWages"); + System.err.println("Exception when calling PayrollNzApi#getLeaveType"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
    -Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
    +UUID *leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the leave type (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// retrieves an employee's salary and wages
    -[apiInstance getEmployeeSalaryAndWagesWith:xeroTenantId
    -    employeeId:employeeId
    -    page:page
    -              completionHandler: ^(SalaryAndWages output, NSError* error) {
    +// retrieve a single leave type by id
    +[apiInstance getLeaveTypeWith:xeroTenantId
    +    leaveTypeID:leaveTypeID
    +              completionHandler: ^(LeaveTypeObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -24767,7 +24383,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -24777,43 +24393,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object -const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const leaveTypeID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the leave type try { - const response: any = await xero.accountingApi.getEmployeeSalaryAndWages(xeroTenantId, employeeId, page); + const response = await xero.accountingApi.getLeaveType(xeroTenantId, leaveTypeID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -24822,7 +24419,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getEmployeeSalaryAndWagesExample + public class getLeaveTypeExample { public void main() { @@ -24832,18 +24429,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var employeeId = new UUID(); // UUID | Employee id for single object (default to null) - var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) + var leaveTypeID = new UUID(); // UUID | Identifier for the leave type (default to null) try { - // retrieves an employee's salary and wages - SalaryAndWages result = apiInstance.getEmployeeSalaryAndWages(xeroTenantId, employeeId, page); + // retrieve a single leave type by id + LeaveTypeObject result = apiInstance.getLeaveType(xeroTenantId, leaveTypeID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getEmployeeSalaryAndWages: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getLeaveType: " + e.Message ); } } } @@ -24851,7 +24447,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -24869,12 +24465,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getEmployeeSalaryAndWages: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getLeaveType: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -24884,19 +24480,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object -my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +my $leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the leave type eval { - my $result = $api_instance->getEmployeeSalaryAndWages(xeroTenantId => $xeroTenantId, employeeId => $employeeId, page => $page); + my $result = $api_instance->getLeaveType(xeroTenantId => $xeroTenantId, leaveTypeID => $leaveTypeID); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getEmployeeSalaryAndWages: $@\n"; + warn "Exception when calling PayrollNzApi->getLeaveType: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -24909,27 +24504,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) -page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) +leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the leave type (default to null) try: - # retrieves an employee's salary and wages - api_response = api_instance.get_employee_salary_and_wages(xeroTenantId, employeeId, page=page) + # retrieve a single leave type by id + api_response = api_instance.get_leave_type(xeroTenantId, leaveTypeID) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getEmployeeSalaryAndWages: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getLeaveType: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    -    let page = 56; // Integer
    +    let leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getEmployeeSalaryAndWages(xeroTenantId, employeeId, page, &context).wait();
    +    let result = client.getLeaveType(xeroTenantId, leaveTypeID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -24941,13 +24534,13 @@ 

    Scopes

    - - + + - - + +
    payroll.employees.readGrant read-only access to payroll employeespayroll.settings.readGrant read-only access to payroll settings
    payroll.employeesGrant read-write access to payroll employeespayroll.settingsGrant read-write access to payroll settings
    @@ -24960,11 +24553,11 @@

    Parameters

    Name Description - EmployeeId* + LeaveTypeID* -
    +
    @@ -24975,7 +24568,7 @@

    Parameters

    -Employee id for single object +Identifier for the leave type
    @@ -24998,7 +24591,7 @@

    Parameters

    -
    +
    @@ -25021,56 +24614,29 @@

    Parameters

    -
    Query parameters
    - - - - - - - - - -
    NameDescription
    page - - -
    -
    -
    - - Integer - - -
    -Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. -
    -
    -
    -
    -
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees/{EmployeeId}/Tax"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/LeaveTypes?page=56&ActiveOnly=true"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -25248,19 +24745,20 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + Boolean activeOnly = true; // Boolean | Filters leave types by active status. By default the API returns all leave types. try { - EmployeeTaxObject result = apiInstance.getEmployeeTax(xeroTenantId, employeeId); + LeaveTypes result = apiInstance.getLeaveTypes(xeroTenantId, page, activeOnly); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeeTax"); + System.err.println("Exception when calling PayrollNzApi#getLeaveTypes"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -25268,36 +24766,39 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID | Employee id for single object + Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + Boolean activeOnly = true; // Boolean | Filters leave types by active status. By default the API returns all leave types. try { - EmployeeTaxObject result = apiInstance.getEmployeeTax(xeroTenantId, employeeId); + LeaveTypes result = apiInstance.getLeaveTypes(xeroTenantId, page, activeOnly); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployeeTax"); + System.err.println("Exception when calling PayrollNzApi#getLeaveTypes"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // Employee id for single object (default to null)
    +Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
    +Boolean *activeOnly = true; // Filters leave types by active status. By default the API returns all leave types. (optional) (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// searches tax records for an employee
    -[apiInstance getEmployeeTaxWith:xeroTenantId
    -    employeeId:employeeId
    -              completionHandler: ^(EmployeeTaxObject output, NSError* error) {
    +// searches leave types
    +[apiInstance getLeaveTypesWith:xeroTenantId
    +    page:page
    +    activeOnly:activeOnly
    +              completionHandler: ^(LeaveTypes output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -25308,7 +24809,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -25318,41 +24819,28 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const employeeId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c"; // {UUID} Employee id for single object + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + +const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + +const activeOnly = true; // {Boolean} Filters leave types by active status. By default the API returns all leave types. + + try { - const response: any = await xero.accountingApi.getEmployeeTax(xeroTenantId, employeeId); + const response = await xero.accountingApi.getLeaveTypes(xeroTenantId, page, activeOnly); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -25361,7 +24849,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getEmployeeTaxExample + public class getLeaveTypesExample { public void main() { @@ -25371,17 +24859,18 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var employeeId = new UUID(); // UUID | Employee id for single object (default to null) + var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) + var activeOnly = true; // Boolean | Filters leave types by active status. By default the API returns all leave types. (optional) (default to null) try { - // searches tax records for an employee - EmployeeTaxObject result = apiInstance.getEmployeeTax(xeroTenantId, employeeId); + // searches leave types + LeaveTypes result = apiInstance.getLeaveTypes(xeroTenantId, page, activeOnly); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getEmployeeTax: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getLeaveTypes: " + e.Message ); } } } @@ -25389,7 +24878,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -25407,12 +24896,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getEmployeeTax: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getLeaveTypes: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -25422,18 +24911,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; # UUID | Employee id for single object +my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +my $activeOnly = true; # Boolean | Filters leave types by active status. By default the API returns all leave types. eval { - my $result = $api_instance->getEmployeeTax(xeroTenantId => $xeroTenantId, employeeId => $employeeId); + my $result = $api_instance->getLeaveTypes(xeroTenantId => $xeroTenantId, page => $page, activeOnly => $activeOnly); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getEmployeeTax: $@\n"; + warn "Exception when calling PayrollNzApi->getLeaveTypes: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -25446,25 +24936,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c # UUID | Employee id for single object (default to null) +page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) +activeOnly = true # Boolean | Filters leave types by active status. By default the API returns all leave types. (optional) (default to null) try: - # searches tax records for an employee - api_response = api_instance.get_employee_tax(xeroTenantId, employeeId) + # searches leave types + api_response = api_instance.get_leave_types(xeroTenantId, page=page, activeOnly=activeOnly) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getEmployeeTax: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getLeaveTypes: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let employeeId = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // UUID
    +    let page = 56; // Integer
    +    let activeOnly = true; // Boolean
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getEmployeeTax(xeroTenantId, employeeId, &context).wait();
    +    let result = client.getLeaveTypes(xeroTenantId, page, activeOnly, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -25476,41 +24968,39 @@ 

    Scopes

    - - + + - - + +
    payroll.employees.readGrant read-only access to payroll employeespayroll.settings.readGrant read-only access to payroll settings
    payroll.employeesGrant read-write access to payroll employeespayroll.settingsGrant read-write access to payroll settings

    Parameters

    -
    Path parameters
    + +
    Header parameters
    - - - - - + + + + +
    NameDescription
    EmployeeId*
    NameDescription
    Xero-Tenant-Id* -
    +
    - UUID + String - - (uuid) -
    -Employee id for single object +Xero identifier for Tenant
    @@ -25523,62 +25013,78 @@

    Parameters

    -
    Header parameters
    + + +
    Query parameters
    - + -
    Name Description
    Xero-Tenant-Id*
    page -
    +
    - String + Integer
    -Xero identifier for Tenant +Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
    -
    - Required -
    + ActiveOnly + + +
    +
    +
    + + Boolean + +
    +Filters leave types by active status. By default the API returns all leave types. +
    +
    +
    +
    + + + - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Employees?firstName=John&lastName=Johnson&page=56"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/PayRuns/{PayRunID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -25687,21 +25193,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - String firstName = John; // String | Filter by first name - String lastName = Johnson; // String | Filter by last name - Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + UUID payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the pay run try { - Employees result = apiInstance.getEmployees(xeroTenantId, firstName, lastName, page); + PayRunObject result = apiInstance.getPayRun(xeroTenantId, payRunID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployees"); + System.err.println("Exception when calling PayrollNzApi#getPayRun"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -25709,42 +25213,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - String firstName = John; // String | Filter by first name - String lastName = Johnson; // String | Filter by last name - Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + UUID payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the pay run try { - Employees result = apiInstance.getEmployees(xeroTenantId, firstName, lastName, page); + PayRunObject result = apiInstance.getPayRun(xeroTenantId, payRunID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getEmployees"); + System.err.println("Exception when calling PayrollNzApi#getPayRun"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -String *firstName = John; // Filter by first name (optional) (default to null)
    -String *lastName = Johnson; // Filter by last name (optional) (default to null)
    -Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
    +UUID *payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the pay run (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// searches employees
    -[apiInstance getEmployeesWith:xeroTenantId
    -    firstName:firstName
    -    lastName:lastName
    -    page:page
    -              completionHandler: ^(Employees output, NSError* error) {
    +// retrieve a single pay run by id
    +[apiInstance getPayRunWith:xeroTenantId
    +    payRunID:payRunID
    +              completionHandler: ^(PayRunObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -25755,7 +25253,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -25765,44 +25263,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - + const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const firstName = 'John'; // {String} Filter by first name -const lastName = 'Johnson'; // {String} Filter by last name -const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +const payRunID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the pay run try { - const response: any = await xero.accountingApi.getEmployees(xeroTenantId, firstName, lastName, page); + const response = await xero.accountingApi.getPayRun(xeroTenantId, payRunID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -25811,7 +25289,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getEmployeesExample + public class getPayRunExample { public void main() { @@ -25821,19 +25299,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var firstName = John; // String | Filter by first name (optional) (default to null) - var lastName = Johnson; // String | Filter by last name (optional) (default to null) - var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) + var payRunID = new UUID(); // UUID | Identifier for the pay run (default to null) try { - // searches employees - Employees result = apiInstance.getEmployees(xeroTenantId, firstName, lastName, page); + // retrieve a single pay run by id + PayRunObject result = apiInstance.getPayRun(xeroTenantId, payRunID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getEmployees: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getPayRun: " + e.Message ); } } } @@ -25841,7 +25317,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -25859,12 +25335,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getEmployees: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getPayRun: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -25874,20 +25350,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $firstName = John; # String | Filter by first name -my $lastName = Johnson; # String | Filter by last name -my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +my $payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the pay run eval { - my $result = $api_instance->getEmployees(xeroTenantId => $xeroTenantId, firstName => $firstName, lastName => $lastName, page => $page); + my $result = $api_instance->getPayRun(xeroTenantId => $xeroTenantId, payRunID => $payRunID); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getEmployees: $@\n"; + warn "Exception when calling PayrollNzApi->getPayRun: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -25900,29 +25374,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -firstName = John # String | Filter by first name (optional) (default to null) -lastName = Johnson # String | Filter by last name (optional) (default to null) -page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) +payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the pay run (default to null) try: - # searches employees - api_response = api_instance.get_employees(xeroTenantId, firstName=firstName, lastName=lastName, page=page) + # retrieve a single pay run by id + api_response = api_instance.get_pay_run(xeroTenantId, payRunID) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getEmployees: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getPayRun: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let firstName = John; // String
    -    let lastName = Johnson; // String
    -    let page = 56; // Integer
    +    let payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getEmployees(xeroTenantId, firstName, lastName, page, &context).wait();
    +    let result = client.getPayRun(xeroTenantId, payRunID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -25934,34 +25404,41 @@ 

    Scopes

    - - + + + + + + +
    payroll.employees.readGrant read-only access to payroll employeespayroll.payruns.readGrant read-only access to payroll payruns
    payroll.payrunsGrant read-write access to payroll payruns

    Parameters

    - -
    Header parameters
    +
    Path parameters
    - - - - - + + + + +
    NameDescription
    Xero-Tenant-Id*
    NameDescription
    PayRunID* -
    +
    - String + UUID + + (uuid) +
    -Xero identifier for Tenant +Identifier for the pay run
    @@ -25974,39 +25451,17 @@

    Parameters

    - - -
    Query parameters
    +
    Header parameters
    - - - - - + - -
    Name Description
    firstName - - -
    -
    -
    - - String - - -
    -Filter by first name -
    -
    -
    -
    -
    lastName
    Xero-Tenant-Id* -
    +
    @@ -26014,58 +25469,44 @@

    Parameters

    -Filter by last name +Xero identifier for Tenant
    +
    + Required +
    page - +
    -
    -
    -
    - - Integer - -
    -Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. -
    -
    -
    -
    - - - - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/LeaveTypes/{LeaveTypeID}"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/PayRunCalendars/{PayrollCalendarID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -26243,19 +25615,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the leave type + UUID payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the payrun calendars try { - LeaveTypeObject result = apiInstance.getLeaveType(xeroTenantId, leaveTypeID); + PayRunCalendarObject result = apiInstance.getPayRunCalendar(xeroTenantId, payrollCalendarID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getLeaveType"); + System.err.println("Exception when calling PayrollNzApi#getPayRunCalendar"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -26263,36 +25635,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the leave type + UUID payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the payrun calendars try { - LeaveTypeObject result = apiInstance.getLeaveType(xeroTenantId, leaveTypeID); + PayRunCalendarObject result = apiInstance.getPayRunCalendar(xeroTenantId, payrollCalendarID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getLeaveType"); + System.err.println("Exception when calling PayrollNzApi#getPayRunCalendar"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the leave type (default to null)
    +UUID *payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the payrun calendars (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// retrieve a single leave type by id
    -[apiInstance getLeaveTypeWith:xeroTenantId
    -    leaveTypeID:leaveTypeID
    -              completionHandler: ^(LeaveTypeObject output, NSError* error) {
    +// retrieve a single payrun calendar by id
    +[apiInstance getPayRunCalendarWith:xeroTenantId
    +    payrollCalendarID:payrollCalendarID
    +              completionHandler: ^(PayRunCalendarObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -26303,7 +25675,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -26313,41 +25685,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const leaveTypeID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the leave type + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const payrollCalendarID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the payrun calendars + try { - const response: any = await xero.accountingApi.getLeaveType(xeroTenantId, leaveTypeID); + const response = await xero.accountingApi.getPayRunCalendar(xeroTenantId, payrollCalendarID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -26356,7 +25711,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getLeaveTypeExample + public class getPayRunCalendarExample { public void main() { @@ -26366,17 +25721,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var leaveTypeID = new UUID(); // UUID | Identifier for the leave type (default to null) + var payrollCalendarID = new UUID(); // UUID | Identifier for the payrun calendars (default to null) try { - // retrieve a single leave type by id - LeaveTypeObject result = apiInstance.getLeaveType(xeroTenantId, leaveTypeID); + // retrieve a single payrun calendar by id + PayRunCalendarObject result = apiInstance.getPayRunCalendar(xeroTenantId, payrollCalendarID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getLeaveType: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getPayRunCalendar: " + e.Message ); } } } @@ -26384,7 +25739,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -26402,12 +25757,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getLeaveType: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getPayRunCalendar: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -26417,18 +25772,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the leave type +my $payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the payrun calendars eval { - my $result = $api_instance->getLeaveType(xeroTenantId => $xeroTenantId, leaveTypeID => $leaveTypeID); + my $result = $api_instance->getPayRunCalendar(xeroTenantId => $xeroTenantId, payrollCalendarID => $payrollCalendarID); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getLeaveType: $@\n"; + warn "Exception when calling PayrollNzApi->getPayRunCalendar: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -26441,25 +25796,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the leave type (default to null) +payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the payrun calendars (default to null) try: - # retrieve a single leave type by id - api_response = api_instance.get_leave_type(xeroTenantId, leaveTypeID) + # retrieve a single payrun calendar by id + api_response = api_instance.get_pay_run_calendar(xeroTenantId, payrollCalendarID) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getLeaveType: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getPayRunCalendar: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let leaveTypeID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    +    let payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getLeaveType(xeroTenantId, leaveTypeID, &context).wait();
    +    let result = client.getPayRunCalendar(xeroTenantId, payrollCalendarID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -26490,11 +25845,11 @@ 

    Parameters

    Name Description - LeaveTypeID* + PayrollCalendarID* -
    +
    @@ -26505,7 +25860,7 @@

    Parameters

    -Identifier for the leave type +Identifier for the payrun calendars
    @@ -26528,7 +25883,7 @@

    Parameters

    -
    +
    @@ -26553,27 +25908,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/LeaveTypes?page=56&ActiveOnly=true"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/PayRunCalendars?page=56"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -26683,19 +26038,18 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. - Boolean activeOnly = true; // Boolean | Filters leave types by active status. By default the API returns all leave types. try { - LeaveTypes result = apiInstance.getLeaveTypes(xeroTenantId, page, activeOnly); + PayRunCalendars result = apiInstance.getPayRunCalendars(xeroTenantId, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getLeaveTypes"); + System.err.println("Exception when calling PayrollNzApi#getPayRunCalendars"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -26704,22 +26058,21 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. - Boolean activeOnly = true; // Boolean | Filters leave types by active status. By default the API returns all leave types. try { - LeaveTypes result = apiInstance.getLeaveTypes(xeroTenantId, page, activeOnly); + PayRunCalendars result = apiInstance.getPayRunCalendars(xeroTenantId, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getLeaveTypes"); + System.err.println("Exception when calling PayrollNzApi#getPayRunCalendars"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -26727,15 +26080,13 @@ 

    Usage and SDK Samples

    String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null) Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) -Boolean *activeOnly = true; // Filters leave types by active status. By default the API returns all leave types. (optional) (default to null) PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init]; -// searches leave types -[apiInstance getLeaveTypesWith:xeroTenantId +// searches payrun calendars +[apiInstance getPayRunCalendarsWith:xeroTenantId page:page - activeOnly:activeOnly - completionHandler: ^(LeaveTypes output, NSError* error) { + completionHandler: ^(PayRunCalendars output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -26746,7 +26097,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -26756,43 +26107,26 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - + const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. -const activeOnly = true; // {Boolean} Filters leave types by active status. By default the API returns all leave types. + +const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + try { - const response: any = await xero.accountingApi.getLeaveTypes(xeroTenantId, page, activeOnly); + const response = await xero.accountingApi.getPayRunCalendars(xeroTenantId, page); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -26801,7 +26135,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getLeaveTypesExample + public class getPayRunCalendarsExample { public void main() { @@ -26812,17 +26146,16 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) - var activeOnly = true; // Boolean | Filters leave types by active status. By default the API returns all leave types. (optional) (default to null) try { - // searches leave types - LeaveTypes result = apiInstance.getLeaveTypes(xeroTenantId, page, activeOnly); + // searches payrun calendars + PayRunCalendars result = apiInstance.getPayRunCalendars(xeroTenantId, page); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getLeaveTypes: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getPayRunCalendars: " + e.Message ); } } } @@ -26830,7 +26163,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -26848,12 +26181,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getLeaveTypes: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getPayRunCalendars: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -26864,18 +26197,17 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. -my $activeOnly = true; # Boolean | Filters leave types by active status. By default the API returns all leave types. eval { - my $result = $api_instance->getLeaveTypes(xeroTenantId => $xeroTenantId, page => $page, activeOnly => $activeOnly); + my $result = $api_instance->getPayRunCalendars(xeroTenantId => $xeroTenantId, page => $page); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getLeaveTypes: $@\n"; + warn "Exception when calling PayrollNzApi->getPayRunCalendars: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -26889,26 +26221,24 @@ 

    Usage and SDK Samples

    api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) -activeOnly = true # Boolean | Filters leave types by active status. By default the API returns all leave types. (optional) (default to null) try: - # searches leave types - api_response = api_instance.get_leave_types(xeroTenantId, page=page, activeOnly=activeOnly) + # searches payrun calendars + api_response = api_instance.get_pay_run_calendars(xeroTenantId, page=page) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getLeaveTypes: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getPayRunCalendars: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
         let page = 56; // Integer
    -    let activeOnly = true; // Boolean
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getLeaveTypes(xeroTenantId, page, activeOnly, &context).wait();
    +    let result = client.getPayRunCalendars(xeroTenantId, page, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -26944,7 +26274,7 @@ 

    Parameters

    -
    +
    @@ -26977,7 +26307,7 @@

    Parameters

    -
    +
    @@ -26991,52 +26321,32 @@

    Parameters

    - - - ActiveOnly - - - -
    -
    -
    - - Boolean - - -
    -Filters leave types by active status. By default the API returns all leave types. -
    -
    -
    -
    - - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/PayRuns/{PayRunID}"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/PayRuns?page=56&status=status_example"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -27145,19 +26455,20 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the pay run + Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + String status = status_example; // String | By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. try { - PayRunObject result = apiInstance.getPayRun(xeroTenantId, payRunID); + PayRuns result = apiInstance.getPayRuns(xeroTenantId, page, status); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getPayRun"); + System.err.println("Exception when calling PayrollNzApi#getPayRuns"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -27165,36 +26476,39 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the pay run + Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + String status = status_example; // String | By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. try { - PayRunObject result = apiInstance.getPayRun(xeroTenantId, payRunID); + PayRuns result = apiInstance.getPayRuns(xeroTenantId, page, status); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getPayRun"); + System.err.println("Exception when calling PayrollNzApi#getPayRuns"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the pay run (default to null)
    +Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
    +String *status = status_example; // By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. (optional) (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// retrieve a single pay run by id
    -[apiInstance getPayRunWith:xeroTenantId
    -    payRunID:payRunID
    -              completionHandler: ^(PayRunObject output, NSError* error) {
    +// searches pay runs
    +[apiInstance getPayRunsWith:xeroTenantId
    +    page:page
    +    status:status
    +              completionHandler: ^(PayRuns output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -27205,7 +26519,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -27215,41 +26529,28 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const payRunID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the pay run + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + +const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + +const status = 'status_example'; // {String} By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. + + try { - const response: any = await xero.accountingApi.getPayRun(xeroTenantId, payRunID); + const response = await xero.accountingApi.getPayRuns(xeroTenantId, page, status); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -27258,7 +26559,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getPayRunExample + public class getPayRunsExample { public void main() { @@ -27268,17 +26569,18 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var payRunID = new UUID(); // UUID | Identifier for the pay run (default to null) + var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) + var status = status_example; // String | By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. (optional) (default to null) try { - // retrieve a single pay run by id - PayRunObject result = apiInstance.getPayRun(xeroTenantId, payRunID); + // searches pay runs + PayRuns result = apiInstance.getPayRuns(xeroTenantId, page, status); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getPayRun: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getPayRuns: " + e.Message ); } } } @@ -27286,7 +26588,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -27304,12 +26606,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getPayRun: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getPayRuns: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -27319,18 +26621,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the pay run +my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +my $status = status_example; # String | By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. eval { - my $result = $api_instance->getPayRun(xeroTenantId => $xeroTenantId, payRunID => $payRunID); + my $result = $api_instance->getPayRuns(xeroTenantId => $xeroTenantId, page => $page, status => $status); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getPayRun: $@\n"; + warn "Exception when calling PayrollNzApi->getPayRuns: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -27343,25 +26646,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the pay run (default to null) +page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) +status = status_example # String | By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. (optional) (default to null) try: - # retrieve a single pay run by id - api_response = api_instance.get_pay_run(xeroTenantId, payRunID) + # searches pay runs + api_response = api_instance.get_pay_runs(xeroTenantId, page=page, status=status) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getPayRun: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getPayRuns: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    +    let page = 56; // Integer
    +    let status = status_example; // String
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getPayRun(xeroTenantId, payRunID, &context).wait();
    +    let result = client.getPayRuns(xeroTenantId, page, status, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -27386,28 +26691,26 @@ 

    Scopes

    Parameters

    -
    Path parameters
    + +
    Header parameters
    - - - - - + + + + +
    NameDescription
    PayRunID*
    NameDescription
    Xero-Tenant-Id* -
    +
    - UUID + String - - (uuid) -
    -Identifier for the pay run +Xero identifier for Tenant
    @@ -27420,62 +26723,78 @@

    Parameters

    -
    Header parameters
    + + +
    Query parameters
    - + -
    Name Description
    Xero-Tenant-Id*
    page -
    +
    - String + Integer
    -Xero identifier for Tenant +Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
    -
    - Required -
    + status + +
    +
    +
    + + String + +
    +By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. +
    +
    +
    +
    + + + + - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/PayRunCalendars/{PayrollCalendarID}"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/PaySlips/{PaySlipID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -27584,19 +26903,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the payrun calendars + UUID paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the payslip try { - PayRunCalendarObject result = apiInstance.getPayRunCalendar(xeroTenantId, payrollCalendarID); + PaySlipObject result = apiInstance.getPaySlip(xeroTenantId, paySlipID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getPayRunCalendar"); + System.err.println("Exception when calling PayrollNzApi#getPaySlip"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -27604,36 +26923,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the payrun calendars + UUID paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the payslip try { - PayRunCalendarObject result = apiInstance.getPayRunCalendar(xeroTenantId, payrollCalendarID); + PaySlipObject result = apiInstance.getPaySlip(xeroTenantId, paySlipID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getPayRunCalendar"); + System.err.println("Exception when calling PayrollNzApi#getPaySlip"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the payrun calendars (default to null)
    +UUID *paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the payslip (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// retrieve a single payrun calendar by id
    -[apiInstance getPayRunCalendarWith:xeroTenantId
    -    payrollCalendarID:payrollCalendarID
    -              completionHandler: ^(PayRunCalendarObject output, NSError* error) {
    +// retrieve a single payslip by id
    +[apiInstance getPaySlipWith:xeroTenantId
    +    paySlipID:paySlipID
    +              completionHandler: ^(PaySlipObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -27644,7 +26963,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -27654,41 +26973,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const payrollCalendarID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the payrun calendars + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const paySlipID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the payslip + try { - const response: any = await xero.accountingApi.getPayRunCalendar(xeroTenantId, payrollCalendarID); + const response = await xero.accountingApi.getPaySlip(xeroTenantId, paySlipID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -27697,7 +26999,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getPayRunCalendarExample + public class getPaySlipExample { public void main() { @@ -27707,17 +27009,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var payrollCalendarID = new UUID(); // UUID | Identifier for the payrun calendars (default to null) + var paySlipID = new UUID(); // UUID | Identifier for the payslip (default to null) try { - // retrieve a single payrun calendar by id - PayRunCalendarObject result = apiInstance.getPayRunCalendar(xeroTenantId, payrollCalendarID); + // retrieve a single payslip by id + PaySlipObject result = apiInstance.getPaySlip(xeroTenantId, paySlipID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getPayRunCalendar: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getPaySlip: " + e.Message ); } } } @@ -27725,7 +27027,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -27743,12 +27045,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getPayRunCalendar: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getPaySlip: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -27758,18 +27060,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the payrun calendars +my $paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the payslip eval { - my $result = $api_instance->getPayRunCalendar(xeroTenantId => $xeroTenantId, payrollCalendarID => $payrollCalendarID); + my $result = $api_instance->getPaySlip(xeroTenantId => $xeroTenantId, paySlipID => $paySlipID); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getPayRunCalendar: $@\n"; + warn "Exception when calling PayrollNzApi->getPaySlip: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -27782,25 +27084,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the payrun calendars (default to null) +paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the payslip (default to null) try: - # retrieve a single payrun calendar by id - api_response = api_instance.get_pay_run_calendar(xeroTenantId, payrollCalendarID) + # retrieve a single payslip by id + api_response = api_instance.get_pay_slip(xeroTenantId, paySlipID) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getPayRunCalendar: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getPaySlip: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let payrollCalendarID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    +    let paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getPayRunCalendar(xeroTenantId, payrollCalendarID, &context).wait();
    +    let result = client.getPaySlip(xeroTenantId, paySlipID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -27812,13 +27114,13 @@ 

    Scopes

    - - + + - - + +
    payroll.settings.readGrant read-only access to payroll settingspayroll.payslip.readGrant read-only access to payroll payslips
    payroll.settingsGrant read-write access to payroll settingspayroll.payslipGrant read-write access to payroll payslips
    @@ -27831,11 +27133,11 @@

    Parameters

    Name Description - PayrollCalendarID* + PaySlipID* -
    +
    @@ -27846,7 +27148,7 @@

    Parameters

    -Identifier for the payrun calendars +Identifier for the payslip
    @@ -27869,7 +27171,7 @@

    Parameters

    -
    +
    @@ -27894,27 +27196,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/PayRunCalendars?page=56"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/PaySlips?page=56&PayRunID=38400000-8cf0-11bd-b23e-10b96e4ef00d"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -28023,19 +27325,20 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant + UUID payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - PayRunCalendars result = apiInstance.getPayRunCalendars(xeroTenantId, page); + PaySlips result = apiInstance.getPaySlips(xeroTenantId, payRunID, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getPayRunCalendars"); + System.err.println("Exception when calling PayrollNzApi#getPaySlips"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -28043,36 +27346,39 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant + UUID payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - PayRunCalendars result = apiInstance.getPayRunCalendars(xeroTenantId, page); + PaySlips result = apiInstance.getPaySlips(xeroTenantId, payRunID, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getPayRunCalendars"); + System.err.println("Exception when calling PayrollNzApi#getPaySlips"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    +UUID *payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. (default to null)
     Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// searches payrun calendars
    -[apiInstance getPayRunCalendarsWith:xeroTenantId
    +// searches payslips
    +[apiInstance getPaySlipsWith:xeroTenantId
    +    payRunID:payRunID
         page:page
    -              completionHandler: ^(PayRunCalendars output, NSError* error) {
    +              completionHandler: ^(PaySlips output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -28083,7 +27389,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -28093,42 +27399,27 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - + const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +const payRunID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. + +const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + try { - const response: any = await xero.accountingApi.getPayRunCalendars(xeroTenantId, page); + const response = await xero.accountingApi.getPaySlips(xeroTenantId, payRunID, page); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -28137,7 +27428,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getPayRunCalendarsExample + public class getPaySlipsExample { public void main() { @@ -28147,17 +27438,18 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) + var payRunID = new UUID(); // UUID | PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. (default to null) var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) try { - // searches payrun calendars - PayRunCalendars result = apiInstance.getPayRunCalendars(xeroTenantId, page); + // searches payslips + PaySlips result = apiInstance.getPaySlips(xeroTenantId, payRunID, page); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getPayRunCalendars: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getPaySlips: " + e.Message ); } } } @@ -28165,7 +27457,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -28183,12 +27475,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getPayRunCalendars: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getPaySlips: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -28198,18 +27490,19 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant +my $payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. eval { - my $result = $api_instance->getPayRunCalendars(xeroTenantId => $xeroTenantId, page => $page); + my $result = $api_instance->getPaySlips(xeroTenantId => $xeroTenantId, payRunID => $payRunID, page => $page); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getPayRunCalendars: $@\n"; + warn "Exception when calling PayrollNzApi->getPaySlips: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -28222,25 +27515,27 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) +payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. (default to null) page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) try: - # searches payrun calendars - api_response = api_instance.get_pay_run_calendars(xeroTenantId, page=page) + # searches payslips + api_response = api_instance.get_pay_slips(xeroTenantId, payRunID, page=page) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getPayRunCalendars: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getPaySlips: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    +    let payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
         let page = 56; // Integer
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getPayRunCalendars(xeroTenantId, page, &context).wait();
    +    let result = client.getPaySlips(xeroTenantId, payRunID, page, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -28252,13 +27547,13 @@ 

    Scopes

    - - + + - - + +
    payroll.settings.readGrant read-only access to payroll settingspayroll.payslip.readGrant read-only access to payroll payslips
    payroll.settingsGrant read-write access to payroll settingspayroll.payslipGrant read-write access to payroll payslips
    @@ -28276,7 +27571,7 @@

    Parameters

    -
    +
    @@ -28309,7 +27604,7 @@

    Parameters

    -
    +
    @@ -28323,32 +27618,58 @@

    Parameters

    + + + PayRunID* + + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. +
    +
    +
    + Required +
    +
    +
    + - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/PayRuns?page=56&status=status_example"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Reimbursements/{ReimbursementID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -28457,20 +27778,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. - String status = status_example; // String | By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. + UUID reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the reimbursement try { - PayRuns result = apiInstance.getPayRuns(xeroTenantId, page, status); + ReimbursementObject result = apiInstance.getReimbursement(xeroTenantId, reimbursementID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getPayRuns"); + System.err.println("Exception when calling PayrollNzApi#getReimbursement"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -28478,39 +27798,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. - String status = status_example; // String | By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. + UUID reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the reimbursement try { - PayRuns result = apiInstance.getPayRuns(xeroTenantId, page, status); + ReimbursementObject result = apiInstance.getReimbursement(xeroTenantId, reimbursementID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getPayRuns"); + System.err.println("Exception when calling PayrollNzApi#getReimbursement"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
    -String *status = status_example; // By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. (optional) (default to null)
    +UUID *reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the reimbursement (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// searches pay runs
    -[apiInstance getPayRunsWith:xeroTenantId
    -    page:page
    -    status:status
    -              completionHandler: ^(PayRuns output, NSError* error) {
    +// retrieve a single reimbursement by id
    +[apiInstance getReimbursementWith:xeroTenantId
    +    reimbursementID:reimbursementID
    +              completionHandler: ^(ReimbursementObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -28521,7 +27838,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -28531,43 +27848,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - + const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. -const status = 'status_example'; // {String} By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. +const reimbursementID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the reimbursement try { - const response: any = await xero.accountingApi.getPayRuns(xeroTenantId, page, status); + const response = await xero.accountingApi.getReimbursement(xeroTenantId, reimbursementID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -28576,7 +27874,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getPayRunsExample + public class getReimbursementExample { public void main() { @@ -28586,18 +27884,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) - var status = status_example; // String | By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. (optional) (default to null) + var reimbursementID = new UUID(); // UUID | Identifier for the reimbursement (default to null) try { - // searches pay runs - PayRuns result = apiInstance.getPayRuns(xeroTenantId, page, status); + // retrieve a single reimbursement by id + ReimbursementObject result = apiInstance.getReimbursement(xeroTenantId, reimbursementID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getPayRuns: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getReimbursement: " + e.Message ); } } } @@ -28605,7 +27902,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -28623,12 +27920,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getPayRuns: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getReimbursement: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -28638,19 +27935,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. -my $status = status_example; # String | By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. +my $reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the reimbursement eval { - my $result = $api_instance->getPayRuns(xeroTenantId => $xeroTenantId, page => $page, status => $status); + my $result = $api_instance->getReimbursement(xeroTenantId => $xeroTenantId, reimbursementID => $reimbursementID); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getPayRuns: $@\n"; + warn "Exception when calling PayrollNzApi->getReimbursement: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -28663,27 +27959,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) -status = status_example # String | By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. (optional) (default to null) +reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the reimbursement (default to null) try: - # searches pay runs - api_response = api_instance.get_pay_runs(xeroTenantId, page=page, status=status) + # retrieve a single reimbursement by id + api_response = api_instance.get_reimbursement(xeroTenantId, reimbursementID) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getPayRuns: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getReimbursement: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let page = 56; // Integer
    -    let status = status_example; // String
    +    let reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getPayRuns(xeroTenantId, page, status, &context).wait();
    +    let result = client.getReimbursement(xeroTenantId, reimbursementID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -28695,39 +27989,41 @@ 

    Scopes

    - - + + - - + +
    payroll.payruns.readGrant read-only access to payroll payrunspayroll.settings.readGrant read-only access to payroll settings
    payroll.payrunsGrant read-write access to payroll payrunspayroll.settingsGrant read-write access to payroll settings

    Parameters

    - -
    Header parameters
    +
    Path parameters
    - - - - - + + + + +
    NameDescription
    Xero-Tenant-Id*
    NameDescription
    ReimbursementID* -
    +
    - String + UUID + + (uuid) +
    -Xero identifier for Tenant +Identifier for the reimbursement
    @@ -28740,78 +28036,62 @@

    Parameters

    - - -
    Query parameters
    +
    Header parameters
    - + - -
    Name Description
    page
    Xero-Tenant-Id* -
    +
    - Integer + String
    -Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. +Xero identifier for Tenant
    +
    + Required +
    status +
    -
    -
    -
    - - String - -
    -By default get payruns will return all the payruns for an organization. You can add GET https://api.xero.com/payroll.xro/2.0/payRuns?statu={PayRunStatus} to filter the payruns by status. -
    -
    -
    -
    - - - - - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/PaySlips/{PaySlipID}"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Reimbursements?page=56"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -28920,19 +28200,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the payslip + Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - PaySlipObject result = apiInstance.getPaySlip(xeroTenantId, paySlipID); + Reimbursements result = apiInstance.getReimbursements(xeroTenantId, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getPaySlip"); + System.err.println("Exception when calling PayrollNzApi#getReimbursements"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -28940,36 +28220,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the payslip + Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - PaySlipObject result = apiInstance.getPaySlip(xeroTenantId, paySlipID); + Reimbursements result = apiInstance.getReimbursements(xeroTenantId, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getPaySlip"); + System.err.println("Exception when calling PayrollNzApi#getReimbursements"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the payslip (default to null)
    +Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// retrieve a single payslip by id
    -[apiInstance getPaySlipWith:xeroTenantId
    -    paySlipID:paySlipID
    -              completionHandler: ^(PaySlipObject output, NSError* error) {
    +// searches reimbursements
    +[apiInstance getReimbursementsWith:xeroTenantId
    +    page:page
    +              completionHandler: ^(Reimbursements output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -28980,7 +28260,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -28990,41 +28270,26 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const paySlipID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the payslip + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + +const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + + try { - const response: any = await xero.accountingApi.getPaySlip(xeroTenantId, paySlipID); + const response = await xero.accountingApi.getReimbursements(xeroTenantId, page); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -29033,7 +28298,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getPaySlipExample + public class getReimbursementsExample { public void main() { @@ -29043,17 +28308,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var paySlipID = new UUID(); // UUID | Identifier for the payslip (default to null) + var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) try { - // retrieve a single payslip by id - PaySlipObject result = apiInstance.getPaySlip(xeroTenantId, paySlipID); + // searches reimbursements + Reimbursements result = apiInstance.getReimbursements(xeroTenantId, page); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getPaySlip: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getReimbursements: " + e.Message ); } } } @@ -29061,7 +28326,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -29079,12 +28344,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getPaySlip: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getReimbursements: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -29094,18 +28359,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the payslip +my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. eval { - my $result = $api_instance->getPaySlip(xeroTenantId => $xeroTenantId, paySlipID => $paySlipID); + my $result = $api_instance->getReimbursements(xeroTenantId => $xeroTenantId, page => $page); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getPaySlip: $@\n"; + warn "Exception when calling PayrollNzApi->getReimbursements: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -29118,25 +28383,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the payslip (default to null) +page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) try: - # retrieve a single payslip by id - api_response = api_instance.get_pay_slip(xeroTenantId, paySlipID) + # searches reimbursements + api_response = api_instance.get_reimbursements(xeroTenantId, page=page) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getPaySlip: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getReimbursements: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let paySlipID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    +    let page = 56; // Integer
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getPaySlip(xeroTenantId, paySlipID, &context).wait();
    +    let result = client.getReimbursements(xeroTenantId, page, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -29148,41 +28413,39 @@ 

    Scopes

    - - + + - - + +
    payroll.payslip.readGrant read-only access to payroll payslipspayroll.settings.readGrant read-only access to payroll settings
    payroll.payslipGrant read-write access to payroll payslipspayroll.settingsGrant read-write access to payroll settings

    Parameters

    -
    Path parameters
    + +
    Header parameters
    - - - - - + + + + +
    NameDescription
    PaySlipID*
    NameDescription
    Xero-Tenant-Id* -
    +
    - UUID + String - - (uuid) -
    -Identifier for the payslip +Xero identifier for Tenant
    @@ -29195,62 +28458,58 @@

    Parameters

    -
    Header parameters
    + + +
    Query parameters
    - +
    Name Description
    Xero-Tenant-Id*
    page -
    +
    - String + Integer
    -Xero identifier for Tenant +Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
    -
    - Required -
    - - - - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/PaySlips?page=56&PayRunID=38400000-8cf0-11bd-b23e-10b96e4ef00d"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/Settings"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -29359,20 +28618,18 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. - Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - PaySlips result = apiInstance.getPaySlips(xeroTenantId, payRunID, page); + Settings result = apiInstance.getSettings(xeroTenantId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getPaySlips"); + System.err.println("Exception when calling PayrollNzApi#getSettings"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -29380,39 +28637,33 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. - Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - PaySlips result = apiInstance.getPaySlips(xeroTenantId, payRunID, page); + Settings result = apiInstance.getSettings(xeroTenantId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getPaySlips"); + System.err.println("Exception when calling PayrollNzApi#getSettings"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. (default to null)
    -Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// searches payslips
    -[apiInstance getPaySlipsWith:xeroTenantId
    -    payRunID:payRunID
    -    page:page
    -              completionHandler: ^(PaySlips output, NSError* error) {
    +// searches settings
    +[apiInstance getSettingsWith:xeroTenantId
    +              completionHandler: ^(Settings output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -29423,7 +28674,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -29433,43 +28684,23 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const payRunID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. -const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant try { - const response: any = await xero.accountingApi.getPaySlips(xeroTenantId, payRunID, page); + const response = await xero.accountingApi.getSettings(xeroTenantId); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -29478,7 +28709,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getPaySlipsExample + public class getSettingsExample { public void main() { @@ -29488,18 +28719,16 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var payRunID = new UUID(); // UUID | PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. (default to null) - var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) try { - // searches payslips - PaySlips result = apiInstance.getPaySlips(xeroTenantId, payRunID, page); + // searches settings + Settings result = apiInstance.getSettings(xeroTenantId); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getPaySlips: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getSettings: " + e.Message ); } } } @@ -29507,7 +28736,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -29525,12 +28754,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getPaySlips: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getSettings: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -29540,19 +28769,17 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. -my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. eval { - my $result = $api_instance->getPaySlips(xeroTenantId => $xeroTenantId, payRunID => $payRunID, page => $page); + my $result = $api_instance->getSettings(xeroTenantId => $xeroTenantId); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getPaySlips: $@\n"; + warn "Exception when calling PayrollNzApi->getSettings: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -29565,27 +28792,23 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. (default to null) -page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) try: - # searches payslips - api_response = api_instance.get_pay_slips(xeroTenantId, payRunID, page=page) + # searches settings + api_response = api_instance.get_settings(xeroTenantId) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getPaySlips: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getSettings: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let payRunID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    -    let page = 56; // Integer
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getPaySlips(xeroTenantId, payRunID, page, &context).wait();
    +    let result = client.getSettings(xeroTenantId, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -29597,13 +28820,13 @@ 

    Scopes

    - - + + - - + +
    payroll.payslip.readGrant read-only access to payroll payslipspayroll.settings.readGrant read-only access to payroll settings
    payroll.payslipGrant read-write access to payroll payslipssettings.payslip
    @@ -29621,7 +28844,7 @@

    Parameters

    -
    +
    @@ -29644,82 +28867,29 @@

    Parameters

    -
    Query parameters
    - - - - - - - - - - - - - -
    NameDescription
    page - - -
    -
    -
    - - Integer - - -
    -Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. -
    -
    -
    -
    -
    PayRunID* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -PayrunID which specifies the containing payrun of payslips to retrieve. By default, the API does not group payslips by payrun. -
    -
    -
    - Required -
    -
    -
    -
    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Reimbursements/{ReimbursementID}"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/StatutoryDeductions/{Id}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -29828,19 +28998,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the reimbursement + UUID id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the statutory deduction try { - ReimbursementObject result = apiInstance.getReimbursement(xeroTenantId, reimbursementID); + StatutoryDeductionObject result = apiInstance.getStatutoryDeduction(xeroTenantId, id); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getReimbursement"); + System.err.println("Exception when calling PayrollNzApi#getStatutoryDeduction"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -29848,36 +29018,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the reimbursement + UUID id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the statutory deduction try { - ReimbursementObject result = apiInstance.getReimbursement(xeroTenantId, reimbursementID); + StatutoryDeductionObject result = apiInstance.getStatutoryDeduction(xeroTenantId, id); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getReimbursement"); + System.err.println("Exception when calling PayrollNzApi#getStatutoryDeduction"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the reimbursement (default to null)
    +UUID *id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the statutory deduction (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// retrieve a single reimbursement by id
    -[apiInstance getReimbursementWith:xeroTenantId
    -    reimbursementID:reimbursementID
    -              completionHandler: ^(ReimbursementObject output, NSError* error) {
    +// retrieve a single statutory deduction by id
    +[apiInstance getStatutoryDeductionWith:xeroTenantId
    +    id:id
    +              completionHandler: ^(StatutoryDeductionObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -29888,7 +29058,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -29898,41 +29068,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const reimbursementID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the reimbursement + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the statutory deduction + try { - const response: any = await xero.accountingApi.getReimbursement(xeroTenantId, reimbursementID); + const response = await xero.accountingApi.getStatutoryDeduction(xeroTenantId, id); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -29941,7 +29094,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getReimbursementExample + public class getStatutoryDeductionExample { public void main() { @@ -29951,17 +29104,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var reimbursementID = new UUID(); // UUID | Identifier for the reimbursement (default to null) + var id = new UUID(); // UUID | Identifier for the statutory deduction (default to null) try { - // retrieve a single reimbursement by id - ReimbursementObject result = apiInstance.getReimbursement(xeroTenantId, reimbursementID); + // retrieve a single statutory deduction by id + StatutoryDeductionObject result = apiInstance.getStatutoryDeduction(xeroTenantId, id); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getReimbursement: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getStatutoryDeduction: " + e.Message ); } } } @@ -29969,7 +29122,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -29987,12 +29140,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getReimbursement: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getStatutoryDeduction: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -30002,18 +29155,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the reimbursement +my $id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the statutory deduction eval { - my $result = $api_instance->getReimbursement(xeroTenantId => $xeroTenantId, reimbursementID => $reimbursementID); + my $result = $api_instance->getStatutoryDeduction(xeroTenantId => $xeroTenantId, id => $id); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getReimbursement: $@\n"; + warn "Exception when calling PayrollNzApi->getStatutoryDeduction: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -30026,25 +29179,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the reimbursement (default to null) +id = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the statutory deduction (default to null) try: - # retrieve a single reimbursement by id - api_response = api_instance.get_reimbursement(xeroTenantId, reimbursementID) + # retrieve a single statutory deduction by id + api_response = api_instance.get_statutory_deduction(xeroTenantId, id) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getReimbursement: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getStatutoryDeduction: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let reimbursementID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    +    let id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getReimbursement(xeroTenantId, reimbursementID, &context).wait();
    +    let result = client.getStatutoryDeduction(xeroTenantId, id, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -30075,11 +29228,11 @@ 

    Parameters

    Name Description - ReimbursementID* + Id* -
    +
    @@ -30090,7 +29243,7 @@

    Parameters

    -Identifier for the reimbursement +Identifier for the statutory deduction
    @@ -30113,7 +29266,7 @@

    Parameters

    -
    +
    @@ -30138,27 +29291,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Reimbursements?page=56"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/StatutoryDeductions?page=56"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -30269,17 +29422,17 @@ 

    Usage and SDK Samples

    String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - Reimbursements result = apiInstance.getReimbursements(xeroTenantId, page); + StatutoryDeductions result = apiInstance.getStatutoryDeductions(xeroTenantId, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getReimbursements"); + System.err.println("Exception when calling PayrollNzApi#getStatutoryDeductions"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -30289,20 +29442,20 @@ 

    Usage and SDK Samples

    String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - Reimbursements result = apiInstance.getReimbursements(xeroTenantId, page); + StatutoryDeductions result = apiInstance.getStatutoryDeductions(xeroTenantId, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getReimbursements"); + System.err.println("Exception when calling PayrollNzApi#getStatutoryDeductions"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
    @@ -30313,10 +29466,10 @@ 

    Usage and SDK Samples

    PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init]; -// searches reimbursements -[apiInstance getReimbursementsWith:xeroTenantId +// searches statutory deductions +[apiInstance getStatutoryDeductionsWith:xeroTenantId page:page - completionHandler: ^(Reimbursements output, NSError* error) { + completionHandler: ^(StatutoryDeductions output, NSError* error) { if (output) { NSLog(@"%@", output); } @@ -30327,7 +29480,7 @@

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -30337,42 +29490,26 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - + const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + +const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + try { - const response: any = await xero.accountingApi.getReimbursements(xeroTenantId, page); + const response = await xero.accountingApi.getStatutoryDeductions(xeroTenantId, page); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -30381,7 +29518,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getReimbursementsExample + public class getStatutoryDeductionsExample { public void main() { @@ -30395,13 +29532,13 @@

    Usage and SDK Samples

    try { - // searches reimbursements - Reimbursements result = apiInstance.getReimbursements(xeroTenantId, page); + // searches statutory deductions + StatutoryDeductions result = apiInstance.getStatutoryDeductions(xeroTenantId, page); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getReimbursements: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getStatutoryDeductions: " + e.Message ); } } } @@ -30409,7 +29546,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -30427,12 +29564,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getReimbursements: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getStatutoryDeductions: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -30445,15 +29582,15 @@ 

    Usage and SDK Samples

    my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. eval { - my $result = $api_instance->getReimbursements(xeroTenantId => $xeroTenantId, page => $page); + my $result = $api_instance->getStatutoryDeductions(xeroTenantId => $xeroTenantId, page => $page); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getReimbursements: $@\n"; + warn "Exception when calling PayrollNzApi->getStatutoryDeductions: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -30469,14 +29606,14 @@ 

    Usage and SDK Samples

    page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) try: - # searches reimbursements - api_response = api_instance.get_reimbursements(xeroTenantId, page=page) + # searches statutory deductions + api_response = api_instance.get_statutory_deductions(xeroTenantId, page=page) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getReimbursements: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getStatutoryDeductions: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
    @@ -30484,7 +29621,7 @@ 

    Usage and SDK Samples

    let page = 56; // Integer let mut context = PayrollNzApi::Context::default(); - let result = client.getReimbursements(xeroTenantId, page, &context).wait(); + let result = client.getStatutoryDeductions(xeroTenantId, page, &context).wait(); println!("{:?}", result); } @@ -30520,7 +29657,7 @@

    Parameters

    -
    +
    @@ -30553,7 +29690,7 @@

    Parameters

    -
    +
    @@ -30572,27 +29709,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/Settings"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/superannuations/{SuperannuationID}"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -30701,18 +29838,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant + UUID superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the superannuation try { - Settings result = apiInstance.getSettings(xeroTenantId); + SuperannuationObject result = apiInstance.getSuperannuation(xeroTenantId, superannuationID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getSettings"); + System.err.println("Exception when calling PayrollNzApi#getSuperannuation"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -30720,33 +29858,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant + UUID superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the superannuation try { - Settings result = apiInstance.getSettings(xeroTenantId); + SuperannuationObject result = apiInstance.getSuperannuation(xeroTenantId, superannuationID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getSettings"); + System.err.println("Exception when calling PayrollNzApi#getSuperannuation"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    +UUID *superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the superannuation (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// searches settings
    -[apiInstance getSettingsWith:xeroTenantId
    -              completionHandler: ^(Settings output, NSError* error) {
    +// searches for a unique superannuation
    +[apiInstance getSuperannuationWith:xeroTenantId
    +    superannuationID:superannuationID
    +              completionHandler: ^(SuperannuationObject output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -30757,7 +29898,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -30767,40 +29908,24 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - + const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant +const superannuationID = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the superannuation + try { - const response: any = await xero.accountingApi.getSettings(xeroTenantId); + const response = await xero.accountingApi.getSuperannuation(xeroTenantId, superannuationID); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -30809,7 +29934,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getSettingsExample + public class getSuperannuationExample { public void main() { @@ -30819,16 +29944,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) + var superannuationID = new UUID(); // UUID | Identifier for the superannuation (default to null) try { - // searches settings - Settings result = apiInstance.getSettings(xeroTenantId); + // searches for a unique superannuation + SuperannuationObject result = apiInstance.getSuperannuation(xeroTenantId, superannuationID); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getSettings: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getSuperannuation: " + e.Message ); } } } @@ -30836,7 +29962,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -30854,12 +29980,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getSettings: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getSuperannuation: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -30869,17 +29995,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant +my $superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the superannuation eval { - my $result = $api_instance->getSettings(xeroTenantId => $xeroTenantId); + my $result = $api_instance->getSuperannuation(xeroTenantId => $xeroTenantId, superannuationID => $superannuationID); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getSettings: $@\n"; + warn "Exception when calling PayrollNzApi->getSuperannuation: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -30892,23 +30019,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) +superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the superannuation (default to null) try: - # searches settings - api_response = api_instance.get_settings(xeroTenantId) + # searches for a unique superannuation + api_response = api_instance.get_superannuation(xeroTenantId, superannuationID) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getSettings: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getSuperannuation: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    +    let superannuationID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getSettings(xeroTenantId, &context).wait();
    +    let result = client.getSuperannuation(xeroTenantId, superannuationID, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -30925,14 +30054,47 @@ 

    Scopes

    - settings.payslip - + payroll.settings + Grant read-write access to payroll settings

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    SuperannuationID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Identifier for the superannuation +
    +
    +
    + Required +
    +
    +
    +
    Header parameters
    @@ -30944,7 +30106,7 @@

    Parameters

    -
    +
    @@ -30969,27 +30131,27 @@

    Parameters

    - - - - -
  • NodeJS
  • - - - - - - + + + + + +
  • NodeJS
  • + + + + + +
    -
    -
    curl -X  "https://api.xero.com/payroll.xro/2.0/StatutoryDeductions/{Id}"
    +
    +
    curl -X  "https://api.xero.com/payroll.xro/2.0/superannuations?page=56"
    -
    +
    import org.openapitools.client.*;
     import org.openapitools.client.auth.*;
     import org.openapitools.client.model.*;
    @@ -31098,19 +30260,19 @@ 

    Usage and SDK Samples

    PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the statutory deduction + Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - StatutoryDeductionObject result = apiInstance.getStatutoryDeduction(xeroTenantId, id); + Superannuations result = apiInstance.getSuperannuations(xeroTenantId, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getStatutoryDeduction"); + System.err.println("Exception when calling PayrollNzApi#getSuperannuations"); e.printStackTrace(); } } }
    -
    +
    import org.openapitools.client.api.PayrollNzApi;
     
     public class PayrollNzApiExample {
    @@ -31118,36 +30280,36 @@ 

    Usage and SDK Samples

    public static void main(String[] args) { PayrollNzApi apiInstance = new PayrollNzApi(); String xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant - UUID id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Identifier for the statutory deduction + Integer page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. try { - StatutoryDeductionObject result = apiInstance.getStatutoryDeduction(xeroTenantId, id); + Superannuations result = apiInstance.getSuperannuations(xeroTenantId, page); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PayrollNzApi#getStatutoryDeduction"); + System.err.println("Exception when calling PayrollNzApi#getSuperannuations"); e.printStackTrace(); } } }
    -
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: OAuth2)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
     String *xeroTenantId = xeroTenantId_example; // Xero identifier for Tenant (default to null)
    -UUID *id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Identifier for the statutory deduction (default to null)
    +Integer *page = 56; // Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null)
     
     PayrollNzApi *apiInstance = [[PayrollNzApi alloc] init];
     
    -// retrieve a single statutory deduction by id
    -[apiInstance getStatutoryDeductionWith:xeroTenantId
    -    id:id
    -              completionHandler: ^(StatutoryDeductionObject output, NSError* error) {
    +// searches statutory deductions
    +[apiInstance getSuperannuationsWith:xeroTenantId
    +    page:page
    +              completionHandler: ^(Superannuations output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -31158,7 +30320,7 @@ 

    Usage and SDK Samples

    -
    +
    const tokenSet: TokenSet =  {
       id_token: 'xxx',
       access_token: 'yyy',
    @@ -31168,41 +30330,26 @@ 

    Usage and SDK Samples

    session_state: 'xxx' } await xero.setTokenSet(tokenSet); - -const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant -const id = "38400000-8cf0-11bd-b23e-10b96e4ef00d"; // {UUID} Identifier for the statutory deduction + +const xeroTenantId = "xeroTenantId_example"; // {String} Xero identifier for Tenant + +const page = 56; // {Integer} Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. + + try { - const response: any = await xero.accountingApi.getStatutoryDeduction(xeroTenantId, id); + const response = await xero.accountingApi.getSuperannuations(xeroTenantId, page); console.log(response.body || response.response.statusCode) } catch (err) { - console.log(`There was an ERROR! \n Status Code: ${err.response.statusCode}.`); - console.log(`ERROR: \n ${JSON.stringify(err.response.body, null, 2)}`); + const error = JSON.stringify(err.response.body, null, 2) + console.log(`Status Code: ${err.response.statusCode} => ${error}`); } - -
    +
    - -
    +
    using System;
     using System.Diagnostics;
     using .Api;
    @@ -31211,7 +30358,7 @@ 

    Usage and SDK Samples

    namespace Example { - public class getStatutoryDeductionExample + public class getSuperannuationsExample { public void main() { @@ -31221,17 +30368,17 @@

    Usage and SDK Samples

    var apiInstance = new PayrollNzApi(); var xeroTenantId = xeroTenantId_example; // String | Xero identifier for Tenant (default to null) - var id = new UUID(); // UUID | Identifier for the statutory deduction (default to null) + var page = 56; // Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) try { - // retrieve a single statutory deduction by id - StatutoryDeductionObject result = apiInstance.getStatutoryDeduction(xeroTenantId, id); + // searches statutory deductions + Superannuations result = apiInstance.getSuperannuations(xeroTenantId, page); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling PayrollNzApi.getStatutoryDeduction: " + e.Message ); + Debug.Print("Exception when calling PayrollNzApi.getSuperannuations: " + e.Message ); } } } @@ -31239,7 +30386,7 @@

    Usage and SDK Samples

    -
    +
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
    @@ -31257,12 +30404,12 @@ 

    Usage and SDK Samples

    try { } catch (Exception $e) { - echo 'Exception when calling PayrollNzApi->getStatutoryDeduction: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling PayrollNzApi->getSuperannuations: ', $e->getMessage(), PHP_EOL; } ?>
    -
    +
    use Data::Dumper;
     use ::Configuration;
     use ::PayrollNzApi;
    @@ -31272,18 +30419,18 @@ 

    Usage and SDK Samples

    my $api_instance = ::PayrollNzApi->new(); my $xeroTenantId = xeroTenantId_example; # String | Xero identifier for Tenant -my $id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Identifier for the statutory deduction +my $page = 56; # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. eval { - my $result = $api_instance->getStatutoryDeduction(xeroTenantId => $xeroTenantId, id => $id); + my $result = $api_instance->getSuperannuations(xeroTenantId => $xeroTenantId, page => $page); print Dumper($result); }; if ($@) { - warn "Exception when calling PayrollNzApi->getStatutoryDeduction: $@\n"; + warn "Exception when calling PayrollNzApi->getSuperannuations: $@\n"; }
    -
    +
    from __future__ import print_statement
     import time
     import 
    @@ -31296,25 +30443,25 @@ 

    Usage and SDK Samples

    # create an instance of the API class api_instance = .PayrollNzApi() xeroTenantId = xeroTenantId_example # String | Xero identifier for Tenant (default to null) -id = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Identifier for the statutory deduction (default to null) +page = 56 # Integer | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. (optional) (default to null) try: - # retrieve a single statutory deduction by id - api_response = api_instance.get_statutory_deduction(xeroTenantId, id) + # searches statutory deductions + api_response = api_instance.get_superannuations(xeroTenantId, page=page) pprint(api_response) except ApiException as e: - print("Exception when calling PayrollNzApi->getStatutoryDeduction: %s\n" % e)
    + print("Exception when calling PayrollNzApi->getSuperannuations: %s\n" % e)
    -
    +
    extern crate PayrollNzApi;
     
     pub fn main() {
         let xeroTenantId = xeroTenantId_example; // String
    -    let id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    +    let page = 56; // Integer
     
         let mut context = PayrollNzApi::Context::default();
    -    let result = client.getStatutoryDeduction(xeroTenantId, id, &context).wait();
    +    let result = client.getSuperannuations(xeroTenantId, page, &context).wait();
         println!("{:?}", result);
     
     }
    @@ -31339,28 +30486,26 @@ 

    Scopes

    Parameters

    -
    Path parameters
    + +
    Header parameters
    - - - - - + + + + +
    NameDescription
    Id*
    NameDescription
    Xero-Tenant-Id* -
    +
    - UUID + String - - (uuid) -
    -Identifier for the statutory deduction +Xero identifier for Tenant
    @@ -31373,62 +30518,58 @@

    Parameters

    -
    Header parameters
    + + +
    Query parameters
    - +
    Name Description
    Xero-Tenant-Id*
    page -
    +
    - String + Integer
    -Xero identifier for Tenant +Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
    -
    - Required -
    - - - -
    +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +