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.
52352 52353 52354 52355 52356 52357 52358 |
# 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 |
Instance Attribute Details
#billing_address ⇒ Object (readonly)
Returns the value of attribute billing_address.
52350 52351 52352 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52350 def billing_address @billing_address end |
#order_number ⇒ Object (readonly)
Returns the value of attribute order_number.
52350 52351 52352 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52350 def order_number @order_number end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
52364 52365 52366 |
# 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 ⇒ Object
52368 52369 52370 52371 52372 52373 |
# 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 ⇒ Object
52360 52361 52362 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52360 def to_json JSON.dump(to_hash) end |