attach method

Attach payment

Implementation

@override
Future<PaymentIntentAttachResponse> attach(
  String id,
  PaymentIntentAttach attributes,
) async {
  final options = PayMongoOptions(
    path: '/payment_intents/$id/attach',
    data: {
      'attributes': attributes.toMap(),
    },
  );

  final response = await _http.post(
    options,
  );
  final json = serialize<Map<String, dynamic>>(response, options.path);

  return PaymentIntentAttachResponse.fromMap(json);
}