Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Wise - List balances for a profile #1785

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
241 changes: 241 additions & 0 deletions Wise/Wise_List_balances_for_a_profile.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "6c10bb15-ac84-4acc-a7eb-ad5c06c9d7c1",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"<img width=\"10%\" alt=\"Naas\" src=\"https://landen.imgix.net/jtci2pxwjczr/assets/5ice39g4.png?w=160\"/>"
]
},
{
"cell_type": "markdown",
"id": "79a22b7d-d0a2-4195-818d-b6ec3700d429",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"# Wise - List balances for a profile"
]
},
{
"cell_type": "markdown",
"id": "85aa8147-4ea5-4b1d-b7eb-9052202ff57b",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"**Tags:** #wise #api #balance #list #profile #reference"
]
},
{
"cell_type": "markdown",
"id": "1f6c454a-ee69-4e00-844c-2997948cdf12",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"**Author:** [Florent Ravenel](https://www.linkedin.com/in/florent-ravenel/)"
]
},
{
"cell_type": "markdown",
"id": "ad8ab26d-30a5-4f8b-8b01-9171f723ec3f",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"**Description:** This notebook will list the balances for a profile using the Wise API. It is usefull for organizations to keep track of their financials."
]
},
{
"cell_type": "markdown",
"id": "00ff4bfa-a936-4a2c-8e34-0cac90be640e",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"**References:**\n- [Wise API Reference](https://api-docs.transferwise.com/api-reference/balance#list)"
]
},
{
"cell_type": "markdown",
"id": "fd7e4546-bcf3-4417-b24c-1e383a78f4e8",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"## Input"
]
},
{
"cell_type": "markdown",
"id": "3c880f8d-0fb7-4d12-b33c-b452c7719a34",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Import libraries"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "36a285b1-9007-4f8c-883a-e2c61ed8aaac",
"metadata": {
"papermill": {},
"tags": []
},
"source": "import requests",
"outputs": []
},
{
"cell_type": "markdown",
"id": "1a7b2e58-0a65-4132-9b84-e51766a1ec29",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Setup Variables\n- `profile_id`: The ID of the profile for which to list the balances."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a16ff4e9-c683-47d9-a4bd-76a7f79d4779",
"metadata": {
"papermill": {},
"tags": []
},
"source": "profile_id = \"12345\"",
"outputs": []
},
{
"cell_type": "markdown",
"id": "28e13c6c-9879-4a1b-9b1d-d9aabd049408",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"## Model"
]
},
{
"cell_type": "markdown",
"id": "a3fdf36b-7850-4578-be5c-838e48e91054",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### List balances"
]
},
{
"cell_type": "markdown",
"id": "de6b3066-5b12-4224-b156-9cbaafd55b14",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"Long description of the function: This function will list the balances for a given profile using the Wise API."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "bbc9fe38-e440-43df-a834-7c49d3e67606",
"metadata": {
"papermill": {},
"tags": []
},
"source": "url = f\"https://api.transferwise.com/v1/profiles/{profile_id}/balances\"\nheaders = {\"Authorization\": \"Bearer <token>\"}\nresponse = requests.get(url, headers=headers)",
"outputs": []
},
{
"cell_type": "markdown",
"id": "90fedb3a-9618-49b6-bb02-5692318394a3",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"## Output"
]
},
{
"cell_type": "markdown",
"id": "f1da24b2-57d3-4917-965f-9a6084aa425e",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Display result"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "da1e3044-1239-4959-8742-5844c56eb735",
"metadata": {
"papermill": {},
"tags": []
},
"source": "print(response.json())",
"outputs": []
},
{
"cell_type": "markdown",
"id": "42a1c12a-de7c-4bf5-8a77-8df3eb6a09d2",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
" "
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {},
"version_major": 2,
"version_minor": 0
}
}
},
"nbformat": 4,
"nbformat_minor": 5
}