Class: Increase::Resources::ACHTransfers
- Inherits:
-
Object
- Object
- Increase::Resources::ACHTransfers
- Defined in:
- lib/increase/resources/ach_transfers.rb
Instance Method Summary collapse
-
#approve(ach_transfer_id, opts = {}) ⇒ Increase::Models::ACHTransfer
Approves an ACH Transfer in a pending_approval state.
-
#cancel(ach_transfer_id, opts = {}) ⇒ Increase::Models::ACHTransfer
Cancels an ACH Transfer in a pending_approval state.
-
#create(params = {}, opts = {}) ⇒ Increase::Models::ACHTransfer
Create an ACH Transfer.
-
#initialize(client:) ⇒ ACHTransfers
constructor
A new instance of ACHTransfers.
-
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::ACHTransfer>
List ACH Transfers.
-
#retrieve(ach_transfer_id, opts = {}) ⇒ Increase::Models::ACHTransfer
Retrieve an ACH Transfer.
Constructor Details
#initialize(client:) ⇒ ACHTransfers
Returns a new instance of ACHTransfers.
6 7 8 |
# File 'lib/increase/resources/ach_transfers.rb', line 6 def initialize(client:) @client = client end |
Instance Method Details
#approve(ach_transfer_id, opts = {}) ⇒ Increase::Models::ACHTransfer
Approves an ACH Transfer in a pending_approval state.
112 113 114 115 116 117 118 |
# File 'lib/increase/resources/ach_transfers.rb', line 112 def approve(ach_transfer_id, opts = {}) req = {} req[:method] = :post req[:path] = "/ach_transfers/#{ach_transfer_id}/approve" req[:model] = Increase::Models::ACHTransfer @client.request(req, opts) end |
#cancel(ach_transfer_id, opts = {}) ⇒ Increase::Models::ACHTransfer
Cancels an ACH Transfer in a pending_approval state.
126 127 128 129 130 131 132 |
# File 'lib/increase/resources/ach_transfers.rb', line 126 def cancel(ach_transfer_id, opts = {}) req = {} req[:method] = :post req[:path] = "/ach_transfers/#{ach_transfer_id}/cancel" req[:model] = Increase::Models::ACHTransfer @client.request(req, opts) end |
#create(params = {}, opts = {}) ⇒ Increase::Models::ACHTransfer
Create an ACH Transfer
56 57 58 59 60 61 62 63 |
# File 'lib/increase/resources/ach_transfers.rb', line 56 def create(params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/ach_transfers" req[:body] = params req[:model] = Increase::Models::ACHTransfer @client.request(req, opts) end |
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::ACHTransfer>
List ACH Transfers
96 97 98 99 100 101 102 103 104 |
# File 'lib/increase/resources/ach_transfers.rb', line 96 def list(params = {}, opts = {}) req = {} req[:method] = :get req[:path] = "/ach_transfers" req[:query] = params req[:page] = Increase::Page req[:model] = Increase::Models::ACHTransfer @client.request(req, opts) end |
#retrieve(ach_transfer_id, opts = {}) ⇒ Increase::Models::ACHTransfer
Retrieve an ACH Transfer
71 72 73 74 75 76 77 |
# File 'lib/increase/resources/ach_transfers.rb', line 71 def retrieve(ach_transfer_id, opts = {}) req = {} req[:method] = :get req[:path] = "/ach_transfers/#{ach_transfer_id}" req[:model] = Increase::Models::ACHTransfer @client.request(req, opts) end |