diff --git a/CHANGELOG.md b/CHANGELOG.md index 59a816f..30020e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 3.8.15 + +- Added `originalBuyerAsset` field (`Asset?`) to `AtsPurchaseOrder` to expose the original buyer asset linked to the purchase order. + ## 3.8.14 - Added new widgets on `RenderWidget` enum diff --git a/lib/src/ats/ats.freezed.dart b/lib/src/ats/ats.freezed.dart index 8968c97..0f86ccc 100644 --- a/lib/src/ats/ats.freezed.dart +++ b/lib/src/ats/ats.freezed.dart @@ -5598,7 +5598,8 @@ mixin _$AtsPurchaseOrder { @AtsPurchaseOrderCategoriesEntityOrNullConverter() AtsPurchaseOrderCategoriesEntity? get category;/// `operation` associated to the purchase order. AtsOperation? get operation;/// [eta] defines the estimated time of arrival. @TimestampOrNullConverter() DateTime? get eta;/// [etaUpdatedAt] defines the estimated time of arrival updated at. -@TimestampOrNullConverter() DateTime? get etaUpdatedAt; +@TimestampOrNullConverter() DateTime? get etaUpdatedAt;/// Original buyer Asset linked to the purchase order. + Asset? get originalBuyerAsset; /// Create a copy of AtsPurchaseOrder /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @@ -5611,16 +5612,16 @@ $AtsPurchaseOrderCopyWith get copyWith => _$AtsPurchaseOrderCo @override bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is AtsPurchaseOrder&&(identical(other.id, id) || other.id == id)&&(identical(other.ownerId, ownerId) || other.ownerId == ownerId)&&(identical(other.orderId, orderId) || other.orderId == orderId)&&(identical(other.assetId, assetId) || other.assetId == assetId)&&(identical(other.sellerAssetId, sellerAssetId) || other.sellerAssetId == sellerAssetId)&&(identical(other.transportAssetId, transportAssetId) || other.transportAssetId == transportAssetId)&&(identical(other.purchasedAt, purchasedAt) || other.purchasedAt == purchasedAt)&&(identical(other.receivedAt, receivedAt) || other.receivedAt == receivedAt)&&(identical(other.asset, asset) || other.asset == asset)&&(identical(other.sellerInformation, sellerInformation) || other.sellerInformation == sellerInformation)&&(identical(other.receiverInformation, receiverInformation) || other.receiverInformation == receiverInformation)&&const DeepCollectionEquality().equals(other.productsInformation, productsInformation)&&(identical(other.total, total) || other.total == total)&&(identical(other.isReceived, isReceived) || other.isReceived == isReceived)&&(identical(other.hasReception, hasReception) || other.hasReception == hasReception)&&(identical(other.transportInformation, transportInformation) || other.transportInformation == transportInformation)&&(identical(other.hasRawXml, hasRawXml) || other.hasRawXml == hasRawXml)&&(identical(other.invoiceType, invoiceType) || other.invoiceType == invoiceType)&&(identical(other.invoiceId, invoiceId) || other.invoiceId == invoiceId)&&(identical(other.parentInvoice, parentInvoice) || other.parentInvoice == parentInvoice)&&(identical(other.ideInformation, ideInformation) || other.ideInformation == ideInformation)&&(identical(other.receptionAt, receptionAt) || other.receptionAt == receptionAt)&&(identical(other.action, action) || other.action == action)&&(identical(other.transportAsset, transportAsset) || other.transportAsset == transportAsset)&&(identical(other.sellerAsset, sellerAsset) || other.sellerAsset == sellerAsset)&&(identical(other.orderStatus, orderStatus) || other.orderStatus == orderStatus)&&(identical(other.inTransitAt, inTransitAt) || other.inTransitAt == inTransitAt)&&(identical(other.waitingToDispatchAt, waitingToDispatchAt) || other.waitingToDispatchAt == waitingToDispatchAt)&&(identical(other.deliveredAt, deliveredAt) || other.deliveredAt == deliveredAt)&&(identical(other.deliverCategory, deliverCategory) || other.deliverCategory == deliverCategory)&&(identical(other.category, category) || other.category == category)&&(identical(other.operation, operation) || other.operation == operation)&&(identical(other.eta, eta) || other.eta == eta)&&(identical(other.etaUpdatedAt, etaUpdatedAt) || other.etaUpdatedAt == etaUpdatedAt)); + return identical(this, other) || (other.runtimeType == runtimeType&&other is AtsPurchaseOrder&&(identical(other.id, id) || other.id == id)&&(identical(other.ownerId, ownerId) || other.ownerId == ownerId)&&(identical(other.orderId, orderId) || other.orderId == orderId)&&(identical(other.assetId, assetId) || other.assetId == assetId)&&(identical(other.sellerAssetId, sellerAssetId) || other.sellerAssetId == sellerAssetId)&&(identical(other.transportAssetId, transportAssetId) || other.transportAssetId == transportAssetId)&&(identical(other.purchasedAt, purchasedAt) || other.purchasedAt == purchasedAt)&&(identical(other.receivedAt, receivedAt) || other.receivedAt == receivedAt)&&(identical(other.asset, asset) || other.asset == asset)&&(identical(other.sellerInformation, sellerInformation) || other.sellerInformation == sellerInformation)&&(identical(other.receiverInformation, receiverInformation) || other.receiverInformation == receiverInformation)&&const DeepCollectionEquality().equals(other.productsInformation, productsInformation)&&(identical(other.total, total) || other.total == total)&&(identical(other.isReceived, isReceived) || other.isReceived == isReceived)&&(identical(other.hasReception, hasReception) || other.hasReception == hasReception)&&(identical(other.transportInformation, transportInformation) || other.transportInformation == transportInformation)&&(identical(other.hasRawXml, hasRawXml) || other.hasRawXml == hasRawXml)&&(identical(other.invoiceType, invoiceType) || other.invoiceType == invoiceType)&&(identical(other.invoiceId, invoiceId) || other.invoiceId == invoiceId)&&(identical(other.parentInvoice, parentInvoice) || other.parentInvoice == parentInvoice)&&(identical(other.ideInformation, ideInformation) || other.ideInformation == ideInformation)&&(identical(other.receptionAt, receptionAt) || other.receptionAt == receptionAt)&&(identical(other.action, action) || other.action == action)&&(identical(other.transportAsset, transportAsset) || other.transportAsset == transportAsset)&&(identical(other.sellerAsset, sellerAsset) || other.sellerAsset == sellerAsset)&&(identical(other.orderStatus, orderStatus) || other.orderStatus == orderStatus)&&(identical(other.inTransitAt, inTransitAt) || other.inTransitAt == inTransitAt)&&(identical(other.waitingToDispatchAt, waitingToDispatchAt) || other.waitingToDispatchAt == waitingToDispatchAt)&&(identical(other.deliveredAt, deliveredAt) || other.deliveredAt == deliveredAt)&&(identical(other.deliverCategory, deliverCategory) || other.deliverCategory == deliverCategory)&&(identical(other.category, category) || other.category == category)&&(identical(other.operation, operation) || other.operation == operation)&&(identical(other.eta, eta) || other.eta == eta)&&(identical(other.etaUpdatedAt, etaUpdatedAt) || other.etaUpdatedAt == etaUpdatedAt)&&(identical(other.originalBuyerAsset, originalBuyerAsset) || other.originalBuyerAsset == originalBuyerAsset)); } @JsonKey(includeFromJson: false, includeToJson: false) @override -int get hashCode => Object.hashAll([runtimeType,id,ownerId,orderId,assetId,sellerAssetId,transportAssetId,purchasedAt,receivedAt,asset,sellerInformation,receiverInformation,const DeepCollectionEquality().hash(productsInformation),total,isReceived,hasReception,transportInformation,hasRawXml,invoiceType,invoiceId,parentInvoice,ideInformation,receptionAt,action,transportAsset,sellerAsset,orderStatus,inTransitAt,waitingToDispatchAt,deliveredAt,deliverCategory,category,operation,eta,etaUpdatedAt]); +int get hashCode => Object.hashAll([runtimeType,id,ownerId,orderId,assetId,sellerAssetId,transportAssetId,purchasedAt,receivedAt,asset,sellerInformation,receiverInformation,const DeepCollectionEquality().hash(productsInformation),total,isReceived,hasReception,transportInformation,hasRawXml,invoiceType,invoiceId,parentInvoice,ideInformation,receptionAt,action,transportAsset,sellerAsset,orderStatus,inTransitAt,waitingToDispatchAt,deliveredAt,deliverCategory,category,operation,eta,etaUpdatedAt,originalBuyerAsset]); @override String toString() { - return 'AtsPurchaseOrder(id: $id, ownerId: $ownerId, orderId: $orderId, assetId: $assetId, sellerAssetId: $sellerAssetId, transportAssetId: $transportAssetId, purchasedAt: $purchasedAt, receivedAt: $receivedAt, asset: $asset, sellerInformation: $sellerInformation, receiverInformation: $receiverInformation, productsInformation: $productsInformation, total: $total, isReceived: $isReceived, hasReception: $hasReception, transportInformation: $transportInformation, hasRawXml: $hasRawXml, invoiceType: $invoiceType, invoiceId: $invoiceId, parentInvoice: $parentInvoice, ideInformation: $ideInformation, receptionAt: $receptionAt, action: $action, transportAsset: $transportAsset, sellerAsset: $sellerAsset, orderStatus: $orderStatus, inTransitAt: $inTransitAt, waitingToDispatchAt: $waitingToDispatchAt, deliveredAt: $deliveredAt, deliverCategory: $deliverCategory, category: $category, operation: $operation, eta: $eta, etaUpdatedAt: $etaUpdatedAt)'; + return 'AtsPurchaseOrder(id: $id, ownerId: $ownerId, orderId: $orderId, assetId: $assetId, sellerAssetId: $sellerAssetId, transportAssetId: $transportAssetId, purchasedAt: $purchasedAt, receivedAt: $receivedAt, asset: $asset, sellerInformation: $sellerInformation, receiverInformation: $receiverInformation, productsInformation: $productsInformation, total: $total, isReceived: $isReceived, hasReception: $hasReception, transportInformation: $transportInformation, hasRawXml: $hasRawXml, invoiceType: $invoiceType, invoiceId: $invoiceId, parentInvoice: $parentInvoice, ideInformation: $ideInformation, receptionAt: $receptionAt, action: $action, transportAsset: $transportAsset, sellerAsset: $sellerAsset, orderStatus: $orderStatus, inTransitAt: $inTransitAt, waitingToDispatchAt: $waitingToDispatchAt, deliveredAt: $deliveredAt, deliverCategory: $deliverCategory, category: $category, operation: $operation, eta: $eta, etaUpdatedAt: $etaUpdatedAt, originalBuyerAsset: $originalBuyerAsset)'; } @@ -5631,11 +5632,11 @@ abstract mixin class $AtsPurchaseOrderCopyWith<$Res> { factory $AtsPurchaseOrderCopyWith(AtsPurchaseOrder value, $Res Function(AtsPurchaseOrder) _then) = _$AtsPurchaseOrderCopyWithImpl; @useResult $Res call({ - String? id, String? ownerId, String? orderId, String? assetId, String? sellerAssetId, String? transportAssetId,@TimestampOrNullConverter() DateTime? purchasedAt,@TimestampOrNullConverter() DateTime? receivedAt, Asset? asset, AtsCompanyInformation? sellerInformation, AtsCompanyInformation? receiverInformation, List? productsInformation, AtsPurchaseTotal? total, bool? isReceived, bool? hasReception, AtsTransportInformation? transportInformation, bool? hasRawXml, String? invoiceType, String? invoiceId, AtsPurchaseOrder? parentInvoice, AtsIdeInformation? ideInformation,@TimestampOrNullConverter() DateTime? receptionAt,@PurchaseOrderOperationOrNullConverter() PurchaseOrderOperation? action, Asset? transportAsset, Asset? sellerAsset,@AtsPurchaseOrderStatusOrNullConverter() AtsPurchaseOrderStatus? orderStatus,@TimestampOrNullConverter() DateTime? inTransitAt,@TimestampOrNullConverter() DateTime? waitingToDispatchAt,@TimestampOrNullConverter() DateTime? deliveredAt,@AtsPurchaseOrderSubCategoriesOrNullConverter() AtsPurchaseOrderSubCategories? deliverCategory,@AtsPurchaseOrderCategoriesEntityOrNullConverter() AtsPurchaseOrderCategoriesEntity? category, AtsOperation? operation,@TimestampOrNullConverter() DateTime? eta,@TimestampOrNullConverter() DateTime? etaUpdatedAt + String? id, String? ownerId, String? orderId, String? assetId, String? sellerAssetId, String? transportAssetId,@TimestampOrNullConverter() DateTime? purchasedAt,@TimestampOrNullConverter() DateTime? receivedAt, Asset? asset, AtsCompanyInformation? sellerInformation, AtsCompanyInformation? receiverInformation, List? productsInformation, AtsPurchaseTotal? total, bool? isReceived, bool? hasReception, AtsTransportInformation? transportInformation, bool? hasRawXml, String? invoiceType, String? invoiceId, AtsPurchaseOrder? parentInvoice, AtsIdeInformation? ideInformation,@TimestampOrNullConverter() DateTime? receptionAt,@PurchaseOrderOperationOrNullConverter() PurchaseOrderOperation? action, Asset? transportAsset, Asset? sellerAsset,@AtsPurchaseOrderStatusOrNullConverter() AtsPurchaseOrderStatus? orderStatus,@TimestampOrNullConverter() DateTime? inTransitAt,@TimestampOrNullConverter() DateTime? waitingToDispatchAt,@TimestampOrNullConverter() DateTime? deliveredAt,@AtsPurchaseOrderSubCategoriesOrNullConverter() AtsPurchaseOrderSubCategories? deliverCategory,@AtsPurchaseOrderCategoriesEntityOrNullConverter() AtsPurchaseOrderCategoriesEntity? category, AtsOperation? operation,@TimestampOrNullConverter() DateTime? eta,@TimestampOrNullConverter() DateTime? etaUpdatedAt, Asset? originalBuyerAsset }); -$AssetCopyWith<$Res>? get asset;$AtsCompanyInformationCopyWith<$Res>? get sellerInformation;$AtsCompanyInformationCopyWith<$Res>? get receiverInformation;$AtsPurchaseTotalCopyWith<$Res>? get total;$AtsTransportInformationCopyWith<$Res>? get transportInformation;$AtsPurchaseOrderCopyWith<$Res>? get parentInvoice;$AtsIdeInformationCopyWith<$Res>? get ideInformation;$AssetCopyWith<$Res>? get transportAsset;$AssetCopyWith<$Res>? get sellerAsset;$AtsOperationCopyWith<$Res>? get operation; +$AssetCopyWith<$Res>? get asset;$AtsCompanyInformationCopyWith<$Res>? get sellerInformation;$AtsCompanyInformationCopyWith<$Res>? get receiverInformation;$AtsPurchaseTotalCopyWith<$Res>? get total;$AtsTransportInformationCopyWith<$Res>? get transportInformation;$AtsPurchaseOrderCopyWith<$Res>? get parentInvoice;$AtsIdeInformationCopyWith<$Res>? get ideInformation;$AssetCopyWith<$Res>? get transportAsset;$AssetCopyWith<$Res>? get sellerAsset;$AtsOperationCopyWith<$Res>? get operation;$AssetCopyWith<$Res>? get originalBuyerAsset; } /// @nodoc @@ -5648,7 +5649,7 @@ class _$AtsPurchaseOrderCopyWithImpl<$Res> /// Create a copy of AtsPurchaseOrder /// with the given fields replaced by the non-null parameter values. -@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? ownerId = freezed,Object? orderId = freezed,Object? assetId = freezed,Object? sellerAssetId = freezed,Object? transportAssetId = freezed,Object? purchasedAt = freezed,Object? receivedAt = freezed,Object? asset = freezed,Object? sellerInformation = freezed,Object? receiverInformation = freezed,Object? productsInformation = freezed,Object? total = freezed,Object? isReceived = freezed,Object? hasReception = freezed,Object? transportInformation = freezed,Object? hasRawXml = freezed,Object? invoiceType = freezed,Object? invoiceId = freezed,Object? parentInvoice = freezed,Object? ideInformation = freezed,Object? receptionAt = freezed,Object? action = freezed,Object? transportAsset = freezed,Object? sellerAsset = freezed,Object? orderStatus = freezed,Object? inTransitAt = freezed,Object? waitingToDispatchAt = freezed,Object? deliveredAt = freezed,Object? deliverCategory = freezed,Object? category = freezed,Object? operation = freezed,Object? eta = freezed,Object? etaUpdatedAt = freezed,}) { +@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? ownerId = freezed,Object? orderId = freezed,Object? assetId = freezed,Object? sellerAssetId = freezed,Object? transportAssetId = freezed,Object? purchasedAt = freezed,Object? receivedAt = freezed,Object? asset = freezed,Object? sellerInformation = freezed,Object? receiverInformation = freezed,Object? productsInformation = freezed,Object? total = freezed,Object? isReceived = freezed,Object? hasReception = freezed,Object? transportInformation = freezed,Object? hasRawXml = freezed,Object? invoiceType = freezed,Object? invoiceId = freezed,Object? parentInvoice = freezed,Object? ideInformation = freezed,Object? receptionAt = freezed,Object? action = freezed,Object? transportAsset = freezed,Object? sellerAsset = freezed,Object? orderStatus = freezed,Object? inTransitAt = freezed,Object? waitingToDispatchAt = freezed,Object? deliveredAt = freezed,Object? deliverCategory = freezed,Object? category = freezed,Object? operation = freezed,Object? eta = freezed,Object? etaUpdatedAt = freezed,Object? originalBuyerAsset = freezed,}) { return _then(_self.copyWith( id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String?,ownerId: freezed == ownerId ? _self.ownerId : ownerId // ignore: cast_nullable_to_non_nullable @@ -5684,7 +5685,8 @@ as AtsPurchaseOrderSubCategories?,category: freezed == category ? _self.category as AtsPurchaseOrderCategoriesEntity?,operation: freezed == operation ? _self.operation : operation // ignore: cast_nullable_to_non_nullable as AtsOperation?,eta: freezed == eta ? _self.eta : eta // ignore: cast_nullable_to_non_nullable as DateTime?,etaUpdatedAt: freezed == etaUpdatedAt ? _self.etaUpdatedAt : etaUpdatedAt // ignore: cast_nullable_to_non_nullable -as DateTime?, +as DateTime?,originalBuyerAsset: freezed == originalBuyerAsset ? _self.originalBuyerAsset : originalBuyerAsset // ignore: cast_nullable_to_non_nullable +as Asset?, )); } /// Create a copy of AtsPurchaseOrder @@ -5807,6 +5809,18 @@ $AtsOperationCopyWith<$Res>? get operation { return $AtsOperationCopyWith<$Res>(_self.operation!, (value) { return _then(_self.copyWith(operation: value)); }); +}/// Create a copy of AtsPurchaseOrder +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AssetCopyWith<$Res>? get originalBuyerAsset { + if (_self.originalBuyerAsset == null) { + return null; + } + + return $AssetCopyWith<$Res>(_self.originalBuyerAsset!, (value) { + return _then(_self.copyWith(originalBuyerAsset: value)); + }); } } @@ -5889,10 +5903,10 @@ return $default(_that);case _: /// } /// ``` -@optionalTypeArgs TResult maybeWhen(TResult Function( String? id, String? ownerId, String? orderId, String? assetId, String? sellerAssetId, String? transportAssetId, @TimestampOrNullConverter() DateTime? purchasedAt, @TimestampOrNullConverter() DateTime? receivedAt, Asset? asset, AtsCompanyInformation? sellerInformation, AtsCompanyInformation? receiverInformation, List? productsInformation, AtsPurchaseTotal? total, bool? isReceived, bool? hasReception, AtsTransportInformation? transportInformation, bool? hasRawXml, String? invoiceType, String? invoiceId, AtsPurchaseOrder? parentInvoice, AtsIdeInformation? ideInformation, @TimestampOrNullConverter() DateTime? receptionAt, @PurchaseOrderOperationOrNullConverter() PurchaseOrderOperation? action, Asset? transportAsset, Asset? sellerAsset, @AtsPurchaseOrderStatusOrNullConverter() AtsPurchaseOrderStatus? orderStatus, @TimestampOrNullConverter() DateTime? inTransitAt, @TimestampOrNullConverter() DateTime? waitingToDispatchAt, @TimestampOrNullConverter() DateTime? deliveredAt, @AtsPurchaseOrderSubCategoriesOrNullConverter() AtsPurchaseOrderSubCategories? deliverCategory, @AtsPurchaseOrderCategoriesEntityOrNullConverter() AtsPurchaseOrderCategoriesEntity? category, AtsOperation? operation, @TimestampOrNullConverter() DateTime? eta, @TimestampOrNullConverter() DateTime? etaUpdatedAt)? $default,{required TResult orElse(),}) {final _that = this; +@optionalTypeArgs TResult maybeWhen(TResult Function( String? id, String? ownerId, String? orderId, String? assetId, String? sellerAssetId, String? transportAssetId, @TimestampOrNullConverter() DateTime? purchasedAt, @TimestampOrNullConverter() DateTime? receivedAt, Asset? asset, AtsCompanyInformation? sellerInformation, AtsCompanyInformation? receiverInformation, List? productsInformation, AtsPurchaseTotal? total, bool? isReceived, bool? hasReception, AtsTransportInformation? transportInformation, bool? hasRawXml, String? invoiceType, String? invoiceId, AtsPurchaseOrder? parentInvoice, AtsIdeInformation? ideInformation, @TimestampOrNullConverter() DateTime? receptionAt, @PurchaseOrderOperationOrNullConverter() PurchaseOrderOperation? action, Asset? transportAsset, Asset? sellerAsset, @AtsPurchaseOrderStatusOrNullConverter() AtsPurchaseOrderStatus? orderStatus, @TimestampOrNullConverter() DateTime? inTransitAt, @TimestampOrNullConverter() DateTime? waitingToDispatchAt, @TimestampOrNullConverter() DateTime? deliveredAt, @AtsPurchaseOrderSubCategoriesOrNullConverter() AtsPurchaseOrderSubCategories? deliverCategory, @AtsPurchaseOrderCategoriesEntityOrNullConverter() AtsPurchaseOrderCategoriesEntity? category, AtsOperation? operation, @TimestampOrNullConverter() DateTime? eta, @TimestampOrNullConverter() DateTime? etaUpdatedAt, Asset? originalBuyerAsset)? $default,{required TResult orElse(),}) {final _that = this; switch (_that) { case _AtsPurchaseOrder() when $default != null: -return $default(_that.id,_that.ownerId,_that.orderId,_that.assetId,_that.sellerAssetId,_that.transportAssetId,_that.purchasedAt,_that.receivedAt,_that.asset,_that.sellerInformation,_that.receiverInformation,_that.productsInformation,_that.total,_that.isReceived,_that.hasReception,_that.transportInformation,_that.hasRawXml,_that.invoiceType,_that.invoiceId,_that.parentInvoice,_that.ideInformation,_that.receptionAt,_that.action,_that.transportAsset,_that.sellerAsset,_that.orderStatus,_that.inTransitAt,_that.waitingToDispatchAt,_that.deliveredAt,_that.deliverCategory,_that.category,_that.operation,_that.eta,_that.etaUpdatedAt);case _: +return $default(_that.id,_that.ownerId,_that.orderId,_that.assetId,_that.sellerAssetId,_that.transportAssetId,_that.purchasedAt,_that.receivedAt,_that.asset,_that.sellerInformation,_that.receiverInformation,_that.productsInformation,_that.total,_that.isReceived,_that.hasReception,_that.transportInformation,_that.hasRawXml,_that.invoiceType,_that.invoiceId,_that.parentInvoice,_that.ideInformation,_that.receptionAt,_that.action,_that.transportAsset,_that.sellerAsset,_that.orderStatus,_that.inTransitAt,_that.waitingToDispatchAt,_that.deliveredAt,_that.deliverCategory,_that.category,_that.operation,_that.eta,_that.etaUpdatedAt,_that.originalBuyerAsset);case _: return orElse(); } @@ -5910,10 +5924,10 @@ return $default(_that.id,_that.ownerId,_that.orderId,_that.assetId,_that.sellerA /// } /// ``` -@optionalTypeArgs TResult when(TResult Function( String? id, String? ownerId, String? orderId, String? assetId, String? sellerAssetId, String? transportAssetId, @TimestampOrNullConverter() DateTime? purchasedAt, @TimestampOrNullConverter() DateTime? receivedAt, Asset? asset, AtsCompanyInformation? sellerInformation, AtsCompanyInformation? receiverInformation, List? productsInformation, AtsPurchaseTotal? total, bool? isReceived, bool? hasReception, AtsTransportInformation? transportInformation, bool? hasRawXml, String? invoiceType, String? invoiceId, AtsPurchaseOrder? parentInvoice, AtsIdeInformation? ideInformation, @TimestampOrNullConverter() DateTime? receptionAt, @PurchaseOrderOperationOrNullConverter() PurchaseOrderOperation? action, Asset? transportAsset, Asset? sellerAsset, @AtsPurchaseOrderStatusOrNullConverter() AtsPurchaseOrderStatus? orderStatus, @TimestampOrNullConverter() DateTime? inTransitAt, @TimestampOrNullConverter() DateTime? waitingToDispatchAt, @TimestampOrNullConverter() DateTime? deliveredAt, @AtsPurchaseOrderSubCategoriesOrNullConverter() AtsPurchaseOrderSubCategories? deliverCategory, @AtsPurchaseOrderCategoriesEntityOrNullConverter() AtsPurchaseOrderCategoriesEntity? category, AtsOperation? operation, @TimestampOrNullConverter() DateTime? eta, @TimestampOrNullConverter() DateTime? etaUpdatedAt) $default,) {final _that = this; +@optionalTypeArgs TResult when(TResult Function( String? id, String? ownerId, String? orderId, String? assetId, String? sellerAssetId, String? transportAssetId, @TimestampOrNullConverter() DateTime? purchasedAt, @TimestampOrNullConverter() DateTime? receivedAt, Asset? asset, AtsCompanyInformation? sellerInformation, AtsCompanyInformation? receiverInformation, List? productsInformation, AtsPurchaseTotal? total, bool? isReceived, bool? hasReception, AtsTransportInformation? transportInformation, bool? hasRawXml, String? invoiceType, String? invoiceId, AtsPurchaseOrder? parentInvoice, AtsIdeInformation? ideInformation, @TimestampOrNullConverter() DateTime? receptionAt, @PurchaseOrderOperationOrNullConverter() PurchaseOrderOperation? action, Asset? transportAsset, Asset? sellerAsset, @AtsPurchaseOrderStatusOrNullConverter() AtsPurchaseOrderStatus? orderStatus, @TimestampOrNullConverter() DateTime? inTransitAt, @TimestampOrNullConverter() DateTime? waitingToDispatchAt, @TimestampOrNullConverter() DateTime? deliveredAt, @AtsPurchaseOrderSubCategoriesOrNullConverter() AtsPurchaseOrderSubCategories? deliverCategory, @AtsPurchaseOrderCategoriesEntityOrNullConverter() AtsPurchaseOrderCategoriesEntity? category, AtsOperation? operation, @TimestampOrNullConverter() DateTime? eta, @TimestampOrNullConverter() DateTime? etaUpdatedAt, Asset? originalBuyerAsset) $default,) {final _that = this; switch (_that) { case _AtsPurchaseOrder(): -return $default(_that.id,_that.ownerId,_that.orderId,_that.assetId,_that.sellerAssetId,_that.transportAssetId,_that.purchasedAt,_that.receivedAt,_that.asset,_that.sellerInformation,_that.receiverInformation,_that.productsInformation,_that.total,_that.isReceived,_that.hasReception,_that.transportInformation,_that.hasRawXml,_that.invoiceType,_that.invoiceId,_that.parentInvoice,_that.ideInformation,_that.receptionAt,_that.action,_that.transportAsset,_that.sellerAsset,_that.orderStatus,_that.inTransitAt,_that.waitingToDispatchAt,_that.deliveredAt,_that.deliverCategory,_that.category,_that.operation,_that.eta,_that.etaUpdatedAt);case _: +return $default(_that.id,_that.ownerId,_that.orderId,_that.assetId,_that.sellerAssetId,_that.transportAssetId,_that.purchasedAt,_that.receivedAt,_that.asset,_that.sellerInformation,_that.receiverInformation,_that.productsInformation,_that.total,_that.isReceived,_that.hasReception,_that.transportInformation,_that.hasRawXml,_that.invoiceType,_that.invoiceId,_that.parentInvoice,_that.ideInformation,_that.receptionAt,_that.action,_that.transportAsset,_that.sellerAsset,_that.orderStatus,_that.inTransitAt,_that.waitingToDispatchAt,_that.deliveredAt,_that.deliverCategory,_that.category,_that.operation,_that.eta,_that.etaUpdatedAt,_that.originalBuyerAsset);case _: throw StateError('Unexpected subclass'); } @@ -5930,10 +5944,10 @@ return $default(_that.id,_that.ownerId,_that.orderId,_that.assetId,_that.sellerA /// } /// ``` -@optionalTypeArgs TResult? whenOrNull(TResult? Function( String? id, String? ownerId, String? orderId, String? assetId, String? sellerAssetId, String? transportAssetId, @TimestampOrNullConverter() DateTime? purchasedAt, @TimestampOrNullConverter() DateTime? receivedAt, Asset? asset, AtsCompanyInformation? sellerInformation, AtsCompanyInformation? receiverInformation, List? productsInformation, AtsPurchaseTotal? total, bool? isReceived, bool? hasReception, AtsTransportInformation? transportInformation, bool? hasRawXml, String? invoiceType, String? invoiceId, AtsPurchaseOrder? parentInvoice, AtsIdeInformation? ideInformation, @TimestampOrNullConverter() DateTime? receptionAt, @PurchaseOrderOperationOrNullConverter() PurchaseOrderOperation? action, Asset? transportAsset, Asset? sellerAsset, @AtsPurchaseOrderStatusOrNullConverter() AtsPurchaseOrderStatus? orderStatus, @TimestampOrNullConverter() DateTime? inTransitAt, @TimestampOrNullConverter() DateTime? waitingToDispatchAt, @TimestampOrNullConverter() DateTime? deliveredAt, @AtsPurchaseOrderSubCategoriesOrNullConverter() AtsPurchaseOrderSubCategories? deliverCategory, @AtsPurchaseOrderCategoriesEntityOrNullConverter() AtsPurchaseOrderCategoriesEntity? category, AtsOperation? operation, @TimestampOrNullConverter() DateTime? eta, @TimestampOrNullConverter() DateTime? etaUpdatedAt)? $default,) {final _that = this; +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String? id, String? ownerId, String? orderId, String? assetId, String? sellerAssetId, String? transportAssetId, @TimestampOrNullConverter() DateTime? purchasedAt, @TimestampOrNullConverter() DateTime? receivedAt, Asset? asset, AtsCompanyInformation? sellerInformation, AtsCompanyInformation? receiverInformation, List? productsInformation, AtsPurchaseTotal? total, bool? isReceived, bool? hasReception, AtsTransportInformation? transportInformation, bool? hasRawXml, String? invoiceType, String? invoiceId, AtsPurchaseOrder? parentInvoice, AtsIdeInformation? ideInformation, @TimestampOrNullConverter() DateTime? receptionAt, @PurchaseOrderOperationOrNullConverter() PurchaseOrderOperation? action, Asset? transportAsset, Asset? sellerAsset, @AtsPurchaseOrderStatusOrNullConverter() AtsPurchaseOrderStatus? orderStatus, @TimestampOrNullConverter() DateTime? inTransitAt, @TimestampOrNullConverter() DateTime? waitingToDispatchAt, @TimestampOrNullConverter() DateTime? deliveredAt, @AtsPurchaseOrderSubCategoriesOrNullConverter() AtsPurchaseOrderSubCategories? deliverCategory, @AtsPurchaseOrderCategoriesEntityOrNullConverter() AtsPurchaseOrderCategoriesEntity? category, AtsOperation? operation, @TimestampOrNullConverter() DateTime? eta, @TimestampOrNullConverter() DateTime? etaUpdatedAt, Asset? originalBuyerAsset)? $default,) {final _that = this; switch (_that) { case _AtsPurchaseOrder() when $default != null: -return $default(_that.id,_that.ownerId,_that.orderId,_that.assetId,_that.sellerAssetId,_that.transportAssetId,_that.purchasedAt,_that.receivedAt,_that.asset,_that.sellerInformation,_that.receiverInformation,_that.productsInformation,_that.total,_that.isReceived,_that.hasReception,_that.transportInformation,_that.hasRawXml,_that.invoiceType,_that.invoiceId,_that.parentInvoice,_that.ideInformation,_that.receptionAt,_that.action,_that.transportAsset,_that.sellerAsset,_that.orderStatus,_that.inTransitAt,_that.waitingToDispatchAt,_that.deliveredAt,_that.deliverCategory,_that.category,_that.operation,_that.eta,_that.etaUpdatedAt);case _: +return $default(_that.id,_that.ownerId,_that.orderId,_that.assetId,_that.sellerAssetId,_that.transportAssetId,_that.purchasedAt,_that.receivedAt,_that.asset,_that.sellerInformation,_that.receiverInformation,_that.productsInformation,_that.total,_that.isReceived,_that.hasReception,_that.transportInformation,_that.hasRawXml,_that.invoiceType,_that.invoiceId,_that.parentInvoice,_that.ideInformation,_that.receptionAt,_that.action,_that.transportAsset,_that.sellerAsset,_that.orderStatus,_that.inTransitAt,_that.waitingToDispatchAt,_that.deliveredAt,_that.deliverCategory,_that.category,_that.operation,_that.eta,_that.etaUpdatedAt,_that.originalBuyerAsset);case _: return null; } @@ -5945,7 +5959,7 @@ return $default(_that.id,_that.ownerId,_that.orderId,_that.assetId,_that.sellerA @JsonSerializable() class _AtsPurchaseOrder implements AtsPurchaseOrder { - _AtsPurchaseOrder({this.id, this.ownerId, this.orderId, this.assetId, this.sellerAssetId, this.transportAssetId, @TimestampOrNullConverter() this.purchasedAt, @TimestampOrNullConverter() this.receivedAt, this.asset, this.sellerInformation, this.receiverInformation, final List? productsInformation, this.total, this.isReceived, this.hasReception, this.transportInformation, this.hasRawXml, this.invoiceType, this.invoiceId, this.parentInvoice, this.ideInformation, @TimestampOrNullConverter() this.receptionAt, @PurchaseOrderOperationOrNullConverter() this.action, this.transportAsset, this.sellerAsset, @AtsPurchaseOrderStatusOrNullConverter() this.orderStatus, @TimestampOrNullConverter() this.inTransitAt, @TimestampOrNullConverter() this.waitingToDispatchAt, @TimestampOrNullConverter() this.deliveredAt, @AtsPurchaseOrderSubCategoriesOrNullConverter() this.deliverCategory, @AtsPurchaseOrderCategoriesEntityOrNullConverter() this.category, this.operation, @TimestampOrNullConverter() this.eta, @TimestampOrNullConverter() this.etaUpdatedAt}): _productsInformation = productsInformation; + _AtsPurchaseOrder({this.id, this.ownerId, this.orderId, this.assetId, this.sellerAssetId, this.transportAssetId, @TimestampOrNullConverter() this.purchasedAt, @TimestampOrNullConverter() this.receivedAt, this.asset, this.sellerInformation, this.receiverInformation, final List? productsInformation, this.total, this.isReceived, this.hasReception, this.transportInformation, this.hasRawXml, this.invoiceType, this.invoiceId, this.parentInvoice, this.ideInformation, @TimestampOrNullConverter() this.receptionAt, @PurchaseOrderOperationOrNullConverter() this.action, this.transportAsset, this.sellerAsset, @AtsPurchaseOrderStatusOrNullConverter() this.orderStatus, @TimestampOrNullConverter() this.inTransitAt, @TimestampOrNullConverter() this.waitingToDispatchAt, @TimestampOrNullConverter() this.deliveredAt, @AtsPurchaseOrderSubCategoriesOrNullConverter() this.deliverCategory, @AtsPurchaseOrderCategoriesEntityOrNullConverter() this.category, this.operation, @TimestampOrNullConverter() this.eta, @TimestampOrNullConverter() this.etaUpdatedAt, this.originalBuyerAsset}): _productsInformation = productsInformation; factory _AtsPurchaseOrder.fromJson(Map json) => _$AtsPurchaseOrderFromJson(json); /// ID of the [Asset] entity. This ID is unique. @@ -6025,6 +6039,8 @@ class _AtsPurchaseOrder implements AtsPurchaseOrder { @override@TimestampOrNullConverter() final DateTime? eta; /// [etaUpdatedAt] defines the estimated time of arrival updated at. @override@TimestampOrNullConverter() final DateTime? etaUpdatedAt; +/// Original buyer Asset linked to the purchase order. +@override final Asset? originalBuyerAsset; /// Create a copy of AtsPurchaseOrder /// with the given fields replaced by the non-null parameter values. @@ -6039,16 +6055,16 @@ Map toJson() { @override bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType&&other is _AtsPurchaseOrder&&(identical(other.id, id) || other.id == id)&&(identical(other.ownerId, ownerId) || other.ownerId == ownerId)&&(identical(other.orderId, orderId) || other.orderId == orderId)&&(identical(other.assetId, assetId) || other.assetId == assetId)&&(identical(other.sellerAssetId, sellerAssetId) || other.sellerAssetId == sellerAssetId)&&(identical(other.transportAssetId, transportAssetId) || other.transportAssetId == transportAssetId)&&(identical(other.purchasedAt, purchasedAt) || other.purchasedAt == purchasedAt)&&(identical(other.receivedAt, receivedAt) || other.receivedAt == receivedAt)&&(identical(other.asset, asset) || other.asset == asset)&&(identical(other.sellerInformation, sellerInformation) || other.sellerInformation == sellerInformation)&&(identical(other.receiverInformation, receiverInformation) || other.receiverInformation == receiverInformation)&&const DeepCollectionEquality().equals(other._productsInformation, _productsInformation)&&(identical(other.total, total) || other.total == total)&&(identical(other.isReceived, isReceived) || other.isReceived == isReceived)&&(identical(other.hasReception, hasReception) || other.hasReception == hasReception)&&(identical(other.transportInformation, transportInformation) || other.transportInformation == transportInformation)&&(identical(other.hasRawXml, hasRawXml) || other.hasRawXml == hasRawXml)&&(identical(other.invoiceType, invoiceType) || other.invoiceType == invoiceType)&&(identical(other.invoiceId, invoiceId) || other.invoiceId == invoiceId)&&(identical(other.parentInvoice, parentInvoice) || other.parentInvoice == parentInvoice)&&(identical(other.ideInformation, ideInformation) || other.ideInformation == ideInformation)&&(identical(other.receptionAt, receptionAt) || other.receptionAt == receptionAt)&&(identical(other.action, action) || other.action == action)&&(identical(other.transportAsset, transportAsset) || other.transportAsset == transportAsset)&&(identical(other.sellerAsset, sellerAsset) || other.sellerAsset == sellerAsset)&&(identical(other.orderStatus, orderStatus) || other.orderStatus == orderStatus)&&(identical(other.inTransitAt, inTransitAt) || other.inTransitAt == inTransitAt)&&(identical(other.waitingToDispatchAt, waitingToDispatchAt) || other.waitingToDispatchAt == waitingToDispatchAt)&&(identical(other.deliveredAt, deliveredAt) || other.deliveredAt == deliveredAt)&&(identical(other.deliverCategory, deliverCategory) || other.deliverCategory == deliverCategory)&&(identical(other.category, category) || other.category == category)&&(identical(other.operation, operation) || other.operation == operation)&&(identical(other.eta, eta) || other.eta == eta)&&(identical(other.etaUpdatedAt, etaUpdatedAt) || other.etaUpdatedAt == etaUpdatedAt)); + return identical(this, other) || (other.runtimeType == runtimeType&&other is _AtsPurchaseOrder&&(identical(other.id, id) || other.id == id)&&(identical(other.ownerId, ownerId) || other.ownerId == ownerId)&&(identical(other.orderId, orderId) || other.orderId == orderId)&&(identical(other.assetId, assetId) || other.assetId == assetId)&&(identical(other.sellerAssetId, sellerAssetId) || other.sellerAssetId == sellerAssetId)&&(identical(other.transportAssetId, transportAssetId) || other.transportAssetId == transportAssetId)&&(identical(other.purchasedAt, purchasedAt) || other.purchasedAt == purchasedAt)&&(identical(other.receivedAt, receivedAt) || other.receivedAt == receivedAt)&&(identical(other.asset, asset) || other.asset == asset)&&(identical(other.sellerInformation, sellerInformation) || other.sellerInformation == sellerInformation)&&(identical(other.receiverInformation, receiverInformation) || other.receiverInformation == receiverInformation)&&const DeepCollectionEquality().equals(other._productsInformation, _productsInformation)&&(identical(other.total, total) || other.total == total)&&(identical(other.isReceived, isReceived) || other.isReceived == isReceived)&&(identical(other.hasReception, hasReception) || other.hasReception == hasReception)&&(identical(other.transportInformation, transportInformation) || other.transportInformation == transportInformation)&&(identical(other.hasRawXml, hasRawXml) || other.hasRawXml == hasRawXml)&&(identical(other.invoiceType, invoiceType) || other.invoiceType == invoiceType)&&(identical(other.invoiceId, invoiceId) || other.invoiceId == invoiceId)&&(identical(other.parentInvoice, parentInvoice) || other.parentInvoice == parentInvoice)&&(identical(other.ideInformation, ideInformation) || other.ideInformation == ideInformation)&&(identical(other.receptionAt, receptionAt) || other.receptionAt == receptionAt)&&(identical(other.action, action) || other.action == action)&&(identical(other.transportAsset, transportAsset) || other.transportAsset == transportAsset)&&(identical(other.sellerAsset, sellerAsset) || other.sellerAsset == sellerAsset)&&(identical(other.orderStatus, orderStatus) || other.orderStatus == orderStatus)&&(identical(other.inTransitAt, inTransitAt) || other.inTransitAt == inTransitAt)&&(identical(other.waitingToDispatchAt, waitingToDispatchAt) || other.waitingToDispatchAt == waitingToDispatchAt)&&(identical(other.deliveredAt, deliveredAt) || other.deliveredAt == deliveredAt)&&(identical(other.deliverCategory, deliverCategory) || other.deliverCategory == deliverCategory)&&(identical(other.category, category) || other.category == category)&&(identical(other.operation, operation) || other.operation == operation)&&(identical(other.eta, eta) || other.eta == eta)&&(identical(other.etaUpdatedAt, etaUpdatedAt) || other.etaUpdatedAt == etaUpdatedAt)&&(identical(other.originalBuyerAsset, originalBuyerAsset) || other.originalBuyerAsset == originalBuyerAsset)); } @JsonKey(includeFromJson: false, includeToJson: false) @override -int get hashCode => Object.hashAll([runtimeType,id,ownerId,orderId,assetId,sellerAssetId,transportAssetId,purchasedAt,receivedAt,asset,sellerInformation,receiverInformation,const DeepCollectionEquality().hash(_productsInformation),total,isReceived,hasReception,transportInformation,hasRawXml,invoiceType,invoiceId,parentInvoice,ideInformation,receptionAt,action,transportAsset,sellerAsset,orderStatus,inTransitAt,waitingToDispatchAt,deliveredAt,deliverCategory,category,operation,eta,etaUpdatedAt]); +int get hashCode => Object.hashAll([runtimeType,id,ownerId,orderId,assetId,sellerAssetId,transportAssetId,purchasedAt,receivedAt,asset,sellerInformation,receiverInformation,const DeepCollectionEquality().hash(_productsInformation),total,isReceived,hasReception,transportInformation,hasRawXml,invoiceType,invoiceId,parentInvoice,ideInformation,receptionAt,action,transportAsset,sellerAsset,orderStatus,inTransitAt,waitingToDispatchAt,deliveredAt,deliverCategory,category,operation,eta,etaUpdatedAt,originalBuyerAsset]); @override String toString() { - return 'AtsPurchaseOrder(id: $id, ownerId: $ownerId, orderId: $orderId, assetId: $assetId, sellerAssetId: $sellerAssetId, transportAssetId: $transportAssetId, purchasedAt: $purchasedAt, receivedAt: $receivedAt, asset: $asset, sellerInformation: $sellerInformation, receiverInformation: $receiverInformation, productsInformation: $productsInformation, total: $total, isReceived: $isReceived, hasReception: $hasReception, transportInformation: $transportInformation, hasRawXml: $hasRawXml, invoiceType: $invoiceType, invoiceId: $invoiceId, parentInvoice: $parentInvoice, ideInformation: $ideInformation, receptionAt: $receptionAt, action: $action, transportAsset: $transportAsset, sellerAsset: $sellerAsset, orderStatus: $orderStatus, inTransitAt: $inTransitAt, waitingToDispatchAt: $waitingToDispatchAt, deliveredAt: $deliveredAt, deliverCategory: $deliverCategory, category: $category, operation: $operation, eta: $eta, etaUpdatedAt: $etaUpdatedAt)'; + return 'AtsPurchaseOrder(id: $id, ownerId: $ownerId, orderId: $orderId, assetId: $assetId, sellerAssetId: $sellerAssetId, transportAssetId: $transportAssetId, purchasedAt: $purchasedAt, receivedAt: $receivedAt, asset: $asset, sellerInformation: $sellerInformation, receiverInformation: $receiverInformation, productsInformation: $productsInformation, total: $total, isReceived: $isReceived, hasReception: $hasReception, transportInformation: $transportInformation, hasRawXml: $hasRawXml, invoiceType: $invoiceType, invoiceId: $invoiceId, parentInvoice: $parentInvoice, ideInformation: $ideInformation, receptionAt: $receptionAt, action: $action, transportAsset: $transportAsset, sellerAsset: $sellerAsset, orderStatus: $orderStatus, inTransitAt: $inTransitAt, waitingToDispatchAt: $waitingToDispatchAt, deliveredAt: $deliveredAt, deliverCategory: $deliverCategory, category: $category, operation: $operation, eta: $eta, etaUpdatedAt: $etaUpdatedAt, originalBuyerAsset: $originalBuyerAsset)'; } @@ -6059,11 +6075,11 @@ abstract mixin class _$AtsPurchaseOrderCopyWith<$Res> implements $AtsPurchaseOrd factory _$AtsPurchaseOrderCopyWith(_AtsPurchaseOrder value, $Res Function(_AtsPurchaseOrder) _then) = __$AtsPurchaseOrderCopyWithImpl; @override @useResult $Res call({ - String? id, String? ownerId, String? orderId, String? assetId, String? sellerAssetId, String? transportAssetId,@TimestampOrNullConverter() DateTime? purchasedAt,@TimestampOrNullConverter() DateTime? receivedAt, Asset? asset, AtsCompanyInformation? sellerInformation, AtsCompanyInformation? receiverInformation, List? productsInformation, AtsPurchaseTotal? total, bool? isReceived, bool? hasReception, AtsTransportInformation? transportInformation, bool? hasRawXml, String? invoiceType, String? invoiceId, AtsPurchaseOrder? parentInvoice, AtsIdeInformation? ideInformation,@TimestampOrNullConverter() DateTime? receptionAt,@PurchaseOrderOperationOrNullConverter() PurchaseOrderOperation? action, Asset? transportAsset, Asset? sellerAsset,@AtsPurchaseOrderStatusOrNullConverter() AtsPurchaseOrderStatus? orderStatus,@TimestampOrNullConverter() DateTime? inTransitAt,@TimestampOrNullConverter() DateTime? waitingToDispatchAt,@TimestampOrNullConverter() DateTime? deliveredAt,@AtsPurchaseOrderSubCategoriesOrNullConverter() AtsPurchaseOrderSubCategories? deliverCategory,@AtsPurchaseOrderCategoriesEntityOrNullConverter() AtsPurchaseOrderCategoriesEntity? category, AtsOperation? operation,@TimestampOrNullConverter() DateTime? eta,@TimestampOrNullConverter() DateTime? etaUpdatedAt + String? id, String? ownerId, String? orderId, String? assetId, String? sellerAssetId, String? transportAssetId,@TimestampOrNullConverter() DateTime? purchasedAt,@TimestampOrNullConverter() DateTime? receivedAt, Asset? asset, AtsCompanyInformation? sellerInformation, AtsCompanyInformation? receiverInformation, List? productsInformation, AtsPurchaseTotal? total, bool? isReceived, bool? hasReception, AtsTransportInformation? transportInformation, bool? hasRawXml, String? invoiceType, String? invoiceId, AtsPurchaseOrder? parentInvoice, AtsIdeInformation? ideInformation,@TimestampOrNullConverter() DateTime? receptionAt,@PurchaseOrderOperationOrNullConverter() PurchaseOrderOperation? action, Asset? transportAsset, Asset? sellerAsset,@AtsPurchaseOrderStatusOrNullConverter() AtsPurchaseOrderStatus? orderStatus,@TimestampOrNullConverter() DateTime? inTransitAt,@TimestampOrNullConverter() DateTime? waitingToDispatchAt,@TimestampOrNullConverter() DateTime? deliveredAt,@AtsPurchaseOrderSubCategoriesOrNullConverter() AtsPurchaseOrderSubCategories? deliverCategory,@AtsPurchaseOrderCategoriesEntityOrNullConverter() AtsPurchaseOrderCategoriesEntity? category, AtsOperation? operation,@TimestampOrNullConverter() DateTime? eta,@TimestampOrNullConverter() DateTime? etaUpdatedAt, Asset? originalBuyerAsset }); -@override $AssetCopyWith<$Res>? get asset;@override $AtsCompanyInformationCopyWith<$Res>? get sellerInformation;@override $AtsCompanyInformationCopyWith<$Res>? get receiverInformation;@override $AtsPurchaseTotalCopyWith<$Res>? get total;@override $AtsTransportInformationCopyWith<$Res>? get transportInformation;@override $AtsPurchaseOrderCopyWith<$Res>? get parentInvoice;@override $AtsIdeInformationCopyWith<$Res>? get ideInformation;@override $AssetCopyWith<$Res>? get transportAsset;@override $AssetCopyWith<$Res>? get sellerAsset;@override $AtsOperationCopyWith<$Res>? get operation; +@override $AssetCopyWith<$Res>? get asset;@override $AtsCompanyInformationCopyWith<$Res>? get sellerInformation;@override $AtsCompanyInformationCopyWith<$Res>? get receiverInformation;@override $AtsPurchaseTotalCopyWith<$Res>? get total;@override $AtsTransportInformationCopyWith<$Res>? get transportInformation;@override $AtsPurchaseOrderCopyWith<$Res>? get parentInvoice;@override $AtsIdeInformationCopyWith<$Res>? get ideInformation;@override $AssetCopyWith<$Res>? get transportAsset;@override $AssetCopyWith<$Res>? get sellerAsset;@override $AtsOperationCopyWith<$Res>? get operation;@override $AssetCopyWith<$Res>? get originalBuyerAsset; } /// @nodoc @@ -6076,7 +6092,7 @@ class __$AtsPurchaseOrderCopyWithImpl<$Res> /// Create a copy of AtsPurchaseOrder /// with the given fields replaced by the non-null parameter values. -@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? ownerId = freezed,Object? orderId = freezed,Object? assetId = freezed,Object? sellerAssetId = freezed,Object? transportAssetId = freezed,Object? purchasedAt = freezed,Object? receivedAt = freezed,Object? asset = freezed,Object? sellerInformation = freezed,Object? receiverInformation = freezed,Object? productsInformation = freezed,Object? total = freezed,Object? isReceived = freezed,Object? hasReception = freezed,Object? transportInformation = freezed,Object? hasRawXml = freezed,Object? invoiceType = freezed,Object? invoiceId = freezed,Object? parentInvoice = freezed,Object? ideInformation = freezed,Object? receptionAt = freezed,Object? action = freezed,Object? transportAsset = freezed,Object? sellerAsset = freezed,Object? orderStatus = freezed,Object? inTransitAt = freezed,Object? waitingToDispatchAt = freezed,Object? deliveredAt = freezed,Object? deliverCategory = freezed,Object? category = freezed,Object? operation = freezed,Object? eta = freezed,Object? etaUpdatedAt = freezed,}) { +@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? ownerId = freezed,Object? orderId = freezed,Object? assetId = freezed,Object? sellerAssetId = freezed,Object? transportAssetId = freezed,Object? purchasedAt = freezed,Object? receivedAt = freezed,Object? asset = freezed,Object? sellerInformation = freezed,Object? receiverInformation = freezed,Object? productsInformation = freezed,Object? total = freezed,Object? isReceived = freezed,Object? hasReception = freezed,Object? transportInformation = freezed,Object? hasRawXml = freezed,Object? invoiceType = freezed,Object? invoiceId = freezed,Object? parentInvoice = freezed,Object? ideInformation = freezed,Object? receptionAt = freezed,Object? action = freezed,Object? transportAsset = freezed,Object? sellerAsset = freezed,Object? orderStatus = freezed,Object? inTransitAt = freezed,Object? waitingToDispatchAt = freezed,Object? deliveredAt = freezed,Object? deliverCategory = freezed,Object? category = freezed,Object? operation = freezed,Object? eta = freezed,Object? etaUpdatedAt = freezed,Object? originalBuyerAsset = freezed,}) { return _then(_AtsPurchaseOrder( id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String?,ownerId: freezed == ownerId ? _self.ownerId : ownerId // ignore: cast_nullable_to_non_nullable @@ -6112,7 +6128,8 @@ as AtsPurchaseOrderSubCategories?,category: freezed == category ? _self.category as AtsPurchaseOrderCategoriesEntity?,operation: freezed == operation ? _self.operation : operation // ignore: cast_nullable_to_non_nullable as AtsOperation?,eta: freezed == eta ? _self.eta : eta // ignore: cast_nullable_to_non_nullable as DateTime?,etaUpdatedAt: freezed == etaUpdatedAt ? _self.etaUpdatedAt : etaUpdatedAt // ignore: cast_nullable_to_non_nullable -as DateTime?, +as DateTime?,originalBuyerAsset: freezed == originalBuyerAsset ? _self.originalBuyerAsset : originalBuyerAsset // ignore: cast_nullable_to_non_nullable +as Asset?, )); } @@ -6236,6 +6253,18 @@ $AtsOperationCopyWith<$Res>? get operation { return $AtsOperationCopyWith<$Res>(_self.operation!, (value) { return _then(_self.copyWith(operation: value)); }); +}/// Create a copy of AtsPurchaseOrder +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AssetCopyWith<$Res>? get originalBuyerAsset { + if (_self.originalBuyerAsset == null) { + return null; + } + + return $AssetCopyWith<$Res>(_self.originalBuyerAsset!, (value) { + return _then(_self.copyWith(originalBuyerAsset: value)); + }); } } diff --git a/lib/src/ats/ats.g.dart b/lib/src/ats/ats.g.dart index 3917ef1..7ac4cc4 100644 --- a/lib/src/ats/ats.g.dart +++ b/lib/src/ats/ats.g.dart @@ -633,6 +633,9 @@ _AtsPurchaseOrder _$AtsPurchaseOrderFromJson(Map json) => etaUpdatedAt: const TimestampOrNullConverter().fromJson( json['etaUpdatedAt'] as num?, ), + originalBuyerAsset: json['originalBuyerAsset'] == null + ? null + : Asset.fromJson(json['originalBuyerAsset'] as Map), ); Map _$AtsPurchaseOrderToJson( @@ -685,6 +688,7 @@ Map _$AtsPurchaseOrderToJson( 'etaUpdatedAt': const TimestampOrNullConverter().toJson( instance.etaUpdatedAt, ), + 'originalBuyerAsset': instance.originalBuyerAsset?.toJson(), }; _AtsPurchaseTotal _$AtsPurchaseTotalFromJson(Map json) => diff --git a/lib/src/ats/src/reception/purchase_order.dart b/lib/src/ats/src/reception/purchase_order.dart index e005ae8..74eb2fc 100644 --- a/lib/src/ats/src/reception/purchase_order.dart +++ b/lib/src/ats/src/reception/purchase_order.dart @@ -160,6 +160,9 @@ abstract class AtsPurchaseOrder with _$AtsPurchaseOrder { /// [etaUpdatedAt] defines the estimated time of arrival updated at. @TimestampOrNullConverter() DateTime? etaUpdatedAt, + + /// Original buyer Asset linked to the purchase order. + Asset? originalBuyerAsset, }) = _AtsPurchaseOrder; /// from json factory diff --git a/pubspec.yaml b/pubspec.yaml index e256082..900a931 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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.14" +version: "3.8.15" repository: https://github.com/goldenm-software/layrz_models environment: