repull 0.2.14 → 0.2.16

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 (227) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +1387 -152
  3. data/lib/repull/api/availability_api.rb +2 -2
  4. data/lib/repull/api/billing_api.rb +4 -4
  5. data/lib/repull/api/booking_com_api.rb +36 -27
  6. data/lib/repull/api/connect_api.rb +4 -4
  7. data/lib/repull/api/conversations_api.rb +398 -4
  8. data/lib/repull/api/guests_api.rb +2 -2
  9. data/lib/repull/api/listings_api.rb +97 -13
  10. data/lib/repull/api/reservations_api.rb +157 -6
  11. data/lib/repull/api/webhooks_api.rb +10 -3
  12. data/lib/repull/models/accept_reservation_request200_response.rb +321 -0
  13. data/lib/repull/models/account_created_event.rb +95 -31
  14. data/lib/repull/models/account_disconnected_event.rb +95 -31
  15. data/lib/repull/models/ai_operation_completed_event.rb +95 -31
  16. data/lib/repull/models/ai_operation_failed_event.rb +95 -31
  17. data/lib/repull/models/airbnb_account_freshness.rb +239 -0
  18. data/lib/repull/models/airbnb_alteration.rb +46 -2
  19. data/lib/repull/models/airbnb_alteration_create_request.rb +264 -0
  20. data/lib/repull/models/airbnb_connection.rb +69 -2
  21. data/lib/repull/models/airbnb_connection_host.rb +1 -1
  22. data/lib/repull/models/airbnb_content_write_response.rb +275 -0
  23. data/lib/repull/models/airbnb_data_freshness.rb +22 -10
  24. data/lib/repull/models/airbnb_description_write_request.rb +192 -0
  25. data/lib/repull/models/airbnb_description_write_request_description.rb +365 -0
  26. data/lib/repull/models/airbnb_listing.rb +12 -1
  27. data/lib/repull/models/airbnb_listing_action200_response.rb +105 -0
  28. data/lib/repull/models/airbnb_listing_action200_response_one_of.rb +157 -0
  29. data/lib/repull/models/airbnb_listing_action200_response_one_of1.rb +175 -0
  30. data/lib/repull/models/airbnb_listing_action_request.rb +2 -2
  31. data/lib/repull/models/airbnb_listing_details_response.rb +284 -0
  32. data/lib/repull/models/airbnb_listing_details_write_request.rb +209 -0
  33. data/lib/repull/models/airbnb_listing_details_write_request_check_in_option.rb +214 -0
  34. data/lib/repull/models/airbnb_listing_details_write_request_quiet_hours_inner.rb +190 -0
  35. data/lib/repull/models/airbnb_listing_lifecycle_response.rb +196 -0
  36. data/lib/repull/models/airbnb_permits_response.rb +163 -0
  37. data/lib/repull/models/airbnb_permits_response_cached_inner.rb +200 -0
  38. data/lib/repull/models/airbnb_permits_write_request.rb +176 -0
  39. data/lib/repull/models/airbnb_permits_write_request_permits_inner.rb +228 -0
  40. data/lib/repull/models/airbnb_permits_write_request_permits_inner_answers_inner.rb +198 -0
  41. data/lib/repull/models/airbnb_photo_position.rb +159 -0
  42. data/lib/repull/models/airbnb_publish_result.rb +263 -0
  43. data/lib/repull/models/airbnb_reservation.rb +23 -1
  44. data/lib/repull/models/{create_airbnb_alteration_request.rb → airbnb_reservation_action200_response.rb} +12 -50
  45. data/lib/repull/models/airbnb_reservation_action_request.rb +248 -0
  46. data/lib/repull/models/airbnb_reservation_list_response.rb +13 -4
  47. data/lib/repull/models/airbnb_review.rb +23 -1
  48. data/lib/repull/models/airbnb_review_list_response.rb +13 -4
  49. data/lib/repull/models/airbnb_safety_disclosure.rb +202 -0
  50. data/lib/repull/models/airbnb_safety_disclosures_response.rb +162 -0
  51. data/lib/repull/models/airbnb_safety_disclosures_write_request.rb +176 -0
  52. data/lib/repull/models/airbnb_thread.rb +23 -1
  53. data/lib/repull/models/airbnb_thread_list_response.rb +13 -4
  54. data/lib/repull/models/airbnb_transaction.rb +23 -1
  55. data/lib/repull/models/booking_availability_update.rb +4 -20
  56. data/lib/repull/models/booking_availability_update_date_range.rb +193 -0
  57. data/lib/repull/models/booking_availability_update_request.rb +14 -3
  58. data/lib/repull/models/booking_pricing_rate_update.rb +32 -4
  59. data/lib/repull/models/booking_pricing_rate_update_date_range.rb +3 -0
  60. data/lib/repull/models/booking_pricing_rate_update_restrictions.rb +10 -10
  61. data/lib/repull/models/booking_pricing_response.rb +16 -4
  62. data/lib/repull/models/booking_pricing_update_response.rb +82 -18
  63. data/lib/repull/models/booking_property.rb +107 -36
  64. data/lib/repull/models/booking_property_listings_inner.rb +244 -0
  65. data/lib/repull/models/booking_rate_write_occupancy.rb +187 -0
  66. data/lib/repull/models/booking_rate_write_price_half.rb +188 -0
  67. data/lib/repull/models/booking_rate_write_restriction_half.rb +212 -0
  68. data/lib/repull/models/booking_rate_write_verification.rb +200 -0
  69. data/lib/repull/models/booking_rate_write_verification_row.rb +196 -0
  70. data/lib/repull/models/booking_restriction_request_row.rb +199 -0
  71. data/lib/repull/models/booking_restriction_verification.rb +208 -0
  72. data/lib/repull/models/booking_restriction_verification_row.rb +203 -0
  73. data/lib/repull/models/booking_restriction_verification_row_booking_value.rb +105 -0
  74. data/lib/repull/models/booking_restriction_verification_row_expected.rb +105 -0
  75. data/lib/repull/models/booking_rooms_rates_response.rb +41 -7
  76. data/lib/repull/models/booking_rooms_rates_response_rooms_inner.rb +12 -1
  77. data/lib/repull/models/booking_rooms_rates_response_rooms_inner_rates_inner.rb +1 -0
  78. data/lib/repull/models/booking_upstream_failure.rb +204 -0
  79. data/lib/repull/models/calendar_updated_event.rb +95 -31
  80. data/lib/repull/models/conversation_message_attachment.rb +28 -1
  81. data/lib/repull/models/create_airbnb_listing_room_request.rb +315 -0
  82. data/lib/repull/models/create_airbnb_offer_request.rb +93 -8
  83. data/lib/repull/models/create_airbnb_offer_request_guest_details.rb +279 -0
  84. data/lib/repull/models/create_conversation_special_offer201_response.rb +293 -0
  85. data/lib/repull/models/create_conversation_special_offer201_response_guests.rb +189 -0
  86. data/lib/repull/models/create_conversation_special_offer_request.rb +263 -0
  87. data/lib/repull/models/create_conversation_special_offer_request_guests.rb +263 -0
  88. data/lib/repull/models/decline_reservation_request_request.rb +234 -0
  89. data/lib/repull/models/delete_airbnb_listing_photo200_response.rb +14 -4
  90. data/lib/repull/models/delete_airbnb_listing_room200_response.rb +157 -0
  91. data/lib/repull/models/error_error.rb +31 -1
  92. data/lib/repull/models/get_airbnb_booking_settings200_response.rb +190 -0
  93. data/lib/repull/models/get_airbnb_booking_settings200_response_data.rb +246 -0
  94. data/lib/repull/models/get_airbnb_booking_settings200_response_data_advance_notice.rb +172 -0
  95. data/lib/repull/models/get_airbnb_booking_settings200_response_data_booking_window.rb +160 -0
  96. data/lib/repull/models/get_airbnb_booking_settings200_response_data_cancellation.rb +203 -0
  97. data/lib/repull/models/get_airbnb_booking_settings200_response_data_cancellation_non_refundable.rb +218 -0
  98. data/lib/repull/models/get_airbnb_booking_settings200_response_data_check_in.rb +159 -0
  99. data/lib/repull/models/get_airbnb_booking_settings200_response_data_check_in_start.rb +104 -0
  100. data/lib/repull/models/get_airbnb_booking_settings200_response_data_check_out.rb +172 -0
  101. data/lib/repull/models/get_airbnb_booking_settings200_response_data_instant_book.rb +206 -0
  102. data/lib/repull/models/get_airbnb_booking_settings200_response_data_preparation_time.rb +173 -0
  103. data/lib/repull/models/get_airbnb_listing_details200_response.rb +192 -0
  104. data/lib/repull/models/get_airbnb_offer200_response.rb +289 -0
  105. data/lib/repull/models/get_usage_summary200_response.rb +10 -1
  106. data/lib/repull/models/get_usage_summary200_response_limits.rb +11 -1
  107. data/lib/repull/models/get_usage_summary200_response_remaining.rb +11 -1
  108. data/lib/repull/models/get_usage_summary200_response_used.rb +10 -1
  109. data/lib/repull/models/get_usage_tier200_response.rb +10 -1
  110. data/lib/repull/models/get_usage_tier200_response_limits.rb +11 -1
  111. data/lib/repull/models/get_usage_tier200_response_remaining.rb +11 -1
  112. data/lib/repull/models/get_usage_tier200_response_used.rb +10 -1
  113. data/lib/repull/models/inquiry_created_event.rb +281 -0
  114. data/lib/repull/models/inquiry_created_payload.rb +185 -0
  115. data/lib/repull/models/inquiry_updated_event.rb +281 -0
  116. data/lib/repull/models/inquiry_updated_payload.rb +213 -0
  117. data/lib/repull/models/inquiry_webhook_object.rb +323 -0
  118. data/lib/repull/models/inquiry_webhook_object_expected_payout.rb +158 -0
  119. data/lib/repull/models/inquiry_webhook_object_guests.rb +188 -0
  120. data/lib/repull/models/list_airbnb_listing_permits200_response.rb +190 -0
  121. data/lib/repull/models/list_airbnb_listing_safety_disclosures200_response.rb +190 -0
  122. data/lib/repull/models/list_airbnb_thread_messages200_response.rb +170 -0
  123. data/lib/repull/models/list_airbnb_thread_messages200_response_data_inner.rb +274 -0
  124. data/lib/repull/models/list_airbnb_thread_messages200_response_pagination.rb +158 -0
  125. data/lib/repull/models/list_inquiries200_response.rb +192 -0
  126. data/lib/repull/models/list_inquiries200_response_data_inner.rb +418 -0
  127. data/lib/repull/models/list_inquiries200_response_data_inner_expected_payout.rb +159 -0
  128. data/lib/repull/models/list_inquiries200_response_data_inner_guests.rb +188 -0
  129. data/lib/repull/models/listing.rb +2 -1
  130. data/lib/repull/models/listing_content.rb +13 -2
  131. data/lib/repull/models/listing_content_update_request.rb +21 -2
  132. data/lib/repull/models/listing_content_update_request_details.rb +206 -0
  133. data/lib/repull/models/listing_content_update_request_policies.rb +95 -5
  134. data/lib/repull/models/listing_content_update_response.rb +1 -1
  135. data/lib/repull/models/listing_created_event.rb +95 -31
  136. data/lib/repull/models/listing_deleted_event.rb +95 -31
  137. data/lib/repull/models/listing_deleted_payload.rb +55 -21
  138. data/lib/repull/models/listing_publish_airbnb_response.rb +165 -0
  139. data/lib/repull/models/listing_pull_airbnb_request.rb +149 -0
  140. data/lib/repull/models/listing_pull_response.rb +231 -0
  141. data/lib/repull/models/listing_reactivated_event.rb +281 -0
  142. data/lib/repull/models/listing_suspended_event.rb +281 -0
  143. data/lib/repull/models/listing_suspension_payload.rb +202 -0
  144. data/lib/repull/models/listing_updated_event.rb +95 -31
  145. data/lib/repull/models/listing_updated_payload.rb +50 -22
  146. data/lib/repull/models/listing_webhook_object.rb +291 -0
  147. data/lib/repull/models/listing_webhook_object_address.rb +168 -0
  148. data/lib/repull/models/listing_webhook_object_channels_inner.rb +184 -0
  149. data/lib/repull/models/message.rb +1 -0
  150. data/lib/repull/models/payment_completed_event.rb +95 -31
  151. data/lib/repull/models/payment_completed_payload.rb +46 -44
  152. data/lib/repull/models/payment_refunded_event.rb +95 -31
  153. data/lib/repull/models/payment_refunded_payload.rb +46 -44
  154. data/lib/repull/models/payment_webhook_object.rb +351 -0
  155. data/lib/repull/models/preapprove_conversation201_response.rb +253 -0
  156. data/lib/repull/models/preapprove_conversation_request.rb +150 -0
  157. data/lib/repull/models/publish_section_error.rb +232 -0
  158. data/lib/repull/models/reorder_airbnb_listing_photos200_response.rb +191 -0
  159. data/lib/repull/models/reorder_airbnb_listing_photos200_response_data.rb +172 -0
  160. data/lib/repull/models/reorder_airbnb_listing_photos_request.rb +185 -0
  161. data/lib/repull/models/replay_webhook_delivery_request.rb +150 -0
  162. data/lib/repull/models/repull_ping_event.rb +95 -31
  163. data/lib/repull/models/reservation.rb +44 -2
  164. data/lib/repull/models/reservation_alteration_created_event.rb +95 -31
  165. data/lib/repull/models/reservation_alteration_responded_event.rb +95 -31
  166. data/lib/repull/models/reservation_cancelled_event.rb +95 -31
  167. data/lib/repull/models/reservation_created_event.rb +95 -32
  168. data/lib/repull/models/reservation_message_received_event.rb +95 -31
  169. data/lib/repull/models/reservation_message_received_payload.rb +17 -4
  170. data/lib/repull/models/reservation_request_created_event.rb +281 -0
  171. data/lib/repull/models/reservation_request_created_payload.rb +224 -0
  172. data/lib/repull/models/reservation_request_updated_event.rb +281 -0
  173. data/lib/repull/models/reservation_request_updated_payload.rb +251 -0
  174. data/lib/repull/models/reservation_updated_event.rb +95 -31
  175. data/lib/repull/models/reservation_webhook_object.rb +38 -5
  176. data/lib/repull/models/review_created_event.rb +95 -31
  177. data/lib/repull/models/review_responded_event.rb +95 -31
  178. data/lib/repull/models/send_airbnb_message201_response.rb +104 -0
  179. data/lib/repull/models/send_airbnb_message_request.rb +4 -20
  180. data/lib/repull/models/send_message_attachment.rb +225 -0
  181. data/lib/repull/models/send_message_part.rb +201 -0
  182. data/lib/repull/models/send_message_request.rb +44 -19
  183. data/lib/repull/models/send_message_response.rb +29 -5
  184. data/lib/repull/models/sent_attachment.rb +196 -0
  185. data/lib/repull/models/set_airbnb_listing_cover_photo200_response.rb +191 -0
  186. data/lib/repull/models/set_airbnb_listing_cover_photo200_response_data.rb +171 -0
  187. data/lib/repull/models/set_airbnb_listing_cover_photo_request.rb +165 -0
  188. data/lib/repull/models/update_airbnb_booking_settings200_response.rb +164 -0
  189. data/lib/repull/models/update_airbnb_booking_settings200_response_data.rb +205 -0
  190. data/lib/repull/models/update_airbnb_booking_settings_request.rb +202 -0
  191. data/lib/repull/models/update_airbnb_booking_settings_request_advance_notice.rb +183 -0
  192. data/lib/repull/models/update_airbnb_booking_settings_request_booking_window.rb +183 -0
  193. data/lib/repull/models/update_airbnb_booking_settings_request_cancellation.rb +201 -0
  194. data/lib/repull/models/update_airbnb_booking_settings_request_cancellation_non_refundable.rb +183 -0
  195. data/lib/repull/models/update_airbnb_booking_settings_request_check_in.rb +159 -0
  196. data/lib/repull/models/update_airbnb_booking_settings_request_check_out.rb +182 -0
  197. data/lib/repull/models/update_airbnb_booking_settings_request_instant_book.rb +203 -0
  198. data/lib/repull/models/update_airbnb_booking_settings_request_preparation_time.rb +182 -0
  199. data/lib/repull/models/update_airbnb_listing_amenities200_response.rb +191 -0
  200. data/lib/repull/models/update_airbnb_listing_amenities200_response_data.rb +158 -0
  201. data/lib/repull/models/update_airbnb_listing_amenities_request.rb +199 -0
  202. data/lib/repull/models/update_airbnb_listing_amenities_request_accessibility_amenities_inner.rb +246 -0
  203. data/lib/repull/models/update_airbnb_listing_amenities_request_amenities_inner.rb +218 -0
  204. data/lib/repull/models/update_airbnb_listing_permits200_response.rb +168 -0
  205. data/lib/repull/models/update_airbnb_listing_photo200_response.rb +194 -0
  206. data/lib/repull/models/update_airbnb_listing_photo_request.rb +242 -0
  207. data/lib/repull/models/update_airbnb_listing_room200_response.rb +194 -0
  208. data/lib/repull/models/update_airbnb_listing_room_request.rb +293 -0
  209. data/lib/repull/models/update_airbnb_listing_room_request_beds_inner.rb +209 -0
  210. data/lib/repull/models/update_airbnb_listing_room_request_room_amenities_inner.rb +182 -0
  211. data/lib/repull/models/update_airbnb_listing_room_request_room_amenities_inner_value.rb +105 -0
  212. data/lib/repull/models/update_airbnb_listing_safety_disclosures200_response.rb +180 -0
  213. data/lib/repull/models/upload_airbnb_listing_photos_request.rb +184 -0
  214. data/lib/repull/models/upload_airbnb_listing_photos_request_photos_inner.rb +305 -0
  215. data/lib/repull/models/upload_airbnb_listing_photos_request_photos_inner_listing_id.rb +105 -0
  216. data/lib/repull/models/usage_quota_warning_event.rb +281 -0
  217. data/lib/repull/models/usage_quota_warning_payload.rb +224 -0
  218. data/lib/repull/models/usage_quota_warning_payload_top_operation.rb +167 -0
  219. data/lib/repull/models/webhook_event.rb +17 -3
  220. data/lib/repull/models/webhook_event_account.rb +171 -0
  221. data/lib/repull/models/webhook_event_type.rb +8 -1
  222. data/lib/repull/models/withdraw_conversation_special_offer200_response.rb +240 -0
  223. data/lib/repull/version.rb +1 -1
  224. data/lib/repull.rb +138 -1
  225. data/openapi/v1.json +19578 -10662
  226. data/scripts/regen.sh +1 -1
  227. metadata +140 -3
@@ -0,0 +1,150 @@
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 PreapproveConversationRequest < ApiModelBase
18
+ # When `true`, the guest cannot Instant Book the listing and must book through this pre-approval. Leave `false` unless you need that.
19
+ attr_accessor :block_instant_booking
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'block_instant_booking' => :'blockInstantBooking'
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
+ :'block_instant_booking' => :'Boolean'
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::PreapproveConversationRequest` 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::PreapproveConversationRequest`. 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?(:'block_instant_booking')
68
+ self.block_instant_booking = attributes[:'block_instant_booking']
69
+ else
70
+ self.block_instant_booking = false
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ warn '[DEPRECATED] the `valid?` method is obsolete'
86
+ true
87
+ end
88
+
89
+ # Checks equality by comparing each attribute.
90
+ # @param [Object] Object to be compared
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ block_instant_booking == o.block_instant_booking
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [block_instant_booking].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ return nil unless attributes.is_a?(Hash)
114
+ attributes = attributes.transform_keys(&:to_sym)
115
+ transformed_hash = {}
116
+ openapi_types.each_pair do |key, type|
117
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = nil
119
+ elsif type =~ /\AArray<(.*)>/i
120
+ # check to ensure the input is an array given that the attribute
121
+ # is documented as an array but the input is not
122
+ if attributes[attribute_map[key]].is_a?(Array)
123
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
124
+ end
125
+ elsif !attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
127
+ end
128
+ end
129
+ new(transformed_hash)
130
+ end
131
+
132
+ # Returns the object in the form of hash
133
+ # @return [Hash] Returns the object in the form of hash
134
+ def to_hash
135
+ hash = {}
136
+ self.class.attribute_map.each_pair do |attr, param|
137
+ value = self.send(attr)
138
+ if value.nil?
139
+ is_nullable = self.class.openapi_nullable.include?(attr)
140
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
141
+ end
142
+
143
+ hash[param] = _to_hash(value)
144
+ end
145
+ hash
146
+ end
147
+
148
+ end
149
+
150
+ end
@@ -0,0 +1,232 @@
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
+ # One section of a publish that did not reach Airbnb.
18
+ class PublishSectionError < ApiModelBase
19
+ # Which part of the listing this failure is about.
20
+ attr_accessor :section
21
+
22
+ # Airbnb's own reason, verbatim, or ours when we refused to send an empty section.
23
+ attr_accessor :message
24
+
25
+ # `locked` — Airbnb refuses to change these fields on this listing; retrying cannot succeed and `lockedFields` names them. `no_content` — there was nothing canonical to send; write the content, then publish again. `rejected` — Airbnb refused the section as sent; fix the content and publish again.
26
+ attr_accessor :code
27
+
28
+ # For `code: locked` — the fields Airbnb dropped.
29
+ attr_accessor :locked_fields
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'section' => :'section',
35
+ :'message' => :'message',
36
+ :'code' => :'code',
37
+ :'locked_fields' => :'lockedFields'
38
+ }
39
+ end
40
+
41
+ # Returns attribute mapping this model knows about
42
+ def self.acceptable_attribute_map
43
+ attribute_map
44
+ end
45
+
46
+ # Returns all the JSON keys this model knows about
47
+ def self.acceptable_attributes
48
+ acceptable_attribute_map.values
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'section' => :'String',
55
+ :'message' => :'String',
56
+ :'code' => :'String',
57
+ :'locked_fields' => :'Array<String>'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ ])
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::PublishSectionError` initialize method"
72
+ end
73
+
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ acceptable_attribute_map = self.class.acceptable_attribute_map
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!acceptable_attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::PublishSectionError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'section')
84
+ self.section = attributes[:'section']
85
+ else
86
+ self.section = nil
87
+ end
88
+
89
+ if attributes.key?(:'message')
90
+ self.message = attributes[:'message']
91
+ else
92
+ self.message = nil
93
+ end
94
+
95
+ if attributes.key?(:'code')
96
+ self.code = attributes[:'code']
97
+ else
98
+ self.code = nil
99
+ end
100
+
101
+ if attributes.key?(:'locked_fields')
102
+ if (value = attributes[:'locked_fields']).is_a?(Array)
103
+ self.locked_fields = value
104
+ end
105
+ end
106
+ end
107
+
108
+ # Show invalid properties with the reasons. Usually used together with valid?
109
+ # @return Array for valid properties with the reasons
110
+ def list_invalid_properties
111
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
112
+ invalid_properties = Array.new
113
+ if @section.nil?
114
+ invalid_properties.push('invalid value for "section", section cannot be nil.')
115
+ end
116
+
117
+ if @message.nil?
118
+ invalid_properties.push('invalid value for "message", message cannot be nil.')
119
+ end
120
+
121
+ if @code.nil?
122
+ invalid_properties.push('invalid value for "code", code cannot be nil.')
123
+ end
124
+
125
+ invalid_properties
126
+ end
127
+
128
+ # Check to see if the all the properties in the model are valid
129
+ # @return true if the model is valid
130
+ def valid?
131
+ warn '[DEPRECATED] the `valid?` method is obsolete'
132
+ return false if @section.nil?
133
+ return false if @message.nil?
134
+ return false if @code.nil?
135
+ true
136
+ end
137
+
138
+ # Custom attribute writer method with validation
139
+ # @param [Object] section Value to be assigned
140
+ def section=(section)
141
+ if section.nil?
142
+ fail ArgumentError, 'section cannot be nil'
143
+ end
144
+
145
+ @section = section
146
+ end
147
+
148
+ # Custom attribute writer method with validation
149
+ # @param [Object] message Value to be assigned
150
+ def message=(message)
151
+ if message.nil?
152
+ fail ArgumentError, 'message cannot be nil'
153
+ end
154
+
155
+ @message = message
156
+ end
157
+
158
+ # Custom attribute writer method with validation
159
+ # @param [Object] code Value to be assigned
160
+ def code=(code)
161
+ if code.nil?
162
+ fail ArgumentError, 'code cannot be nil'
163
+ end
164
+
165
+ @code = code
166
+ end
167
+
168
+ # Checks equality by comparing each attribute.
169
+ # @param [Object] Object to be compared
170
+ def ==(o)
171
+ return true if self.equal?(o)
172
+ self.class == o.class &&
173
+ section == o.section &&
174
+ message == o.message &&
175
+ code == o.code &&
176
+ locked_fields == o.locked_fields
177
+ end
178
+
179
+ # @see the `==` method
180
+ # @param [Object] Object to be compared
181
+ def eql?(o)
182
+ self == o
183
+ end
184
+
185
+ # Calculates hash code according to all attributes.
186
+ # @return [Integer] Hash code
187
+ def hash
188
+ [section, message, code, locked_fields].hash
189
+ end
190
+
191
+ # Builds the object from hash
192
+ # @param [Hash] attributes Model attributes in the form of hash
193
+ # @return [Object] Returns the model itself
194
+ def self.build_from_hash(attributes)
195
+ return nil unless attributes.is_a?(Hash)
196
+ attributes = attributes.transform_keys(&:to_sym)
197
+ transformed_hash = {}
198
+ openapi_types.each_pair do |key, type|
199
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
200
+ transformed_hash["#{key}"] = nil
201
+ elsif type =~ /\AArray<(.*)>/i
202
+ # check to ensure the input is an array given that the attribute
203
+ # is documented as an array but the input is not
204
+ if attributes[attribute_map[key]].is_a?(Array)
205
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
206
+ end
207
+ elsif !attributes[attribute_map[key]].nil?
208
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
209
+ end
210
+ end
211
+ new(transformed_hash)
212
+ end
213
+
214
+ # Returns the object in the form of hash
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_hash
217
+ hash = {}
218
+ self.class.attribute_map.each_pair do |attr, param|
219
+ value = self.send(attr)
220
+ if value.nil?
221
+ is_nullable = self.class.openapi_nullable.include?(attr)
222
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
223
+ end
224
+
225
+ hash[param] = _to_hash(value)
226
+ end
227
+ hash
228
+ end
229
+
230
+ end
231
+
232
+ end
@@ -0,0 +1,191 @@
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 ReorderAirbnbListingPhotos200Response < ApiModelBase
18
+ attr_accessor :data
19
+
20
+ # Whether our own copy was brought in line with what landed.
21
+ attr_accessor :stored
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'data' => :'data',
27
+ :'stored' => :'stored'
28
+ }
29
+ end
30
+
31
+ # Returns attribute mapping this model knows about
32
+ def self.acceptable_attribute_map
33
+ attribute_map
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ acceptable_attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'data' => :'ReorderAirbnbListingPhotos200ResponseData',
45
+ :'stored' => :'Boolean'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.openapi_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ReorderAirbnbListingPhotos200Response` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ acceptable_attribute_map = self.class.acceptable_attribute_map
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!acceptable_attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ReorderAirbnbListingPhotos200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'data')
72
+ self.data = attributes[:'data']
73
+ else
74
+ self.data = nil
75
+ end
76
+
77
+ if attributes.key?(:'stored')
78
+ self.stored = attributes[:'stored']
79
+ else
80
+ self.stored = nil
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
88
+ invalid_properties = Array.new
89
+ if @data.nil?
90
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
91
+ end
92
+
93
+ if @stored.nil?
94
+ invalid_properties.push('invalid value for "stored", stored cannot be nil.')
95
+ end
96
+
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
+ return false if @data.nil?
105
+ return false if @stored.nil?
106
+ true
107
+ end
108
+
109
+ # Custom attribute writer method with validation
110
+ # @param [Object] data Value to be assigned
111
+ def data=(data)
112
+ if data.nil?
113
+ fail ArgumentError, 'data cannot be nil'
114
+ end
115
+
116
+ @data = data
117
+ end
118
+
119
+ # Custom attribute writer method with validation
120
+ # @param [Object] stored Value to be assigned
121
+ def stored=(stored)
122
+ if stored.nil?
123
+ fail ArgumentError, 'stored cannot be nil'
124
+ end
125
+
126
+ @stored = stored
127
+ end
128
+
129
+ # Checks equality by comparing each attribute.
130
+ # @param [Object] Object to be compared
131
+ def ==(o)
132
+ return true if self.equal?(o)
133
+ self.class == o.class &&
134
+ data == o.data &&
135
+ stored == o.stored
136
+ end
137
+
138
+ # @see the `==` method
139
+ # @param [Object] Object to be compared
140
+ def eql?(o)
141
+ self == o
142
+ end
143
+
144
+ # Calculates hash code according to all attributes.
145
+ # @return [Integer] Hash code
146
+ def hash
147
+ [data, stored].hash
148
+ end
149
+
150
+ # Builds the object from hash
151
+ # @param [Hash] attributes Model attributes in the form of hash
152
+ # @return [Object] Returns the model itself
153
+ def self.build_from_hash(attributes)
154
+ return nil unless attributes.is_a?(Hash)
155
+ attributes = attributes.transform_keys(&:to_sym)
156
+ transformed_hash = {}
157
+ openapi_types.each_pair do |key, type|
158
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
159
+ transformed_hash["#{key}"] = nil
160
+ elsif type =~ /\AArray<(.*)>/i
161
+ # check to ensure the input is an array given that the attribute
162
+ # is documented as an array but the input is not
163
+ if attributes[attribute_map[key]].is_a?(Array)
164
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
165
+ end
166
+ elsif !attributes[attribute_map[key]].nil?
167
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
168
+ end
169
+ end
170
+ new(transformed_hash)
171
+ end
172
+
173
+ # Returns the object in the form of hash
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_hash
176
+ hash = {}
177
+ self.class.attribute_map.each_pair do |attr, param|
178
+ value = self.send(attr)
179
+ if value.nil?
180
+ is_nullable = self.class.openapi_nullable.include?(attr)
181
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
182
+ end
183
+
184
+ hash[param] = _to_hash(value)
185
+ end
186
+ hash
187
+ end
188
+
189
+ end
190
+
191
+ end