Class: Verizon::DeviceConnectionListRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::DeviceConnectionListRequest
- Defined in:
- lib/verizon/models/device_connection_list_request.rb
Overview
Request to list of network connection events for a device during a specified time period.
Instance Attribute Summary collapse
-
#device_id ⇒ DeviceId
An identifier for a single device.
-
#earliest ⇒ String
The earliest date and time for which you want connection events.
-
#latest ⇒ String
The last date and time for which you want connection events.
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_id = nil, earliest = nil, latest = nil) ⇒ DeviceConnectionListRequest
constructor
A new instance of DeviceConnectionListRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(device_id = nil, earliest = nil, latest = nil) ⇒ DeviceConnectionListRequest
Returns a new instance of DeviceConnectionListRequest.
44 45 46 47 48 |
# File 'lib/verizon/models/device_connection_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_id ⇒ DeviceId
An identifier for a single device.
15 16 17 |
# File 'lib/verizon/models/device_connection_list_request.rb', line 15 def device_id @device_id end |
#earliest ⇒ String
The earliest date and time for which you want connection events.
19 20 21 |
# File 'lib/verizon/models/device_connection_list_request.rb', line 19 def earliest @earliest end |
#latest ⇒ String
The last date and time for which you want connection events.
23 24 25 |
# File 'lib/verizon/models/device_connection_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_connection_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. DeviceConnectionListRequest.new(device_id, earliest, latest) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 32 |
# File 'lib/verizon/models/device_connection_list_request.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['device_id'] = 'deviceId' @_hash['earliest'] = 'earliest' @_hash['latest'] = 'latest' @_hash end |
.nullables ⇒ Object
An array for nullable fields
40 41 42 |
# File 'lib/verizon/models/device_connection_list_request.rb', line 40 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
35 36 37 |
# File 'lib/verizon/models/device_connection_list_request.rb', line 35 def self.optionals [] end |