From 972f0b0a617c13003db36ab11e119158145809cf Mon Sep 17 00:00:00 2001 From: SporeStack Date: Fri, 1 Apr 2022 04:15:53 +0000 Subject: [PATCH] Remove affiliate_amount --- CHANGELOG.md | 4 ++++ src/sporestack/api.py | 2 -- src/sporestack/api_client.py | 4 ---- tests/test_api_client.py | 2 -- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8bbd14..b73dd23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Removed + +- affiliate_amount + ### Fixed - Protect files in ~/.sporestack with aggressive `umask`. diff --git a/src/sporestack/api.py b/src/sporestack/api.py index 5cff3ae..1dee59a 100644 --- a/src/sporestack/api.py +++ b/src/sporestack/api.py @@ -62,7 +62,6 @@ class ServerLaunch: region: Optional[str] organization: Optional[str] settlement_token: Optional[str] - affiliate_amount: Optional[int] affiliate_token: Optional[str] class Response(BaseModel): @@ -90,7 +89,6 @@ class ServerTopup: days: int currency: str settlement_token: Optional[str] - affiliate_amount: Optional[int] affiliate_token: Optional[str] class Response(BaseModel): diff --git a/src/sporestack/api_client.py b/src/sporestack/api_client.py index 96d79aa..a31bdcd 100644 --- a/src/sporestack/api_client.py +++ b/src/sporestack/api_client.py @@ -139,7 +139,6 @@ def launch( region: Optional[str] = None, token: Optional[str] = None, retry: bool = False, - affiliate_amount: Optional[int] = None, affiliate_token: Optional[str] = None, ) -> api.ServerLaunch.Response: request = api.ServerLaunch.Request( @@ -147,7 +146,6 @@ def launch( days=days, currency=currency, settlement_token=token, - affiliate_amount=affiliate_amount, affiliate_token=affiliate_token, flavor=flavor, region=region, @@ -168,7 +166,6 @@ def topup( api_endpoint: str = API_ENDPOINT, token: Optional[str] = None, retry: bool = False, - affiliate_amount: Optional[int] = None, affiliate_token: Optional[str] = None, ) -> api.ServerTopup.Response: """ @@ -179,7 +176,6 @@ def topup( days=days, currency=currency, settlement_token=token, - affiliate_amount=affiliate_amount, affiliate_token=affiliate_token, ) url = api_endpoint + api.ServerTopup.url.format(machine_id=machine_id) diff --git a/tests/test_api_client.py b/tests/test_api_client.py index 17cd838..b40b4cc 100644 --- a/tests/test_api_client.py +++ b/tests/test_api_client.py @@ -41,7 +41,6 @@ def test_launch(mock_api_request: MagicMock) -> None: "region": None, "organization": None, "settlement_token": None, - "affiliate_amount": None, "affiliate_token": None, } mock_api_request.assert_called_once_with( @@ -60,7 +59,6 @@ def test_topup(mock_api_request: MagicMock) -> None: "days": 1, "currency": "xmr", "settlement_token": None, - "affiliate_amount": None, "affiliate_token": None, } mock_api_request.assert_called_once_with(