iOS


5. Promotion Inquiry Basic

This promotion inquiry basic is done by calling Goodie.setPromotionInquiryBasic() function

Here is example:

1.	GoodieCore.promotionInquiryBasic(authToken: "authToken", deviceUniqId: "deviceUniqId", memberId: "memberId", merchantId: "merchantId", storeId: "storeId", productCode: "productCode", refNumber: "refNumber", totalTrxAmount: 10000, completion: { (PromoInqBasicResponse) in  
2.	    if PromoInqBasicResponse.abstractResponse?.responseStatus == "INQ000" {  
3.	        //success, do something  
4.	    }else{  
5.	        //failed  
6.	    }  
7.	}) { (Error) in  
8.	  
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
storeId String storeId is identifier that will be used to identity a store
productCode String productCode is identifier that will be used to identity a product
refNumber String refNumber is
totalTrxAmount Integer totalTrxAmount is total transaction amount

Response promotion inquiry basic :
1.	{  
2.	    "memberId": "D0A57818-1351-463D-9AD0-8A593250A68F",  
3.	    "merchantId": "5F773EA1-1E66-4F9E-B9C8-E1FA8156AD20",  
4.	    "memberName": "anadia salsabella",  
5.	    "storeId": "",  
6.	    "transactionDate": "2019-06-21",  
7.	    "transactionId": "",  
8.	    "totalPointIssuing": 101,  
9.	    "promotionNumberIssued": [  
10.	        {  
11.	            "promotionCode": "PRMBNI01",  
12.	            "promotionName": "Opening Account BNI Promotion",  
13.	            "basicRuleName": "",  
14.	            "basicRulePoint": 0,  
15.	            "customRulePoints": []  
16.	        },  
17.	        {  
18.	            "promotionCode": "SAPP01",  
19.	            "promotionName": "Promotion BNI",  
20.	            "basicRuleName": "Basic Rule BNI",  
21.	            "basicRulePoint": 1,  
22.	            "customRulePoints": []  
23.	        },  
24.	        {  
25.	            "promotionCode": "test123",  
26.	            "promotionName": "AStest",  
27.	            "basicRuleName": "",  
28.	            "basicRulePoint": 0,  
29.	            "customRulePoints": []  
30.	        },  
31.	        {  
32.	            "promotionCode": "test12312",  
33.	            "promotionName": "AStest22",  
34.	            "basicRuleName": "",  
35.	            "basicRulePoint": 0,  
36.	            "customRulePoints": []  
37.	        },  
38.	        {  
39.	            "promotionCode": "Promo123",  
40.	            "promotionName": "Promo123",  
41.	            "basicRuleName": "BNI New Basic Rule",  
42.	            "basicRulePoint": 100,  
43.	            "customRulePoints": []  
44.	        }  
45.	    ],  
46.	    "abstractResponse": {  
47.	        "responseStatus": "INQ000",  
48.	        "responseMessage": "Inquiry success"  
49.	    }  
50.	}