Class: Io::Flow::V0::Models::LogoImageSvg
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
If the browser knows that an image is a svg, it can dynamically redraw the image to different sizes
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Attributes inherited from LogoImage
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ LogoImageSvg
constructor
A new instance of LogoImageSvg.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from LogoImage
Constructor Details
#initialize(incoming = {}) ⇒ LogoImageSvg
Returns a new instance of LogoImageSvg.
49439 49440 49441 49442 49443 49444 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49439 def initialize(incoming={}) super(:discriminator => LogoImage::Types::LOGO_IMAGE_SVG) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:url], 'LogoImageSvg') @url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String) end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
49437 49438 49439 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49437 def url @url end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
49450 49451 49452 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49450 def copy(incoming={}) LogoImageSvg.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
49454 49455 49456 49457 49458 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49454 def subtype_to_hash { :url => url } end |
#to_json ⇒ Object
49446 49447 49448 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49446 def to_json JSON.dump(to_hash) end |