class Io::Flow::V0::Models::RepeatWeekly
Attributes
days_of_week[R]
interval[R]
Public Class Methods
new(incoming={})
click to toggle source
Calls superclass method
Io::Flow::V0::Models::RepeatSchedule::new
# File lib/flow_commerce/flow_api_v0_client.rb, line 63701 def initialize(incoming={}) super(:discriminator => RepeatSchedule::Types::REPEAT_WEEKLY) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:interval, :days_of_week], 'RepeatWeekly') @interval = HttpClient::Preconditions.assert_class('interval', opts.delete(:interval), Integer) @days_of_week = HttpClient::Preconditions.assert_class('days_of_week', opts.delete(:days_of_week), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::DayOfWeek) ? x : ::Io::Flow::V0::Models::DayOfWeek.apply(x)) } end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 63713 def copy(incoming={}) RepeatWeekly.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
subtype_to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 63717 def subtype_to_hash { :interval => interval, :days_of_week => days_of_week.map { |o| o.value } } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 63709 def to_json JSON.dump(to_hash) end