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 .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
Content-Length: length
{
PaymentGatewayId: 0
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { PaymentGatewayId: 0, Name: String, Currency: String, TypeName: String, GatewayType: Stripe, Created: 0001-01-01, AccountingStartDate: 0001-01-01, IsDefault: False, IsPublic: False, Disabled: False, DisabledReason: String, Configuration: { ShowConfirmation: False, ShowBillingDetails: False, GatewayKey: String, HideCvv: False, MinimumAdultDateOfBirth: 0001-01-01 }, Creditor: { Id: String, Schemes: [ { Id: String, Reference: String, Email: String, PhoneNumber: String } ], Name: String, AddressLine1: String, AddressLine2: String, AddressLine3: String, City: String, CountryCode: String, PostalCode: String, Region: String, TermsAndConditionsUrl: String, Countries: [ String ] }, IsCreditCard: False, IsClubManagerCreditCard: False, IsDirectDebit: False, HasSignUpLink: False, CanProvidePaymentToken: False, CanProvidePaymentRedirect: False, CanImport: False, CanSupplyRawData: False, CanImportPaymentMethod: False, PublicTranslation: Direct Debit, BankAccount: String }