Module: GlobalCollect::Const::PaymentStatus

Defined in:
lib/global_collect/const/payment_status.rb

Defined Under Namespace

Classes: Status

Class Method Summary collapse

Class Method Details

.from_code(code) ⇒ Object



3
4
5
# File 'lib/global_collect/const/payment_status.rb', line 3

def self.from_code(code)
  info(code.to_i)
end

.from_name(name) ⇒ Object



7
8
9
10
# File 'lib/global_collect/const/payment_status.rb', line 7

def self.from_name(name)
  code, strings = STATUSES.detect{|k,v| v.first == name }
  info(code) if code
end