module Monzo::Client::Webhooks

Overview

Exposes methods for dealing with and manipulating Webhooks as defined by the Webhooks API documentation.

Direct including types

Defined in:

monzo/client/webhooks.cr

Instance Method Summary

Instance Method Detail

def delete_webhook(webhook_id : String) #

Deletes a Webhook with the specified webhook_id.


[View source]
def delete_webhook(webhook : Monzo::Webhook) #

Deletes the specified Webhook. Returns true when successful.

account = client.accounts.first
webhook = client.webhooks(account)
client.delete(webhook) # => true

[View source]
def register_webhook(account : Monzo::Account, url : String) #

Registers a Webhook for the specified account, to url.

 account = client.accounts.first
client.register(account, "https://localhost") # => #<Monzo::Webhook:0x10c10db70 @id="webhook_WEBHOOKID", @account_id="acc_ACCOUNTID", @url="https://localhost">

[View source]
def register_webhook(account_id : String, url : String) #

Registers a Webhook for the specified account_id, to url.


[View source]
def webhooks(account : Monzo::Account) #

Returns the Webhooks for the specified account.

account = client.accounts.first
client.webooks(account) # => #<Monzo::Webhook:0x10c10db70 @id="webhook_WEBHOOKID", @account_id="acc_ACCOUNTID", @url="https://localhost">

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

Returns Webhooks for the specified account_id.


[View source]