Class Offering
java.lang.Object
com.codename1.payment.Offering
A set of packages the application offers a customer together, and optionally the paywall that presents them. Which offering a customer sees is decided by the Codename One Commerce service, so it can be changed, or tested against another, without a new build of the application.
Instances are immutable.
-
Method Summary
Modifier and TypeMethodDescriptionThe first package billed annually, or null.The description given to the offering in the console, or null.getId()The id of the offering.The first lifetime package, or null.The free form metadata attached to the offering in the console.The first package billed monthly, or null.getPackage(String packageId) The package with the given id.The packages of the offering, in the order the service listed them.The paywall document designed for this offering, as parsed JSON.The first package billed weekly, or null.toString()Returns a string representation of the object.
-
Method Details
-
getId
The id of the offering. -
getDescription
The description given to the offering in the console, or null. -
getMetadata
-
getPackages
The packages of the offering, in the order the service listed them.
Returns
a new list, which the caller may change
-
getPaywall
The paywall document designed for this offering, as parsed JSON.
Returns
a new map, which the caller may change, or null when the offering has no paywall
-
getPackage
The package with the given id.
Returns
the package, or null when the offering has none by that id
-
getMonthly
The first package billed monthly, or null. -
getAnnual
The first package billed annually, or null. -
getLifetime
The first lifetime package, or null. -
getWeekly
The first package billed weekly, or null. -
toString
Description copied from class:ObjectReturns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
-