Files
hash-wallet/lib/order/order_source_description.dart
4b7a89d397 CW-1138-Add-CakePay-orders-to-the-transaction-history-screen (#2446)
* 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>
2025-09-01 19:09:26 +03:00

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');
}
}
}