Remove affiliate_amount

This commit is contained in:
SporeStack 2022-04-01 04:15:53 +00:00
parent b3efea151e
commit 972f0b0a61
4 changed files with 4 additions and 8 deletions

View File

@ -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`.

View File

@ -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):

View File

@ -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)

View File

@ -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(