Class: Io::Flow::V0::Models::ShippingLaneForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ShippingLaneForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ShippingLaneForm
constructor
A new instance of ShippingLaneForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ShippingLaneForm
Returns a new instance of ShippingLaneForm.
38918 38919 38920 38921 38922 38923 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38918 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:from, :to], 'ShippingLaneForm') @from = HttpClient::Preconditions.assert_class('from', opts.delete(:from), String) @to = HttpClient::Preconditions.assert_class('to', opts.delete(:to), String) end |
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
38916 38917 38918 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38916 def from @from end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
38916 38917 38918 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38916 def to @to end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
38929 38930 38931 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38929 def copy(incoming={}) ShippingLaneForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
38933 38934 38935 38936 38937 38938 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38933 def to_hash { :from => from, :to => to } end |
#to_json ⇒ Object
38925 38926 38927 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38925 def to_json JSON.dump(to_hash) end |