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