Class: HubSpotSDK::Resources::Crm::Extensions::CardsDev
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Crm::Extensions::CardsDev
- Defined in:
- lib/hubspot_sdk/resources/crm/extensions/cards_dev.rb
Instance Method Summary collapse
-
#create(app_id, actions:, display_:, fetch:, title:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::Extensions::PublicCardResponse
Defines a new card that will become active on an account when this app is installed.
-
#delete(card_id, app_id:, request_options: {}) ⇒ nil
Permanently deletes a card definition with the given ID.
-
#get(app_id, request_options: {}) ⇒ HubSpotSDK::Models::Crm::Extensions::PublicCardListResponse
Returns a list of cards for a given app.
-
#get_by_id(card_id, app_id:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::Extensions::PublicCardResponse
Returns the definition for a card with the given ID.
-
#get_sample_response(request_options: {}) ⇒ HubSpotSDK::Models::Crm::Extensions::IntegratorCardPayloadResponse
Returns an example card detail response.
-
#initialize(client:) ⇒ CardsDev
constructor
private
A new instance of CardsDev.
- #migrate_views(app_id, allow_duplicate_app_card_ids:, app_card_id:, legacy_crm_card_id:, helpdesk_app_card_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Crm::Extensions::CardMigrateViewsResponse
-
#update(card_id, app_id:, actions: nil, display_: nil, fetch: nil, title: nil, request_options: {}) ⇒ HubSpotSDK::Models::Crm::Extensions::PublicCardResponse
Some parameter documentations has been truncated, see Models::Crm::Extensions::CardsDevUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ CardsDev
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 CardsDev.
205 206 207 |
# File 'lib/hubspot_sdk/resources/crm/extensions/cards_dev.rb', line 205 def initialize(client:) @client = client end |
Instance Method Details
#create(app_id, actions:, display_:, fetch:, title:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::Extensions::PublicCardResponse
Defines a new card that will become active on an account when this app is installed.
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/hubspot_sdk/resources/crm/extensions/cards_dev.rb', line 28 def create(app_id, params) parsed, = HubSpotSDK::Crm::Extensions::CardsDevCreateParams.dump_request(params) @client.request( method: :post, path: ["crm/extensions/cards-dev/2026-03/%1$s", app_id], body: parsed, model: HubSpotSDK::Crm::Extensions::PublicCardResponse, options: ) end |
#delete(card_id, app_id:, request_options: {}) ⇒ nil
Permanently deletes a card definition with the given ID. Once deleted, data fetch requests for this card will no longer be sent to your service. This can’t be undone.
93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/hubspot_sdk/resources/crm/extensions/cards_dev.rb', line 93 def delete(card_id, params) parsed, = HubSpotSDK::Crm::Extensions::CardsDevDeleteParams.dump_request(params) app_id = parsed.delete(:app_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :delete, path: ["crm/extensions/cards-dev/2026-03/%1$s/%2$s", app_id, card_id], model: NilClass, options: ) end |
#get(app_id, request_options: {}) ⇒ HubSpotSDK::Models::Crm::Extensions::PublicCardListResponse
Returns a list of cards for a given app.
118 119 120 121 122 123 124 125 |
# File 'lib/hubspot_sdk/resources/crm/extensions/cards_dev.rb', line 118 def get(app_id, params = {}) @client.request( method: :get, path: ["crm/extensions/cards-dev/2026-03/%1$s", app_id], model: HubSpotSDK::Crm::Extensions::PublicCardListResponse, options: params[:request_options] ) end |
#get_by_id(card_id, app_id:, request_options: {}) ⇒ HubSpotSDK::Models::Crm::Extensions::PublicCardResponse
Returns the definition for a card with the given ID.
140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/hubspot_sdk/resources/crm/extensions/cards_dev.rb', line 140 def get_by_id(card_id, params) parsed, = HubSpotSDK::Crm::Extensions::CardsDevGetByIDParams.dump_request(params) app_id = parsed.delete(:app_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["crm/extensions/cards-dev/2026-03/%1$s/%2$s", app_id, card_id], model: HubSpotSDK::Crm::Extensions::PublicCardResponse, options: ) end |
#get_sample_response(request_options: {}) ⇒ HubSpotSDK::Models::Crm::Extensions::IntegratorCardPayloadResponse
Returns an example card detail response. This is the payload with displayed details for a card that will be shown to a user. An app should send this in response to the data fetch request.
165 166 167 168 169 170 171 172 |
# File 'lib/hubspot_sdk/resources/crm/extensions/cards_dev.rb', line 165 def get_sample_response(params = {}) @client.request( method: :get, path: "crm/extensions/cards-dev/2026-03/sample-response", model: HubSpotSDK::Crm::Extensions::IntegratorCardPayloadResponse, options: params[:request_options] ) end |
#migrate_views(app_id, allow_duplicate_app_card_ids:, app_card_id:, legacy_crm_card_id:, helpdesk_app_card_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Crm::Extensions::CardMigrateViewsResponse
191 192 193 194 195 196 197 198 199 200 |
# File 'lib/hubspot_sdk/resources/crm/extensions/cards_dev.rb', line 191 def migrate_views(app_id, params) parsed, = HubSpotSDK::Crm::Extensions::CardsDevMigrateViewsParams.dump_request(params) @client.request( method: :post, path: ["crm/extensions/cards-dev/2026-03/%1$s/views/migrate", app_id], body: parsed, model: HubSpotSDK::Crm::Extensions::CardMigrateViewsResponse, options: ) end |
#update(card_id, app_id:, actions: nil, display_: nil, fetch: nil, title: nil, request_options: {}) ⇒ HubSpotSDK::Models::Crm::Extensions::PublicCardResponse
Some parameter documentations has been truncated, see Models::Crm::Extensions::CardsDevUpdateParams for more details.
Update a card definition with new details.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/hubspot_sdk/resources/crm/extensions/cards_dev.rb', line 63 def update(card_id, params) parsed, = HubSpotSDK::Crm::Extensions::CardsDevUpdateParams.dump_request(params) app_id = parsed.delete(:app_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :patch, path: ["crm/extensions/cards-dev/2026-03/%1$s/%2$s", app_id, card_id], body: parsed, model: HubSpotSDK::Crm::Extensions::PublicCardResponse, options: ) end |