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.



39768
39769
39770
39771
39772
39773
39774
39775
39776
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39768

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)
  @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, 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.



39766
39767
39768
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39766

def identifier
  @identifier
end

#nameObject (readonly)

Returns the value of attribute name.



39766
39767
39768
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39766

def name
  @name
end

#numberObject (readonly)

Returns the value of attribute number.



39766
39767
39768
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39766

def number
  @number
end

#orderObject (readonly)

Returns the value of attribute order.



39766
39767
39768
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39766

def order
  @order
end

#primaryObject (readonly)

Returns the value of attribute primary.



39766
39767
39768
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39766

def primary
  @primary
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



39782
39783
39784
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39782

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

#to_hashObject



39786
39787
39788
39789
39790
39791
39792
39793
39794
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39786

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

#to_jsonObject



39778
39779
39780
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 39778

def to_json
  JSON.dump(to_hash)
end