Class: FdxV660Api::AccountStatus
- Inherits:
-
Object
- Object
- FdxV660Api::AccountStatus
- Defined in:
- lib/fdx_v660_api/models/account_status.rb
Overview
The status of an account
Constant Summary collapse
- ACCOUNT_STATUS =
[ # TODO: Write general description for CLOSED CLOSED = 'CLOSED'.freeze, # TODO: Write general description for DELINQUENT DELINQUENT = 'DELINQUENT'.freeze, # TODO: Write general description for NEGATIVECURRENTBALANCE NEGATIVECURRENTBALANCE = 'NEGATIVECURRENTBALANCE'.freeze, # TODO: Write general description for OPEN OPEN = 'OPEN'.freeze, # TODO: Write general description for PAID PAID = 'PAID'.freeze, # TODO: Write general description for PENDINGCLOSE PENDINGCLOSE = 'PENDINGCLOSE'.freeze, # TODO: Write general description for PENDINGOPEN PENDINGOPEN = 'PENDINGOPEN'.freeze, # TODO: Write general description for RESTRICTED RESTRICTED = 'RESTRICTED'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = CLOSED) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/fdx_v660_api/models/account_status.rb', line 41 def self.from_value(value, default_value = CLOSED) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'closed' then CLOSED when 'delinquent' then DELINQUENT when 'negativecurrentbalance' then NEGATIVECURRENTBALANCE when 'open' then OPEN when 'paid' then PAID when 'pendingclose' then PENDINGCLOSE when 'pendingopen' then PENDINGOPEN when 'restricted' then RESTRICTED else default_value end end |
.validate(value) ⇒ Object
35 36 37 38 39 |
# File 'lib/fdx_v660_api/models/account_status.rb', line 35 def self.validate(value) return false if value.nil? true end |