Skip to content

Checking the status of file import does not work #272

@aki-dai

Description

@aki-dai

I uploaded a file for an email attachment and called check_import method to get its file ID.
However, although it seems that I am able to get a response, an error occurs during subsequent deserialization.

client = Hubspot::Client.new(access_token: access_token)
response = client.files.files.files_api.import_from_url(import_from_url_input: {
  url: url,
  folderPath: '/email-attachments',
  access: 'PRIVATE'
})
task_id = response.id

# NoMethodError: undefined method `build_from_hash' for File:Class
# from .rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/hubspot-api-client-17.0.0/lib/hubspot/codegen/files/files/models/file_action_response.rb:309:in `_deserialize'
status = client.files.files.files_api.check_import(task_id: task_id)

When I debugged the gem code, I found that it worked fine by modifying the following code in Hubspot::Files::Files::FileActionResponse.openapi_types.

- :'result' => :'File'
+ :'result' => :'Object'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions