class Io::Flow::V0::Models::OrderNumberGeneratorDefaults

Attributes

min_hex_length[R]
min_starts_with[R]
starts_with[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52381
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @starts_with = HttpClient::Preconditions.assert_class('starts_with', (x = opts.delete(:starts_with); x.nil? ? 1001 : x), Integer)
  @min_hex_length = HttpClient::Preconditions.assert_class('min_hex_length', (x = opts.delete(:min_hex_length); x.nil? ? 6 : x), Integer)
  @min_starts_with = HttpClient::Preconditions.assert_class('min_starts_with', (x = opts.delete(:min_starts_with); x.nil? ? 1 : x), Integer)
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52392
def copy(incoming={})
  OrderNumberGeneratorDefaults.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52396
def to_hash
  {
    :starts_with => starts_with,
    :min_hex_length => min_hex_length,
    :min_starts_with => min_starts_with
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52388
def to_json
  JSON.dump(to_hash)
end