Class: NinjaVan::Config
- Inherits:
-
Object
- Object
- NinjaVan::Config
- Defined in:
- lib/ninja_van/config.rb
Instance Attribute Summary collapse
-
#cancel_endpoint ⇒ Object
Returns the value of attribute cancel_endpoint.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
-
#create_endpoint ⇒ Object
Returns the value of attribute create_endpoint.
-
#create_order_required_params ⇒ Object
Returns the value of attribute create_order_required_params.
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#get_access_token_endpoint ⇒ Object
Returns the value of attribute get_access_token_endpoint.
-
#get_detail_endpoint ⇒ Object
Returns the value of attribute get_detail_endpoint.
-
#get_status_endpoint ⇒ Object
Returns the value of attribute get_status_endpoint.
-
#get_token_from_cache_klass ⇒ Object
Returns the value of attribute get_token_from_cache_klass.
-
#grant_type ⇒ Object
Returns the value of attribute grant_type.
Instance Method Summary collapse
Instance Attribute Details
#cancel_endpoint ⇒ Object
Returns the value of attribute cancel_endpoint.
15 16 17 |
# File 'lib/ninja_van/config.rb', line 15 def cancel_endpoint @cancel_endpoint end |
#client_id ⇒ Object
Returns the value of attribute client_id.
5 6 7 |
# File 'lib/ninja_van/config.rb', line 5 def client_id @client_id end |
#client_secret ⇒ Object
Returns the value of attribute client_secret.
6 7 8 |
# File 'lib/ninja_van/config.rb', line 6 def client_secret @client_secret end |
#create_endpoint ⇒ Object
Returns the value of attribute create_endpoint.
12 13 14 |
# File 'lib/ninja_van/config.rb', line 12 def create_endpoint @create_endpoint end |
#create_order_required_params ⇒ Object
Returns the value of attribute create_order_required_params.
17 18 19 |
# File 'lib/ninja_van/config.rb', line 17 def create_order_required_params @create_order_required_params end |
#domain ⇒ Object
Returns the value of attribute domain.
4 5 6 |
# File 'lib/ninja_van/config.rb', line 4 def domain @domain end |
#get_access_token_endpoint ⇒ Object
Returns the value of attribute get_access_token_endpoint.
11 12 13 |
# File 'lib/ninja_van/config.rb', line 11 def get_access_token_endpoint @get_access_token_endpoint end |
#get_detail_endpoint ⇒ Object
Returns the value of attribute get_detail_endpoint.
13 14 15 |
# File 'lib/ninja_van/config.rb', line 13 def get_detail_endpoint @get_detail_endpoint end |
#get_status_endpoint ⇒ Object
Returns the value of attribute get_status_endpoint.
14 15 16 |
# File 'lib/ninja_van/config.rb', line 14 def get_status_endpoint @get_status_endpoint end |
#get_token_from_cache_klass ⇒ Object
Returns the value of attribute get_token_from_cache_klass.
9 10 11 |
# File 'lib/ninja_van/config.rb', line 9 def get_token_from_cache_klass @get_token_from_cache_klass end |
#grant_type ⇒ Object
Returns the value of attribute grant_type.
7 8 9 |
# File 'lib/ninja_van/config.rb', line 7 def grant_type @grant_type end |
Instance Method Details
#get_token_from_cache ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/ninja_van/config.rb', line 19 def get_token_from_cache if self.get_token_from_cache_klass.is_a?(Class) self.get_token_from_cache_klass.new.call else raise NinjaVan::ConfigError.new("get_token_from_cache_klass is not class!") end end |
#require!(key) ⇒ Object
27 28 29 30 31 |
# File 'lib/ninja_van/config.rb', line 27 def require!(key) setup_value = self.send(key) raise NinjaVan::ConfigError.new("#{key} is nil!") if setup_value.nil? return setup_value end |