{"id":13695299,"url":"https://github.com/monzo/mondo-ruby","last_synced_at":"2025-04-05T14:31:50.245Z","repository":{"id":44919713,"uuid":"42356029","full_name":"monzo/mondo-ruby","owner":"monzo","description":"Ruby Client","archived":false,"fork":false,"pushed_at":"2018-08-30T20:51:28.000Z","size":57,"stargazers_count":46,"open_issues_count":6,"forks_count":15,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-02T03:16:14.293Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monzo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-12T12:18:40.000Z","updated_at":"2025-03-10T12:56:26.000Z","dependencies_parsed_at":"2022-09-10T18:41:15.511Z","dependency_job_id":null,"html_url":"https://github.com/monzo/mondo-ruby","commit_stats":null,"previous_names":["mondough/mondo-ruby"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzo%2Fmondo-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzo%2Fmondo-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzo%2Fmondo-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzo%2Fmondo-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monzo","download_url":"https://codeload.github.com/monzo/mondo-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247352661,"owners_count":20925309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T18:00:20.842Z","updated_at":"2025-04-05T14:31:46.045Z","avatar_url":"https://github.com/monzo.png","language":"Ruby","funding_links":[],"categories":["Code \u0026 Client Libraries"],"sub_categories":[],"readme":"# Mondo Ruby Client\n\nThe Mondo Ruby client provides a simple Ruby interface to the Mondo API.\n\nAPI documentation, usage guides, and setup information can be found at [getmondo.co.uk/docs](https://getmondo.co.uk/docs/).\n\n## Initialize your client\n\n```ruby\nmondo = Mondo::Client.new(\n  token: YOUR_TOKEN,\n  account_id: YOUR_ACCOUNT_ID # recommended, but optional. If not set, the client will fetch it from the API\n)\n```\n\n## Configure a different API URL\n```ruby\nmondo.api_url = \"https://otherurl.com\"\n```\n\n## Ping\n\nCheck your client is configured correctly\n\n```ruby\nmondo.ping\n=\u003e \"pong\"\n```\n\n## Get Balance\n\n```ruby\nmondo.balance\n\n=\u003e # \u003cMondo::Balance {\"balance\"=\u003e642, \"currency\"=\u003e\"GBP\", \"spend_today\"=\u003e0}\u003e}\n```\n\n\n## List Transactions\n\n```ruby\nmondo.transactions\n=\u003e [\n  #\u003cMondo::Transaction -7GBP LOWER EAST SIDE DELI   LONDON  EC2A  GBR tx_00008zphrT5MZQoOhLbTur\u003e,\n  #\u003cMondo::Transaction -5GBP SACAT MARKS \u0026 SPENCER  LONDON        GBR tx_00008zqEXy8SiMLdEqVVmT\u003e,\n  #\u003cMondo::Transaction -31GBP OZONE COFFEE ROASTERS  UNITED KINGDO GBR tx_00008zrYsmW9IVgPz3bUiv\u003e,\n  #\u003cMondo::Transaction -26GBP LAN TANA               LONDON        GBR tx_00008zru1CYoS6lW6nhpeD\u003e,\n  #\u003cMondo::Transaction -5GBP PRET A MANGER          LONDON        GBR tx_00008zvemPnUEdNo8attNB\u003e,\n  etc...\n]\n\nmondo.transactions(expand: [:merchant], limit: 2, since: \"2015-08-10T23:00:00Z\")\n=\u003e [\n  #\u003cMondo::Transaction -6GBP OZONE COFFEE ROASTERS  LONDON        GBR tx_00008zy8VxynHJGWOqY3aD\u003e,\n  #\u003cMondo::Transaction -28GBP FGW SELF SERVICE       PADDINGTON    GBR tx_00008zyGtoILjhPUwlZli5\u003e,\n]\n\n# Fetch a single transaction\nmondo.transaction(tx_00008zvemPnUEdNo8attNB)\n=\u003e #\u003cMondo::Transaction -5GBP PRET A MANGER          LONDON        GBR tx_00008zvemPnUEdNo8attNB\u003e\n\nmondo.transactions.last.merchant\n=\u003e\n#\u003cMondo::Merchant merch_000090ER75UzBxejYTIb4r {\"id\"=\u003e\"merch_000090ER75UzBxejYTIb4r\", \"group_id\"=\u003e\"grp_00008yEdfHhvbwnQcsYryL\", \"created\"=\u003e\"2015-09-19T09:42:16Z\", \"name\"=\u003e\"Department Of Coffee And Social Affairs\", \"logo\"=\u003e\"http://avatars.io/twitter/deptofcoffee/?size=large\", \"address\"=\u003e{\"address\"=\u003e\"14-16 Leather Ln\", \"city\"=\u003e\"London\", \"region\"=\u003e\"Greater London\", \"country\"=\u003e\"GB\", \"postcode\"=\u003e\"EC1N 7SU\", \"latitude\"=\u003e51.519348553897686, \"longitude\"=\u003e-0.1090317964553833}}\u003e\n```\n\n## Update Transaction Tags\n\n```ruby\ntx = mondo.transactions.first\n\n# You can store deeply-nested key-value data on metadata. All values are stored \u0026 returned as strings.\ntx.metadata[:tags] += \"#expenses\" # tag this \"expenses\"\n\ntx.save_metadata\n=\u003e true\n```\n\n\n## Add an attachment to a transaction\n\n```ruby\ntx = mondo.transactions.first\n\ntx.register_attachment(\n  file_url: \"https://example.com/nyannyan.jpg\",\n  file_type: \"image/jpg\"\n)\n\n=\u003e [#\u003cMondo::Attachment {\"id\"=\u003e\"attach_00009253YR2h9Besgp6aLR\", \"url\"=\u003e\"https://example.com/nyannyan.jpg\", \"type\"=\u003e\"image/jpg\", \"created\"=\u003e\"2015-11-13T16:50:05Z\"}\u003e]\n\n# And remove it again\ntx.attachments.first.deregister\n```\n\n\n## Webhooks\n\n```ruby\n# register a new web-hook\nmondo.register_web_hook(\"http://google.com\")\n\n=\u003e [#\u003cMondo::WebHook {\"id\"=\u003e\"webhook_00009258bk4RMBeR4niFFp\", \"account_id\"=\u003e\"acc_000091N8nkeAUWHJjR9k9J\", \"url\"=\u003e\"http://google.com\"}\u003e]\n\n# list webhooks\nmondo.web_hooks\n\n=\u003e [#\u003cMondo::WebHook {\"id\"=\u003e\"webhook_00009258bk4RMBeR4niFFp\", \"account_id\"=\u003e\"acc_000091N8nkeAUWHJjR9k9J\", \"url\"=\u003e\"http://google.com\"}\u003e]\n\n# and remove it\n\nmondo.web_hooks.first.delete\n\n```\n\n## Cards\n\n```ruby\nmondo.cards\n=\u003e [\n  #\u003cMondo::Card {\"id\"=\u003e\"card_000000\", \"processor_token\"=\u003e\"1234\", \"processor\"=\u003e\"gps\", \"account_id\"=\u003e\"account_12345\", \"last_digits\"=\u003e\"4242\", \"name\"=\u003e\"Your Name\", \"expires\"=\u003e\"01/2220\", \"status\"=\u003e\"ACTIVE\", \"created\"=\u003e\"2016-01-20T17:23:05.51Z\"}\u003e\n]\n```\n\n#### Freeze Card\n```ruby\ncard.freeze\n```\n\n#### Unfreeze Card\n```ruby\ncard.unfreeze\n```\n\n## Feed Items\n\n```ruby\n# Create a new feed item\n\nmondo.create_feed_item(\n  title: \"Foo\",\n  image_url: \"https://www.example.com/img.jpg\", # small icon shown in the feed\n  url: \"https://www.example.com\", # when feed item is clicked, show this page in a webview\n)\n```\n\n## Tests\n\n```\nbundle exec rake spec\n```\n\nWe need some tests. See \"Contributing\"\n\n## Contributing\n\nPull requests welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonzo%2Fmondo-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonzo%2Fmondo-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonzo%2Fmondo-ruby/lists"}