create method

  1. @override
Future<SourceResult> create(
  1. SourceAttributes attributes
)
override

Create data R along with P

Implementation

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