Class: Verizon::CallbackRegistrationRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::CallbackRegistrationRequest
- Defined in:
- lib/verizon/models/callback_registration_request.rb
Overview
Specifies the callback service that is being subscribed to and the URL where the listening service is running.
Instance Attribute Summary collapse
-
#account_name ⇒ String
The name of the billing account for which callback messages will be sent.
-
#endpoint ⇒ String
The URL for your web server.
-
#http_headers ⇒ Object
Your HTTP headers.
-
#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.
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:, service_name:, endpoint:, http_headers: SKIP, additional_properties: nil) ⇒ CallbackRegistrationRequest
constructor
A new instance of CallbackRegistrationRequest.
-
#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:, service_name:, endpoint:, http_headers: SKIP, additional_properties: nil) ⇒ CallbackRegistrationRequest
Returns a new instance of CallbackRegistrationRequest.
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/verizon/models/callback_registration_request.rb', line 53 def initialize(account_name:, service_name:, endpoint:, http_headers: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @account_name = account_name @service_name = service_name @endpoint = endpoint @http_headers = http_headers unless http_headers == 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. Format: “##########-#####”.
16 17 18 |
# File 'lib/verizon/models/callback_registration_request.rb', line 16 def account_name @account_name end |
#endpoint ⇒ String
The URL for your web server.
25 26 27 |
# File 'lib/verizon/models/callback_registration_request.rb', line 25 def endpoint @endpoint end |
#http_headers ⇒ Object
Your HTTP headers.
29 30 31 |
# File 'lib/verizon/models/callback_registration_request.rb', line 29 def http_headers @http_headers 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.
21 22 23 |
# File 'lib/verizon/models/callback_registration_request.rb', line 21 def service_name @service_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/verizon/models/callback_registration_request.rb', line 66 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_name = hash.key?('accountName') ? hash['accountName'] : nil service_name = hash.key?('serviceName') ? hash['serviceName'] : nil endpoint = hash.key?('endpoint') ? hash['endpoint'] : nil http_headers = hash.key?('httpHeaders') ? hash['httpHeaders'] : 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. CallbackRegistrationRequest.new(account_name: account_name, service_name: service_name, endpoint: endpoint, http_headers: http_headers, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
32 33 34 35 36 37 38 39 |
# File 'lib/verizon/models/callback_registration_request.rb', line 32 def self.names @_hash = {} if @_hash.nil? @_hash['account_name'] = 'accountName' @_hash['service_name'] = 'serviceName' @_hash['endpoint'] = 'endpoint' @_hash['http_headers'] = 'httpHeaders' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 |
# File 'lib/verizon/models/callback_registration_request.rb', line 49 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
42 43 44 45 46 |
# File 'lib/verizon/models/callback_registration_request.rb', line 42 def self.optionals %w[ http_headers ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
99 100 101 102 103 104 |
# File 'lib/verizon/models/callback_registration_request.rb', line 99 def inspect class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name.inspect}, service_name:"\ " #{@service_name.inspect}, endpoint: #{@endpoint.inspect}, http_headers:"\ " #{@http_headers.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
91 92 93 94 95 96 |
# File 'lib/verizon/models/callback_registration_request.rb', line 91 def to_s class_name = self.class.name.split('::').last "<#{class_name} account_name: #{@account_name}, service_name: #{@service_name}, endpoint:"\ " #{@endpoint}, http_headers: #{@http_headers}, additional_properties:"\ " #{@additional_properties}>" end |