Class: HubSpotSDK::Resources::Crm::Objects::Carts::Batch
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Crm::Objects::Carts::Batch
- Defined in:
- lib/hubspot_sdk/resources/crm/objects/carts/batch.rb
Instance Method Summary collapse
-
#create(inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseSimplePublicObject
Create a batch of carts with specified properties and associations.
-
#delete(inputs:, request_options: {}) ⇒ nil
Archive a batch of carts identified by their IDs.
-
#get(inputs:, properties:, properties_with_history:, archived: nil, id_property: nil, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseSimplePublicObject
Some parameter documentations has been truncated, see Models::Crm::Objects::Carts::BatchGetParams for more details.
-
#initialize(client:) ⇒ Batch
constructor
private
A new instance of Batch.
-
#update(inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseSimplePublicObject
Update a batch of carts using their internal IDs or unique property values.
-
#upsert(inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseSimplePublicUpsertObject
Create or update records identified by a unique property value as specified by the ‘idProperty` query parameter.
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.
134 135 136 |
# File 'lib/hubspot_sdk/resources/crm/objects/carts/batch.rb', line 134 def initialize(client:) @client = client end |
Instance Method Details
#create(inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseSimplePublicObject
Create a batch of carts with specified properties and associations.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/hubspot_sdk/resources/crm/objects/carts/batch.rb', line 19 def create(params) parsed, = HubSpotSDK::Crm::Objects::Carts::BatchCreateParams.dump_request(params) @client.request( method: :post, path: "crm/objects/2026-03/carts/batch/create", body: parsed, model: HubSpotSDK::Crm::BatchResponseSimplePublicObject, options: ) end |
#delete(inputs:, request_options: {}) ⇒ nil
Archive a batch of carts identified by their IDs.
61 62 63 64 65 66 67 68 69 70 |
# File 'lib/hubspot_sdk/resources/crm/objects/carts/batch.rb', line 61 def delete(params) parsed, = HubSpotSDK::Crm::Objects::Carts::BatchDeleteParams.dump_request(params) @client.request( method: :post, path: "crm/objects/2026-03/carts/batch/archive", body: parsed, model: NilClass, options: ) end |
#get(inputs:, properties:, properties_with_history:, archived: nil, id_property: nil, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseSimplePublicObject
Some parameter documentations has been truncated, see Models::Crm::Objects::Carts::BatchGetParams for more details.
Retrieve carts by ID, or include the ‘idProperty` parameter to retrieve carts by a custom unique value property.
95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/hubspot_sdk/resources/crm/objects/carts/batch.rb', line 95 def get(params) query_params = [:archived] parsed, = HubSpotSDK::Crm::Objects::Carts::BatchGetParams.dump_request(params) query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :post, path: "crm/objects/2026-03/carts/batch/read", query: query, body: parsed.except(*query_params), model: HubSpotSDK::Crm::BatchResponseSimplePublicObject, options: ) end |
#update(inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseSimplePublicObject
Update a batch of carts using their internal IDs or unique property values.
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/hubspot_sdk/resources/crm/objects/carts/batch.rb', line 40 def update(params) parsed, = HubSpotSDK::Crm::Objects::Carts::BatchUpdateParams.dump_request(params) @client.request( method: :post, path: "crm/objects/2026-03/carts/batch/update", body: parsed, model: HubSpotSDK::Crm::BatchResponseSimplePublicObject, options: ) end |
#upsert(inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::BatchResponseSimplePublicUpsertObject
Create or update records identified by a unique property value as specified by the ‘idProperty` query parameter.
120 121 122 123 124 125 126 127 128 129 |
# File 'lib/hubspot_sdk/resources/crm/objects/carts/batch.rb', line 120 def upsert(params) parsed, = HubSpotSDK::Crm::Objects::Carts::BatchUpsertParams.dump_request(params) @client.request( method: :post, path: "crm/objects/2026-03/carts/batch/upsert", body: parsed, model: HubSpotSDK::Crm::BatchResponseSimplePublicUpsertObject, options: ) end |