shippingAddresses method
- {int? addressId,
- DateTime? fromUpdatedAt,
- int? pageSize}
사용자의 배송지 정보 획득
Implementation
Future<UserShippingAddresses> shippingAddresses({
int? addressId,
DateTime? fromUpdatedAt,
int? pageSize,
}) async {
Map<String, dynamic> params = {
Constants.addressId: addressId,
Constants.fromUpdatedAt: fromUpdatedAt == null
? null
: fromUpdatedAt.millisecondsSinceEpoch / 1000,
Constants.pageSize: pageSize,
};
params.removeWhere((k, v) => v == null);
return ApiFactory.handleApiError(() async {
Response response = await _dio.get(Constants.v1ShippingAddressesPath,
queryParameters: params);
return UserShippingAddresses.fromJson(response.data);
});
}