createPaymentMethod method

  1. @Deprecated("Use PaymongoClient instead")
Future<PaymentMethodResponse> createPaymentMethod({
  1. required PaymentMethodAttributes data,
})

Implementation

@Deprecated("Use PaymongoClient instead")

///
Future<PaymentMethodResponse> createPaymentMethod({
  required PaymentMethodAttributes data,
}) async {
  final options = PayMongoOptions(
    path: '/payment_methods',
    data: {"attributes": data.toMap()},
  );

  final response = await post<Map<String, dynamic>>(options);
  final result = PaymentMethodResponse.fromMap(response);
  return result;
}