Class: Io::Flow::V0::Models::RatecardLanesImportRequestData

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 = {}) ⇒ RatecardLanesImportRequestData

Returns a new instance of RatecardLanesImportRequestData.



43917
43918
43919
43920
43921
43922
43923
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43917

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:id, :source_url], 'RatecardLanesImportRequestData')
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
  @source_url = HttpClient::Preconditions.assert_class('source_url', opts.delete(:source_url), String)
  @filename = (x = opts.delete(:filename); x.nil? ? nil : HttpClient::Preconditions.assert_class('filename', x, String))
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



43915
43916
43917
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43915

def filename
  @filename
end

#idObject (readonly)

Returns the value of attribute id.



43915
43916
43917
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43915

def id
  @id
end

#source_urlObject (readonly)

Returns the value of attribute source_url.



43915
43916
43917
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43915

def source_url
  @source_url
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



43929
43930
43931
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43929

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

#to_hashObject



43933
43934
43935
43936
43937
43938
43939
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43933

def to_hash
  {
    :id => id,
    :source_url => source_url,
    :filename => filename
  }
end

#to_jsonObject



43925
43926
43927
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 43925

def to_json
  JSON.dump(to_hash)
end