Class: Verizon::GetDevicesWindowsRequestforplanner
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::GetDevicesWindowsRequestforplanner
- Defined in:
- lib/verizon/models/get_devices_windows_requestforplanner.rb
Overview
GetDevicesWindowsRequestforplanner Model.
Instance Attribute Summary collapse
-
#account_number ⇒ String
The numeric name of the account, including leading zeros.
-
#devices ⇒ Array[DeviceListforplanner]
what windows to filter for: All - all 24 windows in a day, Best - top 3 windows by RAN KPI, Worst - lowest 3 windows by RAN KPI.
-
#filter ⇒ String
what windows to filter for: All - all 24 windows in a day, Best - top 3 windows by RAN KPI, Worst - lowest 3 windows by RAN KPI.
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, filter = SKIP, devices = SKIP) ⇒ GetDevicesWindowsRequestforplanner
constructor
A new instance of GetDevicesWindowsRequestforplanner.
-
#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, filter = SKIP, devices = SKIP) ⇒ GetDevicesWindowsRequestforplanner
Returns a new instance of GetDevicesWindowsRequestforplanner.
53 54 55 56 57 |
# File 'lib/verizon/models/get_devices_windows_requestforplanner.rb', line 53 def initialize(account_number = SKIP, filter = SKIP, devices = SKIP) @account_number = account_number unless account_number == SKIP @filter = filter unless filter == SKIP @devices = devices unless devices == 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_devices_windows_requestforplanner.rb', line 14 def account_number @account_number end |
#devices ⇒ Array[DeviceListforplanner]
what windows to filter for: All - all 24 windows in a day, Best - top 3 windows by RAN KPI, Worst - lowest 3 windows by RAN KPI
24 25 26 |
# File 'lib/verizon/models/get_devices_windows_requestforplanner.rb', line 24 def devices @devices end |
#filter ⇒ String
what windows to filter for: All - all 24 windows in a day, Best - top 3 windows by RAN KPI, Worst - lowest 3 windows by RAN KPI
19 20 21 |
# File 'lib/verizon/models/get_devices_windows_requestforplanner.rb', line 19 def filter @filter end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/verizon/models/get_devices_windows_requestforplanner.rb', line 60 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_number = hash.key?('accountNumber') ? hash['accountNumber'] : SKIP filter = hash.key?('filter') ? hash['filter'] : SKIP # Parameter is an array, so we need to iterate through it devices = nil unless hash['devices'].nil? devices = [] hash['devices'].each do |structure| devices << (DeviceListforplanner.from_hash(structure) if structure) end end devices = SKIP unless hash.key?('devices') # Create object from extracted values. GetDevicesWindowsRequestforplanner.new(account_number, filter, devices) end |
.names ⇒ Object
A mapping from model property names to API property names.
27 28 29 30 31 32 33 |
# File 'lib/verizon/models/get_devices_windows_requestforplanner.rb', line 27 def self.names @_hash = {} if @_hash.nil? @_hash['account_number'] = 'accountNumber' @_hash['filter'] = 'filter' @_hash['devices'] = 'devices' @_hash end |
.nullables ⇒ Object
An array for nullable fields
45 46 47 48 49 50 51 |
# File 'lib/verizon/models/get_devices_windows_requestforplanner.rb', line 45 def self.nullables %w[ account_number filter devices ] end |
.optionals ⇒ Object
An array for optional fields
36 37 38 39 40 41 42 |
# File 'lib/verizon/models/get_devices_windows_requestforplanner.rb', line 36 def self.optionals %w[ account_number filter devices ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
91 92 93 94 95 |
# File 'lib/verizon/models/get_devices_windows_requestforplanner.rb', line 91 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_number: #{@account_number.inspect}, filter: #{@filter.inspect},"\ " devices: #{@devices.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
84 85 86 87 88 |
# File 'lib/verizon/models/get_devices_windows_requestforplanner.rb', line 84 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_number: #{@account_number}, filter: #{@filter}, devices:"\ " #{@devices}>" end |