Class: HubSpotSDK::Resources::Marketing::MarketingEvents::Attendance
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Marketing::MarketingEvents::Attendance
- Defined in:
- lib/hubspot_sdk/resources/marketing/marketing_events/attendance.rb
Instance Method Summary collapse
-
#create_by_event_id_and_contact_id(subscriber_state, object_id_:, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Marketing::BatchResponseSubscriberVidResponse
Some parameter documentations has been truncated, see Models::Marketing::MarketingEvents::AttendanceCreateByEventIDAndContactIDParams for more details.
-
#create_by_event_id_and_email(subscriber_state, object_id_:, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Marketing::BatchResponseSubscriberEmailResponse
Some parameter documentations has been truncated, see Models::Marketing::MarketingEvents::AttendanceCreateByEventIDAndEmailParams for more details.
-
#create_by_external_event_id_and_contact_id(subscriber_state, external_event_id:, inputs:, external_account_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Marketing::BatchResponseSubscriberVidResponse
Records the participation of multiple HubSpot contacts in a Marketing Event using their HubSpot contact IDs.
-
#create_by_external_event_id_and_email(subscriber_state, external_event_id:, inputs:, external_account_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Marketing::BatchResponseSubscriberEmailResponse
Records the participation of multiple HubSpot contacts in a Marketing Event using their email addresses.
-
#initialize(client:) ⇒ Attendance
constructor
private
A new instance of Attendance.
Constructor Details
#initialize(client:) ⇒ Attendance
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 Attendance.
221 222 223 |
# File 'lib/hubspot_sdk/resources/marketing/marketing_events/attendance.rb', line 221 def initialize(client:) @client = client end |
Instance Method Details
#create_by_event_id_and_contact_id(subscriber_state, object_id_:, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Marketing::BatchResponseSubscriberVidResponse
Some parameter documentations has been truncated, see Models::Marketing::MarketingEvents::AttendanceCreateByEventIDAndContactIDParams for more details.
Records the participation of multiple HubSpot contacts in a Marketing Event using their HubSpot contact IDs.
Additional Functionality:
-
Adds a timeline event to the contacts.
Allowed Properties: For the state “attend”:
-
joinedAt
-
leftAt
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/hubspot_sdk/resources/marketing/marketing_events/attendance.rb', line 37 def create_by_event_id_and_contact_id(subscriber_state, params) parsed, = HubSpotSDK::Marketing::MarketingEvents::AttendanceCreateByEventIDAndContactIDParams.dump_request(params) object_id_ = parsed.delete(:object_id_) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: [ "marketing/marketing-events/2026-03/%1$s/attendance/%2$s/create", object_id_, subscriber_state ], body: parsed, model: HubSpotSDK::Marketing::BatchResponseSubscriberVidResponse, options: ) end |
#create_by_event_id_and_email(subscriber_state, object_id_:, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Marketing::BatchResponseSubscriberEmailResponse
Some parameter documentations has been truncated, see Models::Marketing::MarketingEvents::AttendanceCreateByEventIDAndEmailParams for more details.
Records the participation of multiple HubSpot contacts in a Marketing Event using their email addresses.
If a contact does not exist, it will be automatically created. The contactProperties field is used exclusively for creating new contacts and will not update properties of existing contacts.
Additional Functionality:
-
Adds a timeline event to the contacts.
Allowed Properties: For the state “attend”:
-
joinedAt
-
leftAt
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/hubspot_sdk/resources/marketing/marketing_events/attendance.rb', line 90 def create_by_event_id_and_email(subscriber_state, params) parsed, = HubSpotSDK::Marketing::MarketingEvents::AttendanceCreateByEventIDAndEmailParams.dump_request(params) object_id_ = parsed.delete(:object_id_) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: [ "marketing/marketing-events/2026-03/%1$s/attendance/%2$s/email-create", object_id_, subscriber_state ], body: parsed, model: HubSpotSDK::Marketing::BatchResponseSubscriberEmailResponse, options: ) end |
#create_by_external_event_id_and_contact_id(subscriber_state, external_event_id:, inputs:, external_account_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Marketing::BatchResponseSubscriberVidResponse
Records the participation of multiple HubSpot contacts in a Marketing Event using their HubSpot contact IDs.
Additional Functionality:
-
Adds a timeline event to the contacts.
Allowed Properties: For the state “attend”:
-
joinedAt
-
leftAt
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/hubspot_sdk/resources/marketing/marketing_events/attendance.rb', line 137 def create_by_external_event_id_and_contact_id(subscriber_state, params) query_params = [:external_account_id] parsed, = HubSpotSDK::Marketing::MarketingEvents::AttendanceCreateByExternalEventIDAndContactIDParams.dump_request( params ) query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params)) external_event_id = parsed.delete(:external_event_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: [ "marketing/marketing-events/2026-03/attendance/%1$s/%2$s/create", external_event_id, subscriber_state ], query: query.transform_keys(external_account_id: "externalAccountId"), body: parsed.except(*query_params), model: HubSpotSDK::Marketing::BatchResponseSubscriberVidResponse, options: ) end |
#create_by_external_event_id_and_email(subscriber_state, external_event_id:, inputs:, external_account_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Marketing::BatchResponseSubscriberEmailResponse
Records the participation of multiple HubSpot contacts in a Marketing Event using their email addresses.
If a contact does not exist, it will be automatically created. The contactProperties field is used exclusively for creating new contacts and will not update properties of existing contacts.
Additional Functionality:
-
Adds a timeline event to the contacts.
Allowed Properties: For the state “attend”:
-
joinedAt
-
leftAt
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/hubspot_sdk/resources/marketing/marketing_events/attendance.rb', line 193 def create_by_external_event_id_and_email(subscriber_state, params) query_params = [:external_account_id] parsed, = HubSpotSDK::Marketing::MarketingEvents::AttendanceCreateByExternalEventIDAndEmailParams.dump_request( params ) query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params)) external_event_id = parsed.delete(:external_event_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: [ "marketing/marketing-events/2026-03/attendance/%1$s/%2$s/email-create", external_event_id, subscriber_state ], query: query.transform_keys(external_account_id: "externalAccountId"), body: parsed.except(*query_params), model: HubSpotSDK::Marketing::BatchResponseSubscriberEmailResponse, options: ) end |