Class: Bayarcash::Fpx
- Inherits:
-
Object
- Object
- Bayarcash::Fpx
- Defined in:
- lib/bayarcash/fpx.rb
Overview
FPX transaction status codes and their human-readable labels.
Constant Summary collapse
- STATUS_NEW =
0- STATUS_PENDING =
1- STATUS_FAILED =
2- STATUS_SUCCESS =
3- STATUS_CANCELLED =
4- STATUS_LABELS =
{ STATUS_NEW => "New", STATUS_PENDING => "Pending", STATUS_CANCELLED => "Cancelled", STATUS_SUCCESS => "Successful", STATUS_FAILED => "Failed" }.freeze
Class Method Summary collapse
-
.get_status_text(status_code) ⇒ String
Label for the status, or "UNKNOWN STATUS".
Class Method Details
.get_status_text(status_code) ⇒ String
Returns label for the status, or "UNKNOWN STATUS".
22 23 24 |
# File 'lib/bayarcash/fpx.rb', line 22 def self.get_status_text(status_code) STATUS_LABELS.fetch(status_code.to_i, "UNKNOWN STATUS") end |