BTVenmoAppSwitchRequestURL.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #import <Foundation/Foundation.h>
  2. NS_ASSUME_NONNULL_BEGIN
  3. @class BTClientMetadata;
  4. @interface BTVenmoAppSwitchRequestURL : NSObject
  5. /**
  6. The base app switch URL for Venmo. Does not include specific parameters.
  7. */
  8. + (NSURL *)baseAppSwitchURL;
  9. /**
  10. Create an app switch URL
  11. @param merchantID The merchant ID
  12. @param accessToken The access token used by the venmo app to tokenize on behalf of the merchant
  13. @param scheme The return URL scheme, e.g. "com.yourcompany.Your-App.payments"
  14. @param bundleName The bundle display name for the current app
  15. @param environment The environment, e.g. "production" or "sandbox"
  16. @param paymentContextID The Venmo payment context ID (optional)
  17. @param metadata Additional braintree metadata
  18. @return The resulting URL, or `nil` if any of the required parameters are `nil`.
  19. */
  20. + (nullable NSURL *)appSwitchURLForMerchantID:(NSString *)merchantID
  21. accessToken:(NSString *)accessToken
  22. returnURLScheme:(NSString *)scheme
  23. bundleDisplayName:(NSString *)bundleName
  24. environment:(NSString *)environment
  25. paymentContextID:(NSString * _Nullable)paymentContextID
  26. metadata:(BTClientMetadata *)metadata;
  27. @end
  28. NS_ASSUME_NONNULL_END