Class: Schematic::CheckFlagResponse
- Inherits:
-
Object
- Object
- Schematic::CheckFlagResponse
- Defined in:
- lib/schematic/schematic_client.rb
Instance Attribute Summary collapse
-
#company_id ⇒ Object
readonly
Returns the value of attribute company_id.
-
#entitlement ⇒ Object
readonly
Returns the value of attribute entitlement.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#feature_allocation ⇒ Object
readonly
Returns the value of attribute feature_allocation.
-
#feature_usage ⇒ Object
readonly
Returns the value of attribute feature_usage.
-
#feature_usage_event ⇒ Object
readonly
Returns the value of attribute feature_usage_event.
-
#feature_usage_period ⇒ Object
readonly
Returns the value of attribute feature_usage_period.
-
#feature_usage_reset_at ⇒ Object
readonly
Returns the value of attribute feature_usage_reset_at.
-
#flag_id ⇒ Object
readonly
Returns the value of attribute flag_id.
-
#flag_key ⇒ Object
readonly
Returns the value of attribute flag_key.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#rule_id ⇒ Object
readonly
Returns the value of attribute rule_id.
-
#rule_type ⇒ Object
readonly
Returns the value of attribute rule_type.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ CheckFlagResponse
constructor
A new instance of CheckFlagResponse.
- #to_h ⇒ Object
Constructor Details
#initialize(attrs = {}) ⇒ CheckFlagResponse
Returns a new instance of CheckFlagResponse.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/schematic/schematic_client.rb', line 12 def initialize(attrs = {}) @value = attrs[:value] || false @flag_key = attrs[:flag_key] || attrs[:flag] @flag_id = attrs[:flag_id] @reason = attrs[:reason] || "" @rule_id = attrs[:rule_id] @rule_type = attrs[:rule_type] @company_id = attrs[:company_id] @user_id = attrs[:user_id] @entitlement = attrs[:entitlement] @error = attrs[:error] || attrs[:err] @feature_allocation = attrs[:feature_allocation] @feature_usage = attrs[:feature_usage] @feature_usage_event = attrs[:feature_usage_event] @feature_usage_period = attrs[:feature_usage_period] @feature_usage_reset_at = attrs[:feature_usage_reset_at] end |
Instance Attribute Details
#company_id ⇒ Object (readonly)
Returns the value of attribute company_id.
7 8 9 |
# File 'lib/schematic/schematic_client.rb', line 7 def company_id @company_id end |
#entitlement ⇒ Object (readonly)
Returns the value of attribute entitlement.
7 8 9 |
# File 'lib/schematic/schematic_client.rb', line 7 def entitlement @entitlement end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
7 8 9 |
# File 'lib/schematic/schematic_client.rb', line 7 def error @error end |
#feature_allocation ⇒ Object (readonly)
Returns the value of attribute feature_allocation.
7 8 9 |
# File 'lib/schematic/schematic_client.rb', line 7 def feature_allocation @feature_allocation end |
#feature_usage ⇒ Object (readonly)
Returns the value of attribute feature_usage.
7 8 9 |
# File 'lib/schematic/schematic_client.rb', line 7 def feature_usage @feature_usage end |
#feature_usage_event ⇒ Object (readonly)
Returns the value of attribute feature_usage_event.
7 8 9 |
# File 'lib/schematic/schematic_client.rb', line 7 def feature_usage_event @feature_usage_event end |
#feature_usage_period ⇒ Object (readonly)
Returns the value of attribute feature_usage_period.
7 8 9 |
# File 'lib/schematic/schematic_client.rb', line 7 def feature_usage_period @feature_usage_period end |
#feature_usage_reset_at ⇒ Object (readonly)
Returns the value of attribute feature_usage_reset_at.
7 8 9 |
# File 'lib/schematic/schematic_client.rb', line 7 def feature_usage_reset_at @feature_usage_reset_at end |
#flag_id ⇒ Object (readonly)
Returns the value of attribute flag_id.
7 8 9 |
# File 'lib/schematic/schematic_client.rb', line 7 def flag_id @flag_id end |
#flag_key ⇒ Object (readonly)
Returns the value of attribute flag_key.
7 8 9 |
# File 'lib/schematic/schematic_client.rb', line 7 def flag_key @flag_key end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
7 8 9 |
# File 'lib/schematic/schematic_client.rb', line 7 def reason @reason end |
#rule_id ⇒ Object (readonly)
Returns the value of attribute rule_id.
7 8 9 |
# File 'lib/schematic/schematic_client.rb', line 7 def rule_id @rule_id end |
#rule_type ⇒ Object (readonly)
Returns the value of attribute rule_type.
7 8 9 |
# File 'lib/schematic/schematic_client.rb', line 7 def rule_type @rule_type end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
7 8 9 |
# File 'lib/schematic/schematic_client.rb', line 7 def user_id @user_id end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
7 8 9 |
# File 'lib/schematic/schematic_client.rb', line 7 def value @value end |
Instance Method Details
#to_h ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/schematic/schematic_client.rb', line 30 def to_h { value: @value, flag_key: @flag_key, flag_id: @flag_id, reason: @reason, rule_id: @rule_id, rule_type: @rule_type, company_id: @company_id, user_id: @user_id, entitlement: @entitlement, error: @error, feature_allocation: @feature_allocation, feature_usage: @feature_usage, feature_usage_event: @feature_usage_event, feature_usage_period: @feature_usage_period, feature_usage_reset_at: @feature_usage_reset_at }.compact end |