StripePayModel.fromJson constructor

StripePayModel.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory StripePayModel.fromJson(Map<String, dynamic> json) {
  return StripePayModel(
    object: json['object'],
    amount: json['amount'],
    amountCapturable: json['amount_capturable'],
    amountReceived: json['amount_received'],
    application: json['application'],
    applicationFeeAmount: json['application_fee_amount'],
    canceledAt: json['canceled_at'],
    cancellationReason: json['cancellation_reason'],
    captureMethod: json['capture_method'],
    charges: json['charges'] != null ? Charges.fromJson(json['charges']) : null,
    clientSecret: json['client_secret'],
    confirmationMethod: json['confirmation_method'],
    created: json['created'],
    currency: json['currency'],
    customer: json['customer'],
    description: json['description'],
    id: json['id'],
    invoice: json['invoice'],
    lastPaymentError: json['last_payment_error'],
    livemode: json['livemode'],
    nextAction: json['next_action'],
    onBehalfOf: json['on_behalf_of'],
    paymentMethod: json['payment_method'],
    paymentMethodOptions: json['payment_method_options'] != null ? PaymentMethodOptions.fromJson(json['payment_method_options']) : null,
    paymentMethodTypes: json['payment_method_types'] != null ? List<String>.from(json['payment_method_types']) : null,
    receiptEmail: json['receipt_email'],
    review: json['review'],
    setupFutureUsage: json['setup_future_usage'],
    shipping: json['shipping'],
    source: json['source'],
    statementDescriptor: json['statement_descriptor'],
    statementDescriptorSuffix: json['statement_descriptor_suffix'],
    status: json['status'],
    transferData: json['transfer_data'],
    transferGroup: json['transfer_group'],
  );
}