Skip to main content

Client for splitit-web-api-v3

Project description

splitit-web-python-sdk@2.5.0

Splitit's Web API

Requirements

Python >=3.7

Installing

pip install splitit-web-python-sdk==2.5.0

Getting Started

from pprint import pprint
from splitit_client import Splitit, ApiException

splitit = Splitit(
    # Defining the host is optional and defaults to https://web-api-v3.production.splitit.com
    # See configuration.py for a list of all supported configuration parameters.
    host="https://web-api-v3.production.splitit.com",
    # Configure OAuth2 access token for authorization: oauth
    access_token="YOUR_ACCESS_TOKEN",
)

try:
    cancel_response = splitit.installment_plan.cancel(
        installment_plan_number="installmentPlanNumber_example",  # required
        x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",  # required
        x_splitit_touch_point="",  # required
    )
    pprint(cancel_response.body)
    pprint(cancel_response.body["installment_plan_number"])
    pprint(cancel_response.headers)
    pprint(cancel_response.status)
    pprint(cancel_response.round_trip_time)
except ApiException as e:
    print("Exception when calling InstallmentPlanApi.cancel: %s\n" % e)
    pprint(e.body)
    if e.status == 401:
        pprint(e.body["trace_id"])
        pprint(e.body["error"])
    if e.status == 500:
        pprint(e.body["trace_id"])
        pprint(e.body["error"])
    if e.status == 403:
        pprint(e.body["trace_id"])
        pprint(e.body["error"])
    if e.status == 404:
        pprint(e.body["trace_id"])
        pprint(e.body["error"])
    pprint(e.headers)
    pprint(e.status)
    pprint(e.reason)
    pprint(e.round_trip_time)

Async

async support is available by prepending a to any method.

import asyncio
from pprint import pprint
from splitit_client import Splitit, ApiException

splitit = Splitit(
    # Defining the host is optional and defaults to https://web-api-v3.production.splitit.com
    # See configuration.py for a list of all supported configuration parameters.
    host="https://web-api-v3.production.splitit.com",
    # Configure OAuth2 access token for authorization: oauth
    access_token="YOUR_ACCESS_TOKEN",
)


async def main():
    try:
        cancel_response = await splitit.installment_plan.acancel(
            installment_plan_number="installmentPlanNumber_example",  # required
            x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",  # required
            x_splitit_touch_point="",  # required
        )
        pprint(cancel_response.body)
        pprint(cancel_response.body["installment_plan_number"])
        pprint(cancel_response.headers)
        pprint(cancel_response.status)
        pprint(cancel_response.round_trip_time)
    except ApiException as e:
        print("Exception when calling InstallmentPlanApi.cancel: %s\n" % e)
        pprint(e.body)
        if e.status == 401:
            pprint(e.body["trace_id"])
            pprint(e.body["error"])
        if e.status == 500:
            pprint(e.body["trace_id"])
            pprint(e.body["error"])
        if e.status == 403:
            pprint(e.body["trace_id"])
            pprint(e.body["error"])
        if e.status == 404:
            pprint(e.body["trace_id"])
            pprint(e.body["error"])
        pprint(e.headers)
        pprint(e.status)
        pprint(e.reason)
        pprint(e.round_trip_time)


asyncio.run(main())

Documentation for API Endpoints

All URIs are relative to https://web-api-v3.production.splitit.com

Class Method HTTP request Description
InstallmentPlanApi cancel post /api/installmentplans/{installmentPlanNumber}/cancel
InstallmentPlanApi check_eligibility post /api/installmentplans/check-eligibility
InstallmentPlanApi get get /api/installmentplans/{installmentPlanNumber}
InstallmentPlanApi post post /api/installmentplans/initiate
InstallmentPlanApi post2 post /api/installmentplans
InstallmentPlanApi refund post /api/installmentplans/{installmentPlanNumber}/refund
InstallmentPlanApi search get /api/installmentplans/search
InstallmentPlanApi update_order put /api/installmentplans/{installmentPlanNumber}/updateorder
InstallmentPlanApi update_order2 put /api/installmentplans/updateorder
InstallmentPlanApi verify_authorization get /api/installmentplans/{installmentPlanNumber}/verifyauthorization

Documentation For Models

Author

This Python package is automatically generated by Konfig

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

splitit_web_python_sdk-2.5.0.tar.gz (97.3 kB view details)

Uploaded Source

Built Distribution

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

splitit_web_python_sdk-2.5.0-py3-none-any.whl (301.9 kB view details)

Uploaded Python 3

File details

Details for the file splitit_web_python_sdk-2.5.0.tar.gz.

File metadata

  • Download URL: splitit_web_python_sdk-2.5.0.tar.gz
  • Upload date:
  • Size: 97.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for splitit_web_python_sdk-2.5.0.tar.gz
Algorithm Hash digest
SHA256 9bf51fcd5c171198c1d6d03caec967cd4d324ac653e0989267c406072983306d
MD5 3860586df3dfc07894afc6984c201475
BLAKE2b-256 768ee2ef964f96021a4a4a690f99625a5fbb6c75e5da6ac6f8ffc913595e4db2

See more details on using hashes here.

File details

Details for the file splitit_web_python_sdk-2.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for splitit_web_python_sdk-2.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62f28f9c4880dd2e93a523c39b7c6156c09c42f21c5d15bfc3174d76abac8341
MD5 e359a660a41552e8df8d93d90cd003fd
BLAKE2b-256 5b096feaf5c227bdd27ac0e999a2df9918dcf46e58a3c1312eb580de6bb9605b

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