Class: ThePlaidApi::ItemProductsTerminateReasonCode

Inherits:
Object
  • Object
show all
Defined in:
lib/the_plaid_api/models/item_products_terminate_reason_code.rb

Overview

The reason for terminating products on the Item. ‘OTHER`: Any other reason for terminating products not covered by the above categories

Constant Summary collapse

ITEM_PRODUCTS_TERMINATE_REASON_CODE =
[
  # TODO: Write general description for OTHER
  OTHER = 'OTHER'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = OTHER) ⇒ Object



21
22
23
24
25
# File 'lib/the_plaid_api/models/item_products_terminate_reason_code.rb', line 21

def self.from_value(value, default_value = OTHER)
  return default_value if value.nil?

  default_value
end

.validate(value) ⇒ Object



15
16
17
18
19
# File 'lib/the_plaid_api/models/item_products_terminate_reason_code.rb', line 15

def self.validate(value)
  return false if value.nil?

  ITEM_PRODUCTS_TERMINATE_REASON_CODE.include?(value)
end