BokaMera.API.Host

<back to all web services

PaysonCheckoutv2GetCheckout

The following routes are available for this service:
GET/payment/payson/v2/checkout/{Id}Get the checkout for BookingGet payson checkout
import 'package:servicestack/servicestack.dart';

enum Payson2CheckoutStatus
{
    None,
    Created,
    FormsFilled,
    ReadyToPay,
    ProcessingPayment,
    ReadyToShip,
    Shipped,
    PaidToAccount,
    Canceled,
    Credited,
    Expired,
    Denied,
}

class PaysonCheckoutV2Response implements IConvertible
{
    /**
    * The checkout id
    */
    // @ApiMember(Description="The checkout id")
    String? Id;

    /**
    * The code snippet to for checkout module
    */
    // @ApiMember(Description="The code snippet to for checkout module")
    String? Snippet;

    /**
    * The checkout status
    */
    // @ApiMember(Description="The checkout status")
    Payson2CheckoutStatus? Status;

    PaysonCheckoutV2Response({this.Id,this.Snippet,this.Status});
    PaysonCheckoutV2Response.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Snippet': Snippet,
        'Status': JsonConverters.toJson(Status,'Payson2CheckoutStatus',context!)
    };

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

class PaysonCheckoutv2GetCheckout implements ICompany, IConvertible
{
    /**
    * The company id, if empty will use the company id for the user you are logged in with.
    */
    // @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
    String? CompanyId;

    /**
    * The checkout id.
    */
    // @ApiMember(Description="The checkout id.", IsRequired=true, ParameterType="path")
    String? Id;

    PaysonCheckoutv2GetCheckout({this.CompanyId,this.Id});
    PaysonCheckoutv2GetCheckout.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CompanyId = json['CompanyId'];
        Id = json['Id'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CompanyId': CompanyId,
        'Id': Id
    };

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

TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
    'Payson2CheckoutStatus': TypeInfo(TypeOf.Enum, enumValues:Payson2CheckoutStatus.values),
    'PaysonCheckoutV2Response': TypeInfo(TypeOf.Class, create:() => PaysonCheckoutV2Response()),
    'PaysonCheckoutv2GetCheckout': TypeInfo(TypeOf.Class, create:() => PaysonCheckoutv2GetCheckout()),
});

Dart PaysonCheckoutv2GetCheckout DTOs

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

HTTP + JSV

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

GET /payment/payson/v2/checkout/{Id} HTTP/1.1 
Host: api.bokamera.se 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Snippet: String,
	Status: None
}