POST,GET | /api/PaymentGateway/GetPaymentGatewayById |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
enum GatewayType
{
Stripe,
GoCardlessPro,
Dfc,
SmartDebit,
Harlands,
SageOne,
NuPay,
EFT,
PesaPal,
PayPalSms,
PayChoiceCreditCard,
PayChoiceBankAccount,
eDebitCreditCard,
eDebitBankAccount,
DoBillingPayFastCreditCard,
DoBillingNedBankEFTBankAccount,
HarlandsCloud,
IntegraPayCreditCard,
IntegraPayBankAccount,
Payfast,
}
class Configuration implements IConvertible
{
bool? ShowConfirmation;
bool? ShowBillingDetails;
String? GatewayKey;
bool? HideCvv;
DateTime? MinimumAdultDateOfBirth;
Configuration({this.ShowConfirmation,this.ShowBillingDetails,this.GatewayKey,this.HideCvv,this.MinimumAdultDateOfBirth});
Configuration.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ShowConfirmation = json['ShowConfirmation'];
ShowBillingDetails = json['ShowBillingDetails'];
GatewayKey = json['GatewayKey'];
HideCvv = json['HideCvv'];
MinimumAdultDateOfBirth = JsonConverters.fromJson(json['MinimumAdultDateOfBirth'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ShowConfirmation': ShowConfirmation,
'ShowBillingDetails': ShowBillingDetails,
'GatewayKey': GatewayKey,
'HideCvv': HideCvv,
'MinimumAdultDateOfBirth': JsonConverters.toJson(MinimumAdultDateOfBirth,'DateTime',context!)
};
getTypeName() => "Configuration";
TypeContext? context = _ctx;
}
class Creditor implements IConvertible
{
String? Id;
List<Scheme>? Schemes;
String? Name;
String? AddressLine1;
String? AddressLine2;
String? AddressLine3;
String? City;
String? CountryCode;
String? PostalCode;
String? Region;
String? TermsAndConditionsUrl;
List<String>? Countries;
Creditor({this.Id,this.Schemes,this.Name,this.AddressLine1,this.AddressLine2,this.AddressLine3,this.City,this.CountryCode,this.PostalCode,this.Region,this.TermsAndConditionsUrl,this.Countries});
Creditor.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Schemes = JsonConverters.fromJson(json['Schemes'],'List<Scheme>',context!);
Name = json['Name'];
AddressLine1 = json['AddressLine1'];
AddressLine2 = json['AddressLine2'];
AddressLine3 = json['AddressLine3'];
City = json['City'];
CountryCode = json['CountryCode'];
PostalCode = json['PostalCode'];
Region = json['Region'];
TermsAndConditionsUrl = json['TermsAndConditionsUrl'];
Countries = JsonConverters.fromJson(json['Countries'],'List<String>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Schemes': JsonConverters.toJson(Schemes,'List<Scheme>',context!),
'Name': Name,
'AddressLine1': AddressLine1,
'AddressLine2': AddressLine2,
'AddressLine3': AddressLine3,
'City': City,
'CountryCode': CountryCode,
'PostalCode': PostalCode,
'Region': Region,
'TermsAndConditionsUrl': TermsAndConditionsUrl,
'Countries': JsonConverters.toJson(Countries,'List<String>',context!)
};
getTypeName() => "Creditor";
TypeContext? context = _ctx;
}
class PaymentGateway implements IConvertible
{
int? PaymentGatewayId;
String? Name;
String? Currency;
String? TypeName;
GatewayType? GatewayType;
DateTime? Created;
DateTime? AccountingStartDate;
bool? IsDefault;
bool? IsPublic;
bool? Disabled;
String? DisabledReason;
Configuration? Configuration;
Creditor? Creditor;
bool? IsCreditCard;
bool? IsClubManagerCreditCard;
bool? IsDirectDebit;
bool? HasSignUpLink;
bool? CanProvidePaymentToken;
bool? CanProvidePaymentRedirect;
bool? CanImport;
bool? CanSupplyRawData;
bool? CanImportPaymentMethod;
String? PublicTranslation;
String? BankAccount;
PaymentGateway({this.PaymentGatewayId,this.Name,this.Currency,this.TypeName,this.GatewayType,this.Created,this.AccountingStartDate,this.IsDefault,this.IsPublic,this.Disabled,this.DisabledReason,this.Configuration,this.Creditor,this.IsCreditCard,this.IsClubManagerCreditCard,this.IsDirectDebit,this.HasSignUpLink,this.CanProvidePaymentToken,this.CanProvidePaymentRedirect,this.CanImport,this.CanSupplyRawData,this.CanImportPaymentMethod,this.PublicTranslation,this.BankAccount});
PaymentGateway.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
PaymentGatewayId = json['PaymentGatewayId'];
Name = json['Name'];
Currency = json['Currency'];
TypeName = json['TypeName'];
GatewayType = JsonConverters.fromJson(json['GatewayType'],'GatewayType',context!);
Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
AccountingStartDate = JsonConverters.fromJson(json['AccountingStartDate'],'DateTime',context!);
IsDefault = json['IsDefault'];
IsPublic = json['IsPublic'];
Disabled = json['Disabled'];
DisabledReason = json['DisabledReason'];
Configuration = JsonConverters.fromJson(json['Configuration'],'Configuration',context!);
Creditor = JsonConverters.fromJson(json['Creditor'],'Creditor',context!);
IsCreditCard = json['IsCreditCard'];
IsClubManagerCreditCard = json['IsClubManagerCreditCard'];
IsDirectDebit = json['IsDirectDebit'];
HasSignUpLink = json['HasSignUpLink'];
CanProvidePaymentToken = json['CanProvidePaymentToken'];
CanProvidePaymentRedirect = json['CanProvidePaymentRedirect'];
CanImport = json['CanImport'];
CanSupplyRawData = json['CanSupplyRawData'];
CanImportPaymentMethod = json['CanImportPaymentMethod'];
PublicTranslation = json['PublicTranslation'];
BankAccount = json['BankAccount'];
return this;
}
Map<String, dynamic> toJson() => {
'PaymentGatewayId': PaymentGatewayId,
'Name': Name,
'Currency': Currency,
'TypeName': TypeName,
'GatewayType': JsonConverters.toJson(GatewayType,'GatewayType',context!),
'Created': JsonConverters.toJson(Created,'DateTime',context!),
'AccountingStartDate': JsonConverters.toJson(AccountingStartDate,'DateTime',context!),
'IsDefault': IsDefault,
'IsPublic': IsPublic,
'Disabled': Disabled,
'DisabledReason': DisabledReason,
'Configuration': JsonConverters.toJson(Configuration,'Configuration',context!),
'Creditor': JsonConverters.toJson(Creditor,'Creditor',context!),
'IsCreditCard': IsCreditCard,
'IsClubManagerCreditCard': IsClubManagerCreditCard,
'IsDirectDebit': IsDirectDebit,
'HasSignUpLink': HasSignUpLink,
'CanProvidePaymentToken': CanProvidePaymentToken,
'CanProvidePaymentRedirect': CanProvidePaymentRedirect,
'CanImport': CanImport,
'CanSupplyRawData': CanSupplyRawData,
'CanImportPaymentMethod': CanImportPaymentMethod,
'PublicTranslation': PublicTranslation,
'BankAccount': BankAccount
};
getTypeName() => "PaymentGateway";
TypeContext? context = _ctx;
}
class Scheme implements IConvertible
{
String? Id;
String? Reference;
String? Email;
String? PhoneNumber;
Scheme({this.Id,this.Reference,this.Email,this.PhoneNumber});
Scheme.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Reference = json['Reference'];
Email = json['Email'];
PhoneNumber = json['PhoneNumber'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Reference': Reference,
'Email': Email,
'PhoneNumber': PhoneNumber
};
getTypeName() => "Scheme";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.clubmanagercentral.com', types: <String, TypeInfo> {
'GatewayType': TypeInfo(TypeOf.Enum, enumValues:GatewayType.values),
'Configuration': TypeInfo(TypeOf.Class, create:() => Configuration()),
'Creditor': TypeInfo(TypeOf.Class, create:() => Creditor()),
'List<Scheme>': TypeInfo(TypeOf.Class, create:() => <Scheme>[]),
'Scheme': TypeInfo(TypeOf.Class, create:() => Scheme()),
'PaymentGateway': TypeInfo(TypeOf.Class, create:() => PaymentGateway()),
});
Dart 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 }