Class: Verizon::AggregatedReportCallbackResult
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::AggregatedReportCallbackResult
- Defined in:
- lib/verizon/models/aggregated_report_callback_result.rb
Overview
Aggregated usage report (Asynchronous).
Instance Attribute Summary collapse
-
#status ⇒ AggregatedReportCallbackStatusEnum
QUEUED or COMPLETED.
-
#txid ⇒ String
A unique string that associates the request with the location report information that is sent in asynchronous callback message.ThingSpace will send a separate callback message for each device that was in the request.
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(txid = nil, status = SKIP) ⇒ AggregatedReportCallbackResult
constructor
A new instance of AggregatedReportCallbackResult.
Methods inherited from BaseModel
Constructor Details
#initialize(txid = nil, status = SKIP) ⇒ AggregatedReportCallbackResult
Returns a new instance of AggregatedReportCallbackResult.
44 45 46 47 |
# File 'lib/verizon/models/aggregated_report_callback_result.rb', line 44 def initialize(txid = nil, status = SKIP) @txid = txid @status = status unless status == SKIP end |
Instance Attribute Details
#status ⇒ AggregatedReportCallbackStatusEnum
QUEUED or COMPLETED. Requests for IoT devices with cacheMode=0 (cached) have status=COMPLETED; all other requests are QUEUED.
22 23 24 |
# File 'lib/verizon/models/aggregated_report_callback_result.rb', line 22 def status @status end |
#txid ⇒ String
A unique string that associates the request with the location report information that is sent in asynchronous callback message.ThingSpace will send a separate callback message for each device that was in the request. All of the callback messages will have the same txid.
17 18 19 |
# File 'lib/verizon/models/aggregated_report_callback_result.rb', line 17 def txid @txid end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/verizon/models/aggregated_report_callback_result.rb', line 50 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. txid = hash.key?('txid') ? hash['txid'] : nil status = hash.key?('status') ? hash['status'] : SKIP # Create object from extracted values. AggregatedReportCallbackResult.new(txid, status) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 |
# File 'lib/verizon/models/aggregated_report_callback_result.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['txid'] = 'txid' @_hash['status'] = 'status' @_hash end |
.nullables ⇒ Object
An array for nullable fields
40 41 42 |
# File 'lib/verizon/models/aggregated_report_callback_result.rb', line 40 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
33 34 35 36 37 |
# File 'lib/verizon/models/aggregated_report_callback_result.rb', line 33 def self.optionals %w[ status ] end |