Trendsic Platform Service

<back to all web services

UpdateQuoteRequest

Requires Authentication
The following routes are available for this service:
PUT,OPTIONS/v1/quote
import 'package:servicestack/servicestack.dart';

class QuoteItem implements IConvertible
{
    int? QuoteItemID;
    int? QuoteID;
    String? ItemType;
    int? SourceRefId;
    int? JobID;
    String? Name;
    String? Description;
    double? Quantity;
    double? UnitPrice;
    bool? IsTaxable;
    int? DisplayOrder;
    bool? IsDeleted;

    QuoteItem({this.QuoteItemID,this.QuoteID,this.ItemType,this.SourceRefId,this.JobID,this.Name,this.Description,this.Quantity,this.UnitPrice,this.IsTaxable,this.DisplayOrder,this.IsDeleted});
    QuoteItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        QuoteItemID = json['QuoteItemID'];
        QuoteID = json['QuoteID'];
        ItemType = json['ItemType'];
        SourceRefId = json['SourceRefId'];
        JobID = json['JobID'];
        Name = json['Name'];
        Description = json['Description'];
        Quantity = JsonConverters.toDouble(json['Quantity']);
        UnitPrice = JsonConverters.toDouble(json['UnitPrice']);
        IsTaxable = json['IsTaxable'];
        DisplayOrder = json['DisplayOrder'];
        IsDeleted = json['IsDeleted'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'QuoteItemID': QuoteItemID,
        'QuoteID': QuoteID,
        'ItemType': ItemType,
        'SourceRefId': SourceRefId,
        'JobID': JobID,
        'Name': Name,
        'Description': Description,
        'Quantity': Quantity,
        'UnitPrice': UnitPrice,
        'IsTaxable': IsTaxable,
        'DisplayOrder': DisplayOrder,
        'IsDeleted': IsDeleted
    };

    getTypeName() => "QuoteItem";
    TypeContext? context = _ctx;
}

class Quote implements IConvertible
{
    int? QuoteID;
    String? QuoteUID;
    String? TenantId;
    String? BranchId;
    int? ProjectID;
    String? ProjectUID;
    String? ProjectName;
    String? Name;
    String? Status;
    double? Total;
    String? Notes;
    String? Currency;
    String? FromName;
    String? FromPhone;
    String? FromEmail;
    String? FromAddress;
    String? ToName;
    String? ToPhone;
    String? ToEmail;
    String? ToAddress;
    DateTime? ExpiresAt;
    bool? IsLocked;
    bool? FinalPriceAfterCompletion;
    String? ApprovedByName;
    DateTime? ApprovedAt;
    String? DeclinedByName;
    DateTime? DeclinedAt;
    String? DeclineReason;
    String? CreatedBy;
    DateTime? CreatedAt;
    String? UpdatedBy;
    DateTime? UpdatedAt;
    List<QuoteItem>? Items = [];

    Quote({this.QuoteID,this.QuoteUID,this.TenantId,this.BranchId,this.ProjectID,this.ProjectUID,this.ProjectName,this.Name,this.Status,this.Total,this.Notes,this.Currency,this.FromName,this.FromPhone,this.FromEmail,this.FromAddress,this.ToName,this.ToPhone,this.ToEmail,this.ToAddress,this.ExpiresAt,this.IsLocked,this.FinalPriceAfterCompletion,this.ApprovedByName,this.ApprovedAt,this.DeclinedByName,this.DeclinedAt,this.DeclineReason,this.CreatedBy,this.CreatedAt,this.UpdatedBy,this.UpdatedAt,this.Items});
    Quote.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        QuoteID = json['QuoteID'];
        QuoteUID = json['QuoteUID'];
        TenantId = json['TenantId'];
        BranchId = json['BranchId'];
        ProjectID = json['ProjectID'];
        ProjectUID = json['ProjectUID'];
        ProjectName = json['ProjectName'];
        Name = json['Name'];
        Status = json['Status'];
        Total = JsonConverters.toDouble(json['Total']);
        Notes = json['Notes'];
        Currency = json['Currency'];
        FromName = json['FromName'];
        FromPhone = json['FromPhone'];
        FromEmail = json['FromEmail'];
        FromAddress = json['FromAddress'];
        ToName = json['ToName'];
        ToPhone = json['ToPhone'];
        ToEmail = json['ToEmail'];
        ToAddress = json['ToAddress'];
        ExpiresAt = JsonConverters.fromJson(json['ExpiresAt'],'DateTime',context!);
        IsLocked = json['IsLocked'];
        FinalPriceAfterCompletion = json['FinalPriceAfterCompletion'];
        ApprovedByName = json['ApprovedByName'];
        ApprovedAt = JsonConverters.fromJson(json['ApprovedAt'],'DateTime',context!);
        DeclinedByName = json['DeclinedByName'];
        DeclinedAt = JsonConverters.fromJson(json['DeclinedAt'],'DateTime',context!);
        DeclineReason = json['DeclineReason'];
        CreatedBy = json['CreatedBy'];
        CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
        UpdatedBy = json['UpdatedBy'];
        UpdatedAt = JsonConverters.fromJson(json['UpdatedAt'],'DateTime',context!);
        Items = JsonConverters.fromJson(json['Items'],'List<QuoteItem>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'QuoteID': QuoteID,
        'QuoteUID': QuoteUID,
        'TenantId': TenantId,
        'BranchId': BranchId,
        'ProjectID': ProjectID,
        'ProjectUID': ProjectUID,
        'ProjectName': ProjectName,
        'Name': Name,
        'Status': Status,
        'Total': Total,
        'Notes': Notes,
        'Currency': Currency,
        'FromName': FromName,
        'FromPhone': FromPhone,
        'FromEmail': FromEmail,
        'FromAddress': FromAddress,
        'ToName': ToName,
        'ToPhone': ToPhone,
        'ToEmail': ToEmail,
        'ToAddress': ToAddress,
        'ExpiresAt': JsonConverters.toJson(ExpiresAt,'DateTime',context!),
        'IsLocked': IsLocked,
        'FinalPriceAfterCompletion': FinalPriceAfterCompletion,
        'ApprovedByName': ApprovedByName,
        'ApprovedAt': JsonConverters.toJson(ApprovedAt,'DateTime',context!),
        'DeclinedByName': DeclinedByName,
        'DeclinedAt': JsonConverters.toJson(DeclinedAt,'DateTime',context!),
        'DeclineReason': DeclineReason,
        'CreatedBy': CreatedBy,
        'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
        'UpdatedBy': UpdatedBy,
        'UpdatedAt': JsonConverters.toJson(UpdatedAt,'DateTime',context!),
        'Items': JsonConverters.toJson(Items,'List<QuoteItem>',context!)
    };

    getTypeName() => "Quote";
    TypeContext? context = _ctx;
}

class QuoteResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    Quote? Quote;

    QuoteResponse({this.ResponseStatus,this.Quote});
    QuoteResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        Quote = JsonConverters.fromJson(json['Quote'],'Quote',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'Quote': JsonConverters.toJson(Quote,'Quote',context!)
    };

    getTypeName() => "QuoteResponse";
    TypeContext? context = _ctx;
}

class UpdateQuoteRequest implements IConvertible
{
    Quote? Quote;

    UpdateQuoteRequest({this.Quote});
    UpdateQuoteRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Quote = JsonConverters.fromJson(json['Quote'],'Quote',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Quote': JsonConverters.toJson(Quote,'Quote',context!)
    };

    getTypeName() => "UpdateQuoteRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'QuoteItem': TypeInfo(TypeOf.Class, create:() => QuoteItem()),
    'Quote': TypeInfo(TypeOf.Class, create:() => Quote()),
    'List<QuoteItem>': TypeInfo(TypeOf.Class, create:() => <QuoteItem>[]),
    'QuoteResponse': TypeInfo(TypeOf.Class, create:() => QuoteResponse()),
    'UpdateQuoteRequest': TypeInfo(TypeOf.Class, create:() => UpdateQuoteRequest()),
});

Dart UpdateQuoteRequest DTOs

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

HTTP + OTHER

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

PUT /v1/quote HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"Quote":{"QuoteID":0,"QuoteUID":"00000000000000000000000000000000","TenantId":"00000000000000000000000000000000","BranchId":"00000000000000000000000000000000","ProjectID":0,"ProjectUID":"00000000000000000000000000000000","ProjectName":"String","Name":"String","Status":"String","Total":0,"Notes":"String","Currency":"String","FromName":"String","FromPhone":"String","FromEmail":"String","FromAddress":"String","ToName":"String","ToPhone":"String","ToEmail":"String","ToAddress":"String","ExpiresAt":"0001-01-01T00:00:00.0000000","IsLocked":false,"FinalPriceAfterCompletion":false,"ApprovedByName":"String","ApprovedAt":"0001-01-01T00:00:00.0000000","DeclinedByName":"String","DeclinedAt":"0001-01-01T00:00:00.0000000","DeclineReason":"String","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedBy":"String","UpdatedAt":"0001-01-01T00:00:00.0000000","Items":[{"QuoteItemID":0,"QuoteID":0,"ItemType":"String","SourceRefId":0,"JobID":0,"Name":"String","Description":"String","Quantity":0,"UnitPrice":0,"IsTaxable":false,"DisplayOrder":0,"IsDeleted":false}]}}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Quote":{"QuoteID":0,"QuoteUID":"00000000000000000000000000000000","TenantId":"00000000000000000000000000000000","BranchId":"00000000000000000000000000000000","ProjectID":0,"ProjectUID":"00000000000000000000000000000000","ProjectName":"String","Name":"String","Status":"String","Total":0,"Notes":"String","Currency":"String","FromName":"String","FromPhone":"String","FromEmail":"String","FromAddress":"String","ToName":"String","ToPhone":"String","ToEmail":"String","ToAddress":"String","ExpiresAt":"0001-01-01T00:00:00.0000000","IsLocked":false,"FinalPriceAfterCompletion":false,"ApprovedByName":"String","ApprovedAt":"0001-01-01T00:00:00.0000000","DeclinedByName":"String","DeclinedAt":"0001-01-01T00:00:00.0000000","DeclineReason":"String","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedBy":"String","UpdatedAt":"0001-01-01T00:00:00.0000000","Items":[{"QuoteItemID":0,"QuoteID":0,"ItemType":"String","SourceRefId":0,"JobID":0,"Name":"String","Description":"String","Quantity":0,"UnitPrice":0,"IsTaxable":false,"DisplayOrder":0,"IsDeleted":false}]}}