Class: LogaltyCertificateIssuanceApiCerty::TransactionStatus
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- LogaltyCertificateIssuanceApiCerty::TransactionStatus
- Defined in:
- lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb
Overview
TransactionStatus Model.
Instance Attribute Summary collapse
-
#activation_url ⇒ String
URL to access the certificate activation process.
-
#cert_id ⇒ String
Unique certificate identifier in Logalty.
-
#code ⇒ UUID | String
Transaction’s unique identifier in Logalty (UUIDv4 format).
-
#core_cancel_code ⇒ CancellationCode
Cancellation code provided by the end-user: - ‘OPTION_ZERO`: No reason indicated.
-
#core_cancel_reason ⇒ String
Free-text reason for cancellation.
-
#created ⇒ Integer
Transaction creation date in epoch (milliseconds) format.
-
#external_id ⇒ String
Unique identifier in the client system external to Logalty.
-
#profile_data ⇒ Profile
Transaction creation date in epoch (milliseconds) format.
-
#result ⇒ TransactionResult
Transaction result: - ‘7`: COMPLETED — Process completed and certificate generated.
-
#result_date ⇒ Integer
Result date in epoch format.
-
#state ⇒ TransactionState
Transaction state: - ‘0`: CREATED — Transaction created.
-
#state_date ⇒ Integer
Date of last status change in epoch format.
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(code: SKIP, cert_id: SKIP, created: SKIP, profile_data: SKIP, external_id: SKIP, state: SKIP, state_date: SKIP, result: SKIP, result_date: SKIP, core_cancel_code: SKIP, core_cancel_reason: SKIP, activation_url: SKIP, additional_properties: nil) ⇒ TransactionStatus
constructor
A new instance of TransactionStatus.
-
#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(code: SKIP, cert_id: SKIP, created: SKIP, profile_data: SKIP, external_id: SKIP, state: SKIP, state_date: SKIP, result: SKIP, result_date: SKIP, core_cancel_code: SKIP, core_cancel_reason: SKIP, activation_url: SKIP, additional_properties: nil) ⇒ TransactionStatus
Returns a new instance of TransactionStatus.
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 146 def initialize(code: SKIP, cert_id: SKIP, created: SKIP, profile_data: SKIP, external_id: SKIP, state: SKIP, state_date: SKIP, result: SKIP, result_date: SKIP, core_cancel_code: SKIP, core_cancel_reason: SKIP, activation_url: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @code = code unless code == SKIP @cert_id = cert_id unless cert_id == SKIP @created = created unless created == SKIP @profile_data = profile_data unless profile_data == SKIP @external_id = external_id unless external_id == SKIP @state = state unless state == SKIP @state_date = state_date unless state_date == SKIP @result = result unless result == SKIP @result_date = result_date unless result_date == SKIP @core_cancel_code = core_cancel_code unless core_cancel_code == SKIP @core_cancel_reason = core_cancel_reason unless core_cancel_reason == SKIP @activation_url = activation_url unless activation_url == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#activation_url ⇒ String
URL to access the certificate activation process.
103 104 105 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 103 def activation_url @activation_url end |
#cert_id ⇒ String
Unique certificate identifier in Logalty.
18 19 20 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 18 def cert_id @cert_id end |
#code ⇒ UUID | String
Transaction’s unique identifier in Logalty (UUIDv4 format).
14 15 16 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 14 def code @code end |
#core_cancel_code ⇒ CancellationCode
Cancellation code provided by the end-user:
-
‘OPTION_ZERO`: No reason indicated.
-
‘USER_MOBILE_CHANGED`: User changed their phone number.
-
‘SMS_NOT_RECEIVED`: User did not receive the SMS.
-
‘USER_NO_TOKENS_AVAILABLE`: User does not have a cell phone.
-
‘TECHNICAL_PROBLEMS`: Technical problems reported by the user.
-
‘RCPT_INVALID`: Transaction not directed at the user.
-
‘SENDER_UNKNOWN`: User does not know the sender.
-
‘USER_DATA_INVALID`: User data is incorrect.
-
‘DOCUMENT_DATA_INVALID`: Documentation is incorrect.
-
‘OTHER_REASONS`: Other problems.
-
‘NOT_DOCUMENT_AGREE`: User does not agree with the documentation.
95 96 97 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 95 def core_cancel_code @core_cancel_code end |
#core_cancel_reason ⇒ String
Free-text reason for cancellation.
99 100 101 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 99 def core_cancel_reason @core_cancel_reason end |
#created ⇒ Integer
Transaction creation date in epoch (milliseconds) format.
22 23 24 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 22 def created @created end |
#external_id ⇒ String
Unique identifier in the client system external to Logalty.
30 31 32 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 30 def external_id @external_id end |
#profile_data ⇒ Profile
Transaction creation date in epoch (milliseconds) format.
26 27 28 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 26 def profile_data @profile_data end |
#result ⇒ TransactionResult
Transaction result:
-
‘7`: COMPLETED — Process completed and certificate generated.
-
‘8`: USER_REJECT — End-user rejected the process.
-
‘9901`: ERROR_SENDING_ACCESS — Error sending the access notification.
-
‘9910`: ERROR_CERTIFICATE_CONTRACT_SIGNATURE — Error in the signature of
the issuance contract.
-
‘9911`: ERROR_CERTIFICATE_CONTRACT_IDENTIFICATION — Error identifying
the user during contract signing.
-
‘9912`: ERROR_CERTIFICATE_VALIDATION_REJECTED — Validation rejected by
the video operator.
-
‘9913`: ERROR_CERTIFICATE_ISSUING_REJECTED — Issuance rejected by the RA
operator.
-
‘9914`: ERROR_CERTIFICATE_ACTIVATION — Certificate activation error.
-
‘99906`: TIME_EXPIRED — Transaction closed due to expired time.
-
‘99908`: OCR_FAILED — OCR validation exceeded.
-
‘99909`: OCR_FAILED — Maximum number of validation attempts exceeded
(permissive).
-
‘99910`: DNI_WITHOUT_CHIP — DNI does not have chip or is not readable.
-
‘99915`: TIME_AUTH_EXPIRED — Time for authorization exceeded.
-
‘99932`: CLOSED_BY_REMITANCE — Transaction cancelled by the customer.
-
‘99940`: DELETED_BY_SENDER — Reserved status.
-
‘99945`: ERROR_ID_NUMBER — Error in the identification number.
-
‘99990`: CLOSED_BY_MAINTENANCE — Reserved status.
76 77 78 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 76 def result @result end |
#result_date ⇒ Integer
Result date in epoch format.
80 81 82 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 80 def result_date @result_date end |
#state ⇒ TransactionState
Transaction state:
-
‘0`: CREATED — Transaction created.
-
‘1`: ACCESS_SENT — Access notification sent.
-
‘10`: PENDING_CERTIFICATE_CONTRACT_SIGNATURE — Pending signature of the
certificate issuance contract.
-
‘11`: PENDING_CERTIFICATE_VALIDATION — Pending validation by the video
operator.
-
‘12`: CLOSED — Transaction closed.
-
‘13`: PENDING_CERTIFICATE_ISSUING — Pending issuance by the RA operator.
-
‘14`: PENDING_CERTIFICATE_ACTIVATION — Pending certificate activation by
the end-user.
-
‘15`: PENDING_CERTIFICATE_DOWNLOAD — Pending certificate download by the
end-user (software support only).
46 47 48 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 46 def state @state end |
#state_date ⇒ Integer
Date of last status change in epoch format.
50 51 52 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 50 def state_date @state_date end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 170 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. code = hash.key?('code') ? hash['code'] : SKIP cert_id = hash.key?('certId') ? hash['certId'] : SKIP created = hash.key?('created') ? hash['created'] : SKIP profile_data = Profile.from_hash(hash['profileData']) if hash['profileData'] external_id = hash.key?('externalId') ? hash['externalId'] : SKIP state = hash.key?('state') ? hash['state'] : SKIP state_date = hash.key?('stateDate') ? hash['stateDate'] : SKIP result = hash.key?('result') ? hash['result'] : SKIP result_date = hash.key?('resultDate') ? hash['resultDate'] : SKIP core_cancel_code = hash.key?('coreCancelCode') ? hash['coreCancelCode'] : SKIP core_cancel_reason = hash.key?('coreCancelReason') ? hash['coreCancelReason'] : SKIP activation_url = hash.key?('activationUrl') ? hash['activationUrl'] : 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. TransactionStatus.new(code: code, cert_id: cert_id, created: created, profile_data: profile_data, external_id: external_id, state: state, state_date: state_date, result: result, result_date: result_date, core_cancel_code: core_cancel_code, core_cancel_reason: core_cancel_reason, activation_url: activation_url, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 106 def self.names @_hash = {} if @_hash.nil? @_hash['code'] = 'code' @_hash['cert_id'] = 'certId' @_hash['created'] = 'created' @_hash['profile_data'] = 'profileData' @_hash['external_id'] = 'externalId' @_hash['state'] = 'state' @_hash['state_date'] = 'stateDate' @_hash['result'] = 'result' @_hash['result_date'] = 'resultDate' @_hash['core_cancel_code'] = 'coreCancelCode' @_hash['core_cancel_reason'] = 'coreCancelReason' @_hash['activation_url'] = 'activationUrl' @_hash end |
.nullables ⇒ Object
An array for nullable fields
142 143 144 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 142 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 124 def self.optionals %w[ code cert_id created profile_data external_id state state_date result result_date core_cancel_code core_cancel_reason activation_url ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
223 224 225 226 227 228 229 230 231 232 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 223 def inspect class_name = self.class.name.split('::').last "<#{class_name} code: #{@code.inspect}, cert_id: #{@cert_id.inspect}, created:"\ " #{@created.inspect}, profile_data: #{@profile_data.inspect}, external_id:"\ " #{@external_id.inspect}, state: #{@state.inspect}, state_date: #{@state_date.inspect},"\ " result: #{@result.inspect}, result_date: #{@result_date.inspect}, core_cancel_code:"\ " #{@core_cancel_code.inspect}, core_cancel_reason: #{@core_cancel_reason.inspect},"\ " activation_url: #{@activation_url.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
213 214 215 216 217 218 219 220 |
# File 'lib/logalty_certificate_issuance_api_certy/models/transaction_status.rb', line 213 def to_s class_name = self.class.name.split('::').last "<#{class_name} code: #{@code}, cert_id: #{@cert_id}, created: #{@created}, profile_data:"\ " #{@profile_data}, external_id: #{@external_id}, state: #{@state}, state_date:"\ " #{@state_date}, result: #{@result}, result_date: #{@result_date}, core_cancel_code:"\ " #{@core_cancel_code}, core_cancel_reason: #{@core_cancel_reason}, activation_url:"\ " #{@activation_url}, additional_properties: #{@additional_properties}>" end |