Class: StraddlePay::Resources::FundingEvents
- Defined in:
- lib/straddle_pay/resources/funding_events.rb
Overview
Query funding events (bank settlement records).
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
-
#get(id, **options) ⇒ Hash
Retrieve a funding event by ID.
-
#list(**options) ⇒ Hash
List funding events with optional filters.
-
#simulate(**options) ⇒ Hash
Simulate a funding event in sandbox.
Methods inherited from Base
Constructor Details
This class inherits a constructor from StraddlePay::Resources::Base
Instance Method Details
#get(id, **options) ⇒ Hash
Retrieve a funding event by ID.
20 21 22 23 |
# File 'lib/straddle_pay/resources/funding_events.rb', line 20 def get(id, **) headers = extract_headers() @client.get("v1/funding_events/#{id}", headers: headers) end |
#list(**options) ⇒ Hash
List funding events with optional filters.
11 12 13 14 |
# File 'lib/straddle_pay/resources/funding_events.rb', line 11 def list(**) headers = extract_headers() @client.get("v1/funding_events", params: , headers: headers) end |
#simulate(**options) ⇒ Hash
Simulate a funding event in sandbox.
29 30 31 32 33 |
# File 'lib/straddle_pay/resources/funding_events.rb', line 29 def simulate(**) payload = .compact headers = extract_headers(payload) @client.post("v1/funding_events/simulate", payload.empty? ? nil : payload, headers: headers) end |