QuickbooksOauth2Service constructor
QuickbooksOauth2Service({})
Quickbooks Oauth2 connection service constructor
Takes the environment variables as needed values by default.
Parameters
clientId ClientId of your Quickbooks app.
clientSecret ClientSecret of your Quickbooks app.
redirectUrl Url where you want the Oauth2 connection to redirect.
(Must be a valid url, local addresss doesn't work)(Must be registered
on Quickbooks website for you app).
isProduction Defines if you use the sandbox endpoints or the production
endpoints.
state Verification String for quickbooks to verify if the connection has
been successfull. Can be anything.
Implementation
QuickbooksOauth2Service({
String? clientId,
String? clientSecret,
String? redirectUrl,
bool? isProduction,
String? state,
}) {
_clientId = clientId ?? QuickbooksEnvironment.clientId;
_clientSecret = clientSecret ?? QuickbooksEnvironment.clientSecret;
_redirectUrl = redirectUrl ?? QuickbooksEnvironment.redirectUri;
_isProduction = isProduction ?? QuickbooksEnvironment.isProduction;
_state = state ?? QuickbooksEnvironment.state;
}