Class: Verizon::RegisteredCallbacks
- Defined in:
- lib/verizon/models/registered_callbacks.rb
Overview
List of registered callback endpoints.
Instance Attribute Summary collapse
-
#aname ⇒ String
The name of the billing account for which callback messages will be sent.
-
#name ⇒ String
The name of the callback service, which identifies the type and format of messages that will be sent to the registered URL.
-
#password ⇒ String
The password that ThingSpace will return in the callback messages.
-
#url ⇒ String
The address to which callback messages will be sent.
-
#username ⇒ String
The user name that ThingSpace will return in the callback messages.
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(aname = SKIP, name = SKIP, url = SKIP, username = SKIP, password = SKIP) ⇒ RegisteredCallbacks
constructor
A new instance of RegisteredCallbacks.
Methods inherited from BaseModel
Constructor Details
#initialize(aname = SKIP, name = SKIP, url = SKIP, username = SKIP, password = SKIP) ⇒ RegisteredCallbacks
Returns a new instance of RegisteredCallbacks.
61 62 63 64 65 66 67 68 |
# File 'lib/verizon/models/registered_callbacks.rb', line 61 def initialize(aname = SKIP, name = SKIP, url = SKIP, username = SKIP, password = SKIP) @aname = aname unless aname == SKIP @name = name unless name == SKIP @url = url unless url == SKIP @username = username unless username == SKIP @password = password unless password == SKIP end |
Instance Attribute Details
#aname ⇒ String
The name of the billing account for which callback messages will be sent.
14 15 16 |
# File 'lib/verizon/models/registered_callbacks.rb', line 14 def aname @aname end |
#name ⇒ String
The name of the callback service, which identifies the type and format of messages that will be sent to the registered URL. This will be ‘Fota’ for the Software Management Services callback.
20 21 22 |
# File 'lib/verizon/models/registered_callbacks.rb', line 20 def name @name end |
#password ⇒ String
The password that ThingSpace will return in the callback messages.
32 33 34 |
# File 'lib/verizon/models/registered_callbacks.rb', line 32 def password @password end |
#url ⇒ String
The address to which callback messages will be sent.
24 25 26 |
# File 'lib/verizon/models/registered_callbacks.rb', line 24 def url @url end |
#username ⇒ String
The user name that ThingSpace will return in the callback messages.
28 29 30 |
# File 'lib/verizon/models/registered_callbacks.rb', line 28 def username @username end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/verizon/models/registered_callbacks.rb', line 71 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. aname = hash.key?('aname') ? hash['aname'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP url = hash.key?('url') ? hash['url'] : SKIP username = hash.key?('username') ? hash['username'] : SKIP password = hash.key?('password') ? hash['password'] : SKIP # Create object from extracted values. RegisteredCallbacks.new(aname, name, url, username, password) end |
.names ⇒ Object
A mapping from model property names to API property names.
35 36 37 38 39 40 41 42 43 |
# File 'lib/verizon/models/registered_callbacks.rb', line 35 def self.names @_hash = {} if @_hash.nil? @_hash['aname'] = 'aname' @_hash['name'] = 'name' @_hash['url'] = 'url' @_hash['username'] = 'username' @_hash['password'] = 'password' @_hash end |
.nullables ⇒ Object
An array for nullable fields
57 58 59 |
# File 'lib/verizon/models/registered_callbacks.rb', line 57 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
46 47 48 49 50 51 52 53 54 |
# File 'lib/verizon/models/registered_callbacks.rb', line 46 def self.optionals %w[ aname name url username password ] end |