Module: FidorApi::Client::DSL::Transfers::Generic

Defined in:
lib/fidor_api/client/dsl/transfers/generic.rb

Instance Method Summary collapse

Instance Method Details

#confirm_transfer(id, options = {}) ⇒ Object



31
32
33
34
# File 'lib/fidor_api/client/dsl/transfers/generic.rb', line 31

def confirm_transfer(id, options = {})
  check_transfer_support! :generic
  request(:put, "/transfers/#{id}/confirm", {}, options[:headers])
end

#create_transfer(attributes = {}, options = {}) ⇒ Object



21
22
23
24
# File 'lib/fidor_api/client/dsl/transfers/generic.rb', line 21

def create_transfer(attributes = {}, options = {})
  check_transfer_support! :generic
  create(FidorApi::Model::Transfer::Generic, 'transfers', attributes, options)
end

#new_transfer(attributes = {}) ⇒ Object



16
17
18
19
# File 'lib/fidor_api/client/dsl/transfers/generic.rb', line 16

def new_transfer(attributes = {})
  check_transfer_support! :generic
  Model::Transfer::Generic.new(attributes)
end

#transfer(id, options = {}) ⇒ Object



11
12
13
14
# File 'lib/fidor_api/client/dsl/transfers/generic.rb', line 11

def transfer(id, options = {})
  check_transfer_support! :generic
  fetch(:single, FidorApi::Model::Transfer::Generic, "transfers/#{id}", options)
end

#transfers(options = {}) ⇒ Object



6
7
8
9
# File 'lib/fidor_api/client/dsl/transfers/generic.rb', line 6

def transfers(options = {})
  check_transfer_support! :generic
  fetch(:collection, FidorApi::Model::Transfer::Generic, 'transfers', options)
end

#update_transfer(id, attributes = {}, options = {}) ⇒ Object



26
27
28
29
# File 'lib/fidor_api/client/dsl/transfers/generic.rb', line 26

def update_transfer(id, attributes = {}, options = {})
  check_transfer_support! :generic
  update(FidorApi::Model::Transfer::Generic, "transfers/#{id}", id, attributes, options)
end