public class Offer extends Resource
Constructor and Description |
---|
Offer()
Initialize an offer object.
|
Offer(org.json.JSONObject jsonObject)
Initialize an offer object from json object.
|
Offer(Offer otherOffer)
Initialize an offer object and copy all properties from the other offer.
|
Offer(String jsonString)
Initialize an offer object from json string.
|
Modifier and Type | Method and Description |
---|---|
org.json.JSONObject |
getContent()
Gets the content object that contains the details of the offer.
|
String |
getOfferResourceId()
Sets the target resource id of a resource to which this offer applies.
|
String |
getOfferType()
Gets the OfferType for the resource offer.
|
String |
getOfferVersion()
Gets the version of the current offer.
|
String |
getResourceLink()
Gets the self-link of a resource to which the resource offer applies.
|
void |
setContent(org.json.JSONObject offerContent)
Sets the offer content that contains the details of the offer.
|
void |
setOfferType(String offerType)
Sets the OfferType for the resource offer.
|
void |
setOfferVersion(String offerVersion)
Sets the offer version.
|
getETag, getId, getResourceId, getSelfLink, getTimestamp, setId, setResourceId
get, getBoolean, getCollection, getCollection, getDouble, getHashMap, getInt, getLogger, getLong, getMapper, getObject, getObject, getObjectByPath, getString, has, remove, set, toJson, toJson, toObject, toString
public Offer()
public Offer(Offer otherOffer)
otherOffer
- the Offer object whose properties to copy over.public Offer(String jsonString)
jsonString
- the json string that represents the offer.public Offer(org.json.JSONObject jsonObject)
jsonObject
- the json object that represents the offer.public String getResourceLink()
public String getOfferResourceId()
public String getOfferType()
public void setOfferType(String offerType)
offerType
- the offer type.public String getOfferVersion()
public void setOfferVersion(String offerVersion)
offerVersion
- the version of the offer.public org.json.JSONObject getContent()
public void setContent(org.json.JSONObject offerContent)
offerContent
- the content object.Copyright © 2018. All rights reserved.