public IEnumerable <Vendor> execute(IXeroCoreApi xeroCoreApi) { return(xeroCoreApi.Contacts .Where("IsSupplier=true").FindAsync().Result .Select(x => mapper.Map <Vendor>(x)) .ToList()); }
/// <summary> /// Export Invoice to a physical location by specifying file names in app.config /// </summary> /// <param name="api"></param> /// <param name="accountsFileName"></param> /// <param name="vendorsFileName"></param> public InvoiceExporter(IXeroCoreApi api, string accountsFileName, string vendorsFileName) { this.api = api; this.accountsFileName = accountsFileName; this.vendorsFileName = vendorsFileName; invoiceInfo = new InvoiceInfo(); }
public IEnumerable <Organization> execute(IXeroCoreApi xeroCoreApi) { return(new List <Organization> { mapper.Map <Organization>(xeroCoreApi.FindOrganisationAsync().Result) }); }
public XeroRepository( AuthenticatorFacadeImpl authenticatorFacadeImpl, IXeroApiSettings settings, User currentUser) { xeroCoreApi = new XeroCoreApi( authenticatorFacadeImpl.XeroAuthenticator, settings, new ApiUser { Identifier = currentUser.Identifier }); }
public Lister(IXeroCoreApi api) { _api = api; }
public ApiConnector() { Authenticator = new PrivateAuthenticator(CertificatePath, CertificatePassword); Api = new XeroCoreApi(Authenticator as IAuthenticator, GetApiSetting(), User()); }
public IEnumerable <Account> execute(IXeroCoreApi xeroCoreApi) { return(xeroCoreApi.Accounts.FindAsync().Result .Select(x => mapper.Map <Account>(x)) .ToList()); }
public Lister(IXeroCoreApi api) { _api = api; }