Ecto schema for the accrue_refunds table (D3-45).
Models a Stripe refund with first-class fee reconciliation:
stripe_fee_refunded_amount_minor— portion of the original Stripe fee that Stripe returned to the merchant on refundmerchant_loss_amount_minor— non-recoverable fee the merchant eatsfees_settled_at— wall-clock when the fee pull-forward completes
Summary
Functions
Builds a changeset for creating or updating a Refund.
True if the fee reconciliation has completed.
Canonical list of refund statuses.
Types
@type t() :: %Accrue.Billing.Refund{ __meta__: term(), amount_minor: term(), charge: term(), charge_id: term(), currency: term(), data: term(), fees_settled_at: term(), id: term(), inserted_at: term(), last_stripe_event_id: term(), last_stripe_event_ts: term(), lock_version: term(), merchant_loss_amount_minor: term(), metadata: term(), reason: term(), status: term(), stripe_fee_refunded_amount_minor: term(), stripe_id: term(), updated_at: term() }
Functions
@spec changeset( %Accrue.Billing.Refund{ __meta__: term(), amount_minor: term(), charge: term(), charge_id: term(), currency: term(), data: term(), fees_settled_at: term(), id: term(), inserted_at: term(), last_stripe_event_id: term(), last_stripe_event_ts: term(), lock_version: term(), merchant_loss_amount_minor: term(), metadata: term(), reason: term(), status: term(), stripe_fee_refunded_amount_minor: term(), stripe_id: term(), updated_at: term() } | Ecto.Changeset.t(), map() ) :: Ecto.Changeset.t()
Builds a changeset for creating or updating a Refund.
@spec fees_settled?( %Accrue.Billing.Refund{ __meta__: term(), amount_minor: term(), charge: term(), charge_id: term(), currency: term(), data: term(), fees_settled_at: term(), id: term(), inserted_at: term(), last_stripe_event_id: term(), last_stripe_event_ts: term(), lock_version: term(), merchant_loss_amount_minor: term(), metadata: term(), reason: term(), status: term(), stripe_fee_refunded_amount_minor: term(), stripe_id: term(), updated_at: term() } | map() ) :: boolean()
True if the fee reconciliation has completed.
@spec statuses() :: [atom()]
Canonical list of refund statuses.