| All Verbs | /cmd/notify/frontend/ |
|---|
import Foundation
import ServiceStack
public class NotifyFrontend : Codable
{
public var acceptedSlipInfo:AcceptedSlipInfo
public var errorInfo:ErrorInfo
public var confirmationInfo:ConfirmationInfo
public var slipCancellationId:String
public var walletUpdatedInfo:WalletUpdateInfo
public var userNotificationsUpdated:UserNotificationsUpdatedInfo
public var applicationEventsUpdated:ApplicationEventsUpdated
public var slipDeliveryIssueRefundRequestUpdated:SlipDeliveryIssueRefundRequestUpdated
required public init(){}
}
public class AcceptedSlipInfo : Codable
{
public var id:String
public var origin:Origin
public var bettor:Ref
public var slipSubmissionStatus:SlipSubmissionStatus
required public init(){}
}
public class Origin : Codable
{
public var application:BettingApp
public var ip:String
public var organization:RefEx
public var region:Ref
public var locationGroup:Ref
public var location:RefEx
public var device:RefEx
public var clerk:Ref
required public init(){}
}
public class BettingApp : Codable
{
public var name:String
public var version:String
required public init(){}
}
public class RefEx : Ref
{
public var data:RecordDictionary<String, String>
required public init(){ super.init() }
private enum CodingKeys : String, CodingKey {
case data
}
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
let container = try decoder.container(keyedBy: CodingKeys.self)
data = try container.decodeIfPresent(RecordDictionary<String, String>.self, forKey: .data)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
if data != nil { try container.encode(data, forKey: .data) }
}
}
public class Ref : Codable
{
public var id:String
public var val:String
required public init(){}
}
public class RecordDictionary<TKey : Codable, TVal : Codable> : List<TKey:TVal>
{
required public init(){ super.init() }
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
}
}
public enum SlipSubmissionStatus : Int, Codable
{
case Pending = 0
case Accepted = 2
case Rejected = 3
case Failed = 4
}
public class ErrorInfo : Codable
{
public var origin:Origin
public var errorCode:String
public var errorDescription:String
public var payload:[String:String]
required public init(){}
}
public class ConfirmationInfo : Codable
{
public var bettor:Ref
public var origin:Origin
public var confirmationCode:String
public var confirmationDescription:String
public var payload:[String:String]
required public init(){}
}
public class WalletUpdateInfo : Codable
{
public var bettor:Ref
public var origin:Origin
public var transactionInfo:WalletTransactionInfo
required public init(){}
}
public class WalletTransactionInfo : Codable
{
public var reason:String
required public init(){}
}
public class UserNotificationsUpdatedInfo : Codable
{
public var id:String
required public init(){}
}
public class ApplicationEventsUpdated : Codable
{
required public init(){}
}
public class SlipDeliveryIssueRefundRequestUpdated : Codable
{
required public init(){}
}
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.
POST /cmd/notify/frontend/ HTTP/1.1
Host: api.sbbet.ath.cx
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
acceptedSlipInfo:
{
id: String,
origin:
{
application:
{
name: String,
version: String
},
ip: String,
organization:
{
data:
{
String: String
},
id: String,
val: String
},
region:
{
id: String,
val: String
},
locationGroup:
{
id: String,
val: String
},
location:
{
data:
{
String: String
},
id: String,
val: String
},
device:
{
data:
{
String: String
},
id: String,
val: String
},
clerk:
{
id: String,
val: String
}
},
bettor:
{
id: String,
val: String
},
slipSubmissionStatus: 0
},
errorInfo:
{
origin:
{
application:
{
name: String,
version: String
},
ip: String,
organization:
{
data:
{
String: String
},
id: String,
val: String
},
region:
{
id: String,
val: String
},
locationGroup:
{
id: String,
val: String
},
location:
{
data:
{
String: String
},
id: String,
val: String
},
device:
{
data:
{
String: String
},
id: String,
val: String
},
clerk:
{
id: String,
val: String
}
},
errorCode: String,
errorDescription: String,
payload:
{
String: String
}
},
confirmationInfo:
{
bettor:
{
id: String,
val: String
},
origin:
{
application:
{
name: String,
version: String
},
ip: String,
organization:
{
data:
{
String: String
},
id: String,
val: String
},
region:
{
id: String,
val: String
},
locationGroup:
{
id: String,
val: String
},
location:
{
data:
{
String: String
},
id: String,
val: String
},
device:
{
data:
{
String: String
},
id: String,
val: String
},
clerk:
{
id: String,
val: String
}
},
confirmationCode: String,
confirmationDescription: String,
payload:
{
String: String
}
},
slipCancellationId: String,
walletUpdatedInfo:
{
bettor:
{
id: String,
val: String
},
origin:
{
application:
{
name: String,
version: String
},
ip: String,
organization:
{
data:
{
String: String
},
id: String,
val: String
},
region:
{
id: String,
val: String
},
locationGroup:
{
id: String,
val: String
},
location:
{
data:
{
String: String
},
id: String,
val: String
},
device:
{
data:
{
String: String
},
id: String,
val: String
},
clerk:
{
id: String,
val: String
}
},
transactionInfo:
{
reason: String
}
},
userNotificationsUpdated:
{
id: String
},
applicationEventsUpdated: {},
slipDeliveryIssueRefundRequestUpdated: {}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}