GiftCard class

Annotations
  • @JsonSerializable()

Constructors

GiftCard({required GiftCardType type, String? id, GiftCardGANSource? ganSource, GiftCardStatus? state, Money? balanceMoney, String? gan, DateTime? createdAt, List<String>? customerIds})
const
GiftCard.fromJson(Map<String, dynamic> json)
Converts a Map<String, dynamic> to a GiftCard
factory

Properties

balanceMoney Money?
Read only The current gift card balance. This balance is always greater than or equal to zero.
final
createdAt DateTime?
Read only The timestamp when the gift card was created, in RFC 3339 format. In the case of a digital gift card, it is the time when you create a card (using the Square Point of Sale application, Seller Dashboard, or Gift Cards API).
final
customerIds List<String>?
Read only The IDs of the customer profiles to whom this gift card is linked.
final
gan String?
The gift card account number (GAN). Buyers can use the GAN to make purchases or check the gift card balance.
final
ganSource GiftCardGANSource?
The source that generated the gift card account number (GAN). The default value is SQUARE.
final
hashCode int
The hash code for this object.
no setterinherited
id String?
Read only The Square-assigned ID of the gift card.
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
state GiftCardStatus?
Read only The current gift card state.
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
type GiftCardType
The gift card type.
final

Methods

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

Operators

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