Ejemplo n.º 1
0
        public void It_Should_Update_User()
        {
            Dictionary <string, object> metadata = new Dictionary <string, object>
            {
                { "email", "*****@*****.**" },
                { "string_field", "value_1" },
                { "number_field", 0 },
                { "object_field", new Dictionary <string, string> {
                      { "field_a", "value_a" },
                      { "field_b", "value_b" }
                  } }
            };

            Dictionary <string, string> campaign = new Dictionary <string, string>
            {
                { "utm_source", "Newsletter" },
                { "utm_medium", "Email" }
            };

            Dictionary <string, object> user = new Dictionary <string, object>
            {
                { "user_id", "12345" },
                { "company_id", "67890" },
                { "metadata", metadata },
                { "campaign", campaign },
            };

            moesifMiddleware.UpdateUser(user);
        }
Ejemplo n.º 2
0
        public void It_Should_Update_User()
        {
            Dictionary <string, object> metadata = new Dictionary <string, object>
            {
                { "email", "*****@*****.**" },
                { "string_field", "value_1" },
                { "number_field", 0 },
                { "object_field", new Dictionary <string, string> {
                      { "field_a", "value_a" },
                      { "field_b", "value_b" }
                  } }
            };

            Dictionary <string, object> user = new Dictionary <string, object>
            {
                { "user_id", "csharpapiuser" },
                { "metadata", metadata },
            };

            moesifMiddleware.UpdateUser(user);
        }