Class: Verizon::DeleteDevicesResult
- Defined in:
- lib/verizon/models/delete_devices_result.rb
Overview
Response for a request made to delete a device.
Instance Attribute Summary collapse
-
#device_ids ⇒ Object
One object per device to be deleted.
-
#message ⇒ String
Not present if status=Success.
-
#status ⇒ String
“Success” if the device was deleted, or “Failed” if there was a problem.
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(device_ids = SKIP, status = SKIP, message = SKIP) ⇒ DeleteDevicesResult
constructor
A new instance of DeleteDevicesResult.
Methods inherited from BaseModel
Constructor Details
#initialize(device_ids = SKIP, status = SKIP, message = SKIP) ⇒ DeleteDevicesResult
Returns a new instance of DeleteDevicesResult.
50 51 52 53 54 55 56 |
# File 'lib/verizon/models/delete_devices_result.rb', line 50 def initialize(device_ids = SKIP, status = SKIP, = SKIP) @device_ids = device_ids unless device_ids == SKIP @status = status unless status == SKIP @message = unless == SKIP end |
Instance Attribute Details
#device_ids ⇒ Object
One object per device to be deleted. Each object must contain a kind and id element identifying the device.
15 16 17 |
# File 'lib/verizon/models/delete_devices_result.rb', line 15 def device_ids @device_ids end |
#message ⇒ String
Not present if status=Success. One of these messages if status=Failed:The device is not in deactivate state.The user does not have access to delete the device.
25 26 27 |
# File 'lib/verizon/models/delete_devices_result.rb', line 25 def @message end |
#status ⇒ String
“Success” if the device was deleted, or “Failed” if there was a problem.
19 20 21 |
# File 'lib/verizon/models/delete_devices_result.rb', line 19 def status @status 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 |
# File 'lib/verizon/models/delete_devices_result.rb', line 59 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. device_ids = hash.key?('deviceIds') ? hash['deviceIds'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP = hash.key?('message') ? hash['message'] : SKIP # Create object from extracted values. DeleteDevicesResult.new(device_ids, status, ) end |
.names ⇒ Object
A mapping from model property names to API property names.
28 29 30 31 32 33 34 |
# File 'lib/verizon/models/delete_devices_result.rb', line 28 def self.names @_hash = {} if @_hash.nil? @_hash['device_ids'] = 'deviceIds' @_hash['status'] = 'status' @_hash['message'] = 'message' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 |
# File 'lib/verizon/models/delete_devices_result.rb', line 46 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
37 38 39 40 41 42 43 |
# File 'lib/verizon/models/delete_devices_result.rb', line 37 def self.optionals %w[ device_ids status message ] end |