POST | /share/refer-friend-link-used | A friend referral link was used | Validates the JWT token with the identity of the referring user and returns relevant information. |
---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class ConsumerApi
{
public static class ReferFriendLinkUsedRequest implements IPost
{
public String referFriendToken = null;
public String getReferFriendToken() { return referFriendToken; }
public ReferFriendLinkUsedRequest setReferFriendToken(String value) { this.referFriendToken = value; return this; }
}
public static class ReferFriendLinkUsedResponse
{
public ReferFriendUser referringUser = null;
public ReferFriendState state = null;
public ReferFriendUser getReferringUser() { return referringUser; }
public ReferFriendLinkUsedResponse setReferringUser(ReferFriendUser value) { this.referringUser = value; return this; }
public ReferFriendState getState() { return state; }
public ReferFriendLinkUsedResponse setState(ReferFriendState value) { this.state = value; return this; }
}
public static class ReferFriendUser
{
public String firstName = null;
public String lastName = null;
public String profilePhotoUrl = null;
public String getFirstName() { return firstName; }
public ReferFriendUser setFirstName(String value) { this.firstName = value; return this; }
public String getLastName() { return lastName; }
public ReferFriendUser setLastName(String value) { this.lastName = value; return this; }
public String getProfilePhotoUrl() { return profilePhotoUrl; }
public ReferFriendUser setProfilePhotoUrl(String value) { this.profilePhotoUrl = value; return this; }
}
public static enum ReferFriendState
{
Available,
Awarded,
CanNotReferYourself,
YouWereAlreadySignedUp,
Expired;
}
}
Java ReferFriendLinkUsedRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /share/refer-friend-link-used HTTP/1.1
Host: unstable-consumer-api.brovs.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ReferFriendLinkUsedRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">
<ReferFriendToken>String</ReferFriendToken>
</ReferFriendLinkUsedRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ReferFriendLinkUsedResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Api.Dto"> <ReferringUser> <FirstName>String</FirstName> <LastName>String</LastName> <ProfilePhotoUrl>String</ProfilePhotoUrl> </ReferringUser> <State>Available</State> </ReferFriendLinkUsedResponse>