Class: StraddlePay::Resources::Bridge
- Defined in:
- lib/straddle_pay/resources/bridge.rb
Overview
Bank account linking via Bridge.
Constant Summary
Constants inherited from Base
StraddlePay::Resources::Base::HEADER_KEYS
Instance Method Summary collapse
-
#initialize_session(customer_id:, **options) ⇒ Hash
Initialize a Bridge session for a customer.
-
#links ⇒ BridgeLinks
Bank account link sub-resource.
-
#speedchex(customer_id:, speedchex_token:, **options) ⇒ Hash
Create a paykey from a Speedchex token.
Methods inherited from Base
Constructor Details
This class inherits a constructor from StraddlePay::Resources::Base
Instance Method Details
#initialize_session(customer_id:, **options) ⇒ Hash
Initialize a Bridge session for a customer.
14 15 16 17 18 |
# File 'lib/straddle_pay/resources/bridge.rb', line 14 def initialize_session(customer_id:, **) payload = { customer_id: customer_id, ** }.compact headers = extract_headers(payload) @client.post("v1/bridge/initialize", payload, headers: headers) end |
#links ⇒ BridgeLinks
Returns bank account link sub-resource.
8 |
# File 'lib/straddle_pay/resources/bridge.rb', line 8 def links = @links ||= BridgeLinks.new(@client) |
#speedchex(customer_id:, speedchex_token:, **options) ⇒ Hash
Create a paykey from a Speedchex token.
26 27 28 29 30 31 32 |
# File 'lib/straddle_pay/resources/bridge.rb', line 26 def speedchex(customer_id:, speedchex_token:, **) payload = { customer_id: customer_id, speedchex_token: speedchex_token, ** }.compact headers = extract_headers(payload) @client.post("v1/bridge/speedchex", payload, headers: headers) end |