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
@@ -0,0 +1,298 @@
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
+ class GetListingIcal200Response < ApiModelBase
18
+ attr_accessor :listing_id
19
+
20
+ # The feed address. Import it on any channel that reads iCal.
21
+ attr_accessor :url
22
+
23
+ # The calendar name the feed carries, and the name to give it when importing it by hand.
24
+ attr_accessor :calendar_name
25
+
26
+ # False when the listing's feed was turned off; the address then answers 404.
27
+ attr_accessor :enabled
28
+
29
+ # One entry per Vrbo unit mapped to the listing.
30
+ attr_accessor :vrbo
31
+
32
+ class EnumAttributeValidator
33
+ attr_reader :datatype
34
+ attr_reader :allowable_values
35
+
36
+ def initialize(datatype, allowable_values)
37
+ @allowable_values = allowable_values.map do |value|
38
+ case datatype.to_s
39
+ when /Integer/i
40
+ value.to_i
41
+ when /Float/i
42
+ value.to_f
43
+ else
44
+ value
45
+ end
46
+ end
47
+ end
48
+
49
+ def valid?(value)
50
+ !value || allowable_values.include?(value)
51
+ end
52
+ end
53
+
54
+ # Attribute mapping from ruby-style variable name to JSON key.
55
+ def self.attribute_map
56
+ {
57
+ :'listing_id' => :'listingId',
58
+ :'url' => :'url',
59
+ :'calendar_name' => :'calendarName',
60
+ :'enabled' => :'enabled',
61
+ :'vrbo' => :'vrbo'
62
+ }
63
+ end
64
+
65
+ # Returns attribute mapping this model knows about
66
+ def self.acceptable_attribute_map
67
+ attribute_map
68
+ end
69
+
70
+ # Returns all the JSON keys this model knows about
71
+ def self.acceptable_attributes
72
+ acceptable_attribute_map.values
73
+ end
74
+
75
+ # Attribute type mapping.
76
+ def self.openapi_types
77
+ {
78
+ :'listing_id' => :'String',
79
+ :'url' => :'String',
80
+ :'calendar_name' => :'String',
81
+ :'enabled' => :'Boolean',
82
+ :'vrbo' => :'Array<GetListingIcal200ResponseVrboInner>'
83
+ }
84
+ end
85
+
86
+ # List of attributes with nullable: true
87
+ def self.openapi_nullable
88
+ Set.new([
89
+ ])
90
+ end
91
+
92
+ # Initializes the object
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ def initialize(attributes = {})
95
+ if (!attributes.is_a?(Hash))
96
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetListingIcal200Response` initialize method"
97
+ end
98
+
99
+ # check to see if the attribute exists and convert string to symbol for hash key
100
+ acceptable_attribute_map = self.class.acceptable_attribute_map
101
+ attributes = attributes.each_with_object({}) { |(k, v), h|
102
+ if (!acceptable_attribute_map.key?(k.to_sym))
103
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetListingIcal200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
104
+ end
105
+ h[k.to_sym] = v
106
+ }
107
+
108
+ if attributes.key?(:'listing_id')
109
+ self.listing_id = attributes[:'listing_id']
110
+ else
111
+ self.listing_id = nil
112
+ end
113
+
114
+ if attributes.key?(:'url')
115
+ self.url = attributes[:'url']
116
+ else
117
+ self.url = nil
118
+ end
119
+
120
+ if attributes.key?(:'calendar_name')
121
+ self.calendar_name = attributes[:'calendar_name']
122
+ else
123
+ self.calendar_name = nil
124
+ end
125
+
126
+ if attributes.key?(:'enabled')
127
+ self.enabled = attributes[:'enabled']
128
+ else
129
+ self.enabled = nil
130
+ end
131
+
132
+ if attributes.key?(:'vrbo')
133
+ if (value = attributes[:'vrbo']).is_a?(Array)
134
+ self.vrbo = value
135
+ end
136
+ else
137
+ self.vrbo = nil
138
+ end
139
+ end
140
+
141
+ # Show invalid properties with the reasons. Usually used together with valid?
142
+ # @return Array for valid properties with the reasons
143
+ def list_invalid_properties
144
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
145
+ invalid_properties = Array.new
146
+ if @listing_id.nil?
147
+ invalid_properties.push('invalid value for "listing_id", listing_id cannot be nil.')
148
+ end
149
+
150
+ if @url.nil?
151
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
152
+ end
153
+
154
+ if @calendar_name.nil?
155
+ invalid_properties.push('invalid value for "calendar_name", calendar_name cannot be nil.')
156
+ end
157
+
158
+ if @enabled.nil?
159
+ invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
160
+ end
161
+
162
+ if @vrbo.nil?
163
+ invalid_properties.push('invalid value for "vrbo", vrbo cannot be nil.')
164
+ end
165
+
166
+ invalid_properties
167
+ end
168
+
169
+ # Check to see if the all the properties in the model are valid
170
+ # @return true if the model is valid
171
+ def valid?
172
+ warn '[DEPRECATED] the `valid?` method is obsolete'
173
+ return false if @listing_id.nil?
174
+ return false if @url.nil?
175
+ return false if @calendar_name.nil?
176
+ calendar_name_validator = EnumAttributeValidator.new('String', ["Repull"])
177
+ return false unless calendar_name_validator.valid?(@calendar_name)
178
+ return false if @enabled.nil?
179
+ return false if @vrbo.nil?
180
+ true
181
+ end
182
+
183
+ # Custom attribute writer method with validation
184
+ # @param [Object] listing_id Value to be assigned
185
+ def listing_id=(listing_id)
186
+ if listing_id.nil?
187
+ fail ArgumentError, 'listing_id cannot be nil'
188
+ end
189
+
190
+ @listing_id = listing_id
191
+ end
192
+
193
+ # Custom attribute writer method with validation
194
+ # @param [Object] url Value to be assigned
195
+ def url=(url)
196
+ if url.nil?
197
+ fail ArgumentError, 'url cannot be nil'
198
+ end
199
+
200
+ @url = url
201
+ end
202
+
203
+ # Custom attribute writer method checking allowed values (enum).
204
+ # @param [Object] calendar_name Object to be assigned
205
+ def calendar_name=(calendar_name)
206
+ validator = EnumAttributeValidator.new('String', ["Repull"])
207
+ unless validator.valid?(calendar_name)
208
+ fail ArgumentError, "invalid value for \"calendar_name\", must be one of #{validator.allowable_values}."
209
+ end
210
+ @calendar_name = calendar_name
211
+ end
212
+
213
+ # Custom attribute writer method with validation
214
+ # @param [Object] enabled Value to be assigned
215
+ def enabled=(enabled)
216
+ if enabled.nil?
217
+ fail ArgumentError, 'enabled cannot be nil'
218
+ end
219
+
220
+ @enabled = enabled
221
+ end
222
+
223
+ # Custom attribute writer method with validation
224
+ # @param [Object] vrbo Value to be assigned
225
+ def vrbo=(vrbo)
226
+ if vrbo.nil?
227
+ fail ArgumentError, 'vrbo cannot be nil'
228
+ end
229
+
230
+ @vrbo = vrbo
231
+ end
232
+
233
+ # Checks equality by comparing each attribute.
234
+ # @param [Object] Object to be compared
235
+ def ==(o)
236
+ return true if self.equal?(o)
237
+ self.class == o.class &&
238
+ listing_id == o.listing_id &&
239
+ url == o.url &&
240
+ calendar_name == o.calendar_name &&
241
+ enabled == o.enabled &&
242
+ vrbo == o.vrbo
243
+ end
244
+
245
+ # @see the `==` method
246
+ # @param [Object] Object to be compared
247
+ def eql?(o)
248
+ self == o
249
+ end
250
+
251
+ # Calculates hash code according to all attributes.
252
+ # @return [Integer] Hash code
253
+ def hash
254
+ [listing_id, url, calendar_name, enabled, vrbo].hash
255
+ end
256
+
257
+ # Builds the object from hash
258
+ # @param [Hash] attributes Model attributes in the form of hash
259
+ # @return [Object] Returns the model itself
260
+ def self.build_from_hash(attributes)
261
+ return nil unless attributes.is_a?(Hash)
262
+ attributes = attributes.transform_keys(&:to_sym)
263
+ transformed_hash = {}
264
+ openapi_types.each_pair do |key, type|
265
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
266
+ transformed_hash["#{key}"] = nil
267
+ elsif type =~ /\AArray<(.*)>/i
268
+ # check to ensure the input is an array given that the attribute
269
+ # is documented as an array but the input is not
270
+ if attributes[attribute_map[key]].is_a?(Array)
271
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
272
+ end
273
+ elsif !attributes[attribute_map[key]].nil?
274
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
275
+ end
276
+ end
277
+ new(transformed_hash)
278
+ end
279
+
280
+ # Returns the object in the form of hash
281
+ # @return [Hash] Returns the object in the form of hash
282
+ def to_hash
283
+ hash = {}
284
+ self.class.attribute_map.each_pair do |attr, param|
285
+ value = self.send(attr)
286
+ if value.nil?
287
+ is_nullable = self.class.openapi_nullable.include?(attr)
288
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
289
+ end
290
+
291
+ hash[param] = _to_hash(value)
292
+ end
293
+ hash
294
+ end
295
+
296
+ end
297
+
298
+ end
@@ -0,0 +1,285 @@
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
+ class GetListingIcal200ResponseVrboInner < ApiModelBase
18
+ # The Vrbo listing number (`unitId` on `GET /v1/connections/{id}/units`).
19
+ attr_accessor :unit_id
20
+
21
+ # Calendar sync is on for the unit.
22
+ attr_accessor :calendar_sync
23
+
24
+ # `imported`: Vrbo imports the feed. `pending`: calendar sync is on and Repull has not checked the unit yet — it adds the feed itself. `failed`: Vrbo did not take it; ask the host to add `url` in Vrbo → Calendar → Import calendar, named \"Repull\". `not_imported`: checked, not there, and not added (for example, the feed is turned off). `off`: calendar sync is off, so Repull leaves the unit's imported calendars alone.
25
+ attr_accessor :status
26
+
27
+ # Names of other calendars the unit still imports, as Vrbo shows them.
28
+ attr_accessor :other_feeds
29
+
30
+ # When Repull last read the unit's imported calendars.
31
+ attr_accessor :checked_at
32
+
33
+ class EnumAttributeValidator
34
+ attr_reader :datatype
35
+ attr_reader :allowable_values
36
+
37
+ def initialize(datatype, allowable_values)
38
+ @allowable_values = allowable_values.map do |value|
39
+ case datatype.to_s
40
+ when /Integer/i
41
+ value.to_i
42
+ when /Float/i
43
+ value.to_f
44
+ else
45
+ value
46
+ end
47
+ end
48
+ end
49
+
50
+ def valid?(value)
51
+ !value || allowable_values.include?(value)
52
+ end
53
+ end
54
+
55
+ # Attribute mapping from ruby-style variable name to JSON key.
56
+ def self.attribute_map
57
+ {
58
+ :'unit_id' => :'unitId',
59
+ :'calendar_sync' => :'calendarSync',
60
+ :'status' => :'status',
61
+ :'other_feeds' => :'otherFeeds',
62
+ :'checked_at' => :'checkedAt'
63
+ }
64
+ end
65
+
66
+ # Returns attribute mapping this model knows about
67
+ def self.acceptable_attribute_map
68
+ attribute_map
69
+ end
70
+
71
+ # Returns all the JSON keys this model knows about
72
+ def self.acceptable_attributes
73
+ acceptable_attribute_map.values
74
+ end
75
+
76
+ # Attribute type mapping.
77
+ def self.openapi_types
78
+ {
79
+ :'unit_id' => :'String',
80
+ :'calendar_sync' => :'Boolean',
81
+ :'status' => :'String',
82
+ :'other_feeds' => :'Array<String>',
83
+ :'checked_at' => :'Time'
84
+ }
85
+ end
86
+
87
+ # List of attributes with nullable: true
88
+ def self.openapi_nullable
89
+ Set.new([
90
+ :'checked_at'
91
+ ])
92
+ end
93
+
94
+ # Initializes the object
95
+ # @param [Hash] attributes Model attributes in the form of hash
96
+ def initialize(attributes = {})
97
+ if (!attributes.is_a?(Hash))
98
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetListingIcal200ResponseVrboInner` initialize method"
99
+ end
100
+
101
+ # check to see if the attribute exists and convert string to symbol for hash key
102
+ acceptable_attribute_map = self.class.acceptable_attribute_map
103
+ attributes = attributes.each_with_object({}) { |(k, v), h|
104
+ if (!acceptable_attribute_map.key?(k.to_sym))
105
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetListingIcal200ResponseVrboInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
106
+ end
107
+ h[k.to_sym] = v
108
+ }
109
+
110
+ if attributes.key?(:'unit_id')
111
+ self.unit_id = attributes[:'unit_id']
112
+ else
113
+ self.unit_id = nil
114
+ end
115
+
116
+ if attributes.key?(:'calendar_sync')
117
+ self.calendar_sync = attributes[:'calendar_sync']
118
+ else
119
+ self.calendar_sync = nil
120
+ end
121
+
122
+ if attributes.key?(:'status')
123
+ self.status = attributes[:'status']
124
+ else
125
+ self.status = nil
126
+ end
127
+
128
+ if attributes.key?(:'other_feeds')
129
+ if (value = attributes[:'other_feeds']).is_a?(Array)
130
+ self.other_feeds = value
131
+ end
132
+ else
133
+ self.other_feeds = nil
134
+ end
135
+
136
+ if attributes.key?(:'checked_at')
137
+ self.checked_at = attributes[:'checked_at']
138
+ else
139
+ self.checked_at = nil
140
+ end
141
+ end
142
+
143
+ # Show invalid properties with the reasons. Usually used together with valid?
144
+ # @return Array for valid properties with the reasons
145
+ def list_invalid_properties
146
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
147
+ invalid_properties = Array.new
148
+ if @unit_id.nil?
149
+ invalid_properties.push('invalid value for "unit_id", unit_id cannot be nil.')
150
+ end
151
+
152
+ if @calendar_sync.nil?
153
+ invalid_properties.push('invalid value for "calendar_sync", calendar_sync cannot be nil.')
154
+ end
155
+
156
+ if @status.nil?
157
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
158
+ end
159
+
160
+ if @other_feeds.nil?
161
+ invalid_properties.push('invalid value for "other_feeds", other_feeds cannot be nil.')
162
+ end
163
+
164
+ invalid_properties
165
+ end
166
+
167
+ # Check to see if the all the properties in the model are valid
168
+ # @return true if the model is valid
169
+ def valid?
170
+ warn '[DEPRECATED] the `valid?` method is obsolete'
171
+ return false if @unit_id.nil?
172
+ return false if @calendar_sync.nil?
173
+ return false if @status.nil?
174
+ status_validator = EnumAttributeValidator.new('String', ["imported", "pending", "failed", "not_imported", "off"])
175
+ return false unless status_validator.valid?(@status)
176
+ return false if @other_feeds.nil?
177
+ true
178
+ end
179
+
180
+ # Custom attribute writer method with validation
181
+ # @param [Object] unit_id Value to be assigned
182
+ def unit_id=(unit_id)
183
+ if unit_id.nil?
184
+ fail ArgumentError, 'unit_id cannot be nil'
185
+ end
186
+
187
+ @unit_id = unit_id
188
+ end
189
+
190
+ # Custom attribute writer method with validation
191
+ # @param [Object] calendar_sync Value to be assigned
192
+ def calendar_sync=(calendar_sync)
193
+ if calendar_sync.nil?
194
+ fail ArgumentError, 'calendar_sync cannot be nil'
195
+ end
196
+
197
+ @calendar_sync = calendar_sync
198
+ end
199
+
200
+ # Custom attribute writer method checking allowed values (enum).
201
+ # @param [Object] status Object to be assigned
202
+ def status=(status)
203
+ validator = EnumAttributeValidator.new('String', ["imported", "pending", "failed", "not_imported", "off"])
204
+ unless validator.valid?(status)
205
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
206
+ end
207
+ @status = status
208
+ end
209
+
210
+ # Custom attribute writer method with validation
211
+ # @param [Object] other_feeds Value to be assigned
212
+ def other_feeds=(other_feeds)
213
+ if other_feeds.nil?
214
+ fail ArgumentError, 'other_feeds cannot be nil'
215
+ end
216
+
217
+ @other_feeds = other_feeds
218
+ end
219
+
220
+ # Checks equality by comparing each attribute.
221
+ # @param [Object] Object to be compared
222
+ def ==(o)
223
+ return true if self.equal?(o)
224
+ self.class == o.class &&
225
+ unit_id == o.unit_id &&
226
+ calendar_sync == o.calendar_sync &&
227
+ status == o.status &&
228
+ other_feeds == o.other_feeds &&
229
+ checked_at == o.checked_at
230
+ end
231
+
232
+ # @see the `==` method
233
+ # @param [Object] Object to be compared
234
+ def eql?(o)
235
+ self == o
236
+ end
237
+
238
+ # Calculates hash code according to all attributes.
239
+ # @return [Integer] Hash code
240
+ def hash
241
+ [unit_id, calendar_sync, status, other_feeds, checked_at].hash
242
+ end
243
+
244
+ # Builds the object from hash
245
+ # @param [Hash] attributes Model attributes in the form of hash
246
+ # @return [Object] Returns the model itself
247
+ def self.build_from_hash(attributes)
248
+ return nil unless attributes.is_a?(Hash)
249
+ attributes = attributes.transform_keys(&:to_sym)
250
+ transformed_hash = {}
251
+ openapi_types.each_pair do |key, type|
252
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
253
+ transformed_hash["#{key}"] = nil
254
+ elsif type =~ /\AArray<(.*)>/i
255
+ # check to ensure the input is an array given that the attribute
256
+ # is documented as an array but the input is not
257
+ if attributes[attribute_map[key]].is_a?(Array)
258
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
259
+ end
260
+ elsif !attributes[attribute_map[key]].nil?
261
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
262
+ end
263
+ end
264
+ new(transformed_hash)
265
+ end
266
+
267
+ # Returns the object in the form of hash
268
+ # @return [Hash] Returns the object in the form of hash
269
+ def to_hash
270
+ hash = {}
271
+ self.class.attribute_map.each_pair do |attr, param|
272
+ value = self.send(attr)
273
+ if value.nil?
274
+ is_nullable = self.class.openapi_nullable.include?(attr)
275
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
276
+ end
277
+
278
+ hash[param] = _to_hash(value)
279
+ end
280
+ hash
281
+ end
282
+
283
+ end
284
+
285
+ end
@@ -39,6 +39,9 @@ module Repull
39
39
 
40
40
  attr_accessor :error_code
41
41
 
42
+ # The repull.dev dashboard page this call was run from (`keys`, `playground`, `quickstart`, `connect`, `settings/connect`), or null for a call your own code made. Dashboard calls don't count toward your plan's request quota.
43
+ attr_accessor :dashboard_surface
44
+
42
45
  attr_accessor :created_at
43
46
 
44
47
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -56,6 +59,7 @@ module Repull
56
59
  :'ip_address' => :'ipAddress',
57
60
  :'user_agent' => :'userAgent',
58
61
  :'error_code' => :'errorCode',
62
+ :'dashboard_surface' => :'dashboardSurface',
59
63
  :'created_at' => :'createdAt'
60
64
  }
61
65
  end
@@ -85,6 +89,7 @@ module Repull
85
89
  :'ip_address' => :'String',
86
90
  :'user_agent' => :'String',
87
91
  :'error_code' => :'String',
92
+ :'dashboard_surface' => :'String',
88
93
  :'created_at' => :'Time'
89
94
  }
90
95
  end
@@ -101,6 +106,7 @@ module Repull
101
106
  :'ip_address',
102
107
  :'user_agent',
103
108
  :'error_code',
109
+ :'dashboard_surface',
104
110
  ])
105
111
  end
106
112
 
@@ -168,6 +174,10 @@ module Repull
168
174
  self.error_code = attributes[:'error_code']
169
175
  end
170
176
 
177
+ if attributes.key?(:'dashboard_surface')
178
+ self.dashboard_surface = attributes[:'dashboard_surface']
179
+ end
180
+
171
181
  if attributes.key?(:'created_at')
172
182
  self.created_at = attributes[:'created_at']
173
183
  end
@@ -205,6 +215,7 @@ module Repull
205
215
  ip_address == o.ip_address &&
206
216
  user_agent == o.user_agent &&
207
217
  error_code == o.error_code &&
218
+ dashboard_surface == o.dashboard_surface &&
208
219
  created_at == o.created_at
209
220
  end
210
221
 
@@ -217,7 +228,7 @@ module Repull
217
228
  # Calculates hash code according to all attributes.
218
229
  # @return [Integer] Hash code
219
230
  def hash
220
- [id, request_id, method, path, operation_id, status_code, latency_ms, request_bytes, response_bytes, ip_address, user_agent, error_code, created_at].hash
231
+ [id, request_id, method, path, operation_id, status_code, latency_ms, request_bytes, response_bytes, ip_address, user_agent, error_code, dashboard_surface, created_at].hash
221
232
  end
222
233
 
223
234
  # Builds the object from hash