repull 0.2.50 → 0.2.51
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.
- checksums.yaml +4 -4
- data/lib/repull/api/airbnb_api.rb +2 -2
- data/lib/repull/api/conversations_api.rb +2 -2
- data/lib/repull/models/account_notifications_missing_event.rb +282 -0
- data/lib/repull/models/account_notifications_missing_payload.rb +278 -0
- data/lib/repull/models/connect_status_accounts_inner.rb +12 -2
- data/lib/repull/models/conversation_message_status_changed_event.rb +282 -0
- data/lib/repull/models/conversation_message_status_changed_payload.rb +233 -0
- data/lib/repull/models/get_airbnb_booking_settings200_response_data_advance_notice.rb +14 -3
- data/lib/repull/models/guest.rb +35 -2
- data/lib/repull/models/guest_contact.rb +37 -5
- data/lib/repull/models/guest_phone_type.rb +40 -0
- data/lib/repull/models/guest_profile.rb +35 -1
- data/lib/repull/models/message.rb +2 -2
- data/lib/repull/models/reservation.rb +11 -1
- data/lib/repull/models/reservation_primary_guest.rb +45 -2
- data/lib/repull/models/send_message_response.rb +1 -0
- data/lib/repull/models/update_airbnb_booking_settings_request_advance_notice.rb +56 -17
- data/lib/repull/models/vrbo_notifications.rb +192 -0
- data/lib/repull/models/webhook_event.rb +4 -0
- data/lib/repull/models/webhook_event_type.rb +3 -1
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +6 -0
- data/openapi/v1.json +343 -17
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 98c14f748d4eecac90c8f09762635dd04f54c5de56a95cb5f6fc069ff181e6cc
|
|
4
|
+
data.tar.gz: c85b61e1dc84dc6fdbabb197a05dafc3f566899e70c21e01d39d1601543f7688
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6d1b9c643fb2c2427776813d81d6e017c11fd83a23c5119fd4906c341d6379d616a58e28b01a3955a018a753f3070170dc1df67188d1ee6ec998f463779af47
|
|
7
|
+
data.tar.gz: 1bc6818d8a1b841d5d4be6dc77cfeef9eba4820e711bd0dd226a36ab12aa0cf822da8324b9d0362a093de43c9f75209074db800f9d55812ab19b9eb6b7cad4ea
|
|
@@ -882,7 +882,7 @@ module Repull
|
|
|
882
882
|
end
|
|
883
883
|
|
|
884
884
|
# Get Airbnb booking settings
|
|
885
|
-
# Read how an Airbnb listing takes bookings and what happens when a guest cancels: booking mode, Instant Book state, the good-track-record requirement, check-in/check-out times, advance notice, preparation time, booking window, the short-stay and long-stay cancellation policies, and the non-refundable option. **This is Repull's stored copy, not a live call to Airbnb.** Values come from the local Airbnb mirror that the sync workers fill, so the response always carries `dataFreshness` — check `dataFreshness.stale` (and `dataFreshness.accounts[]` when the workspace has several Airbnb accounts) before treating a value as current. **Not exposed by Airbnb.** The pre-reservation message and automatic stay extension have no field on Airbnb's `booking_settings` resource, so neither can be read or written here; set the pre-reservation message in the Airbnb host dashboard, and handle extensions through `/v1/channels/airbnb/alterations`. Airbnb
|
|
885
|
+
# Read how an Airbnb listing takes bookings and what happens when a guest cancels: booking mode, Instant Book state, the good-track-record requirement, check-in/check-out times, advance notice, preparation time, booking window, the short-stay and long-stay cancellation policies, and the non-refundable option. **This is Repull's stored copy, not a live call to Airbnb.** Values come from the local Airbnb mirror that the sync workers fill, so the response always carries `dataFreshness` — check `dataFreshness.stale` (and `dataFreshness.accounts[]` when the workspace has several Airbnb accounts) before treating a value as current. **Not exposed by Airbnb.** The pre-reservation message and automatic stay extension have no field on Airbnb's `booking_settings` resource, so neither can be read or written here; set the pre-reservation message in the Airbnb host dashboard, and handle extensions through `/v1/channels/airbnb/alterations`. The same-day cutoff is Airbnb's advance-notice hours counted back from 11:59 PM on the check-in day: read it as `advanceNotice.sameDayCutoff` (e.g. `23:00`) or `advanceNotice.hours` (e.g. `1`), and write either one. Returns `404` when the listing has no Airbnb connection in this workspace, and `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.
|
|
886
886
|
# @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
|
|
887
887
|
# @param [Hash] opts the optional parameters
|
|
888
888
|
# @return [GetAirbnbBookingSettings200Response]
|
|
@@ -892,7 +892,7 @@ module Repull
|
|
|
892
892
|
end
|
|
893
893
|
|
|
894
894
|
# Get Airbnb booking settings
|
|
895
|
-
# Read how an Airbnb listing takes bookings and what happens when a guest cancels: booking mode, Instant Book state, the good-track-record requirement, check-in/check-out times, advance notice, preparation time, booking window, the short-stay and long-stay cancellation policies, and the non-refundable option. **This is Repull's stored copy, not a live call to Airbnb.** Values come from the local Airbnb mirror that the sync workers fill, so the response always carries `dataFreshness` — check `dataFreshness.stale` (and `dataFreshness.accounts[]` when the workspace has several Airbnb accounts) before treating a value as current. **Not exposed by Airbnb.** The pre-reservation message and automatic stay extension have no field on Airbnb's `booking_settings` resource, so neither can be read or written here; set the pre-reservation message in the Airbnb host dashboard, and handle extensions through `/v1/channels/airbnb/alterations`. Airbnb
|
|
895
|
+
# Read how an Airbnb listing takes bookings and what happens when a guest cancels: booking mode, Instant Book state, the good-track-record requirement, check-in/check-out times, advance notice, preparation time, booking window, the short-stay and long-stay cancellation policies, and the non-refundable option. **This is Repull's stored copy, not a live call to Airbnb.** Values come from the local Airbnb mirror that the sync workers fill, so the response always carries `dataFreshness` — check `dataFreshness.stale` (and `dataFreshness.accounts[]` when the workspace has several Airbnb accounts) before treating a value as current. **Not exposed by Airbnb.** The pre-reservation message and automatic stay extension have no field on Airbnb's `booking_settings` resource, so neither can be read or written here; set the pre-reservation message in the Airbnb host dashboard, and handle extensions through `/v1/channels/airbnb/alterations`. The same-day cutoff is Airbnb's advance-notice hours counted back from 11:59 PM on the check-in day: read it as `advanceNotice.sameDayCutoff` (e.g. `23:00`) or `advanceNotice.hours` (e.g. `1`), and write either one. Returns `404` when the listing has no Airbnb connection in this workspace, and `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.
|
|
896
896
|
# @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
|
|
897
897
|
# @param [Hash] opts the optional parameters
|
|
898
898
|
# @return [Array<(GetAirbnbBookingSettings200Response, Integer, Hash)>] GetAirbnbBookingSettings200Response data, response status code and response headers
|
|
@@ -691,7 +691,7 @@ module Repull
|
|
|
691
691
|
end
|
|
692
692
|
|
|
693
693
|
# Send a message to the guest
|
|
694
|
-
# Sends a message to the guest on this conversation and records it in the thread. Omit `channel` and the message goes out on whichever channel the conversation already uses (Airbnb, Booking.com, VRBO, SMS, email or the direct-booking site) — that is the right default. Pass `channel` only to force a specific one. The message is attributed to the API: it is recorded with `aiGenerated` false so an API send is never counted as an automated reply. ### Airbnb rewrites links — check `contentRewritten` Airbnb rejects guest messages containing a link, an email address or a phone number, and names the offending text. When that happens the offending fragment is stripped and the remainder is re-sent once, which means **the guest receives a message that is not the one you wrote**. Reporting that as a plain success would be a lie, so every response carries `contentRewritten`; when it is `true`, `deliveredContent` is the text that actually reached the guest. Check it before assuming your message went out verbatim. When the text cannot be salvaged (the link is most of the message) nothing is delivered and the call returns `422 message_not_sent` with the channel's verbatim refusal in `statusReason`. `message_not_sent` only ever means the channel refused: a fault on Repull's side (a dropped database connection, a timeout) is `503 internal_error` with `sent: false` when nothing was delivered — retry it unchanged with the same `Idempotency-Key`. Send `Idempotency-Key` — without it, retrying after a network timeout sends the guest the same message twice. ### Attachments Send files with `attachments: [{ url, contentType?, filename? }]` — public `https://` URLs, up to 5 per request, 10 MB each. `message` may be omitted when there are attachments (except on Booking.com). Repull downloads each file, reads its real type from the bytes, keeps a durable copy and delivers it through the channel's own file flow. **Every file is checked before anything is sent**: if one is unreachable, too large or of a type the channel refuses, the call returns 422 naming the file (`index`) and the guest receives nothing. | Channel | Accepted types | Text | How it arrives | |---|---|---|---| | Airbnb | JPEG, PNG, GIF, WebP (converted to JPEG), MP4, QuickTime | optional | each file as its own message, then the text as a separate message | | Booking.com | JPEG, PNG | **required** | one message carrying the text and every file | | VRBO, SMS, email, direct-booking site chat | — | — | `422 attachments_not_supported`, nothing sent | Airbnb does not allow files in pre-booking (inquiry) conversations; that refusal comes back as `422 message_not_sent`. Because Airbnb delivers files one message at a time, a later file can be refused after earlier ones arrived — that returns `422 message_partially_sent` with `parts` saying exactly which messages reached the guest; resend only the rest. The response's `attachments` lists each file's durable `url`, and `parts` lists every channel message the send produced. Read-back (`GET /v1/conversations/{id}/messages`) shows the same files in each message's `attachments`. **Inactive listings:** a conversation that belongs to an inactive listing returns `403 listing_inactive` and no message is sent. Activate the listing first.
|
|
694
|
+
# Sends a message to the guest on this conversation and records it in the thread. Omit `channel` and the message goes out on whichever channel the conversation already uses (Airbnb, Booking.com, VRBO, SMS, email or the direct-booking site) — that is the right default. Pass `channel` only to force a specific one. The message is attributed to the API: it is recorded with `aiGenerated` false so an API send is never counted as an automated reply. ### Airbnb rewrites links — check `contentRewritten` Airbnb rejects guest messages containing a link, an email address or a phone number, and names the offending text. When that happens the offending fragment is stripped and the remainder is re-sent once, which means **the guest receives a message that is not the one you wrote**. Reporting that as a plain success would be a lie, so every response carries `contentRewritten`; when it is `true`, `deliveredContent` is the text that actually reached the guest. Check it before assuming your message went out verbatim. When the text cannot be salvaged (the link is most of the message) nothing is delivered and the call returns `422 message_not_sent` with the channel's verbatim refusal in `statusReason`. `message_not_sent` only ever means the channel refused: a fault on Repull's side (a dropped database connection, a timeout) is `503 internal_error` with `sent: false` when nothing was delivered — retry it unchanged with the same `Idempotency-Key`. Send `Idempotency-Key` — without it, retrying after a network timeout sends the guest the same message twice. ### Vrbo: `202` while Vrbo is busy A Vrbo reply is delivered in the call when Vrbo takes it (about 20 seconds at most) and returns `200` with `status: \"sent\"`. When Vrbo is busy, the reply is recorded and delivered in the background: the call returns **`202` with `status: \"queued\"`** and the message `id`. Do not send it again — a retry with the same `Idempotency-Key` returns the same `202`. The outcome arrives as the message's `status` on `GET /v1/conversations/{id}/messages` (`sent`, or `failed` with `statusReason`) and as the `conversation.message.status_changed` webhook. ### Attachments Send files with `attachments: [{ url, contentType?, filename? }]` — public `https://` URLs, up to 5 per request, 10 MB each. `message` may be omitted when there are attachments (except on Booking.com). Repull downloads each file, reads its real type from the bytes, keeps a durable copy and delivers it through the channel's own file flow. **Every file is checked before anything is sent**: if one is unreachable, too large or of a type the channel refuses, the call returns 422 naming the file (`index`) and the guest receives nothing. | Channel | Accepted types | Text | How it arrives | |---|---|---|---| | Airbnb | JPEG, PNG, GIF, WebP (converted to JPEG), MP4, QuickTime | optional | each file as its own message, then the text as a separate message | | Booking.com | JPEG, PNG | **required** | one message carrying the text and every file | | VRBO, SMS, email, direct-booking site chat | — | — | `422 attachments_not_supported`, nothing sent | Airbnb does not allow files in pre-booking (inquiry) conversations; that refusal comes back as `422 message_not_sent`. Because Airbnb delivers files one message at a time, a later file can be refused after earlier ones arrived — that returns `422 message_partially_sent` with `parts` saying exactly which messages reached the guest; resend only the rest. The response's `attachments` lists each file's durable `url`, and `parts` lists every channel message the send produced. Read-back (`GET /v1/conversations/{id}/messages`) shows the same files in each message's `attachments`. **Inactive listings:** a conversation that belongs to an inactive listing returns `403 listing_inactive` and no message is sent. Activate the listing first.
|
|
695
695
|
# @param id [Integer] Internal Repull thread id.
|
|
696
696
|
# @param send_message_request [SendMessageRequest]
|
|
697
697
|
# @param [Hash] opts the optional parameters
|
|
@@ -703,7 +703,7 @@ module Repull
|
|
|
703
703
|
end
|
|
704
704
|
|
|
705
705
|
# Send a message to the guest
|
|
706
|
-
# Sends a message to the guest on this conversation and records it in the thread. Omit `channel` and the message goes out on whichever channel the conversation already uses (Airbnb, Booking.com, VRBO, SMS, email or the direct-booking site) — that is the right default. Pass `channel` only to force a specific one. The message is attributed to the API: it is recorded with `aiGenerated` false so an API send is never counted as an automated reply. ### Airbnb rewrites links — check `contentRewritten` Airbnb rejects guest messages containing a link, an email address or a phone number, and names the offending text. When that happens the offending fragment is stripped and the remainder is re-sent once, which means **the guest receives a message that is not the one you wrote**. Reporting that as a plain success would be a lie, so every response carries `contentRewritten`; when it is `true`, `deliveredContent` is the text that actually reached the guest. Check it before assuming your message went out verbatim. When the text cannot be salvaged (the link is most of the message) nothing is delivered and the call returns `422 message_not_sent` with the channel's verbatim refusal in `statusReason`. `message_not_sent` only ever means the channel refused: a fault on Repull's side (a dropped database connection, a timeout) is `503 internal_error` with `sent: false` when nothing was delivered — retry it unchanged with the same `Idempotency-Key`. Send `Idempotency-Key` — without it, retrying after a network timeout sends the guest the same message twice. ### Attachments Send files with `attachments: [{ url, contentType?, filename? }]` — public `https://` URLs, up to 5 per request, 10 MB each. `message` may be omitted when there are attachments (except on Booking.com). Repull downloads each file, reads its real type from the bytes, keeps a durable copy and delivers it through the channel's own file flow. **Every file is checked before anything is sent**: if one is unreachable, too large or of a type the channel refuses, the call returns 422 naming the file (`index`) and the guest receives nothing. | Channel | Accepted types | Text | How it arrives | |---|---|---|---| | Airbnb | JPEG, PNG, GIF, WebP (converted to JPEG), MP4, QuickTime | optional | each file as its own message, then the text as a separate message | | Booking.com | JPEG, PNG | **required** | one message carrying the text and every file | | VRBO, SMS, email, direct-booking site chat | — | — | `422 attachments_not_supported`, nothing sent | Airbnb does not allow files in pre-booking (inquiry) conversations; that refusal comes back as `422 message_not_sent`. Because Airbnb delivers files one message at a time, a later file can be refused after earlier ones arrived — that returns `422 message_partially_sent` with `parts` saying exactly which messages reached the guest; resend only the rest. The response's `attachments` lists each file's durable `url`, and `parts` lists every channel message the send produced. Read-back (`GET /v1/conversations/{id}/messages`) shows the same files in each message's `attachments`. **Inactive listings:** a conversation that belongs to an inactive listing returns `403 listing_inactive` and no message is sent. Activate the listing first.
|
|
706
|
+
# Sends a message to the guest on this conversation and records it in the thread. Omit `channel` and the message goes out on whichever channel the conversation already uses (Airbnb, Booking.com, VRBO, SMS, email or the direct-booking site) — that is the right default. Pass `channel` only to force a specific one. The message is attributed to the API: it is recorded with `aiGenerated` false so an API send is never counted as an automated reply. ### Airbnb rewrites links — check `contentRewritten` Airbnb rejects guest messages containing a link, an email address or a phone number, and names the offending text. When that happens the offending fragment is stripped and the remainder is re-sent once, which means **the guest receives a message that is not the one you wrote**. Reporting that as a plain success would be a lie, so every response carries `contentRewritten`; when it is `true`, `deliveredContent` is the text that actually reached the guest. Check it before assuming your message went out verbatim. When the text cannot be salvaged (the link is most of the message) nothing is delivered and the call returns `422 message_not_sent` with the channel's verbatim refusal in `statusReason`. `message_not_sent` only ever means the channel refused: a fault on Repull's side (a dropped database connection, a timeout) is `503 internal_error` with `sent: false` when nothing was delivered — retry it unchanged with the same `Idempotency-Key`. Send `Idempotency-Key` — without it, retrying after a network timeout sends the guest the same message twice. ### Vrbo: `202` while Vrbo is busy A Vrbo reply is delivered in the call when Vrbo takes it (about 20 seconds at most) and returns `200` with `status: \"sent\"`. When Vrbo is busy, the reply is recorded and delivered in the background: the call returns **`202` with `status: \"queued\"`** and the message `id`. Do not send it again — a retry with the same `Idempotency-Key` returns the same `202`. The outcome arrives as the message's `status` on `GET /v1/conversations/{id}/messages` (`sent`, or `failed` with `statusReason`) and as the `conversation.message.status_changed` webhook. ### Attachments Send files with `attachments: [{ url, contentType?, filename? }]` — public `https://` URLs, up to 5 per request, 10 MB each. `message` may be omitted when there are attachments (except on Booking.com). Repull downloads each file, reads its real type from the bytes, keeps a durable copy and delivers it through the channel's own file flow. **Every file is checked before anything is sent**: if one is unreachable, too large or of a type the channel refuses, the call returns 422 naming the file (`index`) and the guest receives nothing. | Channel | Accepted types | Text | How it arrives | |---|---|---|---| | Airbnb | JPEG, PNG, GIF, WebP (converted to JPEG), MP4, QuickTime | optional | each file as its own message, then the text as a separate message | | Booking.com | JPEG, PNG | **required** | one message carrying the text and every file | | VRBO, SMS, email, direct-booking site chat | — | — | `422 attachments_not_supported`, nothing sent | Airbnb does not allow files in pre-booking (inquiry) conversations; that refusal comes back as `422 message_not_sent`. Because Airbnb delivers files one message at a time, a later file can be refused after earlier ones arrived — that returns `422 message_partially_sent` with `parts` saying exactly which messages reached the guest; resend only the rest. The response's `attachments` lists each file's durable `url`, and `parts` lists every channel message the send produced. Read-back (`GET /v1/conversations/{id}/messages`) shows the same files in each message's `attachments`. **Inactive listings:** a conversation that belongs to an inactive listing returns `403 listing_inactive` and no message is sent. Activate the listing first.
|
|
707
707
|
# @param id [Integer] Internal Repull thread id.
|
|
708
708
|
# @param send_message_request [SendMessageRequest]
|
|
709
709
|
# @param [Hash] opts the optional parameters
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Repull API
|
|
3
|
+
|
|
4
|
+
#The unified API for vacation rental tech. Connect Airbnb, Booking.com, Vrbo and more channels, plus 14 PMS platforms, through one REST API. ## 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`, `limit`, `used` and `resets_at` fields. **The way past a request quota.** The monthly quota refusal (`429 rate_limit_exceeded` with `scope: \"monthly\"`), `402 credits_exhausted` and `429 daily_limit_exceeded` also carry `upgrade` (the cheapest plan that covers your usage: its exact monthly price for your listings, its request quotas and a `checkout_url` that opens checkout for that price; `plan: \"custom\"` with a `contact_email` when no self-serve plan covers it), `credits` (pay-as-you-go: `usd_per_1000_requests`, `top_up_url`, your `balance_usd`), `resets_at` and `projected_monthly_requests`. The per-minute 429 (`scope: \"per_api_key\"`) carries none of these: wait `Retry-After`. ## Plan listing limits Each plan includes a number of **active listings**: | Tier | Active listings | |---|---| | `free` | 3 | | `starter` | no cap: 10 included, then billed per listing | | `custom` | no cap | Going over the plan never blocks your API calls. Listings beyond the plan are **held back**: they stay connected and keep syncing, but they are not served. A held-back listing answers `403 listing_inactive` with `reason: \"plan_limit\"`, and collection routes leave it out. Every JSON response then carries a `planNotice` and the `X-Repull-Listings-Held-Back` header, so you know there is more to see. Choose which listings are active with `POST /v1/listings/status`. Upgrading at `https://repull.dev/dashboard/billing` lifts the cap but does not switch held-back listings on: you choose which to activate afterwards, with the same call or from the dashboard, and each one you switch on is billed from then. Only a call that would itself take you over the plan is refused, with **`402 listings_limit_exceeded`**: activating listings (`PATCH /v1/listings/{id}` with `{ \"active\": true }`, `POST /v1/listings/status`) or creating one (`POST /v1/listings`). Nothing else changes. The envelope carries the tier, the limit, the active count and an upgrade link next to the standard `code` / `message` / `fix` / `docs_url` / `request_id`. If an account has more active listings than its plan (for example after a downgrade), calls are still served and `planNotice` says so (code \"listings_over_plan\"). ## Failed payments If your plan's renewal payment fails, nothing is blocked: your API calls keep working while Stripe retries the card. Every successful JSON response then carries a `billingNotice` (code `payment_failed`) with the amount, when it failed, the next automatic retry (`nextRetryAt`) and `payUrl`, the invoice to pay. It disappears once the invoice is paid.
|
|
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
|
+
# A Vrbo account's notification emails are not arriving. Ask the host to add `data.notifications.address` on Vrbo as a secondary email with message and reservation notifications on.
|
|
18
|
+
class AccountNotificationsMissingEvent < ApiModelBase
|
|
19
|
+
# The event name. This field is `event`, not `type`.
|
|
20
|
+
attr_accessor :event
|
|
21
|
+
|
|
22
|
+
# Stable across every delivery and replay of this logical event — dedupe on it.
|
|
23
|
+
attr_accessor :event_id
|
|
24
|
+
|
|
25
|
+
attr_accessor :api_version
|
|
26
|
+
|
|
27
|
+
# When this delivery was built.
|
|
28
|
+
attr_accessor :timestamp
|
|
29
|
+
|
|
30
|
+
attr_accessor :account
|
|
31
|
+
|
|
32
|
+
attr_accessor :data
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'event' => :'event',
|
|
38
|
+
:'event_id' => :'eventId',
|
|
39
|
+
:'api_version' => :'apiVersion',
|
|
40
|
+
:'timestamp' => :'timestamp',
|
|
41
|
+
:'account' => :'account',
|
|
42
|
+
:'data' => :'data'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Returns attribute mapping this model knows about
|
|
47
|
+
def self.acceptable_attribute_map
|
|
48
|
+
attribute_map
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Returns all the JSON keys this model knows about
|
|
52
|
+
def self.acceptable_attributes
|
|
53
|
+
acceptable_attribute_map.values
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Attribute type mapping.
|
|
57
|
+
def self.openapi_types
|
|
58
|
+
{
|
|
59
|
+
:'event' => :'String',
|
|
60
|
+
:'event_id' => :'String',
|
|
61
|
+
:'api_version' => :'String',
|
|
62
|
+
:'timestamp' => :'Time',
|
|
63
|
+
:'account' => :'WebhookEventAccount',
|
|
64
|
+
:'data' => :'AccountNotificationsMissingPayload'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# List of attributes with nullable: true
|
|
69
|
+
def self.openapi_nullable
|
|
70
|
+
Set.new([
|
|
71
|
+
:'account',
|
|
72
|
+
])
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Initializes the object
|
|
76
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
77
|
+
def initialize(attributes = {})
|
|
78
|
+
if (!attributes.is_a?(Hash))
|
|
79
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::AccountNotificationsMissingEvent` initialize method"
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
83
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
85
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::AccountNotificationsMissingEvent`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
87
|
+
end
|
|
88
|
+
h[k.to_sym] = v
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'event')
|
|
92
|
+
self.event = attributes[:'event']
|
|
93
|
+
else
|
|
94
|
+
self.event = nil
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'event_id')
|
|
98
|
+
self.event_id = attributes[:'event_id']
|
|
99
|
+
else
|
|
100
|
+
self.event_id = nil
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'api_version')
|
|
104
|
+
self.api_version = attributes[:'api_version']
|
|
105
|
+
else
|
|
106
|
+
self.api_version = nil
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'timestamp')
|
|
110
|
+
self.timestamp = attributes[:'timestamp']
|
|
111
|
+
else
|
|
112
|
+
self.timestamp = nil
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'account')
|
|
116
|
+
self.account = attributes[:'account']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'data')
|
|
120
|
+
self.data = attributes[:'data']
|
|
121
|
+
else
|
|
122
|
+
self.data = nil
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
127
|
+
# @return Array for valid properties with the reasons
|
|
128
|
+
def list_invalid_properties
|
|
129
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
130
|
+
invalid_properties = Array.new
|
|
131
|
+
if @event.nil?
|
|
132
|
+
invalid_properties.push('invalid value for "event", event cannot be nil.')
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if @event_id.nil?
|
|
136
|
+
invalid_properties.push('invalid value for "event_id", event_id cannot be nil.')
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if @api_version.nil?
|
|
140
|
+
invalid_properties.push('invalid value for "api_version", api_version cannot be nil.')
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if @timestamp.nil?
|
|
144
|
+
invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if @data.nil?
|
|
148
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
invalid_properties
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Check to see if the all the properties in the model are valid
|
|
155
|
+
# @return true if the model is valid
|
|
156
|
+
def valid?
|
|
157
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
158
|
+
return false if @event.nil?
|
|
159
|
+
return false if @event_id.nil?
|
|
160
|
+
return false if @api_version.nil?
|
|
161
|
+
return false if @timestamp.nil?
|
|
162
|
+
return false if @data.nil?
|
|
163
|
+
true
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Custom attribute writer method with validation
|
|
167
|
+
# @param [Object] event Value to be assigned
|
|
168
|
+
def event=(event)
|
|
169
|
+
if event.nil?
|
|
170
|
+
fail ArgumentError, 'event cannot be nil'
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
@event = event
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Custom attribute writer method with validation
|
|
177
|
+
# @param [Object] event_id Value to be assigned
|
|
178
|
+
def event_id=(event_id)
|
|
179
|
+
if event_id.nil?
|
|
180
|
+
fail ArgumentError, 'event_id cannot be nil'
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
@event_id = event_id
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Custom attribute writer method with validation
|
|
187
|
+
# @param [Object] api_version Value to be assigned
|
|
188
|
+
def api_version=(api_version)
|
|
189
|
+
if api_version.nil?
|
|
190
|
+
fail ArgumentError, 'api_version cannot be nil'
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
@api_version = api_version
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Custom attribute writer method with validation
|
|
197
|
+
# @param [Object] timestamp Value to be assigned
|
|
198
|
+
def timestamp=(timestamp)
|
|
199
|
+
if timestamp.nil?
|
|
200
|
+
fail ArgumentError, 'timestamp cannot be nil'
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
@timestamp = timestamp
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Custom attribute writer method with validation
|
|
207
|
+
# @param [Object] data Value to be assigned
|
|
208
|
+
def data=(data)
|
|
209
|
+
if data.nil?
|
|
210
|
+
fail ArgumentError, 'data cannot be nil'
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
@data = data
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Checks equality by comparing each attribute.
|
|
217
|
+
# @param [Object] Object to be compared
|
|
218
|
+
def ==(o)
|
|
219
|
+
return true if self.equal?(o)
|
|
220
|
+
self.class == o.class &&
|
|
221
|
+
event == o.event &&
|
|
222
|
+
event_id == o.event_id &&
|
|
223
|
+
api_version == o.api_version &&
|
|
224
|
+
timestamp == o.timestamp &&
|
|
225
|
+
account == o.account &&
|
|
226
|
+
data == o.data
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# @see the `==` method
|
|
230
|
+
# @param [Object] Object to be compared
|
|
231
|
+
def eql?(o)
|
|
232
|
+
self == o
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Calculates hash code according to all attributes.
|
|
236
|
+
# @return [Integer] Hash code
|
|
237
|
+
def hash
|
|
238
|
+
[event, event_id, api_version, timestamp, account, data].hash
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Builds the object from hash
|
|
242
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
243
|
+
# @return [Object] Returns the model itself
|
|
244
|
+
def self.build_from_hash(attributes)
|
|
245
|
+
return nil unless attributes.is_a?(Hash)
|
|
246
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
247
|
+
transformed_hash = {}
|
|
248
|
+
openapi_types.each_pair do |key, type|
|
|
249
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
250
|
+
transformed_hash["#{key}"] = nil
|
|
251
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
252
|
+
# check to ensure the input is an array given that the attribute
|
|
253
|
+
# is documented as an array but the input is not
|
|
254
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
255
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
256
|
+
end
|
|
257
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
258
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
259
|
+
end
|
|
260
|
+
end
|
|
261
|
+
new(transformed_hash)
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Returns the object in the form of hash
|
|
265
|
+
# @return [Hash] Returns the object in the form of hash
|
|
266
|
+
def to_hash
|
|
267
|
+
hash = {}
|
|
268
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
269
|
+
value = self.send(attr)
|
|
270
|
+
if value.nil?
|
|
271
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
272
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
hash[param] = _to_hash(value)
|
|
276
|
+
end
|
|
277
|
+
hash
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
end
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Repull API
|
|
3
|
+
|
|
4
|
+
#The unified API for vacation rental tech. Connect Airbnb, Booking.com, Vrbo and more channels, plus 14 PMS platforms, through one REST API. ## 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`, `limit`, `used` and `resets_at` fields. **The way past a request quota.** The monthly quota refusal (`429 rate_limit_exceeded` with `scope: \"monthly\"`), `402 credits_exhausted` and `429 daily_limit_exceeded` also carry `upgrade` (the cheapest plan that covers your usage: its exact monthly price for your listings, its request quotas and a `checkout_url` that opens checkout for that price; `plan: \"custom\"` with a `contact_email` when no self-serve plan covers it), `credits` (pay-as-you-go: `usd_per_1000_requests`, `top_up_url`, your `balance_usd`), `resets_at` and `projected_monthly_requests`. The per-minute 429 (`scope: \"per_api_key\"`) carries none of these: wait `Retry-After`. ## Plan listing limits Each plan includes a number of **active listings**: | Tier | Active listings | |---|---| | `free` | 3 | | `starter` | no cap: 10 included, then billed per listing | | `custom` | no cap | Going over the plan never blocks your API calls. Listings beyond the plan are **held back**: they stay connected and keep syncing, but they are not served. A held-back listing answers `403 listing_inactive` with `reason: \"plan_limit\"`, and collection routes leave it out. Every JSON response then carries a `planNotice` and the `X-Repull-Listings-Held-Back` header, so you know there is more to see. Choose which listings are active with `POST /v1/listings/status`. Upgrading at `https://repull.dev/dashboard/billing` lifts the cap but does not switch held-back listings on: you choose which to activate afterwards, with the same call or from the dashboard, and each one you switch on is billed from then. Only a call that would itself take you over the plan is refused, with **`402 listings_limit_exceeded`**: activating listings (`PATCH /v1/listings/{id}` with `{ \"active\": true }`, `POST /v1/listings/status`) or creating one (`POST /v1/listings`). Nothing else changes. The envelope carries the tier, the limit, the active count and an upgrade link next to the standard `code` / `message` / `fix` / `docs_url` / `request_id`. If an account has more active listings than its plan (for example after a downgrade), calls are still served and `planNotice` says so (code \"listings_over_plan\"). ## Failed payments If your plan's renewal payment fails, nothing is blocked: your API calls keep working while Stripe retries the card. Every successful JSON response then carries a `billingNotice` (code `payment_failed`) with the amount, when it failed, the next automatic retry (`nextRetryAt`) and `payUrl`, the invoice to pay. It disappears once the invoice is paid.
|
|
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
|
+
# Payload for `account.notifications_missing`: a Vrbo account had new guest messages and no notification email arrived for them.
|
|
18
|
+
class AccountNotificationsMissingPayload < ApiModelBase
|
|
19
|
+
attr_accessor :workspace_id
|
|
20
|
+
|
|
21
|
+
attr_accessor :provider
|
|
22
|
+
|
|
23
|
+
# Vrbo's account number (`accounts[].externalAccountId` on `GET /v1/connect/vrbo-login`).
|
|
24
|
+
attr_accessor :account_id
|
|
25
|
+
|
|
26
|
+
# The workspace's Vrbo connection record.
|
|
27
|
+
attr_accessor :connection_id
|
|
28
|
+
|
|
29
|
+
attr_accessor :notifications
|
|
30
|
+
|
|
31
|
+
attr_accessor :detected_at
|
|
32
|
+
|
|
33
|
+
attr_accessor :docs_url
|
|
34
|
+
|
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
36
|
+
def self.attribute_map
|
|
37
|
+
{
|
|
38
|
+
:'workspace_id' => :'workspaceId',
|
|
39
|
+
:'provider' => :'provider',
|
|
40
|
+
:'account_id' => :'accountId',
|
|
41
|
+
:'connection_id' => :'connectionId',
|
|
42
|
+
:'notifications' => :'notifications',
|
|
43
|
+
:'detected_at' => :'detectedAt',
|
|
44
|
+
:'docs_url' => :'docsUrl'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Returns attribute mapping this model knows about
|
|
49
|
+
def self.acceptable_attribute_map
|
|
50
|
+
attribute_map
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Returns all the JSON keys this model knows about
|
|
54
|
+
def self.acceptable_attributes
|
|
55
|
+
acceptable_attribute_map.values
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Attribute type mapping.
|
|
59
|
+
def self.openapi_types
|
|
60
|
+
{
|
|
61
|
+
:'workspace_id' => :'Integer',
|
|
62
|
+
:'provider' => :'String',
|
|
63
|
+
:'account_id' => :'String',
|
|
64
|
+
:'connection_id' => :'Integer',
|
|
65
|
+
:'notifications' => :'VrboNotifications',
|
|
66
|
+
:'detected_at' => :'Time',
|
|
67
|
+
:'docs_url' => :'String'
|
|
68
|
+
}
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# List of attributes with nullable: true
|
|
72
|
+
def self.openapi_nullable
|
|
73
|
+
Set.new([
|
|
74
|
+
:'account_id',
|
|
75
|
+
:'connection_id',
|
|
76
|
+
])
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Initializes the object
|
|
80
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
81
|
+
def initialize(attributes = {})
|
|
82
|
+
if (!attributes.is_a?(Hash))
|
|
83
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::AccountNotificationsMissingPayload` initialize method"
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
87
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
88
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
89
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
90
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::AccountNotificationsMissingPayload`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
91
|
+
end
|
|
92
|
+
h[k.to_sym] = v
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'workspace_id')
|
|
96
|
+
self.workspace_id = attributes[:'workspace_id']
|
|
97
|
+
else
|
|
98
|
+
self.workspace_id = nil
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'provider')
|
|
102
|
+
self.provider = attributes[:'provider']
|
|
103
|
+
else
|
|
104
|
+
self.provider = nil
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'account_id')
|
|
108
|
+
self.account_id = attributes[:'account_id']
|
|
109
|
+
else
|
|
110
|
+
self.account_id = nil
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'connection_id')
|
|
114
|
+
self.connection_id = attributes[:'connection_id']
|
|
115
|
+
else
|
|
116
|
+
self.connection_id = nil
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'notifications')
|
|
120
|
+
self.notifications = attributes[:'notifications']
|
|
121
|
+
else
|
|
122
|
+
self.notifications = nil
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'detected_at')
|
|
126
|
+
self.detected_at = attributes[:'detected_at']
|
|
127
|
+
else
|
|
128
|
+
self.detected_at = nil
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'docs_url')
|
|
132
|
+
self.docs_url = attributes[:'docs_url']
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
137
|
+
# @return Array for valid properties with the reasons
|
|
138
|
+
def list_invalid_properties
|
|
139
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
140
|
+
invalid_properties = Array.new
|
|
141
|
+
if @workspace_id.nil?
|
|
142
|
+
invalid_properties.push('invalid value for "workspace_id", workspace_id cannot be nil.')
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if @provider.nil?
|
|
146
|
+
invalid_properties.push('invalid value for "provider", provider cannot be nil.')
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if @notifications.nil?
|
|
150
|
+
invalid_properties.push('invalid value for "notifications", notifications cannot be nil.')
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if @detected_at.nil?
|
|
154
|
+
invalid_properties.push('invalid value for "detected_at", detected_at cannot be nil.')
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
invalid_properties
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Check to see if the all the properties in the model are valid
|
|
161
|
+
# @return true if the model is valid
|
|
162
|
+
def valid?
|
|
163
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
164
|
+
return false if @workspace_id.nil?
|
|
165
|
+
return false if @provider.nil?
|
|
166
|
+
return false if @notifications.nil?
|
|
167
|
+
return false if @detected_at.nil?
|
|
168
|
+
true
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Custom attribute writer method with validation
|
|
172
|
+
# @param [Object] workspace_id Value to be assigned
|
|
173
|
+
def workspace_id=(workspace_id)
|
|
174
|
+
if workspace_id.nil?
|
|
175
|
+
fail ArgumentError, 'workspace_id cannot be nil'
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
@workspace_id = workspace_id
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Custom attribute writer method with validation
|
|
182
|
+
# @param [Object] provider Value to be assigned
|
|
183
|
+
def provider=(provider)
|
|
184
|
+
if provider.nil?
|
|
185
|
+
fail ArgumentError, 'provider cannot be nil'
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
@provider = provider
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Custom attribute writer method with validation
|
|
192
|
+
# @param [Object] notifications Value to be assigned
|
|
193
|
+
def notifications=(notifications)
|
|
194
|
+
if notifications.nil?
|
|
195
|
+
fail ArgumentError, 'notifications cannot be nil'
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
@notifications = notifications
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Custom attribute writer method with validation
|
|
202
|
+
# @param [Object] detected_at Value to be assigned
|
|
203
|
+
def detected_at=(detected_at)
|
|
204
|
+
if detected_at.nil?
|
|
205
|
+
fail ArgumentError, 'detected_at cannot be nil'
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
@detected_at = detected_at
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Checks equality by comparing each attribute.
|
|
212
|
+
# @param [Object] Object to be compared
|
|
213
|
+
def ==(o)
|
|
214
|
+
return true if self.equal?(o)
|
|
215
|
+
self.class == o.class &&
|
|
216
|
+
workspace_id == o.workspace_id &&
|
|
217
|
+
provider == o.provider &&
|
|
218
|
+
account_id == o.account_id &&
|
|
219
|
+
connection_id == o.connection_id &&
|
|
220
|
+
notifications == o.notifications &&
|
|
221
|
+
detected_at == o.detected_at &&
|
|
222
|
+
docs_url == o.docs_url
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# @see the `==` method
|
|
226
|
+
# @param [Object] Object to be compared
|
|
227
|
+
def eql?(o)
|
|
228
|
+
self == o
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Calculates hash code according to all attributes.
|
|
232
|
+
# @return [Integer] Hash code
|
|
233
|
+
def hash
|
|
234
|
+
[workspace_id, provider, account_id, connection_id, notifications, detected_at, docs_url].hash
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Builds the object from hash
|
|
238
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
239
|
+
# @return [Object] Returns the model itself
|
|
240
|
+
def self.build_from_hash(attributes)
|
|
241
|
+
return nil unless attributes.is_a?(Hash)
|
|
242
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
243
|
+
transformed_hash = {}
|
|
244
|
+
openapi_types.each_pair do |key, type|
|
|
245
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
246
|
+
transformed_hash["#{key}"] = nil
|
|
247
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
248
|
+
# check to ensure the input is an array given that the attribute
|
|
249
|
+
# is documented as an array but the input is not
|
|
250
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
251
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
252
|
+
end
|
|
253
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
254
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
new(transformed_hash)
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# Returns the object in the form of hash
|
|
261
|
+
# @return [Hash] Returns the object in the form of hash
|
|
262
|
+
def to_hash
|
|
263
|
+
hash = {}
|
|
264
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
265
|
+
value = self.send(attr)
|
|
266
|
+
if value.nil?
|
|
267
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
268
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
hash[param] = _to_hash(value)
|
|
272
|
+
end
|
|
273
|
+
hash
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
end
|