Module: FidorApi::Client::DSL::Transfers::Generic
- Defined in:
- lib/fidor_api/client/dsl/transfers/generic.rb
Instance Method Summary collapse
- #confirm_transfer(id, options = {}) ⇒ Object
- #create_transfer(attributes = {}, options = {}) ⇒ Object
- #new_transfer(attributes = {}) ⇒ Object
- #transfer(id, options = {}) ⇒ Object
- #transfers(options = {}) ⇒ Object
- #update_transfer(id, attributes = {}, options = {}) ⇒ Object
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, = {}) check_transfer_support! :generic request(:put, "/transfers/#{id}/confirm", {}, [: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 = {}, = {}) check_transfer_support! :generic create(FidorApi::Model::Transfer::Generic, 'transfers', attributes, ) 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, = {}) check_transfer_support! :generic fetch(:single, FidorApi::Model::Transfer::Generic, "transfers/#{id}", ) end |
#transfers(options = {}) ⇒ Object
6 7 8 9 |
# File 'lib/fidor_api/client/dsl/transfers/generic.rb', line 6 def transfers( = {}) check_transfer_support! :generic fetch(:collection, FidorApi::Model::Transfer::Generic, 'transfers', ) 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 = {}, = {}) check_transfer_support! :generic update(FidorApi::Model::Transfer::Generic, "transfers/#{id}", id, attributes, ) end |