{"id":28102345,"url":"https://github.com/mango/mango-ruby","last_synced_at":"2025-07-05T23:08:24.394Z","repository":{"id":24005255,"uuid":"27389211","full_name":"Mango/mango-ruby","owner":"Mango","description":"This is the Ruby library that allows interaction with Mango API","archived":false,"fork":false,"pushed_at":"2015-07-20T14:55:26.000Z","size":164,"stargazers_count":8,"open_issues_count":0,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-13T19:58:33.552Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://developers.getmango.com/en/api/?platform=ruby","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/Mango.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2014-12-01T16:51:24.000Z","updated_at":"2019-08-13T15:56:47.000Z","dependencies_parsed_at":"2022-08-06T00:16:20.562Z","dependency_job_id":null,"html_url":"https://github.com/Mango/mango-ruby","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Mango/mango-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mango%2Fmango-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mango%2Fmango-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mango%2Fmango-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mango%2Fmango-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mango","download_url":"https://codeload.github.com/Mango/mango-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mango%2Fmango-ruby/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263819235,"owners_count":23516122,"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":"2025-05-13T19:51:10.582Z","updated_at":"2025-07-05T23:08:24.387Z","avatar_url":"https://github.com/Mango.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Mango\n=====\n\nRuby wrapper for Mango API\n\n\n## Description\n\nAPI to interact with Mango\nhttps://getmango.com/\n\n\n## Installation\n\nAs usual, you can install it using rubygems.\n\n```\n$ gem install mango-ruby\n```\n\n## Usage\n\n```\nrequire 'mango-ruby'\n\nMango.api_key = ENV['MANGO_SECRET_KEY']\n\nparams = {\n  email: \"johndoe@example.com\",\n  name: \"John Doe\"\n}\n\nbegin\n  customer = Mango::Customers.create params\nrescue Mango::Error =\u003e e\n  e.each {|code, message| ... }\nend\n```\n\nYou can set a global API_KEY (`Mango.api_key`) or override it on each request\n\n\n## API\n\nAll the requests go through:\n```\nMango.request(method, url, api_key=nil, params={}, headers={})\n```\n\nBut you can use CRUD methods on `Mango::Cards`, `Mango::Customers`...\n```\ndef create params={}, api_key=nil\ndef list params={}, api_key=nil\ndef retrieve uid, params={}, api_key=nil\ndef delete uid, params={}, api_key=nil\ndef update uid, params={}, api_key=nil\n```\n\nSo these two are equivalent:\n```\ncustomer = Mango::Customers.create params\ncustomer = Mango.request :post, '/customers/', api_key, params\n```\n\nThese are the operations available for each resource:\n\n|Resource|list|create|retrieve|update|delete|delete_all|\n|--------|:--:|:----:|:------:|:----:|:----:|:--------:|\n|Cards         | x | x | x | x | x |   |\n|Charges       | x | x | x |   |   |   |\n|Customers     | x | x | x | x | x |   |\n|Installments  | x |   |   |   |   |   |\n|Queue         | x | x | x |   | x | x |\n|Refunds       | x | x | x |   |   |   |\n|Promotions    | x |   | x |   |   |   |\n|Coupons       | x | x | x | x |   |   |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmango%2Fmango-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmango%2Fmango-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmango%2Fmango-ruby/lists"}