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, 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.
194 195 196 |
# File 'lib/hubspot_sdk/resources/crm/extensions/cards_dev.rb', line 194 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.
91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/hubspot_sdk/resources/crm/extensions/cards_dev.rb', line 91 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.
115 116 117 118 119 120 121 122 |
# File 'lib/hubspot_sdk/resources/crm/extensions/cards_dev.rb', line 115 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.
135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/hubspot_sdk/resources/crm/extensions/cards_dev.rb', line 135 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.
160 161 162 163 164 165 166 167 |
# File 'lib/hubspot_sdk/resources/crm/extensions/cards_dev.rb', line 160 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, app_card_id:, legacy_crm_card_id:, helpdesk_app_card_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Crm::Extensions::CardMigrateViewsResponse
180 181 182 183 184 185 186 187 188 189 |
# File 'lib/hubspot_sdk/resources/crm/extensions/cards_dev.rb', line 180 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 |