class Io::Flow::V0::Models::PriceAccuracy

Attributes

value[R]

Public Class Methods

ALL() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 25134
def PriceAccuracy.ALL
  @@all ||= [PriceAccuracy.calculated, PriceAccuracy.estimated_from_partial_destination]
end
apply(value) click to toggle source

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

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

The price shown is accurate and will not change unless information already provided also changes.

# File lib/flow_commerce/flow_api_v0_client.rb, line 25140
def PriceAccuracy.calculated
  @@_calculated ||= PriceAccuracy.new('calculated')
end
estimated_from_partial_destination() click to toggle source

The price shown is based on the best information provided; given a more precise address, the price may change.

# File lib/flow_commerce/flow_api_v0_client.rb, line 25146
def PriceAccuracy.estimated_from_partial_destination
  @@_estimated_from_partial_destination ||= PriceAccuracy.new('estimated_from_partial_destination')
end
from_string(value) click to toggle source

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

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

Public Instance Methods

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