Class: TurnkeyClient::PayloadEncoding

Inherits:
Object
  • Object
show all
Defined in:
lib/turnkey_client/models/payload_encoding.rb

Constant Summary collapse

HEXADECIMAL =
'PAYLOAD_ENCODING_HEXADECIMAL'.freeze
TEXT_UTF8 =
'PAYLOAD_ENCODING_TEXT_UTF8'.freeze

Instance Method Summary collapse

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string



21
22
23
24
25
# File 'lib/turnkey_client/models/payload_encoding.rb', line 21

def build_from_hash(value)
  constantValues = PayloadEncoding.constants.select { |c| PayloadEncoding::const_get(c) == value }
  raise "Invalid ENUM value #{value} for class #PayloadEncoding" if constantValues.empty?
  value
end