repull 0.2.54 → 0.2.56

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 (192) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/listings_api.rb +4 -4
  3. data/lib/repull/api/reservations_api.rb +4 -4
  4. data/lib/repull/api/reviews_api.rb +6 -6
  5. data/lib/repull/api/vrbo_api.rb +2231 -682
  6. data/lib/repull/models/{update_vrbo_listing_rooms200_response.rb → add_vrbo_listing_photos200_response.rb} +60 -113
  7. data/lib/repull/models/{update_vrbo_listing_photos200_response_data.rb → add_vrbo_listing_photos200_response_data.rb} +4 -4
  8. data/lib/repull/models/add_vrbo_listing_photos_request.rb +184 -0
  9. data/lib/repull/models/{update_vrbo_listing_photos_request_add_inner.rb → add_vrbo_listing_photos_request_photos_inner.rb} +36 -13
  10. data/lib/repull/models/add_vrbo_listing_room_request.rb +309 -0
  11. data/lib/repull/models/add_vrbo_listing_video200_response.rb +57 -110
  12. data/lib/repull/models/add_vrbo_listing_video200_response_data.rb +1 -1
  13. data/lib/repull/models/{update_vrbo_listing_translations_request.rb → create_vrbo_alteration200_response.rb} +17 -20
  14. data/lib/repull/models/create_vrbo_alteration200_response_data.rb +202 -0
  15. data/lib/repull/models/create_vrbo_alteration200_response_data_before.rb +201 -0
  16. data/lib/repull/models/create_vrbo_alteration200_response_data_due_date.rb +168 -0
  17. data/lib/repull/models/create_vrbo_alteration200_response_data_payment.rb +168 -0
  18. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_translations.rb → create_vrbo_alteration200_response_data_payment_lines_inner.rb} +17 -20
  19. data/lib/repull/models/create_vrbo_alteration200_response_data_payment_total.rb +159 -0
  20. data/lib/repull/models/create_vrbo_alteration201_response.rb +157 -0
  21. data/lib/repull/models/create_vrbo_alteration201_response_data.rb +193 -0
  22. data/lib/repull/models/{update_vrbo_listing_registration200_response.rb → create_vrbo_alteration_request.rb} +127 -120
  23. data/lib/repull/models/get_vrbo_connection200_response.rb +147 -0
  24. data/lib/repull/models/get_vrbo_connection200_response_data.rb +210 -0
  25. data/lib/repull/models/get_vrbo_connection200_response_data_accounts_inner.rb +292 -0
  26. data/lib/repull/models/get_vrbo_connection200_response_data_accounts_inner_sync.rb +156 -0
  27. data/lib/repull/models/get_vrbo_listing200_response.rb +175 -0
  28. data/lib/repull/models/get_vrbo_listing200_response_data_freshness.rb +187 -0
  29. data/lib/repull/models/get_vrbo_listing200_response_data_freshness_accounts_inner.rb +194 -0
  30. data/lib/repull/models/get_vrbo_listing200_response_data_inner.rb +548 -0
  31. data/lib/repull/models/get_vrbo_listing200_response_data_inner_address.rb +208 -0
  32. data/lib/repull/models/get_vrbo_listing200_response_data_inner_capacity.rb +177 -0
  33. data/lib/repull/models/get_vrbo_listing200_response_data_inner_capacity_pets.rb +158 -0
  34. data/lib/repull/models/get_vrbo_listing200_response_data_inner_content.rb +162 -0
  35. data/lib/repull/models/get_vrbo_listing200_response_data_inner_rating.rb +158 -0
  36. data/lib/repull/models/get_vrbo_listing_additional_info200_response.rb +46 -98
  37. data/lib/repull/models/get_vrbo_listing_additional_info200_response_data.rb +1 -1
  38. data/lib/repull/models/get_vrbo_listing_additional_info200_response_data_freshness.rb +308 -0
  39. data/lib/repull/models/{get_vrbo_listing_content200_response_listing.rb → get_vrbo_listing_additional_info200_response_data_freshness_accounts_inner.rb} +42 -46
  40. data/lib/repull/models/get_vrbo_listing_amenities200_response.rb +46 -98
  41. data/lib/repull/models/get_vrbo_listing_amenities200_response_data.rb +1 -1
  42. data/lib/repull/models/get_vrbo_listing_availability200_response.rb +186 -0
  43. data/lib/repull/models/get_vrbo_listing_availability200_response_data.rb +104 -0
  44. data/lib/repull/models/get_vrbo_listing_availability200_response_data_one_of.rb +208 -0
  45. data/lib/repull/models/get_vrbo_listing_availability200_response_data_one_of_inner.rb +260 -0
  46. data/lib/repull/models/get_vrbo_listing_availability200_response_range.rb +156 -0
  47. data/lib/repull/models/get_vrbo_listing_booking_settings200_response.rb +46 -98
  48. data/lib/repull/models/get_vrbo_listing_booking_settings200_response_data.rb +1 -1
  49. data/lib/repull/models/get_vrbo_listing_cancellation200_response.rb +46 -98
  50. data/lib/repull/models/get_vrbo_listing_cancellation200_response_data.rb +1 -1
  51. data/lib/repull/models/{get_vrbo_listing_welcome_guide200_response.rb → get_vrbo_listing_checkin_guide200_response.rb} +49 -101
  52. data/lib/repull/models/{get_vrbo_listing_welcome_guide200_response_data.rb → get_vrbo_listing_checkin_guide200_response_data.rb} +12 -12
  53. data/lib/repull/models/{update_vrbo_listing_rooms_request_update_inner.rb → get_vrbo_listing_checkout_guide200_response.rb} +52 -61
  54. data/lib/repull/models/get_vrbo_listing_checkout_guide200_response_data.rb +170 -0
  55. data/lib/repull/models/get_vrbo_listing_content200_response.rb +45 -81
  56. data/lib/repull/models/get_vrbo_listing_content200_response_sections.rb +28 -44
  57. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_welcome_guide.rb → get_vrbo_listing_content200_response_sections_checkin_guide.rb} +11 -11
  58. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_welcome_guide_access.rb → get_vrbo_listing_content200_response_sections_checkin_guide_access.rb} +3 -3
  59. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_welcome_guide_check_in.rb → get_vrbo_listing_content200_response_sections_checkin_guide_check_in.rb} +3 -3
  60. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_welcome_guide_contacts_inner.rb → get_vrbo_listing_content200_response_sections_checkin_guide_contacts_inner.rb} +3 -3
  61. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_welcome_guide_wifi.rb → get_vrbo_listing_content200_response_sections_checkin_guide_wifi.rb} +3 -3
  62. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_description.rb → get_vrbo_listing_content200_response_sections_descriptions_inner.rb} +26 -5
  63. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_description_limits.rb → get_vrbo_listing_content200_response_sections_descriptions_inner_limits.rb} +6 -5
  64. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_description_limits_headline.rb → get_vrbo_listing_content200_response_sections_descriptions_inner_limits_headline.rb} +3 -3
  65. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_property.rb → get_vrbo_listing_content200_response_sections_details.rb} +4 -4
  66. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_property_interior_size.rb → get_vrbo_listing_content200_response_sections_details_interior_size.rb} +3 -3
  67. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_registration.rb → get_vrbo_listing_content200_response_sections_permits.rb} +4 -4
  68. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_registration_fields_inner.rb → get_vrbo_listing_content200_response_sections_permits_fields_inner.rb} +3 -3
  69. data/lib/repull/models/{get_vrbo_listing_translations200_response.rb → get_vrbo_listing_descriptions200_response.rb} +61 -98
  70. data/lib/repull/models/{get_vrbo_listing_property200_response.rb → get_vrbo_listing_details200_response.rb} +49 -101
  71. data/lib/repull/models/{get_vrbo_listing_property200_response_data.rb → get_vrbo_listing_details200_response_data.rb} +5 -5
  72. data/lib/repull/models/get_vrbo_listing_fees200_response.rb +46 -98
  73. data/lib/repull/models/get_vrbo_listing_fees200_response_data.rb +1 -1
  74. data/lib/repull/models/get_vrbo_listing_house_rules200_response.rb +46 -98
  75. data/lib/repull/models/get_vrbo_listing_house_rules200_response_data.rb +1 -1
  76. data/lib/repull/models/get_vrbo_listing_location200_response.rb +46 -98
  77. data/lib/repull/models/get_vrbo_listing_location200_response_data.rb +1 -1
  78. data/lib/repull/models/get_vrbo_listing_payment_terms200_response.rb +46 -98
  79. data/lib/repull/models/get_vrbo_listing_payment_terms200_response_data.rb +1 -1
  80. data/lib/repull/models/{get_vrbo_listing_description200_response.rb → get_vrbo_listing_permits200_response.rb} +49 -101
  81. data/lib/repull/models/{get_vrbo_listing_registration200_response_data.rb → get_vrbo_listing_permits200_response_data.rb} +5 -5
  82. data/lib/repull/models/get_vrbo_listing_photos200_response.rb +46 -98
  83. data/lib/repull/models/get_vrbo_listing_photos200_response_data.rb +1 -1
  84. data/lib/repull/models/get_vrbo_listing_pricing200_response.rb +46 -98
  85. data/lib/repull/models/get_vrbo_listing_pricing200_response_data.rb +1 -1
  86. data/lib/repull/models/get_vrbo_listing_protection200_response.rb +46 -98
  87. data/lib/repull/models/get_vrbo_listing_protection200_response_data.rb +1 -1
  88. data/lib/repull/models/get_vrbo_listing_rates200_response.rb +46 -98
  89. data/lib/repull/models/get_vrbo_listing_rates200_response_data.rb +2 -2
  90. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_rates_days_inner.rb → get_vrbo_listing_rates200_response_data_days_inner.rb} +3 -3
  91. data/lib/repull/models/get_vrbo_listing_rooms200_response.rb +46 -98
  92. data/lib/repull/models/get_vrbo_listing_rooms200_response_data.rb +1 -1
  93. data/lib/repull/models/{get_vrbo_listing_registration200_response.rb → get_vrbo_listing_safety_disclosures200_response.rb} +49 -101
  94. data/lib/repull/models/get_vrbo_listing_safety_disclosures200_response_data.rb +151 -0
  95. data/lib/repull/models/get_vrbo_listing_story200_response.rb +46 -98
  96. data/lib/repull/models/get_vrbo_listing_story200_response_data.rb +1 -1
  97. data/lib/repull/models/get_vrbo_listing_taxes200_response.rb +46 -98
  98. data/lib/repull/models/get_vrbo_listing_taxes200_response_data.rb +1 -1
  99. data/lib/repull/models/get_vrbo_listing_videos200_response.rb +46 -98
  100. data/lib/repull/models/get_vrbo_listing_videos200_response_data.rb +1 -1
  101. data/lib/repull/models/get_vrbo_publish_job200_response_job.rb +1 -1
  102. data/lib/repull/models/get_vrbo_reservation200_response.rb +175 -0
  103. data/lib/repull/models/get_vrbo_reservation200_response_data.rb +310 -0
  104. data/lib/repull/models/get_vrbo_reservation200_response_data_available_actions_inner.rb +156 -0
  105. data/lib/repull/models/get_vrbo_reservation200_response_data_freshness.rb +219 -0
  106. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_translations_items_inner.rb → get_vrbo_reservation200_response_data_freshness_accounts_inner.rb} +31 -24
  107. data/lib/repull/models/{update_vrbo_listing_rooms_request.rb → list_vrbo_transactions200_response.rb} +23 -27
  108. data/lib/repull/models/list_vrbo_transactions200_response_data_freshness.rb +220 -0
  109. data/lib/repull/models/list_vrbo_transactions200_response_data_inner.rb +362 -0
  110. data/lib/repull/models/list_vrbo_transactions200_response_data_inner_payout.rb +189 -0
  111. data/lib/repull/models/map_vrbo_listing200_response.rb +183 -0
  112. data/lib/repull/models/map_vrbo_listing_request.rb +205 -0
  113. data/lib/repull/models/reorder_vrbo_listing_photos_request.rb +184 -0
  114. data/lib/repull/models/set_vrbo_listing_cover_photo_request.rb +164 -0
  115. data/lib/repull/models/submit_guest_review200_response.rb +26 -4
  116. data/lib/repull/models/sync_vrbo_transactions200_response.rb +167 -0
  117. data/lib/repull/models/{update_vrbo_listing_translations_request_set_inner.rb → sync_vrbo_transactions200_response_accounts_inner.rb} +40 -41
  118. data/lib/repull/models/sync_vrbo_transactions200_response_accounts_inner_error.rb +156 -0
  119. data/lib/repull/models/sync_vrbo_transactions_request.rb +156 -0
  120. data/lib/repull/models/update_vrbo_listing_additional_info200_response.rb +57 -110
  121. data/lib/repull/models/update_vrbo_listing_additional_info200_response_data.rb +1 -1
  122. data/lib/repull/models/update_vrbo_listing_amenities200_response.rb +57 -110
  123. data/lib/repull/models/update_vrbo_listing_amenities200_response_data.rb +1 -1
  124. data/lib/repull/models/update_vrbo_listing_availability202_response.rb +156 -0
  125. data/lib/repull/models/{update_vrbo_listing_translations200_response_data.rb → update_vrbo_listing_availability202_response_data.rb} +25 -21
  126. data/lib/repull/models/update_vrbo_listing_availability_request.rb +220 -0
  127. data/lib/repull/models/update_vrbo_listing_availability_request_operations_inner.rb +299 -0
  128. data/lib/repull/models/update_vrbo_listing_booking_settings200_response.rb +57 -110
  129. data/lib/repull/models/update_vrbo_listing_booking_settings200_response_data.rb +1 -1
  130. data/lib/repull/models/update_vrbo_listing_cancellation200_response.rb +57 -110
  131. data/lib/repull/models/update_vrbo_listing_cancellation200_response_data.rb +1 -1
  132. data/lib/repull/models/{update_vrbo_listing_translations200_response.rb → update_vrbo_listing_checkin_guide200_response.rb} +60 -113
  133. data/lib/repull/models/{update_vrbo_listing_welcome_guide200_response_data.rb → update_vrbo_listing_checkin_guide200_response_data.rb} +12 -12
  134. data/lib/repull/models/{update_vrbo_listing_welcome_guide_request.rb → update_vrbo_listing_checkin_guide_request.rb} +10 -10
  135. data/lib/repull/models/{update_vrbo_listing_welcome_guide_request_access.rb → update_vrbo_listing_checkin_guide_request_access.rb} +3 -3
  136. data/lib/repull/models/{update_vrbo_listing_welcome_guide_request_check_in.rb → update_vrbo_listing_checkin_guide_request_check_in.rb} +3 -3
  137. data/lib/repull/models/{update_vrbo_listing_welcome_guide_request_wifi.rb → update_vrbo_listing_checkin_guide_request_wifi.rb} +3 -3
  138. data/lib/repull/models/{update_vrbo_listing_welcome_guide200_response.rb → update_vrbo_listing_descriptions200_response.rb} +63 -113
  139. data/lib/repull/models/{update_vrbo_listing_description_request.rb → update_vrbo_listing_descriptions_request.rb} +14 -4
  140. data/lib/repull/models/{update_vrbo_listing_photos200_response.rb → update_vrbo_listing_details200_response.rb} +60 -113
  141. data/lib/repull/models/{update_vrbo_listing_property200_response_data.rb → update_vrbo_listing_details200_response_data.rb} +5 -5
  142. data/lib/repull/models/{update_vrbo_listing_property_request.rb → update_vrbo_listing_details_request.rb} +4 -4
  143. data/lib/repull/models/{update_vrbo_listing_property_request_interior_size.rb → update_vrbo_listing_details_request_interior_size.rb} +3 -3
  144. data/lib/repull/models/update_vrbo_listing_fees200_response.rb +57 -110
  145. data/lib/repull/models/update_vrbo_listing_fees200_response_data.rb +1 -1
  146. data/lib/repull/models/update_vrbo_listing_house_rules200_response.rb +57 -110
  147. data/lib/repull/models/update_vrbo_listing_house_rules200_response_data.rb +1 -1
  148. data/lib/repull/models/update_vrbo_listing_location200_response.rb +57 -110
  149. data/lib/repull/models/update_vrbo_listing_location200_response_data.rb +1 -1
  150. data/lib/repull/models/update_vrbo_listing_payment_terms200_response.rb +57 -110
  151. data/lib/repull/models/update_vrbo_listing_payment_terms200_response_data.rb +1 -1
  152. data/lib/repull/models/{update_vrbo_listing_property200_response.rb → update_vrbo_listing_permits200_response.rb} +60 -113
  153. data/lib/repull/models/{update_vrbo_listing_registration200_response_data.rb → update_vrbo_listing_permits200_response_data.rb} +5 -5
  154. data/lib/repull/models/{update_vrbo_listing_registration_request.rb → update_vrbo_listing_permits_request.rb} +4 -4
  155. data/lib/repull/models/{update_vrbo_listing_registration_request_settings_inner.rb → update_vrbo_listing_permits_request_settings_inner.rb} +4 -4
  156. data/lib/repull/models/{update_vrbo_listing_registration_request_settings_inner_value.rb → update_vrbo_listing_permits_request_settings_inner_value.rb} +1 -1
  157. data/lib/repull/models/update_vrbo_listing_photo_request.rb +229 -0
  158. data/lib/repull/models/update_vrbo_listing_pricing200_response.rb +57 -110
  159. data/lib/repull/models/update_vrbo_listing_pricing200_response_data.rb +1 -1
  160. data/lib/repull/models/update_vrbo_listing_protection200_response.rb +57 -110
  161. data/lib/repull/models/update_vrbo_listing_protection200_response_data.rb +1 -1
  162. data/lib/repull/models/update_vrbo_listing_rates200_response.rb +57 -110
  163. data/lib/repull/models/update_vrbo_listing_rates200_response_data.rb +2 -2
  164. data/lib/repull/models/{update_vrbo_listing_description200_response.rb → update_vrbo_listing_room200_response.rb} +60 -113
  165. data/lib/repull/models/{update_vrbo_listing_rooms200_response_data.rb → update_vrbo_listing_room200_response_data.rb} +4 -4
  166. data/lib/repull/models/update_vrbo_listing_room_request.rb +254 -0
  167. data/lib/repull/models/{update_vrbo_listing_rooms_request_add_inner_amenities.rb → update_vrbo_listing_room_request_amenities.rb} +3 -3
  168. data/lib/repull/models/{update_vrbo_listing_rooms_request_add_inner_amenities_one_of_inner.rb → update_vrbo_listing_room_request_amenities_one_of_inner.rb} +3 -3
  169. data/lib/repull/models/{update_vrbo_listing_rooms_request_add_inner.rb → update_vrbo_listing_room_request_beds_inner.rb} +53 -47
  170. data/lib/repull/models/update_vrbo_listing_safety_disclosures200_response.rb +245 -0
  171. data/lib/repull/models/update_vrbo_listing_safety_disclosures200_response_data.rb +151 -0
  172. data/lib/repull/models/{get_vrbo_listing_translations200_response_data.rb → update_vrbo_listing_safety_disclosures_request.rb} +27 -24
  173. data/lib/repull/models/update_vrbo_listing_safety_disclosures_request_groups.rb +156 -0
  174. data/lib/repull/models/update_vrbo_listing_safety_disclosures_request_groups_home_safety.rb +166 -0
  175. data/lib/repull/models/update_vrbo_listing_story200_response.rb +57 -110
  176. data/lib/repull/models/update_vrbo_listing_story200_response_data.rb +1 -1
  177. data/lib/repull/models/update_vrbo_listing_taxes200_response.rb +57 -110
  178. data/lib/repull/models/update_vrbo_listing_taxes200_response_data.rb +1 -1
  179. data/lib/repull/models/{update_vrbo_listing_photos_request.rb → vrbo_listing_action200_response.rb} +47 -43
  180. data/lib/repull/models/vrbo_listing_action200_response_units_inner.rb +192 -0
  181. data/lib/repull/models/vrbo_listing_action_request.rb +210 -0
  182. data/lib/repull/models/vrbo_reservation_action200_response.rb +166 -0
  183. data/lib/repull/models/vrbo_reservation_action200_response_data.rb +215 -0
  184. data/lib/repull/models/{update_vrbo_listing_description200_response_data.rb → vrbo_reservation_action200_response_data_payment.rb} +26 -25
  185. data/lib/repull/models/{get_vrbo_listing_content200_response_sections_rates.rb → vrbo_reservation_action200_response_data_penalties.rb} +25 -34
  186. data/lib/repull/models/vrbo_reservation_action200_response_data_terms_inner.rb +158 -0
  187. data/lib/repull/models/vrbo_reservation_action_request.rb +268 -0
  188. data/lib/repull/version.rb +1 -1
  189. data/lib/repull.rb +118 -60
  190. data/openapi/v1.json +11811 -2951
  191. metadata +119 -61
  192. data/lib/repull/models/get_vrbo_listing_description200_response_data.rb +0 -168
@@ -0,0 +1,219 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect Airbnb, Booking.com, Vrbo and more channels, plus 14 PMS platforms, through one REST API. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, `limit`, `used` and `resets_at` fields. **The way past a request quota.** The monthly quota refusal (`429 rate_limit_exceeded` with `scope: \"monthly\"`), `402 credits_exhausted` and `429 daily_limit_exceeded` also carry `upgrade` (the cheapest plan that covers your usage: its exact monthly price for your listings, its request quotas and a `checkout_url` that opens checkout for that price; `plan: \"custom\"` with a `contact_email` when no self-serve plan covers it), `credits` (pay-as-you-go: `usd_per_1000_requests`, `top_up_url`, your `balance_usd`), `resets_at` and `projected_monthly_requests`. The per-minute 429 (`scope: \"per_api_key\"`) carries none of these: wait `Retry-After`. ## Plan listing limits Each plan includes a number of **active listings**: | Tier | Active listings | |---|---| | `free` | 3 | | `starter` | no cap: 10 included, then billed per listing | | `custom` | no cap | Going over the plan never blocks your API calls. Listings beyond the plan are **held back**: they stay connected and keep syncing, but they are not served. A held-back listing answers `403 listing_inactive` with `reason: \"plan_limit\"`, and collection routes leave it out. Every JSON response then carries a `planNotice` and the `X-Repull-Listings-Held-Back` header, so you know there is more to see. Choose which listings are active with `POST /v1/listings/status`. Upgrading at `https://repull.dev/dashboard/billing` lifts the cap but does not switch held-back listings on: you choose which to activate afterwards, with the same call or from the dashboard, and each one you switch on is billed from then. Only a call that would itself take you over the plan is refused, with **`402 listings_limit_exceeded`**: activating listings (`PATCH /v1/listings/{id}` with `{ \"active\": true }`, `POST /v1/listings/status`) or creating one (`POST /v1/listings`). Nothing else changes. The envelope carries the tier, the limit, the active count and an upgrade link next to the standard `code` / `message` / `fix` / `docs_url` / `request_id`. If an account has more active listings than its plan (for example after a downgrade), calls are still served and `planNotice` says so (code \"listings_over_plan\"). ## Failed payments If your plan's renewal payment fails, nothing is blocked: your API calls keep working while Stripe retries the card. Every successful JSON response then carries a `billingNotice` (code `payment_failed`) with the amount, when it failed, the next automatic retry (`nextRetryAt`) and `payUrl`, the invoice to pay. It disappears once the invoice is paid.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Repull
17
+ class GetVrboReservation200ResponseDataFreshness < ApiModelBase
18
+ attr_accessor :last_synced_at
19
+
20
+ attr_accessor :stale
21
+
22
+ attr_accessor :reason
23
+
24
+ attr_accessor :source
25
+
26
+ attr_accessor :accounts
27
+
28
+ class EnumAttributeValidator
29
+ attr_reader :datatype
30
+ attr_reader :allowable_values
31
+
32
+ def initialize(datatype, allowable_values)
33
+ @allowable_values = allowable_values.map do |value|
34
+ case datatype.to_s
35
+ when /Integer/i
36
+ value.to_i
37
+ when /Float/i
38
+ value.to_f
39
+ else
40
+ value
41
+ end
42
+ end
43
+ end
44
+
45
+ def valid?(value)
46
+ !value || allowable_values.include?(value)
47
+ end
48
+ end
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ def self.attribute_map
52
+ {
53
+ :'last_synced_at' => :'lastSyncedAt',
54
+ :'stale' => :'stale',
55
+ :'reason' => :'reason',
56
+ :'source' => :'source',
57
+ :'accounts' => :'accounts'
58
+ }
59
+ end
60
+
61
+ # Returns attribute mapping this model knows about
62
+ def self.acceptable_attribute_map
63
+ attribute_map
64
+ end
65
+
66
+ # Returns all the JSON keys this model knows about
67
+ def self.acceptable_attributes
68
+ acceptable_attribute_map.values
69
+ end
70
+
71
+ # Attribute type mapping.
72
+ def self.openapi_types
73
+ {
74
+ :'last_synced_at' => :'String',
75
+ :'stale' => :'Boolean',
76
+ :'reason' => :'String',
77
+ :'source' => :'String',
78
+ :'accounts' => :'Array<GetVrboReservation200ResponseDataFreshnessAccountsInner>'
79
+ }
80
+ end
81
+
82
+ # List of attributes with nullable: true
83
+ def self.openapi_nullable
84
+ Set.new([
85
+ ])
86
+ end
87
+
88
+ # Initializes the object
89
+ # @param [Hash] attributes Model attributes in the form of hash
90
+ def initialize(attributes = {})
91
+ if (!attributes.is_a?(Hash))
92
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetVrboReservation200ResponseDataFreshness` initialize method"
93
+ end
94
+
95
+ # check to see if the attribute exists and convert string to symbol for hash key
96
+ acceptable_attribute_map = self.class.acceptable_attribute_map
97
+ attributes = attributes.each_with_object({}) { |(k, v), h|
98
+ if (!acceptable_attribute_map.key?(k.to_sym))
99
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetVrboReservation200ResponseDataFreshness`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
100
+ end
101
+ h[k.to_sym] = v
102
+ }
103
+
104
+ if attributes.key?(:'last_synced_at')
105
+ self.last_synced_at = attributes[:'last_synced_at']
106
+ end
107
+
108
+ if attributes.key?(:'stale')
109
+ self.stale = attributes[:'stale']
110
+ end
111
+
112
+ if attributes.key?(:'reason')
113
+ self.reason = attributes[:'reason']
114
+ end
115
+
116
+ if attributes.key?(:'source')
117
+ self.source = attributes[:'source']
118
+ end
119
+
120
+ if attributes.key?(:'accounts')
121
+ if (value = attributes[:'accounts']).is_a?(Array)
122
+ self.accounts = value
123
+ end
124
+ end
125
+ end
126
+
127
+ # Show invalid properties with the reasons. Usually used together with valid?
128
+ # @return Array for valid properties with the reasons
129
+ def list_invalid_properties
130
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
131
+ invalid_properties = Array.new
132
+ invalid_properties
133
+ end
134
+
135
+ # Check to see if the all the properties in the model are valid
136
+ # @return true if the model is valid
137
+ def valid?
138
+ warn '[DEPRECATED] the `valid?` method is obsolete'
139
+ source_validator = EnumAttributeValidator.new('String', ["live"])
140
+ return false unless source_validator.valid?(@source)
141
+ true
142
+ end
143
+
144
+ # Custom attribute writer method checking allowed values (enum).
145
+ # @param [Object] source Object to be assigned
146
+ def source=(source)
147
+ validator = EnumAttributeValidator.new('String', ["live"])
148
+ unless validator.valid?(source)
149
+ fail ArgumentError, "invalid value for \"source\", must be one of #{validator.allowable_values}."
150
+ end
151
+ @source = source
152
+ end
153
+
154
+ # Checks equality by comparing each attribute.
155
+ # @param [Object] Object to be compared
156
+ def ==(o)
157
+ return true if self.equal?(o)
158
+ self.class == o.class &&
159
+ last_synced_at == o.last_synced_at &&
160
+ stale == o.stale &&
161
+ reason == o.reason &&
162
+ source == o.source &&
163
+ accounts == o.accounts
164
+ end
165
+
166
+ # @see the `==` method
167
+ # @param [Object] Object to be compared
168
+ def eql?(o)
169
+ self == o
170
+ end
171
+
172
+ # Calculates hash code according to all attributes.
173
+ # @return [Integer] Hash code
174
+ def hash
175
+ [last_synced_at, stale, reason, source, accounts].hash
176
+ end
177
+
178
+ # Builds the object from hash
179
+ # @param [Hash] attributes Model attributes in the form of hash
180
+ # @return [Object] Returns the model itself
181
+ def self.build_from_hash(attributes)
182
+ return nil unless attributes.is_a?(Hash)
183
+ attributes = attributes.transform_keys(&:to_sym)
184
+ transformed_hash = {}
185
+ openapi_types.each_pair do |key, type|
186
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
187
+ transformed_hash["#{key}"] = nil
188
+ elsif type =~ /\AArray<(.*)>/i
189
+ # check to ensure the input is an array given that the attribute
190
+ # is documented as an array but the input is not
191
+ if attributes[attribute_map[key]].is_a?(Array)
192
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
193
+ end
194
+ elsif !attributes[attribute_map[key]].nil?
195
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
196
+ end
197
+ end
198
+ new(transformed_hash)
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ end
218
+
219
+ end
@@ -14,19 +14,22 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class GetVrboListingContent200ResponseSectionsTranslationsItemsInner < ApiModelBase
18
- attr_accessor :locale
17
+ class GetVrboReservation200ResponseDataFreshnessAccountsInner < ApiModelBase
18
+ attr_accessor :account_id
19
19
 
20
- attr_accessor :headline
20
+ attr_accessor :last_synced_at
21
21
 
22
- attr_accessor :description
22
+ attr_accessor :stale
23
+
24
+ attr_accessor :reason
23
25
 
24
26
  # Attribute mapping from ruby-style variable name to JSON key.
25
27
  def self.attribute_map
26
28
  {
27
- :'locale' => :'locale',
28
- :'headline' => :'headline',
29
- :'description' => :'description'
29
+ :'account_id' => :'accountId',
30
+ :'last_synced_at' => :'lastSyncedAt',
31
+ :'stale' => :'stale',
32
+ :'reason' => :'reason'
30
33
  }
31
34
  end
32
35
 
@@ -43,17 +46,16 @@ module Repull
43
46
  # Attribute type mapping.
44
47
  def self.openapi_types
45
48
  {
46
- :'locale' => :'String',
47
- :'headline' => :'String',
48
- :'description' => :'String'
49
+ :'account_id' => :'String',
50
+ :'last_synced_at' => :'String',
51
+ :'stale' => :'Boolean',
52
+ :'reason' => :'String'
49
53
  }
50
54
  end
51
55
 
52
56
  # List of attributes with nullable: true
53
57
  def self.openapi_nullable
54
58
  Set.new([
55
- :'headline',
56
- :'description'
57
59
  ])
58
60
  end
59
61
 
@@ -61,28 +63,32 @@ module Repull
61
63
  # @param [Hash] attributes Model attributes in the form of hash
62
64
  def initialize(attributes = {})
63
65
  if (!attributes.is_a?(Hash))
64
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetVrboListingContent200ResponseSectionsTranslationsItemsInner` initialize method"
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::GetVrboReservation200ResponseDataFreshnessAccountsInner` initialize method"
65
67
  end
66
68
 
67
69
  # check to see if the attribute exists and convert string to symbol for hash key
68
70
  acceptable_attribute_map = self.class.acceptable_attribute_map
69
71
  attributes = attributes.each_with_object({}) { |(k, v), h|
70
72
  if (!acceptable_attribute_map.key?(k.to_sym))
71
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetVrboListingContent200ResponseSectionsTranslationsItemsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::GetVrboReservation200ResponseDataFreshnessAccountsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
72
74
  end
73
75
  h[k.to_sym] = v
74
76
  }
75
77
 
76
- if attributes.key?(:'locale')
77
- self.locale = attributes[:'locale']
78
+ if attributes.key?(:'account_id')
79
+ self.account_id = attributes[:'account_id']
80
+ end
81
+
82
+ if attributes.key?(:'last_synced_at')
83
+ self.last_synced_at = attributes[:'last_synced_at']
78
84
  end
79
85
 
80
- if attributes.key?(:'headline')
81
- self.headline = attributes[:'headline']
86
+ if attributes.key?(:'stale')
87
+ self.stale = attributes[:'stale']
82
88
  end
83
89
 
84
- if attributes.key?(:'description')
85
- self.description = attributes[:'description']
90
+ if attributes.key?(:'reason')
91
+ self.reason = attributes[:'reason']
86
92
  end
87
93
  end
88
94
 
@@ -106,9 +112,10 @@ module Repull
106
112
  def ==(o)
107
113
  return true if self.equal?(o)
108
114
  self.class == o.class &&
109
- locale == o.locale &&
110
- headline == o.headline &&
111
- description == o.description
115
+ account_id == o.account_id &&
116
+ last_synced_at == o.last_synced_at &&
117
+ stale == o.stale &&
118
+ reason == o.reason
112
119
  end
113
120
 
114
121
  # @see the `==` method
@@ -120,7 +127,7 @@ module Repull
120
127
  # Calculates hash code according to all attributes.
121
128
  # @return [Integer] Hash code
122
129
  def hash
123
- [locale, headline, description].hash
130
+ [account_id, last_synced_at, stale, reason].hash
124
131
  end
125
132
 
126
133
  # Builds the object from hash
@@ -14,19 +14,19 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
- class UpdateVrboListingRoomsRequest < ApiModelBase
18
- attr_accessor :add
17
+ class ListVrboTransactions200Response < ApiModelBase
18
+ attr_accessor :data
19
19
 
20
- attr_accessor :update
20
+ attr_accessor :pagination
21
21
 
22
- attr_accessor :delete
22
+ attr_accessor :data_freshness
23
23
 
24
24
  # Attribute mapping from ruby-style variable name to JSON key.
25
25
  def self.attribute_map
26
26
  {
27
- :'add' => :'add',
28
- :'update' => :'update',
29
- :'delete' => :'delete'
27
+ :'data' => :'data',
28
+ :'pagination' => :'pagination',
29
+ :'data_freshness' => :'dataFreshness'
30
30
  }
31
31
  end
32
32
 
@@ -43,9 +43,9 @@ module Repull
43
43
  # Attribute type mapping.
44
44
  def self.openapi_types
45
45
  {
46
- :'add' => :'Array<UpdateVrboListingRoomsRequestAddInner>',
47
- :'update' => :'Array<UpdateVrboListingRoomsRequestUpdateInner>',
48
- :'delete' => :'Array<String>'
46
+ :'data' => :'Array<ListVrboTransactions200ResponseDataInner>',
47
+ :'pagination' => :'Pagination',
48
+ :'data_freshness' => :'ListVrboTransactions200ResponseDataFreshness'
49
49
  }
50
50
  end
51
51
 
@@ -59,34 +59,30 @@ module Repull
59
59
  # @param [Hash] attributes Model attributes in the form of hash
60
60
  def initialize(attributes = {})
61
61
  if (!attributes.is_a?(Hash))
62
- fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::UpdateVrboListingRoomsRequest` initialize method"
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ListVrboTransactions200Response` initialize method"
63
63
  end
64
64
 
65
65
  # check to see if the attribute exists and convert string to symbol for hash key
66
66
  acceptable_attribute_map = self.class.acceptable_attribute_map
67
67
  attributes = attributes.each_with_object({}) { |(k, v), h|
68
68
  if (!acceptable_attribute_map.key?(k.to_sym))
69
- fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::UpdateVrboListingRoomsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ListVrboTransactions200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
70
  end
71
71
  h[k.to_sym] = v
72
72
  }
73
73
 
74
- if attributes.key?(:'add')
75
- if (value = attributes[:'add']).is_a?(Array)
76
- self.add = value
74
+ if attributes.key?(:'data')
75
+ if (value = attributes[:'data']).is_a?(Array)
76
+ self.data = value
77
77
  end
78
78
  end
79
79
 
80
- if attributes.key?(:'update')
81
- if (value = attributes[:'update']).is_a?(Array)
82
- self.update = value
83
- end
80
+ if attributes.key?(:'pagination')
81
+ self.pagination = attributes[:'pagination']
84
82
  end
85
83
 
86
- if attributes.key?(:'delete')
87
- if (value = attributes[:'delete']).is_a?(Array)
88
- self.delete = value
89
- end
84
+ if attributes.key?(:'data_freshness')
85
+ self.data_freshness = attributes[:'data_freshness']
90
86
  end
91
87
  end
92
88
 
@@ -110,9 +106,9 @@ module Repull
110
106
  def ==(o)
111
107
  return true if self.equal?(o)
112
108
  self.class == o.class &&
113
- add == o.add &&
114
- update == o.update &&
115
- delete == o.delete
109
+ data == o.data &&
110
+ pagination == o.pagination &&
111
+ data_freshness == o.data_freshness
116
112
  end
117
113
 
118
114
  # @see the `==` method
@@ -124,7 +120,7 @@ module Repull
124
120
  # Calculates hash code according to all attributes.
125
121
  # @return [Integer] Hash code
126
122
  def hash
127
- [add, update, delete].hash
123
+ [data, pagination, data_freshness].hash
128
124
  end
129
125
 
130
126
  # Builds the object from hash
@@ -0,0 +1,220 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect Airbnb, Booking.com, Vrbo and more channels, plus 14 PMS platforms, through one REST API. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, `limit`, `used` and `resets_at` fields. **The way past a request quota.** The monthly quota refusal (`429 rate_limit_exceeded` with `scope: \"monthly\"`), `402 credits_exhausted` and `429 daily_limit_exceeded` also carry `upgrade` (the cheapest plan that covers your usage: its exact monthly price for your listings, its request quotas and a `checkout_url` that opens checkout for that price; `plan: \"custom\"` with a `contact_email` when no self-serve plan covers it), `credits` (pay-as-you-go: `usd_per_1000_requests`, `top_up_url`, your `balance_usd`), `resets_at` and `projected_monthly_requests`. The per-minute 429 (`scope: \"per_api_key\"`) carries none of these: wait `Retry-After`. ## Plan listing limits Each plan includes a number of **active listings**: | Tier | Active listings | |---|---| | `free` | 3 | | `starter` | no cap: 10 included, then billed per listing | | `custom` | no cap | Going over the plan never blocks your API calls. Listings beyond the plan are **held back**: they stay connected and keep syncing, but they are not served. A held-back listing answers `403 listing_inactive` with `reason: \"plan_limit\"`, and collection routes leave it out. Every JSON response then carries a `planNotice` and the `X-Repull-Listings-Held-Back` header, so you know there is more to see. Choose which listings are active with `POST /v1/listings/status`. Upgrading at `https://repull.dev/dashboard/billing` lifts the cap but does not switch held-back listings on: you choose which to activate afterwards, with the same call or from the dashboard, and each one you switch on is billed from then. Only a call that would itself take you over the plan is refused, with **`402 listings_limit_exceeded`**: activating listings (`PATCH /v1/listings/{id}` with `{ \"active\": true }`, `POST /v1/listings/status`) or creating one (`POST /v1/listings`). Nothing else changes. The envelope carries the tier, the limit, the active count and an upgrade link next to the standard `code` / `message` / `fix` / `docs_url` / `request_id`. If an account has more active listings than its plan (for example after a downgrade), calls are still served and `planNotice` says so (code \"listings_over_plan\"). ## Failed payments If your plan's renewal payment fails, nothing is blocked: your API calls keep working while Stripe retries the card. Every successful JSON response then carries a `billingNotice` (code `payment_failed`) with the amount, when it failed, the next automatic retry (`nextRetryAt`) and `payUrl`, the invoice to pay. It disappears once the invoice is paid.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Repull
17
+ class ListVrboTransactions200ResponseDataFreshness < ApiModelBase
18
+ attr_accessor :last_synced_at
19
+
20
+ attr_accessor :stale
21
+
22
+ attr_accessor :reason
23
+
24
+ attr_accessor :fix_url
25
+
26
+ attr_accessor :accounts
27
+
28
+ class EnumAttributeValidator
29
+ attr_reader :datatype
30
+ attr_reader :allowable_values
31
+
32
+ def initialize(datatype, allowable_values)
33
+ @allowable_values = allowable_values.map do |value|
34
+ case datatype.to_s
35
+ when /Integer/i
36
+ value.to_i
37
+ when /Float/i
38
+ value.to_f
39
+ else
40
+ value
41
+ end
42
+ end
43
+ end
44
+
45
+ def valid?(value)
46
+ !value || allowable_values.include?(value)
47
+ end
48
+ end
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ def self.attribute_map
52
+ {
53
+ :'last_synced_at' => :'lastSyncedAt',
54
+ :'stale' => :'stale',
55
+ :'reason' => :'reason',
56
+ :'fix_url' => :'fixUrl',
57
+ :'accounts' => :'accounts'
58
+ }
59
+ end
60
+
61
+ # Returns attribute mapping this model knows about
62
+ def self.acceptable_attribute_map
63
+ attribute_map
64
+ end
65
+
66
+ # Returns all the JSON keys this model knows about
67
+ def self.acceptable_attributes
68
+ acceptable_attribute_map.values
69
+ end
70
+
71
+ # Attribute type mapping.
72
+ def self.openapi_types
73
+ {
74
+ :'last_synced_at' => :'String',
75
+ :'stale' => :'Boolean',
76
+ :'reason' => :'String',
77
+ :'fix_url' => :'String',
78
+ :'accounts' => :'Array<GetVrboListing200ResponseDataFreshnessAccountsInner>'
79
+ }
80
+ end
81
+
82
+ # List of attributes with nullable: true
83
+ def self.openapi_nullable
84
+ Set.new([
85
+ :'last_synced_at',
86
+ ])
87
+ end
88
+
89
+ # Initializes the object
90
+ # @param [Hash] attributes Model attributes in the form of hash
91
+ def initialize(attributes = {})
92
+ if (!attributes.is_a?(Hash))
93
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ListVrboTransactions200ResponseDataFreshness` initialize method"
94
+ end
95
+
96
+ # check to see if the attribute exists and convert string to symbol for hash key
97
+ acceptable_attribute_map = self.class.acceptable_attribute_map
98
+ attributes = attributes.each_with_object({}) { |(k, v), h|
99
+ if (!acceptable_attribute_map.key?(k.to_sym))
100
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ListVrboTransactions200ResponseDataFreshness`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
101
+ end
102
+ h[k.to_sym] = v
103
+ }
104
+
105
+ if attributes.key?(:'last_synced_at')
106
+ self.last_synced_at = attributes[:'last_synced_at']
107
+ end
108
+
109
+ if attributes.key?(:'stale')
110
+ self.stale = attributes[:'stale']
111
+ end
112
+
113
+ if attributes.key?(:'reason')
114
+ self.reason = attributes[:'reason']
115
+ end
116
+
117
+ if attributes.key?(:'fix_url')
118
+ self.fix_url = attributes[:'fix_url']
119
+ end
120
+
121
+ if attributes.key?(:'accounts')
122
+ if (value = attributes[:'accounts']).is_a?(Array)
123
+ self.accounts = value
124
+ end
125
+ end
126
+ end
127
+
128
+ # Show invalid properties with the reasons. Usually used together with valid?
129
+ # @return Array for valid properties with the reasons
130
+ def list_invalid_properties
131
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
132
+ invalid_properties = Array.new
133
+ invalid_properties
134
+ end
135
+
136
+ # Check to see if the all the properties in the model are valid
137
+ # @return true if the model is valid
138
+ def valid?
139
+ warn '[DEPRECATED] the `valid?` method is obsolete'
140
+ reason_validator = EnumAttributeValidator.new('String', ["ok", "refreshing", "never_synced", "reconnect_required"])
141
+ return false unless reason_validator.valid?(@reason)
142
+ true
143
+ end
144
+
145
+ # Custom attribute writer method checking allowed values (enum).
146
+ # @param [Object] reason Object to be assigned
147
+ def reason=(reason)
148
+ validator = EnumAttributeValidator.new('String', ["ok", "refreshing", "never_synced", "reconnect_required"])
149
+ unless validator.valid?(reason)
150
+ fail ArgumentError, "invalid value for \"reason\", must be one of #{validator.allowable_values}."
151
+ end
152
+ @reason = reason
153
+ end
154
+
155
+ # Checks equality by comparing each attribute.
156
+ # @param [Object] Object to be compared
157
+ def ==(o)
158
+ return true if self.equal?(o)
159
+ self.class == o.class &&
160
+ last_synced_at == o.last_synced_at &&
161
+ stale == o.stale &&
162
+ reason == o.reason &&
163
+ fix_url == o.fix_url &&
164
+ accounts == o.accounts
165
+ end
166
+
167
+ # @see the `==` method
168
+ # @param [Object] Object to be compared
169
+ def eql?(o)
170
+ self == o
171
+ end
172
+
173
+ # Calculates hash code according to all attributes.
174
+ # @return [Integer] Hash code
175
+ def hash
176
+ [last_synced_at, stale, reason, fix_url, accounts].hash
177
+ end
178
+
179
+ # Builds the object from hash
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ # @return [Object] Returns the model itself
182
+ def self.build_from_hash(attributes)
183
+ return nil unless attributes.is_a?(Hash)
184
+ attributes = attributes.transform_keys(&:to_sym)
185
+ transformed_hash = {}
186
+ openapi_types.each_pair do |key, type|
187
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
188
+ transformed_hash["#{key}"] = nil
189
+ elsif type =~ /\AArray<(.*)>/i
190
+ # check to ensure the input is an array given that the attribute
191
+ # is documented as an array but the input is not
192
+ if attributes[attribute_map[key]].is_a?(Array)
193
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
194
+ end
195
+ elsif !attributes[attribute_map[key]].nil?
196
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
197
+ end
198
+ end
199
+ new(transformed_hash)
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.openapi_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ end
219
+
220
+ end