Class: Io::Flow::V0::Models::CatalogItemDocumentImage

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

Returns a new instance of CatalogItemDocumentImage.



9113
9114
9115
9116
9117
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9113

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:url], 'CatalogItemDocumentImage')
  @url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String)
end

Instance Attribute Details

#urlObject (readonly)

Returns the value of attribute url.



9111
9112
9113
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9111

def url
  @url
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



9123
9124
9125
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9123

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

#to_hashObject



9127
9128
9129
9130
9131
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9127

def to_hash
  {
    :url => url
  }
end

#to_jsonObject



9119
9120
9121
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9119

def to_json
  JSON.dump(to_hash)
end