public XeroHttpClient(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user, IJsonObjectMapper jsonMapper, IXmlObjectMapper xmlMapper, IRateLimiter rateLimiter = null)
 {
     this.baseUri     = new Uri(baseUri);
     this.auth        = auth;
     this.consumer    = consumer;
     this.user        = user;
     this.rateLimiter = rateLimiter;
     this.jsonMapper  = jsonMapper;
     this.xmlMapper   = xmlMapper;
 }
示例#2
0
 public XeroCoreApi(string baseUri, ICertificateAuthenticator auth, IConsumer consumer, IUser user,
     IJsonObjectMapper readMapper, IXmlObjectMapper writeMapper)
     : this(baseUri, auth, consumer, user, readMapper, writeMapper, null)
 {
 }
示例#3
0
 public AustralianPayroll(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user, IJsonObjectMapper readMapper, IXmlObjectMapper writeMapper, IRateLimiter rateLimiter)
     : base(baseUri, auth, consumer, user, readMapper, writeMapper, rateLimiter)
 {
     Connect();
 }
示例#4
0
 public AustralianPayroll(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user,
     IJsonObjectMapper readMapper, IXmlObjectMapper writeMapper)
     : this(baseUri, auth, consumer, user, readMapper, writeMapper, null)
 {
 }
示例#5
0
 public AmericanPayroll(string baseUri, ICertificateAuthenticator auth, IConsumer consumer, IUser user,
     IJsonObjectMapper readMapper, IXmlObjectMapper writeMapper)
     : base(baseUri, auth, consumer, user, readMapper, writeMapper, null)
 {
 }
示例#6
0
 private XeroHttpClient(IJsonObjectMapper jsonMapper, IXmlObjectMapper xmlMapper)
 {
     JsonMapper = jsonMapper;
     XmlMapper  = xmlMapper;
 }
 private XeroHttpClient(IJsonObjectMapper jsonMapper, IXmlObjectMapper xmlMapper)
 {
     JsonMapper = jsonMapper;
     XmlMapper  = xmlMapper;
     Parameters = new NameValueCollection();
 }
示例#8
0
 public XeroCoreApi(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user,
                    IJsonObjectMapper readMapper, IXmlObjectMapper writeMapper)
     : this(baseUri, auth, consumer, user, readMapper, writeMapper, null)
 {
 }
示例#9
0
 protected XeroApi(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user, IJsonObjectMapper readMapper, IXmlObjectMapper writeMapper, IRateLimiter rateLimiter)
     : this(baseUri)
 {
     Client            = new XeroHttpClient(baseUri, auth, consumer, user, readMapper, writeMapper, rateLimiter);
     Client.ApiCalled += (sender, e) => ApiCalled?.Invoke(this, e);
 }
示例#10
0
        public XeroHttpClient(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user, IJsonObjectMapper jsonMapper, IXmlObjectMapper xmlMapper, IRateLimiter rateLimiter)
            : this(jsonMapper, xmlMapper)
        {
            Client = new HttpClient(baseUri, auth, consumer, user, rateLimiter);
            EventHandler <ApiCallEventArgs> apiCalledEventHander = (sender, e) => ApiCalled?.Invoke(this, e);

            Client.ApiCalled += apiCalledEventHander;
            auth.ApiCalled   += apiCalledEventHander;
        }
示例#11
0
 public void SetUp()
 {
     _jsonMapper = new DefaultMapper();
     _xmlMapper  = new DefaultMapper();
 }
示例#12
0
 public AmericanPayroll(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user,
                        IJsonObjectMapper readMapper, IXmlObjectMapper writeMapper, ITokenStore tokenStore)
     : this(baseUri, auth, consumer, user, readMapper, writeMapper, null, tokenStore)
 {
 }
示例#13
0
 public XeroHttpClient(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user, IJsonObjectMapper jsonMapper, IXmlObjectMapper xmlMapper, IRateLimiter rateLimiter, ITokenStore tokenStore)
     : this(jsonMapper, xmlMapper)
 {
     Client = new HttpClient(baseUri, tokenStore, auth, consumer, user, rateLimiter);
 }
示例#14
0
 protected PayrollApi(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user, IJsonObjectMapper readMapper, IXmlObjectMapper writeMapper, IRateLimiter rateLimiter)
     : base(baseUri, auth, consumer, user, readMapper, writeMapper, rateLimiter)
 {
 }
示例#15
0
 public XeroCoreApi(string baseUri, ICertificateAuthenticator auth, IConsumer consumer, IUser user, IJsonObjectMapper readMapper, IXmlObjectMapper writeMapper, IRateLimiter rateLimiter)
     : base(baseUri, auth, consumer, user, readMapper, writeMapper, rateLimiter)
 {
     Connect();
 }
示例#16
0
 public AustralianPayroll(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user, IJsonObjectMapper readMapper, IXmlObjectMapper writeMapper, IRateLimiter rateLimiter, ITokenStore tokenStore)
     : base(baseUri, auth, consumer, user, readMapper, writeMapper, rateLimiter, tokenStore)
 {
     Connect();
 }
示例#17
0
 protected PayrollApi(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user, IJsonObjectMapper readMapper, IXmlObjectMapper writeMapper, IRateLimiter rateLimiter)
     : base(baseUri, auth, consumer, user, readMapper, writeMapper, rateLimiter)
 {
 }
示例#18
0
 protected XeroApi(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user, IJsonObjectMapper readMapper, IXmlObjectMapper writeMapper, IRateLimiter rateLimiter)
     : this(baseUri)
 {
     Client = new XeroHttpClient(baseUri, auth, consumer, user, readMapper, writeMapper, rateLimiter);
 }
示例#19
0
 public XeroCoreApi(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user, IJsonObjectMapper readMapper, IXmlObjectMapper writeMapper, IRateLimiter rateLimiter)
     : base(baseUri, auth, consumer, user, readMapper, writeMapper, rateLimiter)
 {
     Connect();
 }
示例#20
0
 public AustralianPayroll(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user,
                          IJsonObjectMapper readMapper, IXmlObjectMapper writeMapper)
     : this(baseUri, auth, consumer, user, readMapper, writeMapper, null)
 {
 }
示例#21
0
 public XeroHttpClient(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user,
                       IJsonObjectMapper jsonMapper, IXmlObjectMapper xmlMapper)
     : this(baseUri, auth, consumer, user, jsonMapper, xmlMapper, null)
 {
 }
示例#22
0
 public AmericanPayroll(string baseUri, ICertificateAuthenticator auth, IConsumer consumer, IUser user, IJsonObjectMapper readMapper, IXmlObjectMapper writeMapper, IRateLimiter rateLimiter)
     : base(baseUri, auth, consumer, user, readMapper, writeMapper, rateLimiter)
 {
     Connect();
 }
示例#23
0
 public XeroHttpClient(string baseUri, ICertificateAuthenticator auth, IConsumer consumer, IUser user, IJsonObjectMapper jsonMapper, IXmlObjectMapper xmlMapper)
     : this(jsonMapper, xmlMapper)
 {
     Client = new HttpClient(baseUri, auth, consumer, user);
 }
示例#24
0
 protected XeroApi(string baseUri, ICertificateAuthenticator auth, IConsumer consumer, IUser user, IJsonObjectMapper readMapper, IXmlObjectMapper writeMapper)
     : this(baseUri)
 {
     Client = new XeroHttpClient(baseUri, auth, consumer, user, readMapper, writeMapper);
 }