Skip to main content

BXB Customer Portal API

Project description

bxb-portal

Customer self-service portal API. Authenticate using a JWT token passed as a query parameter.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 0.3.1
  • Package version: 0.3.2
  • Generator version: 7.20.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import bxb_portal

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import bxb_portal

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import bxb_portal
from bxb_portal.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = bxb_portal.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: PortalJWT
configuration.api_key['PortalJWT'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['PortalJWT'] = 'Bearer'


# Enter a context with an instance of the API client
with bxb_portal.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = bxb_portal.PortalApi(api_client)
    token = 'token_example' # str | 
    payment_method_create = bxb_portal.PaymentMethodCreate() # PaymentMethodCreate | 

    try:
        # Add a payment method
        api_response = api_instance.add_portal_payment_method(token, payment_method_create)
        print("The response of PortalApi->add_portal_payment_method:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling PortalApi->add_portal_payment_method: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
PortalApi add_portal_payment_method POST /portal/payment_methods Add a payment method
PortalApi download_portal_invoice_pdf GET /portal/invoices/{invoice_id}/download_pdf Download invoice PDF
PortalApi get_portal_branding GET /portal/branding Get organization branding for portal
PortalApi get_portal_current_usage GET /portal/current_usage Get current usage
PortalApi get_portal_customer GET /portal/customer Get customer profile
PortalApi get_portal_dashboard_summary GET /portal/dashboard_summary Get portal dashboard summary
PortalApi get_portal_invoice GET /portal/invoices/{invoice_id} Get invoice detail
PortalApi get_portal_projected_usage GET /portal/usage/projected Get projected end-of-period usage
PortalApi get_portal_subscription GET /portal/subscriptions/{subscription_id} Get subscription detail
PortalApi get_portal_usage_limits GET /portal/usage/limits Get plan limits vs current usage
PortalApi get_portal_usage_trend GET /portal/usage/trend Get usage trend for a subscription
PortalApi get_portal_wallet GET /portal/wallet Get wallet balance and transactions
PortalApi get_portal_wallet_balance_timeline GET /portal/wallet/{wallet_id}/balance_timeline Get wallet balance timeline
PortalApi list_portal_add_ons GET /portal/add_ons List available add-ons
PortalApi list_portal_coupons GET /portal/coupons List applied coupons
PortalApi list_portal_invoice_payments GET /portal/invoices/{invoice_id}/payments List payments for an invoice
PortalApi list_portal_invoices GET /portal/invoices List customer invoices
PortalApi list_portal_payment_methods GET /portal/payment_methods List customer payment methods
PortalApi list_portal_payments GET /portal/payments List customer payments
PortalApi list_portal_plans GET /portal/plans List available plans
PortalApi list_portal_purchased_add_ons GET /portal/add_ons/purchased List purchased add-ons
PortalApi list_portal_subscriptions GET /portal/subscriptions List customer subscriptions
PortalApi list_portal_wallet_transactions GET /portal/wallet/{wallet_id}/transactions List wallet transactions
PortalApi pay_portal_invoice POST /portal/invoices/{invoice_id}/pay Pay an outstanding invoice
PortalApi portal_change_plan POST /portal/subscriptions/{subscription_id}/change_plan Change subscription plan
PortalApi portal_change_plan_preview POST /portal/subscriptions/{subscription_id}/change_plan_preview Preview plan change with proration
PortalApi portal_purchase_add_on POST /portal/add_ons/{add_on_id}/purchase Purchase an add-on
PortalApi portal_redeem_coupon POST /portal/coupons/redeem Redeem a coupon code
PortalApi portal_wallet_top_up POST /portal/wallet/{wallet_id}/top_up Request a wallet top-up
PortalApi preview_portal_invoice_pdf GET /portal/invoices/{invoice_id}/pdf_preview Preview invoice PDF inline
PortalApi remove_portal_payment_method DELETE /portal/payment_methods/{payment_method_id} Remove a payment method
PortalApi set_portal_default_payment_method POST /portal/payment_methods/{payment_method_id}/set_default Set default payment method
PortalApi update_portal_profile PATCH /portal/profile Update customer profile

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

PortalJWT

  • Type: API key
  • API key parameter name: token
  • Location: URL query string

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bxb_portal-0.3.2.tar.gz (48.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bxb_portal-0.3.2-py3-none-any.whl (104.2 kB view details)

Uploaded Python 3

File details

Details for the file bxb_portal-0.3.2.tar.gz.

File metadata

  • Download URL: bxb_portal-0.3.2.tar.gz
  • Upload date:
  • Size: 48.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for bxb_portal-0.3.2.tar.gz
Algorithm Hash digest
SHA256 3e871e598f87a664fb80360593ade6bc4265306dbcf8cef196354f8a06efa764
MD5 58914dcdc2425481f0ef0bb1ed693832
BLAKE2b-256 c64a5bcb5bb35191d0e34c4ee61f67a974660200130dc4914a16a32099d42a0e

See more details on using hashes here.

File details

Details for the file bxb_portal-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: bxb_portal-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 104.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for bxb_portal-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f226b2e61f2db935be83d1f48d889e8cba9060f92f05fe47dd159fb09ff26245
MD5 4fd7181cb0112861ec1d6cea5e1110b0
BLAKE2b-256 584e0adb8dd3d368e2e3957288b1f7755f73ef211804f5dc26f0be08f8be0da8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page