repull 0.2.49 → 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.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +2 -2
  3. data/lib/repull/api/connections_api.rb +2 -2
  4. data/lib/repull/api/conversations_api.rb +2 -2
  5. data/lib/repull/models/account_calendar_access_changed_event.rb +282 -0
  6. data/lib/repull/models/account_calendar_access_changed_payload.rb +268 -0
  7. data/lib/repull/models/account_notifications_missing_event.rb +282 -0
  8. data/lib/repull/models/account_notifications_missing_payload.rb +278 -0
  9. data/lib/repull/models/apply_connection_mappings_request_mappings_inner.rb +1 -1
  10. data/lib/repull/models/connect_status_accounts_inner.rb +23 -2
  11. data/lib/repull/models/conversation_message_status_changed_event.rb +282 -0
  12. data/lib/repull/models/conversation_message_status_changed_payload.rb +233 -0
  13. data/lib/repull/models/get_airbnb_booking_settings200_response_data_advance_notice.rb +14 -3
  14. data/lib/repull/models/get_listing_calendar_sync200_response_channels_inner.rb +33 -1
  15. data/lib/repull/models/guest.rb +35 -2
  16. data/lib/repull/models/guest_contact.rb +37 -5
  17. data/lib/repull/models/guest_phone_type.rb +40 -0
  18. data/lib/repull/models/guest_profile.rb +35 -1
  19. data/lib/repull/models/list_connection_units200_response.rb +10 -1
  20. data/lib/repull/models/list_connection_units200_response_units_inner.rb +1 -1
  21. data/lib/repull/models/message.rb +2 -2
  22. data/lib/repull/models/reservation.rb +11 -1
  23. data/lib/repull/models/reservation_primary_guest.rb +45 -2
  24. data/lib/repull/models/send_message_response.rb +1 -0
  25. data/lib/repull/models/start_connection_import_request.rb +1 -1
  26. data/lib/repull/models/update_airbnb_booking_settings_request_advance_notice.rb +56 -17
  27. data/lib/repull/models/vrbo_calendar_access.rb +204 -0
  28. data/lib/repull/models/vrbo_notifications.rb +192 -0
  29. data/lib/repull/models/webhook_event.rb +6 -0
  30. data/lib/repull/models/webhook_event_type.rb +4 -1
  31. data/lib/repull/version.rb +1 -1
  32. data/lib/repull.rb +9 -0
  33. data/openapi/v1.json +493 -21
  34. metadata +11 -2
@@ -0,0 +1,204 @@
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
+ # Whether another tool manages a Vrbo account's calendar. Vrbo reports it per account; Repull asks when the account connects and once a day. While `managedBy` is set, Vrbo refuses price and availability changes from anyone else, so calendar sync is off for every unit of the account and turning it on returns `409 calendar_managed_elsewhere`. Bookings and messages keep working.
18
+ class VrboCalendarAccess < ApiModelBase
19
+ # `integrated_software`: Vrbo says connected software (such as a PMS) manages the calendar. `null`: Repull may manage it.
20
+ attr_accessor :managed_by
21
+
22
+ # When `managedBy` was first seen. `null` when not managed.
23
+ attr_accessor :detected_at
24
+
25
+ # When Vrbo was last asked. `null` until the first check.
26
+ attr_accessor :checked_at
27
+
28
+ attr_accessor :docs_url
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'managed_by' => :'managedBy',
34
+ :'detected_at' => :'detectedAt',
35
+ :'checked_at' => :'checkedAt',
36
+ :'docs_url' => :'docsUrl'
37
+ }
38
+ end
39
+
40
+ # Returns attribute mapping this model knows about
41
+ def self.acceptable_attribute_map
42
+ attribute_map
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ acceptable_attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'managed_by' => :'String',
54
+ :'detected_at' => :'Time',
55
+ :'checked_at' => :'Time',
56
+ :'docs_url' => :'String'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ :'managed_by',
64
+ :'detected_at',
65
+ :'checked_at',
66
+ ])
67
+ end
68
+
69
+ # Initializes the object
70
+ # @param [Hash] attributes Model attributes in the form of hash
71
+ def initialize(attributes = {})
72
+ if (!attributes.is_a?(Hash))
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::VrboCalendarAccess` initialize method"
74
+ end
75
+
76
+ # check to see if the attribute exists and convert string to symbol for hash key
77
+ acceptable_attribute_map = self.class.acceptable_attribute_map
78
+ attributes = attributes.each_with_object({}) { |(k, v), h|
79
+ if (!acceptable_attribute_map.key?(k.to_sym))
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::VrboCalendarAccess`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
81
+ end
82
+ h[k.to_sym] = v
83
+ }
84
+
85
+ if attributes.key?(:'managed_by')
86
+ self.managed_by = attributes[:'managed_by']
87
+ else
88
+ self.managed_by = nil
89
+ end
90
+
91
+ if attributes.key?(:'detected_at')
92
+ self.detected_at = attributes[:'detected_at']
93
+ else
94
+ self.detected_at = nil
95
+ end
96
+
97
+ if attributes.key?(:'checked_at')
98
+ self.checked_at = attributes[:'checked_at']
99
+ else
100
+ self.checked_at = nil
101
+ end
102
+
103
+ if attributes.key?(:'docs_url')
104
+ self.docs_url = attributes[:'docs_url']
105
+ else
106
+ self.docs_url = nil
107
+ end
108
+ end
109
+
110
+ # Show invalid properties with the reasons. Usually used together with valid?
111
+ # @return Array for valid properties with the reasons
112
+ def list_invalid_properties
113
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
114
+ invalid_properties = Array.new
115
+ if @docs_url.nil?
116
+ invalid_properties.push('invalid value for "docs_url", docs_url cannot be nil.')
117
+ end
118
+
119
+ invalid_properties
120
+ end
121
+
122
+ # Check to see if the all the properties in the model are valid
123
+ # @return true if the model is valid
124
+ def valid?
125
+ warn '[DEPRECATED] the `valid?` method is obsolete'
126
+ return false if @docs_url.nil?
127
+ true
128
+ end
129
+
130
+ # Custom attribute writer method with validation
131
+ # @param [Object] docs_url Value to be assigned
132
+ def docs_url=(docs_url)
133
+ if docs_url.nil?
134
+ fail ArgumentError, 'docs_url cannot be nil'
135
+ end
136
+
137
+ @docs_url = docs_url
138
+ end
139
+
140
+ # Checks equality by comparing each attribute.
141
+ # @param [Object] Object to be compared
142
+ def ==(o)
143
+ return true if self.equal?(o)
144
+ self.class == o.class &&
145
+ managed_by == o.managed_by &&
146
+ detected_at == o.detected_at &&
147
+ checked_at == o.checked_at &&
148
+ docs_url == o.docs_url
149
+ end
150
+
151
+ # @see the `==` method
152
+ # @param [Object] Object to be compared
153
+ def eql?(o)
154
+ self == o
155
+ end
156
+
157
+ # Calculates hash code according to all attributes.
158
+ # @return [Integer] Hash code
159
+ def hash
160
+ [managed_by, detected_at, checked_at, docs_url].hash
161
+ end
162
+
163
+ # Builds the object from hash
164
+ # @param [Hash] attributes Model attributes in the form of hash
165
+ # @return [Object] Returns the model itself
166
+ def self.build_from_hash(attributes)
167
+ return nil unless attributes.is_a?(Hash)
168
+ attributes = attributes.transform_keys(&:to_sym)
169
+ transformed_hash = {}
170
+ openapi_types.each_pair do |key, type|
171
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
172
+ transformed_hash["#{key}"] = nil
173
+ elsif type =~ /\AArray<(.*)>/i
174
+ # check to ensure the input is an array given that the attribute
175
+ # is documented as an array but the input is not
176
+ if attributes[attribute_map[key]].is_a?(Array)
177
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
178
+ end
179
+ elsif !attributes[attribute_map[key]].nil?
180
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
181
+ end
182
+ end
183
+ new(transformed_hash)
184
+ end
185
+
186
+ # Returns the object in the form of hash
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_hash
189
+ hash = {}
190
+ self.class.attribute_map.each_pair do |attr, param|
191
+ value = self.send(attr)
192
+ if value.nil?
193
+ is_nullable = self.class.openapi_nullable.include?(attr)
194
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
195
+ end
196
+
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ end
203
+
204
+ end
@@ -0,0 +1,192 @@
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
+ # Whether Vrbo's notification emails for this account reach Repull. Each one brings a new guest message or booking in within about a minute; without them Repull relies on its scheduled check, which is slower.
18
+ class VrboNotifications < ApiModelBase
19
+ # `active`: notifications arrive for this account's guest messages. `missing`: Repull found new guest messages and no notification came for them — ask the host to add `address` on Vrbo (or turn its notifications back on). `unknown`: no guest messages yet to judge by.
20
+ attr_accessor :state
21
+
22
+ # When the last Vrbo notification reached `address`. `null` when none ever has.
23
+ attr_accessor :last_received_at
24
+
25
+ # The address the host adds on Vrbo as a secondary email, with message and reservation notifications on.
26
+ attr_accessor :address
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'state' => :'state',
32
+ :'last_received_at' => :'lastReceivedAt',
33
+ :'address' => :'address'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'state' => :'String',
51
+ :'last_received_at' => :'Time',
52
+ :'address' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ :'last_received_at',
60
+ :'address'
61
+ ])
62
+ end
63
+
64
+ # Initializes the object
65
+ # @param [Hash] attributes Model attributes in the form of hash
66
+ def initialize(attributes = {})
67
+ if (!attributes.is_a?(Hash))
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::VrboNotifications` initialize method"
69
+ end
70
+
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ acceptable_attribute_map = self.class.acceptable_attribute_map
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!acceptable_attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::VrboNotifications`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'state')
81
+ self.state = attributes[:'state']
82
+ else
83
+ self.state = nil
84
+ end
85
+
86
+ if attributes.key?(:'last_received_at')
87
+ self.last_received_at = attributes[:'last_received_at']
88
+ else
89
+ self.last_received_at = nil
90
+ end
91
+
92
+ if attributes.key?(:'address')
93
+ self.address = attributes[:'address']
94
+ else
95
+ self.address = nil
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
103
+ invalid_properties = Array.new
104
+ if @state.nil?
105
+ invalid_properties.push('invalid value for "state", state cannot be nil.')
106
+ end
107
+
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ return false if @state.nil?
116
+ true
117
+ end
118
+
119
+ # Custom attribute writer method with validation
120
+ # @param [Object] state Value to be assigned
121
+ def state=(state)
122
+ if state.nil?
123
+ fail ArgumentError, 'state cannot be nil'
124
+ end
125
+
126
+ @state = state
127
+ end
128
+
129
+ # Checks equality by comparing each attribute.
130
+ # @param [Object] Object to be compared
131
+ def ==(o)
132
+ return true if self.equal?(o)
133
+ self.class == o.class &&
134
+ state == o.state &&
135
+ last_received_at == o.last_received_at &&
136
+ address == o.address
137
+ end
138
+
139
+ # @see the `==` method
140
+ # @param [Object] Object to be compared
141
+ def eql?(o)
142
+ self == o
143
+ end
144
+
145
+ # Calculates hash code according to all attributes.
146
+ # @return [Integer] Hash code
147
+ def hash
148
+ [state, last_received_at, address].hash
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def self.build_from_hash(attributes)
155
+ return nil unless attributes.is_a?(Hash)
156
+ attributes = attributes.transform_keys(&:to_sym)
157
+ transformed_hash = {}
158
+ openapi_types.each_pair do |key, type|
159
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
+ transformed_hash["#{key}"] = nil
161
+ elsif type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the attribute
163
+ # is documented as an array but the input is not
164
+ if attributes[attribute_map[key]].is_a?(Array)
165
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
166
+ end
167
+ elsif !attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
169
+ end
170
+ end
171
+ new(transformed_hash)
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ if value.nil?
181
+ is_nullable = self.class.openapi_nullable.include?(attr)
182
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
+ end
184
+
185
+ hash[param] = _to_hash(value)
186
+ end
187
+ hash
188
+ end
189
+
190
+ end
191
+
192
+ end
@@ -20,11 +20,13 @@ module Repull
20
20
  # List of class defined in oneOf (OpenAPI v3)
21
21
  def openapi_one_of
22
22
  [
23
+ :'AccountCalendarAccessChangedEvent',
23
24
  :'AccountCreatedEvent',
24
25
  :'AccountDisconnectedEvent',
25
26
  :'AccountImportCompletedEvent',
26
27
  :'AccountImportFailedEvent',
27
28
  :'AccountImportStartedEvent',
29
+ :'AccountNotificationsMissingEvent',
28
30
  :'AccountUnitsAddedEvent',
29
31
  :'AiOperationCompletedEvent',
30
32
  :'AiOperationFailedEvent',
@@ -33,6 +35,7 @@ module Repull
33
35
  :'ChannelSyncFailedEvent',
34
36
  :'ConnectSessionAbandonedEvent',
35
37
  :'ConnectSessionCompletedEvent',
38
+ :'ConversationMessageStatusChangedEvent',
36
39
  :'InquiryCreatedEvent',
37
40
  :'InquiryUpdatedEvent',
38
41
  :'ListingCreatedEvent',
@@ -73,11 +76,13 @@ module Repull
73
76
  # Discriminator's mapping (OpenAPI v3)
74
77
  def openapi_discriminator_mapping
75
78
  {
79
+ :'account.calendar_access_changed' => :'AccountCalendarAccessChangedEvent',
76
80
  :'account.created' => :'AccountCreatedEvent',
77
81
  :'account.disconnected' => :'AccountDisconnectedEvent',
78
82
  :'account.import.completed' => :'AccountImportCompletedEvent',
79
83
  :'account.import.failed' => :'AccountImportFailedEvent',
80
84
  :'account.import.started' => :'AccountImportStartedEvent',
85
+ :'account.notifications_missing' => :'AccountNotificationsMissingEvent',
81
86
  :'account.units.added' => :'AccountUnitsAddedEvent',
82
87
  :'ai.operation.completed' => :'AiOperationCompletedEvent',
83
88
  :'ai.operation.failed' => :'AiOperationFailedEvent',
@@ -86,6 +91,7 @@ module Repull
86
91
  :'channel.sync.failed' => :'ChannelSyncFailedEvent',
87
92
  :'connect.session.abandoned' => :'ConnectSessionAbandonedEvent',
88
93
  :'connect.session.completed' => :'ConnectSessionCompletedEvent',
94
+ :'conversation.message.status_changed' => :'ConversationMessageStatusChangedEvent',
89
95
  :'inquiry.created' => :'InquiryCreatedEvent',
90
96
  :'inquiry.updated' => :'InquiryUpdatedEvent',
91
97
  :'listing.created' => :'ListingCreatedEvent',
@@ -19,6 +19,7 @@ module Repull
19
19
  RESERVATION_UPDATED = "reservation.updated".freeze
20
20
  RESERVATION_CANCELLED = "reservation.cancelled".freeze
21
21
  RESERVATION_MESSAGE_RECEIVED = "reservation.message.received".freeze
22
+ CONVERSATION_MESSAGE_STATUS_CHANGED = "conversation.message.status_changed".freeze
22
23
  RESERVATION_MESSAGE_SENT = "reservation.message.sent".freeze
23
24
  RESERVATION_MESSAGE_UPDATED = "reservation.message.updated".freeze
24
25
  RESERVATION_MESSAGE_READ = "reservation.message.read".freeze
@@ -46,6 +47,8 @@ module Repull
46
47
  ACCOUNT_IMPORT_COMPLETED = "account.import.completed".freeze
47
48
  ACCOUNT_IMPORT_FAILED = "account.import.failed".freeze
48
49
  ACCOUNT_UNITS_ADDED = "account.units.added".freeze
50
+ ACCOUNT_CALENDAR_ACCESS_CHANGED = "account.calendar_access_changed".freeze
51
+ ACCOUNT_NOTIFICATIONS_MISSING = "account.notifications_missing".freeze
49
52
  REVIEW_CREATED = "review.created".freeze
50
53
  REVIEW_RESPONDED = "review.responded".freeze
51
54
  AI_OPERATION_COMPLETED = "ai.operation.completed".freeze
@@ -59,7 +62,7 @@ module Repull
59
62
  USAGE_QUOTA_WARNING = "usage.quota.warning".freeze
60
63
 
61
64
  def self.all_vars
62
- @all_vars ||= [RESERVATION_CREATED, RESERVATION_UPDATED, RESERVATION_CANCELLED, RESERVATION_MESSAGE_RECEIVED, RESERVATION_MESSAGE_SENT, RESERVATION_MESSAGE_UPDATED, RESERVATION_MESSAGE_READ, RESERVATION_MESSAGE_REACTION, RESERVATION_ALTERATION_CREATED, RESERVATION_ALTERATION_RESPONDED, RESERVATION_REQUEST_CREATED, RESERVATION_REQUEST_UPDATED, BOOKING_UNACKNOWLEDGED, CHANNEL_SYNC_FAILED, CHANNEL_DEGRADED, RESERVATION_THREAD_ASSIGNED, INQUIRY_CREATED, INQUIRY_UPDATED, LISTING_CREATED, LISTING_UPDATED, LISTING_DELETED, LISTING_SUSPENDED, LISTING_REACTIVATED, ACCOUNT_CREATED, CONNECT_SESSION_COMPLETED, CONNECT_SESSION_ABANDONED, ACCOUNT_DISCONNECTED, ACCOUNT_IMPORT_STARTED, ACCOUNT_IMPORT_COMPLETED, ACCOUNT_IMPORT_FAILED, ACCOUNT_UNITS_ADDED, REVIEW_CREATED, REVIEW_RESPONDED, AI_OPERATION_COMPLETED, AI_OPERATION_FAILED, PAYMENT_COMPLETED, PAYMENT_REFUNDED, PAYOUT_COMPLETED, MIGRATION_COMPLETED, MIGRATION_FAILED, REPULL_PING, USAGE_QUOTA_WARNING].freeze
65
+ @all_vars ||= [RESERVATION_CREATED, RESERVATION_UPDATED, RESERVATION_CANCELLED, RESERVATION_MESSAGE_RECEIVED, CONVERSATION_MESSAGE_STATUS_CHANGED, RESERVATION_MESSAGE_SENT, RESERVATION_MESSAGE_UPDATED, RESERVATION_MESSAGE_READ, RESERVATION_MESSAGE_REACTION, RESERVATION_ALTERATION_CREATED, RESERVATION_ALTERATION_RESPONDED, RESERVATION_REQUEST_CREATED, RESERVATION_REQUEST_UPDATED, BOOKING_UNACKNOWLEDGED, CHANNEL_SYNC_FAILED, CHANNEL_DEGRADED, RESERVATION_THREAD_ASSIGNED, INQUIRY_CREATED, INQUIRY_UPDATED, LISTING_CREATED, LISTING_UPDATED, LISTING_DELETED, LISTING_SUSPENDED, LISTING_REACTIVATED, ACCOUNT_CREATED, CONNECT_SESSION_COMPLETED, CONNECT_SESSION_ABANDONED, ACCOUNT_DISCONNECTED, ACCOUNT_IMPORT_STARTED, ACCOUNT_IMPORT_COMPLETED, ACCOUNT_IMPORT_FAILED, ACCOUNT_UNITS_ADDED, ACCOUNT_CALENDAR_ACCESS_CHANGED, ACCOUNT_NOTIFICATIONS_MISSING, REVIEW_CREATED, REVIEW_RESPONDED, AI_OPERATION_COMPLETED, AI_OPERATION_FAILED, PAYMENT_COMPLETED, PAYMENT_REFUNDED, PAYOUT_COMPLETED, MIGRATION_COMPLETED, MIGRATION_FAILED, REPULL_PING, USAGE_QUOTA_WARNING].freeze
63
66
  end
64
67
 
65
68
  # Builds the enum from string
@@ -11,5 +11,5 @@ Generator version: 7.22.0
11
11
  =end
12
12
 
13
13
  module Repull
14
- VERSION = '0.2.49'
14
+ VERSION = '0.2.51'
15
15
  end
data/lib/repull.rb CHANGED
@@ -20,6 +20,8 @@ require 'repull/configuration'
20
20
  # Models
21
21
  require 'repull/models/ai_operation'
22
22
  require 'repull/models/accept_reservation_request200_response'
23
+ require 'repull/models/account_calendar_access_changed_event'
24
+ require 'repull/models/account_calendar_access_changed_payload'
23
25
  require 'repull/models/account_created_event'
24
26
  require 'repull/models/account_created_payload'
25
27
  require 'repull/models/account_disconnected_event'
@@ -33,6 +35,8 @@ require 'repull/models/account_import_finished_payload'
33
35
  require 'repull/models/account_import_stage'
34
36
  require 'repull/models/account_import_started_event'
35
37
  require 'repull/models/account_import_started_payload'
38
+ require 'repull/models/account_notifications_missing_event'
39
+ require 'repull/models/account_notifications_missing_payload'
36
40
  require 'repull/models/account_units_added_event'
37
41
  require 'repull/models/account_units_added_payload'
38
42
  require 'repull/models/account_units_added_payload_hotels_inner'
@@ -210,6 +214,8 @@ require 'repull/models/conversation_guest_contact'
210
214
  require 'repull/models/conversation_host'
211
215
  require 'repull/models/conversation_list_response'
212
216
  require 'repull/models/conversation_message_attachment'
217
+ require 'repull/models/conversation_message_status_changed_event'
218
+ require 'repull/models/conversation_message_status_changed_payload'
213
219
  require 'repull/models/create_airbnb_listing_room_request'
214
220
  require 'repull/models/create_airbnb_offer_request'
215
221
  require 'repull/models/create_airbnb_offer_request_guest_details'
@@ -321,6 +327,7 @@ require 'repull/models/guest_create_response_pms'
321
327
  require 'repull/models/guest_flag'
322
328
  require 'repull/models/guest_list_response'
323
329
  require 'repull/models/guest_note'
330
+ require 'repull/models/guest_phone_type'
324
331
  require 'repull/models/guest_profile'
325
332
  require 'repull/models/guest_reservations_summary'
326
333
  require 'repull/models/guest_update_request'
@@ -791,10 +798,12 @@ require 'repull/models/upload_airbnb_listing_photos_request_photos_inner_listing
791
798
  require 'repull/models/usage_quota_warning_event'
792
799
  require 'repull/models/usage_quota_warning_payload'
793
800
  require 'repull/models/usage_quota_warning_payload_top_operation'
801
+ require 'repull/models/vrbo_calendar_access'
794
802
  require 'repull/models/vrbo_import_status'
795
803
  require 'repull/models/vrbo_listing'
796
804
  require 'repull/models/vrbo_login200_response'
797
805
  require 'repull/models/vrbo_login_request'
806
+ require 'repull/models/vrbo_notifications'
798
807
  require 'repull/models/vrbo_reservation'
799
808
  require 'repull/models/vrbo_reservation_list_response'
800
809
  require 'repull/models/webhook_delivery'