Class: Io::Flow::V0::Models::OnboardingMerchantPickupWindow
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OnboardingMerchantPickupWindow
- 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 = {}) ⇒ OnboardingMerchantPickupWindow
constructor
A new instance of OnboardingMerchantPickupWindow.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OnboardingMerchantPickupWindow
Returns a new instance of OnboardingMerchantPickupWindow.
50783 50784 50785 50786 50787 50788 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50783 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:from, :to], 'OnboardingMerchantPickupWindow') @from = (x = opts.delete(:from); x.is_a?(::Io::Flow::V0::Models::OnboardingMerchantTime) ? x : ::Io::Flow::V0::Models::OnboardingMerchantTime.new(x)) @to = (x = opts.delete(:to); x.is_a?(::Io::Flow::V0::Models::OnboardingMerchantTime) ? x : ::Io::Flow::V0::Models::OnboardingMerchantTime.new(x)) end |
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
50781 50782 50783 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50781 def from @from end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
50781 50782 50783 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50781 def to @to end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
50794 50795 50796 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50794 def copy(incoming={}) OnboardingMerchantPickupWindow.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
50798 50799 50800 50801 50802 50803 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50798 def to_hash { :from => from.to_hash, :to => to.to_hash } end |
#to_json ⇒ Object
50790 50791 50792 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50790 def to_json JSON.dump(to_hash) end |