Class: HubSpotSDK::Resources::Crm::Properties::Batch
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Crm::Properties::Batch
- Defined in:
- lib/hubspot_sdk/resources/crm/properties/batch.rb
Instance Method Summary collapse
-
#create(object_type, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseProperty
Create a batch of properties using the same rules as when creating an individual property.
-
#delete(object_type, inputs:, request_options: {}) ⇒ nil
Archive a provided list of properties.
-
#get(object_type, archived:, data_sensitivity:, inputs:, locale: nil, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseProperty
Read a provided list of properties.
-
#initialize(client:) ⇒ Batch
constructor
private
A new instance of Batch.
Constructor Details
#initialize(client:) ⇒ Batch
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 Batch.
91 92 93 |
# File 'lib/hubspot_sdk/resources/crm/properties/batch.rb', line 91 def initialize(client:) @client = client end |
Instance Method Details
#create(object_type, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseProperty
Create a batch of properties using the same rules as when creating an individual property.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/hubspot_sdk/resources/crm/properties/batch.rb', line 20 def create(object_type, params) parsed, = HubSpotSDK::Crm::Properties::BatchCreateParams.dump_request(params) @client.request( method: :post, path: ["crm/properties/2026-03/%1$s/batch/create", object_type], body: parsed, model: HubSpotSDK::Crm::BatchResponseProperty, options: ) end |
#delete(object_type, inputs:, request_options: {}) ⇒ nil
Archive a provided list of properties. This method will return a 204 No Content response on success regardless of the initial state of the property (e.g. active, already archived, non-existent).
44 45 46 47 48 49 50 51 52 53 |
# File 'lib/hubspot_sdk/resources/crm/properties/batch.rb', line 44 def delete(object_type, params) parsed, = HubSpotSDK::Crm::Properties::BatchDeleteParams.dump_request(params) @client.request( method: :post, path: ["crm/properties/2026-03/%1$s/batch/archive", object_type], body: parsed, model: NilClass, options: ) end |
#get(object_type, archived:, data_sensitivity:, inputs:, locale: nil, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseProperty
Read a provided list of properties.
74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/hubspot_sdk/resources/crm/properties/batch.rb', line 74 def get(object_type, params) query_params = [:locale] parsed, = HubSpotSDK::Crm::Properties::BatchGetParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :post, path: ["crm/properties/2026-03/%1$s/batch/read", object_type], query: query, body: parsed.except(*query_params), model: HubSpotSDK::Crm::BatchResponseProperty, options: ) end |