Secursus api的库PiP。

secursus-api的Python项目详细描述


Secursus集成API

Secursus是包裹最强大的数字保险,覆盖最敏感的物品,每个包裹最高可达100000欧元。 为了将保险服务集成到您的网站中,我们提供了这个php库,它将允许您自动化您的保险订单。在

有关产品的更多信息,请访问我们的网站: https://www.secursus.com/integration/

先决条件

要使用secursusapi,您需要在我们的平台上创建一个帐户并激活它。在

https://www.secursus.com/integration/registration.php

安装

pip install -i secursus-api

使用

^{pr2}$

文件

获取保险金额费用

此方法用于计算保险费金额。在

更多详细信息:https://developer.secursus.com/parcels/fees

用法

insurance_amount=secursus.get_insurance_amount(10000)

参数

“创建地块订单”方法只能接收一个参数,即地块值。此参数必须是integer,并表示包裹的总价值(以欧分为单位)。在

创建包裹订单

将创建一个parcel对象并返回保险凭证。创建对象后,如果要取消保险单,则有12小时的时间。在

更多详细信息:https://developer.secursus.com/parcels/create

用法

parcel_order=secursus.create_parcel_order(params)

数据参数

create parcel order方法可以接收一个dictionary,该参数可以包含以下八个参数(需要六个):

EntryRequiredData typeDescription
^{}YesIntegerTotal value of the order in euro cents.
^{}YesStringCustomer first name.
^{}YesStringCustomer last name.
^{}YesStringCustomer email address.
^{}YesStringCustomer full address.
^{}YesJsonDetails of cart on your website. No specific format is required, this information will be analyzed for any claim.
^{}NoStringCustomer company name.
^{}NoStringLanguage used for the insurance confirmation email sent to the customer. Two possible values: "fr" or "en". Default value: "en".

检索包裹订单

该方法用于获取保险凭证和包裹信息。在

用法

parcel_order=secursus.retrieve_parcel_order(id_parcel)

参数

retrieve parcelorder方法只能接收一个参数parcel id。此参数必须是string,并且是createParcelOrder方法生成的保险id。在

检索历史包裹报告

此方法用于获取帐户的所有包裹的列表。在

用法

parcel_order=secursus.retrieve_history_report(id_parcel)

检索当前地块报告

此方法用于获取当月到期的所有包裹的列表。在

用法

parcel_order=secursus.retrieve_current_report(id_parcel)

取消包裹订单

此方法用于取消您先前发送的保险单。在

注意:创建保险请求后,如果要取消保险订单,您有12小时的时间。在此期间后,保险单被视为已确认,不能取消。然后支付保险费。在

更多详细信息:https://developer.secursus.com/parcels/cancel

用法

parcel_order=secursus.cancel_parcel_order(id_parcel)

参数

retrieve parcelorder方法只能接收一个参数parcel id。此参数必须是string,并且是createParcelOrder方法生成的保险id。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java创建猜谜游戏程序   JavaWebSocketContainer。connectToServer似乎挂起了   如何在java中中断函数   java c#socket client multiple BeginSend()未到达服务器   不可见的组件然后在Java中的窗格之间切换   java在应用程序类中使用静态接口安全吗?   java等待函数完成,直到回调到来   使用DataOutputStream时的java新行,Android   java服务对象的定义是什么?   基于视图的javahibernate复合密钥   java将varchar连接到char在JPA(oracle)中不起作用   如何在java中通过point类读取多个点?