@@ -388,7 +388,7 @@ For executing transactions, you need to understand the 4 modules described below
388388 price_point = 0.020606673
389389
390390 # Price point needs to be passed in atto. Multiply the price point with 10^18. Also, this value should be a string.
391- intended_price_point_in_atto = "%.f" % ((price_point * 10**18)
391+ intended_price_point_in_atto = "%.f" % ((price_point * 10**18))
392392
393393 # Amount of Fiat to be transferred.
394394 transfer_amount_in_fiat = 0.1
@@ -730,3 +730,102 @@ For executing transactions, you need to understand the 4 modules described below
730730 signature_params[:webhook_secret] = 'mySecret'
731731 response = webhooks_service.verify_signature(signature_params)
732732 ` ` `
733+
734+
735+ # ## Redemption Modules
736+
737+ Two modules of redemption, " Redeemable SKUs" and " User Redemptions" , are described below.
738+
739+ # ### Redeemable SKUs Module
740+
741+ * Initialize Redeemable SKUs service object to perform redeemable skus specific actions.
742+
743+ ` ` ` ruby
744+ redeemable_skus_service = ost_sdk.services.redeemable_skus
745+ ` ` `
746+ * Get Redeemable SKU detail using the redeemable sku id.
747+
748+ ` ` ` ruby
749+ # Mandatory API parameters
750+
751+ # Fetch details of following redeemable sku.
752+ redeemable_sku_id = '1'
753+
754+ get_params = {}
755+ get_params[:redeemable_sku_id] = redeemable_sku_id
756+ response = redeemable_skus_service.get(get_params)
757+ ` ` `
758+
759+ * Get Redeemable SKUs List . Pagination is supported by this API .
760+
761+ ` ` ` ruby
762+ # Mandatory API parameters
763+ # NOTE: No mandatory parameters.
764+
765+ # Optional API parameters
766+
767+ # Limit.
768+ limit = 10
769+
770+ # Array of redeemable SKU ids.
771+ redeemable_sku_ids = ['1001', '1002']
772+
773+ # Pagination identifier from the previous API call response. Not needed for page one.
774+ pagination_identifier = 'eyJwY___'
775+
776+ get_params = {}
777+ get_params[:redeemable_sku_ids] = redeemable_sku_ids
778+ get_params[:limit] = limit
779+ get_params[:pagination_identifier] = pagination_identifier
780+ response = redeemable_skus_service.get_list(get_params)
781+ ` ` `
782+ # ### User Redemptions Module
783+
784+ * Initialize Redemptions service object to perform user redemption specific actions.
785+
786+ ` ` ` ruby
787+ redemptions_service = ost_sdk.services.redemptions
788+ ` ` `
789+
790+ * Get User redemption details using the userId and redemptionId.
791+
792+ ` ` ` ruby
793+ # Mandatory API parameters
794+
795+ # UserId of user for whom redemption details needs to be fetched.
796+ user_id = 'ee8___'
797+
798+ # Unique identifier of the redemption of user.
799+ redemption_id = 'r43___'
800+
801+ get_params = {}
802+ get_params[:user_id] = user_id
803+ get_params[:redemption_id] = redemption_id
804+
805+ response = redemptions_service.get(get_params)
806+ ` ` `
807+
808+ * Get User Redemptions List . Pagination is supported by this API .
809+
810+ ` ` ` ruby
811+ # Mandatory API parameters
812+ user_id = 'ee8___'
813+
814+ # Optional API parameters
815+
816+ # Limit.
817+ limit = 10
818+
819+ # Array of user redemption uuids.
820+ redemption_ids = ['a743___', 'a743___']
821+
822+ # Pagination identifier from the previous API call response. Not needed for page one.
823+ pagination_identifier = 'eyJwY___'
824+
825+ get_params = {}
826+ get_params[:user_id] = user_id
827+ get_params[:redemption_ids] = redemption_ids
828+ get_params[:limit] = limit
829+ get_params[:pagination_identifier] = pagination_identifier
830+ response = redemptions_service.get_list(get_params)
831+ ` ` `
0 commit comments