XYDeliveryAPIManager.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. //
  2. // XYDeliveryAPIManager.h
  3. // Starbuds
  4. //
  5. // Created by 翟玉磊 on 2020/8/11.
  6. // Copyright © 2020 翟玉磊. All rights reserved.
  7. //
  8. #import "ZYLAPIManager.h"
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface XYDeliveryAPIManager : ZYLAPIManager
  11. /**
  12. 获取区域列表
  13. @param parentId 父区域id 不传则说明是省级列表
  14. @param successHandler 请求成功回调
  15. @param failureHandler 请求失败回调
  16. @return 请求标示
  17. */
  18. - (NSNumber *)getAreaListWithParentId:(NSString *)parentId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  19. /**
  20. 创建收货地址
  21. @param deliveryContactName 收件人
  22. @param deliveryContactPhone 手机号
  23. @param areaId 区域id
  24. @param deliveryAddress 详细地址
  25. @param successHandler 请求成功回调
  26. @param failureHandler 请求失败回调
  27. @return 请求标示
  28. */
  29. - (NSNumber *)addDeliveryWithDeliveryContactName:(NSString *)deliveryContactName deliveryContactPhone:(NSString *)deliveryContactPhone areaId:(NSString *)areaId deliveryAddress:(NSString *)deliveryAddress successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  30. /**
  31. 获取收货地址列表
  32. @param pageIndex 页码
  33. @param successHandler 请求成功回调
  34. @param failureHandler 请求失败回调
  35. @return 请求标示
  36. */
  37. - (NSNumber *)getDeliveryListPageIndex:(NSInteger)pageIndex successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  38. /**
  39. 获取默认收货地址
  40. @param successHandler 请求成功回调
  41. @param failureHandler 请求失败回调
  42. @return 请求标示
  43. */
  44. - (NSNumber *)getDefaultDeliverySuccessHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  45. /**
  46. 删除收货地址
  47. @param deliveryId 要删除的收货地址id
  48. @param successHandler 请求成功回调
  49. @param failureHandler 请求失败回调
  50. @return 请求标示
  51. */
  52. - (NSNumber *)deleteDeliveryWithDeliveryId:(NSString *)deliveryId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  53. /**
  54. 设置默认收货地址
  55. @param deliveryId 收货地址id
  56. @param successHandler 请求成功回调
  57. @param failureHandler 请求失败回调
  58. @return 请求标示
  59. */
  60. - (NSNumber *)setDefaultDeliveryWithDeliveryId:(NSString *)deliveryId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  61. /**
  62. 编辑收货地址
  63. @param deliveryId 收货地址id
  64. @param deliveryContactName 收件人
  65. @param deliveryContactPhone 联系电话
  66. @param areaId 区域id
  67. @param deliveryAddress 详细地址
  68. @param successHandler 请求成功回调
  69. @param failureHandler 请求失败回调
  70. @return 请求标示
  71. */
  72. - (NSNumber *)modifyDeliveryWithDeliveryId:(NSString *)deliveryId deliveryContactName:(NSString *)deliveryContactName deliveryContactPhone:(NSString *)deliveryContactPhone areaId:(NSString *)areaId deliveryAddress:(NSString *)deliveryAddress successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  73. @end
  74. NS_ASSUME_NONNULL_END