Class: Io::Flow::V0::Models::ChannelAuthorizationForm

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 = {}) ⇒ ChannelAuthorizationForm

Returns a new instance of ChannelAuthorizationForm.



30483
30484
30485
30486
30487
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30483

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

Instance Attribute Details

#channel_idObject (readonly)

Returns the value of attribute channel_id.



30481
30482
30483
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30481

def channel_id
  @channel_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



30493
30494
30495
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30493

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

#to_hashObject



30497
30498
30499
30500
30501
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30497

def to_hash
  {
    :channel_id => channel_id
  }
end

#to_jsonObject



30489
30490
30491
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30489

def to_json
  JSON.dump(to_hash)
end