POST,GET | /api/PaymentGateway/GetPaymentGatewayById |
---|
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
class GatewayType(IntEnum):
STRIPE = 1
GO_CARDLESS_PRO = 2
DFC = 3
SMART_DEBIT = 4
HARLANDS = 6
SAGE_ONE = 7
NU_PAY = 8
EFT = 9
PESA_PAL = 10
PAY_PAL_SMS = 12
PAY_CHOICE_CREDIT_CARD = 13
PAY_CHOICE_BANK_ACCOUNT = 14
E_DEBIT_CREDIT_CARD = 15
E_DEBIT_BANK_ACCOUNT = 16
DO_BILLING_PAY_FAST_CREDIT_CARD = 17
DO_BILLING_NED_BANK_E_F_T_BANK_ACCOUNT = 18
HARLANDS_CLOUD = 19
INTEGRA_PAY_CREDIT_CARD = 20
INTEGRA_PAY_BANK_ACCOUNT = 21
PAYFAST = 22
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Configuration:
show_confirmation: Optional[bool] = None
show_billing_details: Optional[bool] = None
gateway_key: Optional[str] = None
hide_cvv: Optional[bool] = None
minimum_adult_date_of_birth: Optional[datetime.datetime] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Creditor:
id: Optional[str] = None
schemes: Optional[List[Scheme]] = None
name: Optional[str] = None
address_line1: Optional[str] = None
address_line2: Optional[str] = None
address_line3: Optional[str] = None
city: Optional[str] = None
country_code: Optional[str] = None
postal_code: Optional[str] = None
region: Optional[str] = None
terms_and_conditions_url: Optional[str] = None
countries: Optional[List[str]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PaymentGateway:
payment_gateway_id: Optional[int] = None
name: Optional[str] = None
currency: Optional[str] = None
type_name: Optional[str] = None
gateway_type: Optional[GatewayType] = None
created: Optional[datetime.datetime] = None
accounting_start_date: Optional[datetime.datetime] = None
is_default: Optional[bool] = None
is_public: Optional[bool] = None
disabled: Optional[bool] = None
disabled_reason: Optional[str] = None
configuration: Optional[Configuration] = None
creditor: Optional[Creditor] = None
is_credit_card: Optional[bool] = None
is_club_manager_credit_card: Optional[bool] = None
is_direct_debit: Optional[bool] = None
has_sign_up_link: Optional[bool] = None
can_provide_payment_token: Optional[bool] = None
can_provide_payment_redirect: Optional[bool] = None
can_import: Optional[bool] = None
can_supply_raw_data: Optional[bool] = None
can_import_payment_method: Optional[bool] = None
public_translation: Optional[str] = None
bank_account: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Scheme:
id: Optional[str] = None
reference: Optional[str] = None
email: Optional[str] = None
phone_number: Optional[str] = None
Python PaymentGatewayService.GetPaymentGatewayByIdRequest 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 /api/PaymentGateway/GetPaymentGatewayById HTTP/1.1
Host: api.clubmanagercentral.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<PaymentGatewayService.GetPaymentGatewayByIdRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubManager.Api.Services">
<PaymentGatewayId>0</PaymentGatewayId>
</PaymentGatewayService.GetPaymentGatewayByIdRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <PaymentGateway xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubManager.Interfaces.Models.PaymentGateway"> <AccountingStartDate>0001-01-01T00:00:00</AccountingStartDate> <BankAccount>String</BankAccount> <BranchId>0</BranchId> <Created>0001-01-01T00:00:00</Created> <Creditor> <AddressLine1>String</AddressLine1> <AddressLine2>String</AddressLine2> <AddressLine3>String</AddressLine3> <City>String</City> <Countries xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:string>String</d3p1:string> </Countries> <CountryCode>String</CountryCode> <Id>String</Id> <Name>String</Name> <PostalCode>String</PostalCode> <Region>String</Region> <Schemes> <Scheme> <Email>String</Email> <Id>String</Id> <PhoneNumber>String</PhoneNumber> <Reference>String</Reference> </Scheme> </Schemes> <TermsAndConditionsUrl>String</TermsAndConditionsUrl> </Creditor> <Currency>String</Currency> <Disabled>false</Disabled> <DisabledReason>String</DisabledReason> <GatewayType>Stripe</GatewayType> <IsDefault>false</IsDefault> <IsPublic>false</IsPublic> <Metadata>String</Metadata> <Name>String</Name> <PaymentGatewayId>0</PaymentGatewayId> <Token>String</Token> <TypeName>String</TypeName> </PaymentGateway>