Class: Verizon::GetDeviceStatusesResponseforplanner
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::GetDeviceStatusesResponseforplanner
- Defined in:
- lib/verizon/models/get_device_statuses_responseforplanner.rb
Overview
GetDeviceStatusesResponseforplanner Model.
Instance Attribute Summary collapse
-
#account_number ⇒ String
The numeric name of the account, including leading zeros.
-
#device_status_list ⇒ Array[DeviceStatusItemforplanner]
The numeric name of the account, including leading zeros.
-
#request_id ⇒ String
The numeric name of the account, including leading zeros.
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_number = SKIP, request_id = SKIP, device_status_list = SKIP) ⇒ GetDeviceStatusesResponseforplanner
constructor
A new instance of GetDeviceStatusesResponseforplanner.
-
#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_number = SKIP, request_id = SKIP, device_status_list = SKIP) ⇒ GetDeviceStatusesResponseforplanner
Returns a new instance of GetDeviceStatusesResponseforplanner.
51 52 53 54 55 56 |
# File 'lib/verizon/models/get_device_statuses_responseforplanner.rb', line 51 def initialize(account_number = SKIP, request_id = SKIP, device_status_list = SKIP) @account_number = account_number unless account_number == SKIP @request_id = request_id unless request_id == SKIP @device_status_list = device_status_list unless device_status_list == SKIP end |
Instance Attribute Details
#account_number ⇒ String
The numeric name of the account, including leading zeros.
14 15 16 |
# File 'lib/verizon/models/get_device_statuses_responseforplanner.rb', line 14 def account_number @account_number end |
#device_status_list ⇒ Array[DeviceStatusItemforplanner]
The numeric name of the account, including leading zeros.
22 23 24 |
# File 'lib/verizon/models/get_device_statuses_responseforplanner.rb', line 22 def device_status_list @device_status_list end |
#request_id ⇒ String
The numeric name of the account, including leading zeros.
18 19 20 |
# File 'lib/verizon/models/get_device_statuses_responseforplanner.rb', line 18 def request_id @request_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/verizon/models/get_device_statuses_responseforplanner.rb', line 59 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_number = hash.key?('accountNumber') ? hash['accountNumber'] : SKIP request_id = hash.key?('requestId') ? hash['requestId'] : SKIP # Parameter is an array, so we need to iterate through it device_status_list = nil unless hash['deviceStatusList'].nil? device_status_list = [] hash['deviceStatusList'].each do |structure| device_status_list << (DeviceStatusItemforplanner.from_hash(structure) if structure) end end device_status_list = SKIP unless hash.key?('deviceStatusList') # Create object from extracted values. GetDeviceStatusesResponseforplanner.new(account_number, request_id, device_status_list) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/verizon/models/get_device_statuses_responseforplanner.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['account_number'] = 'accountNumber' @_hash['request_id'] = 'requestId' @_hash['device_status_list'] = 'deviceStatusList' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 46 47 48 49 |
# File 'lib/verizon/models/get_device_statuses_responseforplanner.rb', line 43 def self.nullables %w[ account_number request_id device_status_list ] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 37 38 39 40 |
# File 'lib/verizon/models/get_device_statuses_responseforplanner.rb', line 34 def self.optionals %w[ account_number request_id device_status_list ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
90 91 92 93 94 |
# File 'lib/verizon/models/get_device_statuses_responseforplanner.rb', line 90 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_number: #{@account_number.inspect}, request_id:"\ " #{@request_id.inspect}, device_status_list: #{@device_status_list.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
83 84 85 86 87 |
# File 'lib/verizon/models/get_device_statuses_responseforplanner.rb', line 83 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_number: #{@account_number}, request_id: #{@request_id},"\ " device_status_list: #{@device_status_list}>" end |