Class: Io::Flow::V0::Models::SyncPendingRecord
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::SyncPendingRecord
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#stream ⇒ Object
readonly
Returns the value of attribute stream.
-
#system ⇒ Object
readonly
Returns the value of attribute system.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ SyncPendingRecord
constructor
A new instance of SyncPendingRecord.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ SyncPendingRecord
Returns a new instance of SyncPendingRecord.
69540 69541 69542 69543 69544 69545 69546 69547 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 69540 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :stream, :value, :system], 'SyncPendingRecord') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @stream = (x = opts.delete(:stream); x.is_a?(::Io::Flow::V0::Models::SyncStreamReference) ? x : ::Io::Flow::V0::Models::SyncStreamReference.new(x)) @value = HttpClient::Preconditions.assert_class('value', opts.delete(:value), String) @system = HttpClient::Preconditions.assert_class('system', opts.delete(:system), String) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
69538 69539 69540 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 69538 def id @id end |
#stream ⇒ Object (readonly)
Returns the value of attribute stream.
69538 69539 69540 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 69538 def stream @stream end |
#system ⇒ Object (readonly)
Returns the value of attribute system.
69538 69539 69540 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 69538 def system @system end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
69538 69539 69540 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 69538 def value @value end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
69553 69554 69555 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 69553 def copy(incoming={}) SyncPendingRecord.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
69557 69558 69559 69560 69561 69562 69563 69564 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 69557 def to_hash { :id => id, :stream => stream.to_hash, :value => value, :system => system } end |
#to_json ⇒ Object
69549 69550 69551 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 69549 def to_json JSON.dump(to_hash) end |