GET | /eaccounting/token |
---|
import 'package:servicestack/servicestack.dart';
class EaccountingToken implements IConvertible
{
String? AccessToken;
String? RefreshToken;
String? TokenType;
int? ExpiresIn;
DateTime? ExpiresAt;
EaccountingToken({this.AccessToken,this.RefreshToken,this.TokenType,this.ExpiresIn,this.ExpiresAt});
EaccountingToken.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AccessToken = json['AccessToken'];
RefreshToken = json['RefreshToken'];
TokenType = json['TokenType'];
ExpiresIn = json['ExpiresIn'];
ExpiresAt = JsonConverters.fromJson(json['ExpiresAt'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'AccessToken': AccessToken,
'RefreshToken': RefreshToken,
'TokenType': TokenType,
'ExpiresIn': ExpiresIn,
'ExpiresAt': JsonConverters.toJson(ExpiresAt,'DateTime',context!)
};
getTypeName() => "EaccountingToken";
TypeContext? context = _ctx;
}
class EaccountingUserToken implements ICompany, IConvertible
{
String? CompanyId;
EaccountingUserToken({this.CompanyId});
EaccountingUserToken.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CompanyId = json['CompanyId'];
return this;
}
Map<String, dynamic> toJson() => {
'CompanyId': CompanyId
};
getTypeName() => "EaccountingUserToken";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
'EaccountingToken': TypeInfo(TypeOf.Class, create:() => EaccountingToken()),
'EaccountingUserToken': TypeInfo(TypeOf.Class, create:() => EaccountingUserToken()),
});
Dart EaccountingUserToken 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /eaccounting/token HTTP/1.1 Host: api.bokamera.se Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"AccessToken":"String","RefreshToken":"String","TokenType":"String","ExpiresIn":0,"ExpiresAt":"0001-01-01T00:00:00.0000000+00:00"}