Class: Io::Flow::V0::Models::RatecardEstimateSummaryForm

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ RatecardEstimateSummaryForm

Returns a new instance of RatecardEstimateSummaryForm.



46128
46129
46130
46131
46132
46133
46134
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46128

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @origin = (x = opts.delete(:origin); x.nil? ? nil : HttpClient::Preconditions.assert_class('origin', x, String))
  @destination = (x = opts.delete(:destination); x.nil? ? nil : HttpClient::Preconditions.assert_class('destination', x, String))
  @service = (x = opts.delete(:service); x.nil? ? nil : HttpClient::Preconditions.assert_class('service', x, String))
  @center_key = (x = opts.delete(:center_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('center_key', x, String))
end

Instance Attribute Details

#center_keyObject (readonly)

Returns the value of attribute center_key.



46126
46127
46128
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46126

def center_key
  @center_key
end

#destinationObject (readonly)

Returns the value of attribute destination.



46126
46127
46128
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46126

def destination
  @destination
end

#originObject (readonly)

Returns the value of attribute origin.



46126
46127
46128
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46126

def origin
  @origin
end

#serviceObject (readonly)

Returns the value of attribute service.



46126
46127
46128
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46126

def service
  @service
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



46140
46141
46142
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46140

def copy(incoming={})
  RatecardEstimateSummaryForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



46144
46145
46146
46147
46148
46149
46150
46151
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46144

def to_hash
  {
    :origin => origin,
    :destination => destination,
    :service => service,
    :center_key => center_key
  }
end

#to_jsonObject



46136
46137
46138
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 46136

def to_json
  JSON.dump(to_hash)
end