/// <param name="customerAccessToken">
        /// The customer access token
        /// </param>
        public QueryRootQuery customer(CustomerDelegate buildQuery, string customerAccessToken, string alias = null)
        {
            if (alias != null)
            {
                ValidationUtils.ValidateAlias(alias);

                Query.Append("customer___");
                Query.Append(alias);
                Query.Append(":");
            }

            Query.Append("customer ");

            Arguments args = new Arguments();

            args.Add("customerAccessToken", customerAccessToken);

            Query.Append(args.ToString());

            Query.Append("{");
            buildQuery(new CustomerQuery(Query));
            Query.Append("}");

            return(this);
        }
Beispiel #2
0
        public void Init()
        {
            mapper = AutomapperTestHelper.Mapper;
            var customerRepository = MockedRepository(new Mock <ICustomerRepository>());
            var customerHlc        = new CustomerHlc(customerRepository, mapper);
            var customerDelegate   = new CustomerDelegate(customerHlc, mapper);

            controller = new CustomersController(customerDelegate);
        }
Beispiel #3
0
        /// <summary>
        /// The created customer object.
        /// </summary>
        public CustomerCreatePayloadQuery customer(CustomerDelegate buildQuery)
        {
            Query.Append("customer ");

            Query.Append("{");
            buildQuery(new CustomerQuery(Query));
            Query.Append("}");

            return(this);
        }
        /// <summary>
        /// The associated customer object.
        /// </summary>
        public CheckoutCustomerAssociateV2payloadQuery customer(CustomerDelegate buildQuery)
        {
            Query.Append("customer ");

            Query.Append("{");
            buildQuery(new CustomerQuery(Query));
            Query.Append("}");

            return(this);
        }
Beispiel #5
0
    public void PrintCustomers()
    {
        //Write your code to associate a function to d1

        //Write your code to attach an event to a delegate instance

        //Write your code to raise the  event

        d1 += new CustomerDelegate(CountCustomersByCountry);
        d1.Invoke();
    }
Beispiel #6
0
        /// \deprecated This field will always return null. If you have an authentication token for the customer, you can use the `customer` field on the query root to retrieve it.
        /// <summary>
        /// The customer associated with the checkout.
        /// </summary>
        public CheckoutQuery customer(CustomerDelegate buildQuery)
        {
            Log.DeprecatedQueryField("Checkout", "customer", "This field will always return null. If you have an authentication token for the customer, you can use the `customer` field on the query root to retrieve it.");

            Query.Append("customer ");

            Query.Append("{");
            buildQuery(new CustomerQuery(Query));
            Query.Append("}");

            return(this);
        }