{ "info": { "author": "Eric Levine", "author_email": "eric@berbix.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Berbix Python SDK\n\nThis Berbix Python library provides simple interfaces to interact with the Berbix API.\n\n## Installation\n\n pip install berbix\n\n## Usage\n\n### Constructing a client\n\n import berbix\n\n client = berbix.Client(\n client_id='your_client_id_here',\n client_secret='your_client_secret_here')\n\n### Create a transaction\n\n var transactionTokens = client.createTransaction({\n \"customer_uid\": \"interal_customer_uid\", // ID for the user in internal database\n \"template_key\": \"your_template_key\", // Template key for this transaction\n })\n\n### Create tokens from refresh token\n\n refresh_token = '' # fetched from database\n transaction_tokens = Tokens.from_refresh(refresh_token)\n\n### Fetch transaction data\n\n transaction_data = client.fetch_transaction(transaction_tokens)\n\n## Reference\n\n### `Client`\n\n#### Methods\n\n##### `constructor(options)`\n\nSupported options:\n\n * `client_id` (required) - The client ID that can be found in your Berbix Dashboard.\n * `client_secret` (required) - The client secret that can be found in your Berbix Dashboard.\n * `environment` - Which environment the client uses, defaults to `:production`.\n * `http_client` - An optional override for the default HTTP client.\n\n##### `create_transaction(options): Tokens`\n\nCreates a transaction within Berbix to initialize the client SDK. Typically after creating\na transaction, you will want to store the refresh token in your database associated with the\ncurrently active user session.\n\nSupported options:\n\n * `email` - Previously verified email address for a user.\n * `phone` - Previously verified phone number for a user.\n * `customer_uid` - An ID or identifier for the user in your system.\n * `template_key` - The template key for this transaction.\n\n##### `fetch_transaction(tokens: Tokens): object`\n\nFetches all of the information associated with the transaction. If the user has already completed the steps of the transaction, then this will include all of the elements of the transaction payload as described on the [Berbix developer docs](https://developers.berbix.com).\n\n##### `refresh_tokens(tokens: Tokens): void`\n\nThis is typically not needed to be called explicitly as it will be called by the higher-level\nSDK methods, but can be used to get fresh client or access tokens.\n\n### `Tokens`\n\n#### Properties\n\n##### `access_token: string`\n\nThis is the short-lived bearer token that the backend SDK uses to identify requests associated with a given transaction. This is not typically needed when using the higher-level SDK methods.\n\n##### `client_token: string`\n\nThis is the short-lived token that the frontend SDK uses to identify requests associated with a given transaction. After transaction creation, this will typically be sent to a frontend SDK.\n\n##### `refresh_token: string`\n\nThis is the long-lived token that allows you to create new tokens after the short-lived tokens have expired. This is typically stored in the database associated with the given user session.\n\n##### `transaction_id: number`\n\nThe internal Berbix ID number associated with the transaction.\n\n##### `expiry: Date`\n\nThe time at which the access and client tokens will expire.\n\n#### Static methods\n\n##### `from_refresh(refreshToken: string): Tokens`\n\nCreates a tokens object from a refresh token, which can be passed to higher-level SDK methods. The SDK will handle refreshing the tokens for accessing relevant data.\n\n## Publishing\n\n To release a new version of the SDK, first bump the version in `setup.py`.\n\n python setup.py sdist bdist_wheel\n twine upload dist/*\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/berbix/berbix-python", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "berbix", "package_url": "https://pypi.org/project/berbix/", "platform": "", "project_url": "https://pypi.org/project/berbix/", "project_urls": { "Homepage": "https://github.com/berbix/berbix-python" }, "release_url": "https://pypi.org/project/berbix/0.0.9/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "SDK for Berbix integrations", "version": "0.0.9" }, "last_serial": 5651011, "releases": { "0.0.5": [ { "comment_text": "", "digests": { "md5": "25b32db1eb41b9b2830dcfbb5444e513", "sha256": "3f9b2ce356e819aa0b96e6fed1feb71f0842c11072fa19d051696d7e8842831b" }, "downloads": -1, "filename": "berbix-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "25b32db1eb41b9b2830dcfbb5444e513", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3620, "upload_time": "2019-04-30T21:35:11", "url": "https://files.pythonhosted.org/packages/b9/34/8cf4b2e6a6add67f82418a741c768be60c685220f945f709294325dd77df/berbix-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "80fa5778cec0c29125468cf4f00541b1", "sha256": "6de7a1f7097de0592b556a4ad7e539d7b6189f800df414525cde6a13c734f7f9" }, "downloads": -1, "filename": "berbix-0.0.5.tar.gz", "has_sig": false, "md5_digest": "80fa5778cec0c29125468cf4f00541b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2514, "upload_time": "2019-04-30T21:35:13", "url": "https://files.pythonhosted.org/packages/cc/74/0d03cbbecfbdf921f2ec41e43fccc94704f8a739e563a0a668691bce7d95/berbix-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "d5bfbfc64c7b0b89670b49a245173010", "sha256": "e546d064dcdff72899952da52874c070756f30c26ac357f3c944d19f1ad872ab" }, "downloads": -1, "filename": "berbix-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "d5bfbfc64c7b0b89670b49a245173010", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3733, "upload_time": "2019-05-02T23:26:26", "url": "https://files.pythonhosted.org/packages/50/36/db2b7b4b7ab7e13616f85ae0af9f81208ba794b88b3afbfd44f78299a945/berbix-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d4eb96f1276cec8210e52e7382542070", "sha256": "78a17de941f580b61d8343f2ddf5cdcbe6745c7102c03f30509154741c39d486" }, "downloads": -1, "filename": "berbix-0.0.6.tar.gz", "has_sig": false, "md5_digest": "d4eb96f1276cec8210e52e7382542070", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2688, "upload_time": "2019-05-02T23:26:27", "url": "https://files.pythonhosted.org/packages/68/a9/d9853533b10087126fc14302be4ea925c5bd2f6326c3ca8a18dd0a96f9a1/berbix-0.0.6.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "ad2d912ac702144ebfb64a1eff4d1eb4", "sha256": "67d82cc5bae1e0f41d63505e5a370d2819d6be0c8b7ab963821152441762df39" }, "downloads": -1, "filename": "berbix-0.0.8-py2-none-any.whl", "has_sig": false, "md5_digest": "ad2d912ac702144ebfb64a1eff4d1eb4", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 3927, "upload_time": "2019-06-28T01:46:09", "url": "https://files.pythonhosted.org/packages/3d/1b/fff4f82368502736a2fb6faee283fabfa5571ce22177cda863fea3abe0b2/berbix-0.0.8-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d3bc48300c99141024580838abfadb6a", "sha256": "4918a44b9ed40200d5654f5c2e50881dc6b8f7843486ad85e0c6bbe5873c466a" }, "downloads": -1, "filename": "berbix-0.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "d3bc48300c99141024580838abfadb6a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4749, "upload_time": "2019-06-28T01:46:11", "url": "https://files.pythonhosted.org/packages/cd/b9/cfc73f055336b03304448220ad77b1787935e8bb21b2b66096d9c6d4428c/berbix-0.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "322caf315a3440953725af13eba5e358", "sha256": "e63b348f3f3ccec89968154e7cb085af3f89528af5c79fe8d872ce774f8da672" }, "downloads": -1, "filename": "berbix-0.0.8.tar.gz", "has_sig": false, "md5_digest": "322caf315a3440953725af13eba5e358", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3845, "upload_time": "2019-06-28T01:46:13", "url": "https://files.pythonhosted.org/packages/86/e2/9bef0db1a4804f758c88500b5daac982e9837bb61fd98395af15970e1b73/berbix-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "0232f60bc33d361c1fba5177c592ca4b", "sha256": "aae11621e805dd68db6daf40c0affa047e5f882448773e0a4eeb4f027f9af2c8" }, "downloads": -1, "filename": "berbix-0.0.9-py3-none-any.whl", "has_sig": false, "md5_digest": "0232f60bc33d361c1fba5177c592ca4b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5062, "upload_time": "2019-08-08T15:59:07", "url": "https://files.pythonhosted.org/packages/9c/63/ac31879587c70d42c1d2b73213d6892372f9482f082d66bddcb5afde486e/berbix-0.0.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "23fd0e6fd979565d18ce081dd2de65cf", "sha256": "16937dd07dd85d63192c6a1502ebd65d599145401625f85bc481c31b0a8edd49" }, "downloads": -1, "filename": "berbix-0.0.9.tar.gz", "has_sig": false, "md5_digest": "23fd0e6fd979565d18ce081dd2de65cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4209, "upload_time": "2019-08-08T15:59:09", "url": "https://files.pythonhosted.org/packages/9f/b4/be211765d4768b5579a010457577d96b065ad5cfbce87df1816ef0cdd48c/berbix-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0232f60bc33d361c1fba5177c592ca4b", "sha256": "aae11621e805dd68db6daf40c0affa047e5f882448773e0a4eeb4f027f9af2c8" }, "downloads": -1, "filename": "berbix-0.0.9-py3-none-any.whl", "has_sig": false, "md5_digest": "0232f60bc33d361c1fba5177c592ca4b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5062, "upload_time": "2019-08-08T15:59:07", "url": "https://files.pythonhosted.org/packages/9c/63/ac31879587c70d42c1d2b73213d6892372f9482f082d66bddcb5afde486e/berbix-0.0.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "23fd0e6fd979565d18ce081dd2de65cf", "sha256": "16937dd07dd85d63192c6a1502ebd65d599145401625f85bc481c31b0a8edd49" }, "downloads": -1, "filename": "berbix-0.0.9.tar.gz", "has_sig": false, "md5_digest": "23fd0e6fd979565d18ce081dd2de65cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4209, "upload_time": "2019-08-08T15:59:09", "url": "https://files.pythonhosted.org/packages/9f/b4/be211765d4768b5579a010457577d96b065ad5cfbce87df1816ef0cdd48c/berbix-0.0.9.tar.gz" } ] }