Class: CcipDirectoryAndConfigurationRestApiV1::PoolType

Inherits:
Object
  • Object
show all
Defined in:
lib/ccip_directory_and_configuration_rest_api_v1/models/pool_type.rb

Overview

Type of pool for this token

Constant Summary collapse

POOL_TYPE =
[
  # TODO: Write general description for LOCKRELEASE
  LOCKRELEASE = 'lockRelease'.freeze,

  # TODO: Write general description for BURNMINT
  BURNMINT = 'burnMint'.freeze,

  # TODO: Write general description for USDC
  USDC = 'usdc'.freeze,

  # TODO: Write general description for FEETOKENONLY
  FEETOKENONLY = 'feeTokenOnly'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = LOCKRELEASE) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/pool_type.rb', line 29

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

  str = value.to_s.strip

  case str.downcase
  when 'lockrelease' then LOCKRELEASE
  when 'burnmint' then BURNMINT
  when 'usdc' then USDC
  when 'feetokenonly' then FEETOKENONLY
  else
    default_value
  end
end

.validate(value) ⇒ Object



23
24
25
26
27
# File 'lib/ccip_directory_and_configuration_rest_api_v1/models/pool_type.rb', line 23

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

  POOL_TYPE.include?(value)
end