repull 0.2.24 → 0.2.25
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/connect_api.rb +617 -0
- data/lib/repull/api/connections_api.rb +312 -0
- data/lib/repull/api/conversations_api.rb +151 -18
- data/lib/repull/api/health_api.rb +5 -5
- data/lib/repull/api/listings_api.rb +67 -4
- data/lib/repull/api/reviews_api.rb +2 -2
- data/lib/repull/models/apply_connection_mappings200_response.rb +167 -0
- data/lib/repull/models/apply_connection_mappings200_response_results_inner.rb +184 -0
- data/lib/repull/models/apply_connection_mappings_request.rb +175 -0
- data/lib/repull/models/apply_connection_mappings_request_mappings_inner.rb +193 -0
- data/lib/repull/models/auto_map_connection_units200_response.rb +176 -0
- data/lib/repull/models/auto_map_connection_units_request.rb +156 -0
- data/lib/repull/models/channel_market_state_item.rb +15 -4
- data/lib/repull/models/connect_status.rb +25 -5
- data/lib/repull/models/connect_status_accounts_inner.rb +71 -4
- data/lib/repull/models/conversation_capabilities.rb +260 -0
- data/lib/repull/models/conversation_detail.rb +14 -5
- data/lib/repull/models/create_connect_session_request.rb +23 -1
- data/lib/repull/models/create_conversation_special_offer201_response.rb +127 -4
- data/lib/repull/models/create_conversation_special_offer201_response_fees_inner.rb +166 -0
- data/lib/repull/models/create_conversation_special_offer201_response_lines_inner.rb +157 -0
- data/lib/repull/models/create_conversation_special_offer_request.rb +91 -52
- data/lib/repull/models/create_conversation_special_offer_request_fees_inner.rb +199 -0
- data/lib/repull/models/get_booking_extranet_login_config200_response.rb +147 -0
- data/lib/repull/models/get_booking_extranet_login_status200_response.rb +192 -0
- data/lib/repull/models/get_channel_health200_response.rb +190 -0
- data/lib/repull/models/get_channel_health200_response_vrbo.rb +197 -0
- data/lib/repull/models/get_connect_write_policy200_response.rb +166 -0
- data/lib/repull/models/get_listing_calendar_sync200_response.rb +192 -0
- data/lib/repull/models/get_listing_calendar_sync200_response_channels_inner.rb +331 -0
- data/lib/repull/models/get_listing_calendar_sync200_response_channels_inner_problems_inner.rb +157 -0
- data/lib/repull/models/get_listing_calendar_sync200_response_channels_inner_queue.rb +212 -0
- data/lib/repull/models/get_listing_calendar_sync200_response_channels_inner_queue_last_push.rb +268 -0
- data/lib/repull/models/invite_booking_extranet_user200_response.rb +174 -0
- data/lib/repull/models/invite_booking_extranet_user_request.rb +173 -0
- data/lib/repull/models/list_connection_units200_response.rb +242 -0
- data/lib/repull/models/list_connection_units200_response_listing_options_inner.rb +165 -0
- data/lib/repull/models/list_connection_units200_response_units_inner.rb +194 -0
- data/lib/repull/models/listing_publish_status_connection.rb +34 -1
- data/lib/repull/models/pms_write_policy.rb +191 -0
- data/lib/repull/models/pms_write_policy_calendar.rb +219 -0
- data/lib/repull/models/pms_write_policy_reservations.rb +219 -0
- data/lib/repull/models/preapprove_conversation201_response.rb +47 -6
- data/lib/repull/models/preapprove_conversation_request.rb +34 -5
- data/lib/repull/models/preview_conversation_special_offer_request.rb +231 -0
- data/lib/repull/models/preview_conversation_special_offer_request_fees_inner.rb +199 -0
- data/lib/repull/models/preview_conversation_special_offer_request_guests.rb +250 -0
- data/lib/repull/models/reply_to_review_request.rb +33 -4
- data/lib/repull/models/search_connect_session_listing_options200_response.rb +158 -0
- data/lib/repull/models/search_connect_session_listing_options200_response_data_inner.rb +166 -0
- data/lib/repull/models/search_connection_listing_options200_response.rb +159 -0
- data/lib/repull/models/send_message_request.rb +1 -1
- data/lib/repull/models/start_booking_extranet_login200_response.rb +174 -0
- data/lib/repull/models/start_booking_extranet_login_request.rb +225 -0
- data/lib/repull/models/submit_cloudbeds_credentials200_response.rb +10 -1
- data/lib/repull/models/submit_cloudbeds_credentials_request.rb +11 -1
- data/lib/repull/models/submit_mews_credentials200_response.rb +10 -1
- data/lib/repull/models/submit_mews_credentials_request.rb +11 -1
- data/lib/repull/models/update_connect_write_policy_request.rb +157 -0
- data/lib/repull/models/update_connect_write_policy_request_calendar.rb +165 -0
- data/lib/repull/models/update_connect_write_policy_request_reservations.rb +165 -0
- data/lib/repull/models/vrbo_import_status.rb +249 -0
- data/lib/repull/models/vrbo_login200_response.rb +235 -0
- data/lib/repull/models/vrbo_login_request.rb +271 -0
- data/lib/repull/models/withdraw_conversation_preapproval200_response.rb +226 -0
- data/lib/repull/models/withdraw_conversation_special_offer200_response.rb +29 -1
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +44 -0
- data/openapi/v1.json +4693 -2114
- data/scripts/regen.sh +1 -1
- metadata +46 -2
|
@@ -77,20 +77,20 @@ module Repull
|
|
|
77
77
|
end
|
|
78
78
|
|
|
79
79
|
# Per-channel connectivity health
|
|
80
|
-
# Reports reachability and auth state for one channel (`airbnb`, `booking`, `vrbo`, `plumguide`). Use it to tell \"the channel is down\" apart from \"this workspace's connection expired\".
|
|
80
|
+
# Reports reachability and auth state for one channel (`airbnb`, `booking`, `vrbo`, `plumguide`). Use it to tell \"the channel is down\" apart from \"this workspace's connection expired\". `200` when `status` is `ok`, `503` when `degraded` or `down` (the body's `status` and `message` say which and why). **`vrbo`** reports the connector's own signals in a `vrbo` block: connected accounts, accounts VRBO signed out (their bookings, messages and calendar stop until reconnected — `down`), accounts whose inbox sync is late (`degraded`), and the calendar push queue backlog and its oldest wait (`degraded` past 3 hours). Its rate is failed calendar pushes over finished ones in the last 3 hours (`vrbo.window_hours`; `refresh_attempts_24h` / `refresh_rejections_24h` count that window for VRBO), judged only once at least 50 pushes finished and at least 5 failed — VRBO pushes run in bursts, so a day-long window would keep reporting a problem already fixed.
|
|
81
81
|
# @param channel [String]
|
|
82
82
|
# @param [Hash] opts the optional parameters
|
|
83
|
-
# @return [
|
|
83
|
+
# @return [GetChannelHealth200Response]
|
|
84
84
|
def get_channel_health(channel, opts = {})
|
|
85
85
|
data, _status_code, _headers = get_channel_health_with_http_info(channel, opts)
|
|
86
86
|
data
|
|
87
87
|
end
|
|
88
88
|
|
|
89
89
|
# Per-channel connectivity health
|
|
90
|
-
# Reports reachability and auth state for one channel (`airbnb`, `booking`, `vrbo`, `plumguide`). Use it to tell \"the channel is down\" apart from \"this workspace's connection expired\".
|
|
90
|
+
# Reports reachability and auth state for one channel (`airbnb`, `booking`, `vrbo`, `plumguide`). Use it to tell \"the channel is down\" apart from \"this workspace's connection expired\". `200` when `status` is `ok`, `503` when `degraded` or `down` (the body's `status` and `message` say which and why). **`vrbo`** reports the connector's own signals in a `vrbo` block: connected accounts, accounts VRBO signed out (their bookings, messages and calendar stop until reconnected — `down`), accounts whose inbox sync is late (`degraded`), and the calendar push queue backlog and its oldest wait (`degraded` past 3 hours). Its rate is failed calendar pushes over finished ones in the last 3 hours (`vrbo.window_hours`; `refresh_attempts_24h` / `refresh_rejections_24h` count that window for VRBO), judged only once at least 50 pushes finished and at least 5 failed — VRBO pushes run in bursts, so a day-long window would keep reporting a problem already fixed.
|
|
91
91
|
# @param channel [String]
|
|
92
92
|
# @param [Hash] opts the optional parameters
|
|
93
|
-
# @return [Array<(
|
|
93
|
+
# @return [Array<(GetChannelHealth200Response, Integer, Hash)>] GetChannelHealth200Response data, response status code and response headers
|
|
94
94
|
def get_channel_health_with_http_info(channel, opts = {})
|
|
95
95
|
if @api_client.config.debugging
|
|
96
96
|
@api_client.config.logger.debug 'Calling API: HealthApi.get_channel_health ...'
|
|
@@ -122,7 +122,7 @@ module Repull
|
|
|
122
122
|
post_body = opts[:debug_body]
|
|
123
123
|
|
|
124
124
|
# return_type
|
|
125
|
-
return_type = opts[:debug_return_type] || '
|
|
125
|
+
return_type = opts[:debug_return_type] || 'GetChannelHealth200Response'
|
|
126
126
|
|
|
127
127
|
# auth_names
|
|
128
128
|
auth_names = opts[:debug_auth_names] || []
|
|
@@ -437,6 +437,69 @@ module Repull
|
|
|
437
437
|
return data, status_code, headers
|
|
438
438
|
end
|
|
439
439
|
|
|
440
|
+
# Calendar sync status per channel
|
|
441
|
+
# Is this listing's calendar — prices, minimum stays, availability — actually on every channel it is connected to, and if not, which nights and why. One shape for every channel. Every push records each night's outcome per channel; a night the channel does not show as sent is listed in `problems` with the channel's own reason (a price the channel still shows differently, a block it refused, a unit that is not live, a night held by a booking or an imported calendar). A later successful push clears it. **VRBO** pushes run through a paced queue — VRBO accepts about 90 calendar writes a minute per account, and only what differs on VRBO is sent — so the `vrbo` entry adds `queue`: whether a push is waiting or running now, and what the last one did (prices and minimum stays changed, blocks, calls, nights still differing). Future nights only. `problems` lists up to 100 nights per channel; `nightsWithProblems` is always the full count. Returns `403 listing_inactive` for an inactive listing.
|
|
442
|
+
# @param id [Integer] Repull listing id.
|
|
443
|
+
# @param [Hash] opts the optional parameters
|
|
444
|
+
# @return [GetListingCalendarSync200Response]
|
|
445
|
+
def get_listing_calendar_sync(id, opts = {})
|
|
446
|
+
data, _status_code, _headers = get_listing_calendar_sync_with_http_info(id, opts)
|
|
447
|
+
data
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
# Calendar sync status per channel
|
|
451
|
+
# Is this listing's calendar — prices, minimum stays, availability — actually on every channel it is connected to, and if not, which nights and why. One shape for every channel. Every push records each night's outcome per channel; a night the channel does not show as sent is listed in `problems` with the channel's own reason (a price the channel still shows differently, a block it refused, a unit that is not live, a night held by a booking or an imported calendar). A later successful push clears it. **VRBO** pushes run through a paced queue — VRBO accepts about 90 calendar writes a minute per account, and only what differs on VRBO is sent — so the `vrbo` entry adds `queue`: whether a push is waiting or running now, and what the last one did (prices and minimum stays changed, blocks, calls, nights still differing). Future nights only. `problems` lists up to 100 nights per channel; `nightsWithProblems` is always the full count. Returns `403 listing_inactive` for an inactive listing.
|
|
452
|
+
# @param id [Integer] Repull listing id.
|
|
453
|
+
# @param [Hash] opts the optional parameters
|
|
454
|
+
# @return [Array<(GetListingCalendarSync200Response, Integer, Hash)>] GetListingCalendarSync200Response data, response status code and response headers
|
|
455
|
+
def get_listing_calendar_sync_with_http_info(id, opts = {})
|
|
456
|
+
if @api_client.config.debugging
|
|
457
|
+
@api_client.config.logger.debug 'Calling API: ListingsApi.get_listing_calendar_sync ...'
|
|
458
|
+
end
|
|
459
|
+
# verify the required parameter 'id' is set
|
|
460
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
461
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ListingsApi.get_listing_calendar_sync"
|
|
462
|
+
end
|
|
463
|
+
# resource path
|
|
464
|
+
local_var_path = '/v1/listings/{id}/calendar-sync'.sub('{id}', CGI.escape(id.to_s))
|
|
465
|
+
|
|
466
|
+
# query parameters
|
|
467
|
+
query_params = opts[:query_params] || {}
|
|
468
|
+
|
|
469
|
+
# header parameters
|
|
470
|
+
header_params = opts[:header_params] || {}
|
|
471
|
+
# HTTP header 'Accept' (if needed)
|
|
472
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
473
|
+
|
|
474
|
+
# form parameters
|
|
475
|
+
form_params = opts[:form_params] || {}
|
|
476
|
+
|
|
477
|
+
# http body (model)
|
|
478
|
+
post_body = opts[:debug_body]
|
|
479
|
+
|
|
480
|
+
# return_type
|
|
481
|
+
return_type = opts[:debug_return_type] || 'GetListingCalendarSync200Response'
|
|
482
|
+
|
|
483
|
+
# auth_names
|
|
484
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
485
|
+
|
|
486
|
+
new_options = opts.merge(
|
|
487
|
+
:operation => :"ListingsApi.get_listing_calendar_sync",
|
|
488
|
+
:header_params => header_params,
|
|
489
|
+
:query_params => query_params,
|
|
490
|
+
:form_params => form_params,
|
|
491
|
+
:body => post_body,
|
|
492
|
+
:auth_names => auth_names,
|
|
493
|
+
:return_type => return_type
|
|
494
|
+
)
|
|
495
|
+
|
|
496
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
497
|
+
if @api_client.config.debugging
|
|
498
|
+
@api_client.config.logger.debug "API called: ListingsApi#get_listing_calendar_sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
499
|
+
end
|
|
500
|
+
return data, status_code, headers
|
|
501
|
+
end
|
|
502
|
+
|
|
440
503
|
# Get a listing's channel markups
|
|
441
504
|
# The markup each channel adds to this listing's price. A listing's price on a channel is its own nightly price plus the channel's markup: a $200 night with a 35% Airbnb markup is sent to Airbnb as $270. The calendar keeps the listing's own price (`GET /v1/availability/{propertyId}` returns it); the markup is added only when a price is sent to the channel. - **Airbnb** — one markup per listing. - **Booking.com** — one markup per **property**, shared by every listing priced through it (`listingIds` names them). Returns `404 not_found` for a listing that does not exist or is not in this workspace, and `403 listing_inactive` for an inactive one.
|
|
442
505
|
# @param id [String] Repull listing id.
|
|
@@ -1153,7 +1216,7 @@ module Repull
|
|
|
1153
1216
|
end
|
|
1154
1217
|
|
|
1155
1218
|
# Take a listing off the market
|
|
1156
|
-
# Stop this listing being sold, on every channel it is connected to, in one call. What that means differs per channel and you do not have to know which is which. On **Airbnb** the live listing is deactivated with a valid deactivation reason and then READ BACK — Airbnb accepts some deactivations and leaves the listing up, so \"we sent the request\" is never reported as success. On **Booking.com** there is no unlist at all; the equivalent is closing the room's availability across the whole forward window, which is what happens. **This is not the same as deactivating the listing in Repull.** The two get confused because both sound like removal, and they have opposite consequences: | | Take offline (this endpoint) | Deactivate in Repull (`PATCH /v1/listings/{id}` `{\"active\": false}`) | |---|---|---| | The guest-facing listing | **Stops taking bookings** | Stays live and keeps taking bookings | | Billing and plan limits | Unchanged | No longer billed, no longer counts toward the cap | | API access to the listing | Unchanged — you can still read and write it | `403 listing_inactive` until reactivated | | Reverse it with | `POST /v1/listings/{id}/online` | `PATCH /v1/listings/{id}` `{\"active\": true}` | | Data kept | Yes | Yes, and it keeps syncing | Neither one deletes anything, on either side. **The answer is per channel item.** A listing can sit on several Airbnb connections and a Booking.com property at once; they fail independently and a partial result is the ordinary outcome, so every item reports its own `state`, `code` and `message` and there is no top-level success flag to mislead you. Nothing is rolled back — re-send the same request to retry the items that did not land. **Booking.com ambiguity is reported, not fanned out.** A listing mapped to more than one active Booking.com property comes back with that item refused (`ambiguous_booking_mapping`) while the Airbnb items still run: closing the wrong property's availability takes real inventory off sale, and taking a listing off Airbnb is not less urgent because its Booking.com mapping is untidy. Name the property with `hotelId` and send it again. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1219
|
+
# Stop this listing being sold, on every channel it is connected to, in one call. What that means differs per channel and you do not have to know which is which. On **Airbnb** the live listing is deactivated with a valid deactivation reason and then READ BACK — Airbnb accepts some deactivations and leaves the listing up, so \"we sent the request\" is never reported as success. On **Booking.com** there is no unlist at all; the equivalent is closing the room's availability across the whole forward window, which is what happens. On **VRBO** each mapped unit is hidden (VRBO's own \"Hide listing\") and read back — a hidden unit is out of VRBO search and cannot be booked; its item carries the VRBO listing number as `platformId`. **This is not the same as deactivating the listing in Repull.** The two get confused because both sound like removal, and they have opposite consequences: | | Take offline (this endpoint) | Deactivate in Repull (`PATCH /v1/listings/{id}` `{\"active\": false}`) | |---|---|---| | The guest-facing listing | **Stops taking bookings** | Stays live and keeps taking bookings | | Billing and plan limits | Unchanged | No longer billed, no longer counts toward the cap | | API access to the listing | Unchanged — you can still read and write it | `403 listing_inactive` until reactivated | | Reverse it with | `POST /v1/listings/{id}/online` | `PATCH /v1/listings/{id}` `{\"active\": true}` | | Data kept | Yes | Yes, and it keeps syncing | Neither one deletes anything, on either side. **The answer is per channel item.** A listing can sit on several Airbnb connections and a Booking.com property at once; they fail independently and a partial result is the ordinary outcome, so every item reports its own `state`, `code` and `message` and there is no top-level success flag to mislead you. Nothing is rolled back — re-send the same request to retry the items that did not land. **Booking.com ambiguity is reported, not fanned out.** A listing mapped to more than one active Booking.com property comes back with that item refused (`ambiguous_booking_mapping`) while the Airbnb items still run: closing the wrong property's availability takes real inventory off sale, and taking a listing off Airbnb is not less urgent because its Booking.com mapping is untidy. Name the property with `hotelId` and send it again. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1157
1220
|
# @param id [Integer] Repull listing id.
|
|
1158
1221
|
# @param [Hash] opts the optional parameters
|
|
1159
1222
|
# @option opts [String] :hotel_id Booking.com property to act on, for a listing mapped to more than one. The query-string spelling of the body's `hotelId`; the body wins when both are sent.
|
|
@@ -1166,7 +1229,7 @@ module Repull
|
|
|
1166
1229
|
end
|
|
1167
1230
|
|
|
1168
1231
|
# Take a listing off the market
|
|
1169
|
-
# Stop this listing being sold, on every channel it is connected to, in one call. What that means differs per channel and you do not have to know which is which. On **Airbnb** the live listing is deactivated with a valid deactivation reason and then READ BACK — Airbnb accepts some deactivations and leaves the listing up, so \"we sent the request\" is never reported as success. On **Booking.com** there is no unlist at all; the equivalent is closing the room's availability across the whole forward window, which is what happens. **This is not the same as deactivating the listing in Repull.** The two get confused because both sound like removal, and they have opposite consequences: | | Take offline (this endpoint) | Deactivate in Repull (`PATCH /v1/listings/{id}` `{\"active\": false}`) | |---|---|---| | The guest-facing listing | **Stops taking bookings** | Stays live and keeps taking bookings | | Billing and plan limits | Unchanged | No longer billed, no longer counts toward the cap | | API access to the listing | Unchanged — you can still read and write it | `403 listing_inactive` until reactivated | | Reverse it with | `POST /v1/listings/{id}/online` | `PATCH /v1/listings/{id}` `{\"active\": true}` | | Data kept | Yes | Yes, and it keeps syncing | Neither one deletes anything, on either side. **The answer is per channel item.** A listing can sit on several Airbnb connections and a Booking.com property at once; they fail independently and a partial result is the ordinary outcome, so every item reports its own `state`, `code` and `message` and there is no top-level success flag to mislead you. Nothing is rolled back — re-send the same request to retry the items that did not land. **Booking.com ambiguity is reported, not fanned out.** A listing mapped to more than one active Booking.com property comes back with that item refused (`ambiguous_booking_mapping`) while the Airbnb items still run: closing the wrong property's availability takes real inventory off sale, and taking a listing off Airbnb is not less urgent because its Booking.com mapping is untidy. Name the property with `hotelId` and send it again. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1232
|
+
# Stop this listing being sold, on every channel it is connected to, in one call. What that means differs per channel and you do not have to know which is which. On **Airbnb** the live listing is deactivated with a valid deactivation reason and then READ BACK — Airbnb accepts some deactivations and leaves the listing up, so \"we sent the request\" is never reported as success. On **Booking.com** there is no unlist at all; the equivalent is closing the room's availability across the whole forward window, which is what happens. On **VRBO** each mapped unit is hidden (VRBO's own \"Hide listing\") and read back — a hidden unit is out of VRBO search and cannot be booked; its item carries the VRBO listing number as `platformId`. **This is not the same as deactivating the listing in Repull.** The two get confused because both sound like removal, and they have opposite consequences: | | Take offline (this endpoint) | Deactivate in Repull (`PATCH /v1/listings/{id}` `{\"active\": false}`) | |---|---|---| | The guest-facing listing | **Stops taking bookings** | Stays live and keeps taking bookings | | Billing and plan limits | Unchanged | No longer billed, no longer counts toward the cap | | API access to the listing | Unchanged — you can still read and write it | `403 listing_inactive` until reactivated | | Reverse it with | `POST /v1/listings/{id}/online` | `PATCH /v1/listings/{id}` `{\"active\": true}` | | Data kept | Yes | Yes, and it keeps syncing | Neither one deletes anything, on either side. **The answer is per channel item.** A listing can sit on several Airbnb connections and a Booking.com property at once; they fail independently and a partial result is the ordinary outcome, so every item reports its own `state`, `code` and `message` and there is no top-level success flag to mislead you. Nothing is rolled back — re-send the same request to retry the items that did not land. **Booking.com ambiguity is reported, not fanned out.** A listing mapped to more than one active Booking.com property comes back with that item refused (`ambiguous_booking_mapping`) while the Airbnb items still run: closing the wrong property's availability takes real inventory off sale, and taking a listing off Airbnb is not less urgent because its Booking.com mapping is untidy. Name the property with `hotelId` and send it again. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1170
1233
|
# @param id [Integer] Repull listing id.
|
|
1171
1234
|
# @param [Hash] opts the optional parameters
|
|
1172
1235
|
# @option opts [String] :hotel_id Booking.com property to act on, for a listing mapped to more than one. The query-string spelling of the body's `hotelId`; the body wins when both are sent.
|
|
@@ -1233,7 +1296,7 @@ module Repull
|
|
|
1233
1296
|
end
|
|
1234
1297
|
|
|
1235
1298
|
# Put a listing back on the market
|
|
1236
|
-
# Put this listing back on sale, on every channel it is connected to. The counterpart of `POST /v1/listings/{id}/offline`, which documents the per-item response and the difference between this and deactivating a listing in Repull. **It does not push content.** On **Airbnb** it re-enables sync and makes the listing available again; anything that changed while the listing was down is still unpublished, so follow with `POST /v1/listings/{id}/publish/airbnb` if the content moved. On **Booking.com** it re-syncs the true calendar rather than opening everything: dates that are genuinely blocked — a reservation, an owner stay — stay blocked, and only the closure `offline` wrote lifts. The two directions are not mirror images, and that is deliberate. **One asymmetry worth planning for.** Taking a listing down passes no billing gate; putting it back up goes through the channel-publish gate. So on a workspace whose subscription has lapsed, `offline` still works and this endpoint answers `402 payment_required` — a listing can be left off the market until billing is sorted out. That refusal is reported as a billing refusal with the action that fixes it, never as a channel error: retrying, or reconnecting the channel, does nothing for it. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1299
|
+
# Put this listing back on sale, on every channel it is connected to. The counterpart of `POST /v1/listings/{id}/offline`, which documents the per-item response and the difference between this and deactivating a listing in Repull. **It does not push content.** On **Airbnb** it re-enables sync and makes the listing available again; anything that changed while the listing was down is still unpublished, so follow with `POST /v1/listings/{id}/publish/airbnb` if the content moved. On **Booking.com** it re-syncs the true calendar rather than opening everything: dates that are genuinely blocked — a reservation, an owner stay — stay blocked, and only the closure `offline` wrote lifts. On **VRBO** each hidden unit is reactivated (VRBO's own \"Reactivate\") and read back; VRBO can refuse a reactivation (e.g. while it is verifying the property), which comes back as that item's `message`. The two directions are not mirror images, and that is deliberate. **One asymmetry worth planning for.** Taking a listing down passes no billing gate; putting it back up goes through the channel-publish gate. So on a workspace whose subscription has lapsed, `offline` still works and this endpoint answers `402 payment_required` — a listing can be left off the market until billing is sorted out. That refusal is reported as a billing refusal with the action that fixes it, never as a channel error: retrying, or reconnecting the channel, does nothing for it. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1237
1300
|
# @param id [Integer] Repull listing id.
|
|
1238
1301
|
# @param [Hash] opts the optional parameters
|
|
1239
1302
|
# @option opts [String] :hotel_id Booking.com property to act on, for a listing mapped to more than one. The query-string spelling of the body's `hotelId`; the body wins when both are sent.
|
|
@@ -1246,7 +1309,7 @@ module Repull
|
|
|
1246
1309
|
end
|
|
1247
1310
|
|
|
1248
1311
|
# Put a listing back on the market
|
|
1249
|
-
# Put this listing back on sale, on every channel it is connected to. The counterpart of `POST /v1/listings/{id}/offline`, which documents the per-item response and the difference between this and deactivating a listing in Repull. **It does not push content.** On **Airbnb** it re-enables sync and makes the listing available again; anything that changed while the listing was down is still unpublished, so follow with `POST /v1/listings/{id}/publish/airbnb` if the content moved. On **Booking.com** it re-syncs the true calendar rather than opening everything: dates that are genuinely blocked — a reservation, an owner stay — stay blocked, and only the closure `offline` wrote lifts. The two directions are not mirror images, and that is deliberate. **One asymmetry worth planning for.** Taking a listing down passes no billing gate; putting it back up goes through the channel-publish gate. So on a workspace whose subscription has lapsed, `offline` still works and this endpoint answers `402 payment_required` — a listing can be left off the market until billing is sorted out. That refusal is reported as a billing refusal with the action that fixes it, never as a channel error: retrying, or reconnecting the channel, does nothing for it. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1312
|
+
# Put this listing back on sale, on every channel it is connected to. The counterpart of `POST /v1/listings/{id}/offline`, which documents the per-item response and the difference between this and deactivating a listing in Repull. **It does not push content.** On **Airbnb** it re-enables sync and makes the listing available again; anything that changed while the listing was down is still unpublished, so follow with `POST /v1/listings/{id}/publish/airbnb` if the content moved. On **Booking.com** it re-syncs the true calendar rather than opening everything: dates that are genuinely blocked — a reservation, an owner stay — stay blocked, and only the closure `offline` wrote lifts. On **VRBO** each hidden unit is reactivated (VRBO's own \"Reactivate\") and read back; VRBO can refuse a reactivation (e.g. while it is verifying the property), which comes back as that item's `message`. The two directions are not mirror images, and that is deliberate. **One asymmetry worth planning for.** Taking a listing down passes no billing gate; putting it back up goes through the channel-publish gate. So on a workspace whose subscription has lapsed, `offline` still works and this endpoint answers `402 payment_required` — a listing can be left off the market until billing is sorted out. That refusal is reported as a billing refusal with the action that fixes it, never as a channel error: retrying, or reconnecting the channel, does nothing for it. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1250
1313
|
# @param id [Integer] Repull listing id.
|
|
1251
1314
|
# @param [Hash] opts the optional parameters
|
|
1252
1315
|
# @option opts [String] :hotel_id Booking.com property to act on, for a listing mapped to more than one. The query-string spelling of the body's `hotelId`; the body wins when both are sent.
|
|
@@ -217,7 +217,7 @@ module Repull
|
|
|
217
217
|
end
|
|
218
218
|
|
|
219
219
|
# Reply to a review on any channel
|
|
220
|
-
# Resolves the review, reads its channel and dispatches the reply. Channel-neutral: you do not need to know where the review came from. Replies work on Airbnb
|
|
220
|
+
# Resolves the review, reads its channel and dispatches the reply. Channel-neutral: you do not need to know where the review came from. Replies work on Airbnb, Booking.com and VRBO. Each channel accepts one reply per review (VRBO: a second is `409 already_replied`; a review VRBO no longer takes a response to is `409 reply_not_allowed`). On VRBO the response is signed with a name — the connected account's host name, or `name` if you send it. A review from a channel without a reply API returns `422 unsupported_channel` naming the channels that do work. To review a guest (Airbnb only), use `POST /v1/reviews/{id}/guest-review`. **Inactive listings:** a review of an inactive listing returns `403 listing_inactive` and no reply reaches the channel. Activate the listing first.
|
|
221
221
|
# @param id [Integer] Internal Repull review id.
|
|
222
222
|
# @param reply_to_review_request [ReplyToReviewRequest]
|
|
223
223
|
# @param [Hash] opts the optional parameters
|
|
@@ -228,7 +228,7 @@ module Repull
|
|
|
228
228
|
end
|
|
229
229
|
|
|
230
230
|
# Reply to a review on any channel
|
|
231
|
-
# Resolves the review, reads its channel and dispatches the reply. Channel-neutral: you do not need to know where the review came from. Replies work on Airbnb
|
|
231
|
+
# Resolves the review, reads its channel and dispatches the reply. Channel-neutral: you do not need to know where the review came from. Replies work on Airbnb, Booking.com and VRBO. Each channel accepts one reply per review (VRBO: a second is `409 already_replied`; a review VRBO no longer takes a response to is `409 reply_not_allowed`). On VRBO the response is signed with a name — the connected account's host name, or `name` if you send it. A review from a channel without a reply API returns `422 unsupported_channel` naming the channels that do work. To review a guest (Airbnb only), use `POST /v1/reviews/{id}/guest-review`. **Inactive listings:** a review of an inactive listing returns `403 listing_inactive` and no reply reaches the channel. Activate the listing first.
|
|
232
232
|
# @param id [Integer] Internal Repull review id.
|
|
233
233
|
# @param reply_to_review_request [ReplyToReviewRequest]
|
|
234
234
|
# @param [Hash] opts the optional parameters
|
|
@@ -0,0 +1,167 @@
|
|
|
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
|
+
|
|
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 ApplyConnectionMappings200Response < ApiModelBase
|
|
18
|
+
attr_accessor :connection_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :channel
|
|
21
|
+
|
|
22
|
+
attr_accessor :results
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'connection_id' => :'connection_id',
|
|
28
|
+
:'channel' => :'channel',
|
|
29
|
+
:'results' => :'results'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'connection_id' => :'String',
|
|
47
|
+
:'channel' => :'String',
|
|
48
|
+
:'results' => :'Array<ApplyConnectionMappings200ResponseResultsInner>'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# List of attributes with nullable: true
|
|
53
|
+
def self.openapi_nullable
|
|
54
|
+
Set.new([
|
|
55
|
+
])
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Initializes the object
|
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
60
|
+
def initialize(attributes = {})
|
|
61
|
+
if (!attributes.is_a?(Hash))
|
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ApplyConnectionMappings200Response` initialize method"
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
66
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
68
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ApplyConnectionMappings200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
70
|
+
end
|
|
71
|
+
h[k.to_sym] = v
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'connection_id')
|
|
75
|
+
self.connection_id = attributes[:'connection_id']
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'channel')
|
|
79
|
+
self.channel = attributes[:'channel']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'results')
|
|
83
|
+
if (value = attributes[:'results']).is_a?(Array)
|
|
84
|
+
self.results = value
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
90
|
+
# @return Array for valid properties with the reasons
|
|
91
|
+
def list_invalid_properties
|
|
92
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
93
|
+
invalid_properties = Array.new
|
|
94
|
+
invalid_properties
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Check to see if the all the properties in the model are valid
|
|
98
|
+
# @return true if the model is valid
|
|
99
|
+
def valid?
|
|
100
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
101
|
+
true
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Checks equality by comparing each attribute.
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def ==(o)
|
|
107
|
+
return true if self.equal?(o)
|
|
108
|
+
self.class == o.class &&
|
|
109
|
+
connection_id == o.connection_id &&
|
|
110
|
+
channel == o.channel &&
|
|
111
|
+
results == o.results
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# @see the `==` method
|
|
115
|
+
# @param [Object] Object to be compared
|
|
116
|
+
def eql?(o)
|
|
117
|
+
self == o
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Calculates hash code according to all attributes.
|
|
121
|
+
# @return [Integer] Hash code
|
|
122
|
+
def hash
|
|
123
|
+
[connection_id, channel, results].hash
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Builds the object from hash
|
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
128
|
+
# @return [Object] Returns the model itself
|
|
129
|
+
def self.build_from_hash(attributes)
|
|
130
|
+
return nil unless attributes.is_a?(Hash)
|
|
131
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
132
|
+
transformed_hash = {}
|
|
133
|
+
openapi_types.each_pair do |key, type|
|
|
134
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
135
|
+
transformed_hash["#{key}"] = nil
|
|
136
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
137
|
+
# check to ensure the input is an array given that the attribute
|
|
138
|
+
# is documented as an array but the input is not
|
|
139
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
140
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
141
|
+
end
|
|
142
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
143
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
new(transformed_hash)
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Returns the object in the form of hash
|
|
150
|
+
# @return [Hash] Returns the object in the form of hash
|
|
151
|
+
def to_hash
|
|
152
|
+
hash = {}
|
|
153
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
154
|
+
value = self.send(attr)
|
|
155
|
+
if value.nil?
|
|
156
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
157
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
hash[param] = _to_hash(value)
|
|
161
|
+
end
|
|
162
|
+
hash
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
end
|
|
@@ -0,0 +1,184 @@
|
|
|
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
|
+
|
|
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 ApplyConnectionMappings200ResponseResultsInner < ApiModelBase
|
|
18
|
+
attr_accessor :unit_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :listing_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :created
|
|
23
|
+
|
|
24
|
+
attr_accessor :ok
|
|
25
|
+
|
|
26
|
+
attr_accessor :error
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'unit_id' => :'unit_id',
|
|
32
|
+
:'listing_id' => :'listing_id',
|
|
33
|
+
:'created' => :'created',
|
|
34
|
+
:'ok' => :'ok',
|
|
35
|
+
:'error' => :'error'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns attribute mapping this model knows about
|
|
40
|
+
def self.acceptable_attribute_map
|
|
41
|
+
attribute_map
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
acceptable_attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'unit_id' => :'String',
|
|
53
|
+
:'listing_id' => :'Integer',
|
|
54
|
+
:'created' => :'Boolean',
|
|
55
|
+
:'ok' => :'Boolean',
|
|
56
|
+
:'error' => :'String'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
:'listing_id',
|
|
64
|
+
])
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Initializes the object
|
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
69
|
+
def initialize(attributes = {})
|
|
70
|
+
if (!attributes.is_a?(Hash))
|
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::ApplyConnectionMappings200ResponseResultsInner` initialize method"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
75
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
76
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
77
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
78
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::ApplyConnectionMappings200ResponseResultsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
79
|
+
end
|
|
80
|
+
h[k.to_sym] = v
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'unit_id')
|
|
84
|
+
self.unit_id = attributes[:'unit_id']
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'listing_id')
|
|
88
|
+
self.listing_id = attributes[:'listing_id']
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'created')
|
|
92
|
+
self.created = attributes[:'created']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'ok')
|
|
96
|
+
self.ok = attributes[:'ok']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'error')
|
|
100
|
+
self.error = attributes[:'error']
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
105
|
+
# @return Array for valid properties with the reasons
|
|
106
|
+
def list_invalid_properties
|
|
107
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
108
|
+
invalid_properties = Array.new
|
|
109
|
+
invalid_properties
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Check to see if the all the properties in the model are valid
|
|
113
|
+
# @return true if the model is valid
|
|
114
|
+
def valid?
|
|
115
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
116
|
+
true
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Checks equality by comparing each attribute.
|
|
120
|
+
# @param [Object] Object to be compared
|
|
121
|
+
def ==(o)
|
|
122
|
+
return true if self.equal?(o)
|
|
123
|
+
self.class == o.class &&
|
|
124
|
+
unit_id == o.unit_id &&
|
|
125
|
+
listing_id == o.listing_id &&
|
|
126
|
+
created == o.created &&
|
|
127
|
+
ok == o.ok &&
|
|
128
|
+
error == o.error
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# @see the `==` method
|
|
132
|
+
# @param [Object] Object to be compared
|
|
133
|
+
def eql?(o)
|
|
134
|
+
self == o
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Calculates hash code according to all attributes.
|
|
138
|
+
# @return [Integer] Hash code
|
|
139
|
+
def hash
|
|
140
|
+
[unit_id, listing_id, created, ok, error].hash
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Builds the object from hash
|
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
145
|
+
# @return [Object] Returns the model itself
|
|
146
|
+
def self.build_from_hash(attributes)
|
|
147
|
+
return nil unless attributes.is_a?(Hash)
|
|
148
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
149
|
+
transformed_hash = {}
|
|
150
|
+
openapi_types.each_pair do |key, type|
|
|
151
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
152
|
+
transformed_hash["#{key}"] = nil
|
|
153
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
154
|
+
# check to ensure the input is an array given that the attribute
|
|
155
|
+
# is documented as an array but the input is not
|
|
156
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
157
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
158
|
+
end
|
|
159
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
new(transformed_hash)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Returns the object in the form of hash
|
|
167
|
+
# @return [Hash] Returns the object in the form of hash
|
|
168
|
+
def to_hash
|
|
169
|
+
hash = {}
|
|
170
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
171
|
+
value = self.send(attr)
|
|
172
|
+
if value.nil?
|
|
173
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
174
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
hash[param] = _to_hash(value)
|
|
178
|
+
end
|
|
179
|
+
hash
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
end
|