Class: Verizon::ClientRegistrationPendingResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::ClientRegistrationPendingResponse
- Defined in:
- lib/verizon/models/client_registration_pending_response.rb
Overview
Response for /clients/registration for pending state. It provides a device_id for user to finish registration with PUT API call
Instance Attribute Summary collapse
-
#device_id ⇒ UUID | String
The generated ID (UUID v4) for the device.
-
#message ⇒ String
The reason why the registration is in pending state.
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(device_id:, message:) ⇒ ClientRegistrationPendingResponse
constructor
A new instance of ClientRegistrationPendingResponse.
-
#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(device_id:, message:) ⇒ ClientRegistrationPendingResponse
Returns a new instance of ClientRegistrationPendingResponse.
43 44 45 46 |
# File 'lib/verizon/models/client_registration_pending_response.rb', line 43 def initialize(device_id:, message:) @device_id = device_id @message = end |
Instance Attribute Details
#device_id ⇒ UUID | String
The generated ID (UUID v4) for the device. It can be used as:
- the MQTT Client ID when connecting to the Message Exchange system
- a parameter when asking for the connection endpoint
- a parameter when finishing the device registration
- a parameter when unregistering the device
19 20 21 |
# File 'lib/verizon/models/client_registration_pending_response.rb', line 19 def device_id @device_id end |
#message ⇒ String
The reason why the registration is in pending state
23 24 25 |
# File 'lib/verizon/models/client_registration_pending_response.rb', line 23 def @message end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/verizon/models/client_registration_pending_response.rb', line 49 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. device_id = hash.key?('DeviceID') ? hash['DeviceID'] : nil = hash.key?('Message') ? hash['Message'] : nil # Create object from extracted values. ClientRegistrationPendingResponse.new(device_id: device_id, message: ) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 |
# File 'lib/verizon/models/client_registration_pending_response.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['device_id'] = 'DeviceID' @_hash['message'] = 'Message' @_hash end |
.nullables ⇒ Object
An array for nullable fields
39 40 41 |
# File 'lib/verizon/models/client_registration_pending_response.rb', line 39 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 |
# File 'lib/verizon/models/client_registration_pending_response.rb', line 34 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
68 69 70 71 |
# File 'lib/verizon/models/client_registration_pending_response.rb', line 68 def inspect class_name = self.class.name.split('::').last "<#{class_name} device_id: #{@device_id.inspect}, message: #{@message.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
62 63 64 65 |
# File 'lib/verizon/models/client_registration_pending_response.rb', line 62 def to_s class_name = self.class.name.split('::').last "<#{class_name} device_id: #{@device_id}, message: #{@message}>" end |