Subscription.fromMap constructor

Subscription.fromMap(
  1. Map map
)

Mapping from map to Subscription.

Implementation

factory Subscription.fromMap(Map map) {
  return Subscription(
    id: map['id'] as int,
    subscriptionId: map['subscription_id'] as String,
    amount: map['amount'] as int,
    currency: map['currency'] as String,
    state: map['state'] as String,
    description: map['description'] as String,
    callbackUrl: map['callback_url'] as String?,
    variables: map['variables'] as HashMap<String, dynamic>?,
    createdAt: map['created_at'] as String,
    updatedAt: map['updated_at'] as String,
  );
}