Class: Verizon::V1ListOfLicensesToRemove
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::V1ListOfLicensesToRemove
- Defined in:
- lib/verizon/models/v1_list_of_licenses_to_remove.rb
Overview
List of cancellation candidate devices.
Instance Attribute Summary collapse
-
#count ⇒ Integer
The total number of devices on the list.
-
#device_list ⇒ Array[String]
The IMEIs of the devices.
-
#has_more_data ⇒ TrueClass | FalseClass
True if there are more devices to retrieve.
-
#update_time ⇒ DateTime
The date and time that the list was last updated.
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(count = SKIP, has_more_data = SKIP, update_time = SKIP, device_list = SKIP) ⇒ V1ListOfLicensesToRemove
constructor
A new instance of V1ListOfLicensesToRemove.
- #to_custom_update_time ⇒ Object
Methods inherited from BaseModel
Constructor Details
#initialize(count = SKIP, has_more_data = SKIP, update_time = SKIP, device_list = SKIP) ⇒ V1ListOfLicensesToRemove
Returns a new instance of V1ListOfLicensesToRemove.
54 55 56 57 58 59 60 |
# File 'lib/verizon/models/v1_list_of_licenses_to_remove.rb', line 54 def initialize(count = SKIP, has_more_data = SKIP, update_time = SKIP, device_list = SKIP) @count = count unless count == SKIP @has_more_data = has_more_data unless has_more_data == SKIP @update_time = update_time unless update_time == SKIP @device_list = device_list unless device_list == SKIP end |
Instance Attribute Details
#count ⇒ Integer
The total number of devices on the list.
15 16 17 |
# File 'lib/verizon/models/v1_list_of_licenses_to_remove.rb', line 15 def count @count end |
#device_list ⇒ Array[String]
The IMEIs of the devices.
27 28 29 |
# File 'lib/verizon/models/v1_list_of_licenses_to_remove.rb', line 27 def device_list @device_list end |
#has_more_data ⇒ TrueClass | FalseClass
True if there are more devices to retrieve.
19 20 21 |
# File 'lib/verizon/models/v1_list_of_licenses_to_remove.rb', line 19 def has_more_data @has_more_data end |
#update_time ⇒ DateTime
The date and time that the list was last updated.
23 24 25 |
# File 'lib/verizon/models/v1_list_of_licenses_to_remove.rb', line 23 def update_time @update_time end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/verizon/models/v1_list_of_licenses_to_remove.rb', line 63 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. count = hash.key?('count') ? hash['count'] : SKIP has_more_data = hash.key?('hasMoreData') ? hash['hasMoreData'] : SKIP update_time = if hash.key?('updateTime') (DateTimeHelper.from_rfc3339(hash['updateTime']) if hash['updateTime']) else SKIP end device_list = hash.key?('deviceList') ? hash['deviceList'] : SKIP # Create object from extracted values. V1ListOfLicensesToRemove.new(count, has_more_data, update_time, device_list) end |
.names ⇒ Object
A mapping from model property names to API property names.
30 31 32 33 34 35 36 37 |
# File 'lib/verizon/models/v1_list_of_licenses_to_remove.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['count'] = 'count' @_hash['has_more_data'] = 'hasMoreData' @_hash['update_time'] = 'updateTime' @_hash['device_list'] = 'deviceList' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/verizon/models/v1_list_of_licenses_to_remove.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
40 41 42 43 44 45 46 47 |
# File 'lib/verizon/models/v1_list_of_licenses_to_remove.rb', line 40 def self.optionals %w[ count has_more_data update_time device_list ] end |
Instance Method Details
#to_custom_update_time ⇒ Object
83 84 85 |
# File 'lib/verizon/models/v1_list_of_licenses_to_remove.rb', line 83 def to_custom_update_time DateTimeHelper.to_rfc3339(update_time) end |