BokaMera.API.Host

<back to all web services

EaccountingUserToken

The following routes are available for this service:
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: 'testapi.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 .xml suffix or ?format=xml

HTTP + XML

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: testapi.bokamera.se 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<EAccountingDtos.EaccountingToken xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <AccessToken>String</AccessToken>
  <ExpiresIn>0</ExpiresIn>
  <RefreshToken>String</RefreshToken>
  <TokenType>String</TokenType>
</EAccountingDtos.EaccountingToken>