Class: Io::Flow::V0::Models::OrderSummaryImage
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderSummaryImage
- 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 = {}) ⇒ OrderSummaryImage
constructor
A new instance of OrderSummaryImage.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderSummaryImage
Returns a new instance of OrderSummaryImage.
42148 42149 42150 42151 42152 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42148 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:url], 'OrderSummaryImage') @url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String) end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
42146 42147 42148 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42146 def url @url end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
42158 42159 42160 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42158 def copy(incoming={}) OrderSummaryImage.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
42162 42163 42164 42165 42166 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42162 def to_hash { :url => url } end |
#to_json ⇒ Object
42154 42155 42156 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42154 def to_json JSON.dump(to_hash) end |