Class: Io::Flow::V0::Models::ChannelOrganizationAuthorizationForm

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ ChannelOrganizationAuthorizationForm

Returns a new instance of ChannelOrganizationAuthorizationForm.



35131
35132
35133
35134
35135
35136
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35131

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:channel_id, :organization_id], 'ChannelOrganizationAuthorizationForm')
  @channel_id = HttpClient::Preconditions.assert_class('channel_id', opts.delete(:channel_id), String)
  @organization_id = HttpClient::Preconditions.assert_class('organization_id', opts.delete(:organization_id), String)
end

Instance Attribute Details

#channel_idObject (readonly)

Returns the value of attribute channel_id.



35129
35130
35131
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35129

def channel_id
  @channel_id
end

#organization_idObject (readonly)

Returns the value of attribute organization_id.



35129
35130
35131
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35129

def organization_id
  @organization_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



35142
35143
35144
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35142

def copy(incoming={})
  ChannelOrganizationAuthorizationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



35146
35147
35148
35149
35150
35151
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35146

def to_hash
  {
    :channel_id => channel_id,
    :organization_id => organization_id
  }
end

#to_jsonObject



35138
35139
35140
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35138

def to_json
  JSON.dump(to_hash)
end