Exemplo n.º 1
0
        /**
         * Coutries Supported:
         *     AU - Australia
         *     CA - Canada
         *     CY - Cyprus
         *     CZ - Czech Republic
         *     DK - Denmark
         *     EE - Estonia
         *     FI - Finland
         *     FR - France
         *     DE - Germany
         *     GR - Greece
         *     HU - Hungary
         *     IT - Italy
         *     LV - Latvia
         *     LT - Lithuania
         *     LU - Luxembourg
         *     MT - Malta
         *     NL - Netherlands
         *     PL - Poland
         *     PT - Portugal
         *     SK - Slovak Republic
         *     SI - Slovenia
         *     ES - Spain
         *     SE - Sweden
         *     UK - United Kingdom
         *     US - United States
         *
         *
         *
         *
         *
         */
        public CreateAccountResponse CreateAccount(CreateAccountRequest createAccountRequest, string apiUserName)
        {
            string  response = Call("CreateAccount", createAccountRequest.ToNVPString(""), apiUserName);
            NVPUtil util     = new NVPUtil();

            return(CreateAccountResponse.CreateInstance(util.ParseNVPString(response), "", -1));
        }
        /// <summary>
        /// Coutries Supported:
        /// AU - Australia
        /// CA - Canada
        /// CY -
        /// Cyprus
        /// CZ - Czech Republic
        /// DK - Denmark
        /// EE - Estonia
        /// FI - Finland
        /// FR -
        /// France
        /// DE - Germany
        /// GR - Greece
        /// HU - Hungary
        /// IT - Italy
        /// LV - Latvia
        /// LT -
        /// Lithuania
        /// LU - Luxembourg
        /// MT - Malta
        /// NL - Netherlands
        /// PL - Poland
        /// PT -
        /// Portugal
        /// SK - Slovak Republic
        /// SI - Slovenia
        /// ES - Spain
        /// SE - Sweden
        /// UK -
        /// United Kingdom
        /// US - United States
        ///
        ///
        ///
        ///
        ///
        /// </summary>
        ///<param name="createAccountRequest"></param>
        ///<param name="apiUserName">API Username that you want to authenticate this call against. This username and the corresponding 3-token/certificate credentials must be available in Web.Config/App.Config</param>
        public CreateAccountResponse CreateAccount(CreateAccountRequest createAccountRequest, string apiUserName)
        {
            IAPICallPreHandler apiCallPreHandler = new PlatformAPICallPreHandler(this.config, createAccountRequest.ToNVPString(string.Empty), ServiceName, "CreateAccount", apiUserName, getAccessToken(), getAccessTokenSecret());

            ((PlatformAPICallPreHandler)apiCallPreHandler).SDKName    = SDKName;
            ((PlatformAPICallPreHandler)apiCallPreHandler).SDKVersion = SDKVersion;
            ((PlatformAPICallPreHandler)apiCallPreHandler).PortName   = "AdaptiveAccounts";

            NVPUtil util = new NVPUtil();

            return(CreateAccountResponse.CreateInstance(util.ParseNVPString(Call(apiCallPreHandler)), string.Empty, -1));
        }