token

package
v0.0.0-...-94a151a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthTokenResponse

type AuthTokenResponse struct {
	Token           string `json:"token"`
	LifetimeSeconds int64  `json:"lifetimeInSeconds"`
}

AuthTokenResponse is the response from a generate auth token request

type CheckoutTokenResponse

type CheckoutTokenResponse struct {
	Token       string `json:"token"`
	Description string `json:"description"`
}

CheckoutTokenResponse is the response from a create checkout token request

type Service

type Service struct {
	Username string
	APIKey   string
	Env      string
}

Service is a service

func NewService

func NewService(username, apiKey, env string) Service

func (Service) CreateCheckoutToken

func (s Service) CreateCheckoutToken(phoneNumber string) (*CheckoutTokenResponse, error)

func (Service) GenerateAuthToken

func (s Service) GenerateAuthToken() (*AuthTokenResponse, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL