repull 0.2.35 → 0.2.36

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 (46) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/connect_api.rb +2 -2
  3. data/lib/repull/api/listings_api.rb +8 -8
  4. data/lib/repull/api/migrate_api.rb +68 -0
  5. data/lib/repull/models/booking_unacknowledged_event.rb +281 -0
  6. data/lib/repull/models/booking_unacknowledged_payload.rb +229 -0
  7. data/lib/repull/models/channel_degraded_event.rb +279 -0
  8. data/lib/repull/models/channel_degraded_payload.rb +174 -0
  9. data/lib/repull/models/channel_degraded_payload_object.rb +262 -0
  10. data/lib/repull/models/channel_sync_failed_event.rb +280 -0
  11. data/lib/repull/models/channel_sync_failure_payload.rb +214 -0
  12. data/lib/repull/models/channel_sync_failure_payload_failures_inner.rb +213 -0
  13. data/lib/repull/models/channel_sync_failure_payload_object.rb +289 -0
  14. data/lib/repull/models/charge_per.rb +42 -0
  15. data/lib/repull/models/create_connect_session_request.rb +2 -2
  16. data/lib/repull/models/create_connection_request.rb +1 -1
  17. data/lib/repull/models/import_from_channex200_response.rb +147 -0
  18. data/lib/repull/models/import_from_channex200_response_data.rb +324 -0
  19. data/lib/repull/models/import_from_channex200_response_data_channels_inner.rb +263 -0
  20. data/lib/repull/models/import_from_channex200_response_data_properties_inner.rb +222 -0
  21. data/lib/repull/models/import_from_channex200_response_data_summary.rb +201 -0
  22. data/lib/repull/models/import_from_channex200_response_data_summary_bookings.rb +165 -0
  23. data/lib/repull/models/import_from_channex200_response_data_summary_properties.rb +165 -0
  24. data/lib/repull/models/import_from_channex_request.rb +223 -0
  25. data/lib/repull/models/listing.rb +82 -1
  26. data/lib/repull/models/listing_content_photo.rb +206 -0
  27. data/lib/repull/models/listing_fee.rb +229 -0
  28. data/lib/repull/models/listing_policies.rb +257 -0
  29. data/lib/repull/models/listing_policies_check_in.rb +179 -0
  30. data/lib/repull/models/listing_policies_check_out.rb +148 -0
  31. data/lib/repull/models/listing_policies_quiet_hours.rb +156 -0
  32. data/lib/repull/models/listing_pricing_settings.rb +233 -0
  33. data/lib/repull/models/listing_room.rb +190 -0
  34. data/lib/repull/models/listing_room_beds_inner.rb +156 -0
  35. data/lib/repull/models/listing_rules.rb +212 -0
  36. data/lib/repull/models/listing_tax.rb +241 -0
  37. data/lib/repull/models/reservation_thread_assigned_event.rb +279 -0
  38. data/lib/repull/models/reservation_thread_assigned_payload.rb +174 -0
  39. data/lib/repull/models/reservation_thread_assigned_payload_object.rb +249 -0
  40. data/lib/repull/models/webhook_event.rb +8 -0
  41. data/lib/repull/models/webhook_event_type.rb +5 -1
  42. data/lib/repull/version.rb +1 -1
  43. data/lib/repull.rb +32 -0
  44. data/openapi/v1.json +1591 -8
  45. metadata +34 -4
  46. data/spec/api/plumguide_api_spec.rb +0 -85
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3dd1b14c70b71a270a2738f370441e46162ee0810eaa4ea90df885938bc6ff4f
4
- data.tar.gz: 86146a261bcd64bf93ded286fd2f9d10d0515713b6eb2c6ba0c8419cf498b0bb
3
+ metadata.gz: 751997bcb46f19e528ab83ca056a1155ac4fe845ee599add4bfda29eb26714c8
4
+ data.tar.gz: 4a279c4160c27f0e51d9c04b53aef5e726de72160a4a4f8f1b4543eec1be6824
5
5
  SHA512:
6
- metadata.gz: '093ca68ae94804a08972248fefaa9138cee9d8032cc6f9b09bd0b8b649fbb406577e439b93b07283d4b8c27db71554c1ee5acd2a3325bd9a4d12d0df7f70dd9c'
7
- data.tar.gz: 9681728ae90f98c2effa583ba82a9925b920dcdfcca0e2f0daae376f0468256beacdc56806c4bdb0c5503a195bca732ff33d853e045a0ad29959473bebfb3d8e
6
+ metadata.gz: ac7602f28a982e29082158feba621f3f6b684f7258bb1f2aa14fbebc01ef1cb116ebc7eb2891cf338720579abc4666e2450071adc1d6b83b9dbafbdffb7d0fee
7
+ data.tar.gz: 5c93798f05f33c0638ea2158d3a33d9523565488a12dcfd46e2f2d76bbc23a7e6e9772942609f22c128dc8bbcf91651bddceea296299cb6c1009f33352e8e5be
@@ -226,7 +226,7 @@ module Repull
226
226
  end
227
227
 
228
228
  # Disconnect provider
229
- # Disconnect ONE connected account of a provider from this workspace. Supported for `airbnb` and `booking`. **Which account.** Pass `accountId` — for Airbnb the host id (`accounts[].externalAccountId` from `GET /v1/connect/airbnb`), for Booking.com the hotel id. 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. 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).
229
+ # Disconnect ONE connected account of a provider from this workspace. Supported for `airbnb`, `booking` and `vrbo-login`. **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 `accounts[].externalAccountId` from `GET /v1/connect/vrbo-login`. 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. 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).
230
230
  # @param provider [String] PMS provider slug (e.g., hostaway, guesty, ownerrez)
231
231
  # @param [Hash] opts the optional parameters
232
232
  # @option opts [String] :account_id The account to disconnect: the Airbnb host id (`accounts[].externalAccountId` on `GET /v1/connect/airbnb`) or the Booking.com hotel id. Required when the workspace has more than one connected account for the provider. Not the same as the `X-Account-Id` header.
@@ -237,7 +237,7 @@ module Repull
237
237
  end
238
238
 
239
239
  # Disconnect provider
240
- # Disconnect ONE connected account of a provider from this workspace. Supported for `airbnb` and `booking`. **Which account.** Pass `accountId` — for Airbnb the host id (`accounts[].externalAccountId` from `GET /v1/connect/airbnb`), for Booking.com the hotel id. 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. 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).
240
+ # Disconnect ONE connected account of a provider from this workspace. Supported for `airbnb`, `booking` and `vrbo-login`. **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 `accounts[].externalAccountId` from `GET /v1/connect/vrbo-login`. 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. 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).
241
241
  # @param provider [String] PMS provider slug (e.g., hostaway, guesty, ownerrez)
242
242
  # @param [Hash] opts the optional parameters
243
243
  # @option opts [String] :account_id The account to disconnect: the Airbnb host id (`accounts[].externalAccountId` on `GET /v1/connect/airbnb`) or the Booking.com hotel id. Required when the workspace has more than one connected account for the provider. Not the same as the `X-Account-Id` header.
@@ -369,11 +369,11 @@ module Repull
369
369
  end
370
370
 
371
371
  # Get a listing
372
- # Fetch a single listing by id. Returns the same shape as one element of the `GET /v1/listings` response, so you can bind the result to the same model. Cross-tenant access (a listing that belongs to a different workspace) returns 404 — never 403, never reveals the listing's existence. **Optional expansions:** Pass `?include=amenities` to enrich the response with the listing's amenity rows (`[]` when the listing has none). Pass `?include=content` for the rich content slab (summary, description, space, house rules, etc. — sourced from `listings_descriptions` for the `en` locale; `null` when no row is stored). Pass `?include=details` for the structural slab (bedrooms, bathrooms, person capacity, check-in window, wifi, house manual, etc.; `null` when no row is stored). Combine comma-separated, e.g. `?include=amenities,content,details`. The default response stays lean; consumers must opt in. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
372
+ # Fetch a single listing by id. Returns the same shape as one element of the `GET /v1/listings` response, so you can bind the result to the same model. Cross-tenant access (a listing that belongs to a different workspace) returns 404 — never 403, never reveals the listing's existence. **Optional expansions:** Pass `?include=amenities` to enrich the response with the listing's amenity rows (`[]` when the listing has none). Pass `?include=content` for the rich content slab (summary, description, space, house rules, etc. — sourced from `listings_descriptions` for the `en` locale; `null` when no row is stored). Pass `?include=details` for the structural slab (bedrooms, bathrooms, person capacity, check-in window, wifi, house manual, etc.; `null` when no row is stored). Pass `?include=rooms` for rooms and beds, `policies` for cancellation, house rules, check-in/out and guest rules, `rules` for stay rules (min/max nights, booking window, notice, preparation time), `pricing` for standing prices and discounts, `fees` and `taxes` for every fee and tax in one shape whatever channel or PMS the listing comes from, and `photos`. Combine comma-separated, e.g. `?include=content,details,rooms,policies,pricing,fees,taxes`. The default response stays lean; consumers must opt in. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
373
373
  # @param id [Integer] Repull listing id
374
374
  # @param [Hash] opts the optional parameters
375
375
  # @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: `native` (default), `calry`, `calry-v1`. Custom: any schema name created via `POST /v1/schema/custom`. Unknown / inactive schema names fall back to `native`.
376
- # @option opts [String] :include Comma-separated optional expansions. Currently supported: `amenities`, `content`, `details`. Unknown values return 422 with a `valid_values` envelope.
376
+ # @option opts [String] :include Comma-separated optional expansions. Currently supported: `amenities`, `content`, `details`, `rooms`, `policies`, `rules`, `pricing`, `fees`, `taxes`, `photos`. Unknown values return 422 with a `valid_values` envelope.
377
377
  # @return [Listing]
378
378
  def get_listing(id, opts = {})
379
379
  data, _status_code, _headers = get_listing_with_http_info(id, opts)
@@ -381,11 +381,11 @@ module Repull
381
381
  end
382
382
 
383
383
  # Get a listing
384
- # Fetch a single listing by id. Returns the same shape as one element of the `GET /v1/listings` response, so you can bind the result to the same model. Cross-tenant access (a listing that belongs to a different workspace) returns 404 — never 403, never reveals the listing's existence. **Optional expansions:** Pass `?include=amenities` to enrich the response with the listing's amenity rows (`[]` when the listing has none). Pass `?include=content` for the rich content slab (summary, description, space, house rules, etc. — sourced from `listings_descriptions` for the `en` locale; `null` when no row is stored). Pass `?include=details` for the structural slab (bedrooms, bathrooms, person capacity, check-in window, wifi, house manual, etc.; `null` when no row is stored). Combine comma-separated, e.g. `?include=amenities,content,details`. The default response stays lean; consumers must opt in. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
384
+ # Fetch a single listing by id. Returns the same shape as one element of the `GET /v1/listings` response, so you can bind the result to the same model. Cross-tenant access (a listing that belongs to a different workspace) returns 404 — never 403, never reveals the listing's existence. **Optional expansions:** Pass `?include=amenities` to enrich the response with the listing's amenity rows (`[]` when the listing has none). Pass `?include=content` for the rich content slab (summary, description, space, house rules, etc. — sourced from `listings_descriptions` for the `en` locale; `null` when no row is stored). Pass `?include=details` for the structural slab (bedrooms, bathrooms, person capacity, check-in window, wifi, house manual, etc.; `null` when no row is stored). Pass `?include=rooms` for rooms and beds, `policies` for cancellation, house rules, check-in/out and guest rules, `rules` for stay rules (min/max nights, booking window, notice, preparation time), `pricing` for standing prices and discounts, `fees` and `taxes` for every fee and tax in one shape whatever channel or PMS the listing comes from, and `photos`. Combine comma-separated, e.g. `?include=content,details,rooms,policies,pricing,fees,taxes`. The default response stays lean; consumers must opt in. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
385
385
  # @param id [Integer] Repull listing id
386
386
  # @param [Hash] opts the optional parameters
387
387
  # @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: `native` (default), `calry`, `calry-v1`. Custom: any schema name created via `POST /v1/schema/custom`. Unknown / inactive schema names fall back to `native`.
388
- # @option opts [String] :include Comma-separated optional expansions. Currently supported: `amenities`, `content`, `details`. Unknown values return 422 with a `valid_values` envelope.
388
+ # @option opts [String] :include Comma-separated optional expansions. Currently supported: `amenities`, `content`, `details`, `rooms`, `policies`, `rules`, `pricing`, `fees`, `taxes`, `photos`. Unknown values return 422 with a `valid_values` envelope.
389
389
  # @return [Array<(Listing, Integer, Hash)>] Listing data, response status code and response headers
390
390
  def get_listing_with_http_info(id, opts = {})
391
391
  if @api_client.config.debugging
@@ -753,7 +753,7 @@ module Repull
753
753
  end
754
754
 
755
755
  # List listings
756
- # Cursor-paginated list of listings owned by the authenticated workspace. Use `pagination.nextCursor` from one response as the `cursor` query param of the next request to walk the full set. `?offset=` is also accepted as a first-class alias for shallow paging (0..10000) — see the `offset` parameter below. Mutually exclusive with `cursor`. Filters: `q` (substring on name/street/city), `status`, `channel`. **Optional expansions:** Pass `?include=content` to enrich each row with the rich content slab (summary, description, space, house rules, etc. — sourced from `listings_descriptions` for the `en` locale). Pass `?include=details` for the structural slab (bedrooms, bathrooms, person capacity, check-in window, wifi, house manual, etc.). Both default to `null` per row when the underlying `listings_descriptions` / `listings_details` row is missing — distinct from the field being absent (which signals the expansion was not requested). Pass `?include=thumbnail` to guarantee `thumbnailUrl` on every returned row — including the reduced inactive ones. Combine comma-separated, e.g. `?include=content,thumbnail`. The default response stays lean; consumers must opt in. **Inactive listings:** by default only active listings are returned. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated, so when `status` asks for inactive ones they carry only `id`, `name`, `status` and `channels` — enough to choose what to activate with `PATCH /v1/listings/{id}`. The `content` and `details` expansions are not applied to them. `?include=thumbnail` is the one exception: it adds `thumbnailUrl` to an inactive row so a single request can render an active/inactive selection screen with pictures, instead of one follow-up call per listing (which an inactive listing would answer with `403 listing_inactive` anyway).
756
+ # Cursor-paginated list of listings owned by the authenticated workspace. Use `pagination.nextCursor` from one response as the `cursor` query param of the next request to walk the full set. `?offset=` is also accepted as a first-class alias for shallow paging (0..10000) — see the `offset` parameter below. Mutually exclusive with `cursor`. Filters: `q` (substring on name/street/city), `status`, `channel`. **Optional expansions:** Pass `?include=content` to enrich each row with the rich content slab (summary, description, space, house rules, etc. — sourced from `listings_descriptions` for the `en` locale). Pass `?include=details` for the structural slab (bedrooms, bathrooms, person capacity, check-in window, wifi, house manual, etc.). Both default to `null` per row when the underlying `listings_descriptions` / `listings_details` row is missing — distinct from the field being absent (which signals the expansion was not requested). Pass `?include=thumbnail` to guarantee `thumbnailUrl` on every returned row — including the reduced inactive ones. Pass `rooms`, `policies`, `rules`, `pricing`, `fees`, `taxes` or `photos` for the same sections as `GET /v1/listings/{id}`, loaded for the whole page in one go. Combine comma-separated, e.g. `?include=content,thumbnail`. The default response stays lean; consumers must opt in. **Inactive listings:** by default only active listings are returned. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated, so when `status` asks for inactive ones they carry only `id`, `name`, `status` and `channels` — enough to choose what to activate with `PATCH /v1/listings/{id}`. The `content` and `details` expansions are not applied to them. `?include=thumbnail` is the one exception: it adds `thumbnailUrl` to an inactive row so a single request can render an active/inactive selection screen with pictures, instead of one follow-up call per listing (which an inactive listing would answer with `403 listing_inactive` anyway).
757
757
  # @param [Hash] opts the optional parameters
758
758
  # @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: &#x60;native&#x60; (default), &#x60;calry&#x60;, &#x60;calry-v1&#x60;. Custom: any schema name created via &#x60;POST /v1/schema/custom&#x60;. Unknown / inactive schema names fall back to &#x60;native&#x60;.
759
759
  # @option opts [String] :cursor Opaque cursor returned in the previous response&#39;s &#x60;pagination.nextCursor&#x60;. Omit to fetch the first page.
@@ -762,7 +762,7 @@ module Repull
762
762
  # @option opts [String] :q Case-insensitive substring search on name, street, or city.
763
763
  # @option opts [String] :status Filter by listing status. Defaults to &#x60;active&#x60;. Pass &#x60;inactive&#x60; to list the listings you can activate, &#x60;archived&#x60; for archived ones, or &#x60;all&#x60; for every status. Inactive listings are returned with identity fields only — &#x60;id&#x60;, &#x60;name&#x60;, &#x60;status&#x60;, &#x60;inactiveReason&#x60; (&#x60;plan_limit&#x60;, &#x60;unlisted_on_airbnb&#x60; or &#x60;deactivated&#x60;), &#x60;address.city&#x60; and &#x60;channels&#x60; — and never with the street, &#x60;content&#x60; or &#x60;details&#x60;; activate one to see the rest. The only field you can add to an inactive row is &#x60;thumbnailUrl&#x60;, via &#x60;?include&#x3D;thumbnail&#x60;. (default to 'active')
764
764
  # @option opts [String] :channel Restrict to listings published on the given channel (&#x60;airbnb&#x60;, &#x60;booking&#x60;, &#x60;vrbo&#x60;, etc.). Joins through &#x60;listing_platform_links&#x60; and matches active links only.
765
- # @option opts [String] :include Comma-separated optional expansions. Currently supported: &#x60;content&#x60;, &#x60;details&#x60;, &#x60;thumbnail&#x60;. &#x60;thumbnail&#x60; guarantees &#x60;thumbnailUrl&#x60; on every row and is the only expansion that applies to inactive listings. Unknown values return 422 with a &#x60;valid_values&#x60; envelope. (Note: &#x60;amenities&#x60; is not yet supported on the list endpoint — use the detail endpoint to fetch amenity rows for a single listing.)
765
+ # @option opts [String] :include Comma-separated optional expansions. Currently supported: &#x60;content&#x60;, &#x60;details&#x60;, &#x60;thumbnail&#x60;, &#x60;rooms&#x60;, &#x60;policies&#x60;, &#x60;rules&#x60;, &#x60;pricing&#x60;, &#x60;fees&#x60;, &#x60;taxes&#x60;, &#x60;photos&#x60; (the last seven are described on &#x60;GET /v1/listings/{id}&#x60;; read for the whole page at once). &#x60;thumbnail&#x60; guarantees &#x60;thumbnailUrl&#x60; on every row and is the only expansion that applies to inactive listings. Unknown values return 422 with a &#x60;valid_values&#x60; envelope. (Note: &#x60;amenities&#x60; is not yet supported on the list endpoint — use the detail endpoint to fetch amenity rows for a single listing.)
766
766
  # @return [ListingListResponse]
767
767
  def list_listings(opts = {})
768
768
  data, _status_code, _headers = list_listings_with_http_info(opts)
@@ -770,7 +770,7 @@ module Repull
770
770
  end
771
771
 
772
772
  # List listings
773
- # Cursor-paginated list of listings owned by the authenticated workspace. Use &#x60;pagination.nextCursor&#x60; from one response as the &#x60;cursor&#x60; query param of the next request to walk the full set. &#x60;?offset&#x3D;&#x60; is also accepted as a first-class alias for shallow paging (0..10000) — see the &#x60;offset&#x60; parameter below. Mutually exclusive with &#x60;cursor&#x60;. Filters: &#x60;q&#x60; (substring on name/street/city), &#x60;status&#x60;, &#x60;channel&#x60;. **Optional expansions:** Pass &#x60;?include&#x3D;content&#x60; to enrich each row with the rich content slab (summary, description, space, house rules, etc. — sourced from &#x60;listings_descriptions&#x60; for the &#x60;en&#x60; locale). Pass &#x60;?include&#x3D;details&#x60; for the structural slab (bedrooms, bathrooms, person capacity, check-in window, wifi, house manual, etc.). Both default to &#x60;null&#x60; per row when the underlying &#x60;listings_descriptions&#x60; / &#x60;listings_details&#x60; row is missing — distinct from the field being absent (which signals the expansion was not requested). Pass &#x60;?include&#x3D;thumbnail&#x60; to guarantee &#x60;thumbnailUrl&#x60; on every returned row — including the reduced inactive ones. Combine comma-separated, e.g. &#x60;?include&#x3D;content,thumbnail&#x60;. The default response stays lean; consumers must opt in. **Inactive listings:** by default only active listings are returned. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated, so when &#x60;status&#x60; asks for inactive ones they carry only &#x60;id&#x60;, &#x60;name&#x60;, &#x60;status&#x60; and &#x60;channels&#x60; — enough to choose what to activate with &#x60;PATCH /v1/listings/{id}&#x60;. The &#x60;content&#x60; and &#x60;details&#x60; expansions are not applied to them. &#x60;?include&#x3D;thumbnail&#x60; is the one exception: it adds &#x60;thumbnailUrl&#x60; to an inactive row so a single request can render an active/inactive selection screen with pictures, instead of one follow-up call per listing (which an inactive listing would answer with &#x60;403 listing_inactive&#x60; anyway).
773
+ # Cursor-paginated list of listings owned by the authenticated workspace. Use &#x60;pagination.nextCursor&#x60; from one response as the &#x60;cursor&#x60; query param of the next request to walk the full set. &#x60;?offset&#x3D;&#x60; is also accepted as a first-class alias for shallow paging (0..10000) — see the &#x60;offset&#x60; parameter below. Mutually exclusive with &#x60;cursor&#x60;. Filters: &#x60;q&#x60; (substring on name/street/city), &#x60;status&#x60;, &#x60;channel&#x60;. **Optional expansions:** Pass &#x60;?include&#x3D;content&#x60; to enrich each row with the rich content slab (summary, description, space, house rules, etc. — sourced from &#x60;listings_descriptions&#x60; for the &#x60;en&#x60; locale). Pass &#x60;?include&#x3D;details&#x60; for the structural slab (bedrooms, bathrooms, person capacity, check-in window, wifi, house manual, etc.). Both default to &#x60;null&#x60; per row when the underlying &#x60;listings_descriptions&#x60; / &#x60;listings_details&#x60; row is missing — distinct from the field being absent (which signals the expansion was not requested). Pass &#x60;?include&#x3D;thumbnail&#x60; to guarantee &#x60;thumbnailUrl&#x60; on every returned row — including the reduced inactive ones. Pass &#x60;rooms&#x60;, &#x60;policies&#x60;, &#x60;rules&#x60;, &#x60;pricing&#x60;, &#x60;fees&#x60;, &#x60;taxes&#x60; or &#x60;photos&#x60; for the same sections as &#x60;GET /v1/listings/{id}&#x60;, loaded for the whole page in one go. Combine comma-separated, e.g. &#x60;?include&#x3D;content,thumbnail&#x60;. The default response stays lean; consumers must opt in. **Inactive listings:** by default only active listings are returned. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated, so when &#x60;status&#x60; asks for inactive ones they carry only &#x60;id&#x60;, &#x60;name&#x60;, &#x60;status&#x60; and &#x60;channels&#x60; — enough to choose what to activate with &#x60;PATCH /v1/listings/{id}&#x60;. The &#x60;content&#x60; and &#x60;details&#x60; expansions are not applied to them. &#x60;?include&#x3D;thumbnail&#x60; is the one exception: it adds &#x60;thumbnailUrl&#x60; to an inactive row so a single request can render an active/inactive selection screen with pictures, instead of one follow-up call per listing (which an inactive listing would answer with &#x60;403 listing_inactive&#x60; anyway).
774
774
  # @param [Hash] opts the optional parameters
775
775
  # @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: &#x60;native&#x60; (default), &#x60;calry&#x60;, &#x60;calry-v1&#x60;. Custom: any schema name created via &#x60;POST /v1/schema/custom&#x60;. Unknown / inactive schema names fall back to &#x60;native&#x60;.
776
776
  # @option opts [String] :cursor Opaque cursor returned in the previous response&#39;s &#x60;pagination.nextCursor&#x60;. Omit to fetch the first page.
@@ -779,7 +779,7 @@ module Repull
779
779
  # @option opts [String] :q Case-insensitive substring search on name, street, or city.
780
780
  # @option opts [String] :status Filter by listing status. Defaults to &#x60;active&#x60;. Pass &#x60;inactive&#x60; to list the listings you can activate, &#x60;archived&#x60; for archived ones, or &#x60;all&#x60; for every status. Inactive listings are returned with identity fields only — &#x60;id&#x60;, &#x60;name&#x60;, &#x60;status&#x60;, &#x60;inactiveReason&#x60; (&#x60;plan_limit&#x60;, &#x60;unlisted_on_airbnb&#x60; or &#x60;deactivated&#x60;), &#x60;address.city&#x60; and &#x60;channels&#x60; — and never with the street, &#x60;content&#x60; or &#x60;details&#x60;; activate one to see the rest. The only field you can add to an inactive row is &#x60;thumbnailUrl&#x60;, via &#x60;?include&#x3D;thumbnail&#x60;. (default to 'active')
781
781
  # @option opts [String] :channel Restrict to listings published on the given channel (&#x60;airbnb&#x60;, &#x60;booking&#x60;, &#x60;vrbo&#x60;, etc.). Joins through &#x60;listing_platform_links&#x60; and matches active links only.
782
- # @option opts [String] :include Comma-separated optional expansions. Currently supported: &#x60;content&#x60;, &#x60;details&#x60;, &#x60;thumbnail&#x60;. &#x60;thumbnail&#x60; guarantees &#x60;thumbnailUrl&#x60; on every row and is the only expansion that applies to inactive listings. Unknown values return 422 with a &#x60;valid_values&#x60; envelope. (Note: &#x60;amenities&#x60; is not yet supported on the list endpoint — use the detail endpoint to fetch amenity rows for a single listing.)
782
+ # @option opts [String] :include Comma-separated optional expansions. Currently supported: &#x60;content&#x60;, &#x60;details&#x60;, &#x60;thumbnail&#x60;, &#x60;rooms&#x60;, &#x60;policies&#x60;, &#x60;rules&#x60;, &#x60;pricing&#x60;, &#x60;fees&#x60;, &#x60;taxes&#x60;, &#x60;photos&#x60; (the last seven are described on &#x60;GET /v1/listings/{id}&#x60;; read for the whole page at once). &#x60;thumbnail&#x60; guarantees &#x60;thumbnailUrl&#x60; on every row and is the only expansion that applies to inactive listings. Unknown values return 422 with a &#x60;valid_values&#x60; envelope. (Note: &#x60;amenities&#x60; is not yet supported on the list endpoint — use the detail endpoint to fetch amenity rows for a single listing.)
783
783
  # @return [Array<(ListingListResponse, Integer, Hash)>] ListingListResponse data, response status code and response headers
784
784
  def list_listings_with_http_info(opts = {})
785
785
  if @api_client.config.debugging
@@ -408,6 +408,74 @@ module Repull
408
408
  return data, status_code, headers
409
409
  end
410
410
 
411
+ # Import from Channex
412
+ # Move a workspace off Channex without changing a single id on your side. Pass your Channex API key: Repull reads your Channex properties, room types, rate plans, webhooks, signing keys, channels and upcoming bookings through Channex's own API (read-only — nothing is written to Channex, and the key is not stored). Each Channex property is matched to your Repull listing or hotel (by Booking.com hotel/room and Airbnb/Vrbo listing ids, then by title and address) or created; every Channex id then resolves, and is returned, unchanged on the Channex-compatible API at `/channex/api/v1`. Webhooks are recreated inactive; activate them with `POST /channex/api/v1/migration/cutover`. Safe to re-run: a run that hits its time budget returns `complete: false` and the next run continues.
413
+ # @param import_from_channex_request [ImportFromChannexRequest]
414
+ # @param [Hash] opts the optional parameters
415
+ # @return [ImportFromChannex200Response]
416
+ def import_from_channex(import_from_channex_request, opts = {})
417
+ data, _status_code, _headers = import_from_channex_with_http_info(import_from_channex_request, opts)
418
+ data
419
+ end
420
+
421
+ # Import from Channex
422
+ # Move a workspace off Channex without changing a single id on your side. Pass your Channex API key: Repull reads your Channex properties, room types, rate plans, webhooks, signing keys, channels and upcoming bookings through Channex&#39;s own API (read-only — nothing is written to Channex, and the key is not stored). Each Channex property is matched to your Repull listing or hotel (by Booking.com hotel/room and Airbnb/Vrbo listing ids, then by title and address) or created; every Channex id then resolves, and is returned, unchanged on the Channex-compatible API at &#x60;/channex/api/v1&#x60;. Webhooks are recreated inactive; activate them with &#x60;POST /channex/api/v1/migration/cutover&#x60;. Safe to re-run: a run that hits its time budget returns &#x60;complete: false&#x60; and the next run continues.
423
+ # @param import_from_channex_request [ImportFromChannexRequest]
424
+ # @param [Hash] opts the optional parameters
425
+ # @return [Array<(ImportFromChannex200Response, Integer, Hash)>] ImportFromChannex200Response data, response status code and response headers
426
+ def import_from_channex_with_http_info(import_from_channex_request, opts = {})
427
+ if @api_client.config.debugging
428
+ @api_client.config.logger.debug 'Calling API: MigrateApi.import_from_channex ...'
429
+ end
430
+ # verify the required parameter 'import_from_channex_request' is set
431
+ if @api_client.config.client_side_validation && import_from_channex_request.nil?
432
+ fail ArgumentError, "Missing the required parameter 'import_from_channex_request' when calling MigrateApi.import_from_channex"
433
+ end
434
+ # resource path
435
+ local_var_path = '/v1/migrations/channex'
436
+
437
+ # query parameters
438
+ query_params = opts[:query_params] || {}
439
+
440
+ # header parameters
441
+ header_params = opts[:header_params] || {}
442
+ # HTTP header 'Accept' (if needed)
443
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
444
+ # HTTP header 'Content-Type'
445
+ content_type = @api_client.select_header_content_type(['application/json'])
446
+ if !content_type.nil?
447
+ header_params['Content-Type'] = content_type
448
+ end
449
+
450
+ # form parameters
451
+ form_params = opts[:form_params] || {}
452
+
453
+ # http body (model)
454
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(import_from_channex_request)
455
+
456
+ # return_type
457
+ return_type = opts[:debug_return_type] || 'ImportFromChannex200Response'
458
+
459
+ # auth_names
460
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
461
+
462
+ new_options = opts.merge(
463
+ :operation => :"MigrateApi.import_from_channex",
464
+ :header_params => header_params,
465
+ :query_params => query_params,
466
+ :form_params => form_params,
467
+ :body => post_body,
468
+ :auth_names => auth_names,
469
+ :return_type => return_type
470
+ )
471
+
472
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
473
+ if @api_client.config.debugging
474
+ @api_client.config.logger.debug "API called: MigrateApi#import_from_channex\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
475
+ end
476
+ return data, status_code, headers
477
+ end
478
+
411
479
  # List migrations
412
480
  # Every property manager your workspace has moved through Repull Migrate, newest first, each with where it stands. Page with `pagination.nextCursor`.
413
481
  # @param [Hash] opts the optional parameters
@@ -0,0 +1,281 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resetsAt` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | unlimited (10 included, then billed per listing) | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Repull
17
+ class BookingUnacknowledgedEvent < ApiModelBase
18
+ # The event name. This field is `event`, not `type`.
19
+ attr_accessor :event
20
+
21
+ # Stable across every delivery and replay of this logical event — dedupe on it.
22
+ attr_accessor :event_id
23
+
24
+ attr_accessor :api_version
25
+
26
+ # When this delivery was built.
27
+ attr_accessor :timestamp
28
+
29
+ attr_accessor :account
30
+
31
+ attr_accessor :data
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'event' => :'event',
37
+ :'event_id' => :'eventId',
38
+ :'api_version' => :'apiVersion',
39
+ :'timestamp' => :'timestamp',
40
+ :'account' => :'account',
41
+ :'data' => :'data'
42
+ }
43
+ end
44
+
45
+ # Returns attribute mapping this model knows about
46
+ def self.acceptable_attribute_map
47
+ attribute_map
48
+ end
49
+
50
+ # Returns all the JSON keys this model knows about
51
+ def self.acceptable_attributes
52
+ acceptable_attribute_map.values
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.openapi_types
57
+ {
58
+ :'event' => :'String',
59
+ :'event_id' => :'String',
60
+ :'api_version' => :'String',
61
+ :'timestamp' => :'Time',
62
+ :'account' => :'WebhookEventAccount',
63
+ :'data' => :'BookingUnacknowledgedPayload'
64
+ }
65
+ end
66
+
67
+ # List of attributes with nullable: true
68
+ def self.openapi_nullable
69
+ Set.new([
70
+ :'account',
71
+ ])
72
+ end
73
+
74
+ # Initializes the object
75
+ # @param [Hash] attributes Model attributes in the form of hash
76
+ def initialize(attributes = {})
77
+ if (!attributes.is_a?(Hash))
78
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::BookingUnacknowledgedEvent` initialize method"
79
+ end
80
+
81
+ # check to see if the attribute exists and convert string to symbol for hash key
82
+ acceptable_attribute_map = self.class.acceptable_attribute_map
83
+ attributes = attributes.each_with_object({}) { |(k, v), h|
84
+ if (!acceptable_attribute_map.key?(k.to_sym))
85
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::BookingUnacknowledgedEvent`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
86
+ end
87
+ h[k.to_sym] = v
88
+ }
89
+
90
+ if attributes.key?(:'event')
91
+ self.event = attributes[:'event']
92
+ else
93
+ self.event = nil
94
+ end
95
+
96
+ if attributes.key?(:'event_id')
97
+ self.event_id = attributes[:'event_id']
98
+ else
99
+ self.event_id = nil
100
+ end
101
+
102
+ if attributes.key?(:'api_version')
103
+ self.api_version = attributes[:'api_version']
104
+ else
105
+ self.api_version = nil
106
+ end
107
+
108
+ if attributes.key?(:'timestamp')
109
+ self.timestamp = attributes[:'timestamp']
110
+ else
111
+ self.timestamp = nil
112
+ end
113
+
114
+ if attributes.key?(:'account')
115
+ self.account = attributes[:'account']
116
+ end
117
+
118
+ if attributes.key?(:'data')
119
+ self.data = attributes[:'data']
120
+ else
121
+ self.data = nil
122
+ end
123
+ end
124
+
125
+ # Show invalid properties with the reasons. Usually used together with valid?
126
+ # @return Array for valid properties with the reasons
127
+ def list_invalid_properties
128
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
129
+ invalid_properties = Array.new
130
+ if @event.nil?
131
+ invalid_properties.push('invalid value for "event", event cannot be nil.')
132
+ end
133
+
134
+ if @event_id.nil?
135
+ invalid_properties.push('invalid value for "event_id", event_id cannot be nil.')
136
+ end
137
+
138
+ if @api_version.nil?
139
+ invalid_properties.push('invalid value for "api_version", api_version cannot be nil.')
140
+ end
141
+
142
+ if @timestamp.nil?
143
+ invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
144
+ end
145
+
146
+ if @data.nil?
147
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
148
+ end
149
+
150
+ invalid_properties
151
+ end
152
+
153
+ # Check to see if the all the properties in the model are valid
154
+ # @return true if the model is valid
155
+ def valid?
156
+ warn '[DEPRECATED] the `valid?` method is obsolete'
157
+ return false if @event.nil?
158
+ return false if @event_id.nil?
159
+ return false if @api_version.nil?
160
+ return false if @timestamp.nil?
161
+ return false if @data.nil?
162
+ true
163
+ end
164
+
165
+ # Custom attribute writer method with validation
166
+ # @param [Object] event Value to be assigned
167
+ def event=(event)
168
+ if event.nil?
169
+ fail ArgumentError, 'event cannot be nil'
170
+ end
171
+
172
+ @event = event
173
+ end
174
+
175
+ # Custom attribute writer method with validation
176
+ # @param [Object] event_id Value to be assigned
177
+ def event_id=(event_id)
178
+ if event_id.nil?
179
+ fail ArgumentError, 'event_id cannot be nil'
180
+ end
181
+
182
+ @event_id = event_id
183
+ end
184
+
185
+ # Custom attribute writer method with validation
186
+ # @param [Object] api_version Value to be assigned
187
+ def api_version=(api_version)
188
+ if api_version.nil?
189
+ fail ArgumentError, 'api_version cannot be nil'
190
+ end
191
+
192
+ @api_version = api_version
193
+ end
194
+
195
+ # Custom attribute writer method with validation
196
+ # @param [Object] timestamp Value to be assigned
197
+ def timestamp=(timestamp)
198
+ if timestamp.nil?
199
+ fail ArgumentError, 'timestamp cannot be nil'
200
+ end
201
+
202
+ @timestamp = timestamp
203
+ end
204
+
205
+ # Custom attribute writer method with validation
206
+ # @param [Object] data Value to be assigned
207
+ def data=(data)
208
+ if data.nil?
209
+ fail ArgumentError, 'data cannot be nil'
210
+ end
211
+
212
+ @data = data
213
+ end
214
+
215
+ # Checks equality by comparing each attribute.
216
+ # @param [Object] Object to be compared
217
+ def ==(o)
218
+ return true if self.equal?(o)
219
+ self.class == o.class &&
220
+ event == o.event &&
221
+ event_id == o.event_id &&
222
+ api_version == o.api_version &&
223
+ timestamp == o.timestamp &&
224
+ account == o.account &&
225
+ data == o.data
226
+ end
227
+
228
+ # @see the `==` method
229
+ # @param [Object] Object to be compared
230
+ def eql?(o)
231
+ self == o
232
+ end
233
+
234
+ # Calculates hash code according to all attributes.
235
+ # @return [Integer] Hash code
236
+ def hash
237
+ [event, event_id, api_version, timestamp, account, data].hash
238
+ end
239
+
240
+ # Builds the object from hash
241
+ # @param [Hash] attributes Model attributes in the form of hash
242
+ # @return [Object] Returns the model itself
243
+ def self.build_from_hash(attributes)
244
+ return nil unless attributes.is_a?(Hash)
245
+ attributes = attributes.transform_keys(&:to_sym)
246
+ transformed_hash = {}
247
+ openapi_types.each_pair do |key, type|
248
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
249
+ transformed_hash["#{key}"] = nil
250
+ elsif type =~ /\AArray<(.*)>/i
251
+ # check to ensure the input is an array given that the attribute
252
+ # is documented as an array but the input is not
253
+ if attributes[attribute_map[key]].is_a?(Array)
254
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
255
+ end
256
+ elsif !attributes[attribute_map[key]].nil?
257
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
258
+ end
259
+ end
260
+ new(transformed_hash)
261
+ end
262
+
263
+ # Returns the object in the form of hash
264
+ # @return [Hash] Returns the object in the form of hash
265
+ def to_hash
266
+ hash = {}
267
+ self.class.attribute_map.each_pair do |attr, param|
268
+ value = self.send(attr)
269
+ if value.nil?
270
+ is_nullable = self.class.openapi_nullable.include?(attr)
271
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
272
+ end
273
+
274
+ hash[param] = _to_hash(value)
275
+ end
276
+ hash
277
+ end
278
+
279
+ end
280
+
281
+ end