UserCredits
User credit information
Properties
| Property | Type | Required | Description |
|---|---|---|---|
user_id | string | β Yes | - |
credits_remaining | number | β Yes | - |
credits_total | number | β Yes | - |
last_updated | string | β Yes | - |
subscription_tier | string | β No | - |
Example
{
"user_id": "example",
"credits_remaining": 0,
"credits_total": 0,
"last_updated": "example",
"subscription_tier": "example"
}Used In
Code Examples
TypeScript
interface UserCredits {
user_id: string;
credits_remaining: number;
credits_total: number;
last_updated: string;
subscription_tier?: string;
}
// Usage example
const data: UserCredits = {
"user_id": "example",
"credits_remaining": 0,
"credits_total": 0,
"last_updated": "example",
"subscription_tier": "example"
};Python
from data_layer.schemas import UserCredits
# Create instance
data = UserCredits(
# Add your field values here
)cURL
curl -X POST "https://altsportsleagues-backend-2qcdjegnaa-uc.a.run.app/api/endpoint" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{ "user_id": "example", "credits_remaining": 0, "credits_total": 0, "last_updated": "example", "subscription_tier": "example" }'Validation Rules
Required Fields: user_id, credits_remaining, credits_total, last_updated
Additional Information
- Type: object
- Source: Generated from Pydantic models in
data_layer/schemas/ - Auto-validated: All fields are validated by FastAPI
This documentation is auto-generated from the OpenAPI specification.