| GET | /qry/self-service-device-betting-sessions/{Id} |
|---|
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Betting.WebApi.ServiceModel;
using Betting.ReadModel;
using Starnet.Common;
using Betting.Common;
namespace Betting.Common
{
public enum SessionStatus
{
Opening = 1,
Open = 2,
Ending = 3,
Ended = 4,
Rejected = 5,
}
}
namespace Betting.ReadModel
{
public partial class SelfServiceDeviceBettingSession
{
public virtual string? Id { get; set; }
public virtual Ref? Device { get; set; }
public virtual Ref? Location { get; set; }
public virtual SessionStatus Status { get; set; }
public virtual DateTime StartedAt { get; set; }
public virtual Ref? IssuedByClerk { get; set; }
public virtual string? PatronName { get; set; }
public virtual Money? InitialCredit { get; set; }
public virtual RecordList<SessionTopUp>? TopUps { get; set; }
public virtual string? PayoutId { get; set; }
public virtual Money? Payout { get; set; }
public virtual string? RejectionReason { get; set; }
}
public partial class SessionTopUp
{
public virtual string? Id { get; set; }
public virtual Money? Amount { get; set; }
public virtual Ref? Clerk { get; set; }
public virtual TopUpStatus Status { get; set; }
public virtual string? FailureReason { get; set; }
}
public enum TopUpStatus
{
Pending = 1,
Completed = 2,
Failed = 3,
}
}
namespace Betting.WebApi.ServiceModel
{
public partial class GetSelfServiceDeviceBettingSession
{
public virtual string? Id { get; set; }
}
}
namespace Starnet.Common
{
public partial class Money
{
public virtual decimal Amount { get; set; }
public virtual string Currency { get; set; }
}
public partial class RecordList<T>
: List<T>
{
}
public partial class Ref
{
public virtual string Id { get; set; }
public virtual string Val { get; set; }
}
}
C# GetSelfServiceDeviceBettingSession DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /qry/self-service-device-betting-sessions/{Id} HTTP/1.1
Host: api.testenv.webhop.biz
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
id: String,
device:
{
id: String,
val: String
},
location:
{
id: String,
val: String
},
status: 1,
startedAt: 0001-01-01,
issuedByClerk:
{
id: String,
val: String
},
patronName: String,
initialCredit:
{
amount: 0,
currency: String
},
topUps:
[
{
id: String,
amount:
{
amount: 0,
currency: String
},
clerk:
{
id: String,
val: String
},
status: 1,
failureReason: String
}
],
payoutId: String,
payout:
{
amount: 0,
currency: String
},
rejectionReason: String
}