Class: Io::Flow::V0::Models::OrderServiceChangeRequestData

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

Returns a new instance of OrderServiceChangeRequestData.



41275
41276
41277
41278
41279
41280
41281
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41275

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:id, :source_url], 'OrderServiceChangeRequestData')
  @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.



41273
41274
41275
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41273

def filename
  @filename
end

#idObject (readonly)

Returns the value of attribute id.



41273
41274
41275
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41273

def id
  @id
end

#source_urlObject (readonly)

Returns the value of attribute source_url.



41273
41274
41275
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41273

def source_url
  @source_url
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



41287
41288
41289
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41287

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

#to_hashObject



41291
41292
41293
41294
41295
41296
41297
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41291

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

#to_jsonObject



41283
41284
41285
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41283

def to_json
  JSON.dump(to_hash)
end