A single credit ledger entry
| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Unique identifier of the credit transaction | |
| type | str | Credit category. `ai` covers every AI-powered feature. | |
| feature | str | Which product the credits relate to. Set on deductions and on the credits a refund returns, absent on credit-pack top-ups, which are not tied to a single feature. | [optional] |
| amount | int | How many credits this entry moved, signed: positive for top-ups (`+30` from a credit pack), negative for deductions (`-2` for a two-page import). Sum only entries whose `state` is `active`. | |
| source | str | Which pool the credits came from: * `subscription`: the plan's periodic allowance * `purchase`: credits bought as a pack, which do not expire with the billing period * `free_tier`: promotional grants * `support`: a manual adjustment made by Flat's support team A single import can produce two entries when it spans two pools: the plan allowance is drawn down first, and the remainder comes from `purchase`. | |
| state | str | Whether the entry still counts: * `active`: in effect * `canceled`: reversed, and no longer affecting the balance. Deductions are canceled when the import they paid for fails or is refunded. | |
| job | str | Identifier of the import this entry belongs to, when it relates to one. Present on an import's deduction, on its reversal, and on credits returned when an import is refunded. Absent on credit-pack top-ups and manual adjustments. | [optional] |
| creation_date | datetime | When the transaction was created | |
| modification_date | datetime | When the transaction was last modified |
from flat_api.models.credit_transaction import CreditTransaction
# TODO update the JSON string below
json = "{}"
# create an instance of CreditTransaction from a JSON string
credit_transaction_instance = CreditTransaction.from_json(json)
# print the JSON string representation of the object
print(CreditTransaction.to_json())
# convert the object into a dict
credit_transaction_dict = credit_transaction_instance.to_dict()
# create an instance of CreditTransaction from a dict
credit_transaction_from_dict = CreditTransaction.from_dict(credit_transaction_dict)