Class: Increase::Resources::WireTransfers
- Inherits:
-
Object
- Object
- Increase::Resources::WireTransfers
- Defined in:
- lib/increase/resources/wire_transfers.rb
Instance Method Summary collapse
-
#approve(wire_transfer_id, opts = {}) ⇒ Increase::Models::WireTransfer
Approve a Wire Transfer.
-
#cancel(wire_transfer_id, opts = {}) ⇒ Increase::Models::WireTransfer
Cancel a pending Wire Transfer.
-
#create(params = {}, opts = {}) ⇒ Increase::Models::WireTransfer
Create a Wire Transfer.
-
#initialize(client:) ⇒ WireTransfers
constructor
A new instance of WireTransfers.
-
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::WireTransfer>
List Wire Transfers.
-
#retrieve(wire_transfer_id, opts = {}) ⇒ Increase::Models::WireTransfer
Retrieve a Wire Transfer.
Constructor Details
#initialize(client:) ⇒ WireTransfers
Returns a new instance of WireTransfers.
6 7 8 |
# File 'lib/increase/resources/wire_transfers.rb', line 6 def initialize(client:) @client = client end |
Instance Method Details
#approve(wire_transfer_id, opts = {}) ⇒ Increase::Models::WireTransfer
Approve a Wire Transfer
94 95 96 97 98 99 100 |
# File 'lib/increase/resources/wire_transfers.rb', line 94 def approve(wire_transfer_id, opts = {}) req = {} req[:method] = :post req[:path] = "/wire_transfers/#{wire_transfer_id}/approve" req[:model] = Increase::Models::WireTransfer @client.request(req, opts) end |
#cancel(wire_transfer_id, opts = {}) ⇒ Increase::Models::WireTransfer
Cancel a pending Wire Transfer
108 109 110 111 112 113 114 |
# File 'lib/increase/resources/wire_transfers.rb', line 108 def cancel(wire_transfer_id, opts = {}) req = {} req[:method] = :post req[:path] = "/wire_transfers/#{wire_transfer_id}/cancel" req[:model] = Increase::Models::WireTransfer @client.request(req, opts) end |
#create(params = {}, opts = {}) ⇒ Increase::Models::WireTransfer
Create a Wire Transfer
38 39 40 41 42 43 44 45 |
# File 'lib/increase/resources/wire_transfers.rb', line 38 def create(params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/wire_transfers" req[:body] = params req[:model] = Increase::Models::WireTransfer @client.request(req, opts) end |
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::WireTransfer>
List Wire Transfers
78 79 80 81 82 83 84 85 86 |
# File 'lib/increase/resources/wire_transfers.rb', line 78 def list(params = {}, opts = {}) req = {} req[:method] = :get req[:path] = "/wire_transfers" req[:query] = params req[:page] = Increase::Page req[:model] = Increase::Models::WireTransfer @client.request(req, opts) end |
#retrieve(wire_transfer_id, opts = {}) ⇒ Increase::Models::WireTransfer
Retrieve a Wire Transfer
53 54 55 56 57 58 59 |
# File 'lib/increase/resources/wire_transfers.rb', line 53 def retrieve(wire_transfer_id, opts = {}) req = {} req[:method] = :get req[:path] = "/wire_transfers/#{wire_transfer_id}" req[:model] = Increase::Models::WireTransfer @client.request(req, opts) end |