Skip to content

Commit 0455b9c

Browse files
authored
Merge pull request #46 from dan-harris/bugfix/missing-payroll-constructor-params
bugfix/missing-payroll-constructor-params
2 parents 6339633 + 2081e34 commit 0455b9c

File tree

5 files changed

+20
-2
lines changed

5 files changed

+20
-2
lines changed

Xero.Api/Infrastructure/Applications/Private/AmericanPayroll.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public AmericanPayroll(bool includeRateLimiter = false) :
1313
}
1414

1515
public AmericanPayroll(IAuthenticator authenticator, bool includeRateLimiter = false)
16-
: base(authenticator, rateLimiter: includeRateLimiter ? new RateLimiter.RateLimiter() : null)
16+
: base(authenticator, null, rateLimiter: includeRateLimiter ? new RateLimiter.RateLimiter() : null)
1717
{
1818
}
1919
}

Xero.Api/Infrastructure/Applications/Private/AustralianPayroll.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public AustralianPayroll(bool includeRateLimiter = false) :
1313
}
1414

1515
public AustralianPayroll(IAuthenticator authenticator, bool includeRateLimiter = false)
16-
: base(authenticator, rateLimiter: includeRateLimiter ? new RateLimiter.RateLimiter() : null)
16+
: base(authenticator, null, rateLimiter: includeRateLimiter ? new RateLimiter.RateLimiter() : null)
1717
{
1818
}
1919
}

Xero.Api/Payroll/AmericanPayroll.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ public AmericanPayroll(IAuthenticator auth, IUser user = null, IRateLimiter rate
1717
Connect();
1818
}
1919

20+
public AmericanPayroll(string baseUrl, IAuthenticator auth, IUser user = null, IConsumer consumer = null, IRateLimiter rateLimiter = null)
21+
: base(baseUrl, auth, user, consumer, rateLimiter)
22+
{
23+
Connect();
24+
}
25+
26+
2027
public WorkLocationsEndpoint WorkLocations { get; private set; }
2128
public PayItemsEndpoint PayItems { get; private set; }
2229
public PayStubsEndpoint PayStubs { get; private set; }

Xero.Api/Payroll/AustralianPayroll.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ public AustralianPayroll(IAuthenticator auth, IUser user = null, IRateLimiter ra
1717
Connect();
1818
}
1919

20+
public AustralianPayroll(string baseUrl, IAuthenticator auth, IUser user = null, IConsumer consumer = null, IRateLimiter rateLimiter = null)
21+
: base(baseUrl, auth, user, consumer, rateLimiter)
22+
{
23+
Connect();
24+
}
25+
2026
public SuperFundsEndpoint SuperFunds { get; set; }
2127
public SuperFundProductsEndpoint SuperFundProducts { get; set; }
2228
public LeaveApplicationsEndpoint LeaveApplications { get; set; }

Xero.Api/Payroll/Common/PayrollApi.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,10 @@ protected PayrollApi(IAuthenticator auth, IUser user = null, IRateLimiter rateLi
1313
: base(ApplicationSettings.BaseUrl, auth, new Consumer(ApplicationSettings.ConsumerKey, ApplicationSettings.ConsumerSecret), user, rateLimiter)
1414
{
1515
}
16+
17+
protected PayrollApi(string baseUrl, IAuthenticator auth, IUser user = null, IConsumer consumer = null, IRateLimiter rateLimiter = null)
18+
: base(baseUrl, auth, consumer, user, rateLimiter)
19+
{
20+
}
1621
}
1722
}

0 commit comments

Comments
 (0)