Class: Repull::ListingsApi
- Inherits:
-
Object
- Object
- Repull::ListingsApi
- Defined in:
- lib/repull/api/listings_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_listing(listing_create_request, opts = {}) ⇒ ListingCreateResponse
Create a Repull listing Create a new vacation-rental listing under the authenticated workspace.
-
#create_listing_with_http_info(listing_create_request, opts = {}) ⇒ Array<(ListingCreateResponse, Integer, Hash)>
Create a Repull listing Create a new vacation-rental listing under the authenticated workspace.
-
#generate_listing_content(id, opts = {}) ⇒ ListingGenerateContentResponse
AI-generate listing content Generate guest-facing copy (title, summary, description, amenities, etc.) for a listing using Repull AI.
-
#generate_listing_content_with_http_info(id, opts = {}) ⇒ Array<(ListingGenerateContentResponse, Integer, Hash)>
AI-generate listing content Generate guest-facing copy (title, summary, description, amenities, etc.) for a listing using Repull AI.
-
#get_listing(id, opts = {}) ⇒ Listing
Get a listing Fetch a single listing by id.
-
#get_listing_publish_status(id, opts = {}) ⇒ ListingPublishStatusResponse
Per-channel publish status Returns connection state and sync activity per channel.
-
#get_listing_publish_status_with_http_info(id, opts = {}) ⇒ Array<(ListingPublishStatusResponse, Integer, Hash)>
Per-channel publish status Returns connection state and sync activity per channel.
-
#get_listing_with_http_info(id, opts = {}) ⇒ Array<(Listing, Integer, Hash)>
Get a listing Fetch a single listing by id.
-
#initialize(api_client = ApiClient.default) ⇒ ListingsApi
constructor
A new instance of ListingsApi.
-
#list_listings(opts = {}) ⇒ ListingListResponse
List listings Cursor-paginated list of listings owned by the authenticated workspace.
-
#list_listings_with_http_info(opts = {}) ⇒ Array<(ListingListResponse, Integer, Hash)>
List listings Cursor-paginated list of listings owned by the authenticated workspace.
-
#publish_listing_to_airbnb(id, opts = {}) ⇒ ListingPublishResponse
Publish a listing to Airbnb Push a Repull listing to Airbnb.
-
#publish_listing_to_airbnb_with_http_info(id, opts = {}) ⇒ Array<(ListingPublishResponse, Integer, Hash)>
Publish a listing to Airbnb Push a Repull listing to Airbnb.
-
#publish_listing_to_booking(id, opts = {}) ⇒ ListingPublishResponse
Publish a listing to Booking.com Push a Repull listing to Booking.com.
-
#publish_listing_to_booking_with_http_info(id, opts = {}) ⇒ Array<(ListingPublishResponse, Integer, Hash)>
Publish a listing to Booking.com Push a Repull listing to Booking.com.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ListingsApi
Returns a new instance of ListingsApi.
19 20 21 |
# File 'lib/repull/api/listings_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/repull/api/listings_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_listing(listing_create_request, opts = {}) ⇒ ListingCreateResponse
Create a Repull listing Create a new vacation-rental listing under the authenticated workspace. The listing is stored in the canonical Vanio listings tables and can be published to multiple channels (Airbnb, Booking.com) via the publish endpoints.
27 28 29 30 |
# File 'lib/repull/api/listings_api.rb', line 27 def create_listing(listing_create_request, opts = {}) data, _status_code, _headers = create_listing_with_http_info(listing_create_request, opts) data end |
#create_listing_with_http_info(listing_create_request, opts = {}) ⇒ Array<(ListingCreateResponse, Integer, Hash)>
Create a Repull listing Create a new vacation-rental listing under the authenticated workspace. The listing is stored in the canonical Vanio listings tables and can be published to multiple channels (Airbnb, Booking.com) via the publish endpoints.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/repull/api/listings_api.rb', line 37 def create_listing_with_http_info(listing_create_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ListingsApi.create_listing ...' end # verify the required parameter 'listing_create_request' is set if @api_client.config.client_side_validation && listing_create_request.nil? fail ArgumentError, "Missing the required parameter 'listing_create_request' when calling ListingsApi.create_listing" end # resource path local_var_path = '/v1/listings' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(listing_create_request) # return_type return_type = opts[:debug_return_type] || 'ListingCreateResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ListingsApi.create_listing", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ListingsApi#create_listing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#generate_listing_content(id, opts = {}) ⇒ ListingGenerateContentResponse
AI-generate listing content Generate guest-facing copy (title, summary, description, amenities, etc.) for a listing using Repull AI. When ‘photos` are provided the vision model is used for photo-grounded copy. Persists into the listing by default.
96 97 98 99 |
# File 'lib/repull/api/listings_api.rb', line 96 def generate_listing_content(id, opts = {}) data, _status_code, _headers = generate_listing_content_with_http_info(id, opts) data end |
#generate_listing_content_with_http_info(id, opts = {}) ⇒ Array<(ListingGenerateContentResponse, Integer, Hash)>
AI-generate listing content Generate guest-facing copy (title, summary, description, amenities, etc.) for a listing using Repull AI. When `photos` are provided the vision model is used for photo-grounded copy. Persists into the listing by default.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/repull/api/listings_api.rb', line 107 def generate_listing_content_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ListingsApi.generate_listing_content ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ListingsApi.generate_listing_content" end # resource path local_var_path = '/v1/listings/{id}/generate-content'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'listing_generate_content_request']) # return_type return_type = opts[:debug_return_type] || 'ListingGenerateContentResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ListingsApi.generate_listing_content", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ListingsApi#generate_listing_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_listing(id, opts = {}) ⇒ Listing
Get a listing Fetch a single listing by id. Returns the same shape as one element of the ‘GET /v1/listings` response, so you can bind the result to the same model. Cross-tenant access (a listing that belongs to a different workspace) returns 404 — never 403, never reveals the listing’s existence. **Optional expansions:** Pass ‘?include=amenities` to enrich the response with the listing’s amenity rows (‘[]` when the listing has none). Pass `?include=content` for the rich content slab (summary, description, space, house rules, etc. — sourced from `listings_descriptions` for the `en` locale; `null` when no row is stored). Pass `?include=details` for the structural slab (bedrooms, bathrooms, person capacity, check-in window, wifi, house manual, etc.; `null` when no row is stored). Combine comma-separated, e.g. `?include=amenities,content,details`. The default response stays lean; consumers must opt in.
167 168 169 170 |
# File 'lib/repull/api/listings_api.rb', line 167 def get_listing(id, opts = {}) data, _status_code, _headers = get_listing_with_http_info(id, opts) data end |
#get_listing_publish_status(id, opts = {}) ⇒ ListingPublishStatusResponse
Per-channel publish status Returns connection state and sync activity per channel. ‘channels` is sync activity (empty until first push). `connections` is connection state (populated as soon as a channel is linked). Recommended polling cadence: at most once per 30s per listing — for bulk views, prefer `GET /v1/listings` and filter client-side.
234 235 236 237 |
# File 'lib/repull/api/listings_api.rb', line 234 def get_listing_publish_status(id, opts = {}) data, _status_code, _headers = get_listing_publish_status_with_http_info(id, opts) data end |
#get_listing_publish_status_with_http_info(id, opts = {}) ⇒ Array<(ListingPublishStatusResponse, Integer, Hash)>
Per-channel publish status Returns connection state and sync activity per channel. `channels` is sync activity (empty until first push). `connections` is connection state (populated as soon as a channel is linked). Recommended polling cadence: at most once per 30s per listing — for bulk views, prefer `GET /v1/listings` and filter client-side.
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 |
# File 'lib/repull/api/listings_api.rb', line 244 def get_listing_publish_status_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ListingsApi.get_listing_publish_status ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ListingsApi.get_listing_publish_status" end # resource path local_var_path = '/v1/listings/{id}/publish-status'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListingPublishStatusResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ListingsApi.get_listing_publish_status", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ListingsApi#get_listing_publish_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_listing_with_http_info(id, opts = {}) ⇒ Array<(Listing, Integer, Hash)>
Get a listing Fetch a single listing by id. Returns the same shape as one element of the `GET /v1/listings` response, so you can bind the result to the same model. Cross-tenant access (a listing that belongs to a different workspace) returns 404 — never 403, never reveals the listing's existence. **Optional expansions:** Pass `?include=amenities` to enrich the response with the listing's amenity rows (`[]` when the listing has none). Pass `?include=content` for the rich content slab (summary, description, space, house rules, etc. — sourced from `listings_descriptions` for the `en` locale; `null` when no row is stored). Pass `?include=details` for the structural slab (bedrooms, bathrooms, person capacity, check-in window, wifi, house manual, etc.; `null` when no row is stored). Combine comma-separated, e.g. `?include=amenities,content,details`. The default response stays lean; consumers must opt in.
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/repull/api/listings_api.rb', line 179 def get_listing_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ListingsApi.get_listing ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ListingsApi.get_listing" end # resource path local_var_path = '/v1/listings/{id}'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'X-Schema'] = opts[:'x_schema'] if !opts[:'x_schema'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Listing' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ListingsApi.get_listing", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ListingsApi#get_listing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_listings(opts = {}) ⇒ ListingListResponse
List listings Cursor-paginated list of listings owned by the authenticated workspace. Use ‘pagination.nextCursor` from one response as the `cursor` query param of the next request to walk the full set. `?offset=` is also accepted as a first-class alias for shallow paging (0..10000) — see the `offset` parameter below. Mutually exclusive with `cursor`. Filters: `q` (substring on name/street/city), `status`, `channel`. **Optional expansions:** Pass `?include=content` to enrich each row with the rich content slab (summary, description, space, house rules, etc. — sourced from `listings_descriptions` for the `en` locale). Pass `?include=details` for the structural slab (bedrooms, bathrooms, person capacity, check-in window, wifi, house manual, etc.). Both default to `null` per row when the underlying `listings_descriptions` / `listings_details` row is missing — distinct from the field being absent (which signals the expansion was not requested). Combine comma-separated, e.g. `?include=content,details`. The default response stays lean; consumers must opt in.
304 305 306 307 |
# File 'lib/repull/api/listings_api.rb', line 304 def list_listings(opts = {}) data, _status_code, _headers = list_listings_with_http_info(opts) data end |
#list_listings_with_http_info(opts = {}) ⇒ Array<(ListingListResponse, Integer, Hash)>
List listings Cursor-paginated list of listings owned by the authenticated workspace. Use `pagination.nextCursor` from one response as the `cursor` query param of the next request to walk the full set. `?offset=` is also accepted as a first-class alias for shallow paging (0..10000) — see the `offset` parameter below. Mutually exclusive with `cursor`. Filters: `q` (substring on name/street/city), `status`, `channel`. **Optional expansions:** Pass `?include=content` to enrich each row with the rich content slab (summary, description, space, house rules, etc. — sourced from `listings_descriptions` for the `en` locale). Pass `?include=details` for the structural slab (bedrooms, bathrooms, person capacity, check-in window, wifi, house manual, etc.). Both default to `null` per row when the underlying `listings_descriptions` / `listings_details` row is missing — distinct from the field being absent (which signals the expansion was not requested). Combine comma-separated, e.g. `?include=content,details`. The default response stays lean; consumers must opt in.
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 |
# File 'lib/repull/api/listings_api.rb', line 321 def list_listings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ListingsApi.list_listings ...' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] > 10000 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling ListingsApi.list_listings, must be smaller than or equal to 10000.' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling ListingsApi.list_listings, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ListingsApi.list_listings, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ListingsApi.list_listings, must be greater than or equal to 1.' end allowable_values = ["active", "inactive", "archived"] if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" end # resource path local_var_path = '/v1/listings' # query parameters query_params = opts[:query_params] || {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'channel'] = opts[:'channel'] if !opts[:'channel'].nil? query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'X-Schema'] = opts[:'x_schema'] if !opts[:'x_schema'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListingListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ListingsApi.list_listings", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ListingsApi#list_listings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#publish_listing_to_airbnb(id, opts = {}) ⇒ ListingPublishResponse
Publish a listing to Airbnb Push a Repull listing to Airbnb. Pass ‘airbnbConnectionId` to update an already-mapped Airbnb listing, or `hostId` to create a brand-new Airbnb listing under that host.
399 400 401 402 |
# File 'lib/repull/api/listings_api.rb', line 399 def publish_listing_to_airbnb(id, opts = {}) data, _status_code, _headers = publish_listing_to_airbnb_with_http_info(id, opts) data end |
#publish_listing_to_airbnb_with_http_info(id, opts = {}) ⇒ Array<(ListingPublishResponse, Integer, Hash)>
Publish a listing to Airbnb Push a Repull listing to Airbnb. Pass `airbnbConnectionId` to update an already-mapped Airbnb listing, or `hostId` to create a brand-new Airbnb listing under that host.
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 |
# File 'lib/repull/api/listings_api.rb', line 410 def publish_listing_to_airbnb_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ListingsApi.publish_listing_to_airbnb ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ListingsApi.publish_listing_to_airbnb" end # resource path local_var_path = '/v1/listings/{id}/publish/airbnb'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'listing_publish_airbnb_request']) # return_type return_type = opts[:debug_return_type] || 'ListingPublishResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ListingsApi.publish_listing_to_airbnb", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ListingsApi#publish_listing_to_airbnb\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#publish_listing_to_booking(id, opts = {}) ⇒ ListingPublishResponse
Publish a listing to Booking.com Push a Repull listing to Booking.com. The listing must already be mapped to a Booking property + room (created via the Booking-claim Connect flow).
468 469 470 471 |
# File 'lib/repull/api/listings_api.rb', line 468 def publish_listing_to_booking(id, opts = {}) data, _status_code, _headers = publish_listing_to_booking_with_http_info(id, opts) data end |
#publish_listing_to_booking_with_http_info(id, opts = {}) ⇒ Array<(ListingPublishResponse, Integer, Hash)>
Publish a listing to Booking.com Push a Repull listing to Booking.com. The listing must already be mapped to a Booking property + room (created via the Booking-claim Connect flow).
478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/repull/api/listings_api.rb', line 478 def publish_listing_to_booking_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ListingsApi.publish_listing_to_booking ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling ListingsApi.publish_listing_to_booking" end # resource path local_var_path = '/v1/listings/{id}/publish/booking'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListingPublishResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"ListingsApi.publish_listing_to_booking", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ListingsApi#publish_listing_to_booking\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |