# UsageBalance

A usage balance represents the amount of usage consumed from an [Allowance](https://developers.gigs.com/core/schemas/allowance) for a given [Subscription](https://developers.gigs.com/core/subscriptions#the-subscription-resource) in a certain Period.

## Properties

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `object` | string | Yes | Type of object is always `usageBalance`. |
| `id` | string | Yes | Unique identifier for the usage balance. |
| `allowance` | object | Yes | The [Allowance](https://developers.gigs.com/core/schemas/allowance) this usage balance is tracking. |
| `subscription` | string | Yes | Unique identifier of the [Subscription](https://developers.gigs.com/core/subscriptions#the-subscription-resource) the usage balance is related to. |
| `source` | object | Yes | The entity providing the allowance to the [Subscription](https://developers.gigs.com/core/subscriptions#the-subscription-resource). |
| `unit` | bytes | seconds | messages | Yes | The unit the usage is counted in. |
| `used` | integer | Yes | The amount of usage consumed, counted in `unit`. |
| `limit` | integer,null | Yes | The amount of usage permitted by the associated allowance counted in `unit`. A value of `null` indicates an unlimited allowance. |
| `remaining` | integer,null | Yes | The amount remaining that can still be consumed, counted in `unit`. A value of `null` indicates an unlimited allowance. |
| `usedPercent` | integer,null | Yes | The percentage of `limit` that has been used, expressed as an integer between 0 and 100. A value of `null` indicates an unlimited allowance. |
| `remainingPercent` | integer,null | Yes | The percentage of `limit` that has not been used, expressed as an integer between 0 and 100. A value of `null` indicates an unlimited allowance. |
| `usableFrom` | string,null | Yes | Timestamp representing the beginning of this usage balance's validity. A value of `null` indicates a Balance that is not yet active, for example when a Subscription is still pending. |
| `usableUntil` | string,null | Yes | Timestamp representing the end of this usage balance's validity. A value of `null` indicates a Balance that is not yet active, for example when a Subscription is still pending. |
