{"id":22117147,"url":"https://github.com/bitsnap/chargebee-api-client","last_synced_at":"2025-03-24T05:46:42.691Z","repository":{"id":263599149,"uuid":"890908021","full_name":"bitsnap/chargebee-api-client","owner":"bitsnap","description":"Chargebee API Client","archived":false,"fork":false,"pushed_at":"2024-11-22T07:33:17.000Z","size":391,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-01T13:35:29.264Z","etag":null,"topics":["api","chargebee","client","golang"],"latest_commit_sha":null,"homepage":"https://bitsnap.io","language":"Go","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/bitsnap.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-19T11:48:58.000Z","updated_at":"2024-11-22T17:37:10.000Z","dependencies_parsed_at":"2024-11-19T13:05:41.013Z","dependency_job_id":null,"html_url":"https://github.com/bitsnap/chargebee-api-client","commit_stats":null,"previous_names":["bitsnap/chargebee-api-client"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsnap%2Fchargebee-api-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsnap%2Fchargebee-api-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsnap%2Fchargebee-api-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsnap%2Fchargebee-api-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitsnap","download_url":"https://codeload.github.com/bitsnap/chargebee-api-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236176746,"owners_count":19107387,"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":["api","chargebee","client","golang"],"created_at":"2024-12-01T13:29:14.436Z","updated_at":"2025-01-29T11:43:03.025Z","avatar_url":"https://github.com/bitsnap.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### [Chargebee](https://www.chargebee.com/) API Client\n\n[Bitsnap](https://bitsnap.io) Operational Intelligence Platform [Chargebee](https://www.chargebee.com/) API client package.\n\nExisting accounting platforms often suffer from reliability issues, such as potential ledger data loss and inconsistent API specifications, \nmaking long-term use and interoperability risky. To address these challenges, Yuriy is publishing up-to-date Accounting Services API Clients with a focus on long-term support. \nThese clients aim to uncover and highlight inconsistencies in API specifications and documentation.\n\nBitsnap focuses on importing and data processing, instead of synchronization.\n\n### Bitsnap Accounting Read-only API Clients\n\n - [Chargebee](https://github.com/bitsnap/chargebee-api-client) this one\n - [Freshbooks](https://github.com/bitsnap/freshbooks-api-client)\n - [Myob](https://github.com/bitsnap/myob-api-client)\n - [Paypal](https://github.com/bitsnap/paypal-api-client)\n - [QBO](https://github.com/bitsnap/qbo-api-client)\n - [Stripe](https://github.com/bitsnap/stripe-api-client)\n - [Wave](https://github.com/bitsnap/wave-api-client)\n - [Xero](https://github.com/bitsnap/xero-api-client)\n - [Zoho Books](https://github.com/bitsnap/zohobooks-api-client)\n\n### Usage\n\n```go\npackage main \n\nimport (\n  \"time\"\n  \n  \"github.com/bitsnap/chargebee-api-client\"\n)\n\n// set CHARGEBEE_API_TOKEN and CHARGEBEE_SITE variables\n//\nfunc main() {\n  // or specify the respective values explicitly\n  chargebee.UseToken(\"test_very_secure_token\")\n  chargebee.UseSite(\"test-ier-site\")\n  \n  // Lists all customers, without pagination\n  // Be mindful of API requests limits\n  customers, err := chargebee.ListAllCustomers()\n  \n  // Lists with pagination offset\n  customers, offset, err := chargebee.ListCustomers()\n\n  // Gets next page with the previous offset\n  // All entries are sorted by updated_at field, by default\n  moreCustomers, newOffset, err := chargebee.ListCustomersPage(offset)\n  \n  // Use created_at updated_at filters to stream changes\n  halfHourAgo := time.Now().Add(-30 * time.Minute)\n  updatedCustomers, err := chargebee.ListCustomersUpdatedSince(\u0026halfHourAgo)\n  createdCustomers, err := chargebee.ListCustomersCreatedSince(\u0026halfHourAgo)\n}\n\n```\n\n### Development\n\nInstall [asdf](https://asdf-vm.com/guide/getting-started.html) with all the dependencies\n\n```bash\ngit clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0\n# Add the following to ~/.bashrc:\necho '. \"$HOME/.asdf/asdf.sh\"' \u003e\u003e ~/.bashrc\n# Completions must be configured by adding the following to your .bashrc:\necho '. \"$HOME/.asdf/completions/asdf.bash\"' \u003e\u003e ~/.bashrc\n```\n\n```bash\n# install asdf\n\nasdf plugin add golang\nasdf plugin add golangci-lint \nasdf plugin add ko\nasdf plugin add goreleaser\n\ngo install golang.org/x/tools/cmd/goimports@latest\ngo install mvdan.cc/gofumpt@latest\ngo install github.com/onsi/ginkgo/v2/ginkgo@latest\n```\n\n### Code generation\n\n```bash\n# will scrape the existing API documentation pages and emit the respective API client methods\n# enums and models validation, where applicable\n\ngo generate ./...\n```\n\n### Testing\n\n```bash\n# trial Chargebee sites are suffixed with *-test \n# make sure to double check - it was not documented properly\n\nCHARGEBEE_API_TOKEN=test_xxx CHARGEBEE_SITE=xxx-test ginkgo run ./...\n```\n\n### TODO\n - [ ] refactor scraping\n - [ ] maybe introduce some attr filtering\n - [ ] implement webhook API endpoints for CDC streaming\n - [ ] provide [Apache Flink](https://flink.apache.org/) [JNI source](https://nightlies.apache.org/flink/flink-docs-master/docs/dev/datastream/sources/) binding  \n - [ ] provide [Argo Events](https://argoproj.github.io/argo-events/) source binding\n - [ ] benchmarks\n\n## License\n\n[Bitsnap](https://bitsnap.io) is a proprietary product developed by [Yuriy Yarosh](mailto:yuriy@yarosh.dev).\n\n[Chargebee](https://www.chargebee.com/) golang API Client is licensed under the terms of [MIT License](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitsnap%2Fchargebee-api-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitsnap%2Fchargebee-api-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitsnap%2Fchargebee-api-client/lists"}