Class: Io::Flow::V0::Models::OnboardingMerchantScheduledPickup
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OnboardingMerchantScheduledPickup
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#day_of_week ⇒ Object
readonly
Returns the value of attribute day_of_week.
-
#instructions ⇒ Object
readonly
Returns the value of attribute instructions.
-
#window ⇒ Object
readonly
Returns the value of attribute window.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OnboardingMerchantScheduledPickup
constructor
A new instance of OnboardingMerchantScheduledPickup.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OnboardingMerchantScheduledPickup
Returns a new instance of OnboardingMerchantScheduledPickup.
50811 50812 50813 50814 50815 50816 50817 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50811 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:day_of_week, :window], 'OnboardingMerchantScheduledPickup') @day_of_week = (x = opts.delete(:day_of_week); x.is_a?(::Io::Flow::V0::Models::DayOfWeek) ? x : ::Io::Flow::V0::Models::DayOfWeek.apply(x)) @window = (x = opts.delete(:window); x.is_a?(::Io::Flow::V0::Models::OnboardingMerchantPickupWindow) ? x : ::Io::Flow::V0::Models::OnboardingMerchantPickupWindow.new(x)) @instructions = (x = opts.delete(:instructions); x.nil? ? nil : HttpClient::Preconditions.assert_class('instructions', x, String)) end |
Instance Attribute Details
#day_of_week ⇒ Object (readonly)
Returns the value of attribute day_of_week.
50809 50810 50811 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50809 def day_of_week @day_of_week end |
#instructions ⇒ Object (readonly)
Returns the value of attribute instructions.
50809 50810 50811 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50809 def instructions @instructions end |
#window ⇒ Object (readonly)
Returns the value of attribute window.
50809 50810 50811 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50809 def window @window end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
50823 50824 50825 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50823 def copy(incoming={}) OnboardingMerchantScheduledPickup.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
50827 50828 50829 50830 50831 50832 50833 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50827 def to_hash { :day_of_week => day_of_week.value, :window => window.to_hash, :instructions => instructions } end |
#to_json ⇒ Object
50819 50820 50821 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50819 def to_json JSON.dump(to_hash) end |