class Io::Flow::V0::Models::DatetimeWithTimezone

Attributes

datetime[R]
timezone[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 38801
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:datetime, :timezone], 'DatetimeWithTimezone')
  @datetime = HttpClient::Preconditions.assert_class('datetime', HttpClient::Helper.to_date_time_iso8601(opts.delete(:datetime)), DateTime)
  @timezone = HttpClient::Preconditions.assert_class('timezone', opts.delete(:timezone), String)
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 38812
def copy(incoming={})
  DatetimeWithTimezone.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 38816
def to_hash
  {
    :datetime => datetime,
    :timezone => timezone
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 38808
def to_json
  JSON.dump(to_hash)
end