class Io::Flow::V0::Models::OrganizationForm
Either id or name is required.
Attributes
defaults[R]
environment[R]
id[R]
name[R]
parent_id[R]
status[R]
type[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 55009 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String)) @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String)) @environment = (x = (x = opts.delete(:environment); x.nil? ? "production" : 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)) @defaults = (x = opts.delete(:defaults); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrganizationDefaults) ? x : ::Io::Flow::V0::Models::OrganizationDefaults.new(x))) @status = (x = (x = opts.delete(:status); x.nil? ? "active" : x); x.is_a?(::Io::Flow::V0::Models::OrganizationStatus) ? x : ::Io::Flow::V0::Models::OrganizationStatus.apply(x)) @type = (x = opts.delete(:type); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrganizationType) ? x : ::Io::Flow::V0::Models::OrganizationType.apply(x))) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 55024 def copy(incoming={}) OrganizationForm.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 55028 def to_hash { :id => id, :name => name, :environment => environment.value, :parent_id => parent_id, :defaults => defaults.nil? ? nil : defaults.to_hash, :status => status.value, :type => type.nil? ? nil : type.value } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 55020 def to_json JSON.dump(to_hash) end