| Modifier and Type | Method and Description |
|---|---|
String |
BrightpearlApiClient.fetchLegacyAuthToken(Account account,
UserCredentials userCredentials)
Using Brightpearl account details and user credentials, attempts authentication of the user and returns an auth
token if the request was successful.
|
String |
BrightpearlApiClient.fetchStaffToken(PublicAppIdentity appIdentity,
Account account,
UserCredentials userCredentials)
Using private app details and user credentials, attempts authentication of the user and returns their staff token
if they are authorised to use the app.
|
void |
BrightpearlLegacyApiSessionFactory.setAccount(Account account)
Set the target Brightpearl customer account for sessions created by this factory.
|
BrightpearlLegacyApiSessionFactory |
BrightpearlLegacyApiSessionFactory.withAccount(Account account)
Set the target Brightpearl customer account for sessions created by this factory.
|
| Modifier and Type | Method and Description |
|---|---|
Account |
PublicAppAuthorisation.getAccount() |
Account |
PrivateAppIdentity.getAccount() |
Account |
PrivateAppAuthorisation.getAccount() |
Account |
LegacyAuthorisation.getAccount() |
Account |
AppAuthorisation.getAccount()
Returns the Brightpearl customer's account.
|
| Modifier and Type | Method and Description |
|---|---|
static PrivateAppIdentity |
PrivateAppIdentity.create(Account account,
String appReference)
Create a private app identity.
|
static LegacyAuthorisation |
LegacyAuthorisation.staff(Account account,
String authToken)
Create legacy authentication details using an account and staff token.
|
static PublicAppAuthorisation |
PublicAppAuthorisation.staff(PublicAppIdentity appIdentity,
Account account,
String staffToken)
Create account authorisation details for a staff authorised API call.
|
static PublicAppAuthorisation |
PublicAppAuthorisation.system(PublicAppIdentity appIdentity,
Account account,
String accountToken)
Create account authorisation details for a system-to-system call using an account token.
|
| Modifier and Type | Method and Description |
|---|---|
Client |
ClientFactory.getClient(Account account)
Get a client to be used for a given
Account. |
| Modifier and Type | Method and Description |
|---|---|
Client |
HttpClient4ClientFactory.getClient(Account account)
Returns the same instance of
HttpClient4Client, backed by a DefaultHttpClient instance using a
thread-safe pooled connection manager, in response to every request. |
| Modifier and Type | Method and Description |
|---|---|
void |
RateLimiter.rateLimit(Account account)
Called immediately before a request is made to the Brightpearl API for the given account.
|
void |
NoOpRateLimiter.rateLimit(Account account)
This implementation does nothing.
|
void |
ConstantWaitRateLimiter.rateLimit(Account account)
Called before a request is made, this sleeps for the minimum amount of time that must be left to ensure no more
than the maximum number of requests are made in the configured period.
|
void |
RateLimiter.requestCapExceeded(Account account)
Called when a request to an account has been rejected due to request throttling.
|
void |
NoOpRateLimiter.requestCapExceeded(Account account)
This implementation does nothing.
|
void |
ConstantWaitRateLimiter.requestCapExceeded(Account account)
This implementation does nothing.
|
void |
RateLimiter.requestCompleted(Account account,
int requestsRemaining,
long nextThrottlePeriod)
Called after every request is made to the Brightpearl API, with values from the brightpearl-requests-remaining
and brightpearl-next-throttle-period headers.
|
void |
NoOpRateLimiter.requestCompleted(Account account,
int requestsRemaining,
long nextThrottlePeriod)
This implementation does nothing.
|
void |
ConstantWaitRateLimiter.requestCompleted(Account account,
int requestsRemaining,
long nextThrottlePeriod)
This implementation does nothing.
|
Copyright © 2014. All Rights Reserved.