module Monzo::Client::Cards
Overview
Exposes methods for listing and manipulating Card
s, which are not described in the official API docs at all.
Direct including types
Defined in:
monzo/client/cards.crInstance Method Summary
-
#cards(account : Account)
Returns all
Card
s for the specified account. -
#cards(account_id : String)
Returns all
Card
s for the specified account_id. -
#freeze(card : Card)
Freezes the specified
Card
so that it cannot be used to make purchases. -
#freeze(card_id : String)
Freezes a
Card
with the specified card_id. -
#unfreeze(card : Card)
Unfreezes the specified
Card
so that it can be used to make purchases again. -
#unfreeze(card_id : String)
Unfreezes a
Card
with the specified card_id.
Instance Method Detail
Returns all Card
s for the specified account.
account = client.accounts.first
client.cards(account) # => [#<Monzo::Card:0x10e6266c0 @id="card_CARDID", @processor_token="666", @processor="gps", @account_id="acc_ACCOUNTID", @last_digits="0666", @name="Baris Balic", @expires="11/2018", @status="ACTIVE", @created="2015-11-30T22:02:12.067Z">]
Freezes the specified Card
so that it cannot be used to make purchases.
Returns true
when successful.
account = client.accounts.first
card = client.cards(account).first
client.freeze(card) # => true
Unfreezes the specified Card
so that it can be used to make purchases again.
Returns true
when successful.
account = client.accounts.first
card = client.cards(account).first
client.unfreeze(card) # => true