repull 0.2.50 → 0.2.52

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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +2 -2
  3. data/lib/repull/api/conversations_api.rb +2 -2
  4. data/lib/repull/api/listings_api.rb +63 -0
  5. data/lib/repull/models/account_notifications_missing_event.rb +282 -0
  6. data/lib/repull/models/account_notifications_missing_payload.rb +278 -0
  7. data/lib/repull/models/apply_connection_mappings200_response_results_inner.rb +14 -4
  8. data/lib/repull/models/auto_map_connection_units200_response.rb +1 -1
  9. data/lib/repull/models/auto_map_connection_units200_response_results_inner.rb +184 -0
  10. data/lib/repull/models/connect_status_accounts_inner.rb +12 -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_ical200_response.rb +298 -0
  15. data/lib/repull/models/get_listing_ical200_response_vrbo_inner.rb +285 -0
  16. data/lib/repull/models/get_usage_logs200_response_data_inner.rb +12 -1
  17. data/lib/repull/models/guest.rb +35 -2
  18. data/lib/repull/models/guest_contact.rb +37 -5
  19. data/lib/repull/models/guest_phone_type.rb +40 -0
  20. data/lib/repull/models/guest_profile.rb +35 -1
  21. data/lib/repull/models/list_connection_units200_response_units_inner.rb +1 -1
  22. data/lib/repull/models/listing_ical_feed_changed_event.rb +282 -0
  23. data/lib/repull/models/listing_ical_feed_changed_payload.rb +355 -0
  24. data/lib/repull/models/listing_ical_feed_changed_payload_feed.rb +159 -0
  25. data/lib/repull/models/message.rb +2 -2
  26. data/lib/repull/models/reservation.rb +11 -1
  27. data/lib/repull/models/reservation_primary_guest.rb +45 -2
  28. data/lib/repull/models/send_message_response.rb +1 -0
  29. data/lib/repull/models/update_airbnb_booking_settings_request_advance_notice.rb +56 -17
  30. data/lib/repull/models/vrbo_notifications.rb +192 -0
  31. data/lib/repull/models/webhook_event.rb +6 -0
  32. data/lib/repull/models/webhook_event_type.rb +4 -1
  33. data/lib/repull/version.rb +1 -1
  34. data/lib/repull.rb +12 -0
  35. data/openapi/v1.json +606 -18
  36. metadata +14 -2
@@ -26,12 +26,40 @@ module Repull
26
26
  # Primary email contact (or first non-primary if no primary set).
27
27
  attr_accessor :email
28
28
 
29
- # Primary phone contact (or first non-primary if no primary set).
29
+ # Primary phone contact (or first non-primary if no primary set). For an Airbnb stay this may be an Airbnb relay number — check `phoneType`.
30
30
  attr_accessor :phone
31
31
 
32
+ # Present whenever `phone` is. `airbnb_relay` when `phone` is a temporary Airbnb relay number (SMS only, expires 48h after checkout, shared across hosts, never a guest identifier); `guest` otherwise.
33
+ attr_accessor :phone_type
34
+
35
+ # Only next to an Airbnb relay number: when it stops working (checkout + 48 hours). `null` when Airbnb did not give the checkout time with its offset. A cancelled reservation's relay number stops working at cancellation, whatever this says.
36
+ attr_accessor :phone_expires_at
37
+
32
38
  # Guest's preferred language (BCP-47 / ISO 639-1).
33
39
  attr_accessor :language
34
40
 
41
+ class EnumAttributeValidator
42
+ attr_reader :datatype
43
+ attr_reader :allowable_values
44
+
45
+ def initialize(datatype, allowable_values)
46
+ @allowable_values = allowable_values.map do |value|
47
+ case datatype.to_s
48
+ when /Integer/i
49
+ value.to_i
50
+ when /Float/i
51
+ value.to_f
52
+ else
53
+ value
54
+ end
55
+ end
56
+ end
57
+
58
+ def valid?(value)
59
+ !value || allowable_values.include?(value)
60
+ end
61
+ end
62
+
35
63
  # Attribute mapping from ruby-style variable name to JSON key.
36
64
  def self.attribute_map
37
65
  {
@@ -40,6 +68,8 @@ module Repull
40
68
  :'last_name' => :'lastName',
41
69
  :'email' => :'email',
42
70
  :'phone' => :'phone',
71
+ :'phone_type' => :'phoneType',
72
+ :'phone_expires_at' => :'phoneExpiresAt',
43
73
  :'language' => :'language'
44
74
  }
45
75
  end
@@ -62,6 +92,8 @@ module Repull
62
92
  :'last_name' => :'String',
63
93
  :'email' => :'String',
64
94
  :'phone' => :'String',
95
+ :'phone_type' => :'GuestPhoneType',
96
+ :'phone_expires_at' => :'Time',
65
97
  :'language' => :'String'
66
98
  }
67
99
  end
@@ -73,6 +105,7 @@ module Repull
73
105
  :'last_name',
74
106
  :'email',
75
107
  :'phone',
108
+ :'phone_expires_at',
76
109
  :'language'
77
110
  ])
78
111
  end
@@ -113,6 +146,14 @@ module Repull
113
146
  self.phone = attributes[:'phone']
114
147
  end
115
148
 
149
+ if attributes.key?(:'phone_type')
150
+ self.phone_type = attributes[:'phone_type']
151
+ end
152
+
153
+ if attributes.key?(:'phone_expires_at')
154
+ self.phone_expires_at = attributes[:'phone_expires_at']
155
+ end
156
+
116
157
  if attributes.key?(:'language')
117
158
  self.language = attributes[:'language']
118
159
  end
@@ -143,6 +184,8 @@ module Repull
143
184
  last_name == o.last_name &&
144
185
  email == o.email &&
145
186
  phone == o.phone &&
187
+ phone_type == o.phone_type &&
188
+ phone_expires_at == o.phone_expires_at &&
146
189
  language == o.language
147
190
  end
148
191
 
@@ -155,7 +198,7 @@ module Repull
155
198
  # Calculates hash code according to all attributes.
156
199
  # @return [Integer] Hash code
157
200
  def hash
158
- [id, first_name, last_name, email, phone, language].hash
201
+ [id, first_name, last_name, email, phone, phone_type, phone_expires_at, language].hash
159
202
  end
160
203
 
161
204
  # Builds the object from hash
@@ -26,6 +26,7 @@ module Repull
26
26
  # The channel the message actually went out on.
27
27
  attr_accessor :channel
28
28
 
29
+ # `sent`: delivered. `queued` (with HTTP `202`): recorded, and still being delivered in the background because the channel was busy (Vrbo) — do not resend; the outcome arrives as the message's `status` on `GET /v1/conversations/{id}/messages` and as `conversation.message.status_changed`.
29
30
  attr_accessor :status
30
31
 
31
32
  attr_accessor :direction
@@ -14,16 +14,43 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- # Send `hours`, `allowRequestToBook`, or both. The half you omit keeps the value Airbnb currently holds.
17
+ # Send `hours` (or `sameDayCutoff`), `allowRequestToBook`, or both. The half you omit keeps the value Airbnb currently holds. `hours` and `sameDayCutoff` are the same setting: send one.
18
18
  class UpdateAirbnbBookingSettingsRequestAdvanceNotice < ApiModelBase
19
+ # Counted back from 11:59 PM on the check-in day (listing time): `0` = same-day bookings until midnight, `1` = until 11 PM, `24` = no same-day bookings.
19
20
  attr_accessor :hours
20
21
 
22
+ # The last time a same-day booking is accepted, whole hours in the listing's time (`23:00` = 11 PM, `00:00` = midnight). Converted to `hours` (`23:00` = 1).
23
+ attr_accessor :same_day_cutoff
24
+
21
25
  attr_accessor :allow_request_to_book
22
26
 
27
+ class EnumAttributeValidator
28
+ attr_reader :datatype
29
+ attr_reader :allowable_values
30
+
31
+ def initialize(datatype, allowable_values)
32
+ @allowable_values = allowable_values.map do |value|
33
+ case datatype.to_s
34
+ when /Integer/i
35
+ value.to_i
36
+ when /Float/i
37
+ value.to_f
38
+ else
39
+ value
40
+ end
41
+ end
42
+ end
43
+
44
+ def valid?(value)
45
+ !value || allowable_values.include?(value)
46
+ end
47
+ end
48
+
23
49
  # Attribute mapping from ruby-style variable name to JSON key.
24
50
  def self.attribute_map
25
51
  {
26
52
  :'hours' => :'hours',
53
+ :'same_day_cutoff' => :'sameDayCutoff',
27
54
  :'allow_request_to_book' => :'allowRequestToBook'
28
55
  }
29
56
  end
@@ -42,6 +69,7 @@ module Repull
42
69
  def self.openapi_types
43
70
  {
44
71
  :'hours' => :'Integer',
72
+ :'same_day_cutoff' => :'String',
45
73
  :'allow_request_to_book' => :'Boolean'
46
74
  }
47
75
  end
@@ -50,6 +78,7 @@ module Repull
50
78
  def self.openapi_nullable
51
79
  Set.new([
52
80
  :'hours',
81
+ :'same_day_cutoff',
53
82
  :'allow_request_to_book'
54
83
  ])
55
84
  end
@@ -74,6 +103,10 @@ module Repull
74
103
  self.hours = attributes[:'hours']
75
104
  end
76
105
 
106
+ if attributes.key?(:'same_day_cutoff')
107
+ self.same_day_cutoff = attributes[:'same_day_cutoff']
108
+ end
109
+
77
110
  if attributes.key?(:'allow_request_to_book')
78
111
  self.allow_request_to_book = attributes[:'allow_request_to_book']
79
112
  end
@@ -84,12 +117,9 @@ module Repull
84
117
  def list_invalid_properties
85
118
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
86
119
  invalid_properties = Array.new
87
- if !@hours.nil? && @hours > 168
88
- invalid_properties.push('invalid value for "hours", must be smaller than or equal to 168.')
89
- end
90
-
91
- if !@hours.nil? && @hours < 0
92
- invalid_properties.push('invalid value for "hours", must be greater than or equal to 0.')
120
+ pattern = Regexp.new(/^([01][0-9]|2[0-3]):00$/)
121
+ if !@same_day_cutoff.nil? && @same_day_cutoff !~ pattern
122
+ invalid_properties.push("invalid value for \"same_day_cutoff\", must conform to the pattern #{pattern}.")
93
123
  end
94
124
 
95
125
  invalid_properties
@@ -99,23 +129,31 @@ module Repull
99
129
  # @return true if the model is valid
100
130
  def valid?
101
131
  warn '[DEPRECATED] the `valid?` method is obsolete'
102
- return false if !@hours.nil? && @hours > 168
103
- return false if !@hours.nil? && @hours < 0
132
+ hours_validator = EnumAttributeValidator.new('Integer', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 48, 72, 168])
133
+ return false unless hours_validator.valid?(@hours)
134
+ return false if !@same_day_cutoff.nil? && @same_day_cutoff !~ Regexp.new(/^([01][0-9]|2[0-3]):00$/)
104
135
  true
105
136
  end
106
137
 
107
- # Custom attribute writer method with validation
108
- # @param [Object] hours Value to be assigned
138
+ # Custom attribute writer method checking allowed values (enum).
139
+ # @param [Object] hours Object to be assigned
109
140
  def hours=(hours)
110
- if !hours.nil? && hours > 168
111
- fail ArgumentError, 'invalid value for "hours", must be smaller than or equal to 168.'
141
+ validator = EnumAttributeValidator.new('Integer', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 48, 72, 168])
142
+ unless validator.valid?(hours)
143
+ fail ArgumentError, "invalid value for \"hours\", must be one of #{validator.allowable_values}."
112
144
  end
145
+ @hours = hours
146
+ end
113
147
 
114
- if !hours.nil? && hours < 0
115
- fail ArgumentError, 'invalid value for "hours", must be greater than or equal to 0.'
148
+ # Custom attribute writer method with validation
149
+ # @param [Object] same_day_cutoff Value to be assigned
150
+ def same_day_cutoff=(same_day_cutoff)
151
+ pattern = Regexp.new(/^([01][0-9]|2[0-3]):00$/)
152
+ if !same_day_cutoff.nil? && same_day_cutoff !~ pattern
153
+ fail ArgumentError, "invalid value for \"same_day_cutoff\", must conform to the pattern #{pattern}."
116
154
  end
117
155
 
118
- @hours = hours
156
+ @same_day_cutoff = same_day_cutoff
119
157
  end
120
158
 
121
159
  # Checks equality by comparing each attribute.
@@ -124,6 +162,7 @@ module Repull
124
162
  return true if self.equal?(o)
125
163
  self.class == o.class &&
126
164
  hours == o.hours &&
165
+ same_day_cutoff == o.same_day_cutoff &&
127
166
  allow_request_to_book == o.allow_request_to_book
128
167
  end
129
168
 
@@ -136,7 +175,7 @@ module Repull
136
175
  # Calculates hash code according to all attributes.
137
176
  # @return [Integer] Hash code
138
177
  def hash
139
- [hours, allow_request_to_book].hash
178
+ [hours, same_day_cutoff, allow_request_to_book].hash
140
179
  end
141
180
 
142
181
  # Builds the object from hash
@@ -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
@@ -26,6 +26,7 @@ module Repull
26
26
  :'AccountImportCompletedEvent',
27
27
  :'AccountImportFailedEvent',
28
28
  :'AccountImportStartedEvent',
29
+ :'AccountNotificationsMissingEvent',
29
30
  :'AccountUnitsAddedEvent',
30
31
  :'AiOperationCompletedEvent',
31
32
  :'AiOperationFailedEvent',
@@ -34,10 +35,12 @@ module Repull
34
35
  :'ChannelSyncFailedEvent',
35
36
  :'ConnectSessionAbandonedEvent',
36
37
  :'ConnectSessionCompletedEvent',
38
+ :'ConversationMessageStatusChangedEvent',
37
39
  :'InquiryCreatedEvent',
38
40
  :'InquiryUpdatedEvent',
39
41
  :'ListingCreatedEvent',
40
42
  :'ListingDeletedEvent',
43
+ :'ListingIcalFeedChangedEvent',
41
44
  :'ListingReactivatedEvent',
42
45
  :'ListingSuspendedEvent',
43
46
  :'ListingUpdatedEvent',
@@ -80,6 +83,7 @@ module Repull
80
83
  :'account.import.completed' => :'AccountImportCompletedEvent',
81
84
  :'account.import.failed' => :'AccountImportFailedEvent',
82
85
  :'account.import.started' => :'AccountImportStartedEvent',
86
+ :'account.notifications_missing' => :'AccountNotificationsMissingEvent',
83
87
  :'account.units.added' => :'AccountUnitsAddedEvent',
84
88
  :'ai.operation.completed' => :'AiOperationCompletedEvent',
85
89
  :'ai.operation.failed' => :'AiOperationFailedEvent',
@@ -88,10 +92,12 @@ module Repull
88
92
  :'channel.sync.failed' => :'ChannelSyncFailedEvent',
89
93
  :'connect.session.abandoned' => :'ConnectSessionAbandonedEvent',
90
94
  :'connect.session.completed' => :'ConnectSessionCompletedEvent',
95
+ :'conversation.message.status_changed' => :'ConversationMessageStatusChangedEvent',
91
96
  :'inquiry.created' => :'InquiryCreatedEvent',
92
97
  :'inquiry.updated' => :'InquiryUpdatedEvent',
93
98
  :'listing.created' => :'ListingCreatedEvent',
94
99
  :'listing.deleted' => :'ListingDeletedEvent',
100
+ :'listing.ical_feed_changed' => :'ListingIcalFeedChangedEvent',
95
101
  :'listing.reactivated' => :'ListingReactivatedEvent',
96
102
  :'listing.suspended' => :'ListingSuspendedEvent',
97
103
  :'listing.updated' => :'ListingUpdatedEvent',
@@ -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
@@ -38,6 +39,7 @@ module Repull
38
39
  LISTING_DELETED = "listing.deleted".freeze
39
40
  LISTING_SUSPENDED = "listing.suspended".freeze
40
41
  LISTING_REACTIVATED = "listing.reactivated".freeze
42
+ LISTING_ICAL_FEED_CHANGED = "listing.ical_feed_changed".freeze
41
43
  ACCOUNT_CREATED = "account.created".freeze
42
44
  CONNECT_SESSION_COMPLETED = "connect.session.completed".freeze
43
45
  CONNECT_SESSION_ABANDONED = "connect.session.abandoned".freeze
@@ -47,6 +49,7 @@ module Repull
47
49
  ACCOUNT_IMPORT_FAILED = "account.import.failed".freeze
48
50
  ACCOUNT_UNITS_ADDED = "account.units.added".freeze
49
51
  ACCOUNT_CALENDAR_ACCESS_CHANGED = "account.calendar_access_changed".freeze
52
+ ACCOUNT_NOTIFICATIONS_MISSING = "account.notifications_missing".freeze
50
53
  REVIEW_CREATED = "review.created".freeze
51
54
  REVIEW_RESPONDED = "review.responded".freeze
52
55
  AI_OPERATION_COMPLETED = "ai.operation.completed".freeze
@@ -60,7 +63,7 @@ module Repull
60
63
  USAGE_QUOTA_WARNING = "usage.quota.warning".freeze
61
64
 
62
65
  def self.all_vars
63
- @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, ACCOUNT_CALENDAR_ACCESS_CHANGED, 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
66
+ @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, LISTING_ICAL_FEED_CHANGED, 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
64
67
  end
65
68
 
66
69
  # 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.50'
14
+ VERSION = '0.2.52'
15
15
  end
data/lib/repull.rb CHANGED
@@ -35,6 +35,8 @@ require 'repull/models/account_import_finished_payload'
35
35
  require 'repull/models/account_import_stage'
36
36
  require 'repull/models/account_import_started_event'
37
37
  require 'repull/models/account_import_started_payload'
38
+ require 'repull/models/account_notifications_missing_event'
39
+ require 'repull/models/account_notifications_missing_payload'
38
40
  require 'repull/models/account_units_added_event'
39
41
  require 'repull/models/account_units_added_payload'
40
42
  require 'repull/models/account_units_added_payload_hotels_inner'
@@ -107,6 +109,7 @@ require 'repull/models/apply_connection_mappings200_response_results_inner'
107
109
  require 'repull/models/apply_connection_mappings_request'
108
110
  require 'repull/models/apply_connection_mappings_request_mappings_inner'
109
111
  require 'repull/models/auto_map_connection_units200_response'
112
+ require 'repull/models/auto_map_connection_units200_response_results_inner'
110
113
  require 'repull/models/auto_map_connection_units_request'
111
114
  require 'repull/models/availability_batch_write_request'
112
115
  require 'repull/models/availability_write_request'
@@ -212,6 +215,8 @@ require 'repull/models/conversation_guest_contact'
212
215
  require 'repull/models/conversation_host'
213
216
  require 'repull/models/conversation_list_response'
214
217
  require 'repull/models/conversation_message_attachment'
218
+ require 'repull/models/conversation_message_status_changed_event'
219
+ require 'repull/models/conversation_message_status_changed_payload'
215
220
  require 'repull/models/create_airbnb_listing_room_request'
216
221
  require 'repull/models/create_airbnb_offer_request'
217
222
  require 'repull/models/create_airbnb_offer_request_guest_details'
@@ -287,6 +292,8 @@ require 'repull/models/get_listing_calendar_sync200_response_channels_inner'
287
292
  require 'repull/models/get_listing_calendar_sync200_response_channels_inner_problems_inner'
288
293
  require 'repull/models/get_listing_calendar_sync200_response_channels_inner_queue'
289
294
  require 'repull/models/get_listing_calendar_sync200_response_channels_inner_queue_last_push'
295
+ require 'repull/models/get_listing_ical200_response'
296
+ require 'repull/models/get_listing_ical200_response_vrbo_inner'
290
297
  require 'repull/models/get_listing_markups200_response'
291
298
  require 'repull/models/get_listing_markups200_response_airbnb_inner'
292
299
  require 'repull/models/get_listing_markups200_response_booking_inner'
@@ -323,6 +330,7 @@ require 'repull/models/guest_create_response_pms'
323
330
  require 'repull/models/guest_flag'
324
331
  require 'repull/models/guest_list_response'
325
332
  require 'repull/models/guest_note'
333
+ require 'repull/models/guest_phone_type'
326
334
  require 'repull/models/guest_profile'
327
335
  require 'repull/models/guest_reservations_summary'
328
336
  require 'repull/models/guest_update_request'
@@ -419,6 +427,9 @@ require 'repull/models/listing_fee'
419
427
  require 'repull/models/listing_generate_content_request'
420
428
  require 'repull/models/listing_generate_content_response'
421
429
  require 'repull/models/listing_hotel'
430
+ require 'repull/models/listing_ical_feed_changed_event'
431
+ require 'repull/models/listing_ical_feed_changed_payload'
432
+ require 'repull/models/listing_ical_feed_changed_payload_feed'
422
433
  require 'repull/models/listing_list_response'
423
434
  require 'repull/models/listing_market_state_request'
424
435
  require 'repull/models/listing_market_state_response'
@@ -798,6 +809,7 @@ require 'repull/models/vrbo_import_status'
798
809
  require 'repull/models/vrbo_listing'
799
810
  require 'repull/models/vrbo_login200_response'
800
811
  require 'repull/models/vrbo_login_request'
812
+ require 'repull/models/vrbo_notifications'
801
813
  require 'repull/models/vrbo_reservation'
802
814
  require 'repull/models/vrbo_reservation_list_response'
803
815
  require 'repull/models/webhook_delivery'