Skip to content

Instantly share code, notes, and snippets.

@Miiite
Last active March 1, 2018 19:07
Show Gist options
  • Save Miiite/367e17335431e932acdc92c65b504bd4 to your computer and use it in GitHub Desktop.
Save Miiite/367e17335431e932acdc92c65b504bd4 to your computer and use it in GitHub Desktop.
PayOn interfaces
using System;
using Foundation;
using ObjCRuntime;
using PassKit;
using UIKit;
namespace PayOnBindings.iOS
{
// APA: I had to remove this bloc of code, because it was generated by Sharpie
// But I just don't understand the context nor the usecase for this
//[Static]
//[Verify(ConstantsInterfaceAssociation)]
//partial interface Constants
//{
// // extern NSString *const OPPErrorDomain;
// [Field("OPPErrorDomain", "__Internal")]
// NSString OPPErrorDomain { get; }
// // extern NSString *const OPPErrorTransactionFailureDetailsKey;
// [Field("OPPErrorTransactionFailureDetailsKey", "__Internal")]
// NSString OPPErrorTransactionFailureDetailsKey { get; }
//}
// @interface OPPTransaction : NSObject
[BaseType(typeof(NSObject))]
[DisableDefaultCtor]
interface OPPTransaction
{
// +(instancetype _Nonnull)transactionWithPaymentParams:(OPPPaymentParams * _Nonnull)paymentParams;
[Static]
[Export("transactionWithPaymentParams:")]
OPPTransaction TransactionWithPaymentParams(OPPPaymentParams paymentParams);
// -(instancetype _Nonnull)initWithPaymentParams:(OPPPaymentParams * _Nonnull)paymentParams __attribute__((objc_designated_initializer));
[Export("initWithPaymentParams:")]
[DesignatedInitializer]
IntPtr Constructor(OPPPaymentParams paymentParams);
// @property (readonly, nonatomic) OPPPaymentParams * _Nonnull paymentParams;
[Export("paymentParams")]
OPPPaymentParams PaymentParams { get; }
// @property (readonly, nonatomic) OPPTransactionType type;
[Export("type")]
OPPTransactionType Type { get; }
// @property (nonatomic) NSURL * _Nullable redirectURL;
[NullAllowed, Export("redirectURL", ArgumentSemantic.Assign)]
NSUrl RedirectURL { get; set; }
// @property (copy, nonatomic) NSString * _Nullable resourcePath;
[NullAllowed, Export("resourcePath")]
string ResourcePath { get; set; }
// @property (readonly, copy, nonatomic) NSString * _Nullable alipaySignedOrderInfo;
[NullAllowed, Export("alipaySignedOrderInfo")]
string AlipaySignedOrderInfo { get; }
}
// @interface OPPPaymentParams : NSObject
[BaseType(typeof(NSObject))]
[DisableDefaultCtor]
interface OPPPaymentParams
{
// +(instancetype _Nullable)paymentParamsWithCheckoutID:(NSString * _Nonnull)checkoutID paymentBrand:(NSString * _Nonnull)paymentBrand error:(NSError * _Nullable * _Nullable)error;
[Static]
[Export("paymentParamsWithCheckoutID:paymentBrand:error:")]
[return: NullAllowed]
OPPPaymentParams PaymentParamsWithCheckoutID(string checkoutID, string paymentBrand, [NullAllowed] out NSError error);
// -(instancetype _Nullable)initWithCheckoutID:(NSString * _Nonnull)checkoutID paymentBrand:(NSString * _Nonnull)paymentBrand error:(NSError * _Nullable * _Nullable)error __attribute__((objc_designated_initializer));
[Export("initWithCheckoutID:paymentBrand:error:")]
[DesignatedInitializer]
IntPtr Constructor(string checkoutID, string paymentBrand, [NullAllowed] out NSError error);
// @property (readonly, copy, nonatomic) NSString * _Nonnull checkoutID;
[Export("checkoutID")]
string CheckoutID { get; }
// @property (readonly, copy, nonatomic) NSString * _Nonnull paymentBrand;
[Export("paymentBrand")]
string PaymentBrand { get; }
// @property (readonly, nonatomic) OPPPaymentParamsBrand brand __attribute__((deprecated("")));
[Export("brand")]
OPPPaymentParamsBrand Brand { get; }
// @property (readonly, copy, nonatomic) NSDictionary<NSString *,NSString *> * _Nonnull customParams;
[Export("customParams", ArgumentSemantic.Copy)]
NSDictionary<NSString, NSString> CustomParams { get; }
// -(BOOL)addCustomParamWithName:(NSString * _Nonnull)name value:(NSString * _Nonnull)value;
[Export("addCustomParamWithName:value:")]
bool AddCustomParamWithName(string name, string value);
// -(void)removeCustomParamWithName:(NSString * _Nonnull)name;
[Export("removeCustomParamWithName:")]
void RemoveCustomParamWithName(string name);
// -(void)mask;
[Export("mask")]
void Mask();
}
// @interface OPPPaymentProvider : NSObject
[BaseType(typeof(NSObject))]
interface OPPPaymentProvider
{
// @property (nonatomic) OPPProviderMode mode;
[Export("mode", ArgumentSemantic.Assign)]
OPPProviderMode Mode { get; set; }
// +(instancetype _Nonnull)paymentProviderWithMode:(OPPProviderMode)mode;
[Static]
[Export("paymentProviderWithMode:")]
OPPPaymentProvider PaymentProviderWithMode(OPPProviderMode mode);
// +(BOOL)canSubmitPaymentRequest:(PKPaymentRequest * _Nonnull)request;
[Static]
[Export("canSubmitPaymentRequest:")]
bool CanSubmitPaymentRequest(PKPaymentRequest request);
// +(BOOL)deviceSupportsApplePay;
[Static]
[Export("deviceSupportsApplePay")]
bool DeviceSupportsApplePay { get; }
// +(PKPaymentRequest * _Nonnull)paymentRequestWithMerchantIdentifier:(NSString * _Nonnull)merchantIdentifier countryCode:(NSString * _Nonnull)countryCode;
[Static]
[Export("paymentRequestWithMerchantIdentifier:countryCode:")]
PKPaymentRequest PaymentRequestWithMerchantIdentifier(string merchantIdentifier, string countryCode);
// +(BOOL)isDeviceAuthenticationAvailable;
[Static]
[Export("isDeviceAuthenticationAvailable")]
bool IsDeviceAuthenticationAvailable { get; }
// -(void)sendTransaction:(OPPTransaction * _Nonnull)transaction toEndpoint:(NSString * _Nonnull)endpoint completionHandler:(void (^ _Nonnull)(OPPTransaction * _Nonnull, NSError * _Nullable))completionHandler;
[Export("sendTransaction:toEndpoint:completionHandler:")]
void SendTransaction(OPPTransaction transaction, string endpoint, Action<OPPTransaction, NSError> completionHandler);
// -(void)submitTransaction:(OPPTransaction * _Nonnull)transaction completionHandler:(void (^ _Nonnull)(OPPTransaction * _Nonnull, NSError * _Nullable))completionHandler;
[Export("submitTransaction:completionHandler:")]
void SubmitTransaction(OPPTransaction transaction, Action<OPPTransaction, NSError> completionHandler);
// -(void)registerTransaction:(OPPTransaction * _Nonnull)transaction completionHandler:(void (^ _Nonnull)(OPPTransaction * _Nonnull, NSError * _Nullable))completionHandler;
[Export("registerTransaction:completionHandler:")]
void RegisterTransaction(OPPTransaction transaction, Action<OPPTransaction, NSError> completionHandler);
// -(void)requestCheckoutInfoWithCheckoutID:(NSString * _Nonnull)checkoutID completionHandler:(void (^ _Nonnull)(OPPCheckoutInfo * _Nullable, NSError * _Nullable))completionHandler;
[Export("requestCheckoutInfoWithCheckoutID:completionHandler:")]
void RequestCheckoutInfoWithCheckoutID(string checkoutID, Action<OPPCheckoutInfo, NSError> completionHandler);
}
// @interface OPPCardPaymentParams : OPPPaymentParams
[BaseType(typeof(OPPPaymentParams))]
interface OPPCardPaymentParams
{
// +(instancetype _Nullable)cardPaymentParamsWithCheckoutID:(NSString * _Nonnull)checkoutID paymentBrand:(NSString * _Nonnull)paymentBrand holder:(NSString * _Nonnull)holder number:(NSString * _Nonnull)number expiryMonth:(NSString * _Nonnull)expiryMonth expiryYear:(NSString * _Nonnull)expiryYear CVV:(NSString * _Nullable)CVV error:(NSError * _Nullable * _Nullable)error;
[Static]
[Export("cardPaymentParamsWithCheckoutID:paymentBrand:holder:number:expiryMonth:expiryYear:CVV:error:")]
[return: NullAllowed]
OPPCardPaymentParams CardPaymentParamsWithCheckoutID(string checkoutID, string paymentBrand, string holder, string number, string expiryMonth, string expiryYear, [NullAllowed] string CVV, [NullAllowed] out NSError error);
// -(instancetype _Nullable)initWithCheckoutID:(NSString * _Nonnull)checkoutID paymentBrand:(NSString * _Nonnull)paymentBrand holder:(NSString * _Nonnull)holder number:(NSString * _Nonnull)number expiryMonth:(NSString * _Nonnull)expiryMonth expiryYear:(NSString * _Nonnull)expiryYear CVV:(NSString * _Nullable)CVV error:(NSError * _Nullable * _Nullable)error __attribute__((objc_designated_initializer));
[Export("initWithCheckoutID:paymentBrand:holder:number:expiryMonth:expiryYear:CVV:error:")]
[DesignatedInitializer]
IntPtr Constructor(string checkoutID, string paymentBrand, string holder, string number, string expiryMonth, string expiryYear, [NullAllowed] string CVV, [NullAllowed] out NSError error);
// @property (readonly, copy, nonatomic) NSString * _Nonnull holder;
[Export("holder")]
string Holder { get; }
// @property (readonly, copy, nonatomic) NSString * _Nonnull number;
[Export("number")]
string Number { get; }
// @property (readonly, copy, nonatomic) NSString * _Nonnull expiryMonth;
[Export("expiryMonth")]
string ExpiryMonth { get; }
// @property (readonly, copy, nonatomic) NSString * _Nonnull expiryYear;
[Export("expiryYear")]
string ExpiryYear { get; }
// @property (readonly, copy, nonatomic) NSString * _Nonnull CVV;
[Export("CVV")]
string CVV { get; }
// @property (copy, nonatomic) NSString * _Nonnull countryCode;
[Export("countryCode")]
string CountryCode { get; set; }
// @property (copy, nonatomic) NSString * _Nonnull mobilePhone;
[Export("mobilePhone")]
string MobilePhone { get; set; }
// @property (getter = isTokenizationEnabled, nonatomic) BOOL tokenizationEnabled;
[Export("tokenizationEnabled")]
bool TokenizationEnabled { [Bind("isTokenizationEnabled")] get; set; }
// +(BOOL)isHolderValid:(NSString * _Nonnull)holder;
[Static]
[Export("isHolderValid:")]
bool IsHolderValid(string holder);
// +(BOOL)isNumberValid:(NSString * _Nonnull)number forPaymentBrand:(NSString * _Nonnull)paymentBrand;
[Static]
[Export("isNumberValid:forPaymentBrand:")]
bool IsNumberValid(string number, string paymentBrand);
// +(BOOL)isExpiryMonthValid:(NSString * _Nonnull)expiryMonth;
[Static]
[Export("isExpiryMonthValid:")]
bool IsExpiryMonthValid(string expiryMonth);
// +(BOOL)isExpiryYearValid:(NSString * _Nonnull)expiryYear;
[Static]
[Export("isExpiryYearValid:")]
bool IsExpiryYearValid(string expiryYear);
// +(BOOL)isCountryCodeValid:(NSString * _Nonnull)countryCode;
[Static]
[Export("isCountryCodeValid:")]
bool IsCountryCodeValid(string countryCode);
// +(BOOL)isMobilePhoneValid:(NSString * _Nonnull)mobilePhone;
[Static]
[Export("isMobilePhoneValid:")]
bool IsMobilePhoneValid(string mobilePhone);
// +(BOOL)isExpiredWithExpiryMonth:(NSString * _Nonnull)month andYear:(NSString * _Nonnull)year;
[Static]
[Export("isExpiredWithExpiryMonth:andYear:")]
bool IsExpiredWithExpiryMonth(string month, string year);
// +(BOOL)isCvvValid:(NSString * _Nonnull)CVV forPaymentBrand:(NSString * _Nonnull)paymentBrand;
[Static]
[Export("isCvvValid:forPaymentBrand:")]
bool IsCvvValid(string CVV, string paymentBrand);
}
// @interface Deprecated (OPPCardPaymentParams)
[Category]
[BaseType(typeof(OPPCardPaymentParams))]
interface OPPCardPaymentParams_Deprecated
{
// +(instancetype _Nullable)cardPaymentParamsWithCheckoutID:(NSString * _Nonnull)checkoutID brand:(OPPPaymentParamsBrand)brand holder:(NSString * _Nonnull)holder number:(NSString * _Nonnull)number expiryMonth:(NSString * _Nonnull)expiryMonth expiryYear:(NSString * _Nonnull)expiryYear CVV:(NSString * _Nullable)CVV error:(NSError * _Nullable * _Nullable)error __attribute__((deprecated("- Use +cardPaymentParamsWithCheckoutID:paymentBrand:holder:number:expiryMonth:expiryYear:CVV:error: instead.")));
[Static]
[Export("cardPaymentParamsWithCheckoutID:brand:holder:number:expiryMonth:expiryYear:CVV:error:")]
[return: NullAllowed]
OPPCardPaymentParams CardPaymentParamsWithCheckoutID(string checkoutID, OPPPaymentParamsBrand brand, string holder, string number, string expiryMonth, string expiryYear, [NullAllowed] string CVV, [NullAllowed] out NSError error);
// -(instancetype _Nullable)initWithCheckoutID:(NSString * _Nonnull)checkoutID brand:(OPPPaymentParamsBrand)brand holder:(NSString * _Nonnull)holder number:(NSString * _Nonnull)number expiryMonth:(NSString * _Nonnull)expiryMonth expiryYear:(NSString * _Nonnull)expiryYear CVV:(NSString * _Nullable)CVV error:(NSError * _Nullable * _Nullable)error __attribute__((deprecated("- Use -initWithCheckoutID:paymentBrand:holder:number:expiryMonth:expiryYear:CVV:error: instead.")));
[Export("initWithCheckoutID:brand:holder:number:expiryMonth:expiryYear:CVV:error:")]
IntPtr Constructor(string checkoutID, OPPPaymentParamsBrand brand, string holder, string number, string expiryMonth, string expiryYear, [NullAllowed] string CVV, [NullAllowed] out NSError error);
// +(BOOL)isNumberValid:(NSString * _Nonnull)number forBrand:(OPPPaymentParamsBrand)brand __attribute__((deprecated("- Use +isNumberValid:forPaymentBrand: instead.")));
[Static]
[Export("isNumberValid:forBrand:")]
bool IsNumberValid(string number, OPPPaymentParamsBrand brand);
// +(BOOL)isCvvValid:(NSString * _Nonnull)CVV forBrand:(OPPPaymentParamsBrand)brand __attribute__((deprecated("- Use +isCvvValid:forPaymentBrand: instead.")));
[Static]
[Export("isCvvValid:forBrand:")]
bool IsCvvValid(string CVV, OPPPaymentParamsBrand brand);
}
// @interface OPPBankAccountPaymentParams : OPPPaymentParams
[BaseType(typeof(OPPPaymentParams))]
interface OPPBankAccountPaymentParams
{
// +(instancetype _Nullable)directDebitSEPAPaymentParamsWithCheckoutID:(NSString * _Nonnull)checkoutID holder:(NSString * _Nonnull)holder IBAN:(NSString * _Nonnull)IBAN tokenizationEnabled:(BOOL)tokenizationEnabled error:(NSError * _Nullable * _Nullable)error;
[Static]
[Export("directDebitSEPAPaymentParamsWithCheckoutID:holder:IBAN:tokenizationEnabled:error:")]
[return: NullAllowed]
OPPBankAccountPaymentParams DirectDebitSEPAPaymentParamsWithCheckoutID(string checkoutID, string holder, string IBAN, bool tokenizationEnabled, [NullAllowed] out NSError error);
// +(instancetype _Nullable)sofortBankingPaymentParamsWithCheckoutID:(NSString * _Nonnull)checkoutID country:(NSString * _Nonnull)country error:(NSError * _Nullable * _Nullable)error;
[Static]
[Export("sofortBankingPaymentParamsWithCheckoutID:country:error:")]
[return: NullAllowed]
OPPBankAccountPaymentParams SofortBankingPaymentParamsWithCheckoutID(string checkoutID, string country, [NullAllowed] out NSError error);
// +(instancetype _Nullable)idealPaymentParamsWithCheckoutID:(NSString * _Nonnull)checkoutID bankName:(NSString * _Nonnull)bankName error:(NSError * _Nullable * _Nullable)error;
[Static]
[Export("idealPaymentParamsWithCheckoutID:bankName:error:")]
[return: NullAllowed]
OPPBankAccountPaymentParams IdealPaymentParamsWithCheckoutID(string checkoutID, string bankName, [NullAllowed] out NSError error);
// +(instancetype _Nullable)giropayPaymentParamsWithCheckoutID:(NSString * _Nullable)checkoutID BIC:(NSString * _Nullable)BIC bankCode:(NSString * _Nullable)bankCode IBAN:(NSString * _Nullable)IBAN accountNumber:(NSString * _Nullable)accountNumber error:(NSError * _Nullable * _Nullable)error;
[Static]
[Export("giropayPaymentParamsWithCheckoutID:BIC:bankCode:IBAN:accountNumber:error:")]
[return: NullAllowed]
OPPBankAccountPaymentParams GiropayPaymentParamsWithCheckoutID([NullAllowed] string checkoutID, [NullAllowed] string BIC, [NullAllowed] string bankCode, [NullAllowed] string IBAN, [NullAllowed] string accountNumber, [NullAllowed] out NSError error);
// @property (readonly, copy, nonatomic) NSString * _Nonnull holder;
[Export("holder")]
string Holder { get; }
// @property (readonly, copy, nonatomic) NSString * _Nonnull IBAN;
[Export("IBAN")]
string IBAN { get; }
// @property (readonly, copy, nonatomic) NSString * _Nonnull accountNumber;
[Export("accountNumber")]
string AccountNumber { get; }
// @property (readonly, copy, nonatomic) NSString * _Nonnull country;
[Export("country")]
string Country { get; }
// @property (readonly, copy, nonatomic) NSString * _Nonnull bankName;
[Export("bankName")]
string BankName { get; }
// @property (readonly, copy, nonatomic) NSString * _Nonnull BIC;
[Export("BIC")]
string BIC { get; }
// @property (readonly, copy, nonatomic) NSString * _Nonnull bankCode;
[Export("bankCode")]
string BankCode { get; }
// @property (readonly, getter = isTokenizationEnabled, nonatomic) BOOL tokenizationEnabled;
[Export("tokenizationEnabled")]
bool TokenizationEnabled { [Bind("isTokenizationEnabled")] get; }
// +(BOOL)isHolderValid:(NSString * _Nonnull)holder;
[Static]
[Export("isHolderValid:")]
bool IsHolderValid(string holder);
// +(BOOL)isIBANValid:(NSString * _Nonnull)IBAN;
[Static]
[Export("isIBANValid:")]
bool IsIBANValid(string IBAN);
// +(BOOL)isAccountNumberValid:(NSString * _Nonnull)accountNumber;
[Static]
[Export("isAccountNumberValid:")]
bool IsAccountNumberValid(string accountNumber);
// +(BOOL)isCountryValid:(NSString * _Nonnull)country;
[Static]
[Export("isCountryValid:")]
bool IsCountryValid(string country);
// +(BOOL)isBankNameValid:(NSString * _Nonnull)bankName;
[Static]
[Export("isBankNameValid:")]
bool IsBankNameValid(string bankName);
// +(BOOL)isBICValid:(NSString * _Nonnull)BIC;
[Static]
[Export("isBICValid:")]
bool IsBICValid(string BIC);
// +(BOOL)isBankCodeValid:(NSString * _Nonnull)bankCode;
[Static]
[Export("isBankCodeValid:")]
bool IsBankCodeValid(string bankCode);
}
// @interface Deprecated (OPPBankAccountPaymentParams)
[Category]
[BaseType(typeof(OPPBankAccountPaymentParams))]
interface OPPBankAccountPaymentParams_Deprecated
{
// +(instancetype _Nullable)boletoPaymentParamsWithCheckoutID:(NSString * _Nonnull)checkoutID error:(NSError * _Nullable * _Nullable)error __attribute__((deprecated("- Use OPPPaymentParams class with payment brand 'BOLETO' instead.")));
[Static]
[Export("boletoPaymentParamsWithCheckoutID:error:")]
[return: NullAllowed]
OPPBankAccountPaymentParams BoletoPaymentParamsWithCheckoutID(string checkoutID, [NullAllowed] out NSError error);
}
// @interface OPPApplePayPaymentParams : OPPPaymentParams
[BaseType(typeof(OPPPaymentParams))]
interface OPPApplePayPaymentParams
{
// +(instancetype _Nullable)applePayPaymentParamsWithCheckoutID:(NSString * _Nonnull)checkoutID tokenData:(NSData * _Nonnull)tokenData error:(NSError * _Nullable * _Nullable)error;
[Static]
[Export("applePayPaymentParamsWithCheckoutID:tokenData:error:")]
[return: NullAllowed]
OPPApplePayPaymentParams ApplePayPaymentParamsWithCheckoutID(string checkoutID, NSData tokenData, [NullAllowed] out NSError error);
// -(instancetype _Nullable)initWithCheckoutID:(NSString * _Nonnull)checkoutID tokenData:(NSData * _Nonnull)tokenData error:(NSError * _Nullable * _Nullable)error __attribute__((objc_designated_initializer));
[Export("initWithCheckoutID:tokenData:error:")]
[DesignatedInitializer]
IntPtr Constructor(string checkoutID, NSData tokenData, [NullAllowed] out NSError error);
// @property (readonly, copy, nonatomic) NSData * _Nonnull tokenData;
[Export("tokenData", ArgumentSemantic.Copy)]
NSData TokenData { get; }
// +(BOOL)isTokenDataValid:(NSData * _Nonnull)tokenData;
[Static]
[Export("isTokenDataValid:")]
bool IsTokenDataValid(NSData tokenData);
}
// @interface OPPPayPalPaymentParams : OPPPaymentParams
[BaseType(typeof(OPPPaymentParams))]
interface OPPPayPalPaymentParams
{
// +(instancetype _Nullable)payPalPaymentParamsWithCheckoutID:(NSString * _Nonnull)checkoutID error:(NSError * _Nullable * _Nullable)error;
[Static]
[Export("payPalPaymentParamsWithCheckoutID:error:")]
[return: NullAllowed]
OPPPayPalPaymentParams PayPalPaymentParamsWithCheckoutID(string checkoutID, [NullAllowed] out NSError error);
// -(instancetype _Nullable)initWithCheckoutID:(NSString * _Nonnull)checkoutID error:(NSError * _Nullable * _Nullable)error __attribute__((objc_designated_initializer));
[Export("initWithCheckoutID:error:")]
[DesignatedInitializer]
IntPtr Constructor(string checkoutID, [NullAllowed] out NSError error);
}
// @interface OPPAlipayPaymentParams : OPPPaymentParams
[BaseType(typeof(OPPPaymentParams))]
interface OPPAlipayPaymentParams
{
// +(instancetype _Nullable)alipayPaymentParamsWithCheckoutID:(NSString * _Nonnull)checkoutID error:(NSError * _Nullable * _Nullable)error;
[Static]
[Export("alipayPaymentParamsWithCheckoutID:error:")]
[return: NullAllowed]
OPPAlipayPaymentParams AlipayPaymentParamsWithCheckoutID(string checkoutID, [NullAllowed] out NSError error);
// -(instancetype _Nullable)initWithCheckoutID:(NSString * _Nonnull)checkoutID error:(NSError * _Nullable * _Nullable)error __attribute__((objc_designated_initializer));
[Export("initWithCheckoutID:error:")]
[DesignatedInitializer]
IntPtr Constructor(string checkoutID, [NullAllowed] out NSError error);
}
// @interface OPPChinaUnionPayPaymentParams : OPPPaymentParams
[BaseType(typeof(OPPPaymentParams))]
interface OPPChinaUnionPayPaymentParams
{
// +(instancetype _Nullable)chinaUnionPayPaymentParamsWithCheckoutID:(NSString * _Nonnull)checkoutID holder:(NSString * _Nonnull)holder error:(NSError * _Nullable * _Nullable)error;
[Static]
[Export("chinaUnionPayPaymentParamsWithCheckoutID:holder:error:")]
[return: NullAllowed]
OPPChinaUnionPayPaymentParams ChinaUnionPayPaymentParamsWithCheckoutID(string checkoutID, string holder, [NullAllowed] out NSError error);
// -(instancetype _Nullable)initWithCheckoutID:(NSString * _Nonnull)checkoutID holder:(NSString * _Nonnull)holder error:(NSError * _Nullable * _Nullable)error __attribute__((objc_designated_initializer));
[Export("initWithCheckoutID:holder:error:")]
[DesignatedInitializer]
IntPtr Constructor(string checkoutID, string holder, [NullAllowed] out NSError error);
// @property (readonly, copy, nonatomic) NSString * _Nonnull holder;
[Export("holder")]
string Holder { get; }
// +(BOOL)isHolderValid:(NSString * _Nonnull)holder;
[Static]
[Export("isHolderValid:")]
bool IsHolderValid(string holder);
}
// @interface OPPTokenPaymentParams : OPPPaymentParams
[BaseType(typeof(OPPPaymentParams))]
interface OPPTokenPaymentParams
{
// +(instancetype _Nullable)tokenPaymentParamsWithCheckoutID:(NSString * _Nonnull)checkoutID tokenID:(NSString * _Nonnull)tokenID paymentBrand:(NSString * _Nonnull)paymentBrand error:(NSError * _Nullable * _Nullable)error;
[Static]
[Export("tokenPaymentParamsWithCheckoutID:tokenID:paymentBrand:error:")]
[return: NullAllowed]
OPPTokenPaymentParams TokenPaymentParamsWithCheckoutID(string checkoutID, string tokenID, string paymentBrand, [NullAllowed] out NSError error);
// +(instancetype _Nullable)tokenPaymentParamsWithCheckoutID:(NSString * _Nonnull)checkoutID tokenID:(NSString * _Nonnull)tokenID cardPaymentBrand:(NSString * _Nonnull)cardPaymentBrand CVV:(NSString * _Nullable)CVV error:(NSError * _Nullable * _Nullable)error;
[Static]
[Export("tokenPaymentParamsWithCheckoutID:tokenID:cardPaymentBrand:CVV:error:")]
[return: NullAllowed]
OPPTokenPaymentParams TokenPaymentParamsWithCheckoutID(string checkoutID, string tokenID, string cardPaymentBrand, [NullAllowed] string CVV, [NullAllowed] out NSError error);
// -(instancetype _Nullable)initWithCheckoutID:(NSString * _Nonnull)checkoutID tokenID:(NSString * _Nonnull)tokenID paymentBrand:(NSString * _Nonnull)paymentBrand error:(NSError * _Nullable * _Nullable)error __attribute__((objc_designated_initializer));
[Export("initWithCheckoutID:tokenID:paymentBrand:error:")]
[DesignatedInitializer]
IntPtr Constructor(string checkoutID, string tokenID, string paymentBrand, [NullAllowed] out NSError error);
// -(instancetype _Nullable)initWithCheckoutID:(NSString * _Nonnull)checkoutID tokenID:(NSString * _Nonnull)tokenID cardPaymentBrand:(NSString * _Nonnull)cardPaymentBrand CVV:(NSString * _Nullable)CVV error:(NSError * _Nullable * _Nullable)error __attribute__((objc_designated_initializer));
[Export("initWithCheckoutID:tokenID:cardPaymentBrand:CVV:error:")]
[DesignatedInitializer]
IntPtr Constructor(string checkoutID, string tokenID, string cardPaymentBrand, [NullAllowed] string CVV, [NullAllowed] out NSError error);
// @property (readonly, copy, nonatomic) NSString * _Nonnull tokenID;
[Export("tokenID")]
string TokenID { get; }
// @property (readonly, copy, nonatomic) NSString * _Nullable CVV;
[NullAllowed, Export("CVV")]
string CVV { get; }
// +(BOOL)isTokenIDValid:(NSString * _Nonnull)tokenID;
[Static]
[Export("isTokenIDValid:")]
bool IsTokenIDValid(string tokenID);
// +(BOOL)isCvvValid:(NSString * _Nonnull)CVV forPaymentBrand:(NSString * _Nonnull)paymentBrand;
[Static]
[Export("isCvvValid:forPaymentBrand:")]
bool IsCvvValid(string CVV, string paymentBrand);
}
// @interface Deprecated (OPPTokenPaymentParams)
[Category]
[BaseType(typeof(OPPTokenPaymentParams))]
interface OPPTokenPaymentParams_Deprecated
{
// +(instancetype _Nullable)tokenPaymentParamsWithCheckoutID:(NSString * _Nonnull)checkoutID tokenID:(NSString * _Nonnull)tokenID brand:(OPPPaymentParamsBrand)brand error:(NSError * _Nullable * _Nullable)error __attribute__((deprecated("- Use +tokenPaymentParamsWithCheckoutID:tokenID:paymentBrand:error: instead.")));
[Static]
[Export("tokenPaymentParamsWithCheckoutID:tokenID:brand:error:")]
[return: NullAllowed]
OPPTokenPaymentParams TokenPaymentParamsWithCheckoutID(string checkoutID, string tokenID, OPPPaymentParamsBrand brand, [NullAllowed] out NSError error);
// +(instancetype _Nullable)tokenPaymentParamsWithCheckoutID:(NSString * _Nonnull)checkoutID tokenID:(NSString * _Nonnull)tokenID cardBrand:(OPPPaymentParamsBrand)cardBrand CVV:(NSString * _Nullable)CVV error:(NSError * _Nullable * _Nullable)error __attribute__((deprecated("- Use +tokenPaymentParamsWithCheckoutID:tokenID:cardPaymentBrand:CVV:error: instead.")));
[Static]
[Export("tokenPaymentParamsWithCheckoutID:tokenID:cardBrand:CVV:error:")]
[return: NullAllowed]
OPPTokenPaymentParams TokenPaymentParamsWithCheckoutID(string checkoutID, string tokenID, OPPPaymentParamsBrand cardBrand, [NullAllowed] string CVV, [NullAllowed] out NSError error);
// -(instancetype _Nullable)initWithCheckoutID:(NSString * _Nonnull)checkoutID tokenID:(NSString * _Nonnull)tokenID brand:(OPPPaymentParamsBrand)brand error:(NSError * _Nullable * _Nullable)error __attribute__((deprecated("- Use -initWithCheckoutID:tokenID:paymentBrand:error: instead.")));
[Export("initWithCheckoutID:tokenID:brand:error:")]
IntPtr Constructor(string checkoutID, string tokenID, OPPPaymentParamsBrand brand, [NullAllowed] out NSError error);
// -(instancetype _Nullable)initWithCheckoutID:(NSString * _Nonnull)checkoutID tokenID:(NSString * _Nonnull)tokenID cardBrand:(OPPPaymentParamsBrand)cardBrand CVV:(NSString * _Nullable)CVV error:(NSError * _Nullable * _Nullable)error __attribute__((deprecated("- Use -initWithCheckoutID:tokenID:cardPaymentBrand:CVV:error: instead.")));
[Export("initWithCheckoutID:tokenID:cardBrand:CVV:error:")]
IntPtr Constructor(string checkoutID, string tokenID, OPPPaymentParamsBrand cardBrand, [NullAllowed] string CVV, [NullAllowed] out NSError error);
// +(BOOL)isCvvValid:(NSString * _Nonnull)CVV forBrand:(OPPPaymentParamsBrand)brand __attribute__((deprecated("- Use +isCvvValid:forPaymentBrand: instead.")));
[Static]
[Export("isCvvValid:forBrand:")]
bool IsCvvValid(string CVV, OPPPaymentParamsBrand brand);
}
// @interface OPPErrors : NSObject
[BaseType(typeof(NSObject))]
interface OPPErrors
{
}
// @interface OPPCheckoutInfo : NSObject
[BaseType(typeof(NSObject))]
interface OPPCheckoutInfo
{
// @property (nonatomic) NSDecimalNumber * _Nonnull amount;
[Export("amount", ArgumentSemantic.Assign)]
NSDecimalNumber Amount { get; set; }
// @property (copy, nonatomic) NSString * _Nonnull currencyCode;
[Export("currencyCode")]
string CurrencyCode { get; set; }
// @property (copy, nonatomic) NSArray<OPPToken *> * _Nullable tokens;
[NullAllowed, Export("tokens", ArgumentSemantic.Copy)]
OPPToken[] Tokens { get; set; }
// @property (nonatomic) OPPPaymentBrandsConfig * _Nullable paymentBrandsConfig;
[NullAllowed, Export("paymentBrandsConfig", ArgumentSemantic.Assign)]
OPPPaymentBrandsConfig PaymentBrandsConfig { get; set; }
// @property (copy, nonatomic) NSString * _Nonnull endpoint;
[Export("endpoint")]
string Endpoint { get; set; }
// @property (copy, nonatomic) NSString * _Nonnull resourcePath;
[Export("resourcePath")]
string ResourcePath { get; set; }
// @property (copy, nonatomic) NSArray<NSString *> * _Nullable klarnaMerchantIDs;
[NullAllowed, Export("klarnaMerchantIDs", ArgumentSemantic.Copy)]
string[] KlarnaMerchantIDs { get; set; }
// +(instancetype _Nullable)checkoutInfoFromJSON:(NSDictionary * _Nonnull)JSON;
[Static]
[Export("checkoutInfoFromJSON:")]
[return: NullAllowed]
OPPCheckoutInfo CheckoutInfoFromJSON(NSDictionary JSON);
// +(instancetype _Nullable)checkoutInfoWithAmount:(NSDecimalNumber * _Nonnull)amount currencyCode:(NSString * _Nonnull)currencyCode tokens:(NSArray<OPPToken *> * _Nullable)tokens paymentBrandsConfig:(OPPPaymentBrandsConfig * _Nullable)paymentBrandsConfig klarnaMerchantIDs:(NSArray<NSString *> * _Nullable)klarnaMerchantIDs;
[Static]
[Export("checkoutInfoWithAmount:currencyCode:tokens:paymentBrandsConfig:klarnaMerchantIDs:")]
[return: NullAllowed]
OPPCheckoutInfo CheckoutInfoWithAmount(NSDecimalNumber amount, string currencyCode, [NullAllowed] OPPToken[] tokens, [NullAllowed] OPPPaymentBrandsConfig paymentBrandsConfig, [NullAllowed] string[] klarnaMerchantIDs);
// -(instancetype _Nullable)initWithAmount:(NSDecimalNumber * _Nonnull)amount currencyCode:(NSString * _Nonnull)currencyCode tokens:(NSArray<OPPToken *> * _Nullable)tokens paymentBrandsConfig:(OPPPaymentBrandsConfig * _Nullable)paymentBrandsConfig klarnaMerchantIDs:(NSArray<NSString *> * _Nullable)klarnaMerchantIDs;
[Export("initWithAmount:currencyCode:tokens:paymentBrandsConfig:klarnaMerchantIDs:")]
IntPtr Constructor(NSDecimalNumber amount, string currencyCode, [NullAllowed] OPPToken[] tokens, [NullAllowed] OPPPaymentBrandsConfig paymentBrandsConfig, [NullAllowed] string[] klarnaMerchantIDs);
}
// @interface Deprecated (OPPCheckoutInfo)
[Category]
[BaseType(typeof(OPPCheckoutInfo))]
interface OPPCheckoutInfo_Deprecated
{
// +(instancetype _Nullable)checkoutInfoWithAmount:(NSDecimalNumber * _Nonnull)amount currencyCode:(NSString * _Nonnull)currencyCode tokens:(NSArray<OPPToken *> * _Nullable)tokens paymentBrandsConfig:(OPPPaymentBrandsConfig * _Nullable)paymentBrandsConfig __attribute__((deprecated("- Use +checkoutInfoWithAmount:currencyCode:tokens:paymentBrandsConfig:klarnaMerchantIDs: instead.")));
[Static]
[Export("checkoutInfoWithAmount:currencyCode:tokens:paymentBrandsConfig:")]
[return: NullAllowed]
OPPCheckoutInfo CheckoutInfoWithAmount(NSDecimalNumber amount, string currencyCode, [NullAllowed] OPPToken[] tokens, [NullAllowed] OPPPaymentBrandsConfig paymentBrandsConfig);
// -(instancetype _Nullable)initWithAmount:(NSDecimalNumber * _Nonnull)amount currencyCode:(NSString * _Nonnull)currencyCode tokens:(NSArray<OPPToken *> * _Nullable)tokens paymentBrandsConfig:(OPPPaymentBrandsConfig * _Nullable)paymentBrandsConfig __attribute__((deprecated("- Use -initWithAmount:currencyCode:tokens:paymentBrandsConfig:klarnaMerchantIDs: instead.")));
[Export("initWithAmount:currencyCode:tokens:paymentBrandsConfig:")]
IntPtr Constructor(NSDecimalNumber amount, string currencyCode, [NullAllowed] OPPToken[] tokens, [NullAllowed] OPPPaymentBrandsConfig paymentBrandsConfig);
}
// @interface OPPCard : NSObject
[BaseType(typeof(NSObject))]
[DisableDefaultCtor]
interface OPPCard
{
// @property (copy, nonatomic) NSString * _Nonnull holder;
[Export("holder")]
string Holder { get; set; }
// @property (copy, nonatomic) NSString * _Nonnull last4Digits;
[Export("last4Digits")]
string Last4Digits { get; set; }
// @property (copy, nonatomic) NSString * _Nonnull expiryMonth;
[Export("expiryMonth")]
string ExpiryMonth { get; set; }
// @property (copy, nonatomic) NSString * _Nonnull expiryYear;
[Export("expiryYear")]
string ExpiryYear { get; set; }
// +(instancetype _Nullable)cardFromJSON:(NSDictionary * _Nonnull)JSON;
[Static]
[Export("cardFromJSON:")]
[return: NullAllowed]
OPPCard CardFromJSON(NSDictionary JSON);
// +(instancetype _Nullable)cardWithHolder:(NSString * _Nonnull)holder last4Digits:(NSString * _Nonnull)last4Digits expiryMonth:(NSString * _Nonnull)expiryMonth expiryYear:(NSString * _Nonnull)expiryYear;
[Static]
[Export("cardWithHolder:last4Digits:expiryMonth:expiryYear:")]
[return: NullAllowed]
OPPCard CardWithHolder(string holder, string last4Digits, string expiryMonth, string expiryYear);
// -(instancetype _Nullable)initWithHolder:(NSString * _Nonnull)holder last4Digits:(NSString * _Nonnull)last4Digits expiryMonth:(NSString * _Nonnull)expiryMonth expiryYear:(NSString * _Nonnull)expiryYear __attribute__((objc_designated_initializer));
[Export("initWithHolder:last4Digits:expiryMonth:expiryYear:")]
[DesignatedInitializer]
IntPtr Constructor(string holder, string last4Digits, string expiryMonth, string expiryYear);
}
// @interface OPPBankAccount : NSObject
[BaseType(typeof(NSObject))]
[DisableDefaultCtor]
interface OPPBankAccount
{
// @property (copy, nonatomic) NSString * _Nonnull holder;
[Export("holder")]
string Holder { get; set; }
// @property (copy, nonatomic) NSString * _Nonnull IBAN;
[Export("IBAN")]
string IBAN { get; set; }
// +(instancetype _Nullable)bankAccountFromJSON:(NSDictionary * _Nonnull)JSON;
[Static]
[Export("bankAccountFromJSON:")]
[return: NullAllowed]
OPPBankAccount BankAccountFromJSON(NSDictionary JSON);
// +(instancetype _Nullable)bankAccountWithHolder:(NSString * _Nonnull)holder IBAN:(NSString * _Nonnull)IBAN;
[Static]
[Export("bankAccountWithHolder:IBAN:")]
[return: NullAllowed]
OPPBankAccount BankAccountWithHolder(string holder, string IBAN);
// -(instancetype _Nullable)initWithHolder:(NSString * _Nonnull)holder IBAN:(NSString * _Nonnull)IBAN __attribute__((objc_designated_initializer));
[Export("initWithHolder:IBAN:")]
[DesignatedInitializer]
IntPtr Constructor(string holder, string IBAN);
}
// @interface OPPToken : NSObject
[BaseType(typeof(NSObject))]
[DisableDefaultCtor]
interface OPPToken
{
// @property (readonly, copy, nonatomic) NSString * _Nonnull tokenID;
[Export("tokenID")]
string TokenID { get; }
// @property (readonly, copy, nonatomic) NSString * _Nonnull paymentBrand;
[Export("paymentBrand")]
string PaymentBrand { get; }
// @property (readonly, nonatomic) OPPCard * _Nonnull card;
[Export("card")]
OPPCard Card { get; }
// @property (readonly, nonatomic) OPPBankAccount * _Nonnull bankAccount;
[Export("bankAccount")]
OPPBankAccount BankAccount { get; }
// +(instancetype _Nullable)tokenFromJSON:(NSDictionary * _Nonnull)JSON;
[Static]
[Export("tokenFromJSON:")]
[return: NullAllowed]
OPPToken TokenFromJSON(NSDictionary JSON);
// +(instancetype _Nullable)tokenWithTokenID:(NSString * _Nonnull)tokenID paymentBrand:(NSString * _Nonnull)paymentBrand card:(OPPCard * _Nonnull)card;
[Static]
[Export("tokenWithTokenID:paymentBrand:card:")]
[return: NullAllowed]
OPPToken TokenWithTokenID(string tokenID, string paymentBrand, OPPCard card);
// +(instancetype _Nullable)tokenWithTokenID:(NSString * _Nonnull)tokenID paymentBrand:(NSString * _Nonnull)paymentBrand bankAccount:(OPPBankAccount * _Nonnull)bankAccount;
[Static]
[Export("tokenWithTokenID:paymentBrand:bankAccount:")]
[return: NullAllowed]
OPPToken TokenWithTokenID(string tokenID, string paymentBrand, OPPBankAccount bankAccount);
// -(instancetype _Nullable)initWithTokenID:(NSString * _Nonnull)tokenID paymentBrand:(NSString * _Nonnull)paymentBrand card:(OPPCard * _Nonnull)card;
[Export("initWithTokenID:paymentBrand:card:")]
IntPtr Constructor(string tokenID, string paymentBrand, OPPCard card);
// -(instancetype _Nullable)initWithTokenID:(NSString * _Nonnull)tokenID paymentBrand:(NSString * _Nonnull)paymentBrand bankAccount:(OPPBankAccount * _Nonnull)bankAccount;
[Export("initWithTokenID:paymentBrand:bankAccount:")]
IntPtr Constructor(string tokenID, string paymentBrand, OPPBankAccount bankAccount);
}
// @interface OPPPaymentBrandsConfig : NSObject
[BaseType(typeof(NSObject))]
interface OPPPaymentBrandsConfig
{
// @property (readonly, getter = isEnabled, nonatomic) BOOL enabled;
[Export("enabled")]
bool Enabled { [Bind("isEnabled")] get; }
// @property (readonly, copy, nonatomic) NSArray<NSString *> * _Nonnull paymentBrands;
[Export("paymentBrands", ArgumentSemantic.Copy)]
string[] PaymentBrands { get; }
// @property (readonly, nonatomic) BOOL shouldOverride;
[Export("shouldOverride")]
bool ShouldOverride { get; }
// +(instancetype _Nullable)paymentBrandsConfigFromJSON:(NSDictionary * _Nonnull)JSON;
[Static]
[Export("paymentBrandsConfigFromJSON:")]
[return: NullAllowed]
OPPPaymentBrandsConfig PaymentBrandsConfigFromJSON(NSDictionary JSON);
// +(instancetype _Nonnull)paymentBrandsConfigWithPaymentBrands:(NSArray<NSString *> * _Nonnull)paymentBrands enabled:(BOOL)enabled shouldOverride:(BOOL)shouldOverride;
[Static]
[Export("paymentBrandsConfigWithPaymentBrands:enabled:shouldOverride:")]
OPPPaymentBrandsConfig PaymentBrandsConfigWithPaymentBrands(string[] paymentBrands, bool enabled, bool shouldOverride);
// -(instancetype _Nonnull)initWithPaymentBrands:(NSArray<NSString *> * _Nonnull)paymentBrands enabled:(BOOL)enabled shouldOverride:(BOOL)shouldOverride;
[Export("initWithPaymentBrands:enabled:shouldOverride:")]
IntPtr Constructor(string[] paymentBrands, bool enabled, bool shouldOverride);
}
// @interface OPPCheckoutProvider : NSObject
[BaseType(typeof(NSObject))]
interface OPPCheckoutProvider
{
// +(instancetype _Nullable)checkoutProviderWithPaymentProvider:(OPPPaymentProvider * _Nonnull)provider checkoutID:(NSString * _Nonnull)checkoutID settings:(OPPCheckoutSettings * _Nullable)settings;
[Static]
[Export("checkoutProviderWithPaymentProvider:checkoutID:settings:")]
[return: NullAllowed]
OPPCheckoutProvider CheckoutProviderWithPaymentProvider(OPPPaymentProvider provider, string checkoutID, [NullAllowed] OPPCheckoutSettings settings);
// -(instancetype _Nullable)initWithPaymentProvider:(OPPPaymentProvider * _Nonnull)provider checkoutID:(NSString * _Nonnull)checkoutID settings:(OPPCheckoutSettings * _Nullable)settings;
[Export("initWithPaymentProvider:checkoutID:settings:")]
IntPtr Constructor(OPPPaymentProvider provider, string checkoutID, [NullAllowed] OPPCheckoutSettings settings);
// -(void)presentCheckoutForSubmittingTransactionCompletionHandler:(void (^ _Nonnull)(OPPTransaction * _Nullable, NSError * _Nullable))completionHandler paymentBrandSelectedHandler:(void (^ _Nullable)(NSString * _Nonnull, void (^ _Nonnull)(NSString * _Nullable)))paymentBrandSelectedHandler cancelHandler:(void (^ _Nullable)(void))cancelHandler;
[Export("presentCheckoutForSubmittingTransactionCompletionHandler:paymentBrandSelectedHandler:cancelHandler:")]
void PresentCheckoutForSubmittingTransactionCompletionHandler(Action<OPPTransaction, NSError> completionHandler, [NullAllowed] Action<NSString, Action<NSString>> paymentBrandSelectedHandler, [NullAllowed] Action cancelHandler);
// -(void)presentCheckoutWithPaymentBrand:(NSString * _Nonnull)paymentBrand loadingHandler:(void (^ _Nullable)(BOOL))loadingHandler completionHandler:(void (^ _Nonnull)(OPPTransaction * _Nullable, NSError * _Nullable))completionHandler cancelHandler:(void (^ _Nullable)(void))cancelHandler;
[Export("presentCheckoutWithPaymentBrand:loadingHandler:completionHandler:cancelHandler:")]
void PresentCheckoutWithPaymentBrand(string paymentBrand, [NullAllowed] Action<bool> loadingHandler, Action<OPPTransaction, NSError> completionHandler, [NullAllowed] Action cancelHandler);
// -(void)dismissCheckoutAnimated:(BOOL)animated completion:(void (^ _Nullable)(void))completion;
[Export("dismissCheckoutAnimated:completion:")]
void DismissCheckoutAnimated(bool animated, [NullAllowed] Action completion);
}
// @interface Deprecated (OPPCheckoutProvider)
[Category]
[BaseType(typeof(OPPCheckoutProvider))]
interface OPPCheckoutProvider_Deprecated
{
// -(void)presentCheckoutForSubmittingTransactionCompletionHandler:(void (^ _Nonnull)(OPPTransaction * _Nullable, NSError * _Nullable))completionHandler cancelHandler:(void (^ _Nullable)(void))cancelHandler __attribute__((deprecated("- Use -presentCheckoutForSubmittingTransactionCompletionHandler:paymentBrandSelectedHandler:cancelHandler: instead.")));
[Export("presentCheckoutForSubmittingTransactionCompletionHandler:cancelHandler:")]
void PresentCheckoutForSubmittingTransactionCompletionHandler(Action<OPPTransaction, NSError> completionHandler, [NullAllowed] Action cancelHandler);
// -(void)presentCheckoutForSubmittingTransactionCompletionHandler:(void (^ _Nonnull)(OPPTransaction * _Nullable, NSError * _Nullable))completionHandler paymentMethodSelectedHandler:(void (^ _Nullable)(OPPCheckoutPaymentMethod, void (^ _Nonnull)(NSString * _Nullable)))paymentMethodSelectedHandler cancelHandler:(void (^ _Nullable)(void))cancelHandler __attribute__((deprecated("- Use -presentCheckoutForSubmittingTransactionCompletionHandler:paymentBrandSelectedHandler:cancelHandler: instead.")));
[Export("presentCheckoutForSubmittingTransactionCompletionHandler:paymentMethodSelectedHandler:cancelHandler:")]
void PresentCheckoutForSubmittingTransactionCompletionHandler(Action<OPPTransaction, NSError> completionHandler, [NullAllowed] Action<OPPCheckoutPaymentMethod, Action<NSString>> paymentMethodSelectedHandler, [NullAllowed] Action cancelHandler);
// -(void)presentCheckoutWithPaymentMethod:(OPPCheckoutPaymentMethod)paymentMethod loadingHandler:(void (^ _Nullable)(BOOL))loadingHandler completionHandler:(void (^ _Nonnull)(OPPTransaction * _Nullable, NSError * _Nullable))completionHandler cancelHandler:(void (^ _Nullable)(void))cancelHandler __attribute__((deprecated("- Use -presentCheckoutWithPaymentBrand:loadingHandler:completionHandler:cancelHandler: instead.")));
[Export("presentCheckoutWithPaymentMethod:loadingHandler:completionHandler:cancelHandler:")]
void PresentCheckoutWithPaymentMethod(OPPCheckoutPaymentMethod paymentMethod, [NullAllowed] Action<bool> loadingHandler, Action<OPPTransaction, NSError> completionHandler, [NullAllowed] Action cancelHandler);
}
// @interface OPPCheckoutSettings : NSObject
[BaseType(typeof(NSObject))]
interface OPPCheckoutSettings
{
// @property (readonly, nonatomic) OPPCheckoutTheme * _Nonnull theme;
[Export("theme")]
OPPCheckoutTheme Theme { get; }
// @property (copy, nonatomic) NSString * _Nullable paymentTitle __attribute__((deprecated("")));
[NullAllowed, Export("paymentTitle")]
string PaymentTitle { get; set; }
// @property (copy, nonatomic) NSString * _Nonnull schemeURL;
[Export("schemeURL")]
string SchemeURL { get; set; }
// @property (copy, nonatomic) NSArray<NSString *> * _Nonnull paymentBrands;
[Export("paymentBrands", ArgumentSemantic.Copy)]
string[] PaymentBrands { get; set; }
// @property (copy, nonatomic) NSArray<NSNumber *> * _Nonnull paymentMethods __attribute__((deprecated("")));
[Export("paymentMethods", ArgumentSemantic.Copy)]
NSNumber[] PaymentMethods { get; set; }
// @property (nonatomic) OPPCheckoutStorePaymentDetailsMode storePaymentDetails;
[Export("storePaymentDetails", ArgumentSemantic.Assign)]
OPPCheckoutStorePaymentDetailsMode StorePaymentDetails { get; set; }
// @property (nonatomic) OPPCheckoutSkipCVVMode skipCVV;
[Export("skipCVV", ArgumentSemantic.Assign)]
OPPCheckoutSkipCVVMode SkipCVV { get; set; }
// @property (copy, nonatomic) NSArray<OPPSecurityPolicy *> * _Nullable securityPolicies;
[NullAllowed, Export("securityPolicies", ArgumentSemantic.Copy)]
OPPSecurityPolicy[] SecurityPolicies { get; set; }
// @property (copy, nonatomic) NSString * _Nullable language;
[NullAllowed, Export("language")]
string Language { get; set; }
// @property (nonatomic) PKPaymentRequest * _Nullable applePayPaymentRequest;
[NullAllowed, Export("applePayPaymentRequest", ArgumentSemantic.Assign)]
PKPaymentRequest ApplePayPaymentRequest { get; set; }
// @property (copy, nonatomic) NSString * _Nullable klarnaCountry;
[NullAllowed, Export("klarnaCountry")]
string KlarnaCountry { get; set; }
// @property (nonatomic) NSDecimalNumber * _Nullable klarnaInvoiceFee;
[NullAllowed, Export("klarnaInvoiceFee", ArgumentSemantic.Assign)]
NSDecimalNumber KlarnaInvoiceFee { get; set; }
// @property (nonatomic) NSDecimalNumber * _Nullable klarnaInstallmentsFee;
[NullAllowed, Export("klarnaInstallmentsFee", ArgumentSemantic.Assign)]
NSDecimalNumber KlarnaInstallmentsFee { get; set; }
// @property (getter = isIBANRequired, nonatomic) BOOL IBANRequired;
[Export("IBANRequired")]
bool IBANRequired { [Bind("isIBANRequired")] get; set; }
}
// @interface OPPSecurityPolicy : NSObject
[BaseType(typeof(NSObject))]
[DisableDefaultCtor]
interface OPPSecurityPolicy
{
// +(instancetype _Nonnull)securityPolicyWithPaymentBrands:(NSArray<NSString *> * _Nonnull)paymentBrands mode:(OPPSecurityPolicyMode)mode;
[Static]
[Export("securityPolicyWithPaymentBrands:mode:")]
OPPSecurityPolicy SecurityPolicyWithPaymentBrands(string[] paymentBrands, OPPSecurityPolicyMode mode);
// +(instancetype _Nonnull)securityPolicyForTokensWithMode:(OPPSecurityPolicyMode)mode;
[Static]
[Export("securityPolicyForTokensWithMode:")]
OPPSecurityPolicy SecurityPolicyForTokensWithMode(OPPSecurityPolicyMode mode);
// @property (readonly, nonatomic) OPPSecurityPolicyMode mode;
[Export("mode")]
OPPSecurityPolicyMode Mode { get; }
// @property (readonly, copy, nonatomic) NSArray<NSString *> * _Nullable paymentBrands;
[NullAllowed, Export("paymentBrands", ArgumentSemantic.Copy)]
string[] PaymentBrands { get; }
// @property (readonly, copy, nonatomic) NSArray<NSNumber *> * _Nullable paymentMethods __attribute__((deprecated("")));
[NullAllowed, Export("paymentMethods", ArgumentSemantic.Copy)]
NSNumber[] PaymentMethods { get; }
// @property (readonly, getter = isTokenPolicy, nonatomic) BOOL tokenPolicy;
[Export("tokenPolicy")]
bool TokenPolicy { [Bind("isTokenPolicy")] get; }
}
// @interface Deprecated (OPPSecurityPolicy)
[Category]
[BaseType(typeof(OPPSecurityPolicy))]
interface OPPSecurityPolicy_Deprecated
{
// +(instancetype _Nonnull)securityPolicyWithPaymentMethods:(NSArray<NSNumber *> * _Nonnull)paymentMethods mode:(OPPSecurityPolicyMode)mode __attribute__((deprecated("- Use +securityPolicyWithPaymentBrands:mode: instead.")));
[Static]
[Export("securityPolicyWithPaymentMethods:mode:")]
OPPSecurityPolicy SecurityPolicyWithPaymentMethods(NSNumber[] paymentMethods, OPPSecurityPolicyMode mode);
}
// @interface OPPCheckoutTheme : NSObject
[BaseType(typeof(NSObject))]
interface OPPCheckoutTheme
{
// -(instancetype _Nonnull)initWithThemeStyle:(OPPCheckoutThemeStyle)style __attribute__((objc_designated_initializer));
[Export("initWithThemeStyle:")]
[DesignatedInitializer]
IntPtr Constructor(OPPCheckoutThemeStyle style);
// @property (nonatomic) OPPCheckoutThemeStyle style;
[Export("style", ArgumentSemantic.Assign)]
OPPCheckoutThemeStyle Style { get; set; }
// @property (nonatomic) UIColor * _Nonnull primaryBackgroundColor;
[Export("primaryBackgroundColor", ArgumentSemantic.Assign)]
UIColor PrimaryBackgroundColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull primaryForegroundColor;
[Export("primaryForegroundColor", ArgumentSemantic.Assign)]
UIColor PrimaryForegroundColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull secondaryBackgroundColor __attribute__((deprecated("")));
[Export("secondaryBackgroundColor", ArgumentSemantic.Assign)]
UIColor SecondaryBackgroundColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull secondaryForegroundColor __attribute__((deprecated("")));
[Export("secondaryForegroundColor", ArgumentSemantic.Assign)]
UIColor SecondaryForegroundColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull confirmationButtonColor;
[Export("confirmationButtonColor", ArgumentSemantic.Assign)]
UIColor ConfirmationButtonColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull confirmationButtonTextColor;
[Export("confirmationButtonTextColor", ArgumentSemantic.Assign)]
UIColor ConfirmationButtonTextColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull textFieldBackroundColor;
[Export("textFieldBackroundColor", ArgumentSemantic.Assign)]
UIColor TextFieldBackroundColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull textFieldTextColor;
[Export("textFieldTextColor", ArgumentSemantic.Assign)]
UIColor TextFieldTextColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull textFieldPlaceholderColor;
[Export("textFieldPlaceholderColor", ArgumentSemantic.Assign)]
UIColor TextFieldPlaceholderColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull errorColor;
[Export("errorColor", ArgumentSemantic.Assign)]
UIColor ErrorColor { get; set; }
// @property (nonatomic) UIActivityIndicatorViewStyle activityIndicatorPrimaryStyle;
[Export("activityIndicatorPrimaryStyle", ArgumentSemantic.Assign)]
UIActivityIndicatorViewStyle ActivityIndicatorPrimaryStyle { get; set; }
// @property (nonatomic) UIActivityIndicatorViewStyle activityIndicatorSecondaryStyle;
[Export("activityIndicatorSecondaryStyle", ArgumentSemantic.Assign)]
UIActivityIndicatorViewStyle ActivityIndicatorSecondaryStyle { get; set; }
// @property (nonatomic) UIColor * _Nonnull navigationBarTintColor;
[Export("navigationBarTintColor", ArgumentSemantic.Assign)]
UIColor NavigationBarTintColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull navigationBarBackgroundColor;
[Export("navigationBarBackgroundColor", ArgumentSemantic.Assign)]
UIColor NavigationBarBackgroundColor { get; set; }
// @property (copy, nonatomic) NSDictionary * _Nonnull navigationBarTextAttributes;
[Export("navigationBarTextAttributes", ArgumentSemantic.Copy)]
NSDictionary NavigationBarTextAttributes { get; set; }
// @property (copy, nonatomic) NSDictionary * _Nullable navigationItemTextAttributes;
[NullAllowed, Export("navigationItemTextAttributes", ArgumentSemantic.Copy)]
NSDictionary NavigationItemTextAttributes { get; set; }
// @property (copy, nonatomic) NSString * _Nullable cancelBarButtonText;
[NullAllowed, Export("cancelBarButtonText")]
string CancelBarButtonText { get; set; }
// @property (nonatomic) UIImage * _Nullable cancelBarButtonImage;
[NullAllowed, Export("cancelBarButtonImage", ArgumentSemantic.Assign)]
UIImage CancelBarButtonImage { get; set; }
// @property (nonatomic) UIColor * _Nonnull cellTintColor;
[Export("cellTintColor", ArgumentSemantic.Assign)]
UIColor CellTintColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull cellHighlightedBackgroundColor;
[Export("cellHighlightedBackgroundColor", ArgumentSemantic.Assign)]
UIColor CellHighlightedBackgroundColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull cellHighlightedTextColor;
[Export("cellHighlightedTextColor", ArgumentSemantic.Assign)]
UIColor CellHighlightedTextColor { get; set; }
// @property (nonatomic) UIFont * _Nonnull cellTextFont;
[Export("cellTextFont", ArgumentSemantic.Assign)]
UIFont CellTextFont { get; set; }
// @property (nonatomic) UIColor * _Nonnull sectionBackgroundColor;
[Export("sectionBackgroundColor", ArgumentSemantic.Assign)]
UIColor SectionBackgroundColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull sectionTextColor;
[Export("sectionTextColor", ArgumentSemantic.Assign)]
UIColor SectionTextColor { get; set; }
// @property (nonatomic) UIFont * _Nonnull sectionFont;
[Export("sectionFont", ArgumentSemantic.Assign)]
UIFont SectionFont { get; set; }
// @property (nonatomic) UIColor * _Nonnull separatorColor;
[Export("separatorColor", ArgumentSemantic.Assign)]
UIColor SeparatorColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull paymentMethodIconBackgroundColor __attribute__((deprecated("")));
[Export("paymentMethodIconBackgroundColor", ArgumentSemantic.Assign)]
UIColor PaymentMethodIconBackgroundColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull paymentBrandIconBackgroundColor;
[Export("paymentBrandIconBackgroundColor", ArgumentSemantic.Assign)]
UIColor PaymentBrandIconBackgroundColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull paymentBrandIconBorderColor;
[Export("paymentBrandIconBorderColor", ArgumentSemantic.Assign)]
UIColor PaymentBrandIconBorderColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull storedPaymentMethodIconBackgroundColor;
[Export("storedPaymentMethodIconBackgroundColor", ArgumentSemantic.Assign)]
UIColor StoredPaymentMethodIconBackgroundColor { get; set; }
// @property (nonatomic) UIColor * _Nonnull storedPaymentMethodIconBorderColor;
[Export("storedPaymentMethodIconBorderColor", ArgumentSemantic.Assign)]
UIColor StoredPaymentMethodIconBorderColor { get; set; }
// @property (nonatomic) UIFont * _Nonnull primaryFont;
[Export("primaryFont", ArgumentSemantic.Assign)]
UIFont PrimaryFont { get; set; }
// @property (nonatomic) UIFont * _Nonnull secondaryFont;
[Export("secondaryFont", ArgumentSemantic.Assign)]
UIFont SecondaryFont { get; set; }
// @property (nonatomic) UIFont * _Nonnull amountLabelFont __attribute__((deprecated("")));
[Export("amountLabelFont", ArgumentSemantic.Assign)]
UIFont AmountLabelFont { get; set; }
// @property (nonatomic) UIFont * _Nonnull confirmationButtonFont;
[Export("confirmationButtonFont", ArgumentSemantic.Assign)]
UIFont ConfirmationButtonFont { get; set; }
// @property (nonatomic) UIFont * _Nonnull errorFont;
[Export("errorFont", ArgumentSemantic.Assign)]
UIFont ErrorFont { get; set; }
}
// @interface OPPPaymentButton : UIButton
[BaseType(typeof(UIButton))]
interface OPPPaymentButton
{
// +(instancetype _Nonnull)paymentButtonWithPaymentBrand:(NSString * _Nonnull)paymentBrand;
[Static]
[Export("paymentButtonWithPaymentBrand:")]
OPPPaymentButton PaymentButtonWithPaymentBrand(string paymentBrand);
// -(instancetype _Nonnull)initWithPaymentBrand:(NSString * _Nonnull)paymentBrand;
[Export("initWithPaymentBrand:")]
IntPtr Constructor(string paymentBrand);
// @property (copy, nonatomic) NSString * _Nonnull paymentBrand;
[Export("paymentBrand")]
string PaymentBrand { get; set; }
// @property (nonatomic) OPPCheckoutPaymentMethod paymentMethod __attribute__((deprecated("")));
[Export("paymentMethod", ArgumentSemantic.Assign)]
OPPCheckoutPaymentMethod PaymentMethod { get; set; }
}
// @interface Deprecated (OPPPaymentButton)
[Category]
[BaseType(typeof(OPPPaymentButton))]
interface OPPPaymentButton_Deprecated
{
// +(instancetype _Nonnull)paymentButtonWithPaymentMethod:(OPPCheckoutPaymentMethod)paymentMethod __attribute__((deprecated("- Use +paymentButtonWithPaymentBrand: instead.")));
[Static]
[Export("paymentButtonWithPaymentMethod:")]
OPPPaymentButton PaymentButtonWithPaymentMethod(OPPCheckoutPaymentMethod paymentMethod);
// -(instancetype _Nonnull)initWithPaymentMethod:(OPPCheckoutPaymentMethod)paymentMethod __attribute__((deprecated("- Use -initWithPaymentBrand: instead.")));
[Export("initWithPaymentMethod:")]
IntPtr Constructor(OPPCheckoutPaymentMethod paymentMethod);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment