module Monzo::Client::Cards

Overview

Exposes methods for listing and manipulating Cards, which are not described in the official API docs at all.

Direct including types

Defined in:

monzo/client/cards.cr

Instance Method Summary

Instance Method Detail

def cards(account : Account) #

Returns all Cards 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">]

[View source]
def cards(account_id : String) #

Returns all Cards for the specified account_id.


[View source]
def freeze(card : Card) #

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

[View source]
def freeze(card_id : String) #

Freezes a Card with the specified card_id.


[View source]
def unfreeze(card : Card) #

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

[View source]
def unfreeze(card_id : String) #

Unfreezes a Card with the specified card_id.


[View source]