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, additional_properties: nil) ⇒ ConnectivityManagementCallback
constructor
A new instance of ConnectivityManagementCallback.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(account_name: SKIP, password: SKIP, service_name: SKIP, url: SKIP, username: SKIP, additional_properties: nil) ⇒ ConnectivityManagementCallback
Returns a new instance of ConnectivityManagementCallback.
64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/verizon/models/connectivity_management_callback.rb', line 64 def initialize(account_name: SKIP, password: SKIP, service_name: SKIP, url: SKIP, username: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @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 @additional_properties = additional_properties 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.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/verizon/models/connectivity_management_callback.rb', line 78 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 a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. ConnectivityManagementCallback.new(account_name: account_name, password: password, service_name: service_name, url: url, username: username, additional_properties: additional_properties) 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 |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
113 114 115 116 117 118 |
# File 'lib/verizon/models/connectivity_management_callback.rb', line 113 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name.inspect}, password: #{@password.inspect},"\ " service_name: #{@service_name.inspect}, url: #{@url.inspect}, username:"\ " #{@username.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
105 106 107 108 109 110 |
# File 'lib/verizon/models/connectivity_management_callback.rb', line 105 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name}, password: #{@password}, service_name:"\ " #{@service_name}, url: #{@url}, username: #{@username}, additional_properties:"\ " #{@additional_properties}>" end |