Subscription class

Annotations
  • @JsonSerializable()

Constructors

Subscription({String? id, String? locationId, String? planId, String? customerId, String? startDate, String? canceledDate, String? chargedThroughDate, SubscriptionStatus? status, String? taxPercentage, List<String>? invoiceIds, Money? priceOverrideMoney, int? version, DateTime? createdAt, String? cardId, String? timezone, SubscriptionSource? source, List<SubscriptionAction>? actions})
const
Subscription.fromJson(Map<String, dynamic> json)
Converts a Map<String, dynamic> to a Subscription
factory

Properties

actions List<SubscriptionAction>?
The list of scheduled actions on this subscription. It is set only in the response from RetrieveSubscription with the query parameter of include=actions or from SearchSubscriptions with the input parameter of include:["actions"].
final
canceledDate String?
The YYYY-MM-DD-formatted date (for example, 2013-01-15) to cancel the subscription, when the subscription status changes to CANCELED and the subscription billing stops.
final
cardId String?
The ID of the subscriber's card used to charge for the subscription.
final
chargedThroughDate String?
Read only The YYYY-MM-DD-formatted date up to when the subscriber is invoiced for the subscription.
final
createdAt DateTime?
Read only The timestamp when the subscription was created.
final
customerId String?
Read only The ID of the subscribing customer profile.
final
hashCode int
The hash code for this object.
no setterinherited
id String?
Read only The Square-assigned ID of the subscription.
final
invoiceIds List<String>?
Read only The IDs of the invoices created for the subscription, listed in order when the invoices were created (newest invoices appear first).
final
locationId String?
Read only The ID of the location associated with the subscription.
final
planId String?
Read only The ID of the subscribed-to subscription plan.
final
priceOverrideMoney Money?
A custom price to apply for the subscription. If specified, it overrides the price configured by the subscription plan
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source SubscriptionSource?
The origination details of the subscription.
final
startDate String?
Read only The YYYY-MM-DD-formatted date (for example, 2013-01-15) to start the subscription.
final
status SubscriptionStatus?
Read only The current status of the subscription.
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
taxPercentage String?
The tax amount applied when billing the subscription. The percentage is expressed in decimal form, using a '.' as the decimal separator and without a '%' sign. For example, a value of 7.5 corresponds to 7.5%.
final
timezone String?
Read only Timezone that will be used in date calculations for the subscription. Defaults to the timezone of the location based on location_id. Format: the IANA Timezone Database identifier for the location timezone (for example, America/Los_Angeles).
final
version int?
The version of the object. When updating an object, the version supplied must match the version in the database, otherwise the write will be rejected as conflicting.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts a Subscription to a Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited