mangopay v0.1.0 MangoPay.Hook
Functions for MangoPay hook.
Link to this section Summary
Functions
List all hooks
List all hooks
Create a hook
Create a hook
Get a hook
Get a hook
Get path called
Get path called
Update a hook
Update a hook
Link to this section Functions
Link to this function
all(query \\ %{})
List all hooks.
Examples
query = %{
"Page": 1,
"Per_Page": 25,
"Sort": "CreationDate:DESC"
}
{:ok, hooks} = MangoPay.Hook.all()
Link to this function
all!(query \\ %{})
List all hooks.
Examples
query = %{
"Page": 1,
"Per_Page": 25,
"Sort": "CreationDate:DESC"
}
hooks = MangoPay.Hook.all!(query)
Link to this function
create(params)
Create a hook.
Examples
params = %{
"Tag": "custom meta",
"EventType": "PAYIN_NORMAL_CREATED",
"Url": "http://www.my-site.com/hooks/"
}
{:ok, hook} = MangoPay.Hook.create(params)
Link to this function
create!(params)
Create a hook.
Examples
params = %{
"Tag": "custom meta",
"EventType": "PAYIN_NORMAL_CREATED",
"Url": "http://www.my-site.com/hooks/"
}
hook = MangoPay.Hook.create!(params)
Link to this function
get(id)
Get a hook.
Examples
{:ok, hook} = MangoPay.Hook.get(id)
Link to this function
get!(id)
Get a hook.
Examples
hook = MangoPay.Hook.get!(id)
Link to this function
path()
Get path called.
Examples
"/users" = MangoPay.User.path()
Link to this function
path(id)
Get path called.
Examples
"/users/id" = MangoPay.User.path(id)
Link to this function
update(id, params)
Update a hook.
Examples
params = %{
"Tag": "custom meta",
"Status": "ENABLED",
"Url": "http://www.my-site.com/hooks/"
}
{:ok, hook} = MangoPay.Hook.update(id, params)
Link to this function
update!(id, params)
Update a hook.
Examples
params = %{
"Tag": "custom meta",
"Status": "ENABLED",
"Url": "http://www.my-site.com/hooks/"
}
hook = MangoPay.Hook.update!(id, params)