Class: Verizon::HyperPreciseLocationCallback

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

Overview

Callback registration request.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(name = nil, url = nil) ⇒ HyperPreciseLocationCallback

Returns a new instance of HyperPreciseLocationCallback.



42
43
44
45
# File 'lib/verizon/models/hyper_precise_location_callback.rb', line 42

def initialize(name = nil, url = nil)
  @name = name
  @url = url
end

Instance Attribute Details

#nameString

The name of the callback service that you want to subscribe to.

Returns:

  • (String)


14
15
16
# File 'lib/verizon/models/hyper_precise_location_callback.rb', line 14

def name
  @name
end

#urlString

The address on your server where you have enabled a listening service for the specific type of callback messages. Specify a URL that is reachable from the Verizon data centers. If your service is running on HTTPS, you should use a one-way authentication certificate with a white-listed IP address.

Returns:

  • (String)


22
23
24
# File 'lib/verizon/models/hyper_precise_location_callback.rb', line 22

def url
  @url
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  name = hash.key?('name') ? hash['name'] : nil
  url = hash.key?('url') ? hash['url'] : nil

  # Create object from extracted values.
  HyperPreciseLocationCallback.new(name,
                                   url)
end

.namesObject

A mapping from model property names to API property names.



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

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

.nullablesObject

An array for nullable fields



38
39
40
# File 'lib/verizon/models/hyper_precise_location_callback.rb', line 38

def self.nullables
  []
end

.optionalsObject

An array for optional fields



33
34
35
# File 'lib/verizon/models/hyper_precise_location_callback.rb', line 33

def self.optionals
  []
end