Class: Tango::Api::Resources::Funds

Inherits:
Base
  • Object
show all
Defined in:
lib/tango/api/resources/funds.rb

Overview

Client for Funds endpoints.

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Tango::Api::Resources::Base

Instance Method Details

#create_credit_card_deposit(body) ⇒ Object

POST /creditCardDeposits Body requires: customerIdentifier, accountIdentifier, externalRefID, creditCardToken, amount



32
33
34
# File 'lib/tango/api/resources/funds.rb', line 32

def create_credit_card_deposit(body)
  post_json("creditCardDeposits", body)
end

#get_card(credit_card_token) ⇒ Object

GET /creditCards/creditCardToken



15
16
17
# File 'lib/tango/api/resources/funds.rb', line 15

def get_card(credit_card_token)
  get_json("creditCards/#{credit_card_token}")
end

#get_credit_card_deposit(external_ref_id) ⇒ Object

GET /creditCardDeposits/externalRefID



37
38
39
# File 'lib/tango/api/resources/funds.rb', line 37

def get_credit_card_deposit(external_ref_id)
  get_json("creditCardDeposits/#{external_ref_id}")
end

#list_cards(params = {}) ⇒ Object

GET /creditCards Optional params: { customerIdentifier:, accountIdentifier:, ... } (varies by tenant)



10
11
12
# File 'lib/tango/api/resources/funds.rb', line 10

def list_cards(params = {})
  get_json("creditCards", params)
end

#register_card(body) ⇒ Object

POST /creditCards



20
21
22
# File 'lib/tango/api/resources/funds.rb', line 20

def register_card(body)
  post_json("creditCards", body)
end

#unregister_card(body) ⇒ Object

POST /creditCardUnregisters Body: { customerIdentifier:, accountIdentifier:, creditCardToken: }



26
27
28
# File 'lib/tango/api/resources/funds.rb', line 26

def unregister_card(body)
  post_json("creditCardUnregisters", body)
end