def save # rubocop:disable Metrics/AbcSize
      body = { version: to_hash }

      # providers are saved seperately
      body[:version].delete(:providers)

      begin
        response = Atlas.client.put(url_builder.box_version_url, body: body)
      rescue Atlas::Errors::NotFoundError
        response = Atlas.client.post("#{url_builder.box_url}/versions",
                                     body: body)
      end

      # trigger the same on the providers
      providers.each(&:save) if providers

      update_with_response(response, [:providers])
    end
def save # rubocop:disable Metrics/AbcSize
      body = { version: to_hash }

      # providers are saved seperately
      body[:version].delete(:providers)

      begin
        response = Atlas.client.put(url_builder.box_version_url, body: body)
      rescue Atlas::Errors::NotFoundError
        response = Atlas.client.post("#{url_builder.box_url}/versions",
                                     body: body)
      end

      # trigger the same on the providers
      providers.each(&:save) if providers

      update_with_response(response, [:providers])
    end
Save the version.

 @return [Hash] Atlas response object.