This file contains 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 xeroToken = client.RequestAccessTokenAsync(code).GetAwaiter().GetResult(); |
This file contains 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
public XeroClient GetClient() | |
{ | |
var xeroConfig = new XeroConfiguration() | |
{ | |
ClientId = _xeroConfig.Value.XeroConnect.ClientId, | |
CallbackUri = new Uri(_xeroConfig.Value.XeroConnect.RedirectUri), | |
Scope = | |
"openid profile email offline_access files accounting.transactions accounting.contacts accounting.settings", | |
State = "WinFormsApp" | |
}; |
This file contains 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 api = new IdentityApi(); | |
var companies = await api.GetConnectionsAsync(AccessToken); //Access Token from Json | |
This file contains 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 http = new HttpListener(); | |
http.Prefixes.Add(RedirectUri); | |
http.Start(); |
This file contains 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
<?php | |
require_once(__DIR__ . '/vendor/autoload.php'); | |
// Configure OAuth2 access token for authorization: OAuth2 | |
$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); | |
$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi( | |
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. | |
// This is optional, `GuzzleHttp\Client` will be used as default. | |
new GuzzleHttp\Client(), |
This file contains 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
sudo apt install -y git mysql-server | |
sudo apt install -y -t buster apache2 php7.2 php7.2-curl php7.2-gd php7.2-imap php7.2-json mcrypt php7.2-mysql php7.2-opcache php7.2-xmlrpc libapache2-mod-php7.2 php7.2-xml php7.2-mbstring | |
sudo apt install -y composer nodejs npm |
This file contains 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
sudo apt-get update -y | |
sudo apt-get dist-upgrade -y | |
sudo apt-get upgrade -y |
This file contains 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
"Mimetype==\"application/pdf\"" |
This file contains 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
PrivateApplication = Connect(); | |
List<Contact> CompanyContacts = new List<Contact>(); | |
Thread.Sleep(1200); | |
XeroLogging.Info("GetContacts Page #" + Request.ToString()); | |
try | |
{ | |
CompanyContacts = PrivateApplication.Contacts.Page(Request).Find().ToList(); | |
XeroLogging.Info("GetContacts Page Success #" + Request.ToString()); | |
} |
This file contains 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
Invoice inv = new Invoice(); | |
inv.LineItems = new List<LineItem>(); | |
//Inside a loop | |
inv.LineItems.Add(new LineItem() { | |
Description = "Testing" | |
}); |
NewerOlder