@@ -852,3 +852,114 @@ For executing transactions, you need to understand the 4 modules described below
852852 Boolean response = webhooksService.verifySignature( version, stringifiedData, requestTimestamp, signature, webhookSecret );
853853 System.out.println("response: " + response );
854854 ```
855+
856+
857+ ### Redemption Modules
858+
859+ Two modules of redemption, "Redeemable SKUs" and "User Redemptions", are described below.
860+
861+ #### Redeemable SKUs Module
862+
863+ * Initialize Redeemable SKUs service object to perform redeemable skus specific actions.
864+
865+ ``` java
866+ com.ost.services. RedeemableSkus redeemableSkusService = services. redeemableSkus;
867+ ```
868+
869+ * Get Redeemable SKU detail using the redeemable sku id.
870+
871+ ```java
872+ // Mandatory API parameters
873+
874+ // Fetch details of following redeemable sku.
875+ String redeemableSkuId = ' c2c__' ;
876+
877+ HashMap < String ,Object > params = new HashMap<String ,Object > ();
878+ params. put(" redeemable_sku_id" , redeemableSkuId);
879+
880+ JsonObject response = redeemableSkusService. get( params );
881+ System . out. println(" response: " + response. toString() );
882+ ```
883+
884+ * Get Redeemable SKUs List . Pagination is supported by this API .
885+
886+ ```java
887+ // Mandatory API parameters
888+ // NOTE: No mandatory parameters.
889+
890+ // Optional API parameters
891+
892+ // Limit.
893+ long limit = 10 ;
894+
895+ // Array of redeemable SKU ids.
896+ ArrayList<Object > redemptionSkuIdsArray = new ArrayList<Object > ();
897+ redemptionSkuIdsArray. add(" 1001" );
898+ redemptionSkuIdsArray. add(" 1002" );
899+
900+ // Pagination identifier from the previous API call response. Not needed for page one.
901+ String paginationIdentifier = " eyJ___" ;
902+
903+ HashMap < String ,Object > params = new HashMap<String ,Object > ();
904+ params. put(" redemption_ids" , redemptionSkuIdsArray);
905+ params. put(" pagination_identifier" , paginationIdentifier);
906+ params. put(" limit" , limit);
907+
908+ JsonObject response = redeemableSkusService. getList( params );
909+ System . out. println(" response: " + response. toString() );
910+ ```
911+ #### User Redemptions Module
912+
913+ * Initialize Redemptions service object to perform user redemption specific actions.
914+
915+ ```java
916+ com.ost.services. Redemptions redemptionsService = services. redemptions;
917+ ```
918+
919+ * Get User redemption details using the userId and redemptionId.
920+
921+ ```java
922+ // Mandatory API parameters
923+
924+ // UserId of user for whom redemption details needs to be fetched.
925+ String userId = " c2c6___" ;
926+
927+ // Unique identifier of the redemption of user.
928+ String redemptionId = " c2c___" ;
929+
930+ HashMap < String ,Object > params = new HashMap<String ,Object > ();
931+ params. put(" user_id" , userId);
932+ params. put(" redemption_id" , redemptionId);
933+
934+ JsonObject response = redemptionsService. get( params );
935+ System . out. println(" response: " + response. toString() );
936+ ```
937+
938+ * Get User Redemptions List . Pagination is supported by this API .
939+
940+ ```java
941+ // Mandatory API parameters
942+ String userId = " c2c6___" ;
943+
944+ // Optional API parameters
945+
946+ // Limit.
947+ long limit = 10 ;
948+
949+ // Array of user redemption uuids.
950+ ArrayList<Object > redemptionIdsArray = new ArrayList<Object > ();
951+ redemptionIdsArray. add(" eyJ___" );
952+ redemptionIdsArray. add(" eyJ___" );
953+
954+ // Pagination identifier from the previous API call response. Not needed for page one.
955+ String paginationIdentifier = " eyJ___" ;
956+
957+ HashMap < String ,Object > params = new HashMap<String ,Object > ();
958+ params. put(" user_id" , userId);
959+ params. put(" redemption_ids" , redemptionIdsArray);
960+ params. put(" pagination_identifier" , paginationIdentifier);
961+ params. put(" limit" , limit);
962+
963+ JsonObject response = redemptionsService. getList( params );
964+ System . out. println(" response: " + response. toString() );
965+ ```
0 commit comments