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

net.authorize.api.controller.UpdateCustomerShippingAddressController Maven / Gradle / Ivy

package net.authorize.api.controller;

import net.authorize.api.contract.v1.UpdateCustomerShippingAddressRequest;
import net.authorize.api.contract.v1.UpdateCustomerShippingAddressResponse;
import net.authorize.api.contract.v1.ValidationModeEnum;
import net.authorize.api.controller.base.ApiOperationBase;

public class UpdateCustomerShippingAddressController extends ApiOperationBase {

	public UpdateCustomerShippingAddressController(UpdateCustomerShippingAddressRequest apiRequest) {
		super(apiRequest);
	}
	
	@Override
	protected void validateRequest() {
		UpdateCustomerShippingAddressRequest request = this.getApiRequest();
		
		//validate required fields		
		if ( null == request.getCustomerProfileId()) throw new NullPointerException("CustomerProfileId cannot be null");
		if ( null == request.getAddress()) throw new NullPointerException("Address cannot be null");
		
		//validate not-required fields		
		//creditCardOne.setCardCode("");
	}

	@Override
	protected Class getResponseType() {
		return UpdateCustomerShippingAddressResponse.class;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy