Interface RewardsService
-
- All Implemented Interfaces:
public interface RewardsServiceCampaign reward (
CampaignReward) configuration operations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceRewardsService.WithRawResponseA view of RewardsService that provides access to raw HTTP responses for each method.
-
Method Summary
Modifier and Type Method Description abstract RewardsService.WithRawResponsewithRawResponse()Returns a view of this service that provides access to raw HTTP responses for each method. abstract RewardsServicewithOptions(Consumer<ClientOptions.Builder> modifier)Returns a view of this service with the given option modifications applied. Rewardcreate(String id, RewardCreateParams params)Creates a new campaign reward ( CampaignReward) with a GrowSurf-assigned ID.Rewardcreate(String id, RewardCreateParams params, RequestOptions requestOptions)Rewardcreate(RewardCreateParams params)abstract Rewardcreate(RewardCreateParams params, RequestOptions requestOptions)Rewardupdate(String campaignRewardId, RewardUpdateParams params)Updates an existing campaign reward ( CampaignReward).Rewardupdate(String campaignRewardId, RewardUpdateParams params, RequestOptions requestOptions)Rewardupdate(RewardUpdateParams params)abstract Rewardupdate(RewardUpdateParams params, RequestOptions requestOptions)CampaignRewardListResponselist(String id)Retrieves the list of a program's configured rewards ( CampaignRewards) — the same set embedded in therewardsarray of the campaign response.CampaignRewardListResponselist(String id, RewardListParams params, RequestOptions requestOptions)CampaignRewardListResponselist(String id, RewardListParams params)abstract CampaignRewardListResponselist(RewardListParams params, RequestOptions requestOptions)CampaignRewardListResponselist(RewardListParams params)CampaignRewardListResponselist(String id, RequestOptions requestOptions)DeleteRewardResponsedelete(String campaignRewardId, RewardDeleteParams params)Deletes a campaign reward ( CampaignReward).DeleteRewardResponsedelete(String campaignRewardId, RewardDeleteParams params, RequestOptions requestOptions)DeleteRewardResponsedelete(RewardDeleteParams params)abstract DeleteRewardResponsedelete(RewardDeleteParams params, RequestOptions requestOptions)-
-
Method Detail
-
withRawResponse
abstract RewardsService.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
withOptions
abstract RewardsService withOptions(Consumer<ClientOptions.Builder> modifier)
Returns a view of this service with the given option modifications applied.
The original service is not modified.
-
create
Reward create(String id, RewardCreateParams params)
Creates a new campaign reward (
CampaignReward) with a GrowSurf-assigned ID. The reward type must be compatible with the program type (affiliate programs support onlyAFFILIATErewards; referral programs support all other types). Enabling an active reward of a type automatically enables that reward type on the program.
-
create
Reward create(String id, RewardCreateParams params, RequestOptions requestOptions)
-
create
Reward create(RewardCreateParams params)
-
create
abstract Reward create(RewardCreateParams params, RequestOptions requestOptions)
-
update
Reward update(String campaignRewardId, RewardUpdateParams params)
Updates an existing campaign reward (
CampaignReward). The rewardtypeis immutable and cannot be changed. When the update replacesmetadata, renamed keys automatically rewrite any{{campaignReward[…]}}references in campaign copy; removing a key that campaign copy still references returns a409listing the referencing fields.
-
update
Reward update(String campaignRewardId, RewardUpdateParams params, RequestOptions requestOptions)
-
update
Reward update(RewardUpdateParams params)
-
update
abstract Reward update(RewardUpdateParams params, RequestOptions requestOptions)
-
list
CampaignRewardListResponse list(String id)
Retrieves the list of a program's configured rewards (
CampaignRewards) — the same set embedded in therewardsarray of the campaign response. Delete a reward withDELETE /campaign/{id}/reward-configs/{campaignRewardId}.
-
list
CampaignRewardListResponse list(String id, RewardListParams params, RequestOptions requestOptions)
-
list
CampaignRewardListResponse list(String id, RewardListParams params)
-
list
abstract CampaignRewardListResponse list(RewardListParams params, RequestOptions requestOptions)
-
list
CampaignRewardListResponse list(RewardListParams params)
-
list
CampaignRewardListResponse list(String id, RequestOptions requestOptions)
-
delete
DeleteRewardResponse delete(String campaignRewardId, RewardDeleteParams params)
Deletes a campaign reward (
CampaignReward). The reward is deactivated, removed from the program's reward set, and any connected upfront-discount coupons are cleaned up. If campaign copy still references any of the reward's metadata keys via{{campaignReward[…]}}tokens, the delete returns a409listing the referencing fields — update those fields first.
-
delete
DeleteRewardResponse delete(String campaignRewardId, RewardDeleteParams params, RequestOptions requestOptions)
-
delete
DeleteRewardResponse delete(RewardDeleteParams params)
-
delete
abstract DeleteRewardResponse delete(RewardDeleteParams params, RequestOptions requestOptions)
-
-
-
-