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
@@ -15,23 +15,29 @@ require 'time'
15
15
 
16
16
  module Repull
17
17
  class ReviewCreatedEvent < ApiModelBase
18
- attr_accessor :id
18
+ # The event name. This field is `event`, not `type`.
19
+ attr_accessor :event
19
20
 
20
- attr_accessor :type
21
-
22
- attr_accessor :created_at
21
+ # Stable across every delivery and replay of this logical event — dedupe on it.
22
+ attr_accessor :event_id
23
23
 
24
24
  attr_accessor :api_version
25
25
 
26
+ # When this delivery was built.
27
+ attr_accessor :timestamp
28
+
29
+ attr_accessor :account
30
+
26
31
  attr_accessor :data
27
32
 
28
33
  # Attribute mapping from ruby-style variable name to JSON key.
29
34
  def self.attribute_map
30
35
  {
31
- :'id' => :'id',
32
- :'type' => :'type',
33
- :'created_at' => :'createdAt',
36
+ :'event' => :'event',
37
+ :'event_id' => :'eventId',
34
38
  :'api_version' => :'apiVersion',
39
+ :'timestamp' => :'timestamp',
40
+ :'account' => :'account',
35
41
  :'data' => :'data'
36
42
  }
37
43
  end
@@ -49,10 +55,11 @@ module Repull
49
55
  # Attribute type mapping.
50
56
  def self.openapi_types
51
57
  {
52
- :'id' => :'String',
53
- :'type' => :'String',
54
- :'created_at' => :'Time',
58
+ :'event' => :'String',
59
+ :'event_id' => :'String',
55
60
  :'api_version' => :'String',
61
+ :'timestamp' => :'Time',
62
+ :'account' => :'WebhookEventAccount',
56
63
  :'data' => :'ReviewCreatedPayload'
57
64
  }
58
65
  end
@@ -60,6 +67,7 @@ module Repull
60
67
  # List of attributes with nullable: true
61
68
  def self.openapi_nullable
62
69
  Set.new([
70
+ :'account',
63
71
  ])
64
72
  end
65
73
 
@@ -79,22 +87,32 @@ module Repull
79
87
  h[k.to_sym] = v
80
88
  }
81
89
 
82
- if attributes.key?(:'id')
83
- self.id = attributes[:'id']
84
- end
85
-
86
- if attributes.key?(:'type')
87
- self.type = attributes[:'type']
90
+ if attributes.key?(:'event')
91
+ self.event = attributes[:'event']
88
92
  else
89
- self.type = nil
93
+ self.event = nil
90
94
  end
91
95
 
92
- if attributes.key?(:'created_at')
93
- self.created_at = attributes[:'created_at']
96
+ if attributes.key?(:'event_id')
97
+ self.event_id = attributes[:'event_id']
98
+ else
99
+ self.event_id = nil
94
100
  end
95
101
 
96
102
  if attributes.key?(:'api_version')
97
103
  self.api_version = attributes[:'api_version']
104
+ else
105
+ self.api_version = nil
106
+ end
107
+
108
+ if attributes.key?(:'timestamp')
109
+ self.timestamp = attributes[:'timestamp']
110
+ else
111
+ self.timestamp = nil
112
+ end
113
+
114
+ if attributes.key?(:'account')
115
+ self.account = attributes[:'account']
98
116
  end
99
117
 
100
118
  if attributes.key?(:'data')
@@ -109,8 +127,20 @@ module Repull
109
127
  def list_invalid_properties
110
128
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
111
129
  invalid_properties = Array.new
112
- if @type.nil?
113
- invalid_properties.push('invalid value for "type", type cannot be nil.')
130
+ if @event.nil?
131
+ invalid_properties.push('invalid value for "event", event cannot be nil.')
132
+ end
133
+
134
+ if @event_id.nil?
135
+ invalid_properties.push('invalid value for "event_id", event_id cannot be nil.')
136
+ end
137
+
138
+ if @api_version.nil?
139
+ invalid_properties.push('invalid value for "api_version", api_version cannot be nil.')
140
+ end
141
+
142
+ if @timestamp.nil?
143
+ invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
114
144
  end
115
145
 
116
146
  if @data.nil?
@@ -124,19 +154,52 @@ module Repull
124
154
  # @return true if the model is valid
125
155
  def valid?
126
156
  warn '[DEPRECATED] the `valid?` method is obsolete'
127
- return false if @type.nil?
157
+ return false if @event.nil?
158
+ return false if @event_id.nil?
159
+ return false if @api_version.nil?
160
+ return false if @timestamp.nil?
128
161
  return false if @data.nil?
129
162
  true
130
163
  end
131
164
 
132
165
  # Custom attribute writer method with validation
133
- # @param [Object] type Value to be assigned
134
- def type=(type)
135
- if type.nil?
136
- fail ArgumentError, 'type cannot be nil'
166
+ # @param [Object] event Value to be assigned
167
+ def event=(event)
168
+ if event.nil?
169
+ fail ArgumentError, 'event cannot be nil'
170
+ end
171
+
172
+ @event = event
173
+ end
174
+
175
+ # Custom attribute writer method with validation
176
+ # @param [Object] event_id Value to be assigned
177
+ def event_id=(event_id)
178
+ if event_id.nil?
179
+ fail ArgumentError, 'event_id cannot be nil'
180
+ end
181
+
182
+ @event_id = event_id
183
+ end
184
+
185
+ # Custom attribute writer method with validation
186
+ # @param [Object] api_version Value to be assigned
187
+ def api_version=(api_version)
188
+ if api_version.nil?
189
+ fail ArgumentError, 'api_version cannot be nil'
190
+ end
191
+
192
+ @api_version = api_version
193
+ end
194
+
195
+ # Custom attribute writer method with validation
196
+ # @param [Object] timestamp Value to be assigned
197
+ def timestamp=(timestamp)
198
+ if timestamp.nil?
199
+ fail ArgumentError, 'timestamp cannot be nil'
137
200
  end
138
201
 
139
- @type = type
202
+ @timestamp = timestamp
140
203
  end
141
204
 
142
205
  # Custom attribute writer method with validation
@@ -154,10 +217,11 @@ module Repull
154
217
  def ==(o)
155
218
  return true if self.equal?(o)
156
219
  self.class == o.class &&
157
- id == o.id &&
158
- type == o.type &&
159
- created_at == o.created_at &&
220
+ event == o.event &&
221
+ event_id == o.event_id &&
160
222
  api_version == o.api_version &&
223
+ timestamp == o.timestamp &&
224
+ account == o.account &&
161
225
  data == o.data
162
226
  end
163
227
 
@@ -170,7 +234,7 @@ module Repull
170
234
  # Calculates hash code according to all attributes.
171
235
  # @return [Integer] Hash code
172
236
  def hash
173
- [id, type, created_at, api_version, data].hash
237
+ [event, event_id, api_version, timestamp, account, data].hash
174
238
  end
175
239
 
176
240
  # Builds the object from hash
@@ -15,23 +15,29 @@ require 'time'
15
15
 
16
16
  module Repull
17
17
  class ReviewRespondedEvent < ApiModelBase
18
- attr_accessor :id
18
+ # The event name. This field is `event`, not `type`.
19
+ attr_accessor :event
19
20
 
20
- attr_accessor :type
21
-
22
- attr_accessor :created_at
21
+ # Stable across every delivery and replay of this logical event — dedupe on it.
22
+ attr_accessor :event_id
23
23
 
24
24
  attr_accessor :api_version
25
25
 
26
+ # When this delivery was built.
27
+ attr_accessor :timestamp
28
+
29
+ attr_accessor :account
30
+
26
31
  attr_accessor :data
27
32
 
28
33
  # Attribute mapping from ruby-style variable name to JSON key.
29
34
  def self.attribute_map
30
35
  {
31
- :'id' => :'id',
32
- :'type' => :'type',
33
- :'created_at' => :'createdAt',
36
+ :'event' => :'event',
37
+ :'event_id' => :'eventId',
34
38
  :'api_version' => :'apiVersion',
39
+ :'timestamp' => :'timestamp',
40
+ :'account' => :'account',
35
41
  :'data' => :'data'
36
42
  }
37
43
  end
@@ -49,10 +55,11 @@ module Repull
49
55
  # Attribute type mapping.
50
56
  def self.openapi_types
51
57
  {
52
- :'id' => :'String',
53
- :'type' => :'String',
54
- :'created_at' => :'Time',
58
+ :'event' => :'String',
59
+ :'event_id' => :'String',
55
60
  :'api_version' => :'String',
61
+ :'timestamp' => :'Time',
62
+ :'account' => :'WebhookEventAccount',
56
63
  :'data' => :'ReviewRespondedPayload'
57
64
  }
58
65
  end
@@ -60,6 +67,7 @@ module Repull
60
67
  # List of attributes with nullable: true
61
68
  def self.openapi_nullable
62
69
  Set.new([
70
+ :'account',
63
71
  ])
64
72
  end
65
73
 
@@ -79,22 +87,32 @@ module Repull
79
87
  h[k.to_sym] = v
80
88
  }
81
89
 
82
- if attributes.key?(:'id')
83
- self.id = attributes[:'id']
84
- end
85
-
86
- if attributes.key?(:'type')
87
- self.type = attributes[:'type']
90
+ if attributes.key?(:'event')
91
+ self.event = attributes[:'event']
88
92
  else
89
- self.type = nil
93
+ self.event = nil
90
94
  end
91
95
 
92
- if attributes.key?(:'created_at')
93
- self.created_at = attributes[:'created_at']
96
+ if attributes.key?(:'event_id')
97
+ self.event_id = attributes[:'event_id']
98
+ else
99
+ self.event_id = nil
94
100
  end
95
101
 
96
102
  if attributes.key?(:'api_version')
97
103
  self.api_version = attributes[:'api_version']
104
+ else
105
+ self.api_version = nil
106
+ end
107
+
108
+ if attributes.key?(:'timestamp')
109
+ self.timestamp = attributes[:'timestamp']
110
+ else
111
+ self.timestamp = nil
112
+ end
113
+
114
+ if attributes.key?(:'account')
115
+ self.account = attributes[:'account']
98
116
  end
99
117
 
100
118
  if attributes.key?(:'data')
@@ -109,8 +127,20 @@ module Repull
109
127
  def list_invalid_properties
110
128
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
111
129
  invalid_properties = Array.new
112
- if @type.nil?
113
- invalid_properties.push('invalid value for "type", type cannot be nil.')
130
+ if @event.nil?
131
+ invalid_properties.push('invalid value for "event", event cannot be nil.')
132
+ end
133
+
134
+ if @event_id.nil?
135
+ invalid_properties.push('invalid value for "event_id", event_id cannot be nil.')
136
+ end
137
+
138
+ if @api_version.nil?
139
+ invalid_properties.push('invalid value for "api_version", api_version cannot be nil.')
140
+ end
141
+
142
+ if @timestamp.nil?
143
+ invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
114
144
  end
115
145
 
116
146
  if @data.nil?
@@ -124,19 +154,52 @@ module Repull
124
154
  # @return true if the model is valid
125
155
  def valid?
126
156
  warn '[DEPRECATED] the `valid?` method is obsolete'
127
- return false if @type.nil?
157
+ return false if @event.nil?
158
+ return false if @event_id.nil?
159
+ return false if @api_version.nil?
160
+ return false if @timestamp.nil?
128
161
  return false if @data.nil?
129
162
  true
130
163
  end
131
164
 
132
165
  # Custom attribute writer method with validation
133
- # @param [Object] type Value to be assigned
134
- def type=(type)
135
- if type.nil?
136
- fail ArgumentError, 'type cannot be nil'
166
+ # @param [Object] event Value to be assigned
167
+ def event=(event)
168
+ if event.nil?
169
+ fail ArgumentError, 'event cannot be nil'
170
+ end
171
+
172
+ @event = event
173
+ end
174
+
175
+ # Custom attribute writer method with validation
176
+ # @param [Object] event_id Value to be assigned
177
+ def event_id=(event_id)
178
+ if event_id.nil?
179
+ fail ArgumentError, 'event_id cannot be nil'
180
+ end
181
+
182
+ @event_id = event_id
183
+ end
184
+
185
+ # Custom attribute writer method with validation
186
+ # @param [Object] api_version Value to be assigned
187
+ def api_version=(api_version)
188
+ if api_version.nil?
189
+ fail ArgumentError, 'api_version cannot be nil'
190
+ end
191
+
192
+ @api_version = api_version
193
+ end
194
+
195
+ # Custom attribute writer method with validation
196
+ # @param [Object] timestamp Value to be assigned
197
+ def timestamp=(timestamp)
198
+ if timestamp.nil?
199
+ fail ArgumentError, 'timestamp cannot be nil'
137
200
  end
138
201
 
139
- @type = type
202
+ @timestamp = timestamp
140
203
  end
141
204
 
142
205
  # Custom attribute writer method with validation
@@ -154,10 +217,11 @@ module Repull
154
217
  def ==(o)
155
218
  return true if self.equal?(o)
156
219
  self.class == o.class &&
157
- id == o.id &&
158
- type == o.type &&
159
- created_at == o.created_at &&
220
+ event == o.event &&
221
+ event_id == o.event_id &&
160
222
  api_version == o.api_version &&
223
+ timestamp == o.timestamp &&
224
+ account == o.account &&
161
225
  data == o.data
162
226
  end
163
227
 
@@ -170,7 +234,7 @@ module Repull
170
234
  # Calculates hash code according to all attributes.
171
235
  # @return [Integer] Hash code
172
236
  def hash
173
- [id, type, created_at, api_version, data].hash
237
+ [event, event_id, api_version, timestamp, account, data].hash
174
238
  end
175
239
 
176
240
  # Builds the object from hash
@@ -0,0 +1,104 @@
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
+ module SendAirbnbMessage201Response
18
+ class << self
19
+ # List of class defined in oneOf (OpenAPI v3)
20
+ def openapi_one_of
21
+ [
22
+ :'Hash<String, Object>',
23
+ :'SendMessageResponse'
24
+ ]
25
+ end
26
+
27
+ # Builds the object
28
+ # @param [Mixed] Data to be matched against the list of oneOf items
29
+ # @return [Object] Returns the model or the data itself
30
+ def build(data)
31
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
32
+ # Note:
33
+ # - We do not attempt to check whether exactly one item matches.
34
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
35
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
36
+ # - TODO: scalar values are de facto behaving as if they were nullable.
37
+ # - TODO: logging when debugging is set.
38
+ openapi_one_of.each do |klass|
39
+ begin
40
+ next if klass == :AnyType # "nullable: true"
41
+ return find_and_cast_into_type(klass, data)
42
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
43
+ end
44
+ end
45
+
46
+ openapi_one_of.include?(:AnyType) ? data : nil
47
+ end
48
+
49
+ private
50
+
51
+ SchemaMismatchError = Class.new(StandardError)
52
+
53
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
54
+ def find_and_cast_into_type(klass, data)
55
+ return if data.nil?
56
+
57
+ case klass.to_s
58
+ when 'Boolean'
59
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
60
+ when 'Float'
61
+ return data if data.instance_of?(Float)
62
+ when 'Integer'
63
+ return data if data.instance_of?(Integer)
64
+ when 'Time'
65
+ return Time.parse(data)
66
+ when 'Date'
67
+ return Date.iso8601(data)
68
+ when 'String'
69
+ return data if data.instance_of?(String)
70
+ when 'Object' # "type: object"
71
+ return data if data.instance_of?(Hash)
72
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
73
+ if data.instance_of?(Array)
74
+ sub_type = Regexp.last_match[:sub_type]
75
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
76
+ end
77
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
78
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
79
+ sub_type = Regexp.last_match[:sub_type]
80
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
81
+ end
82
+ else # model
83
+ const = Repull.const_get(klass)
84
+ if const
85
+ if const.respond_to?(:openapi_one_of) # nested oneOf model
86
+ model = const.build(data)
87
+ return model if model
88
+ else
89
+ # raise if data contains keys that are not known to the model
90
+ raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
91
+ model = const.build_from_hash(data)
92
+ return model if model
93
+ end
94
+ end
95
+ end
96
+
97
+ raise # if no match by now, raise
98
+ rescue
99
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
100
+ end
101
+ end
102
+ end
103
+
104
+ end
@@ -14,14 +14,15 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Repull
17
+ # `message`, `mediaUrl`, or both.
17
18
  class SendAirbnbMessageRequest < ApiModelBase
18
- # Message body to send to the guest.
19
+ # Message body to send to the guest. Optional when `mediaUrl` is set (it is then sent as a separate message after the file).
19
20
  attr_accessor :message
20
21
 
21
- # Optional URL of an image/media attachment to send with the message.
22
+ # Public https URL of one image or video to send (JPEG/PNG/GIF/WebP/MP4/QuickTime, up to 10 MB). Repull uploads it to Airbnb for you.
22
23
  attr_accessor :media_url
23
24
 
24
- # Optional MIME/media type hint for `mediaUrl` (e.g. `image/jpeg`).
25
+ # Optional MIME type hint for `mediaUrl` (e.g. `image/jpeg`). The type is read from the file itself; this never overrides it.
25
26
  attr_accessor :media_type
26
27
 
27
28
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -78,8 +79,6 @@ module Repull
78
79
 
79
80
  if attributes.key?(:'message')
80
81
  self.message = attributes[:'message']
81
- else
82
- self.message = nil
83
82
  end
84
83
 
85
84
  if attributes.key?(:'media_url')
@@ -96,10 +95,6 @@ module Repull
96
95
  def list_invalid_properties
97
96
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
98
97
  invalid_properties = Array.new
99
- if @message.nil?
100
- invalid_properties.push('invalid value for "message", message cannot be nil.')
101
- end
102
-
103
98
  invalid_properties
104
99
  end
105
100
 
@@ -107,20 +102,9 @@ module Repull
107
102
  # @return true if the model is valid
108
103
  def valid?
109
104
  warn '[DEPRECATED] the `valid?` method is obsolete'
110
- return false if @message.nil?
111
105
  true
112
106
  end
113
107
 
114
- # Custom attribute writer method with validation
115
- # @param [Object] message Value to be assigned
116
- def message=(message)
117
- if message.nil?
118
- fail ArgumentError, 'message cannot be nil'
119
- end
120
-
121
- @message = message
122
- end
123
-
124
108
  # Checks equality by comparing each attribute.
125
109
  # @param [Object] Object to be compared
126
110
  def ==(o)