Class: Io::Flow::V0::Models::SyncStreamSettingsForm

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ SyncStreamSettingsForm

Returns a new instance of SyncStreamSettingsForm.



64758
64759
64760
64761
64762
64763
64764
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64758

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:pending_record_after, :warn_after, :error_after], 'SyncStreamSettingsForm')
  @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_afterObject (readonly)

Returns the value of attribute error_after.



64756
64757
64758
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64756

def error_after
  @error_after
end

#pending_record_afterObject (readonly)

Returns the value of attribute pending_record_after.



64756
64757
64758
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64756

def pending_record_after
  @pending_record_after
end

#warn_afterObject (readonly)

Returns the value of attribute warn_after.



64756
64757
64758
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64756

def warn_after
  @warn_after
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



64770
64771
64772
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64770

def copy(incoming={})
  SyncStreamSettingsForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



64774
64775
64776
64777
64778
64779
64780
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64774

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_jsonObject



64766
64767
64768
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64766

def to_json
  JSON.dump(to_hash)
end