Class: Io::Flow::V0::Models::SyncStreamForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::SyncStreamForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#settings ⇒ Object
readonly
Returns the value of attribute settings.
-
#systems ⇒ Object
readonly
Returns the value of attribute systems.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ SyncStreamForm
constructor
A new instance of SyncStreamForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ SyncStreamForm
Returns a new instance of SyncStreamForm.
69738 69739 69740 69741 69742 69743 69744 |
# 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 |
Instance Attribute Details
#settings ⇒ Object (readonly)
Returns the value of attribute settings.
69736 69737 69738 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 69736 def settings @settings end |
#systems ⇒ Object (readonly)
Returns the value of attribute systems.
69736 69737 69738 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 69736 def systems @systems end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
69736 69737 69738 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 69736 def type @type end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
69750 69751 69752 |
# 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 ⇒ Object
69754 69755 69756 69757 69758 69759 69760 |
# 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 ⇒ Object
69746 69747 69748 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 69746 def to_json JSON.dump(to_hash) end |