public async Task <SignupCustomerResponse> SignupCustomerAsync(
            Customer customer,
            AdvertiserAccount account,
            long?parentCustomerId)
        {
            var request = new SignupCustomerRequest
            {
                Customer         = customer,
                Account          = account,
                ParentCustomerId = parentCustomerId
            };

            return(await CustomerManagementService.CallAsync((s, r) => s.SignupCustomerAsync(r), request));
        }
示例#2
0
        /// <summary>
        /// Creates a new child customer and account that rolls up to the reseller's billing invoice.
        /// </summary>
        /// <param name="customer">The new child customer.</param>
        /// <param name="account">The account within the new customer.</param>
        /// <param name="parentCustomerId">The customer identifier of the reseller that will manage this customer.</param>
        /// <returns></returns>
        private async Task <SignupCustomerResponse> SignupCustomerAsync(
            Customer customer,
            Account account,
            long?parentCustomerId)
        {
            var request = new SignupCustomerRequest
            {
                Customer         = customer,
                Account          = account,
                ParentCustomerId = parentCustomerId,
            };

            return(await Service.CallAsync((s, r) => s.SignupCustomerAsync(r), request));
        }
示例#3
0
        public async Task <SignupCustomerResponse> SignupCustomerAsync(ApiAuthentication auth, Account account, ApplicationType applicationType, Customer customer, long parentCustomerId)
        {
            var request = new SignupCustomerRequest
            {
                Account          = account,
                ApplicationScope = applicationType,
                Customer         = customer,
                ParentCustomerId = parentCustomerId,
            };

            try
            {
                SetAuthHelper.SetAuth(auth, request);

                return(await Check().SignupCustomerAsync(request));
            }
            catch (Exception ex)
            {
                Log(new LogEventArgs(ServiceType.CustomerManagement, "SignupCustomerAsync", ex.Message, new { Request = request }, ex));
            }

            return(null);
        }