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.
46379 46380 46381 46382 46383 46384 46385 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46379 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.
46377 46378 46379 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46377 def billing_address @billing_address end |
#order_number ⇒ Object (readonly)
Returns the value of attribute order_number.
46377 46378 46379 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46377 def order_number @order_number end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
46391 46392 46393 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46391 def copy(incoming={}) OrderInformationFlow.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
46395 46396 46397 46398 46399 46400 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46395 def subtype_to_hash { :order_number => order_number, :billing_address => billing_address.nil? ? nil : billing_address.to_hash } end |
#to_json ⇒ Object
46387 46388 46389 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46387 def to_json JSON.dump(to_hash) end |