def create_application!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil, company_name: nil, platform: nil, itunes_connect_users: nil)
      puts("The `version` parameter is deprecated. Use `Spaceship::Tunes::Application.ensure_version!` method instead") if version

      # First, we need to fetch the data from Apple, which we then modify with the user's values
      primary_language ||= "English"
      platform ||= "ios"
      r = request(:get, "ra/apps/create/v2/?platformString=#{platform}")
      data = parse_response(r, 'data')

      # Now fill in the values we have
      # some values are nil, that's why there is a hash
      data['name'] = { value: name }
      data['bundleId'] = { value: bundle_id }
      data['primaryLanguage'] = { value: primary_language }
      data['primaryLocaleCode'] = { value: primary_language.to_itc_locale }
      data['vendorId'] = { value: sku }
      data['bundleIdSuffix'] = { value: bundle_id_suffix }
      data['companyName'] = { value: company_name } if company_name
      data['enabledPlatformsForCreation'] = { value: [platform] }

      data['initialPlatform'] = platform
      data['enabledPlatformsForCreation'] = { value: [platform] }

      unless itunes_connect_users.nil?
        data['iTunesConnectUsers']['grantedAllUsers'] = false
        data['iTunesConnectUsers']['grantedUsers'] = data['iTunesConnectUsers']['availableUsers'].select { |user| itunes_connect_users.include?(user['username']) }
      end

      # Now send back the modified hash
      r = request(:post) do |req|
        req.url('ra/apps/create/v2')
        req.body = data.to_json
        req.headers['Content-Type'] = 'application/json'
      end

      data = parse_response(r, 'data')
      handle_itc_response(data)
    end
def create_application!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil, company_name: nil, platform: nil, itunes_connect_users: nil)
      puts("The `version` parameter is deprecated. Use `Spaceship::Tunes::Application.ensure_version!` method instead") if version

      # First, we need to fetch the data from Apple, which we then modify with the user's values
      primary_language ||= "English"
      platform ||= "ios"
      r = request(:get, "ra/apps/create/v2/?platformString=#{platform}")
      data = parse_response(r, 'data')

      # Now fill in the values we have
      # some values are nil, that's why there is a hash
      data['name'] = { value: name }
      data['bundleId'] = { value: bundle_id }
      data['primaryLanguage'] = { value: primary_language }
      data['primaryLocaleCode'] = { value: primary_language.to_itc_locale }
      data['vendorId'] = { value: sku }
      data['bundleIdSuffix'] = { value: bundle_id_suffix }
      data['companyName'] = { value: company_name } if company_name
      data['enabledPlatformsForCreation'] = { value: [platform] }

      data['initialPlatform'] = platform
      data['enabledPlatformsForCreation'] = { value: [platform] }

      unless itunes_connect_users.nil?
        data['iTunesConnectUsers']['grantedAllUsers'] = false
        data['iTunesConnectUsers']['grantedUsers'] = data['iTunesConnectUsers']['availableUsers'].select { |user| itunes_connect_users.include?(user['username']) }
      end

      # Now send back the modified hash
      r = request(:post) do |req|
        req.url('ra/apps/create/v2')
        req.body = data.to_json
        req.headers['Content-Type'] = 'application/json'
      end

      data = parse_response(r, 'data')
      handle_itc_response(data)
    end
Creates a new application on App Store Connect
 @param name (String): The name of your app as it will appear on the App Store.
   This can't be longer than 255 characters.
 @param primary_language (String): If localized app information isn't available in an
   App Store territory, the information from your primary language will be used instead.
 @param version *DEPRECATED: Use `Spaceship::Tunes::Application.ensure_version!` method instead*
   (String): The version number is shown on the App Store and should match the one you used in Xcode.
 @param sku (String): A unique ID for your app that is not visible on the App Store.
 @param bundle_id (String): The bundle ID must match the one you used in Xcode. It
   can't be changed after you submit your first build.