class Io::Flow::V0::Models::PriceBookItemSchedule
Represents schedule applied to a price book item
Attributes
ends_at[R]
starts_at[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 60155 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:starts_at], 'PriceBookItemSchedule') @starts_at = HttpClient::Preconditions.assert_class('starts_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:starts_at)), DateTime) @ends_at = (x = opts.delete(:ends_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('ends_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 60166 def copy(incoming={}) PriceBookItemSchedule.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 60170 def to_hash { :starts_at => starts_at, :ends_at => ends_at } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 60162 def to_json JSON.dump(to_hash) end