{"id":13809271,"url":"https://github.com/WTTJ/chargebeex","last_synced_at":"2025-05-14T05:33:40.685Z","repository":{"id":65016020,"uuid":"444767321","full_name":"WTTJ/chargebeex","owner":"WTTJ","description":"An Elixir library to interact with Chargebee","archived":false,"fork":false,"pushed_at":"2025-05-12T11:03:15.000Z","size":408,"stargazers_count":19,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-12T11:36:46.513Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/WTTJ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-05T10:50:29.000Z","updated_at":"2025-05-12T11:03:12.000Z","dependencies_parsed_at":"2023-10-17T01:27:58.424Z","dependency_job_id":"a121f16e-50ff-464d-8c1c-92dcf48e808e","html_url":"https://github.com/WTTJ/chargebeex","commit_stats":{"total_commits":101,"total_committers":11,"mean_commits":9.181818181818182,"dds":0.5643564356435644,"last_synced_commit":"4f0787be4bfe1a80a2c66e12be1476b552eae7c5"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WTTJ%2Fchargebeex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WTTJ%2Fchargebeex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WTTJ%2Fchargebeex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WTTJ%2Fchargebeex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WTTJ","download_url":"https://codeload.github.com/WTTJ/chargebeex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253734008,"owners_count":21955631,"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-04T01:02:13.812Z","updated_at":"2025-05-14T05:33:40.674Z","avatar_url":"https://github.com/WTTJ.png","language":"Elixir","funding_links":[],"categories":["Third Party APIs"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"logo.png\" /\u003e\n\u003c/p\u003e\n\n# Chargebeex\n\nChargebeex is an Elixir implementation of [Chargebee\nAPI](https://apidocs.chargebee.com/docs/api).\n\nThis is a heavily inspired fork of the original work by [Nicolas\nMarlier](https://github.com/NicolasMarlier/chargebee-elixir)\n\n## Project status\n\nChargebeex is used for several months in production at Welcome to the Jungle.\n\n## Installation\n\nThe package can be installed by adding `chargebeex` to your list of dependencies in `mix.exs`:\n\n```elixir\n# mix.exs\ndef deps do\n  [\n    {:chargebeex, \"~\u003e 0.6.0\"}\n  ]\nend\n```\n\n## Configuration\n\nChargebeex can be configured using [Config](https://hexdocs.pm/elixir/1.12/Config.html) or environment variables.\n\n### Config\n\n```elixir\nconfig :chargebeex,\n  namespace: \"my-namespace\",\n  api_key: \"my-api-key\"\n```\n\n### Environment variables\n\n```\nexport CHARGEBEEX_API_KEY=my-api-key\nexport CHARGEBEEX_NAMESPACE=my-namespace\n```\n\n## Usage\n\n```elixir\n{:ok, %Chargebeex.Customer{}} = Chargebeex.Customer.retrieve(\"foobar\")\n{:ok, [%Chargebeex.Customer{}], [%Chargebeex.Customer{}]} = Chargebeex.Customer.list()\n{:ok, %Chargebeex.Customer{}} = Chargebeex.Customer.update(\"foobar\", %{name: \"updated\"})\n{:ok, %Chargebeex.Customer{}} = Chargebeex.Customer.delete(\"foobar\")\n```\n\n### Custom Fields\n\nChargebee provides a way to add user-specific fields for resources like\nCustomer, Subscriptions, ... called [Custom\nFields](https://www.chargebee.com/docs/2.0/custom_fields.html).\n\nThese fields are prepended with the `cf_` prefix. These fields can be accessed\nin the special `custom_fields` field of the structure. Please note Custom Fields\nare only available for Customers, Subscriptions, Product Families, Plans,\nAddons and Price Points.\n\n#### Example:\n\n```elixir\n iex\u003e Chargebeex.Customer.retrieve(\"barbaz\")\n {:ok, %Chargebeex.Customer{\n     id: \"barbaz\",\n     allow_direct_debit: false,\n     custom_fields: %{\n       \"cf_my_custom_field\" =\u003e \"foobar\"\n     },\n     [...]}\n  }\n```\n\n### Extra Resources\n\nSome ressources can have extra infos returned along them. For example, when\nquerying a Customer, if any card or subscription is linked to this customer,\nthese resources will also be returned. For internal API simplification, these\nfields can be accessed in the `resources` field of the structure.\n\n#### Example:\n\n```elixir\n iex\u003e Chargebeex.Customer.retrieve(\"barbaz\")\n {:ok, %Chargebeex.Customer{\n     id: \"barbaz\",\n     allow_direct_debit: false,\n      resources: %{\n        \"card\" =\u003e %Chargebeex.Card{\n          billing_addr1: \"my_address\",\n          billing_addr2: nil,\n          billing_city: \"Paris\",\n          ...\n          }\n      }\n     [...]}\n  }\n```\n\n### Telemetry Integration\n\nChargebeex now supports `:telemetry`, allowing users to instrument and monitor API calls using telemetry events. This enables integration with various observability tools.\n\n#### Telemetry Events\n\nChargebeex emits the following telemetry events for each API request:\n\n- `[:chargebeex, :request, :start]`: Emitted when an API request starts.\n- `[:chargebeex, :request, :stop]`: Emitted when an API request completes.\n\nWhen making API calls, telemetry events will automatically be emitted:\n\n```elixir\nChargebeex.Client.get(\"/customers\")\n```\n\nThis will emit :start and :stop telemetry events with metadata such as the HTTP method, URL, and status code, which can be processed by your telemetry handler.\n\nFor more information on `:telemetry`, visit the [official documentation](https://hexdocs.pm/telemetry/).\n\n## Run tests\n\n```sh\nmix test\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWTTJ%2Fchargebeex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FWTTJ%2Fchargebeex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWTTJ%2Fchargebeex/lists"}