use of com.hyperwallet.clientsdk.model.HyperwalletPayment in project mirakl-hyperwallet-connector by paypal.
the class PayeeCreditNoteModelToHyperwalletPaymentConverter method convert.
/**
* Method that retrieves a {@link CreditNoteModel} and returns a
* {@link HyperwalletPayment}
* @param source the source object {@link CreditNoteModel}
* @return the returned object {@link HyperwalletPayment}
*/
@Override
public HyperwalletPayment convert(final CreditNoteModel source) {
final HyperwalletPayment target = new HyperwalletPayment();
target.setProgramToken(creditNotesHyperwalletSDKService.getProgramTokenByHyperwalletProgram(source.getHyperwalletProgram()));
target.setDestinationToken(source.getDestinationToken());
target.setClientPaymentId(source.getInvoiceNumber());
target.setAmount(source.getCreditAmount());
target.setCurrency(source.getCurrencyIsoCode());
target.setPurpose(PURPOSE);
return target;
}
Aggregations