prestashop orders client
1.0.0
Prestashop订单客户端是一个简单,经过彻底测试的客户端,用于Prestashop API,旨在无缝提取订单数据。最初创建的目的是满足我们对诸如向我们的邮政服务发送新的付费订单等任务的自动化需求,我们决定与社区分享这个易于使用的客户。我们希望它也证明对他人也有用!
> >> from prestashop_orders_client import PrestaShopOrderClient
> >> client = PrestaShopOrderClient ( shop_link = "myshop.com" , api_key = "my_api_key" )
> >> client . get_order ( 1 )
Order ( id = 1 , total_paid = 500.0 , reference = 'ABCD'
order_state = 'Shipped' , email = '[email protected]' ,
first_name = 'John' , last_name = 'Doe' ,
company_name = None , phone = '+12345678' ,
address = 'Example address' ,
city = 'Example city' , post_code = '123456' ,
country = 'Example country' , state = None )
> >> client . get_all_orders ()
[
Order ( id = 1 , total_paid = 500.0 , reference = 'ABCD'
order_state = 'Shipped' , email = '[email protected]' ,
first_name = 'John' , last_name = 'Doe' ,
company_name = None , phone = '+12345678' ,
address = 'Example address' ,
city = 'Example city' , post_code = '123456' ,
country = 'Example country' , state = None ),
Order ( id = 2 , total_paid = 1000.0 , reference = 'ABCD'
order_state = 'Shipped' , email = '[email protected]' ,
first_name = 'John' , last_name = 'Doe' ,
company_name = None , phone = '+12345678' ,
address = 'Example address' ,
city = 'Example city' , post_code = '123456' ,
country = 'Example country' , state = None ),
....
]
>> > client . orders_amount
8确保您的服务器安装了SSL证书,因为Prestashop API需要它,并且我们的客户端使用“ HTTPS”来执行请求。
客户可在PYPI上找到,需要Python 3.10+
$ python -m pip install prestashop_orders_client 该项目是根据Apache 2.0许可证获得许可的。