postVersion method

Future<AppStoreVersion> postVersion({
  1. required AppStoreVersionAttributes attributes,
})

Implementation

Future<AppStoreVersion> postVersion({
  required AppStoreVersionAttributes attributes,
}) async {
  final response = await _client.post(
    'appStoreVersions',
    {
      'type': 'appStoreVersions',
      'attributes': attributes.toMap()..removeWhere((_, value) => value == null),
      'relationships': {
        'app': {
          'data': {
            'type': 'apps',
            'id': _appId,
          }
        }
      }
    },
  );
  return response.as<AppStoreVersion>();
}