Class: ThePlaidApi::ConsumerReportCategory
- Inherits:
-
Object
- Object
- ThePlaidApi::ConsumerReportCategory
- Defined in:
- lib/the_plaid_api/models/consumer_report_category.rb
Overview
Type of data being disputed by the consumer
Constant Summary collapse
- CONSUMER_REPORT_CATEGORY =
[ # TODO: Write general description for TRANSACTION TRANSACTION = 'TRANSACTION'.freeze, # TODO: Write general description for BALANCE BALANCE = 'BALANCE'.freeze, # TODO: Write general description for IDENTITY IDENTITY = 'IDENTITY'.freeze, # TODO: Write general description for OTHER OTHER = 'OTHER'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = TRANSACTION) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/the_plaid_api/models/consumer_report_category.rb', line 29 def self.from_value(value, default_value = TRANSACTION) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'transaction' then TRANSACTION when 'balance' then BALANCE when 'identity' then IDENTITY when 'other' then OTHER else default_value end end |
.validate(value) ⇒ Object
23 24 25 26 27 |
# File 'lib/the_plaid_api/models/consumer_report_category.rb', line 23 def self.validate(value) return false if value.nil? CONSUMER_REPORT_CATEGORY.include?(value) end |