create method

Create data R along with P

Implementation

@override
Future<PaymentMethodResponse> create(
  PaymentMethodAttributes attributes,
) async {
  final options = PayMongoOptions(
    path: '/payment_methods',
    data: {
      "attributes": attributes.toMap(),
    },
  );
  final response = await _httpClient.post(options);
  final json = serialize<Map<String, dynamic>>(response, options.path);
  return PaymentMethodResponse.fromMap(json);
}