/* Options:
Date: 2025-04-12 02:26:05
Version: 8.23
Tip: To override a DTO option, remove "//" prefix before updating
BaseUrl: https://testapi.bokamera.se

//GlobalNamespace: 
//AddServiceStackTypes: True
//AddResponseStatus: False
//AddImplicitVersion: 
//AddDescriptionAsComments: True
IncludeTypes: RefundBookingPayment.*
//ExcludeTypes: 
//DefaultImports: package:servicestack/servicestack.dart
*/

import 'package:servicestack/servicestack.dart';

abstract class ICompany
{
    String? CompanyId;
}

// @Route("/bookings/{Id}/refund/{PaymentLogId}", "PUT")
// @ValidateRequest(Validator="IsAuthenticated")
class RefundBookingPayment implements ICompany, IConvertible, IPut
{
    /**
    * 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 booking id
    */
    // @ApiMember(Description="The booking id", IsRequired=true, ParameterType="path")
    int? Id;

    /**
    * The booking payment log id
    */
    // @ApiMember(Description="The booking payment log id", IsRequired=true, ParameterType="path")
    int? PaymentLogId;

    /**
    * The amount to refund on the checkout.
    */
    // @ApiMember(Description="The amount to refund on the checkout.", IsRequired=true)
    double? Amount;

    /**
    * Any comments to be saved in log.
    */
    // @ApiMember(Description="Any comments to be saved in log.")
    String? Comments;

    RefundBookingPayment({this.CompanyId,this.Id,this.PaymentLogId,this.Amount,this.Comments});
    RefundBookingPayment.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CompanyId = json['CompanyId'];
        Id = json['Id'];
        PaymentLogId = json['PaymentLogId'];
        Amount = JsonConverters.toDouble(json['Amount']);
        Comments = json['Comments'];
        return this;
    }

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

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

TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: <String, TypeInfo> {
    'ICompany': TypeInfo(TypeOf.Interface),
    'RefundBookingPayment': TypeInfo(TypeOf.Class, create:() => RefundBookingPayment()),
});