Class: Io::Flow::V0::Models::CatalogItemDocumentImage
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CatalogItemDocumentImage
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CatalogItemDocumentImage
constructor
A new instance of CatalogItemDocumentImage.
- #to_hash ⇒ Object
- #to_json ⇒ Object
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
#url ⇒ Object (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_hash ⇒ Object
9127 9128 9129 9130 9131 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9127 def to_hash { :url => url } end |
#to_json ⇒ Object
9119 9120 9121 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 9119 def to_json JSON.dump(to_hash) end |