paddle-python-sdk 0.1.0__py3-none-any.whl → 0.1.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
@@ -187,7 +187,7 @@ class Client:
187
187
  'Authorization': f"Bearer {self.__api_key}",
188
188
  'Content-Type': 'application/json',
189
189
  'Paddle-Version': str(self.use_api_version),
190
- 'User-Agent': 'PaddleSDK/python 0.1.0',
190
+ 'User-Agent': 'PaddleSDK/python 0.1.2',
191
191
  })
192
192
 
193
193
  # Configure retries
@@ -7,9 +7,9 @@ from paddle_billing.Entities.Collections.Paginator import Paginator
7
7
  class NotificationSettingCollection(Collection):
8
8
  @classmethod
9
9
  def from_list(cls, items_data: list, paginator: Paginator | None = None) -> NotificationSettingCollection:
10
- from paddle_billing.Entities.Notification import Notification
10
+ from paddle_billing.Entities.NotificationSetting import NotificationSetting
11
11
 
12
- items: list[Notification] = [Notification.from_dict(item) for item in items_data]
12
+ items: list[NotificationSetting] = [NotificationSetting.from_dict(item) for item in items_data]
13
13
 
14
14
  return NotificationSettingCollection(items, paginator)
15
15
 
@@ -6,7 +6,7 @@ from paddle_billing.Entities.Shared import Contacts, CustomData, Status
6
6
 
7
7
  @dataclass
8
8
  class UpdateBusiness:
9
- name: str | Undefined = Undefined
9
+ name: str | Undefined = Undefined()
10
10
  company_number: str | None | Undefined = Undefined()
11
11
  tax_identifier: str | None | Undefined = Undefined()
12
12
  contacts: list[Contacts] | Undefined = Undefined()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: paddle-python-sdk
3
- Version: 0.1.0
3
+ Version: 0.1.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
@@ -176,7 +176,7 @@ The SDK includes a helper class to verify webhook signatures sent by Notificatio
176
176
  ``` python
177
177
  from paddle_billing.Notifications import Secret, Verifier
178
178
 
179
- integrity_check = Verifier().verify(request, Secret('WEBHOOK_SECRET_KEY')
179
+ integrity_check = Verifier().verify(request, Secret('WEBHOOK_SECRET_KEY'))
180
180
  ```
181
181
 
182
182
  ## Learn more
@@ -3,7 +3,7 @@ examples/catalog_management.py,sha256=3osNPpYD5Dh3uq3Uf7Be9li806IkLbr8W7iRJMHMJJ
3
3
  examples/event_polling.py,sha256=XIpNzSfFIF_V72a-Fujal7y43PV4K28CCt0K29goz_Y,2407
4
4
  examples/get_products.py,sha256=LqA92ykNCJJmkTQIpnqrun7HaXozh3h0BpQ4S2JnsR0,1858
5
5
  examples/logger.py,sha256=mZuSjhKSqUYpAGtvcqmazkU8Eb7jzl_MS2zNUPFNvY0,1065
6
- paddle_billing/Client.py,sha256=PIB0B0jV1eHPAKzeektZ93Gg56nUUYqh6B5tpRkZPNE,8317
6
+ paddle_billing/Client.py,sha256=faWJ9xEnZEhJjr3_lhoDIHzKooMMi92U2_1MAloX-yg,8317
7
7
  paddle_billing/ConditionallyRemoveImportMeta.py,sha256=tyCEj29dCDO3s_28NwBITRzU0ms2o9x0uToDpsufaEo,652
8
8
  paddle_billing/EnumStringify.py,sha256=iDvKULZat3jx9A-_PhvoN6CbFGf2pyxrQeYZxqX9n8M,48
9
9
  paddle_billing/Environment.py,sha256=IV5eVH131bhNkM9mAGpkziERsSsWPu-xWxGkdCQEb5c,346
@@ -54,7 +54,7 @@ paddle_billing/Entities/Collections/EventCollection.py,sha256=eU8U7t07zjxSDx22yQ
54
54
  paddle_billing/Entities/Collections/EventTypeCollection.py,sha256=0I9OjQOarMpKFpn6jG-7TqevbFN6chew0PahCPm_VtI,597
55
55
  paddle_billing/Entities/Collections/NotificationCollection.py,sha256=rBbh4eJGBOu0hpypuo4M5Zhz1mC34NAnr_lJOfpDH30,618
56
56
  paddle_billing/Entities/Collections/NotificationLogCollection.py,sha256=y6jdMdHVxmKHdV2O0EmnQWBwX_n66HZ7JT9z1fdy61U,639
57
- paddle_billing/Entities/Collections/NotificationSettingCollection.py,sha256=3aly5rdN6lDA2E0w4HZPhHVL4PjSJemdrphCwPwXcuM,639
57
+ paddle_billing/Entities/Collections/NotificationSettingCollection.py,sha256=qxijS0qdEJsVdITMJATWCvBz2ZwSYJh6K9fRM8jvoDc,667
58
58
  paddle_billing/Entities/Collections/Paginator.py,sha256=uFwEpZ_K9K9VZGM5tUKYaLmSSodwvUjEjpvVCb0xnQ0,928
59
59
  paddle_billing/Entities/Collections/PriceCollection.py,sha256=xYBIv0faD7gnkvMbITmxFIDSsM-P0i5nsBMXgOyRnbY,569
60
60
  paddle_billing/Entities/Collections/ProductCollection.py,sha256=o8YmbBjFcAWRVQ_sklzSzWBDw25YcxRHnHL0aG6m8X8,583
@@ -373,7 +373,7 @@ paddle_billing/Resources/Businesses/BusinessesClient.py,sha256=NDjMm83hdne8c47Ej
373
373
  paddle_billing/Resources/Businesses/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
374
374
  paddle_billing/Resources/Businesses/Operations/CreateBusiness.py,sha256=QU5_Git6qrrXfDL-E6_51qQ39G9a6B0_FdWXS2xFkr0,559
375
375
  paddle_billing/Resources/Businesses/Operations/ListBusinesses.py,sha256=25TggrnGOrwZ8XeyQqQ2zCk06F9fypNyYZcBf4BfD8U,1574
376
- paddle_billing/Resources/Businesses/Operations/UpdateBusiness.py,sha256=jUmNg0cdqelxXbHNpHEzJS_-mPeBrhGFjQ5JjaYAJiY,677
376
+ paddle_billing/Resources/Businesses/Operations/UpdateBusiness.py,sha256=VOt0Opj6dp_Do0w-pHIZloBk7ZKxEFsa1bVyPnfqEAY,679
377
377
  paddle_billing/Resources/Businesses/Operations/__init__.py,sha256=mctosPK-Kdb4n_AmdIqVFKeldZxcjw8e4k4iWWoRml0,267
378
378
  paddle_billing/Resources/Customers/CustomersClient.py,sha256=Vd7_xEfr9Qwsu_k95Kyaj4_G9oUEtOP2IKg8pn4ohLk,2398
379
379
  paddle_billing/Resources/Customers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -484,7 +484,7 @@ tests/Functional/Resources/Events/test_EventsClient.py,sha256=ZVK_CcDkKXmAeUfrcD
484
484
  tests/Functional/Resources/NotificationLogs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
485
485
  tests/Functional/Resources/NotificationLogs/test_NotificationLogsClient.py,sha256=aQ8LtFlOELL90q6HDiAWFVJl1yLxXMFDIkHKarmtLJw,2755
486
486
  tests/Functional/Resources/NotificationSettings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
487
- tests/Functional/Resources/NotificationSettings/test_NotificationSettingsClient.py,sha256=k1app_sfP1k3KOXQU2RSDqRy6WbAdr9JRJO_yCeldw8,13680
487
+ tests/Functional/Resources/NotificationSettings/test_NotificationSettingsClient.py,sha256=GBoV3ThSbpqkH9ISsfpKvM-IQUXveiii3Py9nsXVZmY,13858
488
488
  tests/Functional/Resources/Notifications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
489
489
  tests/Functional/Resources/Notifications/test_NotificationsClient.py,sha256=y81MfmVBZQCxX_tuZE5hQ29WLjlV0SHKqmgy29aGFT0,9232
490
490
  tests/Functional/Resources/Prices/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -510,8 +510,8 @@ tests/Utils/FakeResponse.py,sha256=naT8IgXDtbAxAAj-T3FoJl9Ze4kXb-O-Mf6BarWU6oM,3
510
510
  tests/Utils/ReadsFixture.py,sha256=VEIEST29lorMZHA11XYn7aqtEYry2TDUqeWd63IRLbM,1153
511
511
  tests/Utils/TestClient.py,sha256=Y13roXRdkDp7r73O1p030deWZNeDhDxHtkvKxNG935M,1158
512
512
  tests/Utils/__init__.py,sha256=fkxfGYArVZPD7GQlBEwT6FY052mTD83VnDerzsTK7hA,39
513
- paddle_python_sdk-0.1.0.dist-info/LICENSE,sha256=e5Sn9mzCdpjnqCLxXpGHNKdYB6JlRSTLhN_CD4WSO6w,10770
514
- paddle_python_sdk-0.1.0.dist-info/METADATA,sha256=QxWzNyqGjYRIHpiuaKnEbnLPs81ue3SGuk_2lff9QA8,7246
515
- paddle_python_sdk-0.1.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
516
- paddle_python_sdk-0.1.0.dist-info/top_level.txt,sha256=9a07VPng7o5wK8VAXkl6NC30xrNbW9zff_02jHyHi4c,30
517
- paddle_python_sdk-0.1.0.dist-info/RECORD,,
513
+ paddle_python_sdk-0.1.2.dist-info/LICENSE,sha256=e5Sn9mzCdpjnqCLxXpGHNKdYB6JlRSTLhN_CD4WSO6w,10770
514
+ paddle_python_sdk-0.1.2.dist-info/METADATA,sha256=aq5Uof1fMhvGWGF78S7agNTcpPf513VDdDe3LEnZCds,7247
515
+ paddle_python_sdk-0.1.2.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
516
+ paddle_python_sdk-0.1.2.dist-info/top_level.txt,sha256=9a07VPng7o5wK8VAXkl6NC30xrNbW9zff_02jHyHi4c,30
517
+ paddle_python_sdk-0.1.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (70.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -200,13 +200,17 @@ class TestNotificationSettingsClient:
200
200
  expected_url,
201
201
  ):
202
202
  expected_url = f"{test_client.base_url}{expected_url}"
203
- mock_requests.get(expected_url, status_code=expected_response_status)
203
+ mock_requests.get(expected_url, status_code=expected_response_status, text=expected_response_body)
204
204
 
205
205
  response = test_client.client.notification_settings.list()
206
206
  last_request = mock_requests.last_request
207
207
 
208
208
  assert isinstance(response, NotificationSettingCollection)
209
+ assert all(
210
+ isinstance(item, NotificationSetting) for item in response.items
211
+ ), "Not all items are NotificationSetting"
209
212
  assert last_request is not None
213
+
210
214
  assert last_request.method == 'GET'
211
215
  assert test_client.client.status_code == expected_response_status
212
216
  assert unquote(last_request.url) == expected_url, \