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.



35979
35980
35981
35982
35983
35984
35985
35986
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35979

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.



35977
35978
35979
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35977

def identifier
  @identifier
end

#numberObject (readonly)

Returns the value of attribute number.



35977
35978
35979
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35977

def number
  @number
end

#orderObject (readonly)

Returns the value of attribute order.



35977
35978
35979
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35977

def order
  @order
end

#primaryObject (readonly)

Returns the value of attribute primary.



35977
35978
35979
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35977

def primary
  @primary
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



35992
35993
35994
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35992

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

#to_hashObject



35996
35997
35998
35999
36000
36001
36002
36003
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35996

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

#to_jsonObject



35988
35989
35990
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35988

def to_json
  JSON.dump(to_hash)
end