repull 0.2.57 → 0.2.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/connect_api.rb +137 -6
  3. data/lib/repull/models/account_calendar_access_changed_event.rb +11 -1
  4. data/lib/repull/models/account_created_event.rb +11 -1
  5. data/lib/repull/models/account_disconnected_event.rb +11 -1
  6. data/lib/repull/models/account_import_completed_event.rb +11 -1
  7. data/lib/repull/models/account_import_failed_event.rb +11 -1
  8. data/lib/repull/models/account_import_started_event.rb +11 -1
  9. data/lib/repull/models/account_notifications_missing_event.rb +11 -1
  10. data/lib/repull/models/account_units_added_event.rb +11 -1
  11. data/lib/repull/models/ai_operation_completed_event.rb +11 -1
  12. data/lib/repull/models/ai_operation_failed_event.rb +11 -1
  13. data/lib/repull/models/app_connection_health.rb +301 -0
  14. data/lib/repull/models/app_connection_health_recent_errors_inner.rb +184 -0
  15. data/lib/repull/models/app_connection_health_writes_per_day_inner.rb +156 -0
  16. data/lib/repull/models/booking_unacknowledged_event.rb +11 -1
  17. data/lib/repull/models/channel_degraded_event.rb +11 -1
  18. data/lib/repull/models/channel_sync_failed_event.rb +11 -1
  19. data/lib/repull/models/connect_provider.rb +2 -2
  20. data/lib/repull/models/connect_session_abandoned_event.rb +11 -1
  21. data/lib/repull/models/connect_session_completed_event.rb +11 -1
  22. data/lib/repull/models/connect_status.rb +1 -1
  23. data/lib/repull/models/connection.rb +81 -5
  24. data/lib/repull/models/conversation_message_status_changed_event.rb +11 -1
  25. data/lib/repull/models/create_connection_request.rb +10 -1
  26. data/lib/repull/models/create_connection_request_workspace.rb +203 -0
  27. data/lib/repull/models/create_price_labs_key201_response.rb +399 -0
  28. data/lib/repull/models/create_price_labs_key201_response_all_of_instructions.rb +159 -0
  29. data/lib/repull/models/create_price_labs_key_request.rb +207 -0
  30. data/lib/repull/models/get_price_labs_session_status200_response.rb +192 -0
  31. data/lib/repull/models/inquiry_created_event.rb +11 -1
  32. data/lib/repull/models/inquiry_updated_event.rb +11 -1
  33. data/lib/repull/models/listing_created_event.rb +11 -1
  34. data/lib/repull/models/listing_deleted_event.rb +11 -1
  35. data/lib/repull/models/listing_ical_feed_changed_event.rb +11 -1
  36. data/lib/repull/models/listing_reactivated_event.rb +11 -1
  37. data/lib/repull/models/listing_suspended_event.rb +11 -1
  38. data/lib/repull/models/listing_updated_event.rb +11 -1
  39. data/lib/repull/models/migration_completed_event.rb +1 -1
  40. data/lib/repull/models/migration_failed_event.rb +1 -1
  41. data/lib/repull/models/payment_completed_event.rb +11 -1
  42. data/lib/repull/models/payment_refunded_event.rb +11 -1
  43. data/lib/repull/models/payout_completed_event.rb +11 -1
  44. data/lib/repull/models/repull_ping_event.rb +11 -1
  45. data/lib/repull/models/reservation_alteration_created_event.rb +11 -1
  46. data/lib/repull/models/reservation_alteration_responded_event.rb +11 -1
  47. data/lib/repull/models/reservation_cancelled_event.rb +11 -1
  48. data/lib/repull/models/reservation_created_event.rb +11 -1
  49. data/lib/repull/models/reservation_message_reaction_event.rb +11 -1
  50. data/lib/repull/models/reservation_message_read_event.rb +11 -1
  51. data/lib/repull/models/reservation_message_received_event.rb +11 -1
  52. data/lib/repull/models/reservation_message_sent_event.rb +11 -1
  53. data/lib/repull/models/reservation_message_updated_event.rb +11 -1
  54. data/lib/repull/models/reservation_request_created_event.rb +11 -1
  55. data/lib/repull/models/reservation_request_updated_event.rb +11 -1
  56. data/lib/repull/models/reservation_thread_assigned_event.rb +11 -1
  57. data/lib/repull/models/reservation_updated_event.rb +11 -1
  58. data/lib/repull/models/review_created_event.rb +11 -1
  59. data/lib/repull/models/review_responded_event.rb +11 -1
  60. data/lib/repull/models/usage_quota_warning_event.rb +11 -1
  61. data/lib/repull/version.rb +1 -1
  62. data/lib/repull.rb +8 -0
  63. data/openapi/v1.json +576 -8
  64. metadata +10 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d3fe8068106c74b9c9ddbb4d2d79ed0eb011013266f0fe32abe76c7fbafe298
4
- data.tar.gz: 966a42fbee6db5f66ade25015063eab4676e6cf24787e9d5560ce061d71ad20d
3
+ metadata.gz: 834b6297af10eac97eb50df963b2fb8b2ab2a175a89285b75d051abd823b4fc6
4
+ data.tar.gz: 1b1a9367b64bcd5c4b525dcf56d7aa9627929f2e4ca7228bd2d776f8f4cd2506
5
5
  SHA512:
6
- metadata.gz: 85dcd2b8f452a04528ab090154ba1fd7e6f8601655bdde7969d6e3abe110b7e96a84f61a59bf51e10143fb19a8e36ec725496ecb5bd8d13b9a05978c670551f8
7
- data.tar.gz: 1bba3b2729163830e92e0b7e990b47fe3deb4865a4833639e6521de99b2eea711a750259ac551f64fa337637148414e1e19f7547f35491672aaf0edccfcbc341
6
+ metadata.gz: fdc1a81ecfc8fdf084c2b8651f0703515da4623154abe6f923dd1d76907d40feea44623067aebe450f49be296fb47b59384d96d330423d9d2bd57b9c916f7bea
7
+ data.tar.gz: 84bc9c6b9f3661ad3ae1758094752fd32816591ca7f0f657351127b7d3c8ca4bfb15dbdfba8d0fd756267ef212523f506a579f09ce7b9821fed43345b7558d77
@@ -156,7 +156,7 @@ module Repull
156
156
  end
157
157
 
158
158
  # Connect to PMS/OTA provider
159
- # Establish a connection to a PMS or OTA platform. Credentials vary by provider — see docs for each provider. Airbnb-specific: pass `redirectUrl` (where to send the user after consent) and optionally `accessType`. Three tiers: `read_only` grants read-only scopes; `messaging` (shown to hosts as \"Messaging & reviews\") grants read scopes plus message read/send and review writes (reply to guest reviews, submit host reviews — Airbnb's `reviews_write`) but NOT property management, so it can coexist with another app (e.g. an existing PMS) that already holds property management on the same Airbnb account; `full_access` — the default — grants full host scopes including the exclusive property management (only one app per Airbnb account can hold it). The response returns a hosted `url` to redirect the user to. Booking.com: pass `redirectUrl` (no `accessType`). The response returns a hosted `url` — send the user there to select our connectivity provider in their Booking.com Extranet and paste their Hotel ID. Same response shape as Airbnb (`url`, `sessionId`, `expiresAt`). PMS providers are not connected by this call: send their credentials to `POST /v1/connect/{provider}/credentials`, or start a hosted session with `POST /v1/connect`.
159
+ # Establish a connection to a PMS or OTA platform. Credentials vary by provider — see docs for each provider. Airbnb-specific: pass `redirectUrl` (where to send the user after consent) and optionally `accessType`. Three tiers: `read_only` grants read-only scopes; `messaging` (shown to hosts as \"Messaging & reviews\") grants read scopes plus message read/send and review writes (reply to guest reviews, submit host reviews — Airbnb's `reviews_write`) but NOT property management, so it can coexist with another app (e.g. an existing PMS) that already holds property management on the same Airbnb account; `full_access` — the default — grants full host scopes including the exclusive property management (only one app per Airbnb account can hold it). The response returns a hosted `url` to redirect the user to. Booking.com: pass `redirectUrl` (no `accessType`). The response returns a hosted `url` — send the user there to select our connectivity provider in their Booking.com Extranet and paste their Hotel ID. Same response shape as Airbnb (`url`, `sessionId`, `expiresAt`). PMS providers are not connected by this call: send their credentials to `POST /v1/connect/{provider}/credentials`, or start a hosted session with `POST /v1/connect`. **PriceLabs (an app).** Pass `redirectUrl` (and optionally `state`, `locale`, `workspace`). The response returns a hosted `url` for the session's workspace: yours, the one `X-Workspace-Id` names, or a new sub-workspace when you send `workspace.name` (its id comes back as `workspaceId`). The page shows the host a key for **every listing of that workspace, including listings added later**, with the steps to paste it into PriceLabs, then waits for PriceLabs' first call and completes like every provider: redirect to `redirectUrl` (`status=connected&connectionId=…`) or the `repull:connect:completed` popup message, and `connect.session.completed`. When PriceLabs first uses the key, `account.created` is sent. To keep PriceLabs away from the rest of an account, put the listings it should price in a sub-workspace and connect PriceLabs there. To issue the key yourself (no hosted page, or only some listings) use `POST /v1/connect/pricelabs/key`.
160
160
  # @param provider [String] PMS provider slug (e.g., hostaway, guesty, ownerrez)
161
161
  # @param [Hash] opts the optional parameters
162
162
  # @option opts [CreateConnectionRequest] :create_connection_request
@@ -167,7 +167,7 @@ module Repull
167
167
  end
168
168
 
169
169
  # Connect to PMS/OTA provider
170
- # Establish a connection to a PMS or OTA platform. Credentials vary by provider — see docs for each provider. Airbnb-specific: pass `redirectUrl` (where to send the user after consent) and optionally `accessType`. Three tiers: `read_only` grants read-only scopes; `messaging` (shown to hosts as \"Messaging & reviews\") grants read scopes plus message read/send and review writes (reply to guest reviews, submit host reviews — Airbnb's `reviews_write`) but NOT property management, so it can coexist with another app (e.g. an existing PMS) that already holds property management on the same Airbnb account; `full_access` — the default — grants full host scopes including the exclusive property management (only one app per Airbnb account can hold it). The response returns a hosted `url` to redirect the user to. Booking.com: pass `redirectUrl` (no `accessType`). The response returns a hosted `url` — send the user there to select our connectivity provider in their Booking.com Extranet and paste their Hotel ID. Same response shape as Airbnb (`url`, `sessionId`, `expiresAt`). PMS providers are not connected by this call: send their credentials to `POST /v1/connect/{provider}/credentials`, or start a hosted session with `POST /v1/connect`.
170
+ # Establish a connection to a PMS or OTA platform. Credentials vary by provider — see docs for each provider. Airbnb-specific: pass `redirectUrl` (where to send the user after consent) and optionally `accessType`. Three tiers: `read_only` grants read-only scopes; `messaging` (shown to hosts as \"Messaging & reviews\") grants read scopes plus message read/send and review writes (reply to guest reviews, submit host reviews — Airbnb's `reviews_write`) but NOT property management, so it can coexist with another app (e.g. an existing PMS) that already holds property management on the same Airbnb account; `full_access` — the default — grants full host scopes including the exclusive property management (only one app per Airbnb account can hold it). The response returns a hosted `url` to redirect the user to. Booking.com: pass `redirectUrl` (no `accessType`). The response returns a hosted `url` — send the user there to select our connectivity provider in their Booking.com Extranet and paste their Hotel ID. Same response shape as Airbnb (`url`, `sessionId`, `expiresAt`). PMS providers are not connected by this call: send their credentials to `POST /v1/connect/{provider}/credentials`, or start a hosted session with `POST /v1/connect`. **PriceLabs (an app).** Pass `redirectUrl` (and optionally `state`, `locale`, `workspace`). The response returns a hosted `url` for the session's workspace: yours, the one `X-Workspace-Id` names, or a new sub-workspace when you send `workspace.name` (its id comes back as `workspaceId`). The page shows the host a key for **every listing of that workspace, including listings added later**, with the steps to paste it into PriceLabs, then waits for PriceLabs' first call and completes like every provider: redirect to `redirectUrl` (`status=connected&connectionId=…`) or the `repull:connect:completed` popup message, and `connect.session.completed`. When PriceLabs first uses the key, `account.created` is sent. To keep PriceLabs away from the rest of an account, put the listings it should price in a sub-workspace and connect PriceLabs there. To issue the key yourself (no hosted page, or only some listings) use `POST /v1/connect/pricelabs/key`.
171
171
  # @param provider [String] PMS provider slug (e.g., hostaway, guesty, ownerrez)
172
172
  # @param [Hash] opts the optional parameters
173
173
  # @option opts [CreateConnectionRequest] :create_connection_request
@@ -225,11 +225,76 @@ module Repull
225
225
  return data, status_code, headers
226
226
  end
227
227
 
228
+ # Create a PriceLabs key (headless)
229
+ # Issue a PriceLabs key without the hosted page, for platforms that show it in their own app. The key is for this workspace, or the one `X-Workspace-Id` names; it is returned once, in `key`, and the host pastes it into PriceLabs (add an integration, choose Repull). - No `listingIds`: every listing of the workspace, including listings added later. Recommended, with the listings PriceLabs should price in their own sub-workspace. - `listingIds`: only those listings (they must belong to the workspace). Listings added later are not included. The key works only inside PriceLabs; it is refused on every Repull API endpoint. The connection appears on `GET /v1/connect/pricelabs` with its `health`; `account.created` is sent when PriceLabs first uses the key. Revoke it with `DELETE /v1/connect/pricelabs?id=`.
230
+ # @param [Hash] opts the optional parameters
231
+ # @option opts [CreatePriceLabsKeyRequest] :create_price_labs_key_request
232
+ # @return [CreatePriceLabsKey201Response]
233
+ def create_price_labs_key(opts = {})
234
+ data, _status_code, _headers = create_price_labs_key_with_http_info(opts)
235
+ data
236
+ end
237
+
238
+ # Create a PriceLabs key (headless)
239
+ # Issue a PriceLabs key without the hosted page, for platforms that show it in their own app. The key is for this workspace, or the one `X-Workspace-Id` names; it is returned once, in `key`, and the host pastes it into PriceLabs (add an integration, choose Repull). - No `listingIds`: every listing of the workspace, including listings added later. Recommended, with the listings PriceLabs should price in their own sub-workspace. - `listingIds`: only those listings (they must belong to the workspace). Listings added later are not included. The key works only inside PriceLabs; it is refused on every Repull API endpoint. The connection appears on `GET /v1/connect/pricelabs` with its `health`; `account.created` is sent when PriceLabs first uses the key. Revoke it with `DELETE /v1/connect/pricelabs?id=`.
240
+ # @param [Hash] opts the optional parameters
241
+ # @option opts [CreatePriceLabsKeyRequest] :create_price_labs_key_request
242
+ # @return [Array<(CreatePriceLabsKey201Response, Integer, Hash)>] CreatePriceLabsKey201Response data, response status code and response headers
243
+ def create_price_labs_key_with_http_info(opts = {})
244
+ if @api_client.config.debugging
245
+ @api_client.config.logger.debug 'Calling API: ConnectApi.create_price_labs_key ...'
246
+ end
247
+ # resource path
248
+ local_var_path = '/v1/connect/pricelabs/key'
249
+
250
+ # query parameters
251
+ query_params = opts[:query_params] || {}
252
+
253
+ # header parameters
254
+ header_params = opts[:header_params] || {}
255
+ # HTTP header 'Accept' (if needed)
256
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
257
+ # HTTP header 'Content-Type'
258
+ content_type = @api_client.select_header_content_type(['application/json'])
259
+ if !content_type.nil?
260
+ header_params['Content-Type'] = content_type
261
+ end
262
+
263
+ # form parameters
264
+ form_params = opts[:form_params] || {}
265
+
266
+ # http body (model)
267
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_price_labs_key_request'])
268
+
269
+ # return_type
270
+ return_type = opts[:debug_return_type] || 'CreatePriceLabsKey201Response'
271
+
272
+ # auth_names
273
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
274
+
275
+ new_options = opts.merge(
276
+ :operation => :"ConnectApi.create_price_labs_key",
277
+ :header_params => header_params,
278
+ :query_params => query_params,
279
+ :form_params => form_params,
280
+ :body => post_body,
281
+ :auth_names => auth_names,
282
+ :return_type => return_type
283
+ )
284
+
285
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
286
+ if @api_client.config.debugging
287
+ @api_client.config.logger.debug "API called: ConnectApi#create_price_labs_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
288
+ end
289
+ return data, status_code, headers
290
+ end
291
+
228
292
  # Disconnect provider
229
- # Disconnect ONE connected account of a provider from this workspace. Supported for `airbnb`, `booking`, `vrbo-login` and every PMS (`guesty`, `hostaway`, `hospitable`, …). **Which account.** Pass `accountId` — for Airbnb the host id (`accounts[].externalAccountId` from `GET /v1/connect/airbnb`), for Booking.com the hotel id, for `vrbo-login` the sign-in's Vrbo account id (`accounts[].externalAccountId` from `GET /v1/connect/vrbo-login`; the old sign-in id still works until 2027-02-12). It is optional only when the workspace has exactly one account for the provider. With several and no `accountId`, the call returns `422` with the account ids in `valid_values` instead of guessing. An `accountId` that is not connected to this workspace returns `404`. Disconnecting one account leaves the others connected. **What happens.** The account's stored authorization is removed and it stops syncing. Its listings are **deactivated**, not deleted: they stop counting toward your plan's listing limit, their data is kept, and they are returned in `listingsDeactivated`. A listing that is still connected through another account or channel stays active. Reconnect the account, then activate the listings with `POST /v1/listings/status`. The change is all or nothing. For Airbnb, the host can also revoke access on Airbnb's side (Account → Privacy & sharing → Connected apps); that alone does not update this workspace, so call this endpoint as well. **PMS.** A workspace has one connection per PMS, so no `accountId` is needed. Disconnecting stops syncing, clears the stored credentials and deactivates the connection's listings; nothing is deleted, and reservations and messages stay. The response also carries `connectionId`. The PMS's own webhook subscription is left in place, because the same PMS account can be connected to another workspace (such as a Repull Migrate workspace). Reconnect with a new Connect session. Other providers return `501 not_implemented` with instructions for disconnecting on the provider's side. That answer depends only on the provider, not on your workspace: an unsupported provider returns `501` whether or not you have a connection to it. `404 not_found` on a supported provider means this workspace has no connection to it (or, with `accountId`, that the account is not connected here).
293
+ # Disconnect ONE connected account of a provider from this workspace. Supported for `airbnb`, `booking`, `vrbo-login` and every PMS (`guesty`, `hostaway`, `hospitable`, …). **Which account.** Pass `accountId` — for Airbnb the host id (`accounts[].externalAccountId` from `GET /v1/connect/airbnb`), for Booking.com the hotel id, for `vrbo-login` the sign-in's Vrbo account id (`accounts[].externalAccountId` from `GET /v1/connect/vrbo-login`; the old sign-in id still works until 2027-02-12). It is optional only when the workspace has exactly one account for the provider. With several and no `accountId`, the call returns `422` with the account ids in `valid_values` instead of guessing. An `accountId` that is not connected to this workspace returns `404`. Disconnecting one account leaves the others connected. **What happens.** The account's stored authorization is removed and it stops syncing. Its listings are **deactivated**, not deleted: they stop counting toward your plan's listing limit, their data is kept, and they are returned in `listingsDeactivated`. A listing that is still connected through another account or channel stays active. Reconnect the account, then activate the listings with `POST /v1/listings/status`. The change is all or nothing. For Airbnb, the host can also revoke access on Airbnb's side (Account → Privacy & sharing → Connected apps); that alone does not update this workspace, so call this endpoint as well. **PMS.** A workspace has one connection per PMS, so no `accountId` is needed. Disconnecting stops syncing, clears the stored credentials and deactivates the connection's listings; nothing is deleted, and reservations and messages stay. The response also carries `connectionId`. The PMS's own webhook subscription is left in place, because the same PMS account can be connected to another workspace (such as a Repull Migrate workspace). Reconnect with a new Connect session. Other providers return `501 not_implemented` with instructions for disconnecting on the provider's side. That answer depends only on the provider, not on your workspace: an unsupported provider returns `501` whether or not you have a connection to it. `404 not_found` on a supported provider means this workspace has no connection to it (or, with `accountId`, that the account is not connected here). **PriceLabs (an app).** Revokes one PriceLabs connection (its key): PriceLabs loses access at once; nothing it already pushed changes and no listing is deactivated. Pass `id` (an `accounts[].id` from `GET /v1/connect/pricelabs`); it is optional only when the workspace has one connected. Sends `account.disconnected` with reason `manual_disconnect`.
230
294
  # @param provider [String] PMS provider slug (e.g., hostaway, guesty, ownerrez)
231
295
  # @param [Hash] opts the optional parameters
232
296
  # @option opts [String] :account_id The account to disconnect: the Airbnb host id (&#x60;accounts[].externalAccountId&#x60; on &#x60;GET /v1/connect/airbnb&#x60;) or the Booking.com hotel id. Required when the workspace has more than one connected account for the provider. Not the same as the &#x60;X-Account-Id&#x60; header.
297
+ # @option opts [String] :id PriceLabs only: the connection to revoke (&#x60;accounts[].id&#x60; on &#x60;GET /v1/connect/pricelabs&#x60;). Required when the workspace has more than one.
233
298
  # @return [DeleteConnection200Response]
234
299
  def delete_connection(provider, opts = {})
235
300
  data, _status_code, _headers = delete_connection_with_http_info(provider, opts)
@@ -237,10 +302,11 @@ module Repull
237
302
  end
238
303
 
239
304
  # Disconnect provider
240
- # Disconnect ONE connected account of a provider from this workspace. Supported for &#x60;airbnb&#x60;, &#x60;booking&#x60;, &#x60;vrbo-login&#x60; and every PMS (&#x60;guesty&#x60;, &#x60;hostaway&#x60;, &#x60;hospitable&#x60;, …). **Which account.** Pass &#x60;accountId&#x60; — for Airbnb the host id (&#x60;accounts[].externalAccountId&#x60; from &#x60;GET /v1/connect/airbnb&#x60;), for Booking.com the hotel id, for &#x60;vrbo-login&#x60; the sign-in&#39;s Vrbo account id (&#x60;accounts[].externalAccountId&#x60; from &#x60;GET /v1/connect/vrbo-login&#x60;; the old sign-in id still works until 2027-02-12). It is optional only when the workspace has exactly one account for the provider. With several and no &#x60;accountId&#x60;, the call returns &#x60;422&#x60; with the account ids in &#x60;valid_values&#x60; instead of guessing. An &#x60;accountId&#x60; that is not connected to this workspace returns &#x60;404&#x60;. Disconnecting one account leaves the others connected. **What happens.** The account&#39;s stored authorization is removed and it stops syncing. Its listings are **deactivated**, not deleted: they stop counting toward your plan&#39;s listing limit, their data is kept, and they are returned in &#x60;listingsDeactivated&#x60;. A listing that is still connected through another account or channel stays active. Reconnect the account, then activate the listings with &#x60;POST /v1/listings/status&#x60;. The change is all or nothing. For Airbnb, the host can also revoke access on Airbnb&#39;s side (Account → Privacy &amp; sharing → Connected apps); that alone does not update this workspace, so call this endpoint as well. **PMS.** A workspace has one connection per PMS, so no &#x60;accountId&#x60; is needed. Disconnecting stops syncing, clears the stored credentials and deactivates the connection&#39;s listings; nothing is deleted, and reservations and messages stay. The response also carries &#x60;connectionId&#x60;. The PMS&#39;s own webhook subscription is left in place, because the same PMS account can be connected to another workspace (such as a Repull Migrate workspace). Reconnect with a new Connect session. Other providers return &#x60;501 not_implemented&#x60; with instructions for disconnecting on the provider&#39;s side. That answer depends only on the provider, not on your workspace: an unsupported provider returns &#x60;501&#x60; whether or not you have a connection to it. &#x60;404 not_found&#x60; on a supported provider means this workspace has no connection to it (or, with &#x60;accountId&#x60;, that the account is not connected here).
305
+ # Disconnect ONE connected account of a provider from this workspace. Supported for &#x60;airbnb&#x60;, &#x60;booking&#x60;, &#x60;vrbo-login&#x60; and every PMS (&#x60;guesty&#x60;, &#x60;hostaway&#x60;, &#x60;hospitable&#x60;, …). **Which account.** Pass &#x60;accountId&#x60; — for Airbnb the host id (&#x60;accounts[].externalAccountId&#x60; from &#x60;GET /v1/connect/airbnb&#x60;), for Booking.com the hotel id, for &#x60;vrbo-login&#x60; the sign-in&#39;s Vrbo account id (&#x60;accounts[].externalAccountId&#x60; from &#x60;GET /v1/connect/vrbo-login&#x60;; the old sign-in id still works until 2027-02-12). It is optional only when the workspace has exactly one account for the provider. With several and no &#x60;accountId&#x60;, the call returns &#x60;422&#x60; with the account ids in &#x60;valid_values&#x60; instead of guessing. An &#x60;accountId&#x60; that is not connected to this workspace returns &#x60;404&#x60;. Disconnecting one account leaves the others connected. **What happens.** The account&#39;s stored authorization is removed and it stops syncing. Its listings are **deactivated**, not deleted: they stop counting toward your plan&#39;s listing limit, their data is kept, and they are returned in &#x60;listingsDeactivated&#x60;. A listing that is still connected through another account or channel stays active. Reconnect the account, then activate the listings with &#x60;POST /v1/listings/status&#x60;. The change is all or nothing. For Airbnb, the host can also revoke access on Airbnb&#39;s side (Account → Privacy &amp; sharing → Connected apps); that alone does not update this workspace, so call this endpoint as well. **PMS.** A workspace has one connection per PMS, so no &#x60;accountId&#x60; is needed. Disconnecting stops syncing, clears the stored credentials and deactivates the connection&#39;s listings; nothing is deleted, and reservations and messages stay. The response also carries &#x60;connectionId&#x60;. The PMS&#39;s own webhook subscription is left in place, because the same PMS account can be connected to another workspace (such as a Repull Migrate workspace). Reconnect with a new Connect session. Other providers return &#x60;501 not_implemented&#x60; with instructions for disconnecting on the provider&#39;s side. That answer depends only on the provider, not on your workspace: an unsupported provider returns &#x60;501&#x60; whether or not you have a connection to it. &#x60;404 not_found&#x60; on a supported provider means this workspace has no connection to it (or, with &#x60;accountId&#x60;, that the account is not connected here). **PriceLabs (an app).** Revokes one PriceLabs connection (its key): PriceLabs loses access at once; nothing it already pushed changes and no listing is deactivated. Pass &#x60;id&#x60; (an &#x60;accounts[].id&#x60; from &#x60;GET /v1/connect/pricelabs&#x60;); it is optional only when the workspace has one connected. Sends &#x60;account.disconnected&#x60; with reason &#x60;manual_disconnect&#x60;.
241
306
  # @param provider [String] PMS provider slug (e.g., hostaway, guesty, ownerrez)
242
307
  # @param [Hash] opts the optional parameters
243
308
  # @option opts [String] :account_id The account to disconnect: the Airbnb host id (&#x60;accounts[].externalAccountId&#x60; on &#x60;GET /v1/connect/airbnb&#x60;) or the Booking.com hotel id. Required when the workspace has more than one connected account for the provider. Not the same as the &#x60;X-Account-Id&#x60; header.
309
+ # @option opts [String] :id PriceLabs only: the connection to revoke (&#x60;accounts[].id&#x60; on &#x60;GET /v1/connect/pricelabs&#x60;). Required when the workspace has more than one.
244
310
  # @return [Array<(DeleteConnection200Response, Integer, Hash)>] DeleteConnection200Response data, response status code and response headers
245
311
  def delete_connection_with_http_info(provider, opts = {})
246
312
  if @api_client.config.debugging
@@ -256,6 +322,7 @@ module Repull
256
322
  # query parameters
257
323
  query_params = opts[:query_params] || {}
258
324
  query_params[:'accountId'] = opts[:'account_id'] if !opts[:'account_id'].nil?
325
+ query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
259
326
 
260
327
  # header parameters
261
328
  header_params = opts[:header_params] || {}
@@ -427,7 +494,7 @@ module Repull
427
494
  end
428
495
 
429
496
  # Get connection status
430
- # Returns the current connection status for a provider, including host metadata (display name + avatar) for Airbnb so clients can render an account-level confirmation UI. **Access level.** `accessType` says what the connection may do: `read_only`, `messaging` or `full_access` (`null` when unknown). Airbnb reports it per host on `accounts[]` (the tier each host's token was granted with) and at the top level for the host in `externalAccountId`; Vrbo (`vrbo-login`) per account; Booking.com is always `full_access`, the Booking.com Extranet always `messaging`; a PMS is `read_only` when every `writePolicy` switch is off, else `full_access`. See the `ConnectionAccessType` schema for the meaning per provider.
497
+ # Returns the current connection status for a provider, including host metadata (display name + avatar) for Airbnb so clients can render an account-level confirmation UI. **Access level.** `accessType` says what the connection may do: `read_only`, `messaging` or `full_access` (`null` when unknown). Airbnb reports it per host on `accounts[]` (the tier each host's token was granted with) and at the top level for the host in `externalAccountId`; Vrbo (`vrbo-login`) per account; Booking.com is always `full_access`, the Booking.com Extranet always `messaging`; a PMS is `read_only` when every `writePolicy` switch is off, else `full_access`. See the `ConnectionAccessType` schema for the meaning per provider. **PriceLabs (an app).** `accounts[]` lists every PriceLabs connection of the workspace (each one key), with `scope`, `listingCount`, `keyMasked` and `health`: `status` (`active`, `idle`, `failing`, `never_connected`), last request, last successful price push, pushes per day for 7 days, error rates and the latest errors. Revoked ones stay listed as `disconnected` with `health: null`. `externalAccountId` is `null` (PriceLabs has no account id to give us); `id` is the connection.
431
498
  # @param provider [String] PMS provider slug (e.g., hostaway, guesty, ownerrez)
432
499
  # @param [Hash] opts the optional parameters
433
500
  # @return [ConnectStatus]
@@ -437,7 +504,7 @@ module Repull
437
504
  end
438
505
 
439
506
  # Get connection status
440
- # Returns the current connection status for a provider, including host metadata (display name + avatar) for Airbnb so clients can render an account-level confirmation UI. **Access level.** &#x60;accessType&#x60; says what the connection may do: &#x60;read_only&#x60;, &#x60;messaging&#x60; or &#x60;full_access&#x60; (&#x60;null&#x60; when unknown). Airbnb reports it per host on &#x60;accounts[]&#x60; (the tier each host&#39;s token was granted with) and at the top level for the host in &#x60;externalAccountId&#x60;; Vrbo (&#x60;vrbo-login&#x60;) per account; Booking.com is always &#x60;full_access&#x60;, the Booking.com Extranet always &#x60;messaging&#x60;; a PMS is &#x60;read_only&#x60; when every &#x60;writePolicy&#x60; switch is off, else &#x60;full_access&#x60;. See the &#x60;ConnectionAccessType&#x60; schema for the meaning per provider.
507
+ # Returns the current connection status for a provider, including host metadata (display name + avatar) for Airbnb so clients can render an account-level confirmation UI. **Access level.** &#x60;accessType&#x60; says what the connection may do: &#x60;read_only&#x60;, &#x60;messaging&#x60; or &#x60;full_access&#x60; (&#x60;null&#x60; when unknown). Airbnb reports it per host on &#x60;accounts[]&#x60; (the tier each host&#39;s token was granted with) and at the top level for the host in &#x60;externalAccountId&#x60;; Vrbo (&#x60;vrbo-login&#x60;) per account; Booking.com is always &#x60;full_access&#x60;, the Booking.com Extranet always &#x60;messaging&#x60;; a PMS is &#x60;read_only&#x60; when every &#x60;writePolicy&#x60; switch is off, else &#x60;full_access&#x60;. See the &#x60;ConnectionAccessType&#x60; schema for the meaning per provider. **PriceLabs (an app).** &#x60;accounts[]&#x60; lists every PriceLabs connection of the workspace (each one key), with &#x60;scope&#x60;, &#x60;listingCount&#x60;, &#x60;keyMasked&#x60; and &#x60;health&#x60;: &#x60;status&#x60; (&#x60;active&#x60;, &#x60;idle&#x60;, &#x60;failing&#x60;, &#x60;never_connected&#x60;), last request, last successful price push, pushes per day for 7 days, error rates and the latest errors. Revoked ones stay listed as &#x60;disconnected&#x60; with &#x60;health: null&#x60;. &#x60;externalAccountId&#x60; is &#x60;null&#x60; (PriceLabs has no account id to give us); &#x60;id&#x60; is the connection.
441
508
  # @param provider [String] PMS provider slug (e.g., hostaway, guesty, ownerrez)
442
509
  # @param [Hash] opts the optional parameters
443
510
  # @return [Array<(ConnectStatus, Integer, Hash)>] ConnectStatus data, response status code and response headers
@@ -552,6 +619,70 @@ module Repull
552
619
  return data, status_code, headers
553
620
  end
554
621
 
622
+ # PriceLabs session status
623
+ # Where a hosted PriceLabs session stands: `pending` (no key issued yet), `waiting` (the key is shown, PriceLabs has not called yet), `connected` (PriceLabs has called with the key; the session is complete) or `expired`. Called by the hosted Connect page while it waits. No API key — the session ID is the capability token.
624
+ # @param session_id [String]
625
+ # @param [Hash] opts the optional parameters
626
+ # @return [GetPriceLabsSessionStatus200Response]
627
+ def get_price_labs_session_status(session_id, opts = {})
628
+ data, _status_code, _headers = get_price_labs_session_status_with_http_info(session_id, opts)
629
+ data
630
+ end
631
+
632
+ # PriceLabs session status
633
+ # Where a hosted PriceLabs session stands: &#x60;pending&#x60; (no key issued yet), &#x60;waiting&#x60; (the key is shown, PriceLabs has not called yet), &#x60;connected&#x60; (PriceLabs has called with the key; the session is complete) or &#x60;expired&#x60;. Called by the hosted Connect page while it waits. No API key — the session ID is the capability token.
634
+ # @param session_id [String]
635
+ # @param [Hash] opts the optional parameters
636
+ # @return [Array<(GetPriceLabsSessionStatus200Response, Integer, Hash)>] GetPriceLabsSessionStatus200Response data, response status code and response headers
637
+ def get_price_labs_session_status_with_http_info(session_id, opts = {})
638
+ if @api_client.config.debugging
639
+ @api_client.config.logger.debug 'Calling API: ConnectApi.get_price_labs_session_status ...'
640
+ end
641
+ # verify the required parameter 'session_id' is set
642
+ if @api_client.config.client_side_validation && session_id.nil?
643
+ fail ArgumentError, "Missing the required parameter 'session_id' when calling ConnectApi.get_price_labs_session_status"
644
+ end
645
+ # resource path
646
+ local_var_path = '/v1/connect/pricelabs/session'
647
+
648
+ # query parameters
649
+ query_params = opts[:query_params] || {}
650
+ query_params[:'sessionId'] = session_id
651
+
652
+ # header parameters
653
+ header_params = opts[:header_params] || {}
654
+ # HTTP header 'Accept' (if needed)
655
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
656
+
657
+ # form parameters
658
+ form_params = opts[:form_params] || {}
659
+
660
+ # http body (model)
661
+ post_body = opts[:debug_body]
662
+
663
+ # return_type
664
+ return_type = opts[:debug_return_type] || 'GetPriceLabsSessionStatus200Response'
665
+
666
+ # auth_names
667
+ auth_names = opts[:debug_auth_names] || []
668
+
669
+ new_options = opts.merge(
670
+ :operation => :"ConnectApi.get_price_labs_session_status",
671
+ :header_params => header_params,
672
+ :query_params => query_params,
673
+ :form_params => form_params,
674
+ :body => post_body,
675
+ :auth_names => auth_names,
676
+ :return_type => return_type
677
+ )
678
+
679
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
680
+ if @api_client.config.debugging
681
+ @api_client.config.logger.debug "API called: ConnectApi#get_price_labs_session_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
682
+ end
683
+ return data, status_code, headers
684
+ end
685
+
555
686
  # Import progress of the session's Vrbo account
556
687
  # After the mapping is confirmed: `importing` (upcoming bookings and the last 30 days of messages) → `importing_history` (the rest of the account, in the background) → `imported`. Called by the hosted Connect page. No API key — the session ID is the capability token.
557
688
  # @param session_id [String]
@@ -29,6 +29,9 @@ module Repull
29
29
 
30
30
  attr_accessor :account
31
31
 
32
+ # The sub-workspace this event happened in. Present only on events from a sub-workspace your workspace opened (`POST /v1/connect` with `workspace`, or Repull Migrate); omitted on your own workspace's events. It is the same workspace as `workspaceId` on `POST /v1/connect` and `GET /v1/workspaces` and the `X-Workspace-Id` header, but those return it as a string (`\"2042\"`) while the event carries a JSON number (`2042`): compare as strings, e.g. `String(event.workspaceId) === workspace.workspaceId`. The UUID `data.workspaceId` on `account.created` / `account.disconnected` is a different identifier.
33
+ attr_accessor :workspace_id
34
+
32
35
  attr_accessor :data
33
36
 
34
37
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -39,6 +42,7 @@ module Repull
39
42
  :'api_version' => :'apiVersion',
40
43
  :'timestamp' => :'timestamp',
41
44
  :'account' => :'account',
45
+ :'workspace_id' => :'workspaceId',
42
46
  :'data' => :'data'
43
47
  }
44
48
  end
@@ -61,6 +65,7 @@ module Repull
61
65
  :'api_version' => :'String',
62
66
  :'timestamp' => :'Time',
63
67
  :'account' => :'WebhookEventAccount',
68
+ :'workspace_id' => :'Integer',
64
69
  :'data' => :'AccountCalendarAccessChangedPayload'
65
70
  }
66
71
  end
@@ -116,6 +121,10 @@ module Repull
116
121
  self.account = attributes[:'account']
117
122
  end
118
123
 
124
+ if attributes.key?(:'workspace_id')
125
+ self.workspace_id = attributes[:'workspace_id']
126
+ end
127
+
119
128
  if attributes.key?(:'data')
120
129
  self.data = attributes[:'data']
121
130
  else
@@ -223,6 +232,7 @@ module Repull
223
232
  api_version == o.api_version &&
224
233
  timestamp == o.timestamp &&
225
234
  account == o.account &&
235
+ workspace_id == o.workspace_id &&
226
236
  data == o.data
227
237
  end
228
238
 
@@ -235,7 +245,7 @@ module Repull
235
245
  # Calculates hash code according to all attributes.
236
246
  # @return [Integer] Hash code
237
247
  def hash
238
- [event, event_id, api_version, timestamp, account, data].hash
248
+ [event, event_id, api_version, timestamp, account, workspace_id, data].hash
239
249
  end
240
250
 
241
251
  # Builds the object from hash
@@ -28,6 +28,9 @@ module Repull
28
28
 
29
29
  attr_accessor :account
30
30
 
31
+ # The sub-workspace this event happened in. Present only on events from a sub-workspace your workspace opened (`POST /v1/connect` with `workspace`, or Repull Migrate); omitted on your own workspace's events. It is the same workspace as `workspaceId` on `POST /v1/connect` and `GET /v1/workspaces` and the `X-Workspace-Id` header, but those return it as a string (`\"2042\"`) while the event carries a JSON number (`2042`): compare as strings, e.g. `String(event.workspaceId) === workspace.workspaceId`. The UUID `data.workspaceId` on `account.created` / `account.disconnected` is a different identifier.
32
+ attr_accessor :workspace_id
33
+
31
34
  attr_accessor :data
32
35
 
33
36
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -38,6 +41,7 @@ module Repull
38
41
  :'api_version' => :'apiVersion',
39
42
  :'timestamp' => :'timestamp',
40
43
  :'account' => :'account',
44
+ :'workspace_id' => :'workspaceId',
41
45
  :'data' => :'data'
42
46
  }
43
47
  end
@@ -60,6 +64,7 @@ module Repull
60
64
  :'api_version' => :'String',
61
65
  :'timestamp' => :'Time',
62
66
  :'account' => :'WebhookEventAccount',
67
+ :'workspace_id' => :'Integer',
63
68
  :'data' => :'AccountCreatedPayload'
64
69
  }
65
70
  end
@@ -115,6 +120,10 @@ module Repull
115
120
  self.account = attributes[:'account']
116
121
  end
117
122
 
123
+ if attributes.key?(:'workspace_id')
124
+ self.workspace_id = attributes[:'workspace_id']
125
+ end
126
+
118
127
  if attributes.key?(:'data')
119
128
  self.data = attributes[:'data']
120
129
  else
@@ -222,6 +231,7 @@ module Repull
222
231
  api_version == o.api_version &&
223
232
  timestamp == o.timestamp &&
224
233
  account == o.account &&
234
+ workspace_id == o.workspace_id &&
225
235
  data == o.data
226
236
  end
227
237
 
@@ -234,7 +244,7 @@ module Repull
234
244
  # Calculates hash code according to all attributes.
235
245
  # @return [Integer] Hash code
236
246
  def hash
237
- [event, event_id, api_version, timestamp, account, data].hash
247
+ [event, event_id, api_version, timestamp, account, workspace_id, data].hash
238
248
  end
239
249
 
240
250
  # Builds the object from hash
@@ -28,6 +28,9 @@ module Repull
28
28
 
29
29
  attr_accessor :account
30
30
 
31
+ # The sub-workspace this event happened in. Present only on events from a sub-workspace your workspace opened (`POST /v1/connect` with `workspace`, or Repull Migrate); omitted on your own workspace's events. It is the same workspace as `workspaceId` on `POST /v1/connect` and `GET /v1/workspaces` and the `X-Workspace-Id` header, but those return it as a string (`\"2042\"`) while the event carries a JSON number (`2042`): compare as strings, e.g. `String(event.workspaceId) === workspace.workspaceId`. The UUID `data.workspaceId` on `account.created` / `account.disconnected` is a different identifier.
32
+ attr_accessor :workspace_id
33
+
31
34
  attr_accessor :data
32
35
 
33
36
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -38,6 +41,7 @@ module Repull
38
41
  :'api_version' => :'apiVersion',
39
42
  :'timestamp' => :'timestamp',
40
43
  :'account' => :'account',
44
+ :'workspace_id' => :'workspaceId',
41
45
  :'data' => :'data'
42
46
  }
43
47
  end
@@ -60,6 +64,7 @@ module Repull
60
64
  :'api_version' => :'String',
61
65
  :'timestamp' => :'Time',
62
66
  :'account' => :'WebhookEventAccount',
67
+ :'workspace_id' => :'Integer',
63
68
  :'data' => :'AccountDisconnectedPayload'
64
69
  }
65
70
  end
@@ -115,6 +120,10 @@ module Repull
115
120
  self.account = attributes[:'account']
116
121
  end
117
122
 
123
+ if attributes.key?(:'workspace_id')
124
+ self.workspace_id = attributes[:'workspace_id']
125
+ end
126
+
118
127
  if attributes.key?(:'data')
119
128
  self.data = attributes[:'data']
120
129
  else
@@ -222,6 +231,7 @@ module Repull
222
231
  api_version == o.api_version &&
223
232
  timestamp == o.timestamp &&
224
233
  account == o.account &&
234
+ workspace_id == o.workspace_id &&
225
235
  data == o.data
226
236
  end
227
237
 
@@ -234,7 +244,7 @@ module Repull
234
244
  # Calculates hash code according to all attributes.
235
245
  # @return [Integer] Hash code
236
246
  def hash
237
- [event, event_id, api_version, timestamp, account, data].hash
247
+ [event, event_id, api_version, timestamp, account, workspace_id, data].hash
238
248
  end
239
249
 
240
250
  # Builds the object from hash
@@ -29,6 +29,9 @@ module Repull
29
29
 
30
30
  attr_accessor :account
31
31
 
32
+ # The sub-workspace this event happened in. Present only on events from a sub-workspace your workspace opened (`POST /v1/connect` with `workspace`, or Repull Migrate); omitted on your own workspace's events. It is the same workspace as `workspaceId` on `POST /v1/connect` and `GET /v1/workspaces` and the `X-Workspace-Id` header, but those return it as a string (`\"2042\"`) while the event carries a JSON number (`2042`): compare as strings, e.g. `String(event.workspaceId) === workspace.workspaceId`. The UUID `data.workspaceId` on `account.created` / `account.disconnected` is a different identifier.
33
+ attr_accessor :workspace_id
34
+
32
35
  attr_accessor :data
33
36
 
34
37
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -39,6 +42,7 @@ module Repull
39
42
  :'api_version' => :'apiVersion',
40
43
  :'timestamp' => :'timestamp',
41
44
  :'account' => :'account',
45
+ :'workspace_id' => :'workspaceId',
42
46
  :'data' => :'data'
43
47
  }
44
48
  end
@@ -61,6 +65,7 @@ module Repull
61
65
  :'api_version' => :'String',
62
66
  :'timestamp' => :'Time',
63
67
  :'account' => :'WebhookEventAccount',
68
+ :'workspace_id' => :'Integer',
64
69
  :'data' => :'AccountImportFinishedPayload'
65
70
  }
66
71
  end
@@ -116,6 +121,10 @@ module Repull
116
121
  self.account = attributes[:'account']
117
122
  end
118
123
 
124
+ if attributes.key?(:'workspace_id')
125
+ self.workspace_id = attributes[:'workspace_id']
126
+ end
127
+
119
128
  if attributes.key?(:'data')
120
129
  self.data = attributes[:'data']
121
130
  else
@@ -223,6 +232,7 @@ module Repull
223
232
  api_version == o.api_version &&
224
233
  timestamp == o.timestamp &&
225
234
  account == o.account &&
235
+ workspace_id == o.workspace_id &&
226
236
  data == o.data
227
237
  end
228
238
 
@@ -235,7 +245,7 @@ module Repull
235
245
  # Calculates hash code according to all attributes.
236
246
  # @return [Integer] Hash code
237
247
  def hash
238
- [event, event_id, api_version, timestamp, account, data].hash
248
+ [event, event_id, api_version, timestamp, account, workspace_id, data].hash
239
249
  end
240
250
 
241
251
  # Builds the object from hash
@@ -29,6 +29,9 @@ module Repull
29
29
 
30
30
  attr_accessor :account
31
31
 
32
+ # The sub-workspace this event happened in. Present only on events from a sub-workspace your workspace opened (`POST /v1/connect` with `workspace`, or Repull Migrate); omitted on your own workspace's events. It is the same workspace as `workspaceId` on `POST /v1/connect` and `GET /v1/workspaces` and the `X-Workspace-Id` header, but those return it as a string (`\"2042\"`) while the event carries a JSON number (`2042`): compare as strings, e.g. `String(event.workspaceId) === workspace.workspaceId`. The UUID `data.workspaceId` on `account.created` / `account.disconnected` is a different identifier.
33
+ attr_accessor :workspace_id
34
+
32
35
  attr_accessor :data
33
36
 
34
37
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -39,6 +42,7 @@ module Repull
39
42
  :'api_version' => :'apiVersion',
40
43
  :'timestamp' => :'timestamp',
41
44
  :'account' => :'account',
45
+ :'workspace_id' => :'workspaceId',
42
46
  :'data' => :'data'
43
47
  }
44
48
  end
@@ -61,6 +65,7 @@ module Repull
61
65
  :'api_version' => :'String',
62
66
  :'timestamp' => :'Time',
63
67
  :'account' => :'WebhookEventAccount',
68
+ :'workspace_id' => :'Integer',
64
69
  :'data' => :'AccountImportFinishedPayload'
65
70
  }
66
71
  end
@@ -116,6 +121,10 @@ module Repull
116
121
  self.account = attributes[:'account']
117
122
  end
118
123
 
124
+ if attributes.key?(:'workspace_id')
125
+ self.workspace_id = attributes[:'workspace_id']
126
+ end
127
+
119
128
  if attributes.key?(:'data')
120
129
  self.data = attributes[:'data']
121
130
  else
@@ -223,6 +232,7 @@ module Repull
223
232
  api_version == o.api_version &&
224
233
  timestamp == o.timestamp &&
225
234
  account == o.account &&
235
+ workspace_id == o.workspace_id &&
226
236
  data == o.data
227
237
  end
228
238
 
@@ -235,7 +245,7 @@ module Repull
235
245
  # Calculates hash code according to all attributes.
236
246
  # @return [Integer] Hash code
237
247
  def hash
238
- [event, event_id, api_version, timestamp, account, data].hash
248
+ [event, event_id, api_version, timestamp, account, workspace_id, data].hash
239
249
  end
240
250
 
241
251
  # Builds the object from hash
@@ -29,6 +29,9 @@ module Repull
29
29
 
30
30
  attr_accessor :account
31
31
 
32
+ # The sub-workspace this event happened in. Present only on events from a sub-workspace your workspace opened (`POST /v1/connect` with `workspace`, or Repull Migrate); omitted on your own workspace's events. It is the same workspace as `workspaceId` on `POST /v1/connect` and `GET /v1/workspaces` and the `X-Workspace-Id` header, but those return it as a string (`\"2042\"`) while the event carries a JSON number (`2042`): compare as strings, e.g. `String(event.workspaceId) === workspace.workspaceId`. The UUID `data.workspaceId` on `account.created` / `account.disconnected` is a different identifier.
33
+ attr_accessor :workspace_id
34
+
32
35
  attr_accessor :data
33
36
 
34
37
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -39,6 +42,7 @@ module Repull
39
42
  :'api_version' => :'apiVersion',
40
43
  :'timestamp' => :'timestamp',
41
44
  :'account' => :'account',
45
+ :'workspace_id' => :'workspaceId',
42
46
  :'data' => :'data'
43
47
  }
44
48
  end
@@ -61,6 +65,7 @@ module Repull
61
65
  :'api_version' => :'String',
62
66
  :'timestamp' => :'Time',
63
67
  :'account' => :'WebhookEventAccount',
68
+ :'workspace_id' => :'Integer',
64
69
  :'data' => :'AccountImportStartedPayload'
65
70
  }
66
71
  end
@@ -116,6 +121,10 @@ module Repull
116
121
  self.account = attributes[:'account']
117
122
  end
118
123
 
124
+ if attributes.key?(:'workspace_id')
125
+ self.workspace_id = attributes[:'workspace_id']
126
+ end
127
+
119
128
  if attributes.key?(:'data')
120
129
  self.data = attributes[:'data']
121
130
  else
@@ -223,6 +232,7 @@ module Repull
223
232
  api_version == o.api_version &&
224
233
  timestamp == o.timestamp &&
225
234
  account == o.account &&
235
+ workspace_id == o.workspace_id &&
226
236
  data == o.data
227
237
  end
228
238
 
@@ -235,7 +245,7 @@ module Repull
235
245
  # Calculates hash code according to all attributes.
236
246
  # @return [Integer] Hash code
237
247
  def hash
238
- [event, event_id, api_version, timestamp, account, data].hash
248
+ [event, event_id, api_version, timestamp, account, workspace_id, data].hash
239
249
  end
240
250
 
241
251
  # Builds the object from hash
@@ -29,6 +29,9 @@ module Repull
29
29
 
30
30
  attr_accessor :account
31
31
 
32
+ # The sub-workspace this event happened in. Present only on events from a sub-workspace your workspace opened (`POST /v1/connect` with `workspace`, or Repull Migrate); omitted on your own workspace's events. It is the same workspace as `workspaceId` on `POST /v1/connect` and `GET /v1/workspaces` and the `X-Workspace-Id` header, but those return it as a string (`\"2042\"`) while the event carries a JSON number (`2042`): compare as strings, e.g. `String(event.workspaceId) === workspace.workspaceId`. The UUID `data.workspaceId` on `account.created` / `account.disconnected` is a different identifier.
33
+ attr_accessor :workspace_id
34
+
32
35
  attr_accessor :data
33
36
 
34
37
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -39,6 +42,7 @@ module Repull
39
42
  :'api_version' => :'apiVersion',
40
43
  :'timestamp' => :'timestamp',
41
44
  :'account' => :'account',
45
+ :'workspace_id' => :'workspaceId',
42
46
  :'data' => :'data'
43
47
  }
44
48
  end
@@ -61,6 +65,7 @@ module Repull
61
65
  :'api_version' => :'String',
62
66
  :'timestamp' => :'Time',
63
67
  :'account' => :'WebhookEventAccount',
68
+ :'workspace_id' => :'Integer',
64
69
  :'data' => :'AccountNotificationsMissingPayload'
65
70
  }
66
71
  end
@@ -116,6 +121,10 @@ module Repull
116
121
  self.account = attributes[:'account']
117
122
  end
118
123
 
124
+ if attributes.key?(:'workspace_id')
125
+ self.workspace_id = attributes[:'workspace_id']
126
+ end
127
+
119
128
  if attributes.key?(:'data')
120
129
  self.data = attributes[:'data']
121
130
  else
@@ -223,6 +232,7 @@ module Repull
223
232
  api_version == o.api_version &&
224
233
  timestamp == o.timestamp &&
225
234
  account == o.account &&
235
+ workspace_id == o.workspace_id &&
226
236
  data == o.data
227
237
  end
228
238
 
@@ -235,7 +245,7 @@ module Repull
235
245
  # Calculates hash code according to all attributes.
236
246
  # @return [Integer] Hash code
237
247
  def hash
238
- [event, event_id, api_version, timestamp, account, data].hash
248
+ [event, event_id, api_version, timestamp, account, workspace_id, data].hash
239
249
  end
240
250
 
241
251
  # Builds the object from hash