iOS
11. Member Profile
You can use this function to retrieve data member which is stored in Goodie system.
Here is the example:
1. GoodieCore.updateMemberProfile(authToken: "authToken", deviceUniqueId: "deviceUniqueId", memberId: "memberId", merchantId: "merchantId", birthDate: "birthDate", firstName: "firstName", lastName: "lastName", gender: "gender", phoneNumber: "phoneNumber", completion: { (UpdateMemberProfileResponse) in 2. if UpdateMemberProfileResponse.abstractResponse?.responseStatus == "MEM000" { 3. //success, do something 4. }else{ 5. //failed 6. } 7. }) { (Error) in 8. //error 9. }
Where :
Param | Type | Description |
---|---|---|
authToken | String | authToken is used as for header authentication purpose |
deviceUniqueId | String | deviceUniqueId is identify android device |
memberId | String | memberId is identifier that will be used to identity a member |
merchantId | String | merchantId is identifier that will be used to identity a merchant |
Response Member Profile :
1. { 2. "tierName": "Premium", 3. "tierImage": "", 4. "nextTierName": "Almight", 5. "nextTierImage": "", 6. "reqPointNextTier": 704, 7. "totalPoints": 297, 8. "memberName": "anadia salsabella", 9. "memberId": "D0A57818-1351-463D-9AD0-8A593250A68F", 10. "merchantId": "5F773EA1-1E66-4F9E-B9C8-E1FA8156AD20", 11. "nearestPointToBeExpire": 292, 12. "nearestExpiredDate": "2020-05-16", 13. "abstractResponse": { 14. "responseStatus": "INQ000", 15. "responseMessage": "Inquiry success" 16. } 17. }