-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: applied taxes and applied discounts on line item
- Loading branch information
Showing
9 changed files
with
135 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
lib/src/shared_model/order_line_item_applied_discount.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import 'package:equatable/equatable.dart'; | ||
import 'package:json_annotation/json_annotation.dart'; | ||
import 'package:square_connect/square_connect.dart'; | ||
|
||
part 'order_line_item_applied_discount.g.dart'; | ||
|
||
@JsonSerializable() | ||
class OrderLineItemAppliedDiscount extends Equatable { | ||
const OrderLineItemAppliedDiscount({ | ||
required this.discountUid, | ||
this.uid, | ||
this.appliedMoney, | ||
}); | ||
|
||
/// Converts a [Map]<[String], [dynamic]> to a [OrderLineItemAppliedDiscount] | ||
factory OrderLineItemAppliedDiscount.fromJson(Map<String, dynamic> json) => | ||
_$OrderLineItemAppliedDiscountFromJson(json); | ||
|
||
/// Converts a [OrderLineItemAppliedDiscount] to a [Map]<[String], [dynamic]> | ||
Map<String, dynamic> toJson() => _$OrderLineItemAppliedDiscountToJson(this); | ||
|
||
final String? uid; | ||
final String discountUid; | ||
final Money? appliedMoney; | ||
|
||
@override | ||
List<Object?> get props => [uid, discountUid, appliedMoney]; | ||
} |
33 changes: 33 additions & 0 deletions
33
lib/src/shared_model/order_line_item_applied_discount.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import 'package:equatable/equatable.dart'; | ||
import 'package:json_annotation/json_annotation.dart'; | ||
import 'package:square_connect/square_connect.dart'; | ||
|
||
part 'order_line_item_applied_tax.g.dart'; | ||
|
||
@JsonSerializable() | ||
class OrderLineItemAppliedTax extends Equatable { | ||
const OrderLineItemAppliedTax({ | ||
required this.taxUid, | ||
this.uid, | ||
this.appliedMoney, | ||
}); | ||
|
||
/// Converts a [Map] to an [OrderLineItemAppliedTax] | ||
factory OrderLineItemAppliedTax.fromJson(Map<String, dynamic> json) => | ||
_$OrderLineItemAppliedTaxFromJson(json); | ||
|
||
/// Converts a [OrderLineItemAppliedTax] to a [Map] | ||
Map<String, dynamic> toJson() => _$OrderLineItemAppliedTaxToJson(this); | ||
|
||
final String? uid; | ||
final String taxUid; | ||
final Money? appliedMoney; | ||
|
||
@override | ||
List<Object?> get props => [uid, taxUid, appliedMoney]; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters