POST | /share/refer-business-link-used | A business referral link was used | Validates the JWT token with the identity of the referring user and the place, and returns relevant information. |
---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class ConsumerApi
{
public static class ReferBusinessLinkUsedRequest implements IPost
{
public String referBusinessToken = null;
public String getReferBusinessToken() { return referBusinessToken; }
public ReferBusinessLinkUsedRequest setReferBusinessToken(String value) { this.referBusinessToken = value; return this; }
}
public static class ReferBusinessLinkUsedResponse
{
public ReferBusinessUser referringUser = null;
public ReferredPlace referredPlace = null;
public ReferBusinessState state = null;
public ReferBusinessUser getReferringUser() { return referringUser; }
public ReferBusinessLinkUsedResponse setReferringUser(ReferBusinessUser value) { this.referringUser = value; return this; }
public ReferredPlace getReferredPlace() { return referredPlace; }
public ReferBusinessLinkUsedResponse setReferredPlace(ReferredPlace value) { this.referredPlace = value; return this; }
public ReferBusinessState getState() { return state; }
public ReferBusinessLinkUsedResponse setState(ReferBusinessState value) { this.state = value; return this; }
}
public static class ReferBusinessUser
{
public String firstName = null;
public String lastName = null;
public String profilePhotoUrl = null;
public String getFirstName() { return firstName; }
public ReferBusinessUser setFirstName(String value) { this.firstName = value; return this; }
public String getLastName() { return lastName; }
public ReferBusinessUser setLastName(String value) { this.lastName = value; return this; }
public String getProfilePhotoUrl() { return profilePhotoUrl; }
public ReferBusinessUser setProfilePhotoUrl(String value) { this.profilePhotoUrl = value; return this; }
}
public static class ReferredPlace
{
public Long id = null;
public UUID guid = null;
public String name = null;
public String logoUrl = null;
public String imageUrl = null;
public Long getId() { return id; }
public ReferredPlace setId(Long value) { this.id = value; return this; }
public UUID getGuid() { return guid; }
public ReferredPlace setGuid(UUID value) { this.guid = value; return this; }
public String getName() { return name; }
public ReferredPlace setName(String value) { this.name = value; return this; }
public String getLogoUrl() { return logoUrl; }
public ReferredPlace setLogoUrl(String value) { this.logoUrl = value; return this; }
public String getImageUrl() { return imageUrl; }
public ReferredPlace setImageUrl(String value) { this.imageUrl = value; return this; }
}
public static enum ReferBusinessState
{
SignInToSee,
Available,
CanNotReferYourself,
AlreadyClaimedByYou,
AlreadyClaimedBySomeoneElse,
Expired;
}
}
Java ReferBusinessLinkUsedRequest 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-business-link-used HTTP/1.1
Host: unstable-consumer-api.brovs.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ReferBusinessLinkUsedRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">
<ReferBusinessToken>String</ReferBusinessToken>
</ReferBusinessLinkUsedRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ReferBusinessLinkUsedResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Api.Dto"> <ReferredPlace> <Guid>00000000-0000-0000-0000-000000000000</Guid> <Id>0</Id> <ImageUrl>String</ImageUrl> <LogoUrl>String</LogoUrl> <Name>String</Name> </ReferredPlace> <ReferringUser> <FirstName>String</FirstName> <LastName>String</LastName> <ProfilePhotoUrl>String</ProfilePhotoUrl> </ReferringUser> <State>SignInToSee</State> </ReferBusinessLinkUsedResponse>