Client for splitit-web-api-v3
Project description
splitit-web-python-sdk@2.3.0
Splitit's Web API
Requirements
Python >=3.7
Installing
pip install splitit-web-python-sdk==2.3.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
)
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
)
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
- AddressData
- AddressDataModel
- AuthorizationModel
- CardBrand
- CardData
- CardType
- CheckInstallmentsEligibilityRequest
- Error
- ErrorExtended
- EventsEndpointsModel
- FailedResponse
- GwAuthorizationStatus
- IdentifierContract
- InitiatePlanResponse
- InitiateRedirectionEndpointsModel
- Installment
- InstallmentPlanCancelResponse
- InstallmentPlanCreateRequest
- InstallmentPlanCreateResponse
- InstallmentPlanGetResponse
- InstallmentPlanInitiateRequest
- InstallmentPlanRefundRequest
- InstallmentPlanRefundResponse
- InstallmentPlanSearchResponse
- InstallmentPlanUpdateRequest
- InstallmentPlanUpdateRequestByIdentifier
- InstallmentPlanUpdateResponse
- InstallmentStatus
- InstallmentsEligibilityResponse
- LinksData
- LinksModel
- PaymentMethodModel
- PaymentMethodType
- PaymentPlanOptionModel
- PlanData
- PlanDataModel
- PlanErrorResponse
- PlanStatus
- PurchaseMethod
- RedirectionEndpointsModel
- RefundModel
- RefundStatus
- RefundStrategy
- RefundSummary
- SearchInstallmentPlanResponseItem
- ShippingStatus
- ShippingStatus2
- ShopperData
- TestModes
- ThreeDsRedirectDataV3
- UpdateOrderRequest
- UxSettingsModel
- VerifyAuthorizationResponse
Author
This Python package is automatically generated by Konfig
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for splitit_web_python_sdk-2.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c051397096bf2534635a77564963e0795fa8fd073bf4a0d5852db760ac14101 |
|
MD5 | 7b07cc058f2277cfc6d2046b4f789d7a |
|
BLAKE2b-256 | e018d6813c904973922e6bcbbe0ff8420968001a6889485c4617c466a3649825 |
Close
Hashes for splitit_web_python_sdk-2.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f785555c50e9c2bcbb807e3935150ee42ea4e5c2f9d75420a2d319efc0bf464 |
|
MD5 | 018957f769aa7b54104463f72913bef8 |
|
BLAKE2b-256 | ec8ac66e0cfa39303a728b6fc687729a46c0c97b3f0a52cb2b40fd3380c3f5a3 |