Package: paddle-python
This project has changeed name to paddle-clientGithub -paddle-clientPyPi -paddle-clientIf you have installed the old paddle-python please remove the old paddle-python and install paddle-client to ensure you get the latest changes, paddle-python will no longer be updatedpipuninstallpaddle-python
pipinstallpaddle-clientThe README below have been updated to reflect the above. If you want to see the old version please seerelease 0.5.1 - the last release as paddle-pythonA python (3.5+) wrapper around thePaddle.comAPIIf you are looking at intergrating Paddle with Django check outdj-paddleNote: This is a work in progress, not all of the Paddle endpoints have been implemented yetQuick startInstallationpipinstallpaddle-clientUsageTo use the Paddle API you will need a Paddle Vendor ID and API key which can be found onPaddle's authentication pagefrompaddleimportPaddleClientpaddle=PaddleClient(vendor_id=12345,api_key='myapikey')paddle.list_products()Ifvendor_idandapi_keyare not passed through when initalising Paddle will fall back and try and use environmental variables calledPADDLE_VENDOR_IDandPADDLE_API_KEYexportPADDLE_VENDOR_ID=12345exportPADDLE_API_KEY="myapikey"frompaddleimportPaddleClientpaddle=PaddleClient()paddle.list_products()DocumentationComing soon. Please seeWorking endpointsbelow for basic usage.ContributingAll contributions are welcome and appreciated. Please seeCONTRIBUTING.mdfor more details including details on how to run tests etc.Working endpointsGet Order DetailsGet User HistoryGet PricesList CouponsCreate CouponDelete CouponUpdate CouponList ProductsList TransactionsRefund PaymentList PlansCreate PlanList Subscription UsersCancel SubscriptionUpdate SubscriptionPreview Subscription UpdateGet Webhook Historypaddle.get_order_details(checkout_id=checkout_id)paddle.get_user_history(email=email)paddle.get_prices(product_ids=[product_id])paddle.list_coupons(product_id=product_id)paddle.create_coupon(coupon_type='product',discount_type='percentage',discount_amount=50,allowed_uses=1,recurring=False,currency='USD',product_ids=product_ids,coupon_code='50%OFF',description='50% off coupon over $10',expires=expires,minimum_threshold=10,group='paddle-python',)paddle.delete_coupon(coupon_code=new_coupon_code,product_id=product_id)paddle.update_coupon(coupon_code=coupon_code,new_coupon_code='40%OFF',new_group='paddle-python-test',product_ids=[product_id],expires=expires,allowed_uses=1,currency='USD',minimum_threshold=10,discount_amount=40,recurring=True)paddle.list_products()paddle.list_transactions(entity='subscription',entity_id=subscription_id)paddle.refund_payment(order_id=order_id,amount=amount,reason=reason)paddle.list_plans()paddle.create_plan(plan_name='plan_name',plan_trial_days=14,plan_length=1,plan_type='month',main_currency_code='USD',initial_price_usd=50,recurring_price_usd=50,)paddle.list_subscription_users()paddle.cancel_subscription(subscription_id=1234)paddle.update_subscription(subscription_id=1234,pause=True)paddle.preview_update_subscription(subscription_id=123,bill_immediately=True,quantity=101,)paddle.get_webhook_history()Failing EndpointsThe below endpoints have been implimented but are not working correctly according to the tests. They have been commented out inpaddle/paddle.pyand the tests will skip is the methods do not existGenerate License-Paddle error 108 - Unable to find requested productCreate pay link-Paddle error 108 - Unable to find requested productToDoFix generate license and create pay link endpointsPaddle API endpointsAdd ModifierDelete ModifierList ModifiersList PaymentsReschedule PaymentCreate One-off ChargeWork out if we want to include 'alias' methods like pause_subscriptionGet test coverage to 100%Docs (auto docs?)Usepytest-mockSpyto check params, json, urls etc for test requestsNeeded to any tests which skip due to missing dataHow to deal with the manual cleanup?Pull request templateTravisCI?DependabotRemove double call for exception error message checking - How to get the exception str frompytest.raises()? pytest-mockSpy?Add pytest warnings to provide direct links to Paddle for bits that need to be cleaned up