Class: HubSpotSDK::Resources::Crm::FeatureFlags::Batch
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Crm::FeatureFlags::Batch
- Defined in:
- lib/hubspot_sdk/resources/crm/feature_flags/batch.rb
Instance Method Summary collapse
-
#delete(flag_name, app_id:, portal_ids:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::PortalFlagStateBatchResponse
Delete an account-level flag state for multiple HubSpot accounts at once.
-
#initialize(client:) ⇒ Batch
constructor
private
A new instance of Batch.
-
#upsert(flag_name, app_id:, portal_states:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::PortalFlagStateBatchResponse
Set the portal flag state for multiple HubSpot accounts at once.
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.
73 74 75 |
# File 'lib/hubspot_sdk/resources/crm/feature_flags/batch.rb', line 73 def initialize(client:) @client = client end |
Instance Method Details
#delete(flag_name, app_id:, portal_ids:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::PortalFlagStateBatchResponse
Delete an account-level flag state for multiple HubSpot accounts at once. Use this endpoint to manage flag exposure for groups of HubSpot accounts.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/hubspot_sdk/resources/crm/feature_flags/batch.rb', line 24 def delete(flag_name, params) parsed, = HubSpotSDK::Crm::FeatureFlags::BatchDeleteParams.dump_request(params) app_id = parsed.delete(:app_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: ["feature-flags/2026-03/%1$s/flags/%2$s/portals/batch/delete", app_id, flag_name], body: parsed, model: HubSpotSDK::Crm::PortalFlagStateBatchResponse, options: ) end |
#upsert(flag_name, app_id:, portal_states:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::PortalFlagStateBatchResponse
Set the portal flag state for multiple HubSpot accounts at once. Use this endpoint to manage flag exposure for groups of HubSpot accounts.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/hubspot_sdk/resources/crm/feature_flags/batch.rb', line 55 def upsert(flag_name, params) parsed, = HubSpotSDK::Crm::FeatureFlags::BatchUpsertParams.dump_request(params) app_id = parsed.delete(:app_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: ["feature-flags/2026-03/%1$s/flags/%2$s/portals/batch/upsert", app_id, flag_name], body: parsed, model: HubSpotSDK::Crm::PortalFlagStateBatchResponse, options: ) end |