Class: HubSpotSDK::Resources::Crm::Exports
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Crm::Exports
- Defined in:
- lib/hubspot_sdk/resources/crm/exports.rb
Instance Method Summary collapse
-
#create_async(public_export_request:, request_options: {}) ⇒ HubSpotSDK::Models::TaskLocator
Begins exporting CRM data for the portal as specified in the request body.
-
#get(export_id, request_options: {}) ⇒ HubSpotSDK::Models::Crm::PublicExportResponse
Retrieve detailed information about a specific CRM export, including its current state and properties.
-
#get_status(task_id, request_options: {}) ⇒ HubSpotSDK::Models::Crm::ActionResponseWithSingleResultUri
Returns the status of the export with taskId, including the URL of the resulting file if the export status is COMPLETE.
-
#initialize(client:) ⇒ Exports
constructor
private
A new instance of Exports.
Constructor Details
#initialize(client:) ⇒ Exports
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Exports.
71 72 73 |
# File 'lib/hubspot_sdk/resources/crm/exports.rb', line 71 def initialize(client:) @client = client end |
Instance Method Details
#create_async(public_export_request:, request_options: {}) ⇒ HubSpotSDK::Models::TaskLocator
Begins exporting CRM data for the portal as specified in the request body
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/hubspot_sdk/resources/crm/exports.rb', line 17 def create_async(params) parsed, = HubSpotSDK::Crm::ExportCreateAsyncParams.dump_request(params) @client.request( method: :post, path: "crm/exports/2026-03/export/async", body: parsed[:public_export_request], model: HubSpotSDK::TaskLocator, options: ) end |
#get(export_id, request_options: {}) ⇒ HubSpotSDK::Models::Crm::PublicExportResponse
Retrieve detailed information about a specific CRM export, including its current state and properties.
39 40 41 42 43 44 45 46 |
# File 'lib/hubspot_sdk/resources/crm/exports.rb', line 39 def get(export_id, params = {}) @client.request( method: :get, path: ["crm/exports/2026-03/export/%1$s", export_id], model: HubSpotSDK::Crm::PublicExportResponse, options: params[:request_options] ) end |
#get_status(task_id, request_options: {}) ⇒ HubSpotSDK::Models::Crm::ActionResponseWithSingleResultUri
Returns the status of the export with taskId, including the URL of the resulting file if the export status is COMPLETE
59 60 61 62 63 64 65 66 |
# File 'lib/hubspot_sdk/resources/crm/exports.rb', line 59 def get_status(task_id, params = {}) @client.request( method: :get, path: ["crm/exports/2026-03/export/async/tasks/%1$s/status", task_id], model: HubSpotSDK::Crm::ActionResponseWithSingleResultUri, options: params[:request_options] ) end |