Search documentation of stripe_elixir

# StripeElixir.Resources.Billing.CreditGrant (stripe_elixir v0.1.0)

Copy Markdown View Source

CreditGrant

A credit grant is an API resource that documents the allocation of some billing credits to a customer.

Related guide: Billing credits

## Summary

### Types

t()

### Functions

expandable_fields()
object_name()

## Types

# t()

    @type t() :: %StripeElixir.Resources.Billing.CreditGrant{
      amount: map(),
      applicability_config: map(),
      category: String.t(),
      created: integer(),
      customer: map(),
      customer_account: String.t(),
      effective_at: integer(),
      expires_at: integer(),
      id: String.t(),
      livemode: boolean(),
      metadata: map(),
      name: String.t(),
      object: String.t(),
      priority: integer() | nil,
      test_clock: String.t() | map(),
      updated: integer(),
      voided_at: integer()
    }

- `amount` - Expandable.
- `applicability_config` - Expandable.
- `category` - The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. Possible values: `paid`, `promotional`.
- `created` - Time at which the object was created. Measured in seconds since the Unix epoch. Format: Unix timestamp.
- `customer` - ID of the customer receiving the billing credits. Expandable.
- `customer_account` - ID of the account representing the customer receiving the billing credits Max length: 5000. Nullable.
- `effective_at` - The time when the billing credits become effective-when they're eligible for use. Format: Unix timestamp. Nullable.
- `expires_at` - The time when the billing credits expire. If not present, the billing credits don't expire. Format: Unix timestamp. Nullable.
- `id` - Unique identifier for the object. Max length: 5000.
- `livemode` - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
- `metadata` - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- `name` - A descriptive name shown in dashboard. Max length: 5000. Nullable.
- `object` - String representing the object's type. Objects of the same type share the same value. Possible values: `billing.credit_grant`.
- `priority` - The priority for applying this credit grant. The highest priority is 0 and the lowest is 100. Nullable.
- `test_clock` - ID of the test clock this credit grant belongs to. Nullable. Expandable.
- `updated` - Time at which the object was last updated. Measured in seconds since the Unix epoch. Format: Unix timestamp.
- `voided_at` - The time when this credit grant was voided. If not present, the credit grant hasn't been voided. Format: Unix timestamp. Nullable.

## Functions

# expandable_fields()

# object_name()