OAuth token data returned by QuickBooks.
Summary
Functions
Returns true when the access token has expired at or before the given time.
Builds a token struct from the QuickBooks OAuth response body.
Returns true when the refresh token has expired at or before the given time.
Types
@type t() :: %ExQuickBooks.Token{ access_token: String.t(), access_token_expires_at: DateTime.t(), expires_in: pos_integer(), realm_id: String.t() | nil, refresh_token: String.t(), refresh_token_expires_at: DateTime.t(), refresh_token_expires_in: pos_integer(), token_type: String.t() }
Functions
@spec access_token_expired?(t(), DateTime.t()) :: boolean()
Returns true when the access token has expired at or before the given time.
@spec from_oauth_response( map(), keyword() ) :: {:ok, t()} | {:error, ExQuickBooks.Error.t()}
Builds a token struct from the QuickBooks OAuth response body.
@spec refresh_token_expired?(t(), DateTime.t()) :: boolean()
Returns true when the refresh token has expired at or before the given time.