update method
Future<MollieOrderResponse>
update(
- String orderId,
- MollieAddress billingAddress,
- MollieAddress shippingAddress
This endpoint can be used to update the billing and/or shipping address of an order.
Implementation
Future<MollieOrderResponse> update(
String orderId, MollieAddress billingAddress, MollieAddress shippingAddress) async {
Map data = {"billingAddress": billingAddress.toMap(), "shippingAddress": shippingAddress.toMap()};
dynamic body = json.encode(data);
var res = await http.patch(Uri.parse("$_apiEndpoint/$orderId"), headers: _headers, body: body);
return MollieOrderResponse.build(json.decode(res.body));
}