iOS


13. Update Member Profile

Goodie.setVoucherRedeem() is used to Update profile in Goodie system, you can change your private information using this function.

Here is the example code:

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
birthDate String Fill this with your birth date
firstName String Fill with your first name
lastName String Fill with your last name
gender String Fill with your gender (male = “M”, female = “F”)
phoneNumber String Fill with your phone number

Response Update Member Profile :
1.	{  
2.	    "member": {  
3.	        "memberId": "D0A57818-1351-463D-9AD0-8A593250A68F",  
4.	        "firstName": "anadia",  
5.	        "lastName": "bella",  
6.	        "birthDate": "1996-9-10",  
7.	        "gender": "F",  
8.	        "phoneNumber": "081180888881"  
9.	    },  
10.	    "abstractResponse": {  
11.	        "responseStatus": "MEM000",  
12.	        "responseMessage": "Update status member success"  
13.	    }  
14.	}