Class: Verizon::M5GBichangeRequest
- Defined in:
- lib/verizon/models/m_5g_bichange_request.rb
Overview
M5GBichangeRequest Model.
Instance Attribute Summary collapse
-
#account_name ⇒ String
TODO: Write general description for this method.
-
#current_service_plan ⇒ String
TODO: Write general description for this method.
-
#device_list_with_service_address ⇒ Array[Object]
TODO: Write general description for this method.
-
#service_plan ⇒ String
TODO: Write general description for this method.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(account_name: SKIP, service_plan: SKIP, device_list_with_service_address: SKIP, current_service_plan: SKIP, additional_properties: nil) ⇒ M5GBichangeRequest
constructor
A new instance of M5GBichangeRequest.
-
#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(account_name: SKIP, service_plan: SKIP, device_list_with_service_address: SKIP, current_service_plan: SKIP, additional_properties: nil) ⇒ M5GBichangeRequest
Returns a new instance of M5GBichangeRequest.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/verizon/models/m_5g_bichange_request.rb', line 54 def initialize(account_name: SKIP, service_plan: SKIP, device_list_with_service_address: SKIP, current_service_plan: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_name = account_name unless account_name == SKIP @service_plan = service_plan unless service_plan == SKIP unless device_list_with_service_address == SKIP @device_list_with_service_address = device_list_with_service_address end @current_service_plan = current_service_plan unless current_service_plan == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_name ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/verizon/models/m_5g_bichange_request.rb', line 14 def account_name @account_name end |
#current_service_plan ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/verizon/models/m_5g_bichange_request.rb', line 26 def current_service_plan @current_service_plan end |
#device_list_with_service_address ⇒ Array[Object]
TODO: Write general description for this method
22 23 24 |
# File 'lib/verizon/models/m_5g_bichange_request.rb', line 22 def device_list_with_service_address @device_list_with_service_address end |
#service_plan ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/verizon/models/m_5g_bichange_request.rb', line 18 def service_plan @service_plan end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/verizon/models/m_5g_bichange_request.rb', line 71 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_name = hash.key?('accountName') ? hash['accountName'] : SKIP service_plan = hash.key?('servicePlan') ? hash['servicePlan'] : SKIP device_list_with_service_address = hash.key?('deviceListWithServiceAddress') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:M5GBichangeRequestDeviceListWithServiceAddress), hash['deviceListWithServiceAddress'] ) : SKIP current_service_plan = hash.key?('currentServicePlan') ? hash['currentServicePlan'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. M5GBichangeRequest.new(account_name: account_name, service_plan: service_plan, device_list_with_service_address: device_list_with_service_address, current_service_plan: current_service_plan, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 37 |
# File 'lib/verizon/models/m_5g_bichange_request.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['account_name'] = 'accountName' @_hash['service_plan'] = 'servicePlan' @_hash['device_list_with_service_address'] = 'deviceListWithServiceAddress' @_hash['current_service_plan'] = 'currentServicePlan' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/verizon/models/m_5g_bichange_request.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 43 44 45 46 47 |
# File 'lib/verizon/models/m_5g_bichange_request.rb', line 40 def self.optionals %w[ account_name service_plan device_list_with_service_address current_service_plan ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
100 101 102 103 104 105 106 |
# File 'lib/verizon/models/m_5g_bichange_request.rb', line 100 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
118 119 120 121 122 123 124 |
# File 'lib/verizon/models/m_5g_bichange_request.rb', line 118 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name.inspect}, service_plan:"\ " #{@service_plan.inspect}, device_list_with_service_address:"\ " #{@device_list_with_service_address.inspect}, current_service_plan:"\ " #{@current_service_plan.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
109 110 111 112 113 114 115 |
# File 'lib/verizon/models/m_5g_bichange_request.rb', line 109 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name}, service_plan: #{@service_plan},"\ " device_list_with_service_address: #{@device_list_with_service_address},"\ " current_service_plan: #{@current_service_plan}, additional_properties:"\ " #{@additional_properties}>" end |