updateInstrument method
Future<Instrument>
updateInstrument({
- required Instrument instrument,
- required InstrumentRequest instrumentRequest,
override
Update details of an instrument
Implementation
@override
Future<Instrument> updateInstrument({
required Instrument instrument,
required InstrumentRequest instrumentRequest,
}) async {
Map responseMap = await apiBase.call(
RESTOption.patch,
resource: _instruments + "/" + instrumentRequest.id!,
headers: headers,
body: instrumentRequest.toJson(),
);
return instrument.copyWith(
fingerprint: responseMap["fingerprint"],
expiryMonth: instrumentRequest.expiryMonth,
isDefault: instrumentRequest.isDefault,
expiryYear: instrumentRequest.expiryYear);
}