paddle-python-sdk 0.3.0__py3-none-any.whl → 0.3.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
paddle_billing/Client.py CHANGED
@@ -206,7 +206,7 @@ class Client:
206
206
  "Authorization": f"Bearer {self.__api_key}",
207
207
  "Content-Type": "application/json",
208
208
  "Paddle-Version": str(self.use_api_version),
209
- "User-Agent": "PaddleSDK/python 0.2.2",
209
+ "User-Agent": "PaddleSDK/python 0.3.2",
210
210
  }
211
211
  )
212
212
 
@@ -15,7 +15,7 @@ class TransactionLineItemPreview:
15
15
  unit_totals: UnitTotals
16
16
  totals: Totals
17
17
  product: Product
18
- proration: Proration
18
+ proration: Proration | None
19
19
 
20
20
  @staticmethod
21
21
  def from_dict(data: dict) -> TransactionLineItemPreview:
@@ -26,5 +26,5 @@ class TransactionLineItemPreview:
26
26
  unit_totals=UnitTotals.from_dict(data["unit_totals"]),
27
27
  totals=Totals.from_dict(data["totals"]),
28
28
  product=Product.from_dict(data["product"]),
29
- proration=Proration.from_dict(data["proration"]),
29
+ proration=Proration.from_dict(data["proration"]) if data.get("proration") else None,
30
30
  )
@@ -0,0 +1,20 @@
1
+ from paddle_billing.ResponseParser import ResponseParser
2
+
3
+ from paddle_billing.Entities.IPAddresses import IPAddresses
4
+
5
+ from typing import TYPE_CHECKING
6
+
7
+ if TYPE_CHECKING:
8
+ from paddle_billing.Client import Client
9
+
10
+
11
+ class IPAddressesClient:
12
+ def __init__(self, client: "Client"):
13
+ self.client = client
14
+ self.response = None
15
+
16
+ def get_ip_addresses(self) -> IPAddresses:
17
+ self.response = self.client.get_raw("/ips")
18
+ parser = ResponseParser(self.response)
19
+
20
+ return IPAddresses.from_dict(parser.get_data())
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: paddle-python-sdk
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Paddle's Python SDK for Paddle Billing
5
5
  Home-page: https://developer.paddle.com/api-reference/overview
6
6
  Author: Paddle and contributors
@@ -4,7 +4,7 @@ examples/event_polling.py,sha256=580dg_8CFrSCA89Mr1ny4V1gtB3-hk-LfePTbI7DT5w,217
4
4
  examples/get_products.py,sha256=4V7ZG1SH6Oxojufbtzm_TMySw4cOBMQ99mgQK_hlwFQ,1875
5
5
  examples/logger.py,sha256=AxmQmMrsM0ZqMIUnh6iARiczL4S4F9OqQcOu-67owNg,1042
6
6
  examples/webhook_verification.py,sha256=qkNscNdNZUAgxEIk83tCiljN2VmfePZ_k8zTliKz2QY,1205
7
- paddle_billing/Client.py,sha256=XMzASygOtRn42gTrxLs8kM3TnyQwp_iP8jn8E2ir8ag,8742
7
+ paddle_billing/Client.py,sha256=Cbw72MciSgdQtbV8HA-LqxzgL9ZeSpl8P-2RcmAjQgs,8742
8
8
  paddle_billing/EnumStringify.py,sha256=iDvKULZat3jx9A-_PhvoN6CbFGf2pyxrQeYZxqX9n8M,48
9
9
  paddle_billing/Environment.py,sha256=sY4nrJUwlTugsZKncieAnvfCojqCcKWi4X7rFzjFeSQ,417
10
10
  paddle_billing/FiltersNone.py,sha256=HxjE6RJb7sy6txphpZSrCTQZt1Ua0XpIz8NDLHC43zo,268
@@ -142,7 +142,7 @@ paddle_billing/Entities/Shared/TaxRatesUsed.py,sha256=K5ItHBXGQkhvt4sqNDTLrgVGH7
142
142
  paddle_billing/Entities/Shared/TimePeriod.py,sha256=XuWeYYeQmL3Aygd5QXNqgz2yWKkQVq22dBUvmLewi8w,403
143
143
  paddle_billing/Entities/Shared/Totals.py,sha256=i1pH3_SXGLSC2PO-j2J8hLr3Nh__KueLN54KCEwO71g,393
144
144
  paddle_billing/Entities/Shared/TransactionDetailsPreview.py,sha256=k9-7NbZzTDvHO4_5NBdO51NofZ2RaybNTX9oQQfBsSU,868
145
- paddle_billing/Entities/Shared/TransactionLineItemPreview.py,sha256=owz2I4yanX_GsDHvJWoOJHab-a4GKwcodsuYqTVktvQ,989
145
+ paddle_billing/Entities/Shared/TransactionLineItemPreview.py,sha256=CdG3b9vvfISFqgtzZj_FCgx5hpKrOOlC9-TKHeoxSY4,1031
146
146
  paddle_billing/Entities/Shared/TransactionOrigin.py,sha256=ITifdfn7H7a7LWQaztQO3H2jwba1EcDlkQSQHI580_8,525
147
147
  paddle_billing/Entities/Shared/TransactionPaymentAttempt.py,sha256=kemUuJiTrQDvPWn2cPFuFLMxEn62okRDgAmrQa7hrPk,1388
148
148
  paddle_billing/Entities/Shared/TransactionPayoutTotals.py,sha256=wok93EkK-bQIeJK-k44xwUpYSwff2Ki3mJt6gx0bODU,1013
@@ -399,6 +399,8 @@ paddle_billing/Resources/Events/EventsClient.py,sha256=yX3gbcGIg_OG2At0RodwWDeBV
399
399
  paddle_billing/Resources/Events/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
400
400
  paddle_billing/Resources/Events/Operations/ListEvents.py,sha256=BNsj9KdAr686OkvYHs3Z2WZNXKXrGKqkvyGonbwSvtM,335
401
401
  paddle_billing/Resources/Events/Operations/__init__.py,sha256=Nfec716BOJ20W54RBd3DGLB0tzhjrCHY2t_Ym_LcO58,77
402
+ paddle_billing/Resources/IPAddresses/IPAddressesClient.py,sha256=DgtD578xAJjuAA1BO1PZzRTgMXJJayY4PfNnL-gnl_M,547
403
+ paddle_billing/Resources/IPAddresses/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
402
404
  paddle_billing/Resources/NotificationLogs/NotificationLogsClient.py,sha256=nQcUkwNq4Z6GDnH6vRadpPnmbjseUCuYIP_aH8-a2f0,978
403
405
  paddle_billing/Resources/NotificationLogs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
404
406
  paddle_billing/Resources/NotificationLogs/Operations/ListNotificationLogs.py,sha256=_otOrgC5jcK8VgmfHX6JDSmqvolw8_BZmvc0l4FoPlA,337
@@ -551,8 +553,8 @@ tests/Utils/ReadsFixture.py,sha256=M3Ot3xHXp_C7vwttna9deLPHBAO8ml2Jb4thhHOJJ38,1
551
553
  tests/Utils/TestClient.py,sha256=-wc7hJMuR6WC-ukw0c7I59b5-8hj_-nzq__-2M81elg,1453
552
554
  tests/Utils/TestLogger.py,sha256=pFO9x711buRmg-8DAqpzIJP_hr21JPty1_ZQRcwoGKk,554
553
555
  tests/Utils/__init__.py,sha256=JtqJNPKqbNZ9exlpXlF3yj_9cfylPGlvopjQYi7yYTA,37
554
- paddle_python_sdk-0.3.0.dist-info/LICENSE,sha256=e5Sn9mzCdpjnqCLxXpGHNKdYB6JlRSTLhN_CD4WSO6w,10770
555
- paddle_python_sdk-0.3.0.dist-info/METADATA,sha256=qQVihH2sa4UrRBh0E-d3Oqe-MXKSa_X4veSt3k2CvPI,7392
556
- paddle_python_sdk-0.3.0.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
557
- paddle_python_sdk-0.3.0.dist-info/top_level.txt,sha256=9a07VPng7o5wK8VAXkl6NC30xrNbW9zff_02jHyHi4c,30
558
- paddle_python_sdk-0.3.0.dist-info/RECORD,,
556
+ paddle_python_sdk-0.3.2.dist-info/LICENSE,sha256=e5Sn9mzCdpjnqCLxXpGHNKdYB6JlRSTLhN_CD4WSO6w,10770
557
+ paddle_python_sdk-0.3.2.dist-info/METADATA,sha256=_QzTos9VlIl8t4aK5HcDfr74KLvjkUREV0GPH4hugRQ,7392
558
+ paddle_python_sdk-0.3.2.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
559
+ paddle_python_sdk-0.3.2.dist-info/top_level.txt,sha256=9a07VPng7o5wK8VAXkl6NC30xrNbW9zff_02jHyHi4c,30
560
+ paddle_python_sdk-0.3.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.1.0)
2
+ Generator: setuptools (75.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5