コード例 #1
0
        internal async Task <(bool, Exception)> SendSmsOrEmail(SaveCustomerVehicleRequest request,
                                                               DealerConfigurationResponse dealerResponse, DealerInvitationContentResponse dealerInvitationResponse, bool sendEmail = false)
        {
            if (sendEmail)
            {
                return(await _emailGatewayClient.SendHtmlEmail(dealerResponse.EmailAddress, request.CustomerEmail, dealerInvitationResponse.EmailSubject,
                                                               GetInvitationText(dealerResponse.DealerId, request.CustomerNo, request.VehicleNo, request.RegistrationNo, dealerInvitationResponse.EmailContent)));
            }

            var phoneNumber = FormatInternationalMobileNumber(request.PhoneNumber);

            return(_smsGatewayClient.SendMessage(_invitationFromPhone, phoneNumber,
                                                 GetInvitationText(dealerResponse.DealerId, request.CustomerNo, request.VehicleNo, request.RegistrationNo, dealerInvitationResponse.SmsContent)));
        }
コード例 #2
0
 public async Task SendDismissVehicleOwnerShipEmail(Customer customer, DismissVehicleOwnershipRequest request, string dealerEmail, string registrationNo)
 {
     var subject     = $"{customer.FirstName} {customer.Surname} does not own the vehicle {registrationNo} anymore";
     var contentBody = GetDismissVehicleOwnerShipText(customer, request, registrationNo);
     await _emailGatewayClient.SendHtmlEmail(_serviceBookingEmail, dealerEmail, subject, contentBody);
 }