Class: Io::Flow::V0::Models::LogoImageSetStatic
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Static images like png or jpeg must be provided in multiple sizes.
Instance Attribute Summary collapse
-
#large ⇒ Object
readonly
Returns the value of attribute large.
-
#medium ⇒ Object
readonly
Returns the value of attribute medium.
-
#small ⇒ Object
readonly
Returns the value of attribute small.
Attributes inherited from LogoImage
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ LogoImageSetStatic
constructor
A new instance of LogoImageSetStatic.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from LogoImage
Constructor Details
#initialize(incoming = {}) ⇒ LogoImageSetStatic
Returns a new instance of LogoImageSetStatic.
49376 49377 49378 49379 49380 49381 49382 49383 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49376 def initialize(incoming={}) super(:discriminator => LogoImage::Types::LOGO_IMAGE_SET_STATIC) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:medium], 'LogoImageSetStatic') @small = (x = opts.delete(:small); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LogoImageStatic) ? x : ::Io::Flow::V0::Models::LogoImageStatic.new(x))) @medium = (x = opts.delete(:medium); x.is_a?(::Io::Flow::V0::Models::LogoImageStatic) ? x : ::Io::Flow::V0::Models::LogoImageStatic.new(x)) @large = (x = opts.delete(:large); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LogoImageStatic) ? x : ::Io::Flow::V0::Models::LogoImageStatic.new(x))) end |
Instance Attribute Details
#large ⇒ Object (readonly)
Returns the value of attribute large.
49374 49375 49376 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49374 def large @large end |
#medium ⇒ Object (readonly)
Returns the value of attribute medium.
49374 49375 49376 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49374 def medium @medium end |
#small ⇒ Object (readonly)
Returns the value of attribute small.
49374 49375 49376 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49374 def small @small end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
49389 49390 49391 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49389 def copy(incoming={}) LogoImageSetStatic.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
49393 49394 49395 49396 49397 49398 49399 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49393 def subtype_to_hash { :small => small.nil? ? nil : small.to_hash, :medium => medium.to_hash, :large => large.nil? ? nil : large.to_hash } end |
#to_json ⇒ Object
49385 49386 49387 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49385 def to_json JSON.dump(to_hash) end |