class Io::Flow::V0::Models::RepeatMonthly

Monthly on the {day} of each {interval} month. Note if you specify a day > 28 and the month does not have that day, the repeat schedule is assumed to be the last day of the month. Common examples are: Monthly on the 1st, monthly on the 15th and 31st, every 3 months on the 1st, etc.

Attributes

days[R]
interval[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 63672
def initialize(incoming={})
  super(:discriminator => RepeatSchedule::Types::REPEAT_MONTHLY)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:interval, :days], 'RepeatMonthly')
  @interval = HttpClient::Preconditions.assert_class('interval', opts.delete(:interval), Integer)
  @days = HttpClient::Preconditions.assert_class('days', opts.delete(:days), Array).map { |v| HttpClient::Preconditions.assert_class('days', v, Integer) }
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 63684
def copy(incoming={})
  RepeatMonthly.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 63688
def subtype_to_hash
  {
    :interval => interval,
    :days => days
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 63680
def to_json
  JSON.dump(to_hash)
end