class Io::Flow::V0::Models::TransitWindow
Attributes
destination_country[R]
from[R]
origin_country[R]
to[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 72019 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:origin_country, :destination_country, :from, :to], 'TransitWindow') @origin_country = HttpClient::Preconditions.assert_class('origin_country', opts.delete(:origin_country), String) @destination_country = HttpClient::Preconditions.assert_class('destination_country', opts.delete(:destination_country), String) @from = HttpClient::Preconditions.assert_class('from', opts.delete(:from), Integer) @to = HttpClient::Preconditions.assert_class('to', opts.delete(:to), Integer) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 72032 def copy(incoming={}) TransitWindow.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 72036 def to_hash { :origin_country => origin_country, :destination_country => destination_country, :from => from, :to => to } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 72028 def to_json JSON.dump(to_hash) end