Class: Io::Flow::V0::Models::PartnerReference
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PartnerReference
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PartnerReference
constructor
A new instance of PartnerReference.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PartnerReference
Returns a new instance of PartnerReference.
31671 31672 31673 31674 31675 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31671 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id], 'PartnerReference') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
31669 31670 31671 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31669 def id @id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
31681 31682 31683 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31681 def copy(incoming={}) PartnerReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
31685 31686 31687 31688 31689 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31685 def to_hash { :id => id } end |
#to_json ⇒ Object
31677 31678 31679 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 31677 def to_json JSON.dump(to_hash) end |