API Types
API types are objects returned by calls that return non product responses from Client. So this would include things like tasks, stock statuses and auto-renew settings but exclude a server, dedicated server and hosting. There really isnt a reason to import these beyond type annotating.
- class vshieldpy.api_defs.Invoice
Invoice object containing response information.
- service
Service ID. This includes Server ID’s and services. Can be None if a server hasnt been deployed yet.
- Type:
int | None
- date_paid
Date the invoice was paid. Can also be None if the invoice hasn’t been paid yet.
- Type:
datetime.datetime | None
- date
The date that the invoice was created.
- Type:
- due_date
Due date for the invoice.
- Type:
- class vshieldpy.api_defs.StockStatus
StockStatus for ease of use for per plan lookups.
- class vshieldpy.api_defs.Task
A task and all of its information.
- action
Server or service action that was performed or being performed.
- completion_date
Time of the task completion.
- Type:
- start_date
Time of when the task was started.
- Type:
- status
Current status of the task.
- class vshieldpy.api_defs.Payment
Payment information returned by the API.
- expiration
Expiration of the invoice.
- Type:
datetime.datetime | None
- class vshieldpy.api_defs.ServerStats
Ease of use properties related to statistics.
- property network_avg_last_1hr: tuple[float, float]
Average network input and output for the last hour.
- enum vshieldpy.api_defs.TaskStatus(value)
Possible task statuses.
Valid values are as follows:
- Failed = <TaskStatus.Failed: 0>
- Completed = <TaskStatus.Completed: 1>
- InProgress = <TaskStatus.InProgress: 2>
- enum vshieldpy.api_defs.Status(value)
All of statuses are quite self explanitory.
However its worth noting that “Installing” is for an initial install of an OS on a server.
Valid values are as follows:
- Stopped = <Status.Stopped: 0>
- Running = <Status.Running: 1>
- Suspended = <Status.Suspended: 2>
- Installing = <Status.Installing: 3>
- Reinstalling = <Status.Reinstalling: 4>