repull 0.2.16 → 0.2.18

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 (83) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +10 -10
  3. data/lib/repull/api/booking_com_api.rb +86 -2
  4. data/lib/repull/api/conversations_api.rb +8 -8
  5. data/lib/repull/api/health_api.rb +0 -57
  6. data/lib/repull/api/listings_api.rb +182 -12
  7. data/lib/repull/api/migrate_api.rb +552 -0
  8. data/lib/repull/api/reservations_api.rb +6 -6
  9. data/lib/repull/models/airbnb_permits_response.rb +1 -1
  10. data/lib/repull/models/airbnb_permits_write_request.rb +1 -1
  11. data/lib/repull/models/airbnb_permits_write_request_permits_inner.rb +43 -4
  12. data/lib/repull/models/{airbnb_permits_write_request_permits_inner_answers_inner.rb → airbnb_permits_write_request_permits_inner_answers_value.rb} +22 -34
  13. data/lib/repull/models/airbnb_publish_result.rb +41 -2
  14. data/lib/repull/models/booking_property_action_request.rb +176 -0
  15. data/lib/repull/models/booking_property_action_response.rb +281 -0
  16. data/lib/repull/models/booking_publish_result.rb +245 -0
  17. data/lib/repull/models/booking_publish_section_error.rb +220 -0
  18. data/lib/repull/models/booking_setup_request.rb +44 -5
  19. data/lib/repull/models/booking_setup_request_legal_entity.rb +235 -0
  20. data/lib/repull/models/channel_market_state_item.rb +291 -0
  21. data/lib/repull/models/check_migration_cutover200_response.rb +147 -0
  22. data/lib/repull/models/check_migration_cutover_request.rb +175 -0
  23. data/lib/repull/models/check_migration_cutover_request_reservations_inner.rb +216 -0
  24. data/lib/repull/models/connect_provider.rb +18 -5
  25. data/lib/repull/models/connect_session.rb +25 -5
  26. data/lib/repull/models/create_connect_session_request.rb +81 -5
  27. data/lib/repull/models/create_connect_session_request_copy.rb +251 -0
  28. data/lib/repull/models/create_connect_session_request_workspace.rb +196 -0
  29. data/lib/repull/models/delete_migration200_response.rb +147 -0
  30. data/lib/repull/models/delete_migration200_response_data.rb +165 -0
  31. data/lib/repull/models/error_error.rb +11 -1
  32. data/lib/repull/models/get_migration200_response.rb +147 -0
  33. data/lib/repull/models/get_migration_channel_map200_response.rb +147 -0
  34. data/lib/repull/models/get_migration_report200_response.rb +147 -0
  35. data/lib/repull/models/inquiry_updated_payload.rb +1 -1
  36. data/lib/repull/models/list_inquiries200_response_data_inner.rb +1 -1
  37. data/lib/repull/models/list_migrations200_response.rb +158 -0
  38. data/lib/repull/models/listing_address_readiness.rb +171 -0
  39. data/lib/repull/models/listing_content_update_request.rb +10 -1
  40. data/lib/repull/models/listing_content_update_request_address.rb +40 -3
  41. data/lib/repull/models/listing_content_update_request_pricing.rb +235 -0
  42. data/lib/repull/models/listing_content_update_response.rb +1 -1
  43. data/lib/repull/models/listing_create_request.rb +71 -2
  44. data/lib/repull/models/listing_create_response.rb +14 -4
  45. data/lib/repull/models/listing_market_state_request.rb +149 -0
  46. data/lib/repull/models/listing_market_state_response.rb +221 -0
  47. data/lib/repull/models/listing_publish_booking_request.rb +149 -0
  48. data/lib/repull/models/{listing_publish_response.rb → listing_publish_booking_response.rb} +4 -5
  49. data/lib/repull/models/listing_publish_status_channel.rb +32 -1
  50. data/lib/repull/models/listing_publish_status_connection.rb +17 -5
  51. data/lib/repull/models/listing_publish_status_response.rb +13 -1
  52. data/lib/repull/models/migration.rb +303 -0
  53. data/lib/repull/models/migration_channel_map.rb +169 -0
  54. data/lib/repull/models/migration_channel_map_listings_inner.rb +208 -0
  55. data/lib/repull/models/migration_channel_map_listings_inner_airbnb.rb +156 -0
  56. data/lib/repull/models/migration_channel_map_listings_inner_booking.rb +156 -0
  57. data/lib/repull/models/migration_channel_map_sources_inner.rb +167 -0
  58. data/lib/repull/models/migration_completed_event.rb +309 -0
  59. data/lib/repull/models/migration_connections_inner.rb +195 -0
  60. data/lib/repull/models/migration_counts.rb +183 -0
  61. data/lib/repull/models/migration_cutover_check.rb +200 -0
  62. data/lib/repull/models/migration_cutover_check_mismatched_inner.rb +156 -0
  63. data/lib/repull/models/migration_failed_event.rb +309 -0
  64. data/lib/repull/models/migration_import_payload.rb +225 -0
  65. data/lib/repull/models/migration_import_payload_results_inner.rb +165 -0
  66. data/lib/repull/models/migration_import_run.rb +202 -0
  67. data/lib/repull/models/migration_import_run_results_inner.rb +165 -0
  68. data/lib/repull/models/migration_report.rb +179 -0
  69. data/lib/repull/models/migration_report_issues_inner.rb +229 -0
  70. data/lib/repull/models/migration_reservation_ref.rb +184 -0
  71. data/lib/repull/models/reservation.rb +12 -2
  72. data/lib/repull/models/reservation_request_updated_payload.rb +1 -1
  73. data/lib/repull/models/run_migration_import202_response.rb +147 -0
  74. data/lib/repull/models/run_migration_import202_response_data.rb +158 -0
  75. data/lib/repull/models/run_migration_import202_response_data_queued_inner.rb +174 -0
  76. data/lib/repull/models/run_migration_import_request.rb +182 -0
  77. data/lib/repull/models/webhook_event.rb +4 -0
  78. data/lib/repull/models/webhook_event_type.rb +3 -1
  79. data/lib/repull/version.rb +1 -1
  80. data/lib/repull.rb +48 -2
  81. data/openapi/v1.json +2398 -433
  82. data/scripts/regen.sh +1 -1
  83. metadata +50 -4
@@ -0,0 +1,147 @@
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
+ Contact: ivan@vanio.ai
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 GetMigrationReport200Response < ApiModelBase
18
+ attr_accessor :data
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'data' => :'data'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'data' => :'MigrationReport'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetMigrationReport200Response` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetMigrationReport200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'data')
67
+ self.data = attributes[:'data']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
75
+ invalid_properties = Array.new
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ data == o.data
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Integer] Hash code
102
+ def hash
103
+ [data].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def self.build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ transformed_hash = {}
113
+ openapi_types.each_pair do |key, type|
114
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
115
+ transformed_hash["#{key}"] = nil
116
+ elsif type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[attribute_map[key]].is_a?(Array)
120
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
121
+ end
122
+ elsif !attributes[attribute_map[key]].nil?
123
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
124
+ end
125
+ end
126
+ new(transformed_hash)
127
+ end
128
+
129
+ # Returns the object in the form of hash
130
+ # @return [Hash] Returns the object in the form of hash
131
+ def to_hash
132
+ hash = {}
133
+ self.class.attribute_map.each_pair do |attr, param|
134
+ value = self.send(attr)
135
+ if value.nil?
136
+ is_nullable = self.class.openapi_nullable.include?(attr)
137
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
138
+ end
139
+
140
+ hash[param] = _to_hash(value)
141
+ end
142
+ hash
143
+ end
144
+
145
+ end
146
+
147
+ end
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- # Payload for `inquiry.updated`. The inquiry's status, dates, guest count or the reservation it became changed. `previousAttributes` holds only what moved, with prior values. Fires whether the host acted through the API, the Vanio dashboard or the Airbnb app. An inquiry whose dates simply pass is `expired` in `GET /v1/inquiries` but fires no event unless the channel reports it.
17
+ # Payload for `inquiry.updated`. The inquiry's status, dates, guest count or the reservation it became changed. `previousAttributes` holds only what moved, with prior values. Fires whether the host acted through the API, a connected app or the Airbnb app. An inquiry whose dates simply pass is `expired` in `GET /v1/inquiries` but fires no event unless the channel reports it.
18
18
  class InquiryUpdatedPayload < ApiModelBase
19
19
  attr_accessor :object
20
20
 
@@ -25,7 +25,7 @@ module Repull
25
25
 
26
26
  attr_accessor :channel
27
27
 
28
- # `open` — nobody has answered and the stay is still ahead; `pre_approved`; `special_offer_sent` (from the API, Vanio, or Airbnb’s own app); `booked` — the guest booked (`reservationId`); `expired` — the stay has started or Airbnb expired it; `declined`; `not_possible` — Airbnb says the dates cannot be booked.
28
+ # `open` — nobody has answered and the stay is still ahead; `pre_approved`; `special_offer_sent` (from the API, a connected app, or Airbnb’s own app); `booked` — the guest booked (`reservationId`); `expired` — the stay has started or Airbnb expired it; `declined`; `not_possible` — Airbnb says the dates cannot be booked.
29
29
  attr_accessor :status
30
30
 
31
31
  attr_accessor :check_in
@@ -0,0 +1,158 @@
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
+ Contact: ivan@vanio.ai
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 ListMigrations200Response < ApiModelBase
18
+ attr_accessor :data
19
+
20
+ attr_accessor :pagination
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'data' => :'data',
26
+ :'pagination' => :'pagination'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'data' => :'Array<Migration>',
44
+ :'pagination' => :'GetUsageLogs200ResponsePagination'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ListMigrations200Response` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ListMigrations200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'data')
71
+ if (value = attributes[:'data']).is_a?(Array)
72
+ self.data = value
73
+ end
74
+ end
75
+
76
+ if attributes.key?(:'pagination')
77
+ self.pagination = attributes[:'pagination']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
+ invalid_properties = Array.new
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ data == o.data &&
102
+ pagination == o.pagination
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [data, pagination].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ transformed_hash = {}
124
+ openapi_types.each_pair do |key, type|
125
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = nil
127
+ elsif type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[attribute_map[key]].is_a?(Array)
131
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
132
+ end
133
+ elsif !attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
135
+ end
136
+ end
137
+ new(transformed_hash)
138
+ end
139
+
140
+ # Returns the object in the form of hash
141
+ # @return [Hash] Returns the object in the form of hash
142
+ def to_hash
143
+ hash = {}
144
+ self.class.attribute_map.each_pair do |attr, param|
145
+ value = self.send(attr)
146
+ if value.nil?
147
+ is_nullable = self.class.openapi_nullable.include?(attr)
148
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
149
+ end
150
+
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ end
157
+
158
+ end
@@ -0,0 +1,171 @@
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
+ Contact: ivan@vanio.ai
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 one channel would accept this listing's postal address, answered WITHOUT attempting a publish.
18
+ class ListingAddressReadiness < ApiModelBase
19
+ # True when the address satisfies this channel's create preflight. False means a publish would be refused for the address alone.
20
+ attr_accessor :ready
21
+
22
+ # The address parts still needed, named as the REQUEST fields you send — `street`, `city`, `state`, `postalCode` — so the value can be acted on directly. Empty when `ready` is true.
23
+ attr_accessor :missing
24
+
25
+ # The address as currently resolved, for debugging.
26
+ attr_accessor :have
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'ready' => :'ready',
32
+ :'missing' => :'missing',
33
+ :'have' => :'have'
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
+ :'ready' => :'Boolean',
51
+ :'missing' => :'Array<String>',
52
+ :'have' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ListingAddressReadiness` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ListingAddressReadiness`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'ready')
79
+ self.ready = attributes[:'ready']
80
+ end
81
+
82
+ if attributes.key?(:'missing')
83
+ if (value = attributes[:'missing']).is_a?(Array)
84
+ self.missing = value
85
+ end
86
+ end
87
+
88
+ if attributes.key?(:'have')
89
+ self.have = attributes[:'have']
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
+ invalid_properties = Array.new
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
+ true
106
+ end
107
+
108
+ # Checks equality by comparing each attribute.
109
+ # @param [Object] Object to be compared
110
+ def ==(o)
111
+ return true if self.equal?(o)
112
+ self.class == o.class &&
113
+ ready == o.ready &&
114
+ missing == o.missing &&
115
+ have == o.have
116
+ end
117
+
118
+ # @see the `==` method
119
+ # @param [Object] Object to be compared
120
+ def eql?(o)
121
+ self == o
122
+ end
123
+
124
+ # Calculates hash code according to all attributes.
125
+ # @return [Integer] Hash code
126
+ def hash
127
+ [ready, missing, have].hash
128
+ end
129
+
130
+ # Builds the object from hash
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ # @return [Object] Returns the model itself
133
+ def self.build_from_hash(attributes)
134
+ return nil unless attributes.is_a?(Hash)
135
+ attributes = attributes.transform_keys(&:to_sym)
136
+ transformed_hash = {}
137
+ openapi_types.each_pair do |key, type|
138
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
139
+ transformed_hash["#{key}"] = nil
140
+ elsif type =~ /\AArray<(.*)>/i
141
+ # check to ensure the input is an array given that the attribute
142
+ # is documented as an array but the input is not
143
+ if attributes[attribute_map[key]].is_a?(Array)
144
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
145
+ end
146
+ elsif !attributes[attribute_map[key]].nil?
147
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
148
+ end
149
+ end
150
+ new(transformed_hash)
151
+ end
152
+
153
+ # Returns the object in the form of hash
154
+ # @return [Hash] Returns the object in the form of hash
155
+ def to_hash
156
+ hash = {}
157
+ self.class.attribute_map.each_pair do |attr, param|
158
+ value = self.send(attr)
159
+ if value.nil?
160
+ is_nullable = self.class.openapi_nullable.include?(attr)
161
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
162
+ end
163
+
164
+ hash[param] = _to_hash(value)
165
+ end
166
+ hash
167
+ end
168
+
169
+ end
170
+
171
+ end
@@ -39,6 +39,8 @@ module Repull
39
39
 
40
40
  attr_accessor :occupancy
41
41
 
42
+ attr_accessor :pricing
43
+
42
44
  attr_accessor :policies
43
45
 
44
46
  # Photo set — full replacement by default (pass `photosMode: \"append\"` to add after existing photos, or `[]` to clear; omit to leave untouched). Each entry is a hosted image URL (string) or a structured ref. URL-ingest only: the URL is persisted and attached to the listing in order — the OTA push downloads it at publish time. Binary/multipart upload is a follow-up. A non-empty array with no valid http(s) URL is reported in `deferred` (existing photos left untouched).
@@ -59,6 +61,7 @@ module Repull
59
61
  :'address' => :'address',
60
62
  :'details' => :'details',
61
63
  :'occupancy' => :'occupancy',
64
+ :'pricing' => :'pricing',
62
65
  :'policies' => :'policies',
63
66
  :'photos' => :'photos',
64
67
  :'photos_mode' => :'photosMode'
@@ -87,6 +90,7 @@ module Repull
87
90
  :'address' => :'ListingContentUpdateRequestAddress',
88
91
  :'details' => :'ListingContentUpdateRequestDetails',
89
92
  :'occupancy' => :'ListingContentUpdateRequestOccupancy',
93
+ :'pricing' => :'ListingContentUpdateRequestPricing',
90
94
  :'policies' => :'ListingContentUpdateRequestPolicies',
91
95
  :'photos' => :'Array<ListingContentUpdateRequestPhotosInner>',
92
96
  :'photos_mode' => :'String'
@@ -155,6 +159,10 @@ module Repull
155
159
  self.occupancy = attributes[:'occupancy']
156
160
  end
157
161
 
162
+ if attributes.key?(:'pricing')
163
+ self.pricing = attributes[:'pricing']
164
+ end
165
+
158
166
  if attributes.key?(:'policies')
159
167
  self.policies = attributes[:'policies']
160
168
  end
@@ -201,6 +209,7 @@ module Repull
201
209
  address == o.address &&
202
210
  details == o.details &&
203
211
  occupancy == o.occupancy &&
212
+ pricing == o.pricing &&
204
213
  policies == o.policies &&
205
214
  photos == o.photos &&
206
215
  photos_mode == o.photos_mode
@@ -215,7 +224,7 @@ module Repull
215
224
  # Calculates hash code according to all attributes.
216
225
  # @return [Integer] Hash code
217
226
  def hash
218
- [locale, title, name, description, summary, amenities, address, details, occupancy, policies, photos, photos_mode].hash
227
+ [locale, title, name, description, summary, amenities, address, details, occupancy, pricing, policies, photos, photos_mode].hash
219
228
  end
220
229
 
221
230
  # Builds the object from hash
@@ -14,17 +14,30 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- # Partial address. Only provided sub-fields are written.
17
+ # Partial address. Only provided sub-fields are written; the ones you omit keep their current value, and an explicit `null` clears one. This is also the repair path for a listing that cannot be published: Airbnb requires `street` and `city` for every country and additionally `state` and `postalCode` for a **US** property — and a listing with no `countryCode` behaves as US. Send just the missing part, e.g. `{ \"address\": { \"state\": \"FL\" } }`. `GET /v1/listings/{id}/publish-status` names what is missing.
18
18
  class ListingContentUpdateRequestAddress < ApiModelBase
19
+ # Street address including the number. Required by Airbnb for every country.
19
20
  attr_accessor :street
20
21
 
22
+ # City / town. Required by Airbnb for every country.
21
23
  attr_accessor :city
22
24
 
23
- # ISO-3166 alpha-2 country code.
25
+ # State, province or region. **Required for a US property**, and a listing with no `countryCode` counts as US.
26
+ attr_accessor :state
27
+
28
+ # Postal code — ZIP in the US, postcode in the UK, and so on. **Required for a US property**, and a listing with no `countryCode` counts as US. Send the complete code; a partial postcode is rejected downstream. Alias: `zipcode`.
29
+ attr_accessor :postal_code
30
+
31
+ # Alias for `postalCode`, accepted because it is the field name on the Airbnb mirror. `postalCode` wins if you send both.
32
+ attr_accessor :zipcode
33
+
34
+ # ISO-3166 alpha-2 country code. **Send this for any non-US property.** Leaving it unset does not mean \"unknown\" — the publish path treats a listing with no country as US and then demands `state` and `postalCode`.
24
35
  attr_accessor :country_code
25
36
 
37
+ # Latitude. Never a substitute for the postal address — Airbnb rejects coordinates it cannot reconcile with a full address.
26
38
  attr_accessor :lat
27
39
 
40
+ # Longitude. See `lat`.
28
41
  attr_accessor :lng
29
42
 
30
43
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -32,6 +45,9 @@ module Repull
32
45
  {
33
46
  :'street' => :'street',
34
47
  :'city' => :'city',
48
+ :'state' => :'state',
49
+ :'postal_code' => :'postalCode',
50
+ :'zipcode' => :'zipcode',
35
51
  :'country_code' => :'countryCode',
36
52
  :'lat' => :'lat',
37
53
  :'lng' => :'lng'
@@ -53,6 +69,9 @@ module Repull
53
69
  {
54
70
  :'street' => :'String',
55
71
  :'city' => :'String',
72
+ :'state' => :'String',
73
+ :'postal_code' => :'String',
74
+ :'zipcode' => :'String',
56
75
  :'country_code' => :'String',
57
76
  :'lat' => :'Float',
58
77
  :'lng' => :'Float'
@@ -64,6 +83,9 @@ module Repull
64
83
  Set.new([
65
84
  :'street',
66
85
  :'city',
86
+ :'state',
87
+ :'postal_code',
88
+ :'zipcode',
67
89
  :'country_code',
68
90
  :'lat',
69
91
  :'lng'
@@ -94,6 +116,18 @@ module Repull
94
116
  self.city = attributes[:'city']
95
117
  end
96
118
 
119
+ if attributes.key?(:'state')
120
+ self.state = attributes[:'state']
121
+ end
122
+
123
+ if attributes.key?(:'postal_code')
124
+ self.postal_code = attributes[:'postal_code']
125
+ end
126
+
127
+ if attributes.key?(:'zipcode')
128
+ self.zipcode = attributes[:'zipcode']
129
+ end
130
+
97
131
  if attributes.key?(:'country_code')
98
132
  self.country_code = attributes[:'country_code']
99
133
  end
@@ -129,6 +163,9 @@ module Repull
129
163
  self.class == o.class &&
130
164
  street == o.street &&
131
165
  city == o.city &&
166
+ state == o.state &&
167
+ postal_code == o.postal_code &&
168
+ zipcode == o.zipcode &&
132
169
  country_code == o.country_code &&
133
170
  lat == o.lat &&
134
171
  lng == o.lng
@@ -143,7 +180,7 @@ module Repull
143
180
  # Calculates hash code according to all attributes.
144
181
  # @return [Integer] Hash code
145
182
  def hash
146
- [street, city, country_code, lat, lng].hash
183
+ [street, city, state, postal_code, zipcode, country_code, lat, lng].hash
147
184
  end
148
185
 
149
186
  # Builds the object from hash