repull 0.2.25 → 0.2.27

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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +38 -23
  3. data/lib/repull/api/booking_com_api.rb +9 -2
  4. data/lib/repull/api/connect_api.rb +6 -6
  5. data/lib/repull/api/conversations_api.rb +3 -0
  6. data/lib/repull/api/listings_api.rb +2 -2
  7. data/lib/repull/api/properties_api.rb +5 -2
  8. data/lib/repull/api/reservations_api.rb +96 -6
  9. data/lib/repull/api/reviews_api.rb +3 -0
  10. data/lib/repull/api/vrbo_api.rb +11 -4
  11. data/lib/repull/models/airbnb_listing.rb +13 -2
  12. data/lib/repull/models/airbnb_listing_details_write_request.rb +109 -5
  13. data/lib/repull/models/airbnb_listing_details_write_request_check_in_option.rb +1 -1
  14. data/lib/repull/models/airbnb_permits_write_request_permits_inner.rb +2 -2
  15. data/lib/repull/models/airbnb_pricing_write_request.rb +30 -2
  16. data/lib/repull/models/airbnb_pricing_write_request_fees_inner.rb +291 -0
  17. data/lib/repull/models/booking_property_listings_inner.rb +57 -1
  18. data/lib/repull/models/cancel_reservation200_response.rb +1 -1
  19. data/lib/repull/models/connect_session_completed_event.rb +281 -0
  20. data/lib/repull/models/connect_session_completed_payload.rb +210 -0
  21. data/lib/repull/models/connect_status.rb +35 -4
  22. data/lib/repull/models/connect_status_capabilities.rb +148 -0
  23. data/lib/repull/models/connection.rb +28 -5
  24. data/lib/repull/models/connection_action.rb +188 -0
  25. data/lib/repull/models/conversation.rb +12 -1
  26. data/lib/repull/models/conversation_detail.rb +12 -1
  27. data/lib/repull/models/create_connect_session_request.rb +40 -2
  28. data/lib/repull/models/create_connection_request.rb +46 -8
  29. data/lib/repull/models/error_error.rb +13 -1
  30. data/lib/repull/models/{cancel_reservation200_response_pms.rb → error_error_listings_inner.rb} +36 -30
  31. data/lib/repull/models/get_booking_extranet_login_status200_response.rb +2 -1
  32. data/lib/repull/models/list_listing_units200_response.rb +2 -1
  33. data/lib/repull/models/listing.rb +23 -2
  34. data/lib/repull/models/listing_capabilities.rb +148 -0
  35. data/lib/repull/models/property.rb +26 -3
  36. data/lib/repull/models/record_account.rb +170 -0
  37. data/lib/repull/models/reservation.rb +12 -1
  38. data/lib/repull/models/reservation_capabilities.rb +230 -0
  39. data/lib/repull/models/reservation_create_request.rb +172 -33
  40. data/lib/repull/models/reservation_create_response.rb +6 -6
  41. data/lib/repull/models/reservation_create_response_unit.rb +1 -1
  42. data/lib/repull/models/{reservation_create_response_pms.rb → reservation_pms_outcome.rb} +38 -8
  43. data/lib/repull/models/reservation_pms_outcome_quote.rb +168 -0
  44. data/lib/repull/models/{cancel_reservation200_response_pms_errors_inner.rb → reservation_pms_section_error.rb} +16 -16
  45. data/lib/repull/models/reservation_quote_request.rb +312 -0
  46. data/lib/repull/models/reservation_quote_response.rb +228 -0
  47. data/lib/repull/models/reservation_quote_response_breakdown.rb +175 -0
  48. data/lib/repull/models/reservation_update_response.rb +16 -6
  49. data/lib/repull/models/review.rb +12 -1
  50. data/lib/repull/models/submit_smoobu_credentials_request.rb +2 -5
  51. data/lib/repull/models/submit_smoobu_credentials_request_credentials.rb +193 -0
  52. data/lib/repull/models/update_airbnb_checkin_guide200_response.rb +147 -0
  53. data/lib/repull/models/update_airbnb_checkin_guide200_response_data.rb +177 -0
  54. data/lib/repull/models/{airbnb_permits_write_request_permits_inner_answers_value.rb → update_airbnb_checkin_guide200_response_data_steps_inner.rb} +24 -43
  55. data/lib/repull/models/update_airbnb_checkin_guide_request.rb +186 -0
  56. data/lib/repull/models/update_airbnb_checkin_guide_request_steps_inner.rb +182 -0
  57. data/lib/repull/models/webhook_event.rb +2 -0
  58. data/lib/repull/models/webhook_event_type.rb +2 -1
  59. data/lib/repull/version.rb +1 -1
  60. data/lib/repull.rb +21 -4
  61. data/openapi/v1.json +2221 -340
  62. data/scripts/regen.sh +1 -1
  63. metadata +23 -6
@@ -0,0 +1,148 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resetsAt` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | 50 | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Repull
17
+ # `GET /v1/listings/{id}` only. What the API can do with this listing.
18
+ class ListingCapabilities < ApiModelBase
19
+ attr_accessor :reservations
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'reservations' => :'reservations'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'reservations' => :'ReservationCapabilities'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ListingCapabilities` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ListingCapabilities`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'reservations')
68
+ self.reservations = attributes[:'reservations']
69
+ end
70
+ end
71
+
72
+ # Show invalid properties with the reasons. Usually used together with valid?
73
+ # @return Array for valid properties with the reasons
74
+ def list_invalid_properties
75
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ warn '[DEPRECATED] the `valid?` method is obsolete'
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ reservations == o.reservations
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [reservations].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ attributes = attributes.transform_keys(&:to_sym)
113
+ transformed_hash = {}
114
+ openapi_types.each_pair do |key, type|
115
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
116
+ transformed_hash["#{key}"] = nil
117
+ elsif type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[attribute_map[key]].is_a?(Array)
121
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
122
+ end
123
+ elsif !attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
125
+ end
126
+ end
127
+ new(transformed_hash)
128
+ end
129
+
130
+ # Returns the object in the form of hash
131
+ # @return [Hash] Returns the object in the form of hash
132
+ def to_hash
133
+ hash = {}
134
+ self.class.attribute_map.each_pair do |attr, param|
135
+ value = self.send(attr)
136
+ if value.nil?
137
+ is_nullable = self.class.openapi_nullable.include?(attr)
138
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
139
+ end
140
+
141
+ hash[param] = _to_hash(value)
142
+ end
143
+ hash
144
+ end
145
+
146
+ end
147
+
148
+ end
@@ -14,14 +14,20 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- # A vacation rental property in your Repull workspace. Backed by the core `listings` row — enriched per-PMS fields (bedrooms, property type, provider id, etc.) live in provider-specific detail tables and are NOT returned here. Field availability differs by endpoint: - `channels` is returned by the list endpoint (`GET /v1/properties`) only. - `latitude`, `longitude`, `createdAt`, and `amenities` are returned by the detail endpoint (`GET /v1/properties/{id}`) only. `amenities` requires `?include=amenities`. An **inactive** property (`status: inactive`) appears only in the list endpoint, and only when `?status=inactive|all` asks for it. Such a row carries identity fields only — `id`, `name`, `status`, `lifecycleStatus`, `channels`, `updatedAt` — so every other field is absent until the property is activated. Every other endpoint answers `403 listing_inactive` for it.
17
+ # A vacation rental property in your Repull workspace. Backed by the core `listings` row — enriched per-PMS fields (bedrooms, property type, provider id, etc.) live in provider-specific detail tables and are NOT returned here. Field availability differs by endpoint: - `channels` is returned by the list endpoint (`GET /v1/properties`) only. - `latitude`, `longitude`, `createdAt`, and `amenities` are returned by the detail endpoint (`GET /v1/properties/{id}`) only. `amenities` requires `?include=amenities`. An **inactive** property (`status: inactive`) appears only in the list endpoint, and only when `?status=inactive|all` asks for it. Such a row carries identity fields only — `id`, `name`, `city`, `status`, `inactiveReason`, `lifecycleStatus`, `channels`, `accounts`, `updatedAt` — so every other field is absent until the property is activated. `inactiveReason` is `plan_limit` (held back by the plan; activating needs a free slot or an upgrade), `unlisted_on_airbnb`, or `deactivated` (switched off by you). Every other endpoint answers `403 listing_inactive` for it.
18
18
  class Property < ApiModelBase
19
+ # The connected account the property belongs to on each channel it is on. List endpoint.
20
+ attr_accessor :accounts
21
+
19
22
  # Internal Repull property ID. Equal to the listing id (`listings.id`); the same integer is used as `listingId` on reservations and `propertyId` on availability.
20
23
  attr_accessor :id
21
24
 
22
- # Property name
25
+ # Property name — the host's internal nickname.
23
26
  attr_accessor :name
24
27
 
28
+ # The title guests see on the channel (e.g. the Airbnb listing title). `name` is the host's internal nickname for the listing; show `publicName` in anything a guest or end user reads. Present on inactive rows too.
29
+ attr_accessor :public_name
30
+
25
31
  # Street address (from the listing's `street` field).
26
32
  attr_accessor :address
27
33
 
@@ -57,8 +63,10 @@ module Repull
57
63
  # Attribute mapping from ruby-style variable name to JSON key.
58
64
  def self.attribute_map
59
65
  {
66
+ :'accounts' => :'accounts',
60
67
  :'id' => :'id',
61
68
  :'name' => :'name',
69
+ :'public_name' => :'publicName',
62
70
  :'address' => :'address',
63
71
  :'city' => :'city',
64
72
  :'latitude' => :'latitude',
@@ -86,8 +94,10 @@ module Repull
86
94
  # Attribute type mapping.
87
95
  def self.openapi_types
88
96
  {
97
+ :'accounts' => :'Array<RecordAccount>',
89
98
  :'id' => :'String',
90
99
  :'name' => :'String',
100
+ :'public_name' => :'String',
91
101
  :'address' => :'String',
92
102
  :'city' => :'String',
93
103
  :'latitude' => :'String',
@@ -105,6 +115,7 @@ module Repull
105
115
  # List of attributes with nullable: true
106
116
  def self.openapi_nullable
107
117
  Set.new([
118
+ :'public_name',
108
119
  :'address',
109
120
  :'city',
110
121
  :'latitude',
@@ -130,6 +141,12 @@ module Repull
130
141
  h[k.to_sym] = v
131
142
  }
132
143
 
144
+ if attributes.key?(:'accounts')
145
+ if (value = attributes[:'accounts']).is_a?(Array)
146
+ self.accounts = value
147
+ end
148
+ end
149
+
133
150
  if attributes.key?(:'id')
134
151
  self.id = attributes[:'id']
135
152
  end
@@ -138,6 +155,10 @@ module Repull
138
155
  self.name = attributes[:'name']
139
156
  end
140
157
 
158
+ if attributes.key?(:'public_name')
159
+ self.public_name = attributes[:'public_name']
160
+ end
161
+
141
162
  if attributes.key?(:'address')
142
163
  self.address = attributes[:'address']
143
164
  end
@@ -207,8 +228,10 @@ module Repull
207
228
  def ==(o)
208
229
  return true if self.equal?(o)
209
230
  self.class == o.class &&
231
+ accounts == o.accounts &&
210
232
  id == o.id &&
211
233
  name == o.name &&
234
+ public_name == o.public_name &&
212
235
  address == o.address &&
213
236
  city == o.city &&
214
237
  latitude == o.latitude &&
@@ -231,7 +254,7 @@ module Repull
231
254
  # Calculates hash code according to all attributes.
232
255
  # @return [Integer] Hash code
233
256
  def hash
234
- [id, name, address, city, latitude, longitude, currency, status, lifecycle_status, created_at, updated_at, channels, amenities].hash
257
+ [accounts, id, name, public_name, address, city, latitude, longitude, currency, status, lifecycle_status, created_at, updated_at, channels, amenities].hash
235
258
  end
236
259
 
237
260
  # Builds the object from hash
@@ -0,0 +1,170 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resetsAt` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | 50 | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Repull
17
+ # The connected account a record belongs to — keyed exactly like the webhook `account` block and `connect.session.completed`, so one `provider:externalAccountId` key routes reads and events to the same user. `null` when it cannot be resolved (never guessed).
18
+ class RecordAccount < ApiModelBase
19
+ # airbnb, booking, booking_extranet, vrbo, or the PMS id (hostaway, cloudbeds, …).
20
+ attr_accessor :provider
21
+
22
+ # The provider's own account id — Airbnb host id, Booking.com hotel id, Extranet login, Vrbo account, or the PMS account.
23
+ attr_accessor :external_account_id
24
+
25
+ # Repull connection id (`X-Account-Id`), when the account has one. A string, like every id in API responses.
26
+ attr_accessor :connection_id
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'provider' => :'provider',
32
+ :'external_account_id' => :'externalAccountId',
33
+ :'connection_id' => :'connectionId'
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
+ :'provider' => :'String',
51
+ :'external_account_id' => :'String',
52
+ :'connection_id' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ :'connection_id'
60
+ ])
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::RecordAccount` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ acceptable_attribute_map = self.class.acceptable_attribute_map
72
+ attributes = attributes.each_with_object({}) { |(k, v), h|
73
+ if (!acceptable_attribute_map.key?(k.to_sym))
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::RecordAccount`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
75
+ end
76
+ h[k.to_sym] = v
77
+ }
78
+
79
+ if attributes.key?(:'provider')
80
+ self.provider = attributes[:'provider']
81
+ end
82
+
83
+ if attributes.key?(:'external_account_id')
84
+ self.external_account_id = attributes[:'external_account_id']
85
+ end
86
+
87
+ if attributes.key?(:'connection_id')
88
+ self.connection_id = attributes[:'connection_id']
89
+ end
90
+ end
91
+
92
+ # Show invalid properties with the reasons. Usually used together with valid?
93
+ # @return Array for valid properties with the reasons
94
+ def list_invalid_properties
95
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
96
+ invalid_properties = Array.new
97
+ invalid_properties
98
+ end
99
+
100
+ # Check to see if the all the properties in the model are valid
101
+ # @return true if the model is valid
102
+ def valid?
103
+ warn '[DEPRECATED] the `valid?` method is obsolete'
104
+ true
105
+ end
106
+
107
+ # Checks equality by comparing each attribute.
108
+ # @param [Object] Object to be compared
109
+ def ==(o)
110
+ return true if self.equal?(o)
111
+ self.class == o.class &&
112
+ provider == o.provider &&
113
+ external_account_id == o.external_account_id &&
114
+ connection_id == o.connection_id
115
+ end
116
+
117
+ # @see the `==` method
118
+ # @param [Object] Object to be compared
119
+ def eql?(o)
120
+ self == o
121
+ end
122
+
123
+ # Calculates hash code according to all attributes.
124
+ # @return [Integer] Hash code
125
+ def hash
126
+ [provider, external_account_id, connection_id].hash
127
+ end
128
+
129
+ # Builds the object from hash
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ # @return [Object] Returns the model itself
132
+ def self.build_from_hash(attributes)
133
+ return nil unless attributes.is_a?(Hash)
134
+ attributes = attributes.transform_keys(&:to_sym)
135
+ transformed_hash = {}
136
+ openapi_types.each_pair do |key, type|
137
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
138
+ transformed_hash["#{key}"] = nil
139
+ elsif type =~ /\AArray<(.*)>/i
140
+ # check to ensure the input is an array given that the attribute
141
+ # is documented as an array but the input is not
142
+ if attributes[attribute_map[key]].is_a?(Array)
143
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
144
+ end
145
+ elsif !attributes[attribute_map[key]].nil?
146
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
147
+ end
148
+ end
149
+ new(transformed_hash)
150
+ end
151
+
152
+ # Returns the object in the form of hash
153
+ # @return [Hash] Returns the object in the form of hash
154
+ def to_hash
155
+ hash = {}
156
+ self.class.attribute_map.each_pair do |attr, param|
157
+ value = self.send(attr)
158
+ if value.nil?
159
+ is_nullable = self.class.openapi_nullable.include?(attr)
160
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
161
+ end
162
+
163
+ hash[param] = _to_hash(value)
164
+ end
165
+ hash
166
+ end
167
+
168
+ end
169
+
170
+ end
@@ -16,6 +16,9 @@ require 'time'
16
16
  module Repull
17
17
  # A booking/reservation from a connected PMS. Identical shape between list-row (`GET /v1/reservations`) and detail (`GET /v1/reservations/{id}`) — SDK consumers can use the same type for both. The canonical (post-2026-05) shape uses nested `primaryGuest`, `occupancy`, `financials` blocks. The legacy flat fields (`guestId`, `totalPrice`, `currency`, `guestDetails`) remain populated for back-compat and are marked `deprecated` here. New consumers should read from the nested blocks; existing consumers continue to work unchanged.
18
18
  class Reservation < ApiModelBase
19
+ # The connected account this reservation belongs to. List endpoint.
20
+ attr_accessor :account
21
+
19
22
  # Internal Repull reservation ID
20
23
  attr_accessor :id
21
24
 
@@ -91,6 +94,7 @@ module Repull
91
94
  # Attribute mapping from ruby-style variable name to JSON key.
92
95
  def self.attribute_map
93
96
  {
97
+ :'account' => :'account',
94
98
  :'id' => :'id',
95
99
  :'listing_id' => :'listingId',
96
100
  :'guest_id' => :'guestId',
@@ -132,6 +136,7 @@ module Repull
132
136
  # Attribute type mapping.
133
137
  def self.openapi_types
134
138
  {
139
+ :'account' => :'RecordAccount',
135
140
  :'id' => :'String',
136
141
  :'listing_id' => :'String',
137
142
  :'guest_id' => :'String',
@@ -163,6 +168,7 @@ module Repull
163
168
  # List of attributes with nullable: true
164
169
  def self.openapi_nullable
165
170
  Set.new([
171
+ :'account',
166
172
  :'check_in_time',
167
173
  :'check_out_time',
168
174
  :'source',
@@ -189,6 +195,10 @@ module Repull
189
195
  h[k.to_sym] = v
190
196
  }
191
197
 
198
+ if attributes.key?(:'account')
199
+ self.account = attributes[:'account']
200
+ end
201
+
192
202
  if attributes.key?(:'id')
193
203
  self.id = attributes[:'id']
194
204
  else
@@ -448,6 +458,7 @@ module Repull
448
458
  def ==(o)
449
459
  return true if self.equal?(o)
450
460
  self.class == o.class &&
461
+ account == o.account &&
451
462
  id == o.id &&
452
463
  listing_id == o.listing_id &&
453
464
  guest_id == o.guest_id &&
@@ -484,7 +495,7 @@ module Repull
484
495
  # Calculates hash code according to all attributes.
485
496
  # @return [Integer] Hash code
486
497
  def hash
487
- [id, listing_id, guest_id, check_in, check_out, check_in_time, check_out_time, status, status_detail, pending_reason, respond_by, source, platform, confirmation_code, unit, primary_guest, occupancy, financials, total_price, currency, guest_details, created_at, updated_at, booked_at, guest_name].hash
498
+ [account, id, listing_id, guest_id, check_in, check_out, check_in_time, check_out_time, status, status_detail, pending_reason, respond_by, source, platform, confirmation_code, unit, primary_guest, occupancy, financials, total_price, currency, guest_details, created_at, updated_at, booked_at, guest_name].hash
488
499
  end
489
500
 
490
501
  # Builds the object from hash