class Io::Flow::V0::Models::PriceBookStatus

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 25180
def PriceBookStatus.ALL
  @@all ||= [PriceBookStatus.draft, PriceBookStatus.published, PriceBookStatus.archived]
end
apply(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 25165
def PriceBookStatus.apply(value)
  if value.instance_of?(PriceBookStatus)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || PriceBookStatus.new(value))
  end
end
archived() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 25192
def PriceBookStatus.archived
  @@_archived ||= PriceBookStatus.new('archived')
end
draft() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 25184
def PriceBookStatus.draft
  @@_draft ||= PriceBookStatus.new('draft')
end
from_string(value) click to toggle source

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

# File lib/flow_commerce/flow_api_v0_client.rb, line 25175
def PriceBookStatus.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  PriceBookStatus.ALL.find { |v| v.value == value }
end
new(value) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 25160
def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end
published() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 25188
def PriceBookStatus.published
  @@_published ||= PriceBookStatus.new('published')
end

Public Instance Methods

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