Class: Ledger::Sdk::Models::FeeExclusion

Inherits:
Base
  • Object
show all
Defined in:
lib/ledger/sdk/models/fee_exclusion.rb

Overview

Represents the collection of fee-base exclusions attached to a container from the Ledger API.

Fee exclusions are always accessed in the context of a container via /containers/:container_id/fee_exclusions. Unlike most of the SDK, fee exclusions are writable: they can be created, updated and destroyed.

Examples:

List fee exclusions for a container

exclusions = Ledger::Sdk.Container(42).fee_exclusions.list

Filter fee exclusions by kind, code and as-of date

Ledger::Sdk.Container(42).fee_exclusions.list do
  { filters: { kind: 'financial_management', code: 'FM-1', as_of: '2026-01-01' } }
end

Create a fee exclusion

exclusion = Ledger::Sdk.Container(42).fee_exclusions.create(kind: 'financial_management')

Defined Under Namespace

Classes: Instance

Instance Method Summary collapse

Methods inherited from Base

#initialize, #list

Constructor Details

This class inherits a constructor from Ledger::Sdk::Models::Base

Instance Method Details

#create(attributes) ⇒ Instance

Creates a fee exclusion for the parent container.

Parameters:

  • attributes (Hash)

    the fee-exclusion attributes, e.g. { kind: 'financial_management' }

Returns:

  • (Instance)

    the created fee-exclusion instance