|
58 | 58 | from stripe.params._subscription_modify_params import ( |
59 | 59 | SubscriptionModifyParams, |
60 | 60 | ) |
61 | | - from stripe.params._subscription_pause_params import ( |
62 | | - SubscriptionPauseParams, |
63 | | - ) |
64 | 61 | from stripe.params._subscription_resume_params import ( |
65 | 62 | SubscriptionResumeParams, |
66 | 63 | ) |
@@ -1632,116 +1629,6 @@ async def modify_async( |
1632 | 1629 | ), |
1633 | 1630 | ) |
1634 | 1631 |
|
1635 | | - @classmethod |
1636 | | - def _cls_pause( |
1637 | | - cls, subscription: str, **params: Unpack["SubscriptionPauseParams"] |
1638 | | - ) -> "Subscription": |
1639 | | - """ |
1640 | | - Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. |
1641 | | - """ |
1642 | | - return cast( |
1643 | | - "Subscription", |
1644 | | - cls._static_request( |
1645 | | - "post", |
1646 | | - "/v1/subscriptions/{subscription}/pause".format( |
1647 | | - subscription=sanitize_id(subscription) |
1648 | | - ), |
1649 | | - params=params, |
1650 | | - ), |
1651 | | - ) |
1652 | | - |
1653 | | - @overload |
1654 | | - @staticmethod |
1655 | | - def pause( |
1656 | | - subscription: str, **params: Unpack["SubscriptionPauseParams"] |
1657 | | - ) -> "Subscription": |
1658 | | - """ |
1659 | | - Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. |
1660 | | - """ |
1661 | | - ... |
1662 | | - |
1663 | | - @overload |
1664 | | - def pause( |
1665 | | - self, **params: Unpack["SubscriptionPauseParams"] |
1666 | | - ) -> "Subscription": |
1667 | | - """ |
1668 | | - Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. |
1669 | | - """ |
1670 | | - ... |
1671 | | - |
1672 | | - @class_method_variant("_cls_pause") |
1673 | | - def pause( # pyright: ignore[reportGeneralTypeIssues] |
1674 | | - self, **params: Unpack["SubscriptionPauseParams"] |
1675 | | - ) -> "Subscription": |
1676 | | - """ |
1677 | | - Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. |
1678 | | - """ |
1679 | | - return cast( |
1680 | | - "Subscription", |
1681 | | - self._request( |
1682 | | - "post", |
1683 | | - "/v1/subscriptions/{subscription}/pause".format( |
1684 | | - subscription=sanitize_id(self.get("id")) |
1685 | | - ), |
1686 | | - params=params, |
1687 | | - ), |
1688 | | - ) |
1689 | | - |
1690 | | - @classmethod |
1691 | | - async def _cls_pause_async( |
1692 | | - cls, subscription: str, **params: Unpack["SubscriptionPauseParams"] |
1693 | | - ) -> "Subscription": |
1694 | | - """ |
1695 | | - Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. |
1696 | | - """ |
1697 | | - return cast( |
1698 | | - "Subscription", |
1699 | | - await cls._static_request_async( |
1700 | | - "post", |
1701 | | - "/v1/subscriptions/{subscription}/pause".format( |
1702 | | - subscription=sanitize_id(subscription) |
1703 | | - ), |
1704 | | - params=params, |
1705 | | - ), |
1706 | | - ) |
1707 | | - |
1708 | | - @overload |
1709 | | - @staticmethod |
1710 | | - async def pause_async( |
1711 | | - subscription: str, **params: Unpack["SubscriptionPauseParams"] |
1712 | | - ) -> "Subscription": |
1713 | | - """ |
1714 | | - Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. |
1715 | | - """ |
1716 | | - ... |
1717 | | - |
1718 | | - @overload |
1719 | | - async def pause_async( |
1720 | | - self, **params: Unpack["SubscriptionPauseParams"] |
1721 | | - ) -> "Subscription": |
1722 | | - """ |
1723 | | - Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. |
1724 | | - """ |
1725 | | - ... |
1726 | | - |
1727 | | - @class_method_variant("_cls_pause_async") |
1728 | | - async def pause_async( # pyright: ignore[reportGeneralTypeIssues] |
1729 | | - self, **params: Unpack["SubscriptionPauseParams"] |
1730 | | - ) -> "Subscription": |
1731 | | - """ |
1732 | | - Pauses a subscription by transitioning it to the paused status. A paused subscription does not generate invoices and will not advance to new billing periods. The subscription can be resumed later using the resume endpoint. Cannot pause subscriptions with attached schedules. |
1733 | | - """ |
1734 | | - return cast( |
1735 | | - "Subscription", |
1736 | | - await self._request_async( |
1737 | | - "post", |
1738 | | - "/v1/subscriptions/{subscription}/pause".format( |
1739 | | - subscription=sanitize_id(self.get("id")) |
1740 | | - ), |
1741 | | - params=params, |
1742 | | - ), |
1743 | | - ) |
1744 | | - |
1745 | 1632 | @classmethod |
1746 | 1633 | def _cls_resume( |
1747 | 1634 | cls, subscription: str, **params: Unpack["SubscriptionResumeParams"] |
|
0 commit comments