Class: NewStoreApi::ConfigurationRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::ConfigurationRequest
- Defined in:
- lib/new_store_api/models/configuration_request.rb
Overview
Configurations request for updating BYO CRM settings and customer feature toggles.
Instance Attribute Summary collapse
-
#byo_crm ⇒ ByoCrmConfigRequest
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 = SKIP, first_and_last_name_enabled = SKIP, nom_consumer_profiles_merge = SKIP) ⇒ ConfigurationRequest
constructor
A new instance of ConfigurationRequest.
-
#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 = SKIP, first_and_last_name_enabled = SKIP, nom_consumer_profiles_merge = SKIP) ⇒ ConfigurationRequest
Returns a new instance of ConfigurationRequest.
48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/new_store_api/models/configuration_request.rb', line 48 def initialize(byo_crm = SKIP, first_and_last_name_enabled = SKIP, nom_consumer_profiles_merge = SKIP) @byo_crm = byo_crm unless byo_crm == SKIP unless first_and_last_name_enabled == SKIP @first_and_last_name_enabled = first_and_last_name_enabled end unless nom_consumer_profiles_merge == SKIP @nom_consumer_profiles_merge = nom_consumer_profiles_merge end end |
Instance Attribute Details
#byo_crm ⇒ ByoCrmConfigRequest
BYO CRM configuration settings
15 16 17 |
# File 'lib/new_store_api/models/configuration_request.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_request.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_request.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.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/new_store_api/models/configuration_request.rb', line 62 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. byo_crm = ByoCrmConfigRequest.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'] : SKIP nom_consumer_profiles_merge = hash.key?('nom_consumer_profiles_merge') ? hash['nom_consumer_profiles_merge'] : SKIP # Create object from extracted values. ConfigurationRequest.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_request.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
44 45 46 |
# File 'lib/new_store_api/models/configuration_request.rb', line 44 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 38 39 40 41 |
# File 'lib/new_store_api/models/configuration_request.rb', line 35 def self.optionals %w[ byo_crm first_and_last_name_enabled nom_consumer_profiles_merge ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
87 88 89 90 91 92 |
# File 'lib/new_store_api/models/configuration_request.rb', line 87 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.
79 80 81 82 83 84 |
# File 'lib/new_store_api/models/configuration_request.rb', line 79 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 |