Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 3.8.6

- Refactor `StockClosing` and `StockClosingTank` models
- Rename `tanks` to `closingDetails` value in `StockClosingInput`

## 3.8.5

- Added `thirdPartyStorage` value to `AtsLoadingParamsSample` enum, mapped to `THIRD_PARTY_STORAGE` JSON value.
Expand Down
1 change: 0 additions & 1 deletion lib/src/ats/ats.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ part 'src/orders/loading_order.dart';

// Stock closing
part 'src/stock_closing/entity/stock_closing.dart';
part 'src/stock_closing/entity/tank_changes_type.dart';
part 'src/stock_closing/entity/stock_closing_tank.dart';
part 'src/stock_closing/input/stock_closing_input.dart';
part 'src/stock_closing/input/stock_closing_tank_input.dart';
696 changes: 137 additions & 559 deletions lib/src/ats/ats.freezed.dart

Large diffs are not rendered by default.

100 changes: 41 additions & 59 deletions lib/src/ats/ats.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 20 additions & 44 deletions lib/src/ats/src/stock_closing/entity/stock_closing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,29 @@ abstract class StockClosing with _$StockClosing {
/// The [accountingVolumeDifference] parameter is the accountingVolumeDifference of the stock closing entity.
double? accountingVolumeDifference,

/// The [openingBalance] parameter is the openingBalance of the stock closing entity.
TankChangesType? openingBalance,
/// The [openingBalance20] parameter is the openingBalance20 of the stock closing entity.
double? openingBalance20,

/// The [totalEntries] parameter is the totalEntries of the stock closing entity.
TankChangesType? totalEntries,
/// The [totalEntries20] parameter is the totalEntries20 of the stock closing entity.
double? totalEntries20,

/// The [totalWithdrawals] parameter is the totalWithdrawals of the stock closing entity.
TankChangesType? totalWithdrawals,
/// The [totalWithdrawals20] parameter is the totalWithdrawals20 of the stock closing entity.
double? totalWithdrawals20,

/// The [closingBalance] parameter is the closingBalance of the stock closing entity.
TankChangesType? closingBalance,
/// The [closingBalance20] parameter is the closingBalance20 of the stock closing entity.
double? closingBalance20,

/// The [openingAccountingBalance] parameter is the openingAccountingBalance of the stock closing entity.
double? openingAccountingBalance,

/// The [totalAccountingEntries] parameter is the totalAccountingEntries of the stock closing entity.
double? totalAccountingEntries,

/// The [totalAccountingWithdrawals] parameter is the totalAccountingWithdrawals of the stock closing entity.
double? totalAccountingWithdrawals,

/// The [closingAccountingBalance] parameter is the closingAccountingBalance of the stock closing entity.
double? closingAccountingBalance,

/// The [createdAt] parameter is the createdAt of the stock closing entity.
@TimestampOrNullConverter() DateTime? createdAt,
Expand All @@ -59,39 +71,3 @@ abstract class StockClosing with _$StockClosing {
/// The [json] parameter is the JSON map to create the instance from.
factory StockClosing.fromJson(Map<String, dynamic> json) => _$StockClosingFromJson(json);
}

// StockClosing
// Fields

// None
// id ID
// Add Fragment
// terminalId ID
// Add Fragment
// terminal Asset
// Add Fragment
// product FuelSubtype
// Add Fragment
// description String
// Add Fragment
// tanksIds [ID]
// Add Fragment
// closingDetails [StockClosingTank]
// Add Fragment
// totalVolume20 Float
// Add Fragment
// volume20Difference Float
// Add Fragment
// accountingVolumeDifference Float
// Add Fragment
// openingBalance TankChangesType
// Add Fragment
// totalEntries TankChangesType
// Add Fragment
// totalWithdrawals TankChangesType
// Add Fragment
// closingBalance TankChangesType
// Add Fragment
// createdAt Unix
// Add Fragment
// updatedAt Unix
20 changes: 16 additions & 4 deletions lib/src/ats/src/stock_closing/entity/stock_closing_tank.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,28 @@ abstract class StockClosingTank with _$StockClosingTank {
double? accountingVolumeDifference,

/// The [openingBalance] parameter is the openingBalance of the stock closing tank entity.
TankChangesType? openingBalance,
double? openingBalance,

/// The [totalEntries] parameter is the totalEntries of the stock closing tank entity.
TankChangesType? totalEntries,
double? totalEntries,

/// The [totalWithdrawals] parameter is the totalWithdrawals of the stock closing tank entity.
TankChangesType? totalWithdrawals,
double? totalWithdrawals,

/// The [closingBalance] parameter is the closingBalance of the stock closing tank entity.
TankChangesType? closingBalance,
double? closingBalance,

/// The [openingAccountingBalance] parameter is the openingAccountingBalance of the stock closing tank entity.
double? openingAccountingBalance,

/// The [totalAccountingEntries] parameter is the totalAccountingEntries of the stock closing tank entity.
double? totalAccountingEntries,

/// The [totalAccountingWithdrawals] parameter is the totalAccountingWithdrawals of the stock closing tank entity.
double? totalAccountingWithdrawals,

/// The [closingAccountingBalance] parameter is the closingAccountingBalance of the stock closing tank entity.
double? closingAccountingBalance,

/// The [createdAt] parameter is the createdAt of the stock closing tank entity.
@TimestampOrNullConverter() DateTime? createdAt,
Expand Down
19 changes: 0 additions & 19 deletions lib/src/ats/src/stock_closing/entity/tank_changes_type.dart

This file was deleted.

4 changes: 2 additions & 2 deletions lib/src/ats/src/stock_closing/input/stock_closing_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ abstract class StockClosingInput with _$StockClosingInput {
/// The [closingAccountingBalance] parameter is the closingAccountingBalance of the stock closing input.
double? closingAccountingBalance,

/// The [tanks] parameter is the tanks of the stock closing input.
@Default([]) List<StockClosingTankInput> tanks,
/// The [closingDetails] parameter is the closingDetails of the stock closing input.
@Default([]) List<StockClosingTankInput> closingDetails,
}) = _StockClosingInput;

/// Creates a new [StockClosingInput] instance from a JSON map.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
description: Layrz API models for Dart/Flutter. This package contains the models
used by the Layrz API.
name: layrz_models
version: "3.8.5"
version: "3.8.6"
repository: https://github.com/goldenm-software/layrz_models

environment:
Expand Down
Loading