BTPayPalAccountNonce.m 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #import "BTPayPalAccountNonce_Internal.h"
  2. @interface BTPayPalAccountNonce ()
  3. @property (nonatomic, readwrite, copy) NSString *email;
  4. @property (nonatomic, readwrite, copy) NSString *firstName;
  5. @property (nonatomic, readwrite, copy) NSString *lastName;
  6. @property (nonatomic, readwrite, copy) NSString *phone;
  7. @property (nonatomic, readwrite, strong) BTPostalAddress *billingAddress;
  8. @property (nonatomic, readwrite, strong) BTPostalAddress *shippingAddress;
  9. @property (nonatomic, readwrite, copy) NSString *clientMetadataId;
  10. @property (nonatomic, readwrite, copy) NSString *payerId;
  11. @property (nonatomic, readwrite, strong) BTPayPalCreditFinancing *creditFinancing;
  12. @end
  13. @implementation BTPayPalAccountNonce
  14. - (instancetype)initWithNonce:(NSString *)nonce
  15. description:(NSString *)description
  16. email:(NSString *)email
  17. firstName:(NSString *)firstName
  18. lastName:(NSString *)lastName
  19. phone:(NSString *)phone
  20. billingAddress:(BTPostalAddress *)billingAddress
  21. shippingAddress:(BTPostalAddress *)shippingAddress
  22. clientMetadataId:(NSString *)clientMetadataId
  23. payerId:(NSString *)payerId
  24. isDefault:(BOOL)isDefault
  25. creditFinancing:(BTPayPalCreditFinancing *)creditFinancing {
  26. if (self = [super initWithNonce:nonce localizedDescription:description type:@"PayPal" isDefault:isDefault]) {
  27. _email = email;
  28. _firstName = firstName;
  29. _lastName = lastName;
  30. _phone = phone;
  31. _billingAddress = [billingAddress copy];
  32. _shippingAddress = [shippingAddress copy];
  33. _clientMetadataId = clientMetadataId;
  34. _payerId = payerId;
  35. _creditFinancing = creditFinancing;
  36. }
  37. return self;
  38. }
  39. @end