use of com.eventyay.organizer.data.order.model.OrderReceiptRequest in project open-event-orga-app by fossasia.
the class OrderDetailViewModel method sendReceipt.
// send order receipt via email
public void sendReceipt(String orderIdentifier) {
OrderReceiptRequest orderReceipt = new OrderReceiptRequest();
orderReceipt.setOrderIdentifier(orderIdentifier);
compositeDisposable.add(orderRepository.sendReceipt(orderReceipt).doOnSubscribe(disposable -> progress.setValue(true)).doFinally(() -> progress.setValue(false)).subscribe(() -> success.setValue("Email Sent!"), throwable -> error.setValue(ErrorUtils.getMessage(throwable).toString())));
}
Aggregations