Package com.stripe.model.billing
Class Alert
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.billing.Alert
- All Implemented Interfaces:
HasId
,StripeActiveObject
,StripeObjectInterface
A billing alert is a resource that notifies you when a certain usage threshold on a meter is
crossed. For example, you might create a billing alert to notify you when a certain user made 100
API requests.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
The usage threshold alert configuration enables setting up alerts for when a certain usage threshold on a specific meter is crossed.Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod
-
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSON
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactivate()
Reactivates this alert, allowing it to trigger again.activate
(RequestOptions options) Reactivates this alert, allowing it to trigger again.activate
(AlertActivateParams params) Reactivates this alert, allowing it to trigger again.activate
(AlertActivateParams params, RequestOptions options) Reactivates this alert, allowing it to trigger again.Reactivates this alert, allowing it to trigger again.activate
(Map<String, Object> params, RequestOptions options) Reactivates this alert, allowing it to trigger again.archive()
Archives this alert, removing it from the list view and APIs.archive
(RequestOptions options) Archives this alert, removing it from the list view and APIs.archive
(AlertArchiveParams params) Archives this alert, removing it from the list view and APIs.archive
(AlertArchiveParams params, RequestOptions options) Archives this alert, removing it from the list view and APIs.Archives this alert, removing it from the list view and APIs.archive
(Map<String, Object> params, RequestOptions options) Archives this alert, removing it from the list view and APIs.protected boolean
static Alert
create
(AlertCreateParams params) Creates a billing alert.static Alert
create
(AlertCreateParams params, RequestOptions options) Creates a billing alert.static Alert
Creates a billing alert.static Alert
create
(Map<String, Object> params, RequestOptions options) Creates a billing alert.Deactivates this alert, preventing it from triggering.deactivate
(RequestOptions options) Deactivates this alert, preventing it from triggering.deactivate
(AlertDeactivateParams params) Deactivates this alert, preventing it from triggering.deactivate
(AlertDeactivateParams params, RequestOptions options) Deactivates this alert, preventing it from triggering.deactivate
(Map<String, Object> params) Deactivates this alert, preventing it from triggering.deactivate
(Map<String, Object> params, RequestOptions options) Deactivates this alert, preventing it from triggering.boolean
Defines the type of the alert.Limits the scope of the alert to a specific customer.getId()
Unique identifier for the object.Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.String representing the object's type.Status of the alert.getTitle()
Title of the alert.Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.int
hashCode()
static AlertCollection
list
(AlertListParams params) Lists billing active and inactive alerts.static AlertCollection
list
(AlertListParams params, RequestOptions options) Lists billing active and inactive alerts.static AlertCollection
Lists billing active and inactive alerts.static AlertCollection
list
(Map<String, Object> params, RequestOptions options) Lists billing active and inactive alerts.static Alert
Retrieves a billing alert given an ID.static Alert
retrieve
(String id, RequestOptions options) Retrieves a billing alert given an ID.static Alert
retrieve
(String id, AlertRetrieveParams params, RequestOptions options) Retrieves a billing alert given an ID.static Alert
Retrieves a billing alert given an ID.void
setAlertType
(String alertType) Defines the type of the alert.void
setFilter
(Alert.Filter filter) Limits the scope of the alert to a specific customer.void
Unique identifier for the object.void
setLivemode
(Boolean livemode) Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
String representing the object's type.void
setResponseGetter
(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.void
Status of the alert.void
Title of the alert.void
setUsageThresholdConfig
(Alert.UsageThresholdConfig usageThresholdConfig) Encapsulates configuration of the alert to monitor usage on a specific Billing Meter.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setStripeResponseGetter, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
Alert
public Alert()
-
-
Method Details
-
activate
Reactivates this alert, allowing it to trigger again.- Throws:
StripeException
-
activate
Reactivates this alert, allowing it to trigger again.- Throws:
StripeException
-
activate
Reactivates this alert, allowing it to trigger again.- Throws:
StripeException
-
activate
Reactivates this alert, allowing it to trigger again.- Throws:
StripeException
-
activate
Reactivates this alert, allowing it to trigger again.- Throws:
StripeException
-
activate
Reactivates this alert, allowing it to trigger again.- Throws:
StripeException
-
archive
Archives this alert, removing it from the list view and APIs. This is non-reversible.- Throws:
StripeException
-
archive
Archives this alert, removing it from the list view and APIs. This is non-reversible.- Throws:
StripeException
-
archive
Archives this alert, removing it from the list view and APIs. This is non-reversible.- Throws:
StripeException
-
archive
Archives this alert, removing it from the list view and APIs. This is non-reversible.- Throws:
StripeException
-
archive
Archives this alert, removing it from the list view and APIs. This is non-reversible.- Throws:
StripeException
-
archive
Archives this alert, removing it from the list view and APIs. This is non-reversible.- Throws:
StripeException
-
create
Creates a billing alert.- Throws:
StripeException
-
create
public static Alert create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a billing alert.- Throws:
StripeException
-
create
Creates a billing alert.- Throws:
StripeException
-
create
Creates a billing alert.- Throws:
StripeException
-
deactivate
Deactivates this alert, preventing it from triggering.- Throws:
StripeException
-
deactivate
Deactivates this alert, preventing it from triggering.- Throws:
StripeException
-
deactivate
Deactivates this alert, preventing it from triggering.- Throws:
StripeException
-
deactivate
Deactivates this alert, preventing it from triggering.- Throws:
StripeException
-
deactivate
Deactivates this alert, preventing it from triggering.- Throws:
StripeException
-
deactivate
public Alert deactivate(AlertDeactivateParams params, RequestOptions options) throws StripeException Deactivates this alert, preventing it from triggering.- Throws:
StripeException
-
list
Lists billing active and inactive alerts.- Throws:
StripeException
-
list
public static AlertCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionLists billing active and inactive alerts.- Throws:
StripeException
-
list
Lists billing active and inactive alerts.- Throws:
StripeException
-
list
public static AlertCollection list(AlertListParams params, RequestOptions options) throws StripeException Lists billing active and inactive alerts.- Throws:
StripeException
-
retrieve
Retrieves a billing alert given an ID.- Throws:
StripeException
-
retrieve
Retrieves a billing alert given an ID.- Throws:
StripeException
-
retrieve
public static Alert retrieve(String id, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves a billing alert given an ID.- Throws:
StripeException
-
retrieve
public static Alert retrieve(String id, AlertRetrieveParams params, RequestOptions options) throws StripeException Retrieves a billing alert given an ID.- Throws:
StripeException
-
setResponseGetter
Description copied from interface:StripeActiveObject
Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.- Specified by:
setResponseGetter
in interfaceStripeActiveObject
- Overrides:
setResponseGetter
in classApiResource
- Parameters:
responseGetter
- theStripeResponseGetter
instance to use for making further requests.
-
getAlertType
Defines the type of the alert.Equal to
usage_threshold
. -
getFilter
Limits the scope of the alert to a specific customer. -
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
billing.alert
. -
getStatus
Status of the alert. This can be active, inactive or archived.One of
active
,archived
, orinactive
. -
getTitle
Title of the alert. -
getUsageThresholdConfig
Encapsulates configuration of the alert to monitor usage on a specific Billing Meter. -
setAlertType
Defines the type of the alert.Equal to
usage_threshold
. -
setFilter
Limits the scope of the alert to a specific customer. -
setId
Unique identifier for the object. -
setLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
billing.alert
. -
setStatus
Status of the alert. This can be active, inactive or archived.One of
active
,archived
, orinactive
. -
setTitle
Title of the alert. -
setUsageThresholdConfig
Encapsulates configuration of the alert to monitor usage on a specific Billing Meter. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object.
-