class Io::Flow::V0::Models::SyncStreamForm

Attributes

settings[R]
systems[R]
type[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 69738
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:type, :systems], 'SyncStreamForm')
  @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::SyncStreamType) ? x : ::Io::Flow::V0::Models::SyncStreamType.apply(x))
  @systems = HttpClient::Preconditions.assert_class('systems', opts.delete(:systems), Array).map { |v| HttpClient::Preconditions.assert_class('systems', v, String) }
  @settings = (x = opts.delete(:settings); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::SyncStreamSettingsForm) ? x : ::Io::Flow::V0::Models::SyncStreamSettingsForm.new(x)))
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 69750
def copy(incoming={})
  SyncStreamForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 69754
def to_hash
  {
    :type => type.value,
    :systems => systems,
    :settings => settings.nil? ? nil : settings.to_hash
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 69746
def to_json
  JSON.dump(to_hash)
end