Class: Verizon::DeviceProvisioningHistoryListRequest

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

Overview

Request to return the provisioning history of a specified device during a specified time period.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(device_id = nil, earliest = nil, latest = nil) ⇒ DeviceProvisioningHistoryListRequest

Returns a new instance of DeviceProvisioningHistoryListRequest.



44
45
46
47
48
# File 'lib/verizon/models/device_provisioning_history_list_request.rb', line 44

def initialize(device_id = nil, earliest = nil, latest = nil)
  @device_id = device_id
  @earliest = earliest
  @latest = latest
end

Instance Attribute Details

#device_idDeviceId

An identifier for a single device.

Returns:



15
16
17
# File 'lib/verizon/models/device_provisioning_history_list_request.rb', line 15

def device_id
  @device_id
end

#earliestString

The earliest date and time for which you want provisioning data.

Returns:

  • (String)


19
20
21
# File 'lib/verizon/models/device_provisioning_history_list_request.rb', line 19

def earliest
  @earliest
end

#latestString

The last date and time for which you want provisioning data.

Returns:

  • (String)


23
24
25
# File 'lib/verizon/models/device_provisioning_history_list_request.rb', line 23

def latest
  @latest
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/verizon/models/device_provisioning_history_list_request.rb', line 51

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.

  device_id = DeviceId.from_hash(hash['deviceId']) if hash['deviceId']
  earliest = hash.key?('earliest') ? hash['earliest'] : nil
  latest = hash.key?('latest') ? hash['latest'] : nil

  # Create object from extracted values.

  DeviceProvisioningHistoryListRequest.new(device_id,
                                           earliest,
                                           latest)
end

.namesObject

A mapping from model property names to API property names.



26
27
28
29
30
31
32
# File 'lib/verizon/models/device_provisioning_history_list_request.rb', line 26

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['device_id'] = 'deviceId'
  @_hash['earliest'] = 'earliest'
  @_hash['latest'] = 'latest'
  @_hash
end

.nullablesObject

An array for nullable fields



40
41
42
# File 'lib/verizon/models/device_provisioning_history_list_request.rb', line 40

def self.nullables
  []
end

.optionalsObject

An array for optional fields



35
36
37
# File 'lib/verizon/models/device_provisioning_history_list_request.rb', line 35

def self.optionals
  []
end