Class: Io::Flow::V0::Models::OrderInformationFlow
- Inherits:
-
OrderInformation
- Object
- OrderInformation
- Io::Flow::V0::Models::OrderInformationFlow
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#billing_address ⇒ Object
readonly
Returns the value of attribute billing_address.
-
#order_number ⇒ Object
readonly
Returns the value of attribute order_number.
Attributes inherited from OrderInformation
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderInformationFlow
constructor
A new instance of OrderInformationFlow.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from OrderInformation
Constructor Details
#initialize(incoming = {}) ⇒ OrderInformationFlow
Returns a new instance of OrderInformationFlow.
48479 48480 48481 48482 48483 48484 48485 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48479 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 |
Instance Attribute Details
#billing_address ⇒ Object (readonly)
Returns the value of attribute billing_address.
48477 48478 48479 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48477 def billing_address @billing_address end |
#order_number ⇒ Object (readonly)
Returns the value of attribute order_number.
48477 48478 48479 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48477 def order_number @order_number end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
48491 48492 48493 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48491 def copy(incoming={}) OrderInformationFlow.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
48495 48496 48497 48498 48499 48500 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48495 def subtype_to_hash { :order_number => order_number, :billing_address => billing_address.nil? ? nil : billing_address.to_hash } end |
#to_json ⇒ Object
48487 48488 48489 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 48487 def to_json JSON.dump(to_hash) end |