toJson method

  1. @override
Map<String, dynamic> toJson()
override

Converts an object to JSON.

Implementation

@override
Map<String, dynamic> toJson() {
  final returnValue = <String, dynamic>{
    '\$hash': '2e6eab1a',
    '\$name': 'StarsSubscription',
    'flags': flags,
    'canceled': canceled,
    'canRefulfill': canRefulfill,
    'missingBalance': missingBalance,
    'botCanceled': botCanceled,
    'id': id,
    'peer': peer,
    'untilDate': untilDate.toIso8601String(),
    'pricing': pricing,
    'chatInviteHash': chatInviteHash,
    'title': title,
    'photo': photo,
    'invoiceSlug': invoiceSlug,
  };

  // Finished toJson.
  return returnValue;
}