Class: ShopifyAPI::AccessToken

Inherits:
Base show all
Defined in:
lib/shopify_api/resources/access_token.rb

Class Method Summary collapse

Methods inherited from Base

activate_session, #as_json, clear_session, #encode, #headers, init_prefix, init_prefix_explicit, #persisted?

Methods included from Countable

#count

Methods inherited from ActiveResource::Base

delete, headers

Class Method Details

.delegate(access_scope, expires_in = nil) ⇒ Object


3
4
5
6
# File 'lib/shopify_api/resources/access_token.rb', line 3

def self.delegate(access_scope, expires_in = nil)
  resource = post(:delegate, delegate_access_scope: access_scope, expires_in: expires_in)
  instantiate_record(format.decode(resource.body), {})
end