TicketUserServices

<back to all web services

OwnerCardRefundRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdminRequires the permission:Tickets.Add
The following routes are available for this service:
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 .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.

POST /OwnerCards/{Id}/refund HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	id: 0,
	ownerId: 0,
	reason: String,
	userId: 0,
	idempotencyKey: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	success: False,
	statusCode: 0,
	message: String,
	result: String,
	ownerCardId: 0,
	ownerId: 0,
	orderReference: String,
	paymentReference: String,
	previousPaymentStatus: String,
	paymentStatus: String,
	cardRefundAmount: 0,
	giftCreditAmount: 0,
	giftCreditPendingAmount: 0,
	totalRefunded: 0,
	donationAmountNotRefunded: 0,
	borgunRefunded: False,
	borgunPartial: False,
	borgunRefundTransactionId: String,
	merchantCredentials: String,
	replayed: False,
	refundId: 0,
	refundedUTC: 0001-01-01
}