public class Subscription extends PaymentsObject
authentication
Modifier | Constructor and Description |
---|---|
protected |
Subscription() |
protected |
Subscription(java.util.Map m) |
protected |
Subscription(PaymentsObject o) |
Modifier and Type | Method and Description |
---|---|
static Subscription |
create(Authentication auth,
java.util.Map map)
Creates an
Subscription object |
static Subscription |
create(java.util.Map map)
Creates an
Subscription object using the static properties PaymentsApi.PUBLIC_KEY and
PaymentsApi.PRIVATE_KEY as the default public and private API keys respectively. |
static Subscription |
create(java.lang.String publicKey,
java.lang.String privateKey,
java.util.Map map)
Deprecated.
As of release 1.1, replaced by
create(Authentication, Map) |
Subscription |
delete()
Deletes an
Subscription object. |
static Subscription |
find(Authentication auth,
java.lang.String id)
Retrieve a
Subscription object. |
static Subscription |
find(java.lang.String id)
Retrieve a
Subscription object using the static properties PaymentsApi.PUBLIC_KEY and
PaymentsApi.PRIVATE_KEY as the default public and private API keys respectively. |
static Subscription |
find(java.lang.String publicKey,
java.lang.String privateKey,
java.lang.String id)
Deprecated.
As of release 1.1, replaced by
find(Authentication, String) |
protected java.lang.String |
getObjectType() |
static ResourceList<Subscription> |
list()
Retrieve
Subscription objects using the static properties PaymentsApi.PUBLIC_KEY and
PaymentsApi.PRIVATE_KEY as the default public and private API keys respectively and the default
criteria (max 20, offset 0, default sorting and no filtering). |
static ResourceList<Subscription> |
list(Authentication auth)
Retrieve
Subscription objects using the default criteria (max 20, offset 0, default sorting and no filtering). |
static ResourceList<Subscription> |
list(Authentication auth,
java.util.Map criteria)
Retrieve
Subscription objects using the specified criteria. |
static ResourceList<Subscription> |
list(java.util.Map criteria)
Retrieve
Subscription objects using the specified criteria and using the static properties
PaymentsApi.PUBLIC_KEY and PaymentsApi.PRIVATE_KEY as the default public and private
API keys respectively. |
static ResourceList<Subscription> |
list(java.lang.String publicKey,
java.lang.String privateKey)
Deprecated.
As of release 1.1, replaced by
list(Authentication) |
static ResourceList<Subscription> |
list(java.lang.String publicKey,
java.lang.String privateKey,
java.util.Map criteria)
Deprecated.
As of release 1.1, replaced by
list(Authentication, Map) |
Subscription |
update()
Updates an
Subscription object. |
createObject, deleteObject, findObject, getAuthentication, listObjects, listObjects, updateObject
containsKey, get, normalize, put, remove, set
clear, containsValue, entrySet, forEach, getOrDefault, keySet, removeEldestEntry, replaceAll, values
clone, compute, computeIfAbsent, computeIfPresent, isEmpty, merge, putAll, putIfAbsent, remove, replace, replace, size
protected Subscription()
protected Subscription(PaymentsObject o)
protected Subscription(java.util.Map m)
protected java.lang.String getObjectType()
getObjectType
in class PaymentsObject
public static Subscription create(java.util.Map map) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
Subscription
object using the static properties PaymentsApi.PUBLIC_KEY
and
PaymentsApi.PRIVATE_KEY
as the default public and private API keys respectively.map
- a map of parameters, valid keys and types:java.lang.Long amount
java.lang.String billingCycle
java.lang.Integer billingCycleLimit
java.lang.String coupon
java.lang.String currency
java.lang.Long currentPeriodEnd
java.lang.Long currentPeriodStart
java.lang.String customer
java.lang.String frequency
java.lang.Integer frequencyPeriod
java.lang.String name
java.lang.String plan
java.lang.Integer quantity
java.lang.Integer renewalReminderLeadDays
java.lang.String source
ApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
@Deprecated public static Subscription create(java.lang.String publicKey, java.lang.String privateKey, java.util.Map map) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
create(Authentication, Map)
Subscription
objectpublicKey
- Public API key. If null, the value of static PaymentsApi.PUBLIC_KEY
will be usedprivateKey
- Private API key. If null, the value of static PaymentsApi.PRIVATE_KEY
will be usedmap
- a map of parameters, valid keys and types:java.lang.Long amount
java.lang.String billingCycle
java.lang.Integer billingCycleLimit
java.lang.String coupon
java.lang.String currency
java.lang.Long currentPeriodEnd
java.lang.Long currentPeriodStart
java.lang.String customer
java.lang.String frequency
java.lang.Integer frequencyPeriod
java.lang.String name
java.lang.String plan
java.lang.Integer quantity
java.lang.Integer renewalReminderLeadDays
java.lang.String source
ApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
public static Subscription create(Authentication auth, java.util.Map map) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
Subscription
objectauth
- Authentication object representing overrides for PaymentsApi.PRIVATE_KEY
and PaymentsApi.PUBLIC_KEY
and/or passing an access token in for operations using OAuth.privateKey
- Private API key. If null, the value of static PaymentsApi.PRIVATE_KEY
will be usedmap
- a map of parameters, valid keys and types: java.lang.Long amount
java.lang.String billingCycle
java.lang.Integer billingCycleLimit
java.lang.String coupon
java.lang.String currency
java.lang.Long currentPeriodEnd
java.lang.Long currentPeriodStart
java.lang.String customer
java.lang.String frequency
java.lang.Integer frequencyPeriod
java.lang.String name
java.lang.String plan
java.lang.Integer quantity
java.lang.Integer renewalReminderLeadDays
java.lang.String source
ApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
public Subscription delete() throws ApiCommunicationException, AuthenticationException, InvalidRequestException, ObjectNotFoundException, NotAllowedException, SystemException
Subscription
object.ApiCommunicationException
AuthenticationException
InvalidRequestException
ObjectNotFoundException
NotAllowedException
SystemException
public static ResourceList<Subscription> list() throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
Subscription
objects using the static properties PaymentsApi.PUBLIC_KEY
and
PaymentsApi.PRIVATE_KEY
as the default public and private API keys respectively and the default
criteria (max 20, offset 0, default sorting and no filtering).ApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
ResourceList
@Deprecated public static ResourceList<Subscription> list(java.lang.String publicKey, java.lang.String privateKey) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
list(Authentication)
Subscription
objects using the default criteria (max 20, offset 0, default sorting and no filtering).publicKey
- Public API key. If null, the value of static PaymentsApi.PUBLIC_KEY
will be usedprivateKey
- Private API key. If null, the value of static PaymentsApi.PRIVATE_KEY
will be usedApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
ResourceList
public static ResourceList<Subscription> list(Authentication auth) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
Subscription
objects using the default criteria (max 20, offset 0, default sorting and no filtering).auth
- Authentication object representing overrides for PaymentsApi.PRIVATE_KEY
and PaymentsApi.PUBLIC_KEY
and/or passing an access token in for operations using OAuth.ApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
ResourceList
public static ResourceList<Subscription> list(java.util.Map criteria) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
Subscription
objects using the specified criteria and using the static properties
PaymentsApi.PUBLIC_KEY
and PaymentsApi.PRIVATE_KEY
as the default public and private
API keys respectively.criteria
- a map of parameters; valid keys and types are:java.util.Map filter
filter.customer | Filter by the Id of the customer with the subscription |
filter.plan | Filter by the Id of the plan linked to the subscription |
filter.dateCreatedMin* | Filter by the minimum created date you are searching for - Date in UTC millis |
filter.dateCreatedMax* | Filter by the maximum created date you are searching for - Date in UTC millis |
filter.q | You can use this to filter by the Id, the name or the amount of the subscription |
java.lang.Integer max
java.lang.Integer offset
java.util.Map sorting
asc
for ascending or desc
for descending). Sortable properties are: dateCreated
id
plan
.ApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
ResourceList
public static ResourceList<Subscription> list(java.lang.String publicKey, java.lang.String privateKey, java.util.Map criteria) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
list(Authentication, Map)
Subscription
objects using the specified criteria.criteria
- a map of parameters; valid keys and types are:java.util.Map filter
filter.customer | Filter by the Id of the customer with the subscription |
filter.plan | Filter by the Id of the plan linked to the subscription |
filter.dateCreatedMin* | Filter by the minimum created date you are searching for - Date in UTC millis |
filter.dateCreatedMax* | Filter by the maximum created date you are searching for - Date in UTC millis |
filter.q | You can use this to filter by the Id, the name or the amount of the subscription |
java.lang.Integer max
java.lang.Integer offset
java.util.Map sorting
asc
for ascending or desc
for descending). Sortable properties are: dateCreated
id
plan
.publicKey
- Public API key. If null, the value of static PaymentsApi.PUBLIC_KEY
will be usedprivateKey
- Private API key. If null, the value of static PaymentsApi.PRIVATE_KEY
will be usedApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
ResourceList
public static ResourceList<Subscription> list(Authentication auth, java.util.Map criteria) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
Subscription
objects using the specified criteria.auth
- Authentication object representing overrides for PaymentsApi.PRIVATE_KEY
and PaymentsApi.PUBLIC_KEY
and/or passing an access token in for operations using OAuth.criteria
- a map of parameters; valid keys and types are: java.util.Map filter
filter.customer | Filter by the Id of the customer with the subscription |
filter.plan | Filter by the Id of the plan linked to the subscription |
filter.dateCreatedMin* | Filter by the minimum created date you are searching for - Date in UTC millis |
filter.dateCreatedMax* | Filter by the maximum created date you are searching for - Date in UTC millis |
filter.q | You can use this to filter by the Id, the name or the amount of the subscription |
java.lang.Integer max
java.lang.Integer offset
java.util.Map sorting
asc
for ascending or desc
for descending). Sortable properties are: dateCreated
id
plan
.ApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
ResourceList
public static Subscription find(java.lang.String id) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, ObjectNotFoundException, NotAllowedException, SystemException
Subscription
object using the static properties PaymentsApi.PUBLIC_KEY
and
PaymentsApi.PRIVATE_KEY
as the default public and private API keys respectively.id
- the id of the Subscription object to retrieveApiCommunicationException
AuthenticationException
InvalidRequestException
ObjectNotFoundException
NotAllowedException
SystemException
@Deprecated public static Subscription find(java.lang.String publicKey, java.lang.String privateKey, java.lang.String id) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, ObjectNotFoundException, NotAllowedException, SystemException
find(Authentication, String)
Subscription
object.publicKey
- Public API key. If null, the value of static PaymentsApi.PUBLIC_KEY
will be usedprivateKey
- Private API key. If null, the value of static PaymentsApi.PRIVATE_KEY
will be usedid
- the id of the Subscription
object to retrieveApiCommunicationException
AuthenticationException
InvalidRequestException
ObjectNotFoundException
NotAllowedException
SystemException
public static Subscription find(Authentication auth, java.lang.String id) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, ObjectNotFoundException, NotAllowedException, SystemException
Subscription
object.auth
- Authentication object representing overrides for PaymentsApi.PRIVATE_KEY
and PaymentsApi.PUBLIC_KEY
and/or passing an access token in for operations using OAuth.id
- the id of the Subscription
object to retrieveApiCommunicationException
AuthenticationException
InvalidRequestException
ObjectNotFoundException
NotAllowedException
SystemException
public Subscription update() throws ApiCommunicationException, AuthenticationException, InvalidRequestException, ObjectNotFoundException, NotAllowedException, SystemException
Subscription
object.
The properties that can be updated:
ApiCommunicationException
AuthenticationException
InvalidRequestException
ObjectNotFoundException
NotAllowedException
SystemException