Class: Io::Flow::V0::Models::OrderIdentifierForm

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ OrderIdentifierForm

Returns a new instance of OrderIdentifierForm.



24994
24995
24996
24997
24998
24999
25000
25001
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24994

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:order], 'OrderIdentifierForm')
  @order = HttpClient::Preconditions.assert_class('order', opts.delete(:order), String)
  @identifier = (x = opts.delete(:identifier); x.nil? ? nil : HttpClient::Preconditions.assert_class('identifier', x, String))
  @number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String))
  @primary = (x = opts.delete(:primary); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('primary', x))
end

Instance Attribute Details

#identifierObject (readonly)

Returns the value of attribute identifier.



24992
24993
24994
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24992

def identifier
  @identifier
end

#numberObject (readonly)

Returns the value of attribute number.



24992
24993
24994
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24992

def number
  @number
end

#orderObject (readonly)

Returns the value of attribute order.



24992
24993
24994
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24992

def order
  @order
end

#primaryObject (readonly)

Returns the value of attribute primary.



24992
24993
24994
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24992

def primary
  @primary
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



25007
25008
25009
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25007

def copy(incoming={})
  OrderIdentifierForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



25011
25012
25013
25014
25015
25016
25017
25018
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25011

def to_hash
  {
    :order => order,
    :identifier => identifier,
    :number => number,
    :primary => primary
  }
end

#to_jsonObject



25003
25004
25005
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25003

def to_json
  JSON.dump(to_hash)
end