Paypal.Auth.Worker (Paypal v0.1.1)

View Source

The worker is performing the refresh of the token.

Summary

Types

t()

The internal structure for the auth of Paypal is composed of a access entry (see Paypal.Auth.Access.t() for further information), and timer_ref, a reference for the current and active timer.

Functions

Returns a specification to start this module under a supervisor.

Get the access token stored in the worker.

Performs a manual refresh for the access token.

Types

t()

@type t() :: %Paypal.Auth.Worker{
  access: nil | Paypal.Auth.Access.t(),
  timer_ref: nil | reference()
}

The internal structure for the auth of Paypal is composed of a access entry (see Paypal.Auth.Access.t() for further information), and timer_ref, a reference for the current and active timer.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_token()

@spec get_token() :: {:ok, String.t()} | {:error, any()}

Get the access token stored in the worker.

refresh()

Performs a manual refresh for the access token.