Class: LogaltyCertificateIssuanceApiCerty::ResendRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- LogaltyCertificateIssuanceApiCerty::ResendRequest
- Defined in:
- lib/logalty_certificate_issuance_api_certy/models/resend_request.rb
Overview
ResendRequest Model.
Instance Attribute Summary collapse
-
#contact ⇒ String
Alternative contact information to use instead of the one on the original request.
-
#notice_method ⇒ NoticeMethod
Notification channel used to give the end-user access to the system: - ‘NONE`: No notification is sent; only a synchronous access URL is returned.
-
#operation ⇒ String
readonly
Fixed value ‘resend`.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(notice_method: SKIP, contact: SKIP, additional_properties: nil) ⇒ ResendRequest
constructor
A new instance of ResendRequest.
-
#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(notice_method: SKIP, contact: SKIP, additional_properties: nil) ⇒ ResendRequest
Returns a new instance of ResendRequest.
55 56 57 58 59 60 61 62 63 64 |
# File 'lib/logalty_certificate_issuance_api_certy/models/resend_request.rb', line 55 def initialize(notice_method: SKIP, contact: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @operation = 'resend' @notice_method = notice_method unless notice_method == SKIP @contact = contact unless contact == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#contact ⇒ String
Alternative contact information to use instead of the one on the original request.
-
For ‘EMAIL`: must be a valid e-mail address.
-
For ‘SMS`: must be a valid phone number.
If the process has not yet been accessed by the user, the contact on the request is updated.
31 32 33 |
# File 'lib/logalty_certificate_issuance_api_certy/models/resend_request.rb', line 31 def contact @contact end |
#notice_method ⇒ NoticeMethod
Notification channel used to give the end-user access to the system:
-
‘NONE`: No notification is sent; only a synchronous access URL is
returned.
-
‘EMAIL`: An asynchronous access link is sent by e-mail.
-
‘SMS`: An asynchronous access link is sent by SMS.
22 23 24 |
# File 'lib/logalty_certificate_issuance_api_certy/models/resend_request.rb', line 22 def notice_method @notice_method end |
#operation ⇒ String (readonly)
Fixed value ‘resend`.
14 15 16 |
# File 'lib/logalty_certificate_issuance_api_certy/models/resend_request.rb', line 14 def operation @operation end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/logalty_certificate_issuance_api_certy/models/resend_request.rb', line 67 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. notice_method = hash.key?('noticeMethod') ? hash['noticeMethod'] : SKIP contact = hash.key?('contact') ? hash['contact'] : 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. ResendRequest.new(notice_method: notice_method, contact: contact, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
34 35 36 37 38 39 40 |
# File 'lib/logalty_certificate_issuance_api_certy/models/resend_request.rb', line 34 def self.names @_hash = {} if @_hash.nil? @_hash['operation'] = 'operation' @_hash['notice_method'] = 'noticeMethod' @_hash['contact'] = 'contact' @_hash end |
.nullables ⇒ Object
An array for nullable fields
51 52 53 |
# File 'lib/logalty_certificate_issuance_api_certy/models/resend_request.rb', line 51 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
43 44 45 46 47 48 |
# File 'lib/logalty_certificate_issuance_api_certy/models/resend_request.rb', line 43 def self.optionals %w[ notice_method contact ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/logalty_certificate_issuance_api_certy/models/resend_request.rb', line 89 def self.validate(value) if value.instance_of? self return APIHelper.valid_type?(value.operation, ->(val) { val.instance_of? String }) end return false unless value.instance_of? Hash APIHelper.valid_type?(value['operation'], ->(val) { val.instance_of? String }) end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
109 110 111 112 113 |
# File 'lib/logalty_certificate_issuance_api_certy/models/resend_request.rb', line 109 def inspect class_name = self.class.name.split('::').last "<#{class_name} operation: #{@operation.inspect}, notice_method: #{@notice_method.inspect},"\ " contact: #{@contact.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
102 103 104 105 106 |
# File 'lib/logalty_certificate_issuance_api_certy/models/resend_request.rb', line 102 def to_s class_name = self.class.name.split('::').last "<#{class_name} operation: #{@operation}, notice_method: #{@notice_method}, contact:"\ " #{@contact}, additional_properties: #{@additional_properties}>" end |