All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.payu.notification.client.mapper.MboaSmsMapperImpl Maven / Gradle / Ivy

The newest version!
package com.payu.notification.client.mapper;

import com.payu.notification.client.mboasms.request.MboaSmsRequest;
import com.payu.notification.client.mboasms.response.MboaSmsResponse;
import com.payu.notification.client.model.request.SmsRequest;
import com.payu.notification.client.model.response.SmsResponse;
import javax.annotation.processing.Generated;
import org.springframework.stereotype.Component;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2024-12-11T17:54:13+0000",
    comments = "version: 1.5.5.Final, compiler: javac, environment: Java 17.0.1 (Oracle Corporation)"
)
@Component
public class MboaSmsMapperImpl implements MboaSmsMapper {

    @Override
    public MboaSmsRequest toMboaSmsRequest(SmsRequest smsRequest) {
        if ( smsRequest == null ) {
            return null;
        }

        MboaSmsRequest.MboaSmsRequestBuilder mboaSmsRequest = MboaSmsRequest.builder();

        mboaSmsRequest.phoneNumbers( MboaSmsMapper.getPhoneNumbers( smsRequest.getPhoneNumberList() ) );
        mboaSmsRequest.message( smsRequest.getMessage() );

        return mboaSmsRequest.build();
    }

    @Override
    public SmsResponse toSmsResponse(MboaSmsResponse mboaSmsResponse) {
        if ( mboaSmsResponse == null ) {
            return null;
        }

        SmsResponse.SmsResponseBuilder smsResponse = SmsResponse.builder();

        smsResponse.status( MboaSmsMapper.getStatus( mboaSmsResponse.isSuccess() ) );
        smsResponse.message( mboaSmsResponse.getMessage() );

        return smsResponse.build();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy