All checks were successful
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/discovery Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/gateway_mntx Pipeline was successful
ci/woodpecker/push/gateway_chain Pipeline was successful
ci/woodpecker/push/gateway_tgsettle Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful
66 lines
1.7 KiB
Dart
66 lines
1.7 KiB
Dart
import 'package:pshared/models/describable.dart';
|
|
import 'package:pshared/models/ledger/balance.dart';
|
|
import 'package:pshared/models/ledger/status.dart';
|
|
import 'package:pshared/models/ledger/type.dart';
|
|
|
|
|
|
class LedgerAccount implements Describable {
|
|
final String ledgerAccountRef;
|
|
final String organizationRef;
|
|
final String? ownerRef;
|
|
final String accountCode;
|
|
final LedgerAccountType accountType;
|
|
final String currency;
|
|
final LedgerAccountStatus status;
|
|
final bool allowNegative;
|
|
final bool isSettlement;
|
|
final Map<String, String>? metadata;
|
|
final DateTime? createdAt;
|
|
final DateTime? updatedAt;
|
|
final Describable describable;
|
|
final LedgerBalance? balance;
|
|
|
|
@override
|
|
String get name => describable.name;
|
|
|
|
@override
|
|
String? get description => describable.description;
|
|
|
|
const LedgerAccount({
|
|
required this.ledgerAccountRef,
|
|
required this.organizationRef,
|
|
this.ownerRef,
|
|
required this.accountCode,
|
|
required this.accountType,
|
|
required this.currency,
|
|
required this.status,
|
|
required this.allowNegative,
|
|
required this.isSettlement,
|
|
this.metadata,
|
|
this.createdAt,
|
|
this.updatedAt,
|
|
required this.describable,
|
|
this.balance,
|
|
});
|
|
|
|
LedgerAccount copyWith({
|
|
Describable? describable,
|
|
LedgerBalance? balance,
|
|
}) => LedgerAccount(
|
|
ledgerAccountRef: ledgerAccountRef,
|
|
organizationRef: organizationRef,
|
|
ownerRef: ownerRef,
|
|
accountCode: accountCode,
|
|
accountType: accountType,
|
|
currency: currency,
|
|
status: status,
|
|
allowNegative: allowNegative,
|
|
isSettlement: isSettlement,
|
|
metadata: metadata,
|
|
createdAt: createdAt,
|
|
updatedAt: updatedAt,
|
|
describable: describable ?? this.describable,
|
|
balance: balance ?? this.balance,
|
|
);
|
|
}
|