|
38 | 38 | from ....types.auth_rules.v2_apply_response import V2ApplyResponse |
39 | 39 | from ....types.auth_rules.v2_draft_response import V2DraftResponse |
40 | 40 | from ....types.auth_rules.v2_create_response import V2CreateResponse |
41 | | -from ....types.auth_rules.v2_report_response import V2ReportResponse |
42 | 41 | from ....types.auth_rules.v2_update_response import V2UpdateResponse |
43 | 42 | from ....types.auth_rules.v2_promote_response import V2PromoteResponse |
44 | 43 | from ....types.auth_rules.v2_retrieve_response import V2RetrieveResponse |
@@ -796,91 +795,6 @@ def promote( |
796 | 795 | cast_to=V2PromoteResponse, |
797 | 796 | ) |
798 | 797 |
|
799 | | - @typing_extensions.deprecated("deprecated") |
800 | | - def report( |
801 | | - self, |
802 | | - auth_rule_token: str, |
803 | | - *, |
804 | | - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
805 | | - # The extra values given here take precedence over values defined on the client or passed to this method. |
806 | | - extra_headers: Headers | None = None, |
807 | | - extra_query: Query | None = None, |
808 | | - extra_body: Body | None = None, |
809 | | - timeout: float | httpx.Timeout | None | NotGiven = not_given, |
810 | | - ) -> V2ReportResponse: |
811 | | - """This endpoint is deprecated and will be removed in the future. |
812 | | -
|
813 | | - Requests a |
814 | | - performance report of an Auth rule to be asynchronously generated. Reports can |
815 | | - only be run on rules in draft or active mode and will included approved and |
816 | | - declined statistics as well as examples. The generated report will be delivered |
817 | | - asynchronously through a webhook with `event_type` = |
818 | | - `auth_rules.performance_report.created`. See the docs on setting up |
819 | | - [webhook subscriptions](https://docs.lithic.com/docs/events-api). |
820 | | -
|
821 | | - Reports are generated based on data collected by Lithic's processing system in |
822 | | - the trailing week. The performance of the auth rule will be assessed on the |
823 | | - configuration of the auth rule at the time the report is requested. This implies |
824 | | - that if a performance report is requested, right after updating an auth rule, |
825 | | - depending on the number of events processed for a card program, it may be the |
826 | | - case that no data is available for the report. Therefore Lithic recommends to |
827 | | - decouple making updates to an Auth Rule, and requesting performance reports. |
828 | | -
|
829 | | - To make this concrete, consider the following example: |
830 | | -
|
831 | | - 1. At time `t`, a new Auth Rule is created, and applies to all auth events on a |
832 | | - card program. The Auth Rule has not yet been promoted, causing the draft |
833 | | - version of the rule to be applied in shadow mode. |
834 | | - 2. At time `t + 1 hour` a performance report is requested for the Auth Rule. |
835 | | - This performance report will _only_ contain data for the Auth Rule being |
836 | | - executed in the window between `t` and `t + 1 hour`. This is because Lithic's |
837 | | - transaction processing system will only start capturing data for the Auth |
838 | | - Rule at the time it is created. |
839 | | - 3. At time `t + 2 hours` the draft version of the Auth Rule is promoted to the |
840 | | - active version of the Auth Rule by calling the |
841 | | - `/v2/auth_rules/{auth_rule_token}/promote` endpoint. If a performance report |
842 | | - is requested at this moment it will still only contain data for this version |
843 | | - of the rule, but the window of available data will now span from `t` to |
844 | | - `t + 2 hours`. |
845 | | - 4. At time `t + 3 hours` a new version of the rule is drafted by calling the |
846 | | - `/v2/auth_rules/{auth_rule_token}/draft` endpoint. If a performance report is |
847 | | - requested right at this moment, it will only contain data for events to which |
848 | | - both the active version and the draft version is applied. Lithic does this to |
849 | | - ensure that performance reports represent a fair comparison between rules. |
850 | | - Because there may be no events in this window, and because there may be some |
851 | | - lag before data is available in a performance report, the requested |
852 | | - performance report could contain no to little data. |
853 | | - 5. At time `t + 4 hours` another performance report is requested: this time the |
854 | | - performance report will contain data from the window between `t + 3 hours` |
855 | | - and `t + 4 hours`, for any events to which both the current version of the |
856 | | - Auth rule (in enforcing mode) and the draft version of the Auth rule (in |
857 | | - shadow mode) applied. |
858 | | -
|
859 | | - Note that generating a report may take up to 15 minutes and that delivery is not |
860 | | - guaranteed. Customers are required to have created an event subscription to |
861 | | - receive the webhook. Additionally, there is a delay of approximately 15 minutes |
862 | | - between when Lithic's transaction processing systems have processed the |
863 | | - transaction, and when a transaction will be included in the report. |
864 | | -
|
865 | | - Args: |
866 | | - extra_headers: Send extra headers |
867 | | -
|
868 | | - extra_query: Add additional query parameters to the request |
869 | | -
|
870 | | - extra_body: Add additional JSON properties to the request |
871 | | -
|
872 | | - timeout: Override the client-level default timeout for this request, in seconds |
873 | | - """ |
874 | | - if not auth_rule_token: |
875 | | - raise ValueError(f"Expected a non-empty value for `auth_rule_token` but received {auth_rule_token!r}") |
876 | | - return self._post( |
877 | | - f"/v2/auth_rules/{auth_rule_token}/report", |
878 | | - options=make_request_options( |
879 | | - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
880 | | - ), |
881 | | - cast_to=V2ReportResponse, |
882 | | - ) |
883 | | - |
884 | 798 | def retrieve_features( |
885 | 799 | self, |
886 | 800 | auth_rule_token: str, |
@@ -1744,91 +1658,6 @@ async def promote( |
1744 | 1658 | cast_to=V2PromoteResponse, |
1745 | 1659 | ) |
1746 | 1660 |
|
1747 | | - @typing_extensions.deprecated("deprecated") |
1748 | | - async def report( |
1749 | | - self, |
1750 | | - auth_rule_token: str, |
1751 | | - *, |
1752 | | - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
1753 | | - # The extra values given here take precedence over values defined on the client or passed to this method. |
1754 | | - extra_headers: Headers | None = None, |
1755 | | - extra_query: Query | None = None, |
1756 | | - extra_body: Body | None = None, |
1757 | | - timeout: float | httpx.Timeout | None | NotGiven = not_given, |
1758 | | - ) -> V2ReportResponse: |
1759 | | - """This endpoint is deprecated and will be removed in the future. |
1760 | | -
|
1761 | | - Requests a |
1762 | | - performance report of an Auth rule to be asynchronously generated. Reports can |
1763 | | - only be run on rules in draft or active mode and will included approved and |
1764 | | - declined statistics as well as examples. The generated report will be delivered |
1765 | | - asynchronously through a webhook with `event_type` = |
1766 | | - `auth_rules.performance_report.created`. See the docs on setting up |
1767 | | - [webhook subscriptions](https://docs.lithic.com/docs/events-api). |
1768 | | -
|
1769 | | - Reports are generated based on data collected by Lithic's processing system in |
1770 | | - the trailing week. The performance of the auth rule will be assessed on the |
1771 | | - configuration of the auth rule at the time the report is requested. This implies |
1772 | | - that if a performance report is requested, right after updating an auth rule, |
1773 | | - depending on the number of events processed for a card program, it may be the |
1774 | | - case that no data is available for the report. Therefore Lithic recommends to |
1775 | | - decouple making updates to an Auth Rule, and requesting performance reports. |
1776 | | -
|
1777 | | - To make this concrete, consider the following example: |
1778 | | -
|
1779 | | - 1. At time `t`, a new Auth Rule is created, and applies to all auth events on a |
1780 | | - card program. The Auth Rule has not yet been promoted, causing the draft |
1781 | | - version of the rule to be applied in shadow mode. |
1782 | | - 2. At time `t + 1 hour` a performance report is requested for the Auth Rule. |
1783 | | - This performance report will _only_ contain data for the Auth Rule being |
1784 | | - executed in the window between `t` and `t + 1 hour`. This is because Lithic's |
1785 | | - transaction processing system will only start capturing data for the Auth |
1786 | | - Rule at the time it is created. |
1787 | | - 3. At time `t + 2 hours` the draft version of the Auth Rule is promoted to the |
1788 | | - active version of the Auth Rule by calling the |
1789 | | - `/v2/auth_rules/{auth_rule_token}/promote` endpoint. If a performance report |
1790 | | - is requested at this moment it will still only contain data for this version |
1791 | | - of the rule, but the window of available data will now span from `t` to |
1792 | | - `t + 2 hours`. |
1793 | | - 4. At time `t + 3 hours` a new version of the rule is drafted by calling the |
1794 | | - `/v2/auth_rules/{auth_rule_token}/draft` endpoint. If a performance report is |
1795 | | - requested right at this moment, it will only contain data for events to which |
1796 | | - both the active version and the draft version is applied. Lithic does this to |
1797 | | - ensure that performance reports represent a fair comparison between rules. |
1798 | | - Because there may be no events in this window, and because there may be some |
1799 | | - lag before data is available in a performance report, the requested |
1800 | | - performance report could contain no to little data. |
1801 | | - 5. At time `t + 4 hours` another performance report is requested: this time the |
1802 | | - performance report will contain data from the window between `t + 3 hours` |
1803 | | - and `t + 4 hours`, for any events to which both the current version of the |
1804 | | - Auth rule (in enforcing mode) and the draft version of the Auth rule (in |
1805 | | - shadow mode) applied. |
1806 | | -
|
1807 | | - Note that generating a report may take up to 15 minutes and that delivery is not |
1808 | | - guaranteed. Customers are required to have created an event subscription to |
1809 | | - receive the webhook. Additionally, there is a delay of approximately 15 minutes |
1810 | | - between when Lithic's transaction processing systems have processed the |
1811 | | - transaction, and when a transaction will be included in the report. |
1812 | | -
|
1813 | | - Args: |
1814 | | - extra_headers: Send extra headers |
1815 | | -
|
1816 | | - extra_query: Add additional query parameters to the request |
1817 | | -
|
1818 | | - extra_body: Add additional JSON properties to the request |
1819 | | -
|
1820 | | - timeout: Override the client-level default timeout for this request, in seconds |
1821 | | - """ |
1822 | | - if not auth_rule_token: |
1823 | | - raise ValueError(f"Expected a non-empty value for `auth_rule_token` but received {auth_rule_token!r}") |
1824 | | - return await self._post( |
1825 | | - f"/v2/auth_rules/{auth_rule_token}/report", |
1826 | | - options=make_request_options( |
1827 | | - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
1828 | | - ), |
1829 | | - cast_to=V2ReportResponse, |
1830 | | - ) |
1831 | | - |
1832 | 1661 | async def retrieve_features( |
1833 | 1662 | self, |
1834 | 1663 | auth_rule_token: str, |
@@ -1974,11 +1803,6 @@ def __init__(self, v2: V2) -> None: |
1974 | 1803 | self.promote = _legacy_response.to_raw_response_wrapper( |
1975 | 1804 | v2.promote, |
1976 | 1805 | ) |
1977 | | - self.report = ( # pyright: ignore[reportDeprecated] |
1978 | | - _legacy_response.to_raw_response_wrapper( |
1979 | | - v2.report, # pyright: ignore[reportDeprecated], |
1980 | | - ) |
1981 | | - ) |
1982 | 1806 | self.retrieve_features = _legacy_response.to_raw_response_wrapper( |
1983 | 1807 | v2.retrieve_features, |
1984 | 1808 | ) |
@@ -2021,11 +1845,6 @@ def __init__(self, v2: AsyncV2) -> None: |
2021 | 1845 | self.promote = _legacy_response.async_to_raw_response_wrapper( |
2022 | 1846 | v2.promote, |
2023 | 1847 | ) |
2024 | | - self.report = ( # pyright: ignore[reportDeprecated] |
2025 | | - _legacy_response.async_to_raw_response_wrapper( |
2026 | | - v2.report, # pyright: ignore[reportDeprecated], |
2027 | | - ) |
2028 | | - ) |
2029 | 1848 | self.retrieve_features = _legacy_response.async_to_raw_response_wrapper( |
2030 | 1849 | v2.retrieve_features, |
2031 | 1850 | ) |
@@ -2068,11 +1887,6 @@ def __init__(self, v2: V2) -> None: |
2068 | 1887 | self.promote = to_streamed_response_wrapper( |
2069 | 1888 | v2.promote, |
2070 | 1889 | ) |
2071 | | - self.report = ( # pyright: ignore[reportDeprecated] |
2072 | | - to_streamed_response_wrapper( |
2073 | | - v2.report, # pyright: ignore[reportDeprecated], |
2074 | | - ) |
2075 | | - ) |
2076 | 1890 | self.retrieve_features = to_streamed_response_wrapper( |
2077 | 1891 | v2.retrieve_features, |
2078 | 1892 | ) |
@@ -2115,11 +1929,6 @@ def __init__(self, v2: AsyncV2) -> None: |
2115 | 1929 | self.promote = async_to_streamed_response_wrapper( |
2116 | 1930 | v2.promote, |
2117 | 1931 | ) |
2118 | | - self.report = ( # pyright: ignore[reportDeprecated] |
2119 | | - async_to_streamed_response_wrapper( |
2120 | | - v2.report, # pyright: ignore[reportDeprecated], |
2121 | | - ) |
2122 | | - ) |
2123 | 1932 | self.retrieve_features = async_to_streamed_response_wrapper( |
2124 | 1933 | v2.retrieve_features, |
2125 | 1934 | ) |
|
0 commit comments