Class: Verizon::FirmwareUpgradeRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::FirmwareUpgradeRequest
- Defined in:
- lib/verizon/models/firmware_upgrade_request.rb
Overview
Details of the firmware upgrade request.
Instance Attribute Summary collapse
-
#account_name ⇒ String
Account identifier in “##########-#####”.
-
#device_list ⇒ Array[String]
The IMEIs of the devices.
-
#end_date ⇒ Date
The date that the upgrade ends.
-
#firmware_name ⇒ String
The name of the firmware image that will be used for the upgrade, from a GET /firmware response.
-
#firmware_to ⇒ String
The name of the firmware version that will be on the devices after a successful upgrade.
-
#start_date ⇒ Date
The date that the upgrade begins.
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 = nil, firmware_name = nil, firmware_to = nil, start_date = nil, end_date = nil, device_list = nil) ⇒ FirmwareUpgradeRequest
constructor
A new instance of FirmwareUpgradeRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(account_name = nil, firmware_name = nil, firmware_to = nil, start_date = nil, end_date = nil, device_list = nil) ⇒ FirmwareUpgradeRequest
Returns a new instance of FirmwareUpgradeRequest.
60 61 62 63 64 65 66 67 68 |
# File 'lib/verizon/models/firmware_upgrade_request.rb', line 60 def initialize(account_name = nil, firmware_name = nil, firmware_to = nil, start_date = nil, end_date = nil, device_list = nil) @account_name = account_name @firmware_name = firmware_name @firmware_to = firmware_to @start_date = start_date @end_date = end_date @device_list = device_list end |
Instance Attribute Details
#account_name ⇒ String
Account identifier in “##########-#####”.
14 15 16 |
# File 'lib/verizon/models/firmware_upgrade_request.rb', line 14 def account_name @account_name end |
#device_list ⇒ Array[String]
The IMEIs of the devices.
36 37 38 |
# File 'lib/verizon/models/firmware_upgrade_request.rb', line 36 def device_list @device_list end |
#end_date ⇒ Date
The date that the upgrade ends.
32 33 34 |
# File 'lib/verizon/models/firmware_upgrade_request.rb', line 32 def end_date @end_date end |
#firmware_name ⇒ String
The name of the firmware image that will be used for the upgrade, from a GET /firmware response.
19 20 21 |
# File 'lib/verizon/models/firmware_upgrade_request.rb', line 19 def firmware_name @firmware_name end |
#firmware_to ⇒ String
The name of the firmware version that will be on the devices after a successful upgrade.
24 25 26 |
# File 'lib/verizon/models/firmware_upgrade_request.rb', line 24 def firmware_to @firmware_to end |
#start_date ⇒ Date
The date that the upgrade begins.
28 29 30 |
# File 'lib/verizon/models/firmware_upgrade_request.rb', line 28 def start_date @start_date 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 |
# File 'lib/verizon/models/firmware_upgrade_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'] : nil firmware_name = hash.key?('firmwareName') ? hash['firmwareName'] : nil firmware_to = hash.key?('firmwareTo') ? hash['firmwareTo'] : nil start_date = hash.key?('startDate') ? hash['startDate'] : nil end_date = hash.key?('endDate') ? hash['endDate'] : nil device_list = hash.key?('deviceList') ? hash['deviceList'] : nil # Create object from extracted values. FirmwareUpgradeRequest.new(account_name, firmware_name, firmware_to, start_date, end_date, device_list) end |
.names ⇒ Object
A mapping from model property names to API property names.
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/verizon/models/firmware_upgrade_request.rb', line 39 def self.names @_hash = {} if @_hash.nil? @_hash['account_name'] = 'accountName' @_hash['firmware_name'] = 'firmwareName' @_hash['firmware_to'] = 'firmwareTo' @_hash['start_date'] = 'startDate' @_hash['end_date'] = 'endDate' @_hash['device_list'] = 'deviceList' @_hash end |
.nullables ⇒ Object
An array for nullable fields
56 57 58 |
# File 'lib/verizon/models/firmware_upgrade_request.rb', line 56 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
51 52 53 |
# File 'lib/verizon/models/firmware_upgrade_request.rb', line 51 def self.optionals [] end |