コード例 #1
0
 protected override void Given()
 {
     _newLeadRequest = new CreateLeadRequest()
     {
         LeadPersonalInformation = new LeadPersonalInformationDto()
         {
             FirstName        = "test",
             Surname          = "test",
             Email            = $"{TestHelpers.UniqueName()}[email protected]",
             CurrentAdvisorId = 1,
             GenderId         = 1,
             OccupationId     = 1
         },
     };
 }
コード例 #2
0
        /// <summary>
        /// 线索回收接口
        /// </summary>
        /// <param name="req"><see cref="CreateLeadRequest"/></param>
        /// <returns><see cref="CreateLeadResponse"/></returns>
        public CreateLeadResponse CreateLeadSync(CreateLeadRequest req)
        {
            JsonResponseModel <CreateLeadResponse> rsp = null;

            try
            {
                var strResp = this.InternalRequestSync(req, "CreateLead");
                rsp = JsonConvert.DeserializeObject <JsonResponseModel <CreateLeadResponse> >(strResp);
            }
            catch (JsonSerializationException e)
            {
                throw new TencentCloudSDKException(e.Message);
            }
            return(rsp.Response);
        }
コード例 #3
0
ファイル: LeadCreateBddfy.cs プロジェクト: pruis/kudocode
        public void GivenANewLead()
        {
            _appointmentDateString = DateTime.Now.AddDays(2).ToString("dd-MM-yyyy HH:mm");
            _appointmentDate       = DateTime.Now.AddDays(2);

            _request = new CreateLeadRequest()
            {
                LeadPersonalInformation = new LeadPersonalInformationDto()
                {
                    FirstName        = _firstName,
                    Surname          = _surname,
                    Email            = _email,
                    CurrentAdvisorId = 1,
                    GenderId         = 1,
                    OccupationId     = 1
                },
            };
        }
コード例 #4
0
        /// <summary>
        /// Creates an advertiser lead for the given company ID.
        /// Documentation https://developers.google.com/partners/v2/reference/leads/create
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated partners service.</param>
        /// <param name="companyId">The ID of the company to contact.</param>
        /// <param name="body">A valid partners v2 body.</param>
        /// <returns>CreateLeadResponseResponse</returns>
        public static CreateLeadResponse Create(partnersService service, string companyId, CreateLeadRequest body)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }
                if (companyId == null)
                {
                    throw new ArgumentNullException(companyId);
                }

                // Make the request.
                return(service.Leads.Create(body, companyId).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Leads.Create failed.", ex);
            }
        }
コード例 #5
0
ファイル: LeadConnector.cs プロジェクト: pruis/kudocode
        public IApiResponseContextDto <int> Create(CreateLeadRequest request)
        {
            var result = ConnectorCalls.Post <CreateLeadRequest, int>(connectorClient, request, @"Lead/Create");

            return(result);
        }
コード例 #6
0
        public override async Task <LeadInformation> createLead(CreateLeadRequest request, ServerCallContext context)
        {
            await _validator.HandleValidation(request);

            return(new LeadInformation());
        }