用于与LightSpeed HQ API交互的简单库

lightspeed-api的Python项目详细描述


lightspeed hq api python库

轻松访问LightSpeed零售点API。

使用在字典中创建具有设置的新对象。那就说明 请求中的终结点和参数。

有关API文档,请参见:https://developers.lightspeedhq.com/retail/introduction/introduction/

一些用法示例:

# Create a new dictionary with some settings that we will need.importlightspeed_apic={'account_id':'12345678','client_id':'developer_client_id','client_secret':'developer_client_secret','refresh_token':'special_refresh_token'}ls=lightspeed_api.Lightspeed(c)# Get a customer recordls.get('Customer/1234')# Delete a customer by id numberls.delete('Customer/1234')# Create a new customerformatted={'Customer':{'firstName':'Joe','lastName':'Smith','companyRegistrationNumber':'1234','customerTypeID':1,'Contact':{'custom':'','noEmail':'false','noPhone':'false','noMail':'false','Emails':{'ContactEmail':{'address':'joe.smith@company.com','useType':'Primary'}},'Addresses':{'ContactAddress':{'address1':'1212 Street Drive','address2':'','city':'New York','state':'New York','zip':'12345','country':'USA','countryCode':'','stateCode':''}}},}}ls.create("Customer",formatted["Customer"])

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

推荐PyPI第三方库


热门话题
javagae/JPA/Datastore如何查询无主列表   java从xml中读取未知元素   java如何在控制台上显示MavReplugin单元测试覆盖率报告   java什么被认为是遍历LDAP DIT的正确方法?   Eclipse(Java)在创建了一个新包之后,我无法向其中添加源文件   java new REngine启动并立即停止   java Android:如何从保存在SQLite数据库中的listview中删除项目?   找不到java Gradle DSL方法:“compile()”错误   java使用POI获取具有特定列名的每一行中的值   java解析JSON文件   java中断for循环,返回4个结果,而不是2个   LDAP处理过程中发生java未分类异常;嵌套的异常是javax。命名。NamingException   当表单在基于spring3注释的控制器中验证失败时,java引用数据将丢失   java Android,从web获取数据并更新UI(多线程和MVC设计模式)   用于OS X Yosemite的java优化Swing程序