NAME

Net::MyCommerce::API::Token

VERSION

version 1.0.1

METHODS

new ( access => $access, vendor => $vendor, credentials => { id => $id, secret => $secret } );

  access: 'vendor' or 'affiliate'
  vendor: vendor id (only needed for access=affiliate)
  id:     MyCommerce vendor or affiliate ID
  secret: API secret appropriate to type of resource object requested

lookup ()

Use cached token if not yet expired; otherwise request new token from token service

reset ()

clear cached token; necessary if resource API returns an 'invalid_token' error