Class: ShopifyApp::SessionRepository
- Inherits:
-
Object
- Object
- ShopifyApp::SessionRepository
show all
- Defined in:
- lib/ruby_shopify_app/session/session_repository.rb
Defined Under Namespace
Classes: ConfigurationError
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.shop_storage ⇒ Object
35
36
37
|
# File 'lib/ruby_shopify_app/session/session_repository.rb', line 35
def shop_storage
load_shop_storage || raise(ConfigurationError, "ShopifySessionRepository.shop_storage is not configured!")
end
|
.user_storage ⇒ Object
39
40
41
|
# File 'lib/ruby_shopify_app/session/session_repository.rb', line 39
def user_storage
load_user_storage
end
|
Class Method Details
.retrieve_shop_session(id) ⇒ Object
11
12
13
|
# File 'lib/ruby_shopify_app/session/session_repository.rb', line 11
def retrieve_shop_session(id)
shop_storage.retrieve(id)
end
|
.retrieve_shop_session_by_shopify_domain(shopify_domain) ⇒ Object
19
20
21
|
# File 'lib/ruby_shopify_app/session/session_repository.rb', line 19
def retrieve_shop_session_by_shopify_domain(shopify_domain)
shop_storage.retrieve_by_shopify_domain(shopify_domain)
end
|
.retrieve_user_session(id) ⇒ Object
15
16
17
|
# File 'lib/ruby_shopify_app/session/session_repository.rb', line 15
def retrieve_user_session(id)
user_storage.retrieve(id)
end
|
.retrieve_user_session_by_shopify_user_id(user_id) ⇒ Object
23
24
25
|
# File 'lib/ruby_shopify_app/session/session_repository.rb', line 23
def retrieve_user_session_by_shopify_user_id(user_id)
user_storage.retrieve_by_shopify_user_id(user_id)
end
|
.store_shop_session(session) ⇒ Object
27
28
29
|
# File 'lib/ruby_shopify_app/session/session_repository.rb', line 27
def store_shop_session(session)
shop_storage.store(session)
end
|
.store_user_session(session, user) ⇒ Object
31
32
33
|
# File 'lib/ruby_shopify_app/session/session_repository.rb', line 31
def store_user_session(session, user)
user_storage.store(session, user)
end
|