| Requires any of the roles: | Admin, TeamAdmin | Requires the permission: | Tickets.Add |
| POST | /OwnerCards/{Id}/refund |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class OwnerCardRefundResult:
success: Optional[bool] = None
status_code: Optional[int] = None
message: Optional[str] = None
result: Optional[str] = None
owner_card_id: Optional[int] = None
owner_id: Optional[int] = None
order_reference: Optional[str] = None
payment_reference: Optional[str] = None
previous_payment_status: Optional[str] = None
payment_status: Optional[str] = None
card_refund_amount: Optional[int] = None
gift_credit_amount: Optional[int] = None
gift_credit_pending_amount: Optional[int] = None
total_refunded: Optional[int] = None
donation_amount_not_refunded: Optional[int] = None
borgun_refunded: Optional[bool] = None
borgun_partial: Optional[bool] = None
borgun_refund_transaction_id: Optional[str] = None
merchant_credentials: Optional[str] = None
replayed: Optional[bool] = None
refund_id: Optional[int] = None
refunded_u_t_c: Optional[datetime.datetime] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class OwnerCardRefundRequest:
id: Optional[int] = None
owner_id: Optional[int] = None
reason: Optional[str] = None
user_id: Optional[int] = None
idempotency_key: Optional[str] = None
Python OwnerCardRefundRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /OwnerCards/{Id}/refund HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<OwnerCardRefundRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<Id>0</Id>
<IdempotencyKey>String</IdempotencyKey>
<OwnerId>0</OwnerId>
<Reason>String</Reason>
<UserId>0</UserId>
</OwnerCardRefundRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <OwnerCardRefundResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel"> <BorgunPartial>false</BorgunPartial> <BorgunRefundTransactionId>String</BorgunRefundTransactionId> <BorgunRefunded>false</BorgunRefunded> <CardRefundAmount>0</CardRefundAmount> <DonationAmountNotRefunded>0</DonationAmountNotRefunded> <GiftCreditAmount>0</GiftCreditAmount> <GiftCreditPendingAmount>0</GiftCreditPendingAmount> <MerchantCredentials>String</MerchantCredentials> <Message>String</Message> <OrderReference>String</OrderReference> <OwnerCardId>0</OwnerCardId> <OwnerId>0</OwnerId> <PaymentReference>String</PaymentReference> <PaymentStatus>String</PaymentStatus> <PreviousPaymentStatus>String</PreviousPaymentStatus> <RefundId>0</RefundId> <RefundedUTC>0001-01-01T00:00:00</RefundedUTC> <Replayed>false</Replayed> <Result>String</Result> <StatusCode>0</StatusCode> <Success>false</Success> <TotalRefunded>0</TotalRefunded> </OwnerCardRefundResult>