From 2502a795a4f19fc5c6be35411cceec8ea5689fba Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi Date: Tue, 28 Jul 2020 02:04:40 +0600 Subject: [PATCH] Add setters to MessageSuccessfulPayment --- src/types/message.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/types/message.rs b/src/types/message.rs index 2252264b..066d12dd 100644 --- a/src/types/message.rs +++ b/src/types/message.rs @@ -376,6 +376,17 @@ pub struct MessageSuccessfulPayment { pub successful_payment: SuccessfulPayment, } +impl MessageSuccessfulPayment { + pub fn new(successful_payment: SuccessfulPayment) -> Self { + Self { successful_payment } + } + + pub fn successful_payment(mut self, val: SuccessfulPayment) -> Self { + self.successful_payment = val; + self + } +} + #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[non_exhaustive] pub struct MessageConnectedWebsite {