I am creating a Xamarin binding for the WePay.iOS SDK using objective sharpie. https://github.com/wepay/wepay-ios
I have managed to build the APIDefinition.cs and StructsAndEnums.cs files. However when I created the binding project, it does not compile successfully.
[Export ("initWithSwipedInfo:")]
IntPtr Constructor (NSObject swipedInfo);
// -(instancetype)initWithEMVInfo:(id)emvInfo;
[Export ("initWithEMVInfo:")]
IntPtr Constructor (NSObject emvInfo);
I understand that I need to change the NSOBject to the correct datatype. However, when I look into the Objective C file. I cant really make sense of what datatype should I be using. I appreciate if someone can guide me in it.
Objective-C Class
@interface WPPaymentInfo : NSObject
@property (nonatomic, strong, readonly) NSString *firstName;
@property (nonatomic, strong, readonly) NSString *lastName;
@property (nonatomic, strong, readonly) NSString *email;
@property (nonatomic, strong, readonly) NSString *paymentDescription;
@property (nonatomic, readonly) BOOL isVirtualTerminal;
@property (nonatomic, strong, readonly) WPAddress *billingAddress;
@property (nonatomic, strong, readonly) WPAddress *shippingAddress;
@property (nonatomic, strong, readonly) id paymentMethod;
@property (nonatomic, strong, readonly) id swiperInfo;
@property (nonatomic, strong, readonly) id manualInfo;
@property (nonatomic, strong, readonly) id emvInfo;
- (instancetype) initWithSwipedInfo:(id)swipedInfo;
- (instancetype) initWithEMVInfo:(id)emvInfo;
- (instancetype) initWithFirstName:(NSString *)firstName
lastName:(NSString *)lastName
email:(NSString *)email
billingAddress:(WPAddress *)billingAddress
shippingAddress:(WPAddress *)shippingAddress
cardNumber:(NSString *)cardNumber
cvv:(NSString *)cvv
expMonth:(NSString *)expMonth
expYear:(NSString *)expYear
virtualTerminal:(BOOL)virtualTerminal;
- (void) addEmail:(NSString *)email;
@end