class Io::Flow::V0::Models::OrderSubmissionIdentifierForm

Defines the data needed to attach an identifier to each order created by a checkout.

Attributes

identifier[R]
name[R]
primary[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 54180
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:identifier], 'OrderSubmissionIdentifierForm')
  @identifier = HttpClient::Preconditions.assert_class('identifier', opts.delete(:identifier), String)
  @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
  @primary = (x = opts.delete(:primary); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('primary', x))
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 54192
def copy(incoming={})
  OrderSubmissionIdentifierForm.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 54196
def to_hash
  {
    :identifier => identifier,
    :name => name,
    :primary => primary
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 54188
def to_json
  JSON.dump(to_hash)
end