Class: Verizon::ConnectivityManagementCallback
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::ConnectivityManagementCallback
- Defined in:
- lib/verizon/models/connectivity_management_callback.rb
Overview
Includes callback listeners that were registered through the Connectivity Management API.
Instance Attribute Summary collapse
-
#account_name ⇒ String
The name of the billing account for which callback messages will be sent.
-
#password ⇒ String
The password defined when a URL was registered for the callback service, or an empty string if no password was defined.
-
#service_name ⇒ String
The name of the callback service, which identifies the type and format of messages that will be sent to the registered URL.
-
#url ⇒ String
The address of the callback listening service where the ThingSpace Platform will send callback messages for the service type.
-
#username ⇒ String
The username defined when a URL was registered for the callback service, or an empty string if no username was defined.
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(account_name = SKIP, password = SKIP, service_name = SKIP, url = SKIP, username = SKIP) ⇒ ConnectivityManagementCallback
constructor
A new instance of ConnectivityManagementCallback.
Methods inherited from BaseModel
Constructor Details
#initialize(account_name = SKIP, password = SKIP, service_name = SKIP, url = SKIP, username = SKIP) ⇒ ConnectivityManagementCallback
Returns a new instance of ConnectivityManagementCallback.
64 65 66 67 68 69 70 71 |
# File 'lib/verizon/models/connectivity_management_callback.rb', line 64 def initialize(account_name = SKIP, password = SKIP, service_name = SKIP, url = SKIP, username = SKIP) @account_name = account_name unless account_name == SKIP @password = password unless password == SKIP @service_name = service_name unless service_name == SKIP @url = url unless url == SKIP @username = username unless username == SKIP end |
Instance Attribute Details
#account_name ⇒ String
The name of the billing account for which callback messages will be sent.
15 16 17 |
# File 'lib/verizon/models/connectivity_management_callback.rb', line 15 def account_name @account_name end |
#password ⇒ String
The password defined when a URL was registered for the callback service, or an empty string if no password was defined.
20 21 22 |
# File 'lib/verizon/models/connectivity_management_callback.rb', line 20 def password @password end |
#service_name ⇒ String
The name of the callback service, which identifies the type and format of messages that will be sent to the registered URL.
25 26 27 |
# File 'lib/verizon/models/connectivity_management_callback.rb', line 25 def service_name @service_name end |
#url ⇒ String
The address of the callback listening service where the ThingSpace Platform will send callback messages for the service type.
30 31 32 |
# File 'lib/verizon/models/connectivity_management_callback.rb', line 30 def url @url end |
#username ⇒ String
The username defined when a URL was registered for the callback service, or an empty string if no username was defined.
35 36 37 |
# File 'lib/verizon/models/connectivity_management_callback.rb', line 35 def username @username end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/verizon/models/connectivity_management_callback.rb', line 74 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_name = hash.key?('accountName') ? hash['accountName'] : SKIP password = hash.key?('password') ? hash['password'] : SKIP service_name = hash.key?('serviceName') ? hash['serviceName'] : SKIP url = hash.key?('url') ? hash['url'] : SKIP username = hash.key?('username') ? hash['username'] : SKIP # Create object from extracted values. ConnectivityManagementCallback.new(account_name, password, service_name, url, username) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 44 45 46 |
# File 'lib/verizon/models/connectivity_management_callback.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['account_name'] = 'accountName' @_hash['password'] = 'password' @_hash['service_name'] = 'serviceName' @_hash['url'] = 'url' @_hash['username'] = 'username' @_hash end |
.nullables ⇒ Object
An array for nullable fields
60 61 62 |
# File 'lib/verizon/models/connectivity_management_callback.rb', line 60 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 57 |
# File 'lib/verizon/models/connectivity_management_callback.rb', line 49 def self.optionals %w[ account_name password service_name url username ] end |