Class: Verizon::M5gBiactivateRequest
- Defined in:
- lib/verizon/models/m_5g_biactivate_request.rb
Overview
M5gBiactivateRequest Model.
Instance Attribute Summary collapse
-
#account_name ⇒ String
TODO: Write general description for this method.
-
#carrier_name ⇒ String
TODO: Write general description for this method.
-
#device_list_with_service_address ⇒ Array[DeviceListWithServiceAddress1]
TODO: Write general description for this method.
-
#mdn_zip_code ⇒ String
TODO: Write general description for this method.
-
#public_ip_restriction ⇒ String
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.
Instance Method Summary collapse
-
#initialize(account_name = SKIP, service_plan = SKIP, device_list_with_service_address = SKIP, public_ip_restriction = SKIP, carrier_name = SKIP, mdn_zip_code = SKIP) ⇒ M5gBiactivateRequest
constructor
A new instance of M5gBiactivateRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(account_name = SKIP, service_plan = SKIP, device_list_with_service_address = SKIP, public_ip_restriction = SKIP, carrier_name = SKIP, mdn_zip_code = SKIP) ⇒ M5gBiactivateRequest
Returns a new instance of M5gBiactivateRequest.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/verizon/models/m_5g_biactivate_request.rb', line 66 def initialize(account_name = SKIP, service_plan = SKIP, device_list_with_service_address = SKIP, public_ip_restriction = SKIP, carrier_name = SKIP, mdn_zip_code = SKIP) @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 @public_ip_restriction = public_ip_restriction unless public_ip_restriction == SKIP @carrier_name = carrier_name unless carrier_name == SKIP @mdn_zip_code = mdn_zip_code unless mdn_zip_code == SKIP end |
Instance Attribute Details
#account_name ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/verizon/models/m_5g_biactivate_request.rb', line 14 def account_name @account_name end |
#carrier_name ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/verizon/models/m_5g_biactivate_request.rb', line 30 def carrier_name @carrier_name end |
#device_list_with_service_address ⇒ Array[DeviceListWithServiceAddress1]
TODO: Write general description for this method
22 23 24 |
# File 'lib/verizon/models/m_5g_biactivate_request.rb', line 22 def device_list_with_service_address @device_list_with_service_address end |
#mdn_zip_code ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/verizon/models/m_5g_biactivate_request.rb', line 34 def mdn_zip_code @mdn_zip_code end |
#public_ip_restriction ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/verizon/models/m_5g_biactivate_request.rb', line 26 def public_ip_restriction @public_ip_restriction end |
#service_plan ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/verizon/models/m_5g_biactivate_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.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/verizon/models/m_5g_biactivate_request.rb', line 82 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 # Parameter is an array, so we need to iterate through it device_list_with_service_address = nil unless hash['deviceListWithServiceAddress'].nil? device_list_with_service_address = [] hash['deviceListWithServiceAddress'].each do |structure| device_list_with_service_address << (DeviceListWithServiceAddress1.from_hash(structure) if structure) end end device_list_with_service_address = SKIP unless hash.key?('deviceListWithServiceAddress') public_ip_restriction = hash.key?('publicIpRestriction') ? hash['publicIpRestriction'] : SKIP carrier_name = hash.key?('carrierName') ? hash['carrierName'] : SKIP mdn_zip_code = hash.key?('mdnZipCode') ? hash['mdnZipCode'] : SKIP # Create object from extracted values. M5gBiactivateRequest.new(account_name, service_plan, device_list_with_service_address, public_ip_restriction, carrier_name, mdn_zip_code) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/verizon/models/m_5g_biactivate_request.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['account_name'] = 'accountName' @_hash['service_plan'] = 'servicePlan' @_hash['device_list_with_service_address'] = 'deviceListWithServiceAddress' @_hash['public_ip_restriction'] = 'publicIpRestriction' @_hash['carrier_name'] = 'carrierName' @_hash['mdn_zip_code'] = 'mdnZipCode' @_hash end |
.nullables ⇒ Object
An array for nullable fields
62 63 64 |
# File 'lib/verizon/models/m_5g_biactivate_request.rb', line 62 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/verizon/models/m_5g_biactivate_request.rb', line 50 def self.optionals %w[ account_name service_plan device_list_with_service_address public_ip_restriction carrier_name mdn_zip_code ] end |