Skip to main content

Client for splitit-web-api-v3

Project description

splitit-web-python-sdk

Splitit's Web API

PyPI README.md

Table of Contents

Requirements

Python >=3.7

Installation

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

Getting Started

from pprint import pprint
from splitit_client import Splitit, ApiException

splitit = Splitit(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

try:
    cancel_response = splitit.installment_plan.cancel(
        installment_plan_number="installmentPlanNumber_example",
        x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
        x_splitit_touch_point="",
    )
    pprint(cancel_response.body)
    pprint(cancel_response.body["installment_plan_number"])
    pprint(cancel_response.body["installment_plan_response"])
    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(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)


async def main():
    try:
        cancel_response = await splitit.installment_plan.acancel(
            installment_plan_number="installmentPlanNumber_example",
            x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
            x_splitit_touch_point="",
        )
        pprint(cancel_response.body)
        pprint(cancel_response.body["installment_plan_number"])
        pprint(cancel_response.body["installment_plan_response"])
        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())

Reference

splitit.installment_plan.cancel

๐Ÿ› ๏ธ Usage

cancel_response = splitit.installment_plan.cancel(
    installment_plan_number="installmentPlanNumber_example",
    x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
    x_splitit_touch_point="",
)

โš™๏ธ Parameters

installment_plan_number: str
x_splitit_idempotency_key: str
x_splitit_touch_point: str

TouchPoint

๐Ÿ”„ Return

InstallmentPlanCancelResponse

๐ŸŒ Endpoint

/api/installmentplans/{installmentPlanNumber}/cancel post

๐Ÿ”™ Back to Table of Contents


splitit.installment_plan.check_eligibility

๐Ÿ› ๏ธ Usage

check_eligibility_response = splitit.installment_plan.check_eligibility(
    x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
    x_splitit_touch_point="",
    plan_data={
        "total_amount": 3.14,
        "number_of_installments": 1,
        "purchase_method": "InStore",
    },
    card_details={
        "card_brand": "Mastercard",
        "card_type": "Credit",
    },
    billing_address={},
    shopper_identifier="string_example",
)

โš™๏ธ Parameters

x_splitit_idempotency_key: str
x_splitit_touch_point: str

TouchPoint

plan_data: PlanData
card_details: CardData
billing_address: AddressData
shopper_identifier: str

โš™๏ธ Request Body

CheckInstallmentsEligibilityRequest

๐Ÿ”„ Return

InstallmentsEligibilityResponse

๐ŸŒ Endpoint

/api/installmentplans/check-eligibility post

๐Ÿ”™ Back to Table of Contents


splitit.installment_plan.get

๐Ÿ› ๏ธ Usage

get_response = splitit.installment_plan.get(
    installment_plan_number="installmentPlanNumber_example",
    x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
    x_splitit_touch_point="",
)

โš™๏ธ Parameters

installment_plan_number: str
x_splitit_idempotency_key: str
x_splitit_touch_point: str

TouchPoint

๐Ÿ”„ Return

InstallmentPlanGetResponse

๐ŸŒ Endpoint

/api/installmentplans/{installmentPlanNumber} get

๐Ÿ”™ Back to Table of Contents


splitit.installment_plan.post

๐Ÿ› ๏ธ Usage

post_response = splitit.installment_plan.post(
    auto_capture=True,
    x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
    x_splitit_touch_point="",
    attempt3d_secure=True,
    shopper={},
    plan_data={
        "total_amount": 3.14,
        "purchase_method": "InStore",
    },
    billing_address={},
    redirect_urls={},
    ux_settings={},
    events_endpoints={},
    processing_data={},
    x_splitit_test_mode="None",
    splititclientinfo="string_example",
)

โš™๏ธ Parameters

auto_capture: bool
x_splitit_idempotency_key: str
x_splitit_touch_point: str

TouchPoint

attempt3d_secure: bool
shopper: ShopperData
plan_data: PlanDataModel
billing_address: AddressDataModel
redirect_urls: InitiateRedirectionEndpointsModel
ux_settings: UxSettingsModel
events_endpoints: EventsEndpointsModel
processing_data: ProcessingData
x_splitit_test_mode: str
splititclientinfo: str

โš™๏ธ Request Body

InstallmentPlanInitiateRequest

๐Ÿ”„ Return

InitiatePlanResponse

๐ŸŒ Endpoint

/api/installmentplans/initiate post

๐Ÿ”™ Back to Table of Contents


splitit.installment_plan.post2

๐Ÿ› ๏ธ Usage

post2_response = splitit.installment_plan.post2(
    auto_capture=True,
    terms_and_conditions_accepted=True,
    x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
    x_splitit_touch_point="",
    attempt3d_secure=True,
    shopper={},
    plan_data={
        "total_amount": 3.14,
        "purchase_method": "InStore",
    },
    billing_address={},
    payment_method={
        "type": "Card",
    },
    redirect_urls={},
    processing_data={},
    events_endpoints={},
    x_splitit_test_mode="None",
    splititclientinfo="string_example",
)

โš™๏ธ Parameters

auto_capture: bool
terms_and_conditions_accepted: bool
x_splitit_idempotency_key: str
x_splitit_touch_point: str

TouchPoint

attempt3d_secure: bool
shopper: ShopperData
plan_data: PlanDataModel
billing_address: AddressDataModel
payment_method: PaymentMethodModel
redirect_urls: RedirectionEndpointsModel
processing_data: ProcessingData
events_endpoints: EventsEndpointsModel
x_splitit_test_mode: str
splititclientinfo: str

โš™๏ธ Request Body

InstallmentPlanCreateRequest

๐Ÿ”„ Return

InstallmentPlanCreateResponse

๐ŸŒ Endpoint

/api/installmentplans post

๐Ÿ”™ Back to Table of Contents


splitit.installment_plan.refund

๐Ÿ› ๏ธ Usage

refund_response = splitit.installment_plan.refund(
    amount=3.14,
    installment_plan_number="installmentPlanNumber_example",
    x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
    x_splitit_touch_point="",
    refund_strategy="FutureInstallmentsFirst",
)

โš™๏ธ Parameters

amount: Union[int, float]
installment_plan_number: str
x_splitit_idempotency_key: str
x_splitit_touch_point: str

TouchPoint

refund_strategy: RefundStrategy

โš™๏ธ Request Body

InstallmentPlanRefundRequest

๐Ÿ”„ Return

InstallmentPlanRefundResponse

๐ŸŒ Endpoint

/api/installmentplans/{installmentPlanNumber}/refund post

๐Ÿ”™ Back to Table of Contents


splitit.installment_plan.search

๐Ÿ› ๏ธ Usage

search_response = splitit.installment_plan.search(
    x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
    x_splitit_touch_point="",
    installment_plan_number="string_example",
    ref_order_number="string_example",
    extended_params={
        "key": "string_example",
    },
)

โš™๏ธ Parameters

x_splitit_idempotency_key: str
x_splitit_touch_point: str

TouchPoint

installment_plan_number: str
ref_order_number: str
extended_params: Dict[str, str]

๐Ÿ”„ Return

InstallmentPlanSearchResponse

๐ŸŒ Endpoint

/api/installmentplans/search get

๐Ÿ”™ Back to Table of Contents


splitit.installment_plan.update_order

๐Ÿ› ๏ธ Usage

update_order_response = splitit.installment_plan.update_order(
    installment_plan_number="installmentPlanNumber_example",
    x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
    x_splitit_touch_point="",
    tracking_number="string_example",
    ref_order_number="string_example",
    shipping_status="Pending",
    capture=True,
)

โš™๏ธ Parameters

installment_plan_number: str
x_splitit_idempotency_key: str
x_splitit_touch_point: str

TouchPoint

tracking_number: str
ref_order_number: str
shipping_status: ShippingStatus
capture: bool

โš™๏ธ Request Body

UpdateOrderRequest

๐Ÿ”„ Return

InstallmentPlanUpdateResponse

๐ŸŒ Endpoint

/api/installmentplans/{installmentPlanNumber}/updateorder put

๐Ÿ”™ Back to Table of Contents


splitit.installment_plan.update_order2

๐Ÿ› ๏ธ Usage

update_order2_response = splitit.installment_plan.update_order2(
    body=None,
    x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
    x_splitit_touch_point="",
    ref_order_number="string_example",
    tracking_number="string_example",
    capture=True,
    shipping_status="Shipped",
    identifier={},
)

โš™๏ธ Parameters

x_splitit_idempotency_key: str
x_splitit_touch_point: str

TouchPoint

ref_order_number: str
tracking_number: str
capture: bool
shipping_status: ShippingStatus2
identifier: IdentifierContract

โš™๏ธ Request Body

InstallmentPlanUpdateRequestByIdentifier

๐Ÿ”„ Return

InstallmentPlanUpdateResponse

๐ŸŒ Endpoint

/api/installmentplans/updateorder put

๐Ÿ”™ Back to Table of Contents


splitit.installment_plan.verify_authorization

๐Ÿ› ๏ธ Usage

verify_authorization_response = splitit.installment_plan.verify_authorization(
    installment_plan_number="installmentPlanNumber_example",
    x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
    x_splitit_touch_point="",
)

โš™๏ธ Parameters

installment_plan_number: str
x_splitit_idempotency_key: str
x_splitit_touch_point: str

TouchPoint

๐Ÿ”„ Return

VerifyAuthorizationResponse

๐ŸŒ Endpoint

/api/installmentplans/{installmentPlanNumber}/verifyauthorization get

๐Ÿ”™ Back to Table of Contents


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.6.5.tar.gz (119.4 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.6.5-py3-none-any.whl (401.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: splitit_web_python_sdk-2.6.5.tar.gz
  • Upload date:
  • Size: 119.4 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.6.5.tar.gz
Algorithm Hash digest
SHA256 f0c6f8289125fe4782ac7511a56b2a70c322bfb460a030d839d504f2c27d449c
MD5 ca3a9b6d4a12405e52cdca4abc7af451
BLAKE2b-256 b6def2825c9226e5b05a0ecbfefda7f52001429cd3c253a6b39a984f0c189d63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for splitit_web_python_sdk-2.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5706f5e004c1b3a72fdbf913cebcec7400272a7e72cb17e9e82f7cc29cc7d8ef
MD5 9baf3d64f6d6bccb35c2c54740c61930
BLAKE2b-256 ca1793d694ca808191d9ea6fe77a83861963ed97ddf7174a4735094b187d8b9e

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