Class: Verizon::SecuritySuccessResult

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

Overview

Success response.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(request_id = SKIP) ⇒ SecuritySuccessResult

Returns a new instance of SecuritySuccessResult.



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

def initialize(request_id = SKIP)
  @request_id = request_id unless request_id == SKIP
end

Instance Attribute Details

#request_idString

A unique string that associates the request with the results that are sent via a callback message.The ThingSpace Platform sends a separate callback message for each device that matches the request criteria, indicating whether the operation succeeded for that device and containing any requested information. All callback messages will have the same requestId.

Returns:

  • (String)


18
19
20
# File 'lib/verizon/models/security_success_result.rb', line 18

def request_id
  @request_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



44
45
46
47
48
49
50
51
52
# File 'lib/verizon/models/security_success_result.rb', line 44

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  request_id = hash.key?('requestId') ? hash['requestId'] : SKIP

  # Create object from extracted values.
  SecuritySuccessResult.new(request_id)
end

.namesObject

A mapping from model property names to API property names.



21
22
23
24
25
# File 'lib/verizon/models/security_success_result.rb', line 21

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['request_id'] = 'requestId'
  @_hash
end

.nullablesObject

An array for nullable fields



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

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    request_id
  ]
end