Class: Io::Flow::V0::Models::OrganizationPutForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrganizationPutForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Data required to upsert an organization.
Instance Attribute Summary collapse
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#parent_id ⇒ Object
readonly
Returns the value of attribute parent_id.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrganizationPutForm
constructor
A new instance of OrganizationPutForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrganizationPutForm
Returns a new instance of OrganizationPutForm.
21821 21822 21823 21824 21825 21826 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21821 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String)) @environment = (x = opts.delete(:environment); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Environment) ? x : ::Io::Flow::V0::Models::Environment.apply(x))) @parent_id = (x = opts.delete(:parent_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('parent_id', x, String)) end |
Instance Attribute Details
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
21819 21820 21821 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21819 def environment @environment end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
21819 21820 21821 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21819 def name @name end |
#parent_id ⇒ Object (readonly)
Returns the value of attribute parent_id.
21819 21820 21821 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21819 def parent_id @parent_id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
21832 21833 21834 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21832 def copy(incoming={}) OrganizationPutForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
21836 21837 21838 21839 21840 21841 21842 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21836 def to_hash { :name => name, :environment => environment.nil? ? nil : environment.value, :parent_id => parent_id } end |
#to_json ⇒ Object
21828 21829 21830 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21828 def to_json JSON.dump(to_hash) end |