Class: Io::Flow::V0::Models::ChannelOrganizationPutForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ChannelOrganizationPutForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#defaults ⇒ Object
readonly
Returns the value of attribute defaults.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#slug ⇒ Object
readonly
Returns the value of attribute slug.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ChannelOrganizationPutForm
constructor
A new instance of ChannelOrganizationPutForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ChannelOrganizationPutForm
Returns a new instance of ChannelOrganizationPutForm.
35224 35225 35226 35227 35228 35229 35230 35231 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35224 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:defaults], 'ChannelOrganizationPutForm') @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String)) @slug = (x = opts.delete(:slug); x.nil? ? nil : HttpClient::Preconditions.assert_class('slug', x, String)) @defaults = (x = opts.delete(:defaults); x.is_a?(::Io::Flow::V0::Models::OrganizationDefaults) ? x : ::Io::Flow::V0::Models::OrganizationDefaults.new(x)) @attributes = (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }) end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
35222 35223 35224 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35222 def attributes @attributes end |
#defaults ⇒ Object (readonly)
Returns the value of attribute defaults.
35222 35223 35224 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35222 def defaults @defaults end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
35222 35223 35224 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35222 def name @name end |
#slug ⇒ Object (readonly)
Returns the value of attribute slug.
35222 35223 35224 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35222 def slug @slug end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
35237 35238 35239 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35237 def copy(incoming={}) ChannelOrganizationPutForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
35241 35242 35243 35244 35245 35246 35247 35248 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35241 def to_hash { :name => name, :slug => slug, :defaults => defaults.to_hash, :attributes => attributes.nil? ? nil : attributes } end |
#to_json ⇒ Object
35233 35234 35235 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35233 def to_json JSON.dump(to_hash) end |