public void MockgetCustomerShippingAddressTest()
	    {
		    //define all mocked objects as final
            var mockController = GetMockController<getCustomerShippingAddressRequest, getCustomerShippingAddressResponse>();
            var mockRequest = new getCustomerShippingAddressRequest
                {
                    merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey},
                };
            var customerAddressExType = new customerAddressExType
                {
                    customerAddressId = "1234",
                };
            var mockResponse = new getCustomerShippingAddressResponse
                {
                    refId = "1234",
                    sessionToken = "sessiontoken",
                    address = customerAddressExType,
                };

		    var errorResponse = new ANetApiResponse();
		    var results = new List<String>();
            const messageTypeEnum messageTypeOk = messageTypeEnum.Ok;

            SetMockControllerExpectations<getCustomerShippingAddressRequest, getCustomerShippingAddressResponse, getCustomerShippingAddressController>(
                mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk);
            mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM);
            //mockController.MockObject.Execute();
            // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM);
            var controllerResponse = mockController.MockObject.GetApiResponse();
            Assert.IsNotNull(controllerResponse);

            Assert.IsNotNull(controllerResponse.address);
            LogHelper.info(Logger, "getCustomerShippingAddress: Details:{0}", controllerResponse.address);
	    }
        public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey, string customerProfileID, string customerAddressId)
        {
            Console.WriteLine("Update customer shipping address sample");

            ApiOperationBase<ANetApiRequest, ANetApiResponse>.RunEnvironment = AuthorizeNet.Environment.SANDBOX;
            // define the merchant information (authentication / transaction id)
            ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication = new merchantAuthenticationType()
            {
                name = ApiLoginID,
                ItemElementName = ItemChoiceType.transactionKey,
                Item = ApiTransactionKey,
            };

            var creditCard = new creditCardType
             {
                 cardNumber = "4111111111111111",
                 expirationDate = "0718"
             };

            var paymentType = new paymentType { Item = creditCard };

            var address = new customerAddressExType
            {
                firstName = "Newfirstname",
                lastName = "Doe",
                address = "123 Main St.",
                city = "Bellevue",
                state = "WA",
                zip = "98004",
                country = "USA",
                phoneNumber = "000-000-000",
                customerAddressId = customerAddressId
            };

            var request = new updateCustomerShippingAddressRequest();
            request.customerProfileId = customerProfileID;
            request.address = address;

            // instantiate the controller that will call the service
            var controller = new updateCustomerShippingAddressController(request);
            controller.Execute();

            // get the response from the service (errors contained if any)
            var response = controller.GetApiResponse();

            if (response != null && response.messages.resultCode == messageTypeEnum.Ok)
            {
                Console.WriteLine(response.messages.message[0].text);
            }
            else if(response != null)
            {
                Console.WriteLine("Error: " + response.messages.message[0].code + "  " +
                                  response.messages.message[0].text);
            }

            return response;
        }
 public static void customerAddressExType(customerAddressExType argument)
 {
     if (null != argument)
     {
         customerAddressType(argument);
     }
 }
 public static void customerAddressExType ( customerAddressExType request) { }