PPFPTIData.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // PPFPTIData.h
  3. // PayPalOneTouch
  4. //
  5. // Copyright © 2015 PayPal, Inc. All rights reserved.
  6. //
  7. #import <Foundation/Foundation.h>
  8. /**
  9. Represents the analytics data and metadata for the analytics request.
  10. */
  11. @interface PPFPTIData: NSObject
  12. /**
  13. Designated initializer
  14. @param params the analytics data to send
  15. @param deviceID the device ID
  16. @param sessionID the session's ID
  17. @param userAgent the user agent string to use
  18. @param trackerURL the tracker URL to send the data to
  19. */
  20. - (nonnull instancetype)initWithParams:(nonnull NSDictionary *)params
  21. deviceID:(nonnull NSString *)deviceID
  22. sessionID:(nonnull NSString *)sessionID
  23. userAgent:(nonnull NSString *)userAgent
  24. trackerURL:(nonnull NSURL *)trackerURL;
  25. /**
  26. The intended NSURL to send the data to
  27. */
  28. @property (nonatomic, copy, readonly, nonnull) NSURL *trackerURL;
  29. /**
  30. The user agent string to use for the request
  31. */
  32. @property (nonatomic, copy, readonly, nonnull) NSString *userAgent;
  33. /**
  34. The analytics data and metadata to send.
  35. This data is not the same as the initial params data passed in the
  36. initializer. The format of the dictionary is different and keys/values may be changed.
  37. Usually transformed into a JSON object in the request body.
  38. */
  39. - (nonnull NSDictionary *)dataAsDictionary;
  40. @end