Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /payment/payson/v2/checkout/{Id}/sendpaymentrequest | If checkout has is awaiting admin to send payment request, this method is sending the payment reqeust (example when you want to send the payment request manually). |
---|
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;
}
// @ValidateRequest(Validator="IsAuthenticated")
class SendCheckoutPaymentRequest 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. The checkout must have status ReadyToShip - 5
*/
// @ApiMember(Description="The checkout id. The checkout must have status ReadyToShip - 5", IsRequired=true, ParameterType="path")
String? Id;
SendCheckoutPaymentRequest({this.CompanyId,this.Id});
SendCheckoutPaymentRequest.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() => "SendCheckoutPaymentRequest";
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()),
'SendCheckoutPaymentRequest': TypeInfo(TypeOf.Class, create:() => SendCheckoutPaymentRequest()),
});
Dart SendCheckoutPaymentRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /payment/payson/v2/checkout/{Id}/sendpaymentrequest HTTP/1.1
Host: api.bokamera.se
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"Snippet":"String","Status":"None"}