Class: AppManager::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/app_manager/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/app_manager/config.rb', line 19

def initialize
  @refresh_by_request_params = true
  @expires_in = 1.day
  @enable_caching = true
  @app_url = nil
  @shopify_api_key = nil
  @shopify_api_version = nil
  @shopify_table_name = 'shops'
  @shopify_domain_field = 'shopify_domain'
  @plan_id_or_name_field = nil
  @shopify_app_slug = nil
  @plan_page_route = nil
  @field_names = {
    'name' => 'shopify_domain', # sample example: demo-chirag-parmar.myshopify.com
    'shopify_email' => 'email', # [email protected]
    'shopify_token' => 'shopify_token',
    'shopify_plan' => 'plan_name', # partner_test
    'plan_id' => 'plan_id', # 1
    'created_at' => 'created_at', # 2022-04-15 10:43:05
    'trial_activated_at' => 'trial_activated_at',
    'email' => 'email'
}
  @fs = AppManager::FailSafe.new
  # AppManager.clear_cache
end

Instance Attribute Details

#app_urlObject

Returns the value of attribute app_url.



8
9
10
# File 'lib/app_manager/config.rb', line 8

def app_url
  @app_url
end

#cache_by_headersObject

Returns the value of attribute cache_by_headers.



4
5
6
# File 'lib/app_manager/config.rb', line 4

def cache_by_headers
  @cache_by_headers
end

#enable_cachingObject

Returns the value of attribute enable_caching.



6
7
8
# File 'lib/app_manager/config.rb', line 6

def enable_caching
  @enable_caching
end

#expires_inObject

Returns the value of attribute expires_in.



5
6
7
# File 'lib/app_manager/config.rb', line 5

def expires_in
  @expires_in
end

#field_namesObject

Returns the value of attribute field_names.



14
15
16
# File 'lib/app_manager/config.rb', line 14

def field_names
  @field_names
end

#plan_featuresObject

Returns the value of attribute plan_features.



7
8
9
# File 'lib/app_manager/config.rb', line 7

def plan_features
  @plan_features
end

#plan_id_or_name_fieldObject

Returns the value of attribute plan_id_or_name_field.



13
14
15
# File 'lib/app_manager/config.rb', line 13

def plan_id_or_name_field
  @plan_id_or_name_field
end

#plan_page_routeObject

Returns the value of attribute plan_page_route.



17
18
19
# File 'lib/app_manager/config.rb', line 17

def plan_page_route
  @plan_page_route
end

#refresh_by_request_paramsObject

Returns the value of attribute refresh_by_request_params.



15
16
17
# File 'lib/app_manager/config.rb', line 15

def refresh_by_request_params
  @refresh_by_request_params
end

#shopify_api_keyObject

Returns the value of attribute shopify_api_key.



9
10
11
# File 'lib/app_manager/config.rb', line 9

def shopify_api_key
  @shopify_api_key
end

#shopify_api_versionObject

Returns the value of attribute shopify_api_version.



10
11
12
# File 'lib/app_manager/config.rb', line 10

def shopify_api_version
  @shopify_api_version
end

#shopify_app_slugObject

Returns the value of attribute shopify_app_slug.



16
17
18
# File 'lib/app_manager/config.rb', line 16

def shopify_app_slug
  @shopify_app_slug
end

#shopify_domain_fieldObject

Returns the value of attribute shopify_domain_field.



12
13
14
# File 'lib/app_manager/config.rb', line 12

def shopify_domain_field
  @shopify_domain_field
end

#shopify_table_nameObject

Returns the value of attribute shopify_table_name.



11
12
13
# File 'lib/app_manager/config.rb', line 11

def shopify_table_name
  @shopify_table_name
end

Instance Method Details

#refresh_by_request_params?Boolean

Returns:

  • (Boolean)


85
86
87
# File 'lib/app_manager/config.rb', line 85

def refresh_by_request_params?
  @refresh_by_request_params
end