Class: Io::Flow::V0::Models::SyncStreamSettings
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::SyncStreamSettings
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#error_after ⇒ Object
readonly
Returns the value of attribute error_after.
-
#pending_record_after ⇒ Object
readonly
Returns the value of attribute pending_record_after.
-
#warn_after ⇒ Object
readonly
Returns the value of attribute warn_after.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ SyncStreamSettings
constructor
A new instance of SyncStreamSettings.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ SyncStreamSettings
Returns a new instance of SyncStreamSettings.
64728 64729 64730 64731 64732 64733 64734 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64728 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:pending_record_after, :warn_after, :error_after], 'SyncStreamSettings') @pending_record_after = (x = opts.delete(:pending_record_after); x.is_a?(::Io::Flow::V0::Models::SyncDuration) ? x : ::Io::Flow::V0::Models::SyncDuration.new(x)) @warn_after = (x = opts.delete(:warn_after); x.is_a?(::Io::Flow::V0::Models::SyncDuration) ? x : ::Io::Flow::V0::Models::SyncDuration.new(x)) @error_after = (x = opts.delete(:error_after); x.is_a?(::Io::Flow::V0::Models::SyncDuration) ? x : ::Io::Flow::V0::Models::SyncDuration.new(x)) end |
Instance Attribute Details
#error_after ⇒ Object (readonly)
Returns the value of attribute error_after.
64726 64727 64728 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64726 def error_after @error_after end |
#pending_record_after ⇒ Object (readonly)
Returns the value of attribute pending_record_after.
64726 64727 64728 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64726 def pending_record_after @pending_record_after end |
#warn_after ⇒ Object (readonly)
Returns the value of attribute warn_after.
64726 64727 64728 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64726 def warn_after @warn_after end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
64740 64741 64742 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64740 def copy(incoming={}) SyncStreamSettings.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
64744 64745 64746 64747 64748 64749 64750 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64744 def to_hash { :pending_record_after => pending_record_after.to_hash, :warn_after => warn_after.to_hash, :error_after => error_after.to_hash } end |
#to_json ⇒ Object
64736 64737 64738 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64736 def to_json JSON.dump(to_hash) end |