%global _empty_manifest_terminate_build 0 Name: python-lightspeed-api Version: 0.5 Release: 1 Summary: Simple library for interacting with the Lightspeed HQ API License: MIT License URL: https://github.com/beckf/lightspeed_api Source0: https://mirrors.nju.edu.cn/pypi/web/packages/fb/59/7b8927b2a19c2660d251f8a91327bd31833e837901872dcd339d9992bb76/lightspeed_api-0.5.tar.gz BuildArch: noarch %description # Lightspeed HQ API Python Library **Updated for Lightspeed API V3** Gives easy access to the Lightspeed retail point of sale api. To use create a new object with settings in a dictionary. Then just specify the endpoints and parameters in your request. For API documentation see: https://developers.lightspeedhq.com/retail/introduction/introduction/ Some examples of uses: ```python # Create a new dictionary with some settings that we will need. import lightspeed_api c = {'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 record ls.get('Customer/1234') # Delete a customer by id number ls.delete('Customer/1234') # Create a new customer formatted = {'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"]) ``` %package -n python3-lightspeed-api Summary: Simple library for interacting with the Lightspeed HQ API Provides: python-lightspeed-api BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-lightspeed-api # Lightspeed HQ API Python Library **Updated for Lightspeed API V3** Gives easy access to the Lightspeed retail point of sale api. To use create a new object with settings in a dictionary. Then just specify the endpoints and parameters in your request. For API documentation see: https://developers.lightspeedhq.com/retail/introduction/introduction/ Some examples of uses: ```python # Create a new dictionary with some settings that we will need. import lightspeed_api c = {'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 record ls.get('Customer/1234') # Delete a customer by id number ls.delete('Customer/1234') # Create a new customer formatted = {'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"]) ``` %package help Summary: Development documents and examples for lightspeed-api Provides: python3-lightspeed-api-doc %description help # Lightspeed HQ API Python Library **Updated for Lightspeed API V3** Gives easy access to the Lightspeed retail point of sale api. To use create a new object with settings in a dictionary. Then just specify the endpoints and parameters in your request. For API documentation see: https://developers.lightspeedhq.com/retail/introduction/introduction/ Some examples of uses: ```python # Create a new dictionary with some settings that we will need. import lightspeed_api c = {'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 record ls.get('Customer/1234') # Delete a customer by id number ls.delete('Customer/1234') # Create a new customer formatted = {'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"]) ``` %prep %autosetup -n lightspeed-api-0.5 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-lightspeed-api -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Wed May 31 2023 Python_Bot - 0.5-1 - Package Spec generated