Skip to main content

Demo Billing SDK

Project description

billing

SDK Installation

pip install speakeasy-billing

SDK Example Usage

import billing
from billing.models import shared

s = billing.Billing(
    security=shared.Security(
        api_key_auth="",
    ),
)

req = shared.NewCustomer(
    auto_collection=False,
    billing_address=shared.NewCustomerBillingAddress(
        city='New Tyrelfort',
        country='US',
        line1='totam',
        line2='beatae',
        postal_code='42177',
        state='esse',
    ),
    currency='ipsum',
    email='Brianne61@yahoo.com',
    external_customer_id='sed',
    metadata=shared.NewCustomerMetadata(),
    name='Curtis Morissette',
    payment_provider=shared.NewCustomerPaymentProvider.NULL,
    payment_provider_id='fuga',
    shipping_address=shared.NewCustomerShippingAddress(
        city='Floyfurt',
        country='US',
        line1='iure',
        line2='saepe',
        postal_code='00966-6123',
        state='explicabo',
    ),
    tax_id=shared.NewCustomerCustomerTaxID(
        country='Saint Kitts and Nevis',
        type='enim',
        value='omnis',
    ),
    timezone='Etc/UTC',
)

res = s.customer.create(req)

if res.customer is not None:
    # handle response

Available Resources and Operations

availability

  • ping - Check availability

coupon

credit

credit_note

  • fetch - Fetch credit note
  • list - List credit notes

customer

event

invoice

plan

subscription

Pagination

Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the returned response object will have a Next method that can be called to pull down the next group of results. If the return value of Next is None, then there are no more pages to be fetched.

Here's an example of one such pagination call:

Development

Maturity

This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.

Contributions

While we value open-source contributions to this SDK, this library is generated programmatically. Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release!

SDK Created by Speakeasy

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

speakeasy-billing-0.2.1.tar.gz (94.4 kB view hashes)

Uploaded Source

Built Distribution

speakeasy_billing-0.2.1-py3-none-any.whl (197.2 kB view hashes)

Uploaded Python 3

Supported by

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