moovio_sdk 0.18.5__py3-none-any.whl → 0.19.0__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.
- moovio_sdk/_version.py +3 -3
- moovio_sdk/fee_plans.py +636 -0
- moovio_sdk/models/components/__init__.py +5 -0
- moovio_sdk/models/components/imagemetadata.py +5 -0
- moovio_sdk/models/components/incurredfee.py +3 -0
- moovio_sdk/models/components/residual.py +57 -0
- moovio_sdk/models/operations/__init__.py +60 -0
- moovio_sdk/models/operations/getresidual.py +71 -0
- moovio_sdk/models/operations/listresidualfees.py +106 -0
- moovio_sdk/models/operations/listresiduals.py +99 -0
- {moovio_sdk-0.18.5.dist-info → moovio_sdk-0.19.0.dist-info}/METADATA +59 -47
- {moovio_sdk-0.18.5.dist-info → moovio_sdk-0.19.0.dist-info}/RECORD +13 -9
- {moovio_sdk-0.18.5.dist-info → moovio_sdk-0.19.0.dist-info}/WHEEL +0 -0
moovio_sdk/_version.py
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "moovio_sdk"
|
|
6
|
-
__version__: str = "0.
|
|
6
|
+
__version__: str = "0.19.0"
|
|
7
7
|
__openapi_doc_version__: str = "latest"
|
|
8
|
-
__gen_version__: str = "2.
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.
|
|
8
|
+
__gen_version__: str = "2.735.1"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.19.0 2.735.1 latest moovio_sdk"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
moovio_sdk/fee_plans.py
CHANGED
|
@@ -1554,3 +1554,639 @@ class FeePlans(BaseSDK):
|
|
|
1554
1554
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1555
1555
|
|
|
1556
1556
|
raise errors.APIError("Unexpected response received", http_res)
|
|
1557
|
+
|
|
1558
|
+
def list_residuals(
|
|
1559
|
+
self,
|
|
1560
|
+
*,
|
|
1561
|
+
account_id: str,
|
|
1562
|
+
skip: Optional[int] = None,
|
|
1563
|
+
count: Optional[int] = None,
|
|
1564
|
+
start_date_time: Optional[str] = None,
|
|
1565
|
+
end_date_time: Optional[str] = None,
|
|
1566
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1567
|
+
server_url: Optional[str] = None,
|
|
1568
|
+
timeout_ms: Optional[int] = None,
|
|
1569
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
1570
|
+
) -> operations.ListResidualsResponse:
|
|
1571
|
+
r"""List all residuals associated with an account.
|
|
1572
|
+
|
|
1573
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
1574
|
+
you'll need to specify the `/accounts/{accountID}/profile.read` scope.
|
|
1575
|
+
|
|
1576
|
+
:param account_id:
|
|
1577
|
+
:param skip:
|
|
1578
|
+
:param count:
|
|
1579
|
+
:param start_date_time: Optional date-time to inclusively filter all residuals with a period start after this date-time.
|
|
1580
|
+
:param end_date_time: Optional date-time to exclusively filter all residuals with a period end before this date-time.
|
|
1581
|
+
:param retries: Override the default retry configuration for this method
|
|
1582
|
+
:param server_url: Override the default server URL for this method
|
|
1583
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1584
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
1585
|
+
"""
|
|
1586
|
+
base_url = None
|
|
1587
|
+
url_variables = None
|
|
1588
|
+
if timeout_ms is None:
|
|
1589
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1590
|
+
|
|
1591
|
+
if server_url is not None:
|
|
1592
|
+
base_url = server_url
|
|
1593
|
+
else:
|
|
1594
|
+
base_url = self._get_url(base_url, url_variables)
|
|
1595
|
+
|
|
1596
|
+
request = operations.ListResidualsRequest(
|
|
1597
|
+
skip=skip,
|
|
1598
|
+
count=count,
|
|
1599
|
+
account_id=account_id,
|
|
1600
|
+
start_date_time=start_date_time,
|
|
1601
|
+
end_date_time=end_date_time,
|
|
1602
|
+
)
|
|
1603
|
+
|
|
1604
|
+
req = self._build_request(
|
|
1605
|
+
method="GET",
|
|
1606
|
+
path="/accounts/{accountID}/residuals",
|
|
1607
|
+
base_url=base_url,
|
|
1608
|
+
url_variables=url_variables,
|
|
1609
|
+
request=request,
|
|
1610
|
+
request_body_required=False,
|
|
1611
|
+
request_has_path_params=True,
|
|
1612
|
+
request_has_query_params=True,
|
|
1613
|
+
user_agent_header="user-agent",
|
|
1614
|
+
accept_header_value="application/json",
|
|
1615
|
+
http_headers=http_headers,
|
|
1616
|
+
_globals=operations.ListResidualsGlobals(
|
|
1617
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
|
1618
|
+
),
|
|
1619
|
+
security=self.sdk_configuration.security,
|
|
1620
|
+
timeout_ms=timeout_ms,
|
|
1621
|
+
)
|
|
1622
|
+
|
|
1623
|
+
if retries == UNSET:
|
|
1624
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
1625
|
+
retries = self.sdk_configuration.retry_config
|
|
1626
|
+
|
|
1627
|
+
retry_config = None
|
|
1628
|
+
if isinstance(retries, utils.RetryConfig):
|
|
1629
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1630
|
+
|
|
1631
|
+
http_res = self.do_request(
|
|
1632
|
+
hook_ctx=HookContext(
|
|
1633
|
+
config=self.sdk_configuration,
|
|
1634
|
+
base_url=base_url or "",
|
|
1635
|
+
operation_id="listResiduals",
|
|
1636
|
+
oauth2_scopes=None,
|
|
1637
|
+
security_source=get_security_from_env(
|
|
1638
|
+
self.sdk_configuration.security, components.Security
|
|
1639
|
+
),
|
|
1640
|
+
),
|
|
1641
|
+
request=req,
|
|
1642
|
+
error_status_codes=["401", "403", "429", "4XX", "500", "504", "5XX"],
|
|
1643
|
+
retry_config=retry_config,
|
|
1644
|
+
)
|
|
1645
|
+
|
|
1646
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
1647
|
+
return operations.ListResidualsResponse(
|
|
1648
|
+
result=unmarshal_json_response(List[components.Residual], http_res),
|
|
1649
|
+
headers=utils.get_response_headers(http_res.headers),
|
|
1650
|
+
)
|
|
1651
|
+
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
|
1652
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1653
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1654
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
|
1655
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1656
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1657
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
1658
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1659
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1660
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
1661
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1662
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1663
|
+
|
|
1664
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1665
|
+
|
|
1666
|
+
async def list_residuals_async(
|
|
1667
|
+
self,
|
|
1668
|
+
*,
|
|
1669
|
+
account_id: str,
|
|
1670
|
+
skip: Optional[int] = None,
|
|
1671
|
+
count: Optional[int] = None,
|
|
1672
|
+
start_date_time: Optional[str] = None,
|
|
1673
|
+
end_date_time: Optional[str] = None,
|
|
1674
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1675
|
+
server_url: Optional[str] = None,
|
|
1676
|
+
timeout_ms: Optional[int] = None,
|
|
1677
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
1678
|
+
) -> operations.ListResidualsResponse:
|
|
1679
|
+
r"""List all residuals associated with an account.
|
|
1680
|
+
|
|
1681
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
1682
|
+
you'll need to specify the `/accounts/{accountID}/profile.read` scope.
|
|
1683
|
+
|
|
1684
|
+
:param account_id:
|
|
1685
|
+
:param skip:
|
|
1686
|
+
:param count:
|
|
1687
|
+
:param start_date_time: Optional date-time to inclusively filter all residuals with a period start after this date-time.
|
|
1688
|
+
:param end_date_time: Optional date-time to exclusively filter all residuals with a period end before this date-time.
|
|
1689
|
+
:param retries: Override the default retry configuration for this method
|
|
1690
|
+
:param server_url: Override the default server URL for this method
|
|
1691
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1692
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
1693
|
+
"""
|
|
1694
|
+
base_url = None
|
|
1695
|
+
url_variables = None
|
|
1696
|
+
if timeout_ms is None:
|
|
1697
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1698
|
+
|
|
1699
|
+
if server_url is not None:
|
|
1700
|
+
base_url = server_url
|
|
1701
|
+
else:
|
|
1702
|
+
base_url = self._get_url(base_url, url_variables)
|
|
1703
|
+
|
|
1704
|
+
request = operations.ListResidualsRequest(
|
|
1705
|
+
skip=skip,
|
|
1706
|
+
count=count,
|
|
1707
|
+
account_id=account_id,
|
|
1708
|
+
start_date_time=start_date_time,
|
|
1709
|
+
end_date_time=end_date_time,
|
|
1710
|
+
)
|
|
1711
|
+
|
|
1712
|
+
req = self._build_request_async(
|
|
1713
|
+
method="GET",
|
|
1714
|
+
path="/accounts/{accountID}/residuals",
|
|
1715
|
+
base_url=base_url,
|
|
1716
|
+
url_variables=url_variables,
|
|
1717
|
+
request=request,
|
|
1718
|
+
request_body_required=False,
|
|
1719
|
+
request_has_path_params=True,
|
|
1720
|
+
request_has_query_params=True,
|
|
1721
|
+
user_agent_header="user-agent",
|
|
1722
|
+
accept_header_value="application/json",
|
|
1723
|
+
http_headers=http_headers,
|
|
1724
|
+
_globals=operations.ListResidualsGlobals(
|
|
1725
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
|
1726
|
+
),
|
|
1727
|
+
security=self.sdk_configuration.security,
|
|
1728
|
+
timeout_ms=timeout_ms,
|
|
1729
|
+
)
|
|
1730
|
+
|
|
1731
|
+
if retries == UNSET:
|
|
1732
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
1733
|
+
retries = self.sdk_configuration.retry_config
|
|
1734
|
+
|
|
1735
|
+
retry_config = None
|
|
1736
|
+
if isinstance(retries, utils.RetryConfig):
|
|
1737
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1738
|
+
|
|
1739
|
+
http_res = await self.do_request_async(
|
|
1740
|
+
hook_ctx=HookContext(
|
|
1741
|
+
config=self.sdk_configuration,
|
|
1742
|
+
base_url=base_url or "",
|
|
1743
|
+
operation_id="listResiduals",
|
|
1744
|
+
oauth2_scopes=None,
|
|
1745
|
+
security_source=get_security_from_env(
|
|
1746
|
+
self.sdk_configuration.security, components.Security
|
|
1747
|
+
),
|
|
1748
|
+
),
|
|
1749
|
+
request=req,
|
|
1750
|
+
error_status_codes=["401", "403", "429", "4XX", "500", "504", "5XX"],
|
|
1751
|
+
retry_config=retry_config,
|
|
1752
|
+
)
|
|
1753
|
+
|
|
1754
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
1755
|
+
return operations.ListResidualsResponse(
|
|
1756
|
+
result=unmarshal_json_response(List[components.Residual], http_res),
|
|
1757
|
+
headers=utils.get_response_headers(http_res.headers),
|
|
1758
|
+
)
|
|
1759
|
+
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
|
1760
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1761
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1762
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
|
1763
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1764
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1765
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
1766
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1767
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1768
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
1769
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1770
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1771
|
+
|
|
1772
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1773
|
+
|
|
1774
|
+
def get_residual(
|
|
1775
|
+
self,
|
|
1776
|
+
*,
|
|
1777
|
+
account_id: str,
|
|
1778
|
+
residual_id: str,
|
|
1779
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1780
|
+
server_url: Optional[str] = None,
|
|
1781
|
+
timeout_ms: Optional[int] = None,
|
|
1782
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
1783
|
+
) -> operations.GetResidualResponse:
|
|
1784
|
+
r"""Get a residual associated with an account.
|
|
1785
|
+
|
|
1786
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
1787
|
+
you'll need to specify the `/accounts/{accountID}/profile.read` scope.
|
|
1788
|
+
|
|
1789
|
+
:param account_id:
|
|
1790
|
+
:param residual_id:
|
|
1791
|
+
:param retries: Override the default retry configuration for this method
|
|
1792
|
+
:param server_url: Override the default server URL for this method
|
|
1793
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1794
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
1795
|
+
"""
|
|
1796
|
+
base_url = None
|
|
1797
|
+
url_variables = None
|
|
1798
|
+
if timeout_ms is None:
|
|
1799
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1800
|
+
|
|
1801
|
+
if server_url is not None:
|
|
1802
|
+
base_url = server_url
|
|
1803
|
+
else:
|
|
1804
|
+
base_url = self._get_url(base_url, url_variables)
|
|
1805
|
+
|
|
1806
|
+
request = operations.GetResidualRequest(
|
|
1807
|
+
account_id=account_id,
|
|
1808
|
+
residual_id=residual_id,
|
|
1809
|
+
)
|
|
1810
|
+
|
|
1811
|
+
req = self._build_request(
|
|
1812
|
+
method="GET",
|
|
1813
|
+
path="/accounts/{accountID}/residuals/{residualID}",
|
|
1814
|
+
base_url=base_url,
|
|
1815
|
+
url_variables=url_variables,
|
|
1816
|
+
request=request,
|
|
1817
|
+
request_body_required=False,
|
|
1818
|
+
request_has_path_params=True,
|
|
1819
|
+
request_has_query_params=True,
|
|
1820
|
+
user_agent_header="user-agent",
|
|
1821
|
+
accept_header_value="application/json",
|
|
1822
|
+
http_headers=http_headers,
|
|
1823
|
+
_globals=operations.GetResidualGlobals(
|
|
1824
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
|
1825
|
+
),
|
|
1826
|
+
security=self.sdk_configuration.security,
|
|
1827
|
+
timeout_ms=timeout_ms,
|
|
1828
|
+
)
|
|
1829
|
+
|
|
1830
|
+
if retries == UNSET:
|
|
1831
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
1832
|
+
retries = self.sdk_configuration.retry_config
|
|
1833
|
+
|
|
1834
|
+
retry_config = None
|
|
1835
|
+
if isinstance(retries, utils.RetryConfig):
|
|
1836
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1837
|
+
|
|
1838
|
+
http_res = self.do_request(
|
|
1839
|
+
hook_ctx=HookContext(
|
|
1840
|
+
config=self.sdk_configuration,
|
|
1841
|
+
base_url=base_url or "",
|
|
1842
|
+
operation_id="getResidual",
|
|
1843
|
+
oauth2_scopes=None,
|
|
1844
|
+
security_source=get_security_from_env(
|
|
1845
|
+
self.sdk_configuration.security, components.Security
|
|
1846
|
+
),
|
|
1847
|
+
),
|
|
1848
|
+
request=req,
|
|
1849
|
+
error_status_codes=["401", "403", "404", "429", "4XX", "500", "504", "5XX"],
|
|
1850
|
+
retry_config=retry_config,
|
|
1851
|
+
)
|
|
1852
|
+
|
|
1853
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
1854
|
+
return operations.GetResidualResponse(
|
|
1855
|
+
result=unmarshal_json_response(components.Residual, http_res),
|
|
1856
|
+
headers=utils.get_response_headers(http_res.headers),
|
|
1857
|
+
)
|
|
1858
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
|
1859
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1860
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1861
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
|
1862
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1863
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1864
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
1865
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1866
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1867
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
1868
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1869
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1870
|
+
|
|
1871
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1872
|
+
|
|
1873
|
+
async def get_residual_async(
|
|
1874
|
+
self,
|
|
1875
|
+
*,
|
|
1876
|
+
account_id: str,
|
|
1877
|
+
residual_id: str,
|
|
1878
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1879
|
+
server_url: Optional[str] = None,
|
|
1880
|
+
timeout_ms: Optional[int] = None,
|
|
1881
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
1882
|
+
) -> operations.GetResidualResponse:
|
|
1883
|
+
r"""Get a residual associated with an account.
|
|
1884
|
+
|
|
1885
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
1886
|
+
you'll need to specify the `/accounts/{accountID}/profile.read` scope.
|
|
1887
|
+
|
|
1888
|
+
:param account_id:
|
|
1889
|
+
:param residual_id:
|
|
1890
|
+
:param retries: Override the default retry configuration for this method
|
|
1891
|
+
:param server_url: Override the default server URL for this method
|
|
1892
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1893
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
1894
|
+
"""
|
|
1895
|
+
base_url = None
|
|
1896
|
+
url_variables = None
|
|
1897
|
+
if timeout_ms is None:
|
|
1898
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1899
|
+
|
|
1900
|
+
if server_url is not None:
|
|
1901
|
+
base_url = server_url
|
|
1902
|
+
else:
|
|
1903
|
+
base_url = self._get_url(base_url, url_variables)
|
|
1904
|
+
|
|
1905
|
+
request = operations.GetResidualRequest(
|
|
1906
|
+
account_id=account_id,
|
|
1907
|
+
residual_id=residual_id,
|
|
1908
|
+
)
|
|
1909
|
+
|
|
1910
|
+
req = self._build_request_async(
|
|
1911
|
+
method="GET",
|
|
1912
|
+
path="/accounts/{accountID}/residuals/{residualID}",
|
|
1913
|
+
base_url=base_url,
|
|
1914
|
+
url_variables=url_variables,
|
|
1915
|
+
request=request,
|
|
1916
|
+
request_body_required=False,
|
|
1917
|
+
request_has_path_params=True,
|
|
1918
|
+
request_has_query_params=True,
|
|
1919
|
+
user_agent_header="user-agent",
|
|
1920
|
+
accept_header_value="application/json",
|
|
1921
|
+
http_headers=http_headers,
|
|
1922
|
+
_globals=operations.GetResidualGlobals(
|
|
1923
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
|
1924
|
+
),
|
|
1925
|
+
security=self.sdk_configuration.security,
|
|
1926
|
+
timeout_ms=timeout_ms,
|
|
1927
|
+
)
|
|
1928
|
+
|
|
1929
|
+
if retries == UNSET:
|
|
1930
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
1931
|
+
retries = self.sdk_configuration.retry_config
|
|
1932
|
+
|
|
1933
|
+
retry_config = None
|
|
1934
|
+
if isinstance(retries, utils.RetryConfig):
|
|
1935
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1936
|
+
|
|
1937
|
+
http_res = await self.do_request_async(
|
|
1938
|
+
hook_ctx=HookContext(
|
|
1939
|
+
config=self.sdk_configuration,
|
|
1940
|
+
base_url=base_url or "",
|
|
1941
|
+
operation_id="getResidual",
|
|
1942
|
+
oauth2_scopes=None,
|
|
1943
|
+
security_source=get_security_from_env(
|
|
1944
|
+
self.sdk_configuration.security, components.Security
|
|
1945
|
+
),
|
|
1946
|
+
),
|
|
1947
|
+
request=req,
|
|
1948
|
+
error_status_codes=["401", "403", "404", "429", "4XX", "500", "504", "5XX"],
|
|
1949
|
+
retry_config=retry_config,
|
|
1950
|
+
)
|
|
1951
|
+
|
|
1952
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
1953
|
+
return operations.GetResidualResponse(
|
|
1954
|
+
result=unmarshal_json_response(components.Residual, http_res),
|
|
1955
|
+
headers=utils.get_response_headers(http_res.headers),
|
|
1956
|
+
)
|
|
1957
|
+
if utils.match_response(http_res, ["401", "403", "404", "429"], "*"):
|
|
1958
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1959
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1960
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
|
1961
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1962
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1963
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
1964
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1965
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1966
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
1967
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1968
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1969
|
+
|
|
1970
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1971
|
+
|
|
1972
|
+
def list_residual_fees(
|
|
1973
|
+
self,
|
|
1974
|
+
*,
|
|
1975
|
+
account_id: str,
|
|
1976
|
+
residual_id: str,
|
|
1977
|
+
skip: Optional[int] = None,
|
|
1978
|
+
count: Optional[int] = None,
|
|
1979
|
+
start_date_time: Optional[str] = None,
|
|
1980
|
+
end_date_time: Optional[str] = None,
|
|
1981
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1982
|
+
server_url: Optional[str] = None,
|
|
1983
|
+
timeout_ms: Optional[int] = None,
|
|
1984
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
1985
|
+
) -> operations.ListResidualFeesResponse:
|
|
1986
|
+
r"""List all fees associated with a residual.
|
|
1987
|
+
|
|
1988
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
1989
|
+
you'll need to specify the `/accounts/{accountID}/profile.read` scope.
|
|
1990
|
+
|
|
1991
|
+
:param account_id:
|
|
1992
|
+
:param residual_id:
|
|
1993
|
+
:param skip:
|
|
1994
|
+
:param count:
|
|
1995
|
+
:param start_date_time: Optional date-time to inclusively filter all fees created after this date-time.
|
|
1996
|
+
:param end_date_time: Optional date-time to exclusively filter all fees created before this date-time.
|
|
1997
|
+
:param retries: Override the default retry configuration for this method
|
|
1998
|
+
:param server_url: Override the default server URL for this method
|
|
1999
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
2000
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
2001
|
+
"""
|
|
2002
|
+
base_url = None
|
|
2003
|
+
url_variables = None
|
|
2004
|
+
if timeout_ms is None:
|
|
2005
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
2006
|
+
|
|
2007
|
+
if server_url is not None:
|
|
2008
|
+
base_url = server_url
|
|
2009
|
+
else:
|
|
2010
|
+
base_url = self._get_url(base_url, url_variables)
|
|
2011
|
+
|
|
2012
|
+
request = operations.ListResidualFeesRequest(
|
|
2013
|
+
skip=skip,
|
|
2014
|
+
count=count,
|
|
2015
|
+
account_id=account_id,
|
|
2016
|
+
residual_id=residual_id,
|
|
2017
|
+
start_date_time=start_date_time,
|
|
2018
|
+
end_date_time=end_date_time,
|
|
2019
|
+
)
|
|
2020
|
+
|
|
2021
|
+
req = self._build_request(
|
|
2022
|
+
method="GET",
|
|
2023
|
+
path="/accounts/{accountID}/residuals/{residualID}/fees",
|
|
2024
|
+
base_url=base_url,
|
|
2025
|
+
url_variables=url_variables,
|
|
2026
|
+
request=request,
|
|
2027
|
+
request_body_required=False,
|
|
2028
|
+
request_has_path_params=True,
|
|
2029
|
+
request_has_query_params=True,
|
|
2030
|
+
user_agent_header="user-agent",
|
|
2031
|
+
accept_header_value="application/json",
|
|
2032
|
+
http_headers=http_headers,
|
|
2033
|
+
_globals=operations.ListResidualFeesGlobals(
|
|
2034
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
|
2035
|
+
),
|
|
2036
|
+
security=self.sdk_configuration.security,
|
|
2037
|
+
timeout_ms=timeout_ms,
|
|
2038
|
+
)
|
|
2039
|
+
|
|
2040
|
+
if retries == UNSET:
|
|
2041
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
2042
|
+
retries = self.sdk_configuration.retry_config
|
|
2043
|
+
|
|
2044
|
+
retry_config = None
|
|
2045
|
+
if isinstance(retries, utils.RetryConfig):
|
|
2046
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
2047
|
+
|
|
2048
|
+
http_res = self.do_request(
|
|
2049
|
+
hook_ctx=HookContext(
|
|
2050
|
+
config=self.sdk_configuration,
|
|
2051
|
+
base_url=base_url or "",
|
|
2052
|
+
operation_id="listResidualFees",
|
|
2053
|
+
oauth2_scopes=None,
|
|
2054
|
+
security_source=get_security_from_env(
|
|
2055
|
+
self.sdk_configuration.security, components.Security
|
|
2056
|
+
),
|
|
2057
|
+
),
|
|
2058
|
+
request=req,
|
|
2059
|
+
error_status_codes=["401", "403", "429", "4XX", "500", "504", "5XX"],
|
|
2060
|
+
retry_config=retry_config,
|
|
2061
|
+
)
|
|
2062
|
+
|
|
2063
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
2064
|
+
return operations.ListResidualFeesResponse(
|
|
2065
|
+
result=unmarshal_json_response(List[components.IncurredFee], http_res),
|
|
2066
|
+
headers=utils.get_response_headers(http_res.headers),
|
|
2067
|
+
)
|
|
2068
|
+
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
|
2069
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
2070
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2071
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
|
2072
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
2073
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2074
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
2075
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
2076
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2077
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
2078
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
2079
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2080
|
+
|
|
2081
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
2082
|
+
|
|
2083
|
+
async def list_residual_fees_async(
|
|
2084
|
+
self,
|
|
2085
|
+
*,
|
|
2086
|
+
account_id: str,
|
|
2087
|
+
residual_id: str,
|
|
2088
|
+
skip: Optional[int] = None,
|
|
2089
|
+
count: Optional[int] = None,
|
|
2090
|
+
start_date_time: Optional[str] = None,
|
|
2091
|
+
end_date_time: Optional[str] = None,
|
|
2092
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
2093
|
+
server_url: Optional[str] = None,
|
|
2094
|
+
timeout_ms: Optional[int] = None,
|
|
2095
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
2096
|
+
) -> operations.ListResidualFeesResponse:
|
|
2097
|
+
r"""List all fees associated with a residual.
|
|
2098
|
+
|
|
2099
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
2100
|
+
you'll need to specify the `/accounts/{accountID}/profile.read` scope.
|
|
2101
|
+
|
|
2102
|
+
:param account_id:
|
|
2103
|
+
:param residual_id:
|
|
2104
|
+
:param skip:
|
|
2105
|
+
:param count:
|
|
2106
|
+
:param start_date_time: Optional date-time to inclusively filter all fees created after this date-time.
|
|
2107
|
+
:param end_date_time: Optional date-time to exclusively filter all fees created before this date-time.
|
|
2108
|
+
:param retries: Override the default retry configuration for this method
|
|
2109
|
+
:param server_url: Override the default server URL for this method
|
|
2110
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
2111
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
2112
|
+
"""
|
|
2113
|
+
base_url = None
|
|
2114
|
+
url_variables = None
|
|
2115
|
+
if timeout_ms is None:
|
|
2116
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
2117
|
+
|
|
2118
|
+
if server_url is not None:
|
|
2119
|
+
base_url = server_url
|
|
2120
|
+
else:
|
|
2121
|
+
base_url = self._get_url(base_url, url_variables)
|
|
2122
|
+
|
|
2123
|
+
request = operations.ListResidualFeesRequest(
|
|
2124
|
+
skip=skip,
|
|
2125
|
+
count=count,
|
|
2126
|
+
account_id=account_id,
|
|
2127
|
+
residual_id=residual_id,
|
|
2128
|
+
start_date_time=start_date_time,
|
|
2129
|
+
end_date_time=end_date_time,
|
|
2130
|
+
)
|
|
2131
|
+
|
|
2132
|
+
req = self._build_request_async(
|
|
2133
|
+
method="GET",
|
|
2134
|
+
path="/accounts/{accountID}/residuals/{residualID}/fees",
|
|
2135
|
+
base_url=base_url,
|
|
2136
|
+
url_variables=url_variables,
|
|
2137
|
+
request=request,
|
|
2138
|
+
request_body_required=False,
|
|
2139
|
+
request_has_path_params=True,
|
|
2140
|
+
request_has_query_params=True,
|
|
2141
|
+
user_agent_header="user-agent",
|
|
2142
|
+
accept_header_value="application/json",
|
|
2143
|
+
http_headers=http_headers,
|
|
2144
|
+
_globals=operations.ListResidualFeesGlobals(
|
|
2145
|
+
x_moov_version=self.sdk_configuration.globals.x_moov_version,
|
|
2146
|
+
),
|
|
2147
|
+
security=self.sdk_configuration.security,
|
|
2148
|
+
timeout_ms=timeout_ms,
|
|
2149
|
+
)
|
|
2150
|
+
|
|
2151
|
+
if retries == UNSET:
|
|
2152
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
2153
|
+
retries = self.sdk_configuration.retry_config
|
|
2154
|
+
|
|
2155
|
+
retry_config = None
|
|
2156
|
+
if isinstance(retries, utils.RetryConfig):
|
|
2157
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
2158
|
+
|
|
2159
|
+
http_res = await self.do_request_async(
|
|
2160
|
+
hook_ctx=HookContext(
|
|
2161
|
+
config=self.sdk_configuration,
|
|
2162
|
+
base_url=base_url or "",
|
|
2163
|
+
operation_id="listResidualFees",
|
|
2164
|
+
oauth2_scopes=None,
|
|
2165
|
+
security_source=get_security_from_env(
|
|
2166
|
+
self.sdk_configuration.security, components.Security
|
|
2167
|
+
),
|
|
2168
|
+
),
|
|
2169
|
+
request=req,
|
|
2170
|
+
error_status_codes=["401", "403", "429", "4XX", "500", "504", "5XX"],
|
|
2171
|
+
retry_config=retry_config,
|
|
2172
|
+
)
|
|
2173
|
+
|
|
2174
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
2175
|
+
return operations.ListResidualFeesResponse(
|
|
2176
|
+
result=unmarshal_json_response(List[components.IncurredFee], http_res),
|
|
2177
|
+
headers=utils.get_response_headers(http_res.headers),
|
|
2178
|
+
)
|
|
2179
|
+
if utils.match_response(http_res, ["401", "403", "429"], "*"):
|
|
2180
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2181
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2182
|
+
if utils.match_response(http_res, ["500", "504"], "*"):
|
|
2183
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2184
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2185
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
2186
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2187
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2188
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
2189
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2190
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2191
|
+
|
|
2192
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
@@ -817,6 +817,7 @@ if TYPE_CHECKING:
|
|
|
817
817
|
from .requirementerror import RequirementError, RequirementErrorTypedDict
|
|
818
818
|
from .requirementerrorcode import RequirementErrorCode
|
|
819
819
|
from .requirementid import RequirementID
|
|
820
|
+
from .residual import Residual, ResidualTypedDict
|
|
820
821
|
from .returnpolicytype import ReturnPolicyType
|
|
821
822
|
from .reversal import Reversal, ReversalTypedDict
|
|
822
823
|
from .reversedwithcancellation import (
|
|
@@ -1878,6 +1879,8 @@ __all__ = [
|
|
|
1878
1879
|
"RequirementErrorCode",
|
|
1879
1880
|
"RequirementErrorTypedDict",
|
|
1880
1881
|
"RequirementID",
|
|
1882
|
+
"Residual",
|
|
1883
|
+
"ResidualTypedDict",
|
|
1881
1884
|
"Responsibilities",
|
|
1882
1885
|
"ResponsibilitiesTypedDict",
|
|
1883
1886
|
"ReturnPolicyType",
|
|
@@ -2850,6 +2853,8 @@ _dynamic_imports: dict[str, str] = {
|
|
|
2850
2853
|
"RequirementErrorTypedDict": ".requirementerror",
|
|
2851
2854
|
"RequirementErrorCode": ".requirementerrorcode",
|
|
2852
2855
|
"RequirementID": ".requirementid",
|
|
2856
|
+
"Residual": ".residual",
|
|
2857
|
+
"ResidualTypedDict": ".residual",
|
|
2853
2858
|
"ReturnPolicyType": ".returnpolicytype",
|
|
2854
2859
|
"Reversal": ".reversal",
|
|
2855
2860
|
"ReversalTypedDict": ".reversal",
|