class Io::Flow::V0::Models::TradeAgreementStatus

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 27958
def TradeAgreementStatus.ALL
  @@all ||= [TradeAgreementStatus.supported, TradeAgreementStatus.not_supported]
end
apply(value) click to toggle source

Returns the instance of TradeAgreementStatus for this value, creating a new instance for an unknown value

# File lib/flow_commerce/flow_api_v0_client.rb, line 27943
def TradeAgreementStatus.apply(value)
  if value.instance_of?(TradeAgreementStatus)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || TradeAgreementStatus.new(value))
  end
end
from_string(value) click to toggle source

Returns the instance of TradeAgreementStatus for this value, or nil if not found

# File lib/flow_commerce/flow_api_v0_client.rb, line 27953
def TradeAgreementStatus.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  TradeAgreementStatus.ALL.find { |v| v.value == value }
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 27938
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
not_supported() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 27966
def TradeAgreementStatus.not_supported
  @@_not_supported ||= TradeAgreementStatus.new('not_supported')
end
supported() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 27962
def TradeAgreementStatus.supported
  @@_supported ||= TradeAgreementStatus.new('supported')
end

Public Instance Methods

to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 27970
def to_hash
  value
end