class Io::Flow::V0::Models::OrderNumberGeneratorUuid

Generates an order number based on a UUID (no dashes or other formatting). This is the default for Flow orders (with order number prefixed by ord-)

Attributes

prefix[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52529
def initialize(incoming={})
  super(:discriminator => OrderNumberGenerator::Types::ORDER_NUMBER_GENERATOR_UUID)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @prefix = HttpClient::Preconditions.assert_class('prefix', (x = opts.delete(:prefix); x.nil? ? "ord-" : x), String)
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52539
def copy(incoming={})
  OrderNumberGeneratorUuid.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
subtype_to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52543
def subtype_to_hash
  {
    :prefix => prefix
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52535
def to_json
  JSON.dump(to_hash)
end