repull 0.2.15 → 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.
- checksums.yaml +4 -4
- data/lib/repull/api/airbnb_api.rb +147 -52
- data/lib/repull/api/billing_api.rb +4 -4
- data/lib/repull/api/booking_com_api.rb +36 -27
- data/lib/repull/api/conversations_api.rb +398 -4
- data/lib/repull/api/guests_api.rb +2 -2
- data/lib/repull/api/listings_api.rb +4 -4
- data/lib/repull/api/reservations_api.rb +157 -6
- data/lib/repull/api/webhooks_api.rb +10 -3
- data/lib/repull/models/accept_reservation_request200_response.rb +321 -0
- data/lib/repull/models/account_created_event.rb +95 -31
- data/lib/repull/models/account_disconnected_event.rb +95 -31
- data/lib/repull/models/ai_operation_completed_event.rb +95 -31
- data/lib/repull/models/ai_operation_failed_event.rb +95 -31
- data/lib/repull/models/airbnb_reservation_action200_response.rb +157 -0
- data/lib/repull/models/airbnb_reservation_action_request.rb +248 -0
- data/lib/repull/models/booking_availability_update.rb +4 -20
- data/lib/repull/models/booking_availability_update_date_range.rb +193 -0
- data/lib/repull/models/booking_availability_update_request.rb +14 -3
- data/lib/repull/models/booking_pricing_rate_update.rb +32 -4
- data/lib/repull/models/booking_pricing_rate_update_date_range.rb +3 -0
- data/lib/repull/models/booking_pricing_rate_update_restrictions.rb +10 -10
- data/lib/repull/models/booking_pricing_response.rb +16 -4
- data/lib/repull/models/booking_pricing_update_response.rb +82 -18
- data/lib/repull/models/booking_property.rb +107 -36
- data/lib/repull/models/booking_property_listings_inner.rb +244 -0
- data/lib/repull/models/booking_rate_write_occupancy.rb +187 -0
- data/lib/repull/models/booking_rate_write_price_half.rb +188 -0
- data/lib/repull/models/booking_rate_write_restriction_half.rb +212 -0
- data/lib/repull/models/booking_rate_write_verification.rb +200 -0
- data/lib/repull/models/booking_rate_write_verification_row.rb +196 -0
- data/lib/repull/models/booking_restriction_request_row.rb +199 -0
- data/lib/repull/models/booking_restriction_verification.rb +208 -0
- data/lib/repull/models/booking_restriction_verification_row.rb +203 -0
- data/lib/repull/models/booking_restriction_verification_row_booking_value.rb +105 -0
- data/lib/repull/models/booking_restriction_verification_row_expected.rb +105 -0
- data/lib/repull/models/booking_rooms_rates_response.rb +41 -7
- data/lib/repull/models/booking_rooms_rates_response_rooms_inner.rb +12 -1
- data/lib/repull/models/booking_rooms_rates_response_rooms_inner_rates_inner.rb +1 -0
- data/lib/repull/models/booking_upstream_failure.rb +204 -0
- data/lib/repull/models/calendar_updated_event.rb +95 -31
- data/lib/repull/models/conversation_message_attachment.rb +28 -1
- data/lib/repull/models/create_airbnb_offer_request.rb +93 -8
- data/lib/repull/models/create_airbnb_offer_request_guest_details.rb +279 -0
- data/lib/repull/models/create_conversation_special_offer201_response.rb +293 -0
- data/lib/repull/models/create_conversation_special_offer201_response_guests.rb +189 -0
- data/lib/repull/models/create_conversation_special_offer_request.rb +263 -0
- data/lib/repull/models/create_conversation_special_offer_request_guests.rb +263 -0
- data/lib/repull/models/decline_reservation_request_request.rb +234 -0
- data/lib/repull/models/get_airbnb_offer200_response.rb +289 -0
- data/lib/repull/models/get_usage_summary200_response.rb +10 -1
- data/lib/repull/models/get_usage_summary200_response_limits.rb +11 -1
- data/lib/repull/models/get_usage_summary200_response_remaining.rb +11 -1
- data/lib/repull/models/get_usage_summary200_response_used.rb +10 -1
- data/lib/repull/models/get_usage_tier200_response.rb +10 -1
- data/lib/repull/models/get_usage_tier200_response_limits.rb +11 -1
- data/lib/repull/models/get_usage_tier200_response_remaining.rb +11 -1
- data/lib/repull/models/get_usage_tier200_response_used.rb +10 -1
- data/lib/repull/models/inquiry_created_event.rb +281 -0
- data/lib/repull/models/inquiry_created_payload.rb +185 -0
- data/lib/repull/models/inquiry_updated_event.rb +281 -0
- data/lib/repull/models/inquiry_updated_payload.rb +213 -0
- data/lib/repull/models/inquiry_webhook_object.rb +323 -0
- data/lib/repull/models/inquiry_webhook_object_expected_payout.rb +158 -0
- data/lib/repull/models/inquiry_webhook_object_guests.rb +188 -0
- data/lib/repull/models/list_airbnb_thread_messages200_response.rb +170 -0
- data/lib/repull/models/list_airbnb_thread_messages200_response_data_inner.rb +274 -0
- data/lib/repull/models/list_airbnb_thread_messages200_response_pagination.rb +158 -0
- data/lib/repull/models/list_inquiries200_response.rb +192 -0
- data/lib/repull/models/list_inquiries200_response_data_inner.rb +418 -0
- data/lib/repull/models/list_inquiries200_response_data_inner_expected_payout.rb +159 -0
- data/lib/repull/models/list_inquiries200_response_data_inner_guests.rb +188 -0
- data/lib/repull/models/listing_created_event.rb +95 -31
- data/lib/repull/models/listing_deleted_event.rb +95 -31
- data/lib/repull/models/listing_deleted_payload.rb +55 -21
- data/lib/repull/models/listing_reactivated_event.rb +281 -0
- data/lib/repull/models/listing_suspended_event.rb +281 -0
- data/lib/repull/models/listing_suspension_payload.rb +202 -0
- data/lib/repull/models/listing_updated_event.rb +95 -31
- data/lib/repull/models/listing_updated_payload.rb +50 -22
- data/lib/repull/models/listing_webhook_object.rb +291 -0
- data/lib/repull/models/listing_webhook_object_address.rb +168 -0
- data/lib/repull/models/listing_webhook_object_channels_inner.rb +184 -0
- data/lib/repull/models/message.rb +1 -0
- data/lib/repull/models/payment_completed_event.rb +95 -31
- data/lib/repull/models/payment_completed_payload.rb +46 -44
- data/lib/repull/models/payment_refunded_event.rb +95 -31
- data/lib/repull/models/payment_refunded_payload.rb +46 -44
- data/lib/repull/models/payment_webhook_object.rb +351 -0
- data/lib/repull/models/preapprove_conversation201_response.rb +253 -0
- data/lib/repull/models/preapprove_conversation_request.rb +150 -0
- data/lib/repull/models/replay_webhook_delivery_request.rb +150 -0
- data/lib/repull/models/repull_ping_event.rb +95 -31
- data/lib/repull/models/reservation.rb +22 -2
- data/lib/repull/models/reservation_alteration_created_event.rb +95 -31
- data/lib/repull/models/reservation_alteration_responded_event.rb +95 -31
- data/lib/repull/models/reservation_cancelled_event.rb +95 -31
- data/lib/repull/models/reservation_created_event.rb +95 -32
- data/lib/repull/models/reservation_message_received_event.rb +95 -31
- data/lib/repull/models/reservation_message_received_payload.rb +17 -4
- data/lib/repull/models/reservation_request_created_event.rb +281 -0
- data/lib/repull/models/reservation_request_created_payload.rb +224 -0
- data/lib/repull/models/reservation_request_updated_event.rb +281 -0
- data/lib/repull/models/reservation_request_updated_payload.rb +251 -0
- data/lib/repull/models/reservation_updated_event.rb +95 -31
- data/lib/repull/models/review_created_event.rb +95 -31
- data/lib/repull/models/review_responded_event.rb +95 -31
- data/lib/repull/models/send_airbnb_message201_response.rb +104 -0
- data/lib/repull/models/send_airbnb_message_request.rb +4 -20
- data/lib/repull/models/send_message_attachment.rb +225 -0
- data/lib/repull/models/send_message_part.rb +201 -0
- data/lib/repull/models/send_message_request.rb +44 -19
- data/lib/repull/models/send_message_response.rb +29 -5
- data/lib/repull/models/sent_attachment.rb +196 -0
- data/lib/repull/models/usage_quota_warning_event.rb +281 -0
- data/lib/repull/models/usage_quota_warning_payload.rb +224 -0
- data/lib/repull/models/usage_quota_warning_payload_top_operation.rb +167 -0
- data/lib/repull/models/webhook_event.rb +17 -3
- data/lib/repull/models/webhook_event_account.rb +171 -0
- data/lib/repull/models/webhook_event_type.rb +8 -1
- data/lib/repull/models/withdraw_conversation_special_offer200_response.rb +240 -0
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +60 -0
- data/openapi/v1.json +19295 -13620
- data/scripts/regen.sh +1 -1
- metadata +62 -2
|
@@ -14,21 +14,34 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
|
-
# Returned by `GET /v1/channels/booking/properties/{id}/rooms`. Exposes the Booking.com room + rate-plan mapping ids for a listing so a caller can assemble a `PUT /v1/channels/booking/availability` restriction write (which requires `roomId` + `rateId` on every update).
|
|
17
|
+
# Returned by `GET /v1/channels/booking/properties/{id}/rooms`. Exposes the Booking.com room + rate-plan mapping ids for a listing so a caller can assemble a `PUT /v1/channels/booking/availability` restriction write (which requires `roomId` + `rateId` on every update). Read live from Booking's B.XML roomrates feed; `source` says so, and says when the answer came from the last import instead.
|
|
18
18
|
class BookingRoomsRatesResponse < ApiModelBase
|
|
19
|
-
# Booking.com hotel/property id the rooms belong to.
|
|
19
|
+
# Booking.com hotel/property id the rooms belong to — the one the mapping resolved to.
|
|
20
20
|
attr_accessor :hotel_id
|
|
21
21
|
|
|
22
|
-
#
|
|
22
|
+
# Repull listing id echoed back.
|
|
23
23
|
attr_accessor :listing_id
|
|
24
24
|
|
|
25
|
+
# Other Booking.com properties this listing is also published under. Empty in the normal case. Pass one as `?hotel_id=` to read its rooms instead.
|
|
26
|
+
attr_accessor :other_hotel_ids
|
|
27
|
+
|
|
28
|
+
# Where the rooms came from. `booking` — read live from Booking.com just now. `mirror` — Booking.com returned nothing usable, so these are the rooms and rate plans recorded at the last import; the ids are Booking.com's own and are safe to write against, but they can be stale and `maxPersons`, `policy`, `policyId`, `pricingType` and `isChildRate` come back `null` because only the live feed states them.
|
|
29
|
+
attr_accessor :source
|
|
30
|
+
|
|
31
|
+
# Why the live read was not used. Null when `source` is `booking`.
|
|
32
|
+
attr_accessor :mirror_reason
|
|
33
|
+
|
|
34
|
+
# Empty only when Booking.com reports no rooms for this property AND nothing was recorded at the last import. A failed read is never an empty list — it is an error.
|
|
25
35
|
attr_accessor :rooms
|
|
26
36
|
|
|
27
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
38
|
def self.attribute_map
|
|
29
39
|
{
|
|
30
|
-
:'hotel_id' => :'
|
|
31
|
-
:'listing_id' => :'
|
|
40
|
+
:'hotel_id' => :'hotelId',
|
|
41
|
+
:'listing_id' => :'listingId',
|
|
42
|
+
:'other_hotel_ids' => :'otherHotelIds',
|
|
43
|
+
:'source' => :'source',
|
|
44
|
+
:'mirror_reason' => :'mirrorReason',
|
|
32
45
|
:'rooms' => :'rooms'
|
|
33
46
|
}
|
|
34
47
|
end
|
|
@@ -47,7 +60,10 @@ module Repull
|
|
|
47
60
|
def self.openapi_types
|
|
48
61
|
{
|
|
49
62
|
:'hotel_id' => :'String',
|
|
50
|
-
:'listing_id' => :'
|
|
63
|
+
:'listing_id' => :'String',
|
|
64
|
+
:'other_hotel_ids' => :'Array<String>',
|
|
65
|
+
:'source' => :'String',
|
|
66
|
+
:'mirror_reason' => :'String',
|
|
51
67
|
:'rooms' => :'Array<BookingRoomsRatesResponseRoomsInner>'
|
|
52
68
|
}
|
|
53
69
|
end
|
|
@@ -55,6 +71,7 @@ module Repull
|
|
|
55
71
|
# List of attributes with nullable: true
|
|
56
72
|
def self.openapi_nullable
|
|
57
73
|
Set.new([
|
|
74
|
+
:'mirror_reason',
|
|
58
75
|
])
|
|
59
76
|
end
|
|
60
77
|
|
|
@@ -82,6 +99,20 @@ module Repull
|
|
|
82
99
|
self.listing_id = attributes[:'listing_id']
|
|
83
100
|
end
|
|
84
101
|
|
|
102
|
+
if attributes.key?(:'other_hotel_ids')
|
|
103
|
+
if (value = attributes[:'other_hotel_ids']).is_a?(Array)
|
|
104
|
+
self.other_hotel_ids = value
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'source')
|
|
109
|
+
self.source = attributes[:'source']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'mirror_reason')
|
|
113
|
+
self.mirror_reason = attributes[:'mirror_reason']
|
|
114
|
+
end
|
|
115
|
+
|
|
85
116
|
if attributes.key?(:'rooms')
|
|
86
117
|
if (value = attributes[:'rooms']).is_a?(Array)
|
|
87
118
|
self.rooms = value
|
|
@@ -111,6 +142,9 @@ module Repull
|
|
|
111
142
|
self.class == o.class &&
|
|
112
143
|
hotel_id == o.hotel_id &&
|
|
113
144
|
listing_id == o.listing_id &&
|
|
145
|
+
other_hotel_ids == o.other_hotel_ids &&
|
|
146
|
+
source == o.source &&
|
|
147
|
+
mirror_reason == o.mirror_reason &&
|
|
114
148
|
rooms == o.rooms
|
|
115
149
|
end
|
|
116
150
|
|
|
@@ -123,7 +157,7 @@ module Repull
|
|
|
123
157
|
# Calculates hash code according to all attributes.
|
|
124
158
|
# @return [Integer] Hash code
|
|
125
159
|
def hash
|
|
126
|
-
[hotel_id, listing_id, rooms].hash
|
|
160
|
+
[hotel_id, listing_id, other_hotel_ids, source, mirror_reason, rooms].hash
|
|
127
161
|
end
|
|
128
162
|
|
|
129
163
|
# Builds the object from hash
|
|
@@ -20,6 +20,9 @@ module Repull
|
|
|
20
20
|
|
|
21
21
|
attr_accessor :room_name
|
|
22
22
|
|
|
23
|
+
# Booking.com's capacity for this room, as imported. The occupancy a rate write falls back to when the rate plan states no `maxPersons`. Null when Booking.com never stated one.
|
|
24
|
+
attr_accessor :max_adults
|
|
25
|
+
|
|
23
26
|
attr_accessor :rates
|
|
24
27
|
|
|
25
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -27,6 +30,7 @@ module Repull
|
|
|
27
30
|
{
|
|
28
31
|
:'room_id' => :'roomId',
|
|
29
32
|
:'room_name' => :'roomName',
|
|
33
|
+
:'max_adults' => :'maxAdults',
|
|
30
34
|
:'rates' => :'rates'
|
|
31
35
|
}
|
|
32
36
|
end
|
|
@@ -46,6 +50,7 @@ module Repull
|
|
|
46
50
|
{
|
|
47
51
|
:'room_id' => :'String',
|
|
48
52
|
:'room_name' => :'String',
|
|
53
|
+
:'max_adults' => :'Integer',
|
|
49
54
|
:'rates' => :'Array<BookingRoomsRatesResponseRoomsInnerRatesInner>'
|
|
50
55
|
}
|
|
51
56
|
end
|
|
@@ -55,6 +60,7 @@ module Repull
|
|
|
55
60
|
Set.new([
|
|
56
61
|
:'room_id',
|
|
57
62
|
:'room_name',
|
|
63
|
+
:'max_adults',
|
|
58
64
|
])
|
|
59
65
|
end
|
|
60
66
|
|
|
@@ -82,6 +88,10 @@ module Repull
|
|
|
82
88
|
self.room_name = attributes[:'room_name']
|
|
83
89
|
end
|
|
84
90
|
|
|
91
|
+
if attributes.key?(:'max_adults')
|
|
92
|
+
self.max_adults = attributes[:'max_adults']
|
|
93
|
+
end
|
|
94
|
+
|
|
85
95
|
if attributes.key?(:'rates')
|
|
86
96
|
if (value = attributes[:'rates']).is_a?(Array)
|
|
87
97
|
self.rates = value
|
|
@@ -111,6 +121,7 @@ module Repull
|
|
|
111
121
|
self.class == o.class &&
|
|
112
122
|
room_id == o.room_id &&
|
|
113
123
|
room_name == o.room_name &&
|
|
124
|
+
max_adults == o.max_adults &&
|
|
114
125
|
rates == o.rates
|
|
115
126
|
end
|
|
116
127
|
|
|
@@ -123,7 +134,7 @@ module Repull
|
|
|
123
134
|
# Calculates hash code according to all attributes.
|
|
124
135
|
# @return [Integer] Hash code
|
|
125
136
|
def hash
|
|
126
|
-
[room_id, room_name, rates].hash
|
|
137
|
+
[room_id, room_name, max_adults, rates].hash
|
|
127
138
|
end
|
|
128
139
|
|
|
129
140
|
# Builds the object from hash
|
|
@@ -25,6 +25,7 @@ module Repull
|
|
|
25
25
|
|
|
26
26
|
attr_accessor :policy_id
|
|
27
27
|
|
|
28
|
+
# The party size this rate plan prices. A rate amount must be written at this number: above it Booking.com declines the price in silence, below it answers 400. Null when `source` is `mirror`.
|
|
28
29
|
attr_accessor :max_persons
|
|
29
30
|
|
|
30
31
|
# Pricing model: `Standard`, `RLO`, `OBP`, or `LOS`.
|
|
@@ -0,0 +1,204 @@
|
|
|
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
|
+
# Why Booking.com refused one half of a write, in their words. Present on the half that was refused.
|
|
18
|
+
class BookingUpstreamFailure < ApiModelBase
|
|
19
|
+
# Booking.com's own reason, taken from the body they answered with — never a paraphrase of their status code.
|
|
20
|
+
attr_accessor :message
|
|
21
|
+
|
|
22
|
+
# The HTTP status Booking.com answered with.
|
|
23
|
+
attr_accessor :upstream_status
|
|
24
|
+
|
|
25
|
+
# Booking.com's own error code, when their envelope named one.
|
|
26
|
+
attr_accessor :booking_code
|
|
27
|
+
|
|
28
|
+
# Booking.com's request id. Quote it to their connectivity support to have them trace the call.
|
|
29
|
+
attr_accessor :booking_ruid
|
|
30
|
+
|
|
31
|
+
# The upstream body, trimmed and capped, for when the parsed reason is not enough.
|
|
32
|
+
attr_accessor :body
|
|
33
|
+
|
|
34
|
+
# How the failure was classified internally (e.g. `BAD_REQUEST`, `RATE_LIMITED`).
|
|
35
|
+
attr_accessor :code
|
|
36
|
+
|
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
|
+
def self.attribute_map
|
|
39
|
+
{
|
|
40
|
+
:'message' => :'message',
|
|
41
|
+
:'upstream_status' => :'upstream_status',
|
|
42
|
+
:'booking_code' => :'booking_code',
|
|
43
|
+
:'booking_ruid' => :'booking_ruid',
|
|
44
|
+
:'body' => :'body',
|
|
45
|
+
:'code' => :'code'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Returns attribute mapping this model knows about
|
|
50
|
+
def self.acceptable_attribute_map
|
|
51
|
+
attribute_map
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Returns all the JSON keys this model knows about
|
|
55
|
+
def self.acceptable_attributes
|
|
56
|
+
acceptable_attribute_map.values
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Attribute type mapping.
|
|
60
|
+
def self.openapi_types
|
|
61
|
+
{
|
|
62
|
+
:'message' => :'String',
|
|
63
|
+
:'upstream_status' => :'Integer',
|
|
64
|
+
:'booking_code' => :'String',
|
|
65
|
+
:'booking_ruid' => :'String',
|
|
66
|
+
:'body' => :'String',
|
|
67
|
+
:'code' => :'String'
|
|
68
|
+
}
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# List of attributes with nullable: true
|
|
72
|
+
def self.openapi_nullable
|
|
73
|
+
Set.new([
|
|
74
|
+
:'upstream_status',
|
|
75
|
+
:'booking_code',
|
|
76
|
+
:'booking_ruid',
|
|
77
|
+
:'body',
|
|
78
|
+
:'code'
|
|
79
|
+
])
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Initializes the object
|
|
83
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
84
|
+
def initialize(attributes = {})
|
|
85
|
+
if (!attributes.is_a?(Hash))
|
|
86
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::BookingUpstreamFailure` initialize method"
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
90
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
91
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
92
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
93
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::BookingUpstreamFailure`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
94
|
+
end
|
|
95
|
+
h[k.to_sym] = v
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'message')
|
|
99
|
+
self.message = attributes[:'message']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'upstream_status')
|
|
103
|
+
self.upstream_status = attributes[:'upstream_status']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'booking_code')
|
|
107
|
+
self.booking_code = attributes[:'booking_code']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'booking_ruid')
|
|
111
|
+
self.booking_ruid = attributes[:'booking_ruid']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'body')
|
|
115
|
+
self.body = attributes[:'body']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'code')
|
|
119
|
+
self.code = attributes[:'code']
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
124
|
+
# @return Array for valid properties with the reasons
|
|
125
|
+
def list_invalid_properties
|
|
126
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
127
|
+
invalid_properties = Array.new
|
|
128
|
+
invalid_properties
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Check to see if the all the properties in the model are valid
|
|
132
|
+
# @return true if the model is valid
|
|
133
|
+
def valid?
|
|
134
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
135
|
+
true
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Checks equality by comparing each attribute.
|
|
139
|
+
# @param [Object] Object to be compared
|
|
140
|
+
def ==(o)
|
|
141
|
+
return true if self.equal?(o)
|
|
142
|
+
self.class == o.class &&
|
|
143
|
+
message == o.message &&
|
|
144
|
+
upstream_status == o.upstream_status &&
|
|
145
|
+
booking_code == o.booking_code &&
|
|
146
|
+
booking_ruid == o.booking_ruid &&
|
|
147
|
+
body == o.body &&
|
|
148
|
+
code == o.code
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# @see the `==` method
|
|
152
|
+
# @param [Object] Object to be compared
|
|
153
|
+
def eql?(o)
|
|
154
|
+
self == o
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Calculates hash code according to all attributes.
|
|
158
|
+
# @return [Integer] Hash code
|
|
159
|
+
def hash
|
|
160
|
+
[message, upstream_status, booking_code, booking_ruid, body, code].hash
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Builds the object from hash
|
|
164
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
165
|
+
# @return [Object] Returns the model itself
|
|
166
|
+
def self.build_from_hash(attributes)
|
|
167
|
+
return nil unless attributes.is_a?(Hash)
|
|
168
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
169
|
+
transformed_hash = {}
|
|
170
|
+
openapi_types.each_pair do |key, type|
|
|
171
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
172
|
+
transformed_hash["#{key}"] = nil
|
|
173
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
174
|
+
# check to ensure the input is an array given that the attribute
|
|
175
|
+
# is documented as an array but the input is not
|
|
176
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
177
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
178
|
+
end
|
|
179
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
180
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
new(transformed_hash)
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Returns the object in the form of hash
|
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
|
188
|
+
def to_hash
|
|
189
|
+
hash = {}
|
|
190
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
191
|
+
value = self.send(attr)
|
|
192
|
+
if value.nil?
|
|
193
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
194
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
hash[param] = _to_hash(value)
|
|
198
|
+
end
|
|
199
|
+
hash
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
end
|
|
@@ -15,23 +15,29 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
17
|
class CalendarUpdatedEvent < ApiModelBase
|
|
18
|
-
|
|
18
|
+
# The event name. This field is `event`, not `type`.
|
|
19
|
+
attr_accessor :event
|
|
19
20
|
|
|
20
|
-
|
|
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
|
-
:'
|
|
32
|
-
:'
|
|
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
|
-
:'
|
|
53
|
-
:'
|
|
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' => :'CalendarUpdatedPayload'
|
|
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?(:'
|
|
83
|
-
self.
|
|
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.
|
|
93
|
+
self.event = nil
|
|
90
94
|
end
|
|
91
95
|
|
|
92
|
-
if attributes.key?(:'
|
|
93
|
-
self.
|
|
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 @
|
|
113
|
-
invalid_properties.push('invalid value for "
|
|
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 @
|
|
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]
|
|
134
|
-
def
|
|
135
|
-
if
|
|
136
|
-
fail ArgumentError, '
|
|
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
|
-
@
|
|
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
|
-
|
|
158
|
-
|
|
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
|
-
[
|
|
237
|
+
[event, event_id, api_version, timestamp, account, data].hash
|
|
174
238
|
end
|
|
175
239
|
|
|
176
240
|
# Builds the object from hash
|
|
@@ -14,11 +14,19 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
|
+
# A file on a message — a photo the guest sent, or a file sent to the guest. Files are copied to durable storage, so `url` keeps working after the channel's own link expires. Treat `url` as opaque.
|
|
17
18
|
class ConversationMessageAttachment < ApiModelBase
|
|
18
19
|
attr_accessor :id
|
|
19
20
|
|
|
21
|
+
# Where to download the file.
|
|
22
|
+
attr_accessor :url
|
|
23
|
+
|
|
24
|
+
# Same value as `url` (kept for older clients; it is not image-only). Use `url`.
|
|
20
25
|
attr_accessor :image_url
|
|
21
26
|
|
|
27
|
+
# Coarse kind, derived from `contentType`.
|
|
28
|
+
attr_accessor :type
|
|
29
|
+
|
|
22
30
|
attr_accessor :content_type
|
|
23
31
|
|
|
24
32
|
attr_accessor :created_at
|
|
@@ -27,7 +35,9 @@ module Repull
|
|
|
27
35
|
def self.attribute_map
|
|
28
36
|
{
|
|
29
37
|
:'id' => :'id',
|
|
38
|
+
:'url' => :'url',
|
|
30
39
|
:'image_url' => :'imageUrl',
|
|
40
|
+
:'type' => :'type',
|
|
31
41
|
:'content_type' => :'contentType',
|
|
32
42
|
:'created_at' => :'createdAt'
|
|
33
43
|
}
|
|
@@ -47,7 +57,9 @@ module Repull
|
|
|
47
57
|
def self.openapi_types
|
|
48
58
|
{
|
|
49
59
|
:'id' => :'String',
|
|
60
|
+
:'url' => :'String',
|
|
50
61
|
:'image_url' => :'String',
|
|
62
|
+
:'type' => :'String',
|
|
51
63
|
:'content_type' => :'String',
|
|
52
64
|
:'created_at' => :'Time'
|
|
53
65
|
}
|
|
@@ -56,6 +68,11 @@ module Repull
|
|
|
56
68
|
# List of attributes with nullable: true
|
|
57
69
|
def self.openapi_nullable
|
|
58
70
|
Set.new([
|
|
71
|
+
:'id',
|
|
72
|
+
:'url',
|
|
73
|
+
:'image_url',
|
|
74
|
+
:'content_type',
|
|
75
|
+
:'created_at'
|
|
59
76
|
])
|
|
60
77
|
end
|
|
61
78
|
|
|
@@ -79,10 +96,18 @@ module Repull
|
|
|
79
96
|
self.id = attributes[:'id']
|
|
80
97
|
end
|
|
81
98
|
|
|
99
|
+
if attributes.key?(:'url')
|
|
100
|
+
self.url = attributes[:'url']
|
|
101
|
+
end
|
|
102
|
+
|
|
82
103
|
if attributes.key?(:'image_url')
|
|
83
104
|
self.image_url = attributes[:'image_url']
|
|
84
105
|
end
|
|
85
106
|
|
|
107
|
+
if attributes.key?(:'type')
|
|
108
|
+
self.type = attributes[:'type']
|
|
109
|
+
end
|
|
110
|
+
|
|
86
111
|
if attributes.key?(:'content_type')
|
|
87
112
|
self.content_type = attributes[:'content_type']
|
|
88
113
|
end
|
|
@@ -113,7 +138,9 @@ module Repull
|
|
|
113
138
|
return true if self.equal?(o)
|
|
114
139
|
self.class == o.class &&
|
|
115
140
|
id == o.id &&
|
|
141
|
+
url == o.url &&
|
|
116
142
|
image_url == o.image_url &&
|
|
143
|
+
type == o.type &&
|
|
117
144
|
content_type == o.content_type &&
|
|
118
145
|
created_at == o.created_at
|
|
119
146
|
end
|
|
@@ -127,7 +154,7 @@ module Repull
|
|
|
127
154
|
# Calculates hash code according to all attributes.
|
|
128
155
|
# @return [Integer] Hash code
|
|
129
156
|
def hash
|
|
130
|
-
[id, image_url, content_type, created_at].hash
|
|
157
|
+
[id, url, image_url, type, content_type, created_at].hash
|
|
131
158
|
end
|
|
132
159
|
|
|
133
160
|
# Builds the object from hash
|