curl -X POST \
-H "Accept: application/json,text/json,application/xml,text/xml" \
-H "Content-Type: application/json,text/json,application/xml,text/xml,application/x-www-form-urlencoded" \
"https://api.dev.spenda.co/api/Accounts/paymentmethods" \
-d '{
"DefaultPostingAccount" : {
"BankName" : "BankName",
"Description" : "Description",
"OpeningBalance" : 5.962133916683182,
"IsActive" : true,
"ParentAccountName" : "ParentAccountName",
"ParentAccountCode" : "ParentAccountCode",
"Name" : "Name",
"GUIDstring" : "GUIDstring",
"CurrencyCode" : "CurrencyCode",
"BankBSB" : "BankBSB",
"Version" : 6.027456183070403,
"SyncLogs" : [ {
"Status" : "Status",
"LastImportDateTime" : "2000-01-23T04:56:07.000+00:00",
"AdaptorID" : 9,
"LastImportDateTime_offset" : 3,
"LastExportDateTime_offset" : 2,
"LastModifiedDateTime_utc" : "2000-01-23T04:56:07.000+00:00",
"LastExportDateTime_utc" : "2000-01-23T04:56:07.000+00:00",
"BSID" : "BSID",
"Details" : "Details",
"SyncCode" : "SyncCode",
"LastExportDateTime" : "2000-01-23T04:56:07.000+00:00",
"LastModifiedDateTime_offset" : 4,
"ID" : 7,
"LastImportDateTime_utc" : "2000-01-23T04:56:07.000+00:00"
}, {
"Status" : "Status",
"LastImportDateTime" : "2000-01-23T04:56:07.000+00:00",
"AdaptorID" : 9,
"LastImportDateTime_offset" : 3,
"LastExportDateTime_offset" : 2,
"LastModifiedDateTime_utc" : "2000-01-23T04:56:07.000+00:00",
"LastExportDateTime_utc" : "2000-01-23T04:56:07.000+00:00",
"BSID" : "BSID",
"Details" : "Details",
"SyncCode" : "SyncCode",
"LastExportDateTime" : "2000-01-23T04:56:07.000+00:00",
"LastModifiedDateTime_offset" : 4,
"ID" : 7,
"LastImportDateTime_utc" : "2000-01-23T04:56:07.000+00:00"
} ],
"ID" : 1,
"OpeningDate" : "2000-01-23T04:56:07.000+00:00",
"IsEnablePayments" : true,
"GUID" : "00000000-0000-0000-0000-000000000000",
"Code" : "Code",
"TaxType" : "TaxType",
"ClosingBalance" : 5.637376656633329,
"RowNumber" : 0,
"Type" : "Type",
"BankAccountName" : "BankAccountName",
"ParentAccountBSID" : "ParentAccountBSID",
"BSID" : "BSID",
"IsShowOnInvoice" : true,
"IsParentAccount" : true,
"BankAccountType" : "BankAccountType",
"Class" : "Class",
"ClosingDate" : "2000-01-23T04:56:07.000+00:00",
"Balance" : 2.3021358869347655,
"BankAccountNumber" : "BankAccountNumber",
"IsShowInExpenseClaims" : true,
"ParentAccountID" : 7
},
"Settings" : [ {
"Account" : {
"BankName" : "BankName",
"Description" : "Description",
"OpeningBalance" : 5.962133916683182,
"IsActive" : true,
"ParentAccountName" : "ParentAccountName",
"ParentAccountCode" : "ParentAccountCode",
"Name" : "Name",
"GUIDstring" : "GUIDstring",
"CurrencyCode" : "CurrencyCode",
"BankBSB" : "BankBSB",
"Version" : 6.027456183070403,
"SyncLogs" : [ {
"Status" : "Status",
"LastImportDateTime" : "2000-01-23T04:56:07.000+00:00",
"AdaptorID" : 9,
"LastImportDateTime_offset" : 3,
"LastExportDateTime_offset" : 2,
"LastModifiedDateTime_utc" : "2000-01-23T04:56:07.000+00:00",
"LastExportDateTime_utc" : "2000-01-23T04:56:07.000+00:00",
"BSID" : "BSID",
"Details" : "Details",
"SyncCode" : "SyncCode",
"LastExportDateTime" : "2000-01-23T04:56:07.000+00:00",
"LastModifiedDateTime_offset" : 4,
"ID" : 7,
"LastImportDateTime_utc" : "2000-01-23T04:56:07.000+00:00"
}, {
"Status" : "Status",
"LastImportDateTime" : "2000-01-23T04:56:07.000+00:00",
"AdaptorID" : 9,
"LastImportDateTime_offset" : 3,
"LastExportDateTime_offset" : 2,
"LastModifiedDateTime_utc" : "2000-01-23T04:56:07.000+00:00",
"LastExportDateTime_utc" : "2000-01-23T04:56:07.000+00:00",
"BSID" : "BSID",
"Details" : "Details",
"SyncCode" : "SyncCode",
"LastExportDateTime" : "2000-01-23T04:56:07.000+00:00",
"LastModifiedDateTime_offset" : 4,
"ID" : 7,
"LastImportDateTime_utc" : "2000-01-23T04:56:07.000+00:00"
} ],
"ID" : 1,
"OpeningDate" : "2000-01-23T04:56:07.000+00:00",
"IsEnablePayments" : true,
"GUID" : "00000000-0000-0000-0000-000000000000",
"Code" : "Code",
"TaxType" : "TaxType",
"ClosingBalance" : 5.637376656633329,
"RowNumber" : 0,
"Type" : "Type",
"BankAccountName" : "BankAccountName",
"ParentAccountBSID" : "ParentAccountBSID",
"BSID" : "BSID",
"IsShowOnInvoice" : true,
"IsParentAccount" : true,
"BankAccountType" : "BankAccountType",
"Class" : "Class",
"ClosingDate" : "2000-01-23T04:56:07.000+00:00",
"Balance" : 2.3021358869347655,
"BankAccountNumber" : "BankAccountNumber",
"IsShowInExpenseClaims" : true,
"ParentAccountID" : 7
},
"IsShowOnInvoice" : true,
"MerchantSurchargePercent" : 1.2315135367772556,
"PaymentMethodName" : "PaymentMethodName"
}, {
"Account" : {
"BankName" : "BankName",
"Description" : "Description",
"OpeningBalance" : 5.962133916683182,
"IsActive" : true,
"ParentAccountName" : "ParentAccountName",
"ParentAccountCode" : "ParentAccountCode",
"Name" : "Name",
"GUIDstring" : "GUIDstring",
"CurrencyCode" : "CurrencyCode",
"BankBSB" : "BankBSB",
"Version" : 6.027456183070403,
"SyncLogs" : [ {
"Status" : "Status",
"LastImportDateTime" : "2000-01-23T04:56:07.000+00:00",
"AdaptorID" : 9,
"LastImportDateTime_offset" : 3,
"LastExportDateTime_offset" : 2,
"LastModifiedDateTime_utc" : "2000-01-23T04:56:07.000+00:00",
"LastExportDateTime_utc" : "2000-01-23T04:56:07.000+00:00",
"BSID" : "BSID",
"Details" : "Details",
"SyncCode" : "SyncCode",
"LastExportDateTime" : "2000-01-23T04:56:07.000+00:00",
"LastModifiedDateTime_offset" : 4,
"ID" : 7,
"LastImportDateTime_utc" : "2000-01-23T04:56:07.000+00:00"
}, {
"Status" : "Status",
"LastImportDateTime" : "2000-01-23T04:56:07.000+00:00",
"AdaptorID" : 9,
"LastImportDateTime_offset" : 3,
"LastExportDateTime_offset" : 2,
"LastModifiedDateTime_utc" : "2000-01-23T04:56:07.000+00:00",
"LastExportDateTime_utc" : "2000-01-23T04:56:07.000+00:00",
"BSID" : "BSID",
"Details" : "Details",
"SyncCode" : "SyncCode",
"LastExportDateTime" : "2000-01-23T04:56:07.000+00:00",
"LastModifiedDateTime_offset" : 4,
"ID" : 7,
"LastImportDateTime_utc" : "2000-01-23T04:56:07.000+00:00"
} ],
"ID" : 1,
"OpeningDate" : "2000-01-23T04:56:07.000+00:00",
"IsEnablePayments" : true,
"GUID" : "00000000-0000-0000-0000-000000000000",
"Code" : "Code",
"TaxType" : "TaxType",
"ClosingBalance" : 5.637376656633329,
"RowNumber" : 0,
"Type" : "Type",
"BankAccountName" : "BankAccountName",
"ParentAccountBSID" : "ParentAccountBSID",
"BSID" : "BSID",
"IsShowOnInvoice" : true,
"IsParentAccount" : true,
"BankAccountType" : "BankAccountType",
"Class" : "Class",
"ClosingDate" : "2000-01-23T04:56:07.000+00:00",
"Balance" : 2.3021358869347655,
"BankAccountNumber" : "BankAccountNumber",
"IsShowInExpenseClaims" : true,
"ParentAccountID" : 7
},
"IsShowOnInvoice" : true,
"MerchantSurchargePercent" : 1.2315135367772556,
"PaymentMethodName" : "PaymentMethodName"
} ]
}' \
-d 'Custom MIME type example not yet supported: text/json' \
-d '<AccountPaymentMethods>
<null>
<GUID>00000000-0000-0000-0000-000000000000</GUID>
<RowNumber>123456789</RowNumber>
<Version>3.149</Version>
<ID>123</ID>
<GUIDstring>aeiou</GUIDstring>
<BSID>aeiou</BSID>
<Code>aeiou</Code>
<Name>aeiou</Name>
<Description>aeiou</Description>
<Type>aeiou</Type>
<TaxType>aeiou</TaxType>
<Class>aeiou</Class>
<IsEnablePayments>true</IsEnablePayments>
<IsShowInExpenseClaims>true</IsShowInExpenseClaims>
<BankAccountNumber>aeiou</BankAccountNumber>
<BankAccountName>aeiou</BankAccountName>
<BankAccountType>aeiou</BankAccountType>
<BankBSB>aeiou</BankBSB>
<BankName>aeiou</BankName>
<CurrencyCode>aeiou</CurrencyCode>
<IsActive>true</IsActive>
<IsShowOnInvoice>true</IsShowOnInvoice>
<OpeningBalance>3.149</OpeningBalance>
<OpeningDate>2000-01-23T04:56:07.000Z</OpeningDate>
<ClosingBalance>3.149</ClosingBalance>
<ClosingDate>2000-01-23T04:56:07.000Z</ClosingDate>
<Balance>3.149</Balance>
<IsParentAccount>true</IsParentAccount>
<ParentAccountID>123</ParentAccountID>
<ParentAccountBSID>aeiou</ParentAccountBSID>
<ParentAccountCode>aeiou</ParentAccountCode>
<ParentAccountName>aeiou</ParentAccountName>
</null>
<null>
<PaymentMethodName>aeiou</PaymentMethodName>
<IsShowOnInvoice>true</IsShowOnInvoice>
<MerchantSurchargePercent>3.149</MerchantSurchargePercent>
</null>
</AccountPaymentMethods>' \
-d 'Custom MIME type example not yet supported: text/xml' \
-d 'Custom MIME type example not yet supported: application/x-www-form-urlencoded'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
// Create an instance of the API class
DefaultApi apiInstance = new DefaultApi();
AccountPaymentMethods accountPaymentMethods = {"DefaultPostingAccount":{"GUID":"00000000-0000-0000-0000-000000000000","RowNumber":0,"Version":0,"ID":0,"GUIDstring":"string","BSID":"string","Code":"string","Name":"string","Description":"string","Type":"string","TaxType":"string","Class":"string","IsEnablePayments":true,"IsShowInExpenseClaims":true,"BankAccountNumber":"string","BankAccountName":"string","BankAccountType":"string","BankBSB":"string","BankName":"string","CurrencyCode":"string","IsActive":true,"IsShowOnInvoice":true,"OpeningBalance":0,"OpeningDate":"string","ClosingBalance":0,"ClosingDate":"string","Balance":0,"SyncLogs":[{"LastImportDateTime":"string","LastExportDateTime":"string","ID":0,"AdaptorID":0,"BSID":"string","LastImportDateTime_utc":"string","LastImportDateTime_offset":0,"Status":"string","Details":"string","LastExportDateTime_utc":"string","LastExportDateTime_offset":0,"SyncCode":"string","LastModifiedDateTime_utc":"string","LastModifiedDateTime_offset":0}],"IsParentAccount":true,"ParentAccountID":0,"ParentAccountBSID":"string","ParentAccountCode":"string","ParentAccountName":"string"},"Settings":[{"Account":{"GUID":"00000000-0000-0000-0000-000000000000","RowNumber":0,"Version":0,"ID":0,"GUIDstring":"string","BSID":"string","Code":"string","Name":"string","Description":"string","Type":"string","TaxType":"string","Class":"string","IsEnablePayments":true,"IsShowInExpenseClaims":true,"BankAccountNumber":"string","BankAccountName":"string","BankAccountType":"string","BankBSB":"string","BankName":"string","CurrencyCode":"string","IsActive":true,"IsShowOnInvoice":true,"OpeningBalance":0,"OpeningDate":"string","ClosingBalance":0,"ClosingDate":"string","Balance":0,"SyncLogs":[{"LastImportDateTime":"string","LastExportDateTime":"string","ID":0,"AdaptorID":0,"BSID":"string","LastImportDateTime_utc":"string","LastImportDateTime_offset":0,"Status":"string","Details":"string","LastExportDateTime_utc":"string","LastExportDateTime_offset":0,"SyncCode":"string","LastModifiedDateTime_utc":"string","LastModifiedDateTime_offset":0}],"IsParentAccount":true,"ParentAccountID":0,"ParentAccountBSID":"string","ParentAccountCode":"string","ParentAccountName":"string"},"PaymentMethodName":"string","IsShowOnInvoice":true,"MerchantSurchargePercent":0}]}; // AccountPaymentMethods |
try {
ActionResults result = apiInstance.accountsSavePaymentMethods(accountPaymentMethods);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#accountsSavePaymentMethods");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final AccountPaymentMethods accountPaymentMethods = new AccountPaymentMethods(); // AccountPaymentMethods |
try {
final result = await api_instance.accountsSavePaymentMethods(accountPaymentMethods);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->accountsSavePaymentMethods: $e\n');
}
import org.openapitools.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
AccountPaymentMethods accountPaymentMethods = {"DefaultPostingAccount":{"GUID":"00000000-0000-0000-0000-000000000000","RowNumber":0,"Version":0,"ID":0,"GUIDstring":"string","BSID":"string","Code":"string","Name":"string","Description":"string","Type":"string","TaxType":"string","Class":"string","IsEnablePayments":true,"IsShowInExpenseClaims":true,"BankAccountNumber":"string","BankAccountName":"string","BankAccountType":"string","BankBSB":"string","BankName":"string","CurrencyCode":"string","IsActive":true,"IsShowOnInvoice":true,"OpeningBalance":0,"OpeningDate":"string","ClosingBalance":0,"ClosingDate":"string","Balance":0,"SyncLogs":[{"LastImportDateTime":"string","LastExportDateTime":"string","ID":0,"AdaptorID":0,"BSID":"string","LastImportDateTime_utc":"string","LastImportDateTime_offset":0,"Status":"string","Details":"string","LastExportDateTime_utc":"string","LastExportDateTime_offset":0,"SyncCode":"string","LastModifiedDateTime_utc":"string","LastModifiedDateTime_offset":0}],"IsParentAccount":true,"ParentAccountID":0,"ParentAccountBSID":"string","ParentAccountCode":"string","ParentAccountName":"string"},"Settings":[{"Account":{"GUID":"00000000-0000-0000-0000-000000000000","RowNumber":0,"Version":0,"ID":0,"GUIDstring":"string","BSID":"string","Code":"string","Name":"string","Description":"string","Type":"string","TaxType":"string","Class":"string","IsEnablePayments":true,"IsShowInExpenseClaims":true,"BankAccountNumber":"string","BankAccountName":"string","BankAccountType":"string","BankBSB":"string","BankName":"string","CurrencyCode":"string","IsActive":true,"IsShowOnInvoice":true,"OpeningBalance":0,"OpeningDate":"string","ClosingBalance":0,"ClosingDate":"string","Balance":0,"SyncLogs":[{"LastImportDateTime":"string","LastExportDateTime":"string","ID":0,"AdaptorID":0,"BSID":"string","LastImportDateTime_utc":"string","LastImportDateTime_offset":0,"Status":"string","Details":"string","LastExportDateTime_utc":"string","LastExportDateTime_offset":0,"SyncCode":"string","LastModifiedDateTime_utc":"string","LastModifiedDateTime_offset":0}],"IsParentAccount":true,"ParentAccountID":0,"ParentAccountBSID":"string","ParentAccountCode":"string","ParentAccountName":"string"},"PaymentMethodName":"string","IsShowOnInvoice":true,"MerchantSurchargePercent":0}]}; // AccountPaymentMethods |
try {
ActionResults result = apiInstance.accountsSavePaymentMethods(accountPaymentMethods);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#accountsSavePaymentMethods");
e.printStackTrace();
}
}
}
// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
AccountPaymentMethods *accountPaymentMethods = {"DefaultPostingAccount":{"GUID":"00000000-0000-0000-0000-000000000000","RowNumber":0,"Version":0,"ID":0,"GUIDstring":"string","BSID":"string","Code":"string","Name":"string","Description":"string","Type":"string","TaxType":"string","Class":"string","IsEnablePayments":true,"IsShowInExpenseClaims":true,"BankAccountNumber":"string","BankAccountName":"string","BankAccountType":"string","BankBSB":"string","BankName":"string","CurrencyCode":"string","IsActive":true,"IsShowOnInvoice":true,"OpeningBalance":0,"OpeningDate":"string","ClosingBalance":0,"ClosingDate":"string","Balance":0,"SyncLogs":[{"LastImportDateTime":"string","LastExportDateTime":"string","ID":0,"AdaptorID":0,"BSID":"string","LastImportDateTime_utc":"string","LastImportDateTime_offset":0,"Status":"string","Details":"string","LastExportDateTime_utc":"string","LastExportDateTime_offset":0,"SyncCode":"string","LastModifiedDateTime_utc":"string","LastModifiedDateTime_offset":0}],"IsParentAccount":true,"ParentAccountID":0,"ParentAccountBSID":"string","ParentAccountCode":"string","ParentAccountName":"string"},"Settings":[{"Account":{"GUID":"00000000-0000-0000-0000-000000000000","RowNumber":0,"Version":0,"ID":0,"GUIDstring":"string","BSID":"string","Code":"string","Name":"string","Description":"string","Type":"string","TaxType":"string","Class":"string","IsEnablePayments":true,"IsShowInExpenseClaims":true,"BankAccountNumber":"string","BankAccountName":"string","BankAccountType":"string","BankBSB":"string","BankName":"string","CurrencyCode":"string","IsActive":true,"IsShowOnInvoice":true,"OpeningBalance":0,"OpeningDate":"string","ClosingBalance":0,"ClosingDate":"string","Balance":0,"SyncLogs":[{"LastImportDateTime":"string","LastExportDateTime":"string","ID":0,"AdaptorID":0,"BSID":"string","LastImportDateTime_utc":"string","LastImportDateTime_offset":0,"Status":"string","Details":"string","LastExportDateTime_utc":"string","LastExportDateTime_offset":0,"SyncCode":"string","LastModifiedDateTime_utc":"string","LastModifiedDateTime_offset":0}],"IsParentAccount":true,"ParentAccountID":0,"ParentAccountBSID":"string","ParentAccountCode":"string","ParentAccountName":"string"},"PaymentMethodName":"string","IsShowOnInvoice":true,"MerchantSurchargePercent":0}]}; // (optional)
// Accounts_SavePaymentMethods
[apiInstance accountsSavePaymentMethodsWith:accountPaymentMethods
completionHandler: ^(ActionResults output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var AsServerApiAccounts = require('as_server_api_accounts');
// Create an instance of the API class
var api = new AsServerApiAccounts.DefaultApi()
var opts = {
'accountPaymentMethods': {"DefaultPostingAccount":{"GUID":"00000000-0000-0000-0000-000000000000","RowNumber":0,"Version":0,"ID":0,"GUIDstring":"string","BSID":"string","Code":"string","Name":"string","Description":"string","Type":"string","TaxType":"string","Class":"string","IsEnablePayments":true,"IsShowInExpenseClaims":true,"BankAccountNumber":"string","BankAccountName":"string","BankAccountType":"string","BankBSB":"string","BankName":"string","CurrencyCode":"string","IsActive":true,"IsShowOnInvoice":true,"OpeningBalance":0,"OpeningDate":"string","ClosingBalance":0,"ClosingDate":"string","Balance":0,"SyncLogs":[{"LastImportDateTime":"string","LastExportDateTime":"string","ID":0,"AdaptorID":0,"BSID":"string","LastImportDateTime_utc":"string","LastImportDateTime_offset":0,"Status":"string","Details":"string","LastExportDateTime_utc":"string","LastExportDateTime_offset":0,"SyncCode":"string","LastModifiedDateTime_utc":"string","LastModifiedDateTime_offset":0}],"IsParentAccount":true,"ParentAccountID":0,"ParentAccountBSID":"string","ParentAccountCode":"string","ParentAccountName":"string"},"Settings":[{"Account":{"GUID":"00000000-0000-0000-0000-000000000000","RowNumber":0,"Version":0,"ID":0,"GUIDstring":"string","BSID":"string","Code":"string","Name":"string","Description":"string","Type":"string","TaxType":"string","Class":"string","IsEnablePayments":true,"IsShowInExpenseClaims":true,"BankAccountNumber":"string","BankAccountName":"string","BankAccountType":"string","BankBSB":"string","BankName":"string","CurrencyCode":"string","IsActive":true,"IsShowOnInvoice":true,"OpeningBalance":0,"OpeningDate":"string","ClosingBalance":0,"ClosingDate":"string","Balance":0,"SyncLogs":[{"LastImportDateTime":"string","LastExportDateTime":"string","ID":0,"AdaptorID":0,"BSID":"string","LastImportDateTime_utc":"string","LastImportDateTime_offset":0,"Status":"string","Details":"string","LastExportDateTime_utc":"string","LastExportDateTime_offset":0,"SyncCode":"string","LastModifiedDateTime_utc":"string","LastModifiedDateTime_offset":0}],"IsParentAccount":true,"ParentAccountID":0,"ParentAccountBSID":"string","ParentAccountCode":"string","ParentAccountName":"string"},"PaymentMethodName":"string","IsShowOnInvoice":true,"MerchantSurchargePercent":0}]} // {AccountPaymentMethods}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.accountsSavePaymentMethods(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class accountsSavePaymentMethodsExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new DefaultApi();
var accountPaymentMethods = new AccountPaymentMethods(); // AccountPaymentMethods | (optional)
try {
// Accounts_SavePaymentMethods
ActionResults result = apiInstance.accountsSavePaymentMethods(accountPaymentMethods);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling DefaultApi.accountsSavePaymentMethods: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$accountPaymentMethods = {"DefaultPostingAccount":{"GUID":"00000000-0000-0000-0000-000000000000","RowNumber":0,"Version":0,"ID":0,"GUIDstring":"string","BSID":"string","Code":"string","Name":"string","Description":"string","Type":"string","TaxType":"string","Class":"string","IsEnablePayments":true,"IsShowInExpenseClaims":true,"BankAccountNumber":"string","BankAccountName":"string","BankAccountType":"string","BankBSB":"string","BankName":"string","CurrencyCode":"string","IsActive":true,"IsShowOnInvoice":true,"OpeningBalance":0,"OpeningDate":"string","ClosingBalance":0,"ClosingDate":"string","Balance":0,"SyncLogs":[{"LastImportDateTime":"string","LastExportDateTime":"string","ID":0,"AdaptorID":0,"BSID":"string","LastImportDateTime_utc":"string","LastImportDateTime_offset":0,"Status":"string","Details":"string","LastExportDateTime_utc":"string","LastExportDateTime_offset":0,"SyncCode":"string","LastModifiedDateTime_utc":"string","LastModifiedDateTime_offset":0}],"IsParentAccount":true,"ParentAccountID":0,"ParentAccountBSID":"string","ParentAccountCode":"string","ParentAccountName":"string"},"Settings":[{"Account":{"GUID":"00000000-0000-0000-0000-000000000000","RowNumber":0,"Version":0,"ID":0,"GUIDstring":"string","BSID":"string","Code":"string","Name":"string","Description":"string","Type":"string","TaxType":"string","Class":"string","IsEnablePayments":true,"IsShowInExpenseClaims":true,"BankAccountNumber":"string","BankAccountName":"string","BankAccountType":"string","BankBSB":"string","BankName":"string","CurrencyCode":"string","IsActive":true,"IsShowOnInvoice":true,"OpeningBalance":0,"OpeningDate":"string","ClosingBalance":0,"ClosingDate":"string","Balance":0,"SyncLogs":[{"LastImportDateTime":"string","LastExportDateTime":"string","ID":0,"AdaptorID":0,"BSID":"string","LastImportDateTime_utc":"string","LastImportDateTime_offset":0,"Status":"string","Details":"string","LastExportDateTime_utc":"string","LastExportDateTime_offset":0,"SyncCode":"string","LastModifiedDateTime_utc":"string","LastModifiedDateTime_offset":0}],"IsParentAccount":true,"ParentAccountID":0,"ParentAccountBSID":"string","ParentAccountCode":"string","ParentAccountName":"string"},"PaymentMethodName":"string","IsShowOnInvoice":true,"MerchantSurchargePercent":0}]}; // AccountPaymentMethods |
try {
$result = $api_instance->accountsSavePaymentMethods($accountPaymentMethods);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->accountsSavePaymentMethods: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $accountPaymentMethods = WWW::OPenAPIClient::Object::AccountPaymentMethods->new(); # AccountPaymentMethods |
eval {
my $result = $api_instance->accountsSavePaymentMethods(accountPaymentMethods => $accountPaymentMethods);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->accountsSavePaymentMethods: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
accountPaymentMethods = {"DefaultPostingAccount":{"GUID":"00000000-0000-0000-0000-000000000000","RowNumber":0,"Version":0,"ID":0,"GUIDstring":"string","BSID":"string","Code":"string","Name":"string","Description":"string","Type":"string","TaxType":"string","Class":"string","IsEnablePayments":true,"IsShowInExpenseClaims":true,"BankAccountNumber":"string","BankAccountName":"string","BankAccountType":"string","BankBSB":"string","BankName":"string","CurrencyCode":"string","IsActive":true,"IsShowOnInvoice":true,"OpeningBalance":0,"OpeningDate":"string","ClosingBalance":0,"ClosingDate":"string","Balance":0,"SyncLogs":[{"LastImportDateTime":"string","LastExportDateTime":"string","ID":0,"AdaptorID":0,"BSID":"string","LastImportDateTime_utc":"string","LastImportDateTime_offset":0,"Status":"string","Details":"string","LastExportDateTime_utc":"string","LastExportDateTime_offset":0,"SyncCode":"string","LastModifiedDateTime_utc":"string","LastModifiedDateTime_offset":0}],"IsParentAccount":true,"ParentAccountID":0,"ParentAccountBSID":"string","ParentAccountCode":"string","ParentAccountName":"string"},"Settings":[{"Account":{"GUID":"00000000-0000-0000-0000-000000000000","RowNumber":0,"Version":0,"ID":0,"GUIDstring":"string","BSID":"string","Code":"string","Name":"string","Description":"string","Type":"string","TaxType":"string","Class":"string","IsEnablePayments":true,"IsShowInExpenseClaims":true,"BankAccountNumber":"string","BankAccountName":"string","BankAccountType":"string","BankBSB":"string","BankName":"string","CurrencyCode":"string","IsActive":true,"IsShowOnInvoice":true,"OpeningBalance":0,"OpeningDate":"string","ClosingBalance":0,"ClosingDate":"string","Balance":0,"SyncLogs":[{"LastImportDateTime":"string","LastExportDateTime":"string","ID":0,"AdaptorID":0,"BSID":"string","LastImportDateTime_utc":"string","LastImportDateTime_offset":0,"Status":"string","Details":"string","LastExportDateTime_utc":"string","LastExportDateTime_offset":0,"SyncCode":"string","LastModifiedDateTime_utc":"string","LastModifiedDateTime_offset":0}],"IsParentAccount":true,"ParentAccountID":0,"ParentAccountBSID":"string","ParentAccountCode":"string","ParentAccountName":"string"},"PaymentMethodName":"string","IsShowOnInvoice":true,"MerchantSurchargePercent":0}]} # AccountPaymentMethods | (optional)
try:
# Accounts_SavePaymentMethods
api_response = api_instance.accounts_save_payment_methods(accountPaymentMethods=accountPaymentMethods)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->accountsSavePaymentMethods: %s\n" % e)
extern crate DefaultApi;
pub fn main() {
let accountPaymentMethods = {"DefaultPostingAccount":{"GUID":"00000000-0000-0000-0000-000000000000","RowNumber":0,"Version":0,"ID":0,"GUIDstring":"string","BSID":"string","Code":"string","Name":"string","Description":"string","Type":"string","TaxType":"string","Class":"string","IsEnablePayments":true,"IsShowInExpenseClaims":true,"BankAccountNumber":"string","BankAccountName":"string","BankAccountType":"string","BankBSB":"string","BankName":"string","CurrencyCode":"string","IsActive":true,"IsShowOnInvoice":true,"OpeningBalance":0,"OpeningDate":"string","ClosingBalance":0,"ClosingDate":"string","Balance":0,"SyncLogs":[{"LastImportDateTime":"string","LastExportDateTime":"string","ID":0,"AdaptorID":0,"BSID":"string","LastImportDateTime_utc":"string","LastImportDateTime_offset":0,"Status":"string","Details":"string","LastExportDateTime_utc":"string","LastExportDateTime_offset":0,"SyncCode":"string","LastModifiedDateTime_utc":"string","LastModifiedDateTime_offset":0}],"IsParentAccount":true,"ParentAccountID":0,"ParentAccountBSID":"string","ParentAccountCode":"string","ParentAccountName":"string"},"Settings":[{"Account":{"GUID":"00000000-0000-0000-0000-000000000000","RowNumber":0,"Version":0,"ID":0,"GUIDstring":"string","BSID":"string","Code":"string","Name":"string","Description":"string","Type":"string","TaxType":"string","Class":"string","IsEnablePayments":true,"IsShowInExpenseClaims":true,"BankAccountNumber":"string","BankAccountName":"string","BankAccountType":"string","BankBSB":"string","BankName":"string","CurrencyCode":"string","IsActive":true,"IsShowOnInvoice":true,"OpeningBalance":0,"OpeningDate":"string","ClosingBalance":0,"ClosingDate":"string","Balance":0,"SyncLogs":[{"LastImportDateTime":"string","LastExportDateTime":"string","ID":0,"AdaptorID":0,"BSID":"string","LastImportDateTime_utc":"string","LastImportDateTime_offset":0,"Status":"string","Details":"string","LastExportDateTime_utc":"string","LastExportDateTime_offset":0,"SyncCode":"string","LastModifiedDateTime_utc":"string","LastModifiedDateTime_offset":0}],"IsParentAccount":true,"ParentAccountID":0,"ParentAccountBSID":"string","ParentAccountCode":"string","ParentAccountName":"string"},"PaymentMethodName":"string","IsShowOnInvoice":true,"MerchantSurchargePercent":0}]}; // AccountPaymentMethods
let mut context = DefaultApi::Context::default();
let result = client.accountsSavePaymentMethods(accountPaymentMethods, &context).wait();
println!("{:?}", result);
}