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();
 }
Exemplo n.º 3
0
 public IEnumerable <Organization> execute(IXeroCoreApi xeroCoreApi)
 {
     return(new List <Organization>
     {
         mapper.Map <Organization>(xeroCoreApi.FindOrganisationAsync().Result)
     });
 }
Exemplo n.º 4
0
 public XeroRepository(
     AuthenticatorFacadeImpl authenticatorFacadeImpl,
     IXeroApiSettings settings, User currentUser)
 {
     xeroCoreApi = new XeroCoreApi(
         authenticatorFacadeImpl.XeroAuthenticator,
         settings,
         new ApiUser {
         Identifier = currentUser.Identifier
     });
 }
Exemplo n.º 5
0
 public Lister(IXeroCoreApi api)
 {
     _api = api;
 }
Exemplo n.º 6
0
 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());
 }
Exemplo n.º 8
0
 public Lister(IXeroCoreApi api)
 {
     _api = api;
 }