Class: NewStoreApi::ConfigurationResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::ConfigurationResponse
- Defined in:
- lib/new_store_api/models/configuration_response.rb
Overview
Configurations response containing BYO CRM settings and customer feature toggles.
Instance Attribute Summary collapse
-
#byo_crm ⇒ ByoCrmConfigResponse
BYO CRM configuration settings.
-
#first_and_last_name_enabled ⇒ TrueClass | FalseClass
Whether first and last name fields are enabled for the tenant.
-
#nom_consumer_profiles_merge ⇒ TrueClass | FalseClass
Whether consumer profile merge is enabled for the tenant.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(byo_crm = nil, first_and_last_name_enabled = nil, nom_consumer_profiles_merge = nil) ⇒ ConfigurationResponse
constructor
A new instance of ConfigurationResponse.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(byo_crm = nil, first_and_last_name_enabled = nil, nom_consumer_profiles_merge = nil) ⇒ ConfigurationResponse
Returns a new instance of ConfigurationResponse.
44 45 46 47 48 49 |
# File 'lib/new_store_api/models/configuration_response.rb', line 44 def initialize(byo_crm = nil, first_and_last_name_enabled = nil, nom_consumer_profiles_merge = nil) @byo_crm = byo_crm @first_and_last_name_enabled = first_and_last_name_enabled @nom_consumer_profiles_merge = nom_consumer_profiles_merge end |
Instance Attribute Details
#byo_crm ⇒ ByoCrmConfigResponse
BYO CRM configuration settings
15 16 17 |
# File 'lib/new_store_api/models/configuration_response.rb', line 15 def byo_crm @byo_crm end |
#first_and_last_name_enabled ⇒ TrueClass | FalseClass
Whether first and last name fields are enabled for the tenant.
19 20 21 |
# File 'lib/new_store_api/models/configuration_response.rb', line 19 def first_and_last_name_enabled @first_and_last_name_enabled end |
#nom_consumer_profiles_merge ⇒ TrueClass | FalseClass
Whether consumer profile merge is enabled for the tenant.
23 24 25 |
# File 'lib/new_store_api/models/configuration_response.rb', line 23 def nom_consumer_profiles_merge @nom_consumer_profiles_merge end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/new_store_api/models/configuration_response.rb', line 52 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. byo_crm = ByoCrmConfigResponse.from_hash(hash['byo_crm']) if hash['byo_crm'] first_and_last_name_enabled = hash.key?('first_and_last_name_enabled') ? hash['first_and_last_name_enabled'] : nil nom_consumer_profiles_merge = hash.key?('nom_consumer_profiles_merge') ? hash['nom_consumer_profiles_merge'] : nil # Create object from extracted values. ConfigurationResponse.new(byo_crm, first_and_last_name_enabled, nom_consumer_profiles_merge) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 32 |
# File 'lib/new_store_api/models/configuration_response.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['byo_crm'] = 'byo_crm' @_hash['first_and_last_name_enabled'] = 'first_and_last_name_enabled' @_hash['nom_consumer_profiles_merge'] = 'nom_consumer_profiles_merge' @_hash end |
.nullables ⇒ Object
An array for nullable fields
40 41 42 |
# File 'lib/new_store_api/models/configuration_response.rb', line 40 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 |
# File 'lib/new_store_api/models/configuration_response.rb', line 35 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
77 78 79 80 81 82 |
# File 'lib/new_store_api/models/configuration_response.rb', line 77 def inspect class_name = self.class.name.split('::').last "<#{class_name} byo_crm: #{@byo_crm.inspect}, first_and_last_name_enabled:"\ " #{@first_and_last_name_enabled.inspect}, nom_consumer_profiles_merge:"\ " #{@nom_consumer_profiles_merge.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
69 70 71 72 73 74 |
# File 'lib/new_store_api/models/configuration_response.rb', line 69 def to_s class_name = self.class.name.split('::').last "<#{class_name} byo_crm: #{@byo_crm}, first_and_last_name_enabled:"\ " #{@first_and_last_name_enabled}, nom_consumer_profiles_merge:"\ " #{@nom_consumer_profiles_merge}>" end |