Class: Spree::Api::V2::Storefront::CrossAppHandoffTokensController::Resource

Inherits:
Struct
  • Object
show all
Defined in:
app/controllers/spree/api/v2/storefront/cross_app_handoff_tokens_controller.rb

Overview

No AR model backs a handoff token (see CrossAppHandoffTokens::Encode) — this just gives the generated expires_at: pair an #id so it can go through the same serializer/JSON:API pipeline as every other storefront resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#expires_at ⇒ Object

Returns the value of attribute expires_at

Returns:

  • (Object) —

    the current value of expires_at



9
10
11
# File 'app/controllers/spree/api/v2/storefront/cross_app_handoff_tokens_controller.rb', line 9

def expires_at
  @expires_at
end

#token ⇒ Object

Returns the value of attribute token

Returns:

  • (Object) —

    the current value of token



9
10
11
# File 'app/controllers/spree/api/v2/storefront/cross_app_handoff_tokens_controller.rb', line 9

def token
  @token
end

Instance Method Details

#id ⇒ Object



10
11
12
# File 'app/controllers/spree/api/v2/storefront/cross_app_handoff_tokens_controller.rb', line 10

def id
  token
end