Class: ApimaticApi::Accept

Inherits:
Object
  • Object
show all
Defined in:
lib/apimatic_api/models/accept.rb

Overview

Accept.

Constant Summary collapse

ACCEPT =
[
  # TODO: Write general description for ENUM_APPLICATIONJSON
  ENUM_APPLICATIONJSON = 'application/json'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = ENUM_APPLICATIONJSON) ⇒ Object



20
21
22
23
24
# File 'lib/apimatic_api/models/accept.rb', line 20

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

  default_value
end

.validate(value) ⇒ Object



14
15
16
17
18
# File 'lib/apimatic_api/models/accept.rb', line 14

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

  ACCEPT.include?(value)
end