Blazor Diffusion

<back to all web services

UpdateSignup

Analytics
Requires Authentication
Required role:Moderator
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BlazorDiffusion.ServiceModel;

namespace BlazorDiffusion.ServiceModel
{
    public partial class Signup
        : StatBase
    {
        public virtual int Id { get; set; }
        public virtual SignupType Type { get; set; }
        public virtual string Email { get; set; }
        public virtual string Name { get; set; }
        public virtual DateTime? CancelledDate { get; set; }
    }

    public enum SignupType
    {
        Updates,
        Beta,
    }

    public partial class StatBase
    {
        public virtual string RefId { get; set; }
        public virtual int? AppUserId { get; set; }
        public virtual string RawUrl { get; set; }
        public virtual string RemoteIp { get; set; }
        public virtual DateTime CreatedDate { get; set; }
    }

    [ValidateRequest("HasRole(`Moderator`)")]
    public partial class UpdateSignup
        : IPatchDb<Signup>
    {
        public virtual int Id { get; set; }
        public virtual SignupType? Type { get; set; }
        [Validate("Email")]
        public virtual string Email { get; set; }

        public virtual string Name { get; set; }
        public virtual DateTime? CancelledDate { get; set; }
    }

}

C# UpdateSignup DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /json/reply/UpdateSignup HTTP/1.1 
Host: blazordiffusion.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"id":0,"type":"Updates","email":"String","name":"String","cancelledDate":"0001-01-01T00:00:00"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"id":0,"type":"Updates","email":"String","name":"String","cancelledDate":"0001-01-01T00:00:00","refId":"String","appUserId":0,"rawUrl":"String","remoteIp":"String","createdDate":"0001-01-01T00:00:00"}