Class: Verizon::V1ListOfLicensesToRemoveRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/verizon/models/v1_list_of_licenses_to_remove_request.rb

Overview

List of devices to removes.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(device_list = nil, type = SKIP) ⇒ V1ListOfLicensesToRemoveRequest

Returns a new instance of V1ListOfLicensesToRemoveRequest.



43
44
45
46
# File 'lib/verizon/models/v1_list_of_licenses_to_remove_request.rb', line 43

def initialize(device_list = nil, type = SKIP)
  @type = type unless type == SKIP
  @device_list = device_list
end

Instance Attribute Details

#device_listArray[String]

The IMEIs of the devices.

Returns:

  • (Array[String])


21
22
23
# File 'lib/verizon/models/v1_list_of_licenses_to_remove_request.rb', line 21

def device_list
  @device_list
end

#typeString

Set to ‘append’ to append the devices in the current request to the existing list. If there is no existing list then it will be created with only these devices. Leave this parameter out when you want to replace the existing list with the devices in the current request.

Returns:

  • (String)


17
18
19
# File 'lib/verizon/models/v1_list_of_licenses_to_remove_request.rb', line 17

def type
  @type
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



49
50
51
52
53
54
55
56
57
58
59
# File 'lib/verizon/models/v1_list_of_licenses_to_remove_request.rb', line 49

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  device_list = hash.key?('deviceList') ? hash['deviceList'] : nil
  type = hash.key?('type') ? hash['type'] : SKIP

  # Create object from extracted values.
  V1ListOfLicensesToRemoveRequest.new(device_list,
                                      type)
end

.namesObject

A mapping from model property names to API property names.



24
25
26
27
28
29
# File 'lib/verizon/models/v1_list_of_licenses_to_remove_request.rb', line 24

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['type'] = 'type'
  @_hash['device_list'] = 'deviceList'
  @_hash
end

.nullablesObject

An array for nullable fields



39
40
41
# File 'lib/verizon/models/v1_list_of_licenses_to_remove_request.rb', line 39

def self.nullables
  []
end

.optionalsObject

An array for optional fields



32
33
34
35
36
# File 'lib/verizon/models/v1_list_of_licenses_to_remove_request.rb', line 32

def self.optionals
  %w[
    type
  ]
end