Class: Io::Flow::V0::Models::OrderServiceChangeRequestData
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderServiceChangeRequestData
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#source_url ⇒ Object
readonly
Returns the value of attribute source_url.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderServiceChangeRequestData
constructor
A new instance of OrderServiceChangeRequestData.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderServiceChangeRequestData
Returns a new instance of OrderServiceChangeRequestData.
42008 42009 42010 42011 42012 42013 42014 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42008 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :source_url], 'OrderServiceChangeRequestData') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @source_url = HttpClient::Preconditions.assert_class('source_url', opts.delete(:source_url), String) @filename = (x = opts.delete(:filename); x.nil? ? nil : HttpClient::Preconditions.assert_class('filename', x, String)) end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
42006 42007 42008 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42006 def filename @filename end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
42006 42007 42008 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42006 def id @id end |
#source_url ⇒ Object (readonly)
Returns the value of attribute source_url.
42006 42007 42008 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42006 def source_url @source_url end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
42020 42021 42022 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42020 def copy(incoming={}) OrderServiceChangeRequestData.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
42024 42025 42026 42027 42028 42029 42030 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42024 def to_hash { :id => id, :source_url => source_url, :filename => filename } end |
#to_json ⇒ Object
42016 42017 42018 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42016 def to_json JSON.dump(to_hash) end |