dub 0.24.0__py3-none-any.whl → 0.24.1__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.
dub/partners.py CHANGED
@@ -1504,313 +1504,3 @@ class Partners(BaseSDK):
1504
1504
  http_res_text,
1505
1505
  http_res,
1506
1506
  )
1507
-
1508
- def update_sale(
1509
- self,
1510
- *,
1511
- request: Optional[
1512
- Union[
1513
- operations.UpdatePartnerSaleRequestBody,
1514
- operations.UpdatePartnerSaleRequestBodyTypedDict,
1515
- ]
1516
- ] = None,
1517
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
1518
- server_url: Optional[str] = None,
1519
- timeout_ms: Optional[int] = None,
1520
- http_headers: Optional[Mapping[str, str]] = None,
1521
- ) -> Optional[operations.UpdatePartnerSaleResponseBody]:
1522
- r"""Update a sale for a partner.
1523
-
1524
- Update an existing sale amount. This is useful for handling refunds (partial or full) or fraudulent sales.
1525
-
1526
- :param request: The request object to send.
1527
- :param retries: Override the default retry configuration for this method
1528
- :param server_url: Override the default server URL for this method
1529
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1530
- :param http_headers: Additional headers to set or replace on requests.
1531
- """
1532
- base_url = None
1533
- url_variables = None
1534
- if timeout_ms is None:
1535
- timeout_ms = self.sdk_configuration.timeout_ms
1536
-
1537
- if server_url is not None:
1538
- base_url = server_url
1539
- else:
1540
- base_url = self._get_url(base_url, url_variables)
1541
-
1542
- if not isinstance(request, BaseModel):
1543
- request = utils.unmarshal(
1544
- request, Optional[operations.UpdatePartnerSaleRequestBody]
1545
- )
1546
- request = cast(Optional[operations.UpdatePartnerSaleRequestBody], request)
1547
-
1548
- req = self._build_request(
1549
- method="PATCH",
1550
- path="/partners/sales",
1551
- base_url=base_url,
1552
- url_variables=url_variables,
1553
- request=request,
1554
- request_body_required=False,
1555
- request_has_path_params=False,
1556
- request_has_query_params=True,
1557
- user_agent_header="user-agent",
1558
- accept_header_value="application/json",
1559
- http_headers=http_headers,
1560
- security=self.sdk_configuration.security,
1561
- get_serialized_body=lambda: utils.serialize_request_body(
1562
- request,
1563
- False,
1564
- True,
1565
- "json",
1566
- Optional[operations.UpdatePartnerSaleRequestBody],
1567
- ),
1568
- timeout_ms=timeout_ms,
1569
- )
1570
-
1571
- if retries == UNSET:
1572
- if self.sdk_configuration.retry_config is not UNSET:
1573
- retries = self.sdk_configuration.retry_config
1574
-
1575
- retry_config = None
1576
- if isinstance(retries, utils.RetryConfig):
1577
- retry_config = (retries, ["429", "500", "502", "503", "504"])
1578
-
1579
- http_res = self.do_request(
1580
- hook_ctx=HookContext(
1581
- base_url=base_url or "",
1582
- operation_id="updatePartnerSale",
1583
- oauth2_scopes=[],
1584
- security_source=self.sdk_configuration.security,
1585
- ),
1586
- request=req,
1587
- error_status_codes=[
1588
- "400",
1589
- "401",
1590
- "403",
1591
- "404",
1592
- "409",
1593
- "410",
1594
- "422",
1595
- "429",
1596
- "4XX",
1597
- "500",
1598
- "5XX",
1599
- ],
1600
- retry_config=retry_config,
1601
- )
1602
-
1603
- response_data: Any = None
1604
- if utils.match_response(http_res, "200", "application/json"):
1605
- return utils.unmarshal_json(
1606
- http_res.text, Optional[operations.UpdatePartnerSaleResponseBody]
1607
- )
1608
- if utils.match_response(http_res, "400", "application/json"):
1609
- response_data = utils.unmarshal_json(http_res.text, errors.BadRequestData)
1610
- raise errors.BadRequest(data=response_data)
1611
- if utils.match_response(http_res, "401", "application/json"):
1612
- response_data = utils.unmarshal_json(http_res.text, errors.UnauthorizedData)
1613
- raise errors.Unauthorized(data=response_data)
1614
- if utils.match_response(http_res, "403", "application/json"):
1615
- response_data = utils.unmarshal_json(http_res.text, errors.ForbiddenData)
1616
- raise errors.Forbidden(data=response_data)
1617
- if utils.match_response(http_res, "404", "application/json"):
1618
- response_data = utils.unmarshal_json(http_res.text, errors.NotFoundData)
1619
- raise errors.NotFound(data=response_data)
1620
- if utils.match_response(http_res, "409", "application/json"):
1621
- response_data = utils.unmarshal_json(http_res.text, errors.ConflictData)
1622
- raise errors.Conflict(data=response_data)
1623
- if utils.match_response(http_res, "410", "application/json"):
1624
- response_data = utils.unmarshal_json(
1625
- http_res.text, errors.InviteExpiredData
1626
- )
1627
- raise errors.InviteExpired(data=response_data)
1628
- if utils.match_response(http_res, "422", "application/json"):
1629
- response_data = utils.unmarshal_json(
1630
- http_res.text, errors.UnprocessableEntityData
1631
- )
1632
- raise errors.UnprocessableEntity(data=response_data)
1633
- if utils.match_response(http_res, "429", "application/json"):
1634
- response_data = utils.unmarshal_json(
1635
- http_res.text, errors.RateLimitExceededData
1636
- )
1637
- raise errors.RateLimitExceeded(data=response_data)
1638
- if utils.match_response(http_res, "500", "application/json"):
1639
- response_data = utils.unmarshal_json(
1640
- http_res.text, errors.InternalServerErrorData
1641
- )
1642
- raise errors.InternalServerError(data=response_data)
1643
- if utils.match_response(http_res, "4XX", "*"):
1644
- http_res_text = utils.stream_to_text(http_res)
1645
- raise errors.SDKError(
1646
- "API error occurred", http_res.status_code, http_res_text, http_res
1647
- )
1648
- if utils.match_response(http_res, "5XX", "*"):
1649
- http_res_text = utils.stream_to_text(http_res)
1650
- raise errors.SDKError(
1651
- "API error occurred", http_res.status_code, http_res_text, http_res
1652
- )
1653
-
1654
- content_type = http_res.headers.get("Content-Type")
1655
- http_res_text = utils.stream_to_text(http_res)
1656
- raise errors.SDKError(
1657
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
1658
- http_res.status_code,
1659
- http_res_text,
1660
- http_res,
1661
- )
1662
-
1663
- async def update_sale_async(
1664
- self,
1665
- *,
1666
- request: Optional[
1667
- Union[
1668
- operations.UpdatePartnerSaleRequestBody,
1669
- operations.UpdatePartnerSaleRequestBodyTypedDict,
1670
- ]
1671
- ] = None,
1672
- retries: OptionalNullable[utils.RetryConfig] = UNSET,
1673
- server_url: Optional[str] = None,
1674
- timeout_ms: Optional[int] = None,
1675
- http_headers: Optional[Mapping[str, str]] = None,
1676
- ) -> Optional[operations.UpdatePartnerSaleResponseBody]:
1677
- r"""Update a sale for a partner.
1678
-
1679
- Update an existing sale amount. This is useful for handling refunds (partial or full) or fraudulent sales.
1680
-
1681
- :param request: The request object to send.
1682
- :param retries: Override the default retry configuration for this method
1683
- :param server_url: Override the default server URL for this method
1684
- :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1685
- :param http_headers: Additional headers to set or replace on requests.
1686
- """
1687
- base_url = None
1688
- url_variables = None
1689
- if timeout_ms is None:
1690
- timeout_ms = self.sdk_configuration.timeout_ms
1691
-
1692
- if server_url is not None:
1693
- base_url = server_url
1694
- else:
1695
- base_url = self._get_url(base_url, url_variables)
1696
-
1697
- if not isinstance(request, BaseModel):
1698
- request = utils.unmarshal(
1699
- request, Optional[operations.UpdatePartnerSaleRequestBody]
1700
- )
1701
- request = cast(Optional[operations.UpdatePartnerSaleRequestBody], request)
1702
-
1703
- req = self._build_request_async(
1704
- method="PATCH",
1705
- path="/partners/sales",
1706
- base_url=base_url,
1707
- url_variables=url_variables,
1708
- request=request,
1709
- request_body_required=False,
1710
- request_has_path_params=False,
1711
- request_has_query_params=True,
1712
- user_agent_header="user-agent",
1713
- accept_header_value="application/json",
1714
- http_headers=http_headers,
1715
- security=self.sdk_configuration.security,
1716
- get_serialized_body=lambda: utils.serialize_request_body(
1717
- request,
1718
- False,
1719
- True,
1720
- "json",
1721
- Optional[operations.UpdatePartnerSaleRequestBody],
1722
- ),
1723
- timeout_ms=timeout_ms,
1724
- )
1725
-
1726
- if retries == UNSET:
1727
- if self.sdk_configuration.retry_config is not UNSET:
1728
- retries = self.sdk_configuration.retry_config
1729
-
1730
- retry_config = None
1731
- if isinstance(retries, utils.RetryConfig):
1732
- retry_config = (retries, ["429", "500", "502", "503", "504"])
1733
-
1734
- http_res = await self.do_request_async(
1735
- hook_ctx=HookContext(
1736
- base_url=base_url or "",
1737
- operation_id="updatePartnerSale",
1738
- oauth2_scopes=[],
1739
- security_source=self.sdk_configuration.security,
1740
- ),
1741
- request=req,
1742
- error_status_codes=[
1743
- "400",
1744
- "401",
1745
- "403",
1746
- "404",
1747
- "409",
1748
- "410",
1749
- "422",
1750
- "429",
1751
- "4XX",
1752
- "500",
1753
- "5XX",
1754
- ],
1755
- retry_config=retry_config,
1756
- )
1757
-
1758
- response_data: Any = None
1759
- if utils.match_response(http_res, "200", "application/json"):
1760
- return utils.unmarshal_json(
1761
- http_res.text, Optional[operations.UpdatePartnerSaleResponseBody]
1762
- )
1763
- if utils.match_response(http_res, "400", "application/json"):
1764
- response_data = utils.unmarshal_json(http_res.text, errors.BadRequestData)
1765
- raise errors.BadRequest(data=response_data)
1766
- if utils.match_response(http_res, "401", "application/json"):
1767
- response_data = utils.unmarshal_json(http_res.text, errors.UnauthorizedData)
1768
- raise errors.Unauthorized(data=response_data)
1769
- if utils.match_response(http_res, "403", "application/json"):
1770
- response_data = utils.unmarshal_json(http_res.text, errors.ForbiddenData)
1771
- raise errors.Forbidden(data=response_data)
1772
- if utils.match_response(http_res, "404", "application/json"):
1773
- response_data = utils.unmarshal_json(http_res.text, errors.NotFoundData)
1774
- raise errors.NotFound(data=response_data)
1775
- if utils.match_response(http_res, "409", "application/json"):
1776
- response_data = utils.unmarshal_json(http_res.text, errors.ConflictData)
1777
- raise errors.Conflict(data=response_data)
1778
- if utils.match_response(http_res, "410", "application/json"):
1779
- response_data = utils.unmarshal_json(
1780
- http_res.text, errors.InviteExpiredData
1781
- )
1782
- raise errors.InviteExpired(data=response_data)
1783
- if utils.match_response(http_res, "422", "application/json"):
1784
- response_data = utils.unmarshal_json(
1785
- http_res.text, errors.UnprocessableEntityData
1786
- )
1787
- raise errors.UnprocessableEntity(data=response_data)
1788
- if utils.match_response(http_res, "429", "application/json"):
1789
- response_data = utils.unmarshal_json(
1790
- http_res.text, errors.RateLimitExceededData
1791
- )
1792
- raise errors.RateLimitExceeded(data=response_data)
1793
- if utils.match_response(http_res, "500", "application/json"):
1794
- response_data = utils.unmarshal_json(
1795
- http_res.text, errors.InternalServerErrorData
1796
- )
1797
- raise errors.InternalServerError(data=response_data)
1798
- if utils.match_response(http_res, "4XX", "*"):
1799
- http_res_text = await utils.stream_to_text_async(http_res)
1800
- raise errors.SDKError(
1801
- "API error occurred", http_res.status_code, http_res_text, http_res
1802
- )
1803
- if utils.match_response(http_res, "5XX", "*"):
1804
- http_res_text = await utils.stream_to_text_async(http_res)
1805
- raise errors.SDKError(
1806
- "API error occurred", http_res.status_code, http_res_text, http_res
1807
- )
1808
-
1809
- content_type = http_res.headers.get("Content-Type")
1810
- http_res_text = await utils.stream_to_text_async(http_res)
1811
- raise errors.SDKError(
1812
- f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
1813
- http_res.status_code,
1814
- http_res_text,
1815
- http_res,
1816
- )
dub/sdk.py CHANGED
@@ -8,6 +8,7 @@ from .utils.retries import RetryConfig
8
8
  from dub import utils
9
9
  from dub._hooks import SDKHooks
10
10
  from dub.analytics import Analytics
11
+ from dub.commissions import Commissions
11
12
  from dub.customers import Customers
12
13
  from dub.domains import Domains
13
14
  from dub.embed_tokens import EmbedTokens
@@ -38,6 +39,7 @@ class Dub(BaseSDK):
38
39
  track: Track
39
40
  customers: Customers
40
41
  partners: Partners
42
+ commissions: Commissions
41
43
  workspaces: Workspaces
42
44
  embed_tokens: EmbedTokens
43
45
  qr_codes: QRCodes
@@ -147,6 +149,7 @@ class Dub(BaseSDK):
147
149
  self.track = Track(self.sdk_configuration)
148
150
  self.customers = Customers(self.sdk_configuration)
149
151
  self.partners = Partners(self.sdk_configuration)
152
+ self.commissions = Commissions(self.sdk_configuration)
150
153
  self.workspaces = Workspaces(self.sdk_configuration)
151
154
  self.embed_tokens = EmbedTokens(self.sdk_configuration)
152
155
  self.qr_codes = QRCodes(self.sdk_configuration)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dub
3
- Version: 0.24.0
3
+ Version: 0.24.1
4
4
  Summary: Python Client SDK Generated by Speakeasy
5
5
  Author: Speakeasy
6
6
  Requires-Python: >=3.9.2
@@ -276,6 +276,11 @@ asyncio.run(main())
276
276
 
277
277
  * [retrieve](https://github.com/dubinc/dub-python/blob/master/docs/sdks/analytics/README.md#retrieve) - Retrieve analytics for a link, a domain, or the authenticated workspace.
278
278
 
279
+ ### [commissions](https://github.com/dubinc/dub-python/blob/master/docs/sdks/commissions/README.md)
280
+
281
+ * [list](https://github.com/dubinc/dub-python/blob/master/docs/sdks/commissions/README.md#list) - Get commissions for a program.
282
+ * [update](https://github.com/dubinc/dub-python/blob/master/docs/sdks/commissions/README.md#update) - Update a commission.
283
+
279
284
  ### [customers](https://github.com/dubinc/dub-python/blob/master/docs/sdks/customers/README.md)
280
285
 
281
286
  * [list](https://github.com/dubinc/dub-python/blob/master/docs/sdks/customers/README.md#list) - Retrieve a list of customers
@@ -327,7 +332,6 @@ asyncio.run(main())
327
332
  * [retrieve_links](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#retrieve_links) - Retrieve a partner's links.
328
333
  * [upsert_link](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#upsert_link) - Upsert a link for a partner
329
334
  * [analytics](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#analytics) - Retrieve analytics for a partner
330
- * [update_sale](https://github.com/dubinc/dub-python/blob/master/docs/sdks/partners/README.md#update_sale) - Update a sale for a partner.
331
335
 
332
336
  ### [qr_codes](https://github.com/dubinc/dub-python/blob/master/docs/sdks/qrcodes/README.md)
333
337
 
@@ -3,9 +3,10 @@ dub/_hooks/__init__.py,sha256=9_7W5jAYw8rcO8Kfc-Ty-lB82BHfksAJJpVFb_UeU1c,146
3
3
  dub/_hooks/registration.py,sha256=tT-1Cjp5ax1DL-84HBNWPy4wAwgP-0aI4-asLfnkIlw,625
4
4
  dub/_hooks/sdkhooks.py,sha256=2rLEjSz1xFGWabNs1voFn0lXSCqkS38bdKVFdnBJufE,2553
5
5
  dub/_hooks/types.py,sha256=_f63z3zj-1mQYfbDbEgt_0Yzys8yQtKEivmhKxOPeU8,2806
6
- dub/_version.py,sha256=d_ypvM2_kkHth9dC772v1Xa_dd9iODLMrPnsJagxFug,450
6
+ dub/_version.py,sha256=rJnjdoN95vzgKndVOyLVGUjUPTgRLriVgnil1oa58tY,450
7
7
  dub/analytics.py,sha256=vlYINh0VlD1myVlTz5GbsJxoTEk45avOATjpJ_P_b9I,12938
8
8
  dub/basesdk.py,sha256=rDM8sEHVtFjFSi7RgfDnl3T0gLUJzqguXrSxFOWFRqE,12105
9
+ dub/commissions.py,sha256=pt5N2JGW4VHmhp01yl0RoIbi4dn6yE0MRtvIsLFcwBw,25608
9
10
  dub/customers.py,sha256=8iLNQxjcU2gpWJsZp43XwKGNl2S9ONJQeo9IYtgdc-0,63157
10
11
  dub/domains.py,sha256=Te3xPLGz0rusk0zMC0Q_lGryvIwN17HxKSuyChaxLNM,52450
11
12
  dub/embed_tokens.py,sha256=brox--k6QHwvcAQlpxtMt7GrOoGdgYmbWP1qoSuQCbE,13654
@@ -62,7 +63,7 @@ dub/models/errors/ratelimitexceeded.py,sha256=0S2eQlQMdVQ8BZYXX59AQZkf5HtexijmQn
62
63
  dub/models/errors/sdkerror.py,sha256=kd75e3JYF2TXNgRZopcV-oGdBWoBZqRcvrwqn2fsFYs,528
63
64
  dub/models/errors/unauthorized.py,sha256=ranMcawvM0oJxxVkShfZsc7V5YYjbz9luhHywE_ObIg,1525
64
65
  dub/models/errors/unprocessableentity.py,sha256=TxgP43hrqcBW-UDMo8yJ7B0_o_skIH_dXw3DfEWG_cY,1515
65
- dub/models/operations/__init__.py,sha256=7DnUmcFdZqCHYpkVeZLTwsWBPhvSZCL42BYlUrefULc,19336
66
+ dub/models/operations/__init__.py,sha256=iO0hpDBTrrYqr3ETtyPiSV4i2c39K-G7BrQgi7Rqd3k,20282
66
67
  dub/models/operations/bulkcreatelinks.py,sha256=tT5lA_5LxR_k-WgIFNpYHZu4uvLANSssZbmZ7IamFFA,17466
67
68
  dub/models/operations/bulkdeletelinks.py,sha256=u_hEFC9TZ1UnGGgLhQ-Mf3HNDO98Ur49MtdBnNVIRsE,1151
68
69
  dub/models/operations/bulkupdatelinks.py,sha256=DDEW9Zp2BKPSwdzYGSnATxuFUsv175z3fq4UQ15IvME,16022
@@ -70,7 +71,7 @@ dub/models/operations/createcustomer.py,sha256=gAwfJB7hXlbCKbfypCYxshq7LnWkTqAPd
70
71
  dub/models/operations/createdomain.py,sha256=dHRvCzE6knsndN4FTFjfijHVmTi8NXKpURz8cM_C-bk,3900
71
72
  dub/models/operations/createfolder.py,sha256=j9z0CIsc22VsWAwlCGNwxo6a3VsetD6t4T2LdCELYGE,1884
72
73
  dub/models/operations/createlink.py,sha256=ThSHn-TNxF70sRWHXt723nBofdMjQ1_hkSZExnwIvVw,16833
73
- dub/models/operations/createpartner.py,sha256=WdtPUJKhi_HQnB4Glz2CzwV0bKLjConLPVs59newf6g,30062
74
+ dub/models/operations/createpartner.py,sha256=65Fw1IrC4r78yMbaZcMbNeoW78Y2reWBS3v0z8fHYvo,30101
74
75
  dub/models/operations/createpartnerlink.py,sha256=RfQ2uiU6ZDOw8pR3eksEY6rKviSsf0oUKGMDkp5s2NQ,16880
75
76
  dub/models/operations/createreferralsembedtoken.py,sha256=q7Q1aAdhEbMDlRqh2M7VFAeAqpYEhFO1P9Cz3TGJhsU,21667
76
77
  dub/models/operations/createtag.py,sha256=XUKuFcLoenYk1oxdeou-gI_s3A4YxtIJKgRiXtLfOpQ,1497
@@ -87,6 +88,7 @@ dub/models/operations/getlinkscount.py,sha256=KvD0gh-Imn1WmiiRAIYUXHBoNNGEnmfBQX
87
88
  dub/models/operations/getqrcode.py,sha256=ynCPJc8vy_QEt5FP8OU2s-u6UIt1BhmFSNZC-XPmO4I,3848
88
89
  dub/models/operations/gettags.py,sha256=c9p_JrHFnTDJURyR5iiKFKpXFHlzJDt3R5X1U-anyYg,2664
89
90
  dub/models/operations/getworkspace.py,sha256=V4-NfsEg3M1BTeoE13sDyazefb2_kI4yFxnzgvHPv4s,625
91
+ dub/models/operations/listcommissions.py,sha256=6bP8Hc5kwoMi--nCSIaMgDipwUnin47qRV11vEkpQks,7995
90
92
  dub/models/operations/listdomains.py,sha256=gbQrJyBIvTGKSeqJo0Jb08iE44Xu39NS9zbfetx4p-s,1936
91
93
  dub/models/operations/listevents.py,sha256=V-RYIPZwLN3djEK4oFBWafVd-BzzPrTYcShwkvGbmfA,17611
92
94
  dub/models/operations/listfolders.py,sha256=3XQRy8yCZ6r1ftzOWw7CFTdFUXdz2qD3IlOP5rKixxw,1575
@@ -95,19 +97,19 @@ dub/models/operations/retrievelinks.py,sha256=1bLrT_Q2y60eU_gdOHTu99VW8c09gX3nki
95
97
  dub/models/operations/retrievepartneranalytics.py,sha256=MmBDRCB5lQ1lKkfHpeMnZcQXkKIjSCVGEUVcvJgZ_Io,5275
96
98
  dub/models/operations/tracklead.py,sha256=FxdbxL9r3PF0eqo4aOcGXCS7EERq11x07NEdPDkqeps,6855
97
99
  dub/models/operations/tracksale.py,sha256=q_IL4dHay_dDTmRYH80zI6JphCyk46yHoLHBFEJEILg,8189
100
+ dub/models/operations/updatecommission.py,sha256=wXdqGWEKobCJEJpgeAYhnjPfE7641jJFarIAtwaEKBU,5452
98
101
  dub/models/operations/updatecustomer.py,sha256=xlW-W99WgdlAsKD4fNhIEw3f1Sipnb4ahPnZFOcisSY,13517
99
102
  dub/models/operations/updatedomain.py,sha256=rexCga7uNxgBZLPiCMcaudc2cQGB0E_qX2HI0DgG_3M,4519
100
103
  dub/models/operations/updatefolder.py,sha256=dNvSPY67g58SWynB8ic5rcgT-h7THRmyxuzuFdO42GQ,2581
101
104
  dub/models/operations/updatelink.py,sha256=b6BbDMh7BOtNQc_vcsqRGKBtrlRnW9VG8BDIv1RUogw,17567
102
- dub/models/operations/updatepartnersale.py,sha256=GkykJPynsw2nWexos36ygnxvJX-EJY_sFNfwYFeeuCk,3415
103
105
  dub/models/operations/updatetag.py,sha256=0nGAU6if5BsetDArXCIn8YvlDgG17N1Cp8q1o9F6ff4,2101
104
106
  dub/models/operations/updateworkspace.py,sha256=qdlmA-Rz8_fC3iQs7bzmcn0qL9Lu3a04ziEIYfX3Ugo,2690
105
107
  dub/models/operations/upsertlink.py,sha256=RdVy-L4I_mCqwaIhmU1DosYfndpW6yh_8OslaFs2v5s,16956
106
108
  dub/models/operations/upsertpartnerlink.py,sha256=h08QRwsQyiIvDTUKu1ANE9mrwikDCqIzP8hWAKnc38Y,16880
107
- dub/partners.py,sha256=QcVBNdY4Vk0rTPYwi6dApSs19Ql38sgQda-0B4SAdhE,77547
109
+ dub/partners.py,sha256=unCEeCCrZDx0TqT5QtVlnoEciBEJr8aKXStFpoWt2_g,64363
108
110
  dub/py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
109
111
  dub/qr_codes.py,sha256=E0qlx0gs5CWbcz4M-GMLjvoMlGmUmAtHb3dtEWUO8cY,12164
110
- dub/sdk.py,sha256=29q0R5TMeRAf-Qd2qI0RIzTGtFDJsQ4v1AwBF8ie6eQ,6357
112
+ dub/sdk.py,sha256=XffBcjT6CXjDR6P7wRhU0Lq4YyXRF9nWC_JWeXWbfVA,6489
111
113
  dub/sdkconfiguration.py,sha256=iGOSRTCoNX5k8H98ONo6B8rS6v5CtjAUN69Z6t5ftPg,1762
112
114
  dub/tags.py,sha256=d9Sb4yZVKMQfdSqFNHFCfkTIVy0cgFLE3jA_TtPQp_Q,49757
113
115
  dub/track.py,sha256=znqpHDO_LBQmIiN4BO3PXCklIUz4xR0S8SKd5oElTJg,25772
@@ -130,7 +132,7 @@ dub/utils/serializers.py,sha256=hiHBXM1AY8_N2Z_rvFfNSYwvLBkSQlPGFp8poasdU4s,5986
130
132
  dub/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
131
133
  dub/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
132
134
  dub/workspaces.py,sha256=d4eBlOvwuYlENsGcYI0fHQKN-cpC8U9kekTbfNJ2C_4,25635
133
- dub-0.24.0.dist-info/LICENSE,sha256=kc_aZ6YHHcdSsRy-mGsT0Ehji0ZgR_zevXiUt05V2KY,1079
134
- dub-0.24.0.dist-info/METADATA,sha256=U_gJMoI6rg1xynFNR7X5QABDE0hRXdZcdJlHIWLLlwE,27519
135
- dub-0.24.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
136
- dub-0.24.0.dist-info/RECORD,,
135
+ dub-0.24.1.dist-info/LICENSE,sha256=kc_aZ6YHHcdSsRy-mGsT0Ehji0ZgR_zevXiUt05V2KY,1079
136
+ dub-0.24.1.dist-info/METADATA,sha256=aNMB2gyUSc2ZOUcYSNHk8RGqhlgf-cYMrpTrcMNIi8g,27735
137
+ dub-0.24.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
138
+ dub-0.24.1.dist-info/RECORD,,
@@ -1,121 +0,0 @@
1
- """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
-
3
- from __future__ import annotations
4
- from dub.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
5
- from enum import Enum
6
- import pydantic
7
- from pydantic import model_serializer
8
- from typing import Optional
9
- from typing_extensions import Annotated, NotRequired, TypedDict
10
-
11
-
12
- class UpdatePartnerSaleRequestBodyTypedDict(TypedDict):
13
- program_id: str
14
- invoice_id: str
15
- amount: NotRequired[float]
16
- r"""The new absolute amount for the sale."""
17
- modify_amount: NotRequired[float]
18
- r"""Modify the current sale amount: use positive values to increase the amount, negative values to decrease it."""
19
- currency: NotRequired[str]
20
- r"""The currency of the sale amount to update. Accepts ISO 4217 currency codes."""
21
-
22
-
23
- class UpdatePartnerSaleRequestBody(BaseModel):
24
- program_id: Annotated[str, pydantic.Field(alias="programId")]
25
-
26
- invoice_id: Annotated[str, pydantic.Field(alias="invoiceId")]
27
-
28
- amount: Optional[float] = None
29
- r"""The new absolute amount for the sale."""
30
-
31
- modify_amount: Annotated[Optional[float], pydantic.Field(alias="modifyAmount")] = (
32
- None
33
- )
34
- r"""Modify the current sale amount: use positive values to increase the amount, negative values to decrease it."""
35
-
36
- currency: Optional[str] = "usd"
37
- r"""The currency of the sale amount to update. Accepts ISO 4217 currency codes."""
38
-
39
-
40
- class Type(str, Enum):
41
- CLICK = "click"
42
- LEAD = "lead"
43
- SALE = "sale"
44
-
45
-
46
- class UpdatePartnerSaleStatus(str, Enum):
47
- PENDING = "pending"
48
- PROCESSED = "processed"
49
- PAID = "paid"
50
- REFUNDED = "refunded"
51
- DUPLICATE = "duplicate"
52
- FRAUD = "fraud"
53
- CANCELED = "canceled"
54
-
55
-
56
- class UpdatePartnerSaleResponseBodyTypedDict(TypedDict):
57
- r"""The updated sale."""
58
-
59
- id: str
60
- amount: float
61
- earnings: float
62
- currency: str
63
- status: UpdatePartnerSaleStatus
64
- created_at: str
65
- updated_at: str
66
- type: NotRequired[Type]
67
- invoice_id: NotRequired[Nullable[str]]
68
-
69
-
70
- class UpdatePartnerSaleResponseBody(BaseModel):
71
- r"""The updated sale."""
72
-
73
- id: str
74
-
75
- amount: float
76
-
77
- earnings: float
78
-
79
- currency: str
80
-
81
- status: UpdatePartnerSaleStatus
82
-
83
- created_at: Annotated[str, pydantic.Field(alias="createdAt")]
84
-
85
- updated_at: Annotated[str, pydantic.Field(alias="updatedAt")]
86
-
87
- type: Optional[Type] = None
88
-
89
- invoice_id: Annotated[OptionalNullable[str], pydantic.Field(alias="invoiceId")] = (
90
- UNSET
91
- )
92
-
93
- @model_serializer(mode="wrap")
94
- def serialize_model(self, handler):
95
- optional_fields = ["type", "invoiceId"]
96
- nullable_fields = ["invoiceId"]
97
- null_default_fields = []
98
-
99
- serialized = handler(self)
100
-
101
- m = {}
102
-
103
- for n, f in type(self).model_fields.items():
104
- k = f.alias or n
105
- val = serialized.get(k)
106
- serialized.pop(k, None)
107
-
108
- optional_nullable = k in optional_fields and k in nullable_fields
109
- is_set = (
110
- self.__pydantic_fields_set__.intersection({n})
111
- or k in null_default_fields
112
- ) # pylint: disable=no-member
113
-
114
- if val is not None and val != UNSET_SENTINEL:
115
- m[k] = val
116
- elif val != UNSET_SENTINEL and (
117
- not k in optional_fields or (optional_nullable and is_set)
118
- ):
119
- m[k] = val
120
-
121
- return m
File without changes
File without changes