iOS


4. Member Point

This member point is done by calling Goodie.setMemberPoint() function. This function will retrieve based on the memberId, merchantId. You can see your point balance using this function (You can get points after making certain amount of transaction or from certain events).

Here is example:

1.	GoodieCore.memberPoint(authToken: "autToken", deviceUniqId: "deviceUniqId", memberId: "memberId", merchantId: "merchantId", completion: { (MemberPointResponse) in  
2.	    if MemberPointResponse.abstractResponse?.responseStatus == "INQ000" {  
3.	        //success, do something  
4.	    }else{  
5.	        //failed  
6.	    }  
7.	}) { (Error) in  
8.	     //error  
9.	}  
                        

Where :
Param Type Description
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 point :
1.	{  
2.	    "tierName": "Bronze",  
3.	    "tierImage": "https://dev.goodie.id/ViewImage?fileName=gNW%25Fx1JK%246sUKqW88KE7lYsYLU%257dFp.png",  
4.	    "nextTierName": "Silver",  
5.	    "nextTierImage": "",  
6.	    "reqPointNextTier": 11,  
7.	    "totalPoints": 0,  
8.	    "memberName": "anadia salsabella",  
9.	    "memberId": "D0A57818-1351-463D-9AD0-8A593250A68F",  
10.	    "merchantId": "5F773EA1-1E66-4F9E-B9C8-E1FA8156AD20",  
11.	    "nearestPointToBeExpire": 0,  
12.	    "nearestExpiredDate": "",  
13.	    "abstractResponse": {  
14.	        "responseStatus": "INQ000",  
15.	        "responseMessage": "Inquiry success"  
16.	    }  
17.	}