mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
* migrate to new backend API * hide value_type filter * Improve vendor card parsing * Update country.dart * Update lib/cake_pay/src/models/cake_pay_card.dart Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com> * Update lib/cake_pay/src/models/cake_pay_card.dart Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com> * address review comments * fix min limit value * Update lib/view_model/cake_pay/cake_pay_buy_card_view_model.dart Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com> * cake pay order row * order provider adapter * add Cake Pay order filtering * Update cake_pay_buy_card_view_model.dart * fix hidden order balance * Update lib/cake_pay/src/models/cake_pay_card.dart Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com> * Update lib/cake_pay/src/services/cake_pay_api.dart Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com> * address review comments --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
20 lines
639 B
Dart
20 lines
639 B
Dart
import 'package:cw_core/enumerable_item.dart';
|
|
|
|
class OrderSourceDescription extends EnumerableItem<int> with Serializable<int> {
|
|
const OrderSourceDescription({required String title, required int raw})
|
|
: super(title: title, raw: raw);
|
|
|
|
static const buy = OrderSourceDescription(title: 'Buy', raw: 0);
|
|
static const order = OrderSourceDescription(title: 'Order', raw: 1);
|
|
|
|
static OrderSourceDescription deserialize({required int raw}) {
|
|
switch (raw) {
|
|
case 0:
|
|
return buy;
|
|
case 1:
|
|
return order;
|
|
default:
|
|
throw Exception('Invalid OrderSourceDescription raw value: $raw');
|
|
}
|
|
}
|
|
} |