class Io::Flow::V0::Models::OrderInformationFlow

Attributes

billing_address[R]
order_number[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52352
def initialize(incoming={})
  super(:type => OrderInformation::Types::ORDER_INFORMATION_FLOW)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:order_number], 'OrderInformationFlow')
  @order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
  @billing_address = (x = opts.delete(:billing_address); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PaymentAddressBilling) ? x : ::Io::Flow::V0::Models::PaymentAddressBilling.new(x)))
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52364
def copy(incoming={})
  OrderInformationFlow.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
subtype_to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52368
def subtype_to_hash
  {
    :order_number => order_number,
    :billing_address => billing_address.nil? ? nil : billing_address.to_hash
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 52360
def to_json
  JSON.dump(to_hash)
end