This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TrackingCategory tr = _api.TrackingCategories.Find().First(); | |
_api.TrackingCategories[tr.Id].Add(new Option(){Name = "Blue"}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_api.PurchaseOrders.Create(new PurchaseOrder() | |
{ | |
Contact = new Contact() | |
{ | |
ContactNumber = "C0001" | |
}, | |
Number = "4920249", | |
LineItems = new List<LineItem>() | |
{ | |
new LineItem() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_api.Files.ModifiedSince(new DateTime(2016, 04, 20)).Find(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
invoices = Xero.Invoice.all(:where => {:type => 'ACCREC', :amount_due_is_not => 0}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$XeroOAuth->request('DELETE', $XeroOAuth->url('Items', 'core'), array(), $xml); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var invoice = Api.Create(new Invoice | |
{ | |
Contact = new Contact { Name = "ABC Limited" }, | |
Type = InvoiceType.AccountsReceivable, | |
LineItems = new List<LineItem> | |
{ | |
new LineItem | |
{ | |
AccountCode = "200", | |
Description = "Good value item", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<Invoice> AllInvoices = new List<Invoice>(); | |
List<Invoice> CurrentInvoices = new List<Invoice>(); | |
int i = 1; | |
CurrentInvoices = _api.Invoices.Page(i).Find().OrderBy(e => e.DueDate).ToList(); | |
while(CurrentInvoices != null) | |
{ | |
AllInvoices.AddRange(CurrentInvoices); | |
i++; | |
CurrentInvoices = _api.Invoices.Page(i).Find().OrderBy(e => e.DueDate).ToList(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
t.NAME AS TableName, | |
i.name as indexName, | |
sum(p.rows) as RowCounts, | |
sum(a.total_pages) as TotalPages, | |
sum(a.used_pages) as UsedPages, | |
sum(a.data_pages) as DataPages, | |
(sum(a.total_pages) * 8) / 1024 as TotalSpaceMB, | |
(sum(a.used_pages) * 8) / 1024 as UsedSpaceMB, | |
(sum(a.data_pages) * 8) / 1024 as DataSpaceMB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ini_set('display_errors', true); | |
ini_set('error_reporting', E_ALL); | |
define('OUTMARKET_APIURL', 'https://api.omkt.co/icp'); | |
// Load the OutMarket library | |
require_once('OutMarketApi.php'); | |
// Give the API your information | |
OutMarketApi::getInstance()->setConfig(array( | |
'appId' => 'b6b7757e-fcdc-4891-88fd-9175c9174bd6', |