asdawqw 2.1.1
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 +7 -0
- data/LICENSE +28 -0
- data/README.md +1751 -0
- data/lib/asdawqw.rb +194 -0
- data/lib/asdawqw/api_helper.rb +275 -0
- data/lib/asdawqw/asdawqw_client.rb +119 -0
- data/lib/asdawqw/configuration.rb +69 -0
- data/lib/asdawqw/controllers/asynchronous_push_messages_controller.rb +54 -0
- data/lib/asdawqw/controllers/authorization_controller.rb +63 -0
- data/lib/asdawqw/controllers/base_controller.rb +51 -0
- data/lib/asdawqw/controllers/fee_and_tax_controller.rb +92 -0
- data/lib/asdawqw/controllers/fee_and_tax_mandatory_at_the_property_level_controller.rb +112 -0
- data/lib/asdawqw/controllers/images_controller.rb +152 -0
- data/lib/asdawqw/controllers/los_pricing_controller.rb +108 -0
- data/lib/asdawqw/controllers/messaging_controller.rb +133 -0
- data/lib/asdawqw/controllers/product_controller.rb +281 -0
- data/lib/asdawqw/controllers/property_managers_controller.rb +168 -0
- data/lib/asdawqw/controllers/push_notification_controller.rb +80 -0
- data/lib/asdawqw/controllers/rates_and_availability_controller.rb +101 -0
- data/lib/asdawqw/controllers/request_to_book_controller.rb +158 -0
- data/lib/asdawqw/controllers/reservation_notifications_controller.rb +160 -0
- data/lib/asdawqw/controllers/testing_of_message_api_calls_controller.rb +155 -0
- data/lib/asdawqw/controllers/validation_controller.rb +105 -0
- data/lib/asdawqw/controllers/yields_controller.rb +106 -0
- data/lib/asdawqw/exceptions/api_exception.rb +20 -0
- data/lib/asdawqw/http/auth/custom_query_auth.rb +16 -0
- data/lib/asdawqw/http/faraday_client.rb +64 -0
- data/lib/asdawqw/http/http_call_back.rb +24 -0
- data/lib/asdawqw/http/http_client.rb +104 -0
- data/lib/asdawqw/http/http_context.rb +20 -0
- data/lib/asdawqw/http/http_method_enum.rb +13 -0
- data/lib/asdawqw/http/http_request.rb +50 -0
- data/lib/asdawqw/http/http_response.rb +23 -0
- data/lib/asdawqw/models/allowed_pets_type_enum.rb +20 -0
- data/lib/asdawqw/models/amenity_types_enum.rb +1817 -0
- data/lib/asdawqw/models/api_response_without_data.rb +62 -0
- data/lib/asdawqw/models/asynchronous_push_message_type_enum.rb +14 -0
- data/lib/asdawqw/models/asynchronous_validation_model.rb +53 -0
- data/lib/asdawqw/models/attributes_with_quantity.rb +44 -0
- data/lib/asdawqw/models/authorization.rb +119 -0
- data/lib/asdawqw/models/availability_model.rb +61 -0
- data/lib/asdawqw/models/available_count.rb +55 -0
- data/lib/asdawqw/models/available_internet_enum.rb +20 -0
- data/lib/asdawqw/models/base_model.rb +36 -0
- data/lib/asdawqw/models/bed.rb +44 -0
- data/lib/asdawqw/models/bed_configuration_enum.rb +59 -0
- data/lib/asdawqw/models/bedroom.rb +53 -0
- data/lib/asdawqw/models/bedroom_configuration.rb +42 -0
- data/lib/asdawqw/models/bedroom_type_enum.rb +17 -0
- data/lib/asdawqw/models/beds.rb +42 -0
- data/lib/asdawqw/models/cancel_reservation_notification_object.rb +181 -0
- data/lib/asdawqw/models/cancellation_policy.rb +45 -0
- data/lib/asdawqw/models/cancellation_policy_type_enum.rb +20 -0
- data/lib/asdawqw/models/channel_abb_enum.rb +26 -0
- data/lib/asdawqw/models/check_in.rb +89 -0
- data/lib/asdawqw/models/check_out.rb +89 -0
- data/lib/asdawqw/models/company.rb +63 -0
- data/lib/asdawqw/models/company_address.rb +71 -0
- data/lib/asdawqw/models/company_details.rb +122 -0
- data/lib/asdawqw/models/create_and_update_los_request.rb +35 -0
- data/lib/asdawqw/models/create_and_update_rates_and_availability_request.rb +35 -0
- data/lib/asdawqw/models/create_fee_and_tax_request.rb +35 -0
- data/lib/asdawqw/models/create_images_request.rb +35 -0
- data/lib/asdawqw/models/create_new_update_property_manager_request.rb +35 -0
- data/lib/asdawqw/models/create_update_property_request.rb +35 -0
- data/lib/asdawqw/models/create_yield_request.rb +35 -0
- data/lib/asdawqw/models/credit_card.rb +58 -0
- data/lib/asdawqw/models/credit_card_list_enum.rb +26 -0
- data/lib/asdawqw/models/credit_card_type_enum.rb +17 -0
- data/lib/asdawqw/models/delete_list_of_images_request.rb +35 -0
- data/lib/asdawqw/models/deposit_type_enum.rb +20 -0
- data/lib/asdawqw/models/description_text_model.rb +42 -0
- data/lib/asdawqw/models/fee.rb +126 -0
- data/lib/asdawqw/models/fee_entity_type_enum.rb +20 -0
- data/lib/asdawqw/models/fee_tax.rb +67 -0
- data/lib/asdawqw/models/fee_tax_mandatory.rb +48 -0
- data/lib/asdawqw/models/fee_tax_mandatory_setting.rb +53 -0
- data/lib/asdawqw/models/fee_tax_response.rb +78 -0
- data/lib/asdawqw/models/fee_tax_type_enum.rb +17 -0
- data/lib/asdawqw/models/fee_tax_validation_setting_response.rb +78 -0
- data/lib/asdawqw/models/fee_tax_validation_settings.rb +42 -0
- data/lib/asdawqw/models/fee_type_enum.rb +20 -0
- data/lib/asdawqw/models/fee_unit_enum.rb +26 -0
- data/lib/asdawqw/models/fee_value_type_enum.rb +17 -0
- data/lib/asdawqw/models/functions_request_to_book.rb +66 -0
- data/lib/asdawqw/models/functions_request_to_book_test.rb +44 -0
- data/lib/asdawqw/models/get_image_list_by_product_id.rb +78 -0
- data/lib/asdawqw/models/get_message_list_for_specific_thread_response.rb +78 -0
- data/lib/asdawqw/models/get_message_threads_response.rb +78 -0
- data/lib/asdawqw/models/get_pms_list.rb +78 -0
- data/lib/asdawqw/models/image.rb +64 -0
- data/lib/asdawqw/models/image_tags_enum.rb +419 -0
- data/lib/asdawqw/models/image_url_for_create.rb +44 -0
- data/lib/asdawqw/models/image_url_list.rb +51 -0
- data/lib/asdawqw/models/internet_policy.rb +62 -0
- data/lib/asdawqw/models/kind_of_internet_type_enum.rb +17 -0
- data/lib/asdawqw/models/located_parking_type_enum.rb +17 -0
- data/lib/asdawqw/models/location.rb +80 -0
- data/lib/asdawqw/models/los_rate.rb +68 -0
- data/lib/asdawqw/models/los_rates_product.rb +51 -0
- data/lib/asdawqw/models/los_rates_response.rb +78 -0
- data/lib/asdawqw/models/manual_policies.rb +53 -0
- data/lib/asdawqw/models/manual_policy.rb +51 -0
- data/lib/asdawqw/models/manual_policy_type_enum.rb +17 -0
- data/lib/asdawqw/models/max_stay_model.rb +55 -0
- data/lib/asdawqw/models/message_model.rb +53 -0
- data/lib/asdawqw/models/message_request_from_supplier.rb +44 -0
- data/lib/asdawqw/models/messages_model.rb +42 -0
- data/lib/asdawqw/models/min_stay_model.rb +55 -0
- data/lib/asdawqw/models/multi_unit_enum.rb +17 -0
- data/lib/asdawqw/models/myield.rb +84 -0
- data/lib/asdawqw/models/nearby_amenities_enum.rb +26 -0
- data/lib/asdawqw/models/nearby_amenity.rb +45 -0
- data/lib/asdawqw/models/notes.rb +79 -0
- data/lib/asdawqw/models/parking_policy.rb +81 -0
- data/lib/asdawqw/models/payment.rb +46 -0
- data/lib/asdawqw/models/payment_gateways.rb +84 -0
- data/lib/asdawqw/models/payment_gateways_type_enum.rb +35 -0
- data/lib/asdawqw/models/payment_policy.rb +46 -0
- data/lib/asdawqw/models/payment_policy_type_enum.rb +18 -0
- data/lib/asdawqw/models/payment_type_enum.rb +20 -0
- data/lib/asdawqw/models/pet_policy.rb +44 -0
- data/lib/asdawqw/models/phone.rb +44 -0
- data/lib/asdawqw/models/pms.rb +62 -0
- data/lib/asdawqw/models/policies.rb +94 -0
- data/lib/asdawqw/models/policy.rb +73 -0
- data/lib/asdawqw/models/post_new_message_for_specific_thread_request.rb +36 -0
- data/lib/asdawqw/models/product_response.rb +78 -0
- data/lib/asdawqw/models/property.rb +345 -0
- data/lib/asdawqw/models/property_list_request.rb +36 -0
- data/lib/asdawqw/models/property_manager_details_response.rb +78 -0
- data/lib/asdawqw/models/property_types_enum.rb +206 -0
- data/lib/asdawqw/models/push_notification_links_model.rb +62 -0
- data/lib/asdawqw/models/push_notification_links_request.rb +36 -0
- data/lib/asdawqw/models/push_notification_links_response.rb +78 -0
- data/lib/asdawqw/models/rate.rb +56 -0
- data/lib/asdawqw/models/rates_availability.rb +142 -0
- data/lib/asdawqw/models/rates_availability_response.rb +80 -0
- data/lib/asdawqw/models/request_to_book_answer_from_pms_request.rb +35 -0
- data/lib/asdawqw/models/request_to_book_cancel_request_model.rb +44 -0
- data/lib/asdawqw/models/request_to_book_decline_reason_type_enum.rb +23 -0
- data/lib/asdawqw/models/request_to_book_request_model.rb +74 -0
- data/lib/asdawqw/models/request_to_book_test_action_enum.rb +18 -0
- data/lib/asdawqw/models/request_to_book_test_request.rb +36 -0
- data/lib/asdawqw/models/request_to_book_type_enum.rb +17 -0
- data/lib/asdawqw/models/reservation_commissions_notification_model.rb +44 -0
- data/lib/asdawqw/models/reservation_fee_notification_model.rb +53 -0
- data/lib/asdawqw/models/reservation_get_response.rb +78 -0
- data/lib/asdawqw/models/reservation_notification_object.rb +315 -0
- data/lib/asdawqw/models/reservation_parking_type_enum.rb +20 -0
- data/lib/asdawqw/models/reservation_push_response.rb +74 -0
- data/lib/asdawqw/models/reservation_rate_notifcation_model.rb +55 -0
- data/lib/asdawqw/models/reservation_tax_notification_model.rb +53 -0
- data/lib/asdawqw/models/restriction.rb +64 -0
- data/lib/asdawqw/models/set_fee_and_tax_validation_setting_request.rb +36 -0
- data/lib/asdawqw/models/space_unit_enum.rb +17 -0
- data/lib/asdawqw/models/split_payment.rb +53 -0
- data/lib/asdawqw/models/taxes.rb +62 -0
- data/lib/asdawqw/models/taxis_type_enum.rb +17 -0
- data/lib/asdawqw/models/text.rb +46 -0
- data/lib/asdawqw/models/thread.rb +125 -0
- data/lib/asdawqw/models/threads_model.rb +42 -0
- data/lib/asdawqw/models/time_cost_parking_enum.rb +23 -0
- data/lib/asdawqw/models/transport_yield.rb +97 -0
- data/lib/asdawqw/models/type_enum.rb +20 -0
- data/lib/asdawqw/models/user_enum.rb +17 -0
- data/lib/asdawqw/models/validation_asynchronous_push_message_request.rb +61 -0
- data/lib/asdawqw/models/validation_for_list_of_properties_request.rb +35 -0
- data/lib/asdawqw/models/validation_property_i_ds_list.rb +35 -0
- data/lib/asdawqw/models/weekend_param_enum.rb +26 -0
- data/lib/asdawqw/models/yield_modifier_enum.rb +23 -0
- data/lib/asdawqw/models/yield_response.rb +78 -0
- metadata +322 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: b4b7b783c8fe16b0f2afd4088ac787f1ddf9dd094e3dec25bc2351043baa23e1
|
|
4
|
+
data.tar.gz: 71be7c6fddcd9516a91ef4e271fdf94329da884149353f54cc1961134d115019
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: eff8cea659bf2b96faaeb69b013a33a88bb87e7a12c8401890027f0e4a8afc27c8987841f48718e22bdcaf4c337a982e7b69e56d350f543daafeffe7ddb92014
|
|
7
|
+
data.tar.gz: 4b1d0a8bfecbe973fa32418dfdbe20046d1f414d0b82b1df2cc353c70093b0678cc2aae6b12ec3ea48930b099c616bc3c390e4dd94a9b5538c6703fc76651187
|
data/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
License:
|
|
2
|
+
========
|
|
3
|
+
The MIT License (MIT)
|
|
4
|
+
http://opensource.org/licenses/MIT
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2014 - 2016 APIMATIC Limited
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in
|
|
16
|
+
all copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24
|
+
THE SOFTWARE.
|
|
25
|
+
|
|
26
|
+
Trade Mark:
|
|
27
|
+
==========
|
|
28
|
+
APIMATIC is a trade mark for APIMATIC Limited
|
data/README.md
ADDED
|
@@ -0,0 +1,1751 @@
|
|
|
1
|
+
# Getting started
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
**Before beginning work it is necessary that:**
|
|
6
|
+
|
|
7
|
+
* Your organization is registered and activated
|
|
8
|
+
* You have participated in a kickoff meeting
|
|
9
|
+
* The opening questionnaire has been filled out
|
|
10
|
+
* You have your login and password. (Using it you get a unique session `token` that must be used in every request to API as param `jwt`)
|
|
11
|
+
|
|
12
|
+
[Contact us](https://bookingpal.com/en/contact-us/) to be registered and get your credentials.
|
|
13
|
+
|
|
14
|
+
All responses are returned as JSON.
|
|
15
|
+
|
|
16
|
+
This document covers all the API calls and other methods that can be used to complete Razor-Cloud integration. It is important to note that all parameters are **case sensitive** in this document and should be used as documented.
|
|
17
|
+
|
|
18
|
+
**Responses:**
|
|
19
|
+
When a request is successful, a response body will typically be sent back in the form of a JSON object. An exception to this is when a DELETE request is processed, which will result in a successful `200` status and an empty response body.
|
|
20
|
+
|
|
21
|
+
## How to Build
|
|
22
|
+
|
|
23
|
+
This client library is a Ruby gem which can be compiled and used in your Ruby and Ruby on Rails project. This library requires a few gems from the RubyGems repository.
|
|
24
|
+
|
|
25
|
+
1. Open the command line interface or the terminal and navigate to the folder containing the source code.
|
|
26
|
+
2. Run ``` gem build asdawqw.gemspec ``` to build the gem.
|
|
27
|
+
3. Once built, the gem can be installed on the current work environment using ``` gem install asdawqw-2.1.1.gem ```
|
|
28
|
+
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+
## How to Use
|
|
32
|
+
|
|
33
|
+
The following section explains how to use the Asdawqw Ruby Gem in a new Rails project using RubyMine™. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.
|
|
34
|
+
|
|
35
|
+
### 1. Starting a new project
|
|
36
|
+
|
|
37
|
+
Close any existing projects in RubyMine™ by selecting ``` File -> Close Project ```. Next, click on ``` Create New Project ``` to create a new project from scratch.
|
|
38
|
+
|
|
39
|
+

|
|
40
|
+
|
|
41
|
+
Next, provide ``` TestApp ``` as the project name, choose ``` Rails Application ``` as the project type, and click ``` OK ```.
|
|
42
|
+
|
|
43
|
+

|
|
44
|
+
|
|
45
|
+
In the next dialog make sure that correct *Ruby SDK* is being used (minimum 2.0.0) and click ``` OK ```.
|
|
46
|
+
|
|
47
|
+

|
|
48
|
+
|
|
49
|
+
This will create a new Rails Application project with an existing set of files and folder.
|
|
50
|
+
|
|
51
|
+
### 2. Add reference of the gem
|
|
52
|
+
|
|
53
|
+
In order to use the Asdawqw gem in the new project we must add a gem reference. Locate the ```Gemfile``` in the *Project Explorer* window under the ``` TestApp ``` project node. The file contains references to all gems being used in the project. Here, add the reference to the library gem by adding the following line: ``` gem 'asdawqw', '~> 2.1.1' ```
|
|
54
|
+
|
|
55
|
+

|
|
56
|
+
|
|
57
|
+
### 3. Adding a new Rails Controller
|
|
58
|
+
|
|
59
|
+
Once the ``` TestApp ``` project is created, a folder named ``` controllers ``` will be visible in the *Project Explorer* under the following path: ``` TestApp > app > controllers ```. Right click on this folder and select ``` New -> Run Rails Generator... ```.
|
|
60
|
+
|
|
61
|
+

|
|
62
|
+
|
|
63
|
+
Selecting the said option will popup a small window where the generator names are displayed. Here, select the ``` controller ``` template.
|
|
64
|
+
|
|
65
|
+

|
|
66
|
+
|
|
67
|
+
Next, a popup window will ask you for a Controller name and included Actions. For controller name provide ``` Hello ``` and include an action named ``` Index ``` and click ``` OK ```.
|
|
68
|
+
|
|
69
|
+

|
|
70
|
+
|
|
71
|
+
A new controller class anmed ``` HelloController ``` will be created in a file named ``` hello_controller.rb ``` containing a method named ``` Index ```. In this method, add code for initialization and a sample for its usage.
|
|
72
|
+
|
|
73
|
+

|
|
74
|
+
|
|
75
|
+
## How to Test
|
|
76
|
+
|
|
77
|
+
You can test the generated SDK and the server with automatically generated test
|
|
78
|
+
cases as follows:
|
|
79
|
+
|
|
80
|
+
1. From terminal/cmd navigate to the root directory of the SDK.
|
|
81
|
+
2. Invoke: `bundle exec rake`
|
|
82
|
+
|
|
83
|
+
## Initialization
|
|
84
|
+
|
|
85
|
+
### Authentication
|
|
86
|
+
In order to setup authentication and initialization of the API client, you need the following information.
|
|
87
|
+
|
|
88
|
+
| Parameter | Description |
|
|
89
|
+
|-----------|-------------|
|
|
90
|
+
| x_api_key | Your PMS API key |
|
|
91
|
+
| jwt | Token which need to be passed in every request as GET parameter. You will get this token in authorization response. Token is valid 1 hour. |
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
API client can be initialized as following.
|
|
96
|
+
|
|
97
|
+
```ruby
|
|
98
|
+
# Configuration parameters and credentials
|
|
99
|
+
x_api_key = 'x_api_key' # Your PMS API key
|
|
100
|
+
jwt = 'jwt' # Token which need to be passed in every request as GET parameter. You will get this token in authorization response. Token is valid 1 hour.
|
|
101
|
+
|
|
102
|
+
client = Asdawqw::AsdawqwClient.new(
|
|
103
|
+
x_api_key: x_api_key,
|
|
104
|
+
jwt: jwt
|
|
105
|
+
)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The added initlization code can be debugged by putting a breakpoint in the ``` Index ``` method and running the project in debug mode by selecting ``` Run -> Debug 'Development: TestApp' ```.
|
|
109
|
+
|
|
110
|
+

|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
# Class Reference
|
|
115
|
+
|
|
116
|
+
## <a name="list_of_controllers"></a>List of Controllers
|
|
117
|
+
|
|
118
|
+
* [AuthorizationController](#authorization_controller)
|
|
119
|
+
* [PropertyManagersController](#property_managers_controller)
|
|
120
|
+
* [ProductController](#product_controller)
|
|
121
|
+
* [ImagesController](#images_controller)
|
|
122
|
+
* [RatesAndAvailabilityController](#rates_and_availability_controller)
|
|
123
|
+
* [LOSPricingController](#los_pricing_controller)
|
|
124
|
+
* [FeeAndTaxController](#fee_and_tax_controller)
|
|
125
|
+
* [FeeAndTaxMandatoryAtThePropertyLevelController](#fee_and_tax_mandatory_at_the_property_level_controller)
|
|
126
|
+
* [YieldsController](#yields_controller)
|
|
127
|
+
* [ValidationController](#validation_controller)
|
|
128
|
+
* [TestingOfMessageAPICallsController](#testing_of_message_api_calls_controller)
|
|
129
|
+
* [MessagingController](#messaging_controller)
|
|
130
|
+
* [RequestToBookController](#request_to_book_controller)
|
|
131
|
+
* [PushNotificationController](#push_notification_controller)
|
|
132
|
+
* [ReservationNotificationsController](#reservation_notifications_controller)
|
|
133
|
+
* [AsynchronousPushMessagesController](#asynchronous_push_messages_controller)
|
|
134
|
+
|
|
135
|
+
## <a name="authorization_controller"></a> AuthorizationController
|
|
136
|
+
|
|
137
|
+
### Get singleton instance
|
|
138
|
+
|
|
139
|
+
The singleton instance of the ``` AuthorizationController ``` class can be accessed from the API Client.
|
|
140
|
+
|
|
141
|
+
```ruby
|
|
142
|
+
authorization_controller = client.authorization
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### <a name="get_login"></a> get_login
|
|
146
|
+
|
|
147
|
+
> *Tags:* ``` Skips Authentication ```
|
|
148
|
+
|
|
149
|
+
> In order to begin utilizing the platform APIs, your application must be authenticated and authorized to access domain resources. Follow the URL with your credentials and obtain an authorization token which is used in every request.
|
|
150
|
+
> You will have 2 types of tokens. One is on the PMS level, and this one should be used when you send requests related to PMS/PM data. For managing properties, you will need a token on PM level, with PM credentials. For every API call it will be noted which API credentials you should use.
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
```ruby
|
|
154
|
+
def get_login(username,
|
|
155
|
+
password); end
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
#### Parameters
|
|
159
|
+
|
|
160
|
+
| Parameter | Tags | Description |
|
|
161
|
+
|-----------|------|-------------|
|
|
162
|
+
| username | ``` Required ``` | Your account email address (for PMS or PM) |
|
|
163
|
+
| password | ``` Required ``` | Your password |
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
#### Example Usage
|
|
167
|
+
|
|
168
|
+
```ruby
|
|
169
|
+
username = 'apimaticTest@test.com'
|
|
170
|
+
password = 'password'
|
|
171
|
+
|
|
172
|
+
result = authorization_controller.get_login(username, password)
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
[Back to List of Controllers](#list_of_controllers)
|
|
178
|
+
|
|
179
|
+
## <a name="property_managers_controller"></a> PropertyManagersController
|
|
180
|
+
|
|
181
|
+
### Get singleton instance
|
|
182
|
+
|
|
183
|
+
The singleton instance of the ``` PropertyManagersController ``` class can be accessed from the API Client.
|
|
184
|
+
|
|
185
|
+
```ruby
|
|
186
|
+
propertyManagers_controller = client.property_managers
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### <a name="get_pms_list"></a> get_pms_list
|
|
190
|
+
|
|
191
|
+
> This API call will return a list of property managers (PM) that have been created in the BookingPal platform that is associated with your PMS.
|
|
192
|
+
> In all requests in this API section, you need to use your PMS credentials.
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
```ruby
|
|
196
|
+
def get_pms_list; end
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
#### Example Usage
|
|
200
|
+
|
|
201
|
+
```ruby
|
|
202
|
+
|
|
203
|
+
result = propertyManagers_controller.get_pms_list()
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
### <a name="create_new_property_manager"></a> create_new_property_manager
|
|
209
|
+
|
|
210
|
+
> This API call will allow the PMS to pass all data to BookingPal that is required for registering a new PM (Property Manager). All fields are mandatory - PMS must pass this data in order for a PM account to be created. You need to use PMS credentials for this request.
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
```ruby
|
|
214
|
+
def create_new_property_manager(content_type,
|
|
215
|
+
body); end
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
#### Parameters
|
|
219
|
+
|
|
220
|
+
| Parameter | Tags | Description |
|
|
221
|
+
|-----------|------|-------------|
|
|
222
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
223
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
#### Example Usage
|
|
227
|
+
|
|
228
|
+
```ruby
|
|
229
|
+
content_type = 'application/json'
|
|
230
|
+
body_value = "{\r\n \"data\": {\r\n \"companyDetails\": {\r\n \"accountId\": \"132\",\r\n \"companyName\": \"Test PM\",\r\n \"language\": \"en\",\r\n \"fullName\": \"Test PM\",\r\n \"companyAddress\": {\r\n \"country\": \"US\",\r\n \"state\": \"Test State\",\r\n \"streetAddress\": \"Test Street\",\r\n \"city\": \"Test City\",\r\n \"zip\": \"13245\"\r\n },\r\n \"website\": \"www.testsite.com\",\r\n \"email\": \"apimaticPMemail@test.com\",\r\n \"phone\": {\r\n \"countryCode\": \"+321\",\r\n \"number\": \"132456\"\r\n },\r\n \"password\": \"password\",\r\n \"currency\": \"USD\"\r\n },\r\n \"policies\": {\r\n \"paymentPolicy\": {\r\n \"type\": \"SPLIT\",\r\n \"splitPayment\": {\r\n \"depositType\": \"FLAT\",\r\n \"value\": 4.0,\r\n \"secondPaymentDays\": 30\r\n }\r\n },\r\n \"cancellationPolicy\": {\r\n \"type\": \"MANUAL\",\r\n \"manualPolicy\": {\r\n \"type\": \"FLAT\",\r\n \"manualPolicies\": [\r\n {\r\n \"chargeValue\": 20,\r\n \"beforeDays\": 34,\r\n \"cancellationFee\": 1.0\r\n },\r\n {\r\n \"chargeValue\": 12,\r\n \"beforeDays\": 45,\r\n \"cancellationFee\": 2.0\r\n }\r\n ]\r\n }\r\n },\r\n \"feeTaxMandatory\": {\r\n \"isFeeMandatory\": true,\r\n \"isTaxMandatory\": true\r\n },\r\n \"terms\": \"www.test.com\",\r\n \"checkInTime\": \"10:00:00\",\r\n \"checkOutTime\": \"16:00:00\",\r\n \"leadTime\": 2\r\n },\r\n \"payment\": {\r\n \"paymentType\": \"MAIL_CHECK\",\r\n \"creditCard\": {\r\n \"creditCardType\": \"POST\",\r\n \"paymentGateways\": {\r\n \"paymentGatewaysType\": \"AUTHORIZE_NET\",\r\n \"user\": \"test\",\r\n \"secret\": \"test\",\r\n \"additionalField1\": \"\",\r\n \"additionalField2\": \"\"\r\n },\r\n \"creditCardList\": [\r\n \"AMERICAN_EXPRESS\",\r\n \"DINERS_CLUB\"\r\n ]\r\n }\r\n }\r\n }\r\n}";
|
|
231
|
+
body = JSON.parse(body_value);
|
|
232
|
+
|
|
233
|
+
result = propertyManagers_controller.create_new_property_manager(content_type, body)
|
|
234
|
+
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
### <a name="get_property_manager_detail_data"></a> get_property_manager_detail_data
|
|
239
|
+
|
|
240
|
+
> This function will return a property manager’s details that belong to the current user. You need to use your PMS API credentials.
|
|
241
|
+
>
|
|
242
|
+
> Request Body parameters are the same as for creating PM.
|
|
243
|
+
>
|
|
244
|
+
> Response is the same as in creating a Property Manager function. Here you do not need to pass all root level fields, but if some are used - all fields inside are mandatory:
|
|
245
|
+
> - in CompanyDetails Model you can pass any field, and none of them is mandatory
|
|
246
|
+
> - in Policies Model - you can pass any field, and none of them is mandatory
|
|
247
|
+
> - if you do use PaymentPolicy - all fields inside are mandatory
|
|
248
|
+
> - if you do use CancellationPolicy - all fields inside are mandatory
|
|
249
|
+
> - if you use Payment Model - all fields inside are mandatory
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
```ruby
|
|
253
|
+
def get_property_manager_detail_data(content_type,
|
|
254
|
+
id); end
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
#### Parameters
|
|
258
|
+
|
|
259
|
+
| Parameter | Tags | Description |
|
|
260
|
+
|-----------|------|-------------|
|
|
261
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
262
|
+
| id | ``` Required ``` | Property Manager ID |
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
#### Example Usage
|
|
266
|
+
|
|
267
|
+
```ruby
|
|
268
|
+
content_type = 'application/json'
|
|
269
|
+
id = 'id'
|
|
270
|
+
|
|
271
|
+
result = propertyManagers_controller.get_property_manager_detail_data(content_type, id)
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
### <a name="update_property_manager_details"></a> update_property_manager_details
|
|
277
|
+
|
|
278
|
+
> This function will update a property manager’s details. In case of an update you do not need to pass all information, but if you have values in one section - all fields inside are mandatory.
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
```ruby
|
|
282
|
+
def update_property_manager_details(content_type,
|
|
283
|
+
body,
|
|
284
|
+
id); end
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
#### Parameters
|
|
288
|
+
|
|
289
|
+
| Parameter | Tags | Description |
|
|
290
|
+
|-----------|------|-------------|
|
|
291
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
292
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
293
|
+
| id | ``` Required ``` | Property Manager ID |
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
#### Example Usage
|
|
297
|
+
|
|
298
|
+
```ruby
|
|
299
|
+
content_type = 'application/json'
|
|
300
|
+
body_value = "{\r\n \"data\": {\r\n \"companyDetails\": {\r\n \"accountId\": \"132\",\r\n \"companyName\": \"Update Name\",\r\n \"language\": \"en\",\r\n \"fullName\": \"Update Full Name\",\r\n \"companyAddress\": {\r\n \"country\": \"US\",\r\n \"state\": \"Update State\",\r\n \"streetAddress\": \"Update Street\",\r\n \"city\": \"Update City\",\r\n \"zip\": \"13245\"\r\n },\r\n \"website\": \"www.updatesite.com\",\r\n \"email\": \"apimaticTest@test.com\",\r\n \"phone\": {\r\n \"countryCode\": \"+321\",\r\n \"number\": \"132456\"\r\n },\r\n \"password\": \"password\",\r\n \"currency\": \"USD\"\r\n },\r\n \"policies\": {\r\n \"paymentPolicy\": {\r\n \"type\": \"SPLIT\",\r\n \"splitPayment\": {\r\n \"depositType\": \"FLAT\",\r\n \"value\": 4.0,\r\n \"secondPaymentDays\": 30\r\n }\r\n },\r\n \"cancellationPolicy\": {\r\n \"type\": \"MANUAL\",\r\n \"manualPolicy\": {\r\n \"type\": \"FLAT\",\r\n \"manualPolicies\": [\r\n {\r\n \"chargeValue\": 20,\r\n \"beforeDays\": 34,\r\n \"cancellationFee\": 1.0\r\n },\r\n {\r\n \"chargeValue\": 12,\r\n \"beforeDays\": 45,\r\n \"cancellationFee\": 2.0\r\n }\r\n ]\r\n }\r\n },\r\n \"feeTaxMandatory\": {\r\n \"isFeeMandatory\": true,\r\n \"isTaxMandatory\": true\r\n },\r\n \"terms\": \"www.test.com\",\r\n \"checkInTime\": \"10:00:00\",\r\n \"checkOutTime\": \"16:00:00\",\r\n \"leadTime\": 2\r\n },\r\n \"payment\": {\r\n \"paymentType\": \"MAIL_CHECK\",\r\n \"creditCard\": {\r\n \"creditCardType\": \"POST\",\r\n \"paymentGateways\": {\r\n \"paymentGatewaysType\": \"AUTHORIZE_NET\",\r\n \"user\": \"test\",\r\n \"secret\": \"test\",\r\n \"additionalField1\": \"\",\r\n \"additionalField2\": \"\"\r\n },\r\n \"creditCardList\": [\r\n \"AMERICAN_EXPRESS\",\r\n \"DINERS_CLUB\"\r\n ]\r\n }\r\n }\r\n }\r\n}";
|
|
301
|
+
body = JSON.parse(body_value);
|
|
302
|
+
id = 'id'
|
|
303
|
+
|
|
304
|
+
result = propertyManagers_controller.update_property_manager_details(content_type, body, id)
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
[Back to List of Controllers](#list_of_controllers)
|
|
310
|
+
|
|
311
|
+
## <a name="product_controller"></a> ProductController
|
|
312
|
+
|
|
313
|
+
### Get singleton instance
|
|
314
|
+
|
|
315
|
+
The singleton instance of the ``` ProductController ``` class can be accessed from the API Client.
|
|
316
|
+
|
|
317
|
+
```ruby
|
|
318
|
+
product_controller = client.product
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### <a name="get_product_list"></a> get_product_list
|
|
322
|
+
|
|
323
|
+
> This API call will return a list of properties that belong to the current user. This means that a user has to be logged in with products created already.
|
|
324
|
+
> Every API call in this section should be with PM credentials.
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
```ruby
|
|
328
|
+
def get_product_list; end
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
#### Example Usage
|
|
332
|
+
|
|
333
|
+
```ruby
|
|
334
|
+
|
|
335
|
+
result = product_controller.get_product_list()
|
|
336
|
+
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
### <a name="create_product"></a> create_product
|
|
341
|
+
|
|
342
|
+
> This function allows a logged in user to create new product. You can only send one product in each request.
|
|
343
|
+
>
|
|
344
|
+
>
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
```ruby
|
|
348
|
+
def create_product(content_type,
|
|
349
|
+
body); end
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
#### Parameters
|
|
353
|
+
|
|
354
|
+
| Parameter | Tags | Description |
|
|
355
|
+
|-----------|------|-------------|
|
|
356
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
357
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
#### Example Usage
|
|
361
|
+
|
|
362
|
+
```ruby
|
|
363
|
+
content_type = 'application/json'
|
|
364
|
+
body_value = "{\r\n \"data\": {\r\n \"name\": \"Test product\",\r\n \"rooms\": 5,\r\n \"livingRoom\": 2,\r\n \"bathrooms\": 4,\r\n \"toilets\": 2,\r\n \"totalBeds\": 6,\r\n \"supportedLosRates\": false,\r\n \"space\": 111.0,\r\n \"spaceUnit\": \"SQ_FT\",\r\n \"persons\": 10,\r\n \"childs\": 2,\r\n \"latitude\": 41.886125,\r\n \"longitude\": -87.634233,\r\n \"currency\": \"EUR\",\r\n \"location\": {\r\n \"postalCode\": \"60606\",\r\n \"country\": \"US\",\r\n \"region\": \"Illinois\",\r\n \"city\": \"Chicago\",\r\n \"street\": \"210 North Wells Street\",\r\n \"zipCode9\": \"60606-1330\"\r\n },\r\n \"propertyType\": \"PCT34\",\r\n \"attributesWithQuantity\": [\r\n {\r\n \"attributeId\": \"HAC312\",\r\n \"quantity\": 1\r\n },\r\n {\r\n \"attributeId\": \"RMA107\",\r\n \"quantity\": 1\r\n },\r\n {\r\n \"attributeId\": \"RMA11\",\r\n \"quantity\": 1\r\n },\r\n {\r\n \"attributeId\": \"RMA149\",\r\n \"quantity\": 1\r\n },\r\n {\r\n \"attributeId\": \"RMA163\",\r\n \"quantity\": 1\r\n },\r\n {\r\n \"attributeId\": \"RMA18\",\r\n \"quantity\": 1\r\n },\r\n {\r\n \"attributeId\": \"RMA19\",\r\n \"quantity\": 1\r\n },\r\n {\r\n \"attributeId\": \"RMA251\",\r\n \"quantity\": 1\r\n },\r\n {\r\n \"attributeId\": \"RMA273\",\r\n \"quantity\": 1\r\n },\r\n {\r\n \"attributeId\": \"RMA32\",\r\n \"quantity\": 1\r\n },\r\n {\r\n \"attributeId\": \"RMA41\",\r\n \"quantity\": 1\r\n },\r\n {\r\n \"attributeId\": \"RMA5085\",\r\n \"quantity\": 1\r\n },\r\n {\r\n \"attributeId\": \"RMA59\",\r\n \"quantity\": 1\r\n },\r\n {\r\n \"attributeId\": \"RMA6058\",\r\n \"quantity\": 1\r\n },\r\n {\r\n \"attributeId\": \"RMA68\",\r\n \"quantity\": 1\r\n },\r\n {\r\n \"attributeId\": \"RMA88\",\r\n \"quantity\": 1\r\n }\r\n ],\r\n \"notes\": {\r\n \"description\": {\r\n \"texts\": [\r\n {\r\n \"language\": \"EN\",\r\n \"value\": \"Main description on EN!\"\r\n },\r\n {\r\n \"language\": \"ES\",\r\n \"value\": \"Main description on ES!\"\r\n }\r\n ]\r\n },\r\n \"houseRules\": {\r\n \"texts\": [\r\n {\r\n \"language\": \"EN\",\r\n \"value\": \"House Rules on EN!\"\r\n },\r\n {\r\n \"language\": \"SR\",\r\n \"value\": \"House Rules on SR!\"\r\n }\r\n ]\r\n }\r\n },\r\n \"bedroomConfiguration\": {\r\n \"bedrooms\": [\r\n {\r\n \"beds\": {\r\n \"bed\": [\r\n {\r\n \"bedType\": \"RMA113\",\r\n \"count\": 1\r\n },\r\n {\r\n \"bedType\": \"RMA58\",\r\n \"count\": 1\r\n }\r\n ]\r\n },\r\n \"type\": \"Bedroom\",\r\n \"privateBathroom\": false\r\n },\r\n {\r\n \"beds\": {\r\n \"bed\": [\r\n {\r\n \"bedType\": \"RMA113\",\r\n \"count\": 1\r\n },\r\n {\r\n \"bedType\": \"RMA58\",\r\n \"count\": 1\r\n }\r\n ]\r\n },\r\n \"type\": \"Bedroom\",\r\n \"privateBathroom\": false\r\n },\r\n {\r\n \"beds\": {\r\n \"bed\": [\r\n {\r\n \"bedType\": \"RMA113\",\r\n \"count\": 1\r\n },\r\n {\r\n \"bedType\": \"RMA86\",\r\n \"count\": 1\r\n }\r\n ]\r\n },\r\n \"type\": \"Bedroom\",\r\n \"privateBathroom\": false\r\n },\r\n {\r\n \"beds\": {\r\n \"bed\": [\r\n {\r\n \"bedType\": \"RMA113\",\r\n \"count\": 1\r\n }\r\n ]\r\n },\r\n \"type\": \"Bedroom\",\r\n \"privateBathroom\": false\r\n },\r\n {\r\n \"beds\": {\r\n \"bed\": [\r\n {\r\n \"bedType\": \"RMA113\",\r\n \"count\": 1\r\n }\r\n ]\r\n },\r\n \"type\": \"Bedroom\",\r\n \"privateBathroom\": false\r\n },\r\n {\r\n \"beds\": {\r\n \"bed\": [\r\n {\r\n \"bedType\": \"RMA58\",\r\n \"count\": 1\r\n }\r\n ]\r\n },\r\n \"type\": \"Bedroom\",\r\n \"privateBathroom\": true\r\n },\r\n {\r\n \"beds\": {\r\n \"bed\": [\r\n {\r\n \"bedType\": \"RMA58\",\r\n \"count\": 1\r\n }\r\n ]\r\n },\r\n \"type\": \"Living Room\",\r\n \"privateBathroom\": false\r\n }\r\n ]\r\n },\r\n \"policy\": {\r\n \"internetPolicy\": {\r\n \"accessInternet\": true,\r\n \"kindOfInternet\": \"WiFi\",\r\n \"availableInternet\": \"AllAreas\",\r\n \"chargeInternet\": \"Free\"\r\n },\r\n \"parkingPolicy\": {\r\n \"accessParking\": true,\r\n \"locatedParking\": \"OnSite\",\r\n \"privateParking\": true,\r\n \"chargeParking\": \"$ 150\",\r\n \"timeCostParking\": \"PerStay\",\r\n \"necessaryReservationParking\": \"NotPossible\"\r\n },\r\n \"petPolicy\": {\r\n \"allowedPets\": \"Allowed\",\r\n \"chargePets\": \"Free\"\r\n },\r\n \"childrenAllowed\": true,\r\n \"smokingAllowed\": false\r\n },\r\n \"checkInTime\": \"16:00:00\",\r\n \"checkInToTime\": \"20:00:00\",\r\n \"checkOutTime\": \"10:00:00\"\r\n }\r\n}";
|
|
365
|
+
body = JSON.parse(body_value);
|
|
366
|
+
|
|
367
|
+
result = product_controller.create_product(content_type, body)
|
|
368
|
+
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
### <a name="update_product"></a> update_product
|
|
373
|
+
|
|
374
|
+
> This function allows a logged in user to update product details.
|
|
375
|
+
>
|
|
376
|
+
> Request parameters and request example will be the same as in the create product API. The only field that must be added is the product id.
|
|
377
|
+
>
|
|
378
|
+
> You need to have all other parameters which were used in the create API call that you want to keep (AltID can’t be updated). Everything that you do not send as an update will be deleted (overwritten).
|
|
379
|
+
>
|
|
380
|
+
> Response parameters and response examples are the same as in the create product API.
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
```ruby
|
|
384
|
+
def update_product(content_type,
|
|
385
|
+
body); end
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
#### Parameters
|
|
389
|
+
|
|
390
|
+
| Parameter | Tags | Description |
|
|
391
|
+
|-----------|------|-------------|
|
|
392
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
393
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
#### Example Usage
|
|
397
|
+
|
|
398
|
+
```ruby
|
|
399
|
+
content_type = 'application/json'
|
|
400
|
+
body_value = "{ \"data\": { \"name\": \"Name Updated\", \"id\": 1235124634, \"altId\": 23767, \"rooms\": 3, \"livingRoom\": 6, \"bathrooms\": 6, \"toilets\": 6, \"totalBeds\": 6, \"space\": 66, \"spaceUnit\": \"SQ_M\", \"persons\": 6, \"childs\": 6, \"latitude\": 41.8860812, \"longitude\": -87.634233, \"supportedLosRates\": false, \"currency\": \"RSD\", \"propertyType\": \"PCT101\", \"nearbyAmenities\": [ { \"attributeId\": \"ACC203\", \"distance\": 3 } ], \"attributesWithQuantity\": [ { \"attributeId\": \"RMA149\", \"quantity\": 1 } ], \"notes\": { \"description\": { \"texts\": [ { \"language\": \"FR\", \"value\": \"Main description in FR!\" }, { \"language\": \"sr\", \"value\": \"Main description in RO!\" } ] }, \"houseRules\": { \"texts\": [ { \"language\": \"RO\", \"value\": \"House Rules in RO!\" }, { \"language\": \"SK\", \"value\": \"House Rules in SK!\" } ] } }, \"bedroomConfiguration\": { \"bedrooms\": [ { \"beds\": { \"bed\": [ { \"bedType\": \"RMA6118\", \"count\": 2 }, { \"bedType\": \"RMA6120\", \"count\": 4 } ] }, \"type\": \"Living Room\", \"privateBathroom\": true }, { \"beds\": { \"bed\": [ { \"bedType\": \"RMA102\", \"count\": 2 }, { \"bedType\": \"RMA58\", \"count\": 2 }, { \"bedType\": \"RMA6119\", \"count\": 3 } ] }, \"type\": \"Bedroom\", \"privateBathroom\": true } ] }, \"policy\": { \"internetPolicy\": { \"accessInternet\": true, \"kindOfInternet\": \"Wired\", \"availableInternet\": \"SomeRooms\", \"chargeInternet\": \"$ 1000\" }, \"parkingPolicy\": { \"accessParking\": true, \"locatedParking\": \"Nearby\", \"privateParking\": false, \"chargeParking\": \"$ 100\", \"timeCostParking\": \"PerHour\", \"necessaryReservationParking\": \"NotPossible\" }, \"petPolicy\": { \"allowedPets\": \"NotAllowed\", \"chargePets\": \"$ 10\" }, \"childrenAllowed\": false, \"smokingAllowed\": false }, \"checkInTime\": \"17:00:00\", \"checkInToTime\": \"21:00:00\", \"checkOutTime\": \"11:00:00\" }}";
|
|
401
|
+
body = JSON.parse(body_value);
|
|
402
|
+
|
|
403
|
+
result = product_controller.update_product(content_type, body)
|
|
404
|
+
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
### <a name="get_product_by_id"></a> get_product_by_id
|
|
409
|
+
|
|
410
|
+
> This function allows logged in user to get a specific product.
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
```ruby
|
|
414
|
+
def get_product_by_id(product_id); end
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
#### Parameters
|
|
418
|
+
|
|
419
|
+
| Parameter | Tags | Description |
|
|
420
|
+
|-----------|------|-------------|
|
|
421
|
+
| product_id | ``` Required ``` | Id of the property |
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
#### Example Usage
|
|
425
|
+
|
|
426
|
+
```ruby
|
|
427
|
+
product_id = 'productId'
|
|
428
|
+
|
|
429
|
+
result = product_controller.get_product_by_id(product_id)
|
|
430
|
+
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
### <a name="delete_product"></a> delete_product
|
|
435
|
+
|
|
436
|
+
> This function allows the logged in user to delete product.
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
```ruby
|
|
440
|
+
def delete_product(product_id); end
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
#### Parameters
|
|
444
|
+
|
|
445
|
+
| Parameter | Tags | Description |
|
|
446
|
+
|-----------|------|-------------|
|
|
447
|
+
| product_id | ``` Required ``` | Property ID |
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
#### Example Usage
|
|
451
|
+
|
|
452
|
+
```ruby
|
|
453
|
+
product_id = 'productId'
|
|
454
|
+
|
|
455
|
+
result = product_controller.delete_product(product_id)
|
|
456
|
+
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
### <a name="delete_list_product"></a> delete_list_product
|
|
461
|
+
|
|
462
|
+
> This function allows logged in user to delete list of products.
|
|
463
|
+
>
|
|
464
|
+
>
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
```ruby
|
|
468
|
+
def delete_list_product(content_type,
|
|
469
|
+
body); end
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
#### Parameters
|
|
473
|
+
|
|
474
|
+
| Parameter | Tags | Description |
|
|
475
|
+
|-----------|------|-------------|
|
|
476
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
477
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
#### Example Usage
|
|
481
|
+
|
|
482
|
+
```ruby
|
|
483
|
+
content_type = 'application/json'
|
|
484
|
+
body_value = "{\r\n \"data\": [\r\n 1235124636,\r\n 1235124637\r\n ]\r\n}";
|
|
485
|
+
body = JSON.parse(body_value);
|
|
486
|
+
|
|
487
|
+
result = product_controller.delete_list_product(content_type, body)
|
|
488
|
+
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
### <a name="create_activation_list_product"></a> create_activation_list_product
|
|
493
|
+
|
|
494
|
+
> This function allows logged in user to activate a list of products in BookingPal. Products MUST be activated successfully before they can be distributed to any channel.
|
|
495
|
+
>
|
|
496
|
+
> Note: When a product is successfully activated it will be queued for the internal BP validation function and you will receive async push messages when the validation is completed - like it is described in the Validation section.
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
```ruby
|
|
500
|
+
def create_activation_list_product(content_type,
|
|
501
|
+
body); end
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
#### Parameters
|
|
505
|
+
|
|
506
|
+
| Parameter | Tags | Description |
|
|
507
|
+
|-----------|------|-------------|
|
|
508
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
509
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
#### Example Usage
|
|
513
|
+
|
|
514
|
+
```ruby
|
|
515
|
+
content_type = 'application/json'
|
|
516
|
+
body_value = "{\r\n \"data\": [\r\n 1235124634,\r\n 1235124636\r\n ]\r\n}";
|
|
517
|
+
body = JSON.parse(body_value);
|
|
518
|
+
|
|
519
|
+
result = product_controller.create_activation_list_product(content_type, body)
|
|
520
|
+
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
### <a name="create_deactivation_list_product"></a> create_deactivation_list_product
|
|
525
|
+
|
|
526
|
+
> This function allows the logged in user to deactivate a list of products. This function will also close the calendars on every channel the products have been listed on.
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
```ruby
|
|
530
|
+
def create_deactivation_list_product(content_type,
|
|
531
|
+
body); end
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
#### Parameters
|
|
535
|
+
|
|
536
|
+
| Parameter | Tags | Description |
|
|
537
|
+
|-----------|------|-------------|
|
|
538
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
539
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
#### Example Usage
|
|
543
|
+
|
|
544
|
+
```ruby
|
|
545
|
+
content_type = 'application/json'
|
|
546
|
+
body_value = "{\r\n \"data\": [\r\n 1235124634,\r\n 1235124636\r\n ]\r\n}";
|
|
547
|
+
body = JSON.parse(body_value);
|
|
548
|
+
|
|
549
|
+
result = product_controller.create_deactivation_list_product(content_type, body)
|
|
550
|
+
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
[Back to List of Controllers](#list_of_controllers)
|
|
555
|
+
|
|
556
|
+
## <a name="images_controller"></a> ImagesController
|
|
557
|
+
|
|
558
|
+
### Get singleton instance
|
|
559
|
+
|
|
560
|
+
The singleton instance of the ``` ImagesController ``` class can be accessed from the API Client.
|
|
561
|
+
|
|
562
|
+
```ruby
|
|
563
|
+
images_controller = client.images
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
### <a name="get_image_list_by_product_id"></a> get_image_list_by_product_id
|
|
567
|
+
|
|
568
|
+
> This function allows logged in user to get image list for the existing product
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
```ruby
|
|
572
|
+
def get_image_list_by_product_id(product_id); end
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
#### Parameters
|
|
576
|
+
|
|
577
|
+
| Parameter | Tags | Description |
|
|
578
|
+
|-----------|------|-------------|
|
|
579
|
+
| product_id | ``` Required ``` | ID of the property |
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
#### Example Usage
|
|
583
|
+
|
|
584
|
+
```ruby
|
|
585
|
+
product_id = 'productId'
|
|
586
|
+
|
|
587
|
+
result = images_controller.get_image_list_by_product_id(product_id)
|
|
588
|
+
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
### <a name="create_images"></a> create_images
|
|
593
|
+
|
|
594
|
+
> This function allows the logged in user to upload images for the existing product. Every new image will be sorted to the end. The first image sent will be used as the “Main Image”. (Image re-ordering can also be done within the BookingPal platform manually by users)
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
```ruby
|
|
598
|
+
def create_images(content_type,
|
|
599
|
+
body); end
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
#### Parameters
|
|
603
|
+
|
|
604
|
+
| Parameter | Tags | Description |
|
|
605
|
+
|-----------|------|-------------|
|
|
606
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
607
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
#### Example Usage
|
|
611
|
+
|
|
612
|
+
```ruby
|
|
613
|
+
content_type = 'application/json'
|
|
614
|
+
body_value = "{ \t\"data\": { \t\t\"productId\": 1235124634, \t\t\"image\": { \t\t\t\"url\": \"http://aff.bstatic.com/images/hotel/max500/110/11069097.jpg\", \t\t\t\"tags\": [ \t\t\t\t4, \t\t\t\t5, \t\t\t\t6 \t\t\t] \t\t} \t} }";
|
|
615
|
+
body = JSON.parse(body_value);
|
|
616
|
+
|
|
617
|
+
result = images_controller.create_images(content_type, body)
|
|
618
|
+
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
### <a name="delete_list_of_images"></a> delete_list_of_images
|
|
623
|
+
|
|
624
|
+
> This function allows the logged in user to delete image(s) from the existing product.
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
```ruby
|
|
628
|
+
def delete_list_of_images(content_type,
|
|
629
|
+
body); end
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
#### Parameters
|
|
633
|
+
|
|
634
|
+
| Parameter | Tags | Description |
|
|
635
|
+
|-----------|------|-------------|
|
|
636
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
637
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
#### Example Usage
|
|
641
|
+
|
|
642
|
+
```ruby
|
|
643
|
+
content_type = 'application/json'
|
|
644
|
+
body_value = "{\r\n \"data\": {\r\n \"productId\": 1235124634,\r\n \"images\": [\r\n {\r\n \"url\": \"https://aff.bstatic.com/images/hotel/max500/110/11069102.jpg\"\r\n }\r\n ]\r\n }\r\n}";
|
|
645
|
+
body = JSON.parse(body_value);
|
|
646
|
+
|
|
647
|
+
result = images_controller.delete_list_of_images(content_type, body)
|
|
648
|
+
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
### <a name="delete_all_images_per_property"></a> delete_all_images_per_property
|
|
653
|
+
|
|
654
|
+
> This function allows logged in user to delete images.
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
```ruby
|
|
658
|
+
def delete_all_images_per_property(content_type,
|
|
659
|
+
product_id); end
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
#### Parameters
|
|
663
|
+
|
|
664
|
+
| Parameter | Tags | Description |
|
|
665
|
+
|-----------|------|-------------|
|
|
666
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
667
|
+
| product_id | ``` Required ``` | ID of property for which you want to delete all images |
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
#### Example Usage
|
|
671
|
+
|
|
672
|
+
```ruby
|
|
673
|
+
content_type = 'application/json'
|
|
674
|
+
product_id = 'productId'
|
|
675
|
+
|
|
676
|
+
result = images_controller.delete_all_images_per_property(content_type, product_id)
|
|
677
|
+
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
[Back to List of Controllers](#list_of_controllers)
|
|
682
|
+
|
|
683
|
+
## <a name="rates_and_availability_controller"></a> RatesAndAvailabilityController
|
|
684
|
+
|
|
685
|
+
### Get singleton instance
|
|
686
|
+
|
|
687
|
+
The singleton instance of the ``` RatesAndAvailabilityController ``` class can be accessed from the API Client.
|
|
688
|
+
|
|
689
|
+
```ruby
|
|
690
|
+
ratesAndAvailability_controller = client.rates_and_availability
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
### <a name="get_rates_and_availability_product_id"></a> get_rates_and_availability_product_id
|
|
694
|
+
|
|
695
|
+
> This function allows logged in users to get rates and availability for the specific product.
|
|
696
|
+
> Every API call in this section should be with PM credentials.
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
```ruby
|
|
700
|
+
def get_rates_and_availability_product_id(content_type,
|
|
701
|
+
product_id); end
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
#### Parameters
|
|
705
|
+
|
|
706
|
+
| Parameter | Tags | Description |
|
|
707
|
+
|-----------|------|-------------|
|
|
708
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
709
|
+
| product_id | ``` Required ``` | ID of the property |
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
#### Example Usage
|
|
713
|
+
|
|
714
|
+
```ruby
|
|
715
|
+
content_type = 'application/json'
|
|
716
|
+
product_id = 'productId'
|
|
717
|
+
|
|
718
|
+
result = ratesAndAvailability_controller.get_rates_and_availability_product_id(content_type, product_id)
|
|
719
|
+
|
|
720
|
+
```
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
### <a name="create_and_update_rates_and_availability"></a> create_and_update_rates_and_availability
|
|
724
|
+
|
|
725
|
+
> Create and update calls are the same. When data is sent, if the data already exists in BookingPal - that data will be updated. Otherwise it will be created (inserted). If you want to update data for some period, you should just send data for these dates. All other data (for other dates) will remain untouched. This allows you to update only changed periods and we will not delete previously sent data for other periods.
|
|
726
|
+
>
|
|
727
|
+
> In the case of a first data push, all data for one property should be sent in one request. When making updates or changes to existing data, then all changed data should be sent in one request.
|
|
728
|
+
>
|
|
729
|
+
> Note: if property is set to use LOS rates (supportedLosRates) - only field leadTime, array availableCount and availability can be updated in this API call (for MLT property). For SGL property only leadTime and availability can be updated. This API call can not be used for OWN properties.
|
|
730
|
+
> Important: Maximum allowed end date in any data type is 3 years in future.
|
|
731
|
+
>
|
|
732
|
+
> Every API call in this section should be with PM credentials.
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
```ruby
|
|
736
|
+
def create_and_update_rates_and_availability(content_type,
|
|
737
|
+
body); end
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
#### Parameters
|
|
741
|
+
|
|
742
|
+
| Parameter | Tags | Description |
|
|
743
|
+
|-----------|------|-------------|
|
|
744
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
745
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
#### Example Usage
|
|
749
|
+
|
|
750
|
+
```ruby
|
|
751
|
+
content_type = 'application/json'
|
|
752
|
+
body_value = "{\r\n \"data\": {\r\n \"productId\": 1235124634,\r\n \"leadTime\": 2,\r\n \"rates\": [\r\n {\r\n \"beginDate\": \"2020-01-20\",\r\n \"endDate\": \"2021-01-25\",\r\n \"amount\": 137.0\r\n }\r\n ],\r\n \"minStays\": [\r\n {\r\n \"beginDate\": \"2020-01-20\",\r\n \"endDate\": \"2021-01-25\",\r\n \"minStay\": 5\r\n }\r\n ],\r\n \"maxStays\": [\r\n {\r\n \"beginDate\": \"2020-01-20\",\r\n \"endDate\": \"2021-01-25\",\r\n \"maxStay\": 20\r\n }\r\n ],\r\n \"restrictions\": [\r\n {\r\n \"beginDate\": \"2020-01-20\",\r\n \"endDate\": \"2021-01-25\",\r\n \"checkIn\": {\r\n \"monday\": false,\r\n \"tuesday\": false,\r\n \"wednesday\": false,\r\n \"thursday\": false,\r\n \"friday\": false,\r\n \"saturday\": true,\r\n \"sunday\": true\r\n },\r\n \"checkOut\": {\r\n \"monday\": false,\r\n \"tuesday\": false,\r\n \"wednesday\": false,\r\n \"thursday\": false,\r\n \"friday\": false,\r\n \"saturday\": true,\r\n \"sunday\": true\r\n }\r\n }\r\n ],\r\n \"availabilities\": [\r\n {\r\n \"beginDate\": \"2020-04-20\",\r\n \"endDate\": \"2020-04-25\",\r\n \"availability\": false\r\n },\r\n {\r\n \"beginDate\": \"2020-04-26\",\r\n \"endDate\": \"2020-04-28\",\r\n \"availability\": true\r\n }\r\n ],\r\n \"availableCount\": [\r\n {\r\n \"beginDate\": \"2020-04-20\",\r\n \"endDate\": \"2020-04-25\",\r\n \"count\": 3\r\n },\r\n {\r\n \"beginDate\": \"2020-04-26\",\r\n \"endDate\": \"2020-04-28\",\r\n \"count\": 4\r\n }\r\n ]\r\n }\r\n}";
|
|
753
|
+
body = JSON.parse(body_value);
|
|
754
|
+
|
|
755
|
+
result = ratesAndAvailability_controller.create_and_update_rates_and_availability(content_type, body)
|
|
756
|
+
|
|
757
|
+
```
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
[Back to List of Controllers](#list_of_controllers)
|
|
761
|
+
|
|
762
|
+
## <a name="los_pricing_controller"></a> LOSPricingController
|
|
763
|
+
|
|
764
|
+
### Get singleton instance
|
|
765
|
+
|
|
766
|
+
The singleton instance of the ``` LOSPricingController ``` class can be accessed from the API Client.
|
|
767
|
+
|
|
768
|
+
```ruby
|
|
769
|
+
lOSPricing_controller = client.los_pricing
|
|
770
|
+
```
|
|
771
|
+
|
|
772
|
+
### <a name="create_and_update_los_length_of_stay_pricing"></a> create_and_update_los_length_of_stay_pricing
|
|
773
|
+
|
|
774
|
+
> Introduction: You can use this function if you would like to send BookingPal different prices for various Length of Stays with the same starting date.
|
|
775
|
+
>
|
|
776
|
+
>
|
|
777
|
+
>
|
|
778
|
+
> LOS Pricing will be a different method in sending rates to BookingPal and is defined as pricing sent for a specific “Stay ranges”, In the LOS method you are setting specific rates based on the Length of Stay. (This is a different way to push rates to BookingPal. )
|
|
779
|
+
>
|
|
780
|
+
>
|
|
781
|
+
>
|
|
782
|
+
> For date periods of 1 to 30 days a specific rate need to enter check-in date and a rate for every possible reservation starting at that date (i.e. 1 day, 2 days, up to 30 days, 30 days is the maximum value allowed for this field) you will need to send BookingPal total rate value for that period.
|
|
783
|
+
>
|
|
784
|
+
>
|
|
785
|
+
>
|
|
786
|
+
> Maximum LOS number of days is 30. All other LOS values after 30 will not be saved. If you do not support reservation for some specific number of dates - send value 0.00 for this LOS number of days. Keep in mind that all values not sent for any specific check-in date will be considered as 0, and reservation for this number of days will not be possible.
|
|
787
|
+
>
|
|
788
|
+
> Field maxGuests allows you to set different rates per different number of guests. If you do not have different rate values per number of guests - you can send the value for maximum number of guests, and all others will have the same rate.
|
|
789
|
+
>
|
|
790
|
+
>
|
|
791
|
+
>
|
|
792
|
+
> For MLT properties which supported LOS price for update number of count you can use it rates and availability API.
|
|
793
|
+
>
|
|
794
|
+
>
|
|
795
|
+
>
|
|
796
|
+
> It is suggested to manage availability over “rates and availability” API call, and to close/open dates over this call.
|
|
797
|
+
>
|
|
798
|
+
>
|
|
799
|
+
>
|
|
800
|
+
> Note: this API call can be used only if you set supportedLosRates = true on the product. Otherwise using this API for specific product is not possible.
|
|
801
|
+
>
|
|
802
|
+
>
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
```ruby
|
|
806
|
+
def create_and_update_los_length_of_stay_pricing(content_type,
|
|
807
|
+
body); end
|
|
808
|
+
```
|
|
809
|
+
|
|
810
|
+
#### Parameters
|
|
811
|
+
|
|
812
|
+
| Parameter | Tags | Description |
|
|
813
|
+
|-----------|------|-------------|
|
|
814
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
815
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
#### Example Usage
|
|
819
|
+
|
|
820
|
+
```ruby
|
|
821
|
+
content_type = 'application/json'
|
|
822
|
+
body_value = "{\r\n \"data\": {\r\n \"productId\": 1235124634,\r\n \"losRates\": [\r\n {\r\n \"checkInDate\": \"2020-06-20\",\r\n \"maxGuests\": 3,\r\n \"losValue\": [\r\n 100.0,\r\n 150.0,\r\n 200.0,\r\n 250.0,\r\n 300.0,\r\n 0.0,\r\n 0.0,\r\n 450.0,\r\n 500.0,\r\n 550.0,\r\n 600.0,\r\n 650.0,\r\n 700.0,\r\n 750.0,\r\n 800.0,\r\n 850.0,\r\n 900.0,\r\n 950.0,\r\n 550.0,\r\n 510.0,\r\n 570.0,\r\n 520.0,\r\n 500.0,\r\n 510.0,\r\n 590.0,\r\n 121.0,\r\n 122.0,\r\n 123.0\r\n ]\r\n },\r\n {\r\n \"checkInDate\": \"2020-05-21\",\r\n \"currency\": \"USD\",\r\n \"maxGuests\": 4,\r\n \"losValue\": [\r\n 111.0,\r\n 112.0,\r\n 123.0,\r\n 250.0,\r\n 300.0,\r\n 350.0,\r\n 400.0,\r\n 450.0,\r\n 500.0,\r\n 550.0,\r\n 600.0,\r\n 650.0,\r\n 700.0,\r\n 750.0,\r\n 800.0,\r\n 850.0,\r\n 900.0,\r\n 950.0,\r\n 550.0,\r\n 510.0,\r\n 570.0,\r\n 520.0,\r\n 500.0,\r\n 510.0,\r\n 590.0,\r\n 580.0,\r\n 560.0,\r\n 540.0\r\n ]\r\n }\r\n ]\r\n }\r\n}";
|
|
823
|
+
body = JSON.parse(body_value);
|
|
824
|
+
|
|
825
|
+
result = lOSPricing_controller.create_and_update_los_length_of_stay_pricing(content_type, body)
|
|
826
|
+
|
|
827
|
+
```
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
### <a name="get_los_prices_list_by_product_id"></a> get_los_prices_list_by_product_id
|
|
831
|
+
|
|
832
|
+
> This function allows the logged in user to get a LOS rate for property.
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
```ruby
|
|
836
|
+
def get_los_prices_list_by_product_id(product_id); end
|
|
837
|
+
```
|
|
838
|
+
|
|
839
|
+
#### Parameters
|
|
840
|
+
|
|
841
|
+
| Parameter | Tags | Description |
|
|
842
|
+
|-----------|------|-------------|
|
|
843
|
+
| product_id | ``` Required ``` | Property ID in BookingPal |
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
#### Example Usage
|
|
847
|
+
|
|
848
|
+
```ruby
|
|
849
|
+
product_id = 'productId'
|
|
850
|
+
|
|
851
|
+
result = lOSPricing_controller.get_los_prices_list_by_product_id(product_id)
|
|
852
|
+
|
|
853
|
+
```
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
[Back to List of Controllers](#list_of_controllers)
|
|
857
|
+
|
|
858
|
+
## <a name="fee_and_tax_controller"></a> FeeAndTaxController
|
|
859
|
+
|
|
860
|
+
### Get singleton instance
|
|
861
|
+
|
|
862
|
+
The singleton instance of the ``` FeeAndTaxController ``` class can be accessed from the API Client.
|
|
863
|
+
|
|
864
|
+
```ruby
|
|
865
|
+
feeAndTax_controller = client.fee_and_tax
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
### <a name="get_fee_and_tax_list_by_product_id"></a> get_fee_and_tax_list_by_product_id
|
|
869
|
+
|
|
870
|
+
> This function allows the logged in user to get a fee list for the specific product.
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
```ruby
|
|
874
|
+
def get_fee_and_tax_list_by_product_id(product_id); end
|
|
875
|
+
```
|
|
876
|
+
|
|
877
|
+
#### Parameters
|
|
878
|
+
|
|
879
|
+
| Parameter | Tags | Description |
|
|
880
|
+
|-----------|------|-------------|
|
|
881
|
+
| product_id | ``` Required ``` | ID of the property |
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
#### Example Usage
|
|
885
|
+
|
|
886
|
+
```ruby
|
|
887
|
+
product_id = 'productId'
|
|
888
|
+
|
|
889
|
+
result = feeAndTax_controller.get_fee_and_tax_list_by_product_id(product_id)
|
|
890
|
+
|
|
891
|
+
```
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
### <a name="create_fee_and_tax"></a> create_fee_and_tax
|
|
895
|
+
|
|
896
|
+
> This function allows the logged in user to set fees (i.e. cleaning fee, damage waiver, extra bed, extra person etc.) and taxes for the specific product. Here, you always need to send all fees and taxes for one property. All fees or taxes which were in our system for that property and which are not in the new request will be deleted. Taxes in the BookingPal system will always have percent value.
|
|
897
|
+
>
|
|
898
|
+
> If you want to delete all fees and/or taxes for one property (if you do not have fees and taxes in your system for one property) send an empty list of fees and.or taxes. In short when you use this request you need to always send us a full list of fees and taxes per property, since we will do a full update.
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
```ruby
|
|
902
|
+
def create_fee_and_tax(content_type,
|
|
903
|
+
body); end
|
|
904
|
+
```
|
|
905
|
+
|
|
906
|
+
#### Parameters
|
|
907
|
+
|
|
908
|
+
| Parameter | Tags | Description |
|
|
909
|
+
|-----------|------|-------------|
|
|
910
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
911
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
912
|
+
|
|
913
|
+
|
|
914
|
+
#### Example Usage
|
|
915
|
+
|
|
916
|
+
```ruby
|
|
917
|
+
content_type = 'application/json'
|
|
918
|
+
body_value = "{\r\n \"data\": {\r\n \"productId\": 1235124634,\r\n \"fees\": [\r\n {\r\n \"entityType\": \"OPTIONAL\",\r\n \"feeType\": \"GENERAL\",\r\n \"option\": 3,\r\n \"name\": \"RetestFeeHF\",\r\n \"beginDate\": \"2020-02-26\",\r\n \"endDate\": \"2020-12-12\",\r\n \"taxType\": \"TAXABLE\",\r\n \"unit\": \"PER_DAY_PER_PERSON_EXTRA\",\r\n \"value\": 88,\r\n \"valueType\": \"PERCENT\"\r\n }\r\n ],\r\n \"taxes\": [\r\n {\r\n \"name\": \"Tax reTestAT\",\r\n \"type\": \"SalesTaxIncluded\",\r\n \"value\": 55,\r\n \"altId\": \"11\"\r\n }\r\n ]\r\n }\r\n}";
|
|
919
|
+
body = JSON.parse(body_value);
|
|
920
|
+
|
|
921
|
+
result = feeAndTax_controller.create_fee_and_tax(content_type, body)
|
|
922
|
+
|
|
923
|
+
```
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
[Back to List of Controllers](#list_of_controllers)
|
|
927
|
+
|
|
928
|
+
## <a name="fee_and_tax_mandatory_at_the_property_level_controller"></a> FeeAndTaxMandatoryAtThePropertyLevelController
|
|
929
|
+
|
|
930
|
+
### Get singleton instance
|
|
931
|
+
|
|
932
|
+
The singleton instance of the ``` FeeAndTaxMandatoryAtThePropertyLevelController ``` class can be accessed from the API Client.
|
|
933
|
+
|
|
934
|
+
```ruby
|
|
935
|
+
feeAndTaxMandatoryAtThePropertyLevel_controller = client.fee_and_tax_mandatory_at_the_property_level
|
|
936
|
+
```
|
|
937
|
+
|
|
938
|
+
### <a name="get_fee_and_tax_mandatory"></a> get_fee_and_tax_mandatory
|
|
939
|
+
|
|
940
|
+
> This function allows the logged in user to get info about current set for all PM properties are fees/taxes set to be mandatory or not.
|
|
941
|
+
>
|
|
942
|
+
>
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
```ruby
|
|
946
|
+
def get_fee_and_tax_mandatory; end
|
|
947
|
+
```
|
|
948
|
+
|
|
949
|
+
#### Example Usage
|
|
950
|
+
|
|
951
|
+
```ruby
|
|
952
|
+
|
|
953
|
+
result = feeAndTaxMandatoryAtThePropertyLevel_controller.get_fee_and_tax_mandatory()
|
|
954
|
+
|
|
955
|
+
```
|
|
956
|
+
|
|
957
|
+
|
|
958
|
+
### <a name="create_import_or_update_fee_and_tax_mandatory"></a> create_import_or_update_fee_and_tax_mandatory
|
|
959
|
+
|
|
960
|
+
> This function allows the logged in user to import or update a fee and tax mandatory.
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
```ruby
|
|
964
|
+
def create_import_or_update_fee_and_tax_mandatory(content_type,
|
|
965
|
+
body); end
|
|
966
|
+
```
|
|
967
|
+
|
|
968
|
+
#### Parameters
|
|
969
|
+
|
|
970
|
+
| Parameter | Tags | Description |
|
|
971
|
+
|-----------|------|-------------|
|
|
972
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
973
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
#### Example Usage
|
|
977
|
+
|
|
978
|
+
```ruby
|
|
979
|
+
content_type = 'application/json'
|
|
980
|
+
body_value = "{\r\n \"data\": {\r\n \"validationSettings\": [\r\n {\r\n \"productId\": 1235124634,\r\n \"isFeeMandatory\": false,\r\n \"isTaxMandatory\": false\r\n }\r\n ]\r\n }\r\n}";
|
|
981
|
+
body = JSON.parse(body_value);
|
|
982
|
+
|
|
983
|
+
result = feeAndTaxMandatoryAtThePropertyLevel_controller.create_import_or_update_fee_and_tax_mandatory(content_type, body)
|
|
984
|
+
|
|
985
|
+
```
|
|
986
|
+
|
|
987
|
+
|
|
988
|
+
### <a name="create_remove_validation_settings"></a> create_remove_validation_settings
|
|
989
|
+
|
|
990
|
+
> This function allows the logged in user to remove any setup on property level and to return on default (which is that fee/taxes are mandatory). This API call will accept a list of properties.
|
|
991
|
+
>
|
|
992
|
+
>
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
```ruby
|
|
996
|
+
def create_remove_validation_settings(content_type,
|
|
997
|
+
body); end
|
|
998
|
+
```
|
|
999
|
+
|
|
1000
|
+
#### Parameters
|
|
1001
|
+
|
|
1002
|
+
| Parameter | Tags | Description |
|
|
1003
|
+
|-----------|------|-------------|
|
|
1004
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
1005
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
1006
|
+
|
|
1007
|
+
|
|
1008
|
+
#### Example Usage
|
|
1009
|
+
|
|
1010
|
+
```ruby
|
|
1011
|
+
content_type = 'application/json'
|
|
1012
|
+
body_value = "{\r\n \"data\": [\r\n 1235124634\r\n ]\r\n}";
|
|
1013
|
+
body = JSON.parse(body_value);
|
|
1014
|
+
|
|
1015
|
+
result = feeAndTaxMandatoryAtThePropertyLevel_controller.create_remove_validation_settings(content_type, body)
|
|
1016
|
+
|
|
1017
|
+
```
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
[Back to List of Controllers](#list_of_controllers)
|
|
1021
|
+
|
|
1022
|
+
## <a name="yields_controller"></a> YieldsController
|
|
1023
|
+
|
|
1024
|
+
### Get singleton instance
|
|
1025
|
+
|
|
1026
|
+
The singleton instance of the ``` YieldsController ``` class can be accessed from the API Client.
|
|
1027
|
+
|
|
1028
|
+
```ruby
|
|
1029
|
+
yields_controller = client.yields
|
|
1030
|
+
```
|
|
1031
|
+
|
|
1032
|
+
### <a name="get_ymr_list_by_product_id"></a> get_ymr_list_by_product_id
|
|
1033
|
+
|
|
1034
|
+
> This function allows the logged in user to get yield management rules list of the specific product.
|
|
1035
|
+
>
|
|
1036
|
+
>
|
|
1037
|
+
|
|
1038
|
+
|
|
1039
|
+
```ruby
|
|
1040
|
+
def get_ymr_list_by_product_id(product_id); end
|
|
1041
|
+
```
|
|
1042
|
+
|
|
1043
|
+
#### Parameters
|
|
1044
|
+
|
|
1045
|
+
| Parameter | Tags | Description |
|
|
1046
|
+
|-----------|------|-------------|
|
|
1047
|
+
| product_id | ``` Required ``` | ID of the property |
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
#### Example Usage
|
|
1051
|
+
|
|
1052
|
+
```ruby
|
|
1053
|
+
product_id = 'productId'
|
|
1054
|
+
|
|
1055
|
+
result = yields_controller.get_ymr_list_by_product_id(product_id)
|
|
1056
|
+
|
|
1057
|
+
```
|
|
1058
|
+
|
|
1059
|
+
|
|
1060
|
+
### <a name="create_ymr"></a> create_ymr
|
|
1061
|
+
|
|
1062
|
+
> This function allows the logged-in user to add yield management rules for the specific product. Yield management rules can affect the final price of the property depending on some special conditions (like the length of stay, early booking, etc.). These rules automate price manipulations, on an inquiry by inquiry basis. When set criteria are met, they help maximize revenue and occupancy.
|
|
1063
|
+
>
|
|
1064
|
+
> How is the price calculated?
|
|
1065
|
+
> The price for a night is calculated based on the basic price and the yield management rules.
|
|
1066
|
+
>
|
|
1067
|
+
> - If no YMR:
|
|
1068
|
+
> {basic price per night} = price per night
|
|
1069
|
+
> - If YMR is set it can Increase/decrease percent or increase/decrease amount:
|
|
1070
|
+
> {basic price per night} + {yield amount} = {price per night}
|
|
1071
|
+
> or
|
|
1072
|
+
> {basic price per night} - {yield amount} = {price per night}
|
|
1073
|
+
>
|
|
1074
|
+
> The below examples will use the scenario to walk you step by step and explain how the price is calculated based on different YMRs.
|
|
1075
|
+
> Let’s say that the basic price per night for 2016 is 100 USD.
|
|
1076
|
+
>
|
|
1077
|
+
> This function is used also for updating yield. So if you already create a specific yield for some date - and you send a new one - we will update the yield for this date.
|
|
1078
|
+
> If you need to delete a specific yield type - you can send an empty list for that type.
|
|
1079
|
+
>
|
|
1080
|
+
> Important: The maximum allowed end date is 3 years in the future.
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
```ruby
|
|
1084
|
+
def create_ymr(content_type,
|
|
1085
|
+
body); end
|
|
1086
|
+
```
|
|
1087
|
+
|
|
1088
|
+
#### Parameters
|
|
1089
|
+
|
|
1090
|
+
| Parameter | Tags | Description |
|
|
1091
|
+
|-----------|------|-------------|
|
|
1092
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
1093
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
1094
|
+
|
|
1095
|
+
|
|
1096
|
+
#### Example Usage
|
|
1097
|
+
|
|
1098
|
+
```ruby
|
|
1099
|
+
content_type = 'application/json'
|
|
1100
|
+
body_value = "{\r\n \"data\": {\r\n \"productId\": 1235124634,\r\n \"weekend\": [\r\n {\r\n \"beginDate\": \"2020-02-10\",\r\n \"endDate\": \"2021-02-15\",\r\n \"amount\": 18.0,\r\n \"modifier\": \"DECREASE_PERCENT\",\r\n \"weekendParam\": \"DAYS_OF_WEEKEND_SAT_SUN\"\r\n }\r\n ],\r\n \"lengthOfStay\": [\r\n {\r\n \"beginDate\": \"2020-02-10\",\r\n \"endDate\": \"2021-02-15\",\r\n \"amount\": 34.0,\r\n \"modifier\": \"INCREASE_AMOUNT\",\r\n \"param\": 7\r\n }\r\n ],\r\n \"dateRange\": [\r\n {\r\n \"beginDate\": \"2020-04-10\",\r\n \"endDate\": \"2020-04-15\",\r\n \"amount\": 35.0,\r\n \"modifier\": \"INCREASE_AMOUNT\"\r\n },\r\n {\r\n \"beginDate\": \"2020-05-16\",\r\n \"endDate\": \"2020-05-25\",\r\n \"amount\": 25.0,\r\n \"modifier\": \"INCREASE_PERCENT\"\r\n }\r\n ]\r\n }\r\n}";
|
|
1101
|
+
body = JSON.parse(body_value);
|
|
1102
|
+
|
|
1103
|
+
result = yields_controller.create_ymr(content_type, body)
|
|
1104
|
+
|
|
1105
|
+
```
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
[Back to List of Controllers](#list_of_controllers)
|
|
1109
|
+
|
|
1110
|
+
## <a name="validation_controller"></a> ValidationController
|
|
1111
|
+
|
|
1112
|
+
### Get singleton instance
|
|
1113
|
+
|
|
1114
|
+
The singleton instance of the ``` ValidationController ``` class can be accessed from the API Client.
|
|
1115
|
+
|
|
1116
|
+
```ruby
|
|
1117
|
+
validation_controller = client.validation
|
|
1118
|
+
```
|
|
1119
|
+
|
|
1120
|
+
### <a name="get_booking_pal_validation_job_full_pm"></a> get_booking_pal_validation_job_full_pm
|
|
1121
|
+
|
|
1122
|
+
> This function will allow the PMC to call the BookingPal property validation job for all properties identified which belong to the current user. Authorization token should be on PM level.
|
|
1123
|
+
> Also we will run validation only for properties which are activated. If you deactivate property - we will not validate this property.
|
|
1124
|
+
>
|
|
1125
|
+
> After the request you will get a response indicating if messages were processed or not. If the request is good your request for the validator job will be put into a queue. Once the request is processed, BookingPal will send an async push message per property informing the user if a property is valid or not, and if it is not valid - with reasons why the validation failed. This message will be sent on the endpoint which was entered in section Push Notifications, field asyncPush.
|
|
1126
|
+
>
|
|
1127
|
+
> Note: If the property is distributed already on some channel - this property will not be moved to an Incomplete state. Also if you have property on Incomplete state because of some reason, and you update this data which causes that property is on ‘Incomplete’ property will not be moved automatically to a valid state. Instead, you should run a Validation job manually for that property or wait for our automatic validation job which we are running once per day.
|
|
1128
|
+
>
|
|
1129
|
+
> To make the property ready for Onboarding you should run validation first. if the property is valid - it will be ready for onboarding. Otherwise - the property will be in Incomplete state. Also, we will run validation only for properties that are activated. If you deactivate property - we will not validate this property.
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
```ruby
|
|
1133
|
+
def get_booking_pal_validation_job_full_pm; end
|
|
1134
|
+
```
|
|
1135
|
+
|
|
1136
|
+
#### Example Usage
|
|
1137
|
+
|
|
1138
|
+
```ruby
|
|
1139
|
+
|
|
1140
|
+
result = validation_controller.get_booking_pal_validation_job_full_pm()
|
|
1141
|
+
|
|
1142
|
+
```
|
|
1143
|
+
|
|
1144
|
+
|
|
1145
|
+
### <a name="create_booking_pal_validation_job_list_of_properties"></a> create_booking_pal_validation_job_list_of_properties
|
|
1146
|
+
|
|
1147
|
+
> This function will allow the PMS to call the BookingPal property validation job for a list of properties from request. These properties must belong to the current user and authorization token should be on PM level.
|
|
1148
|
+
> Also, we will run validation only for properties that are activated. If you deactivate property - we will not validate this property.
|
|
1149
|
+
|
|
1150
|
+
|
|
1151
|
+
```ruby
|
|
1152
|
+
def create_booking_pal_validation_job_list_of_properties(content_type,
|
|
1153
|
+
body); end
|
|
1154
|
+
```
|
|
1155
|
+
|
|
1156
|
+
#### Parameters
|
|
1157
|
+
|
|
1158
|
+
| Parameter | Tags | Description |
|
|
1159
|
+
|-----------|------|-------------|
|
|
1160
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
1161
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
1162
|
+
|
|
1163
|
+
|
|
1164
|
+
#### Example Usage
|
|
1165
|
+
|
|
1166
|
+
```ruby
|
|
1167
|
+
content_type = 'application/json'
|
|
1168
|
+
body_value = "{ \"data\": { \"productIds\": [1235124634] }}";
|
|
1169
|
+
body = JSON.parse(body_value);
|
|
1170
|
+
|
|
1171
|
+
result = validation_controller.create_booking_pal_validation_job_list_of_properties(content_type, body)
|
|
1172
|
+
|
|
1173
|
+
```
|
|
1174
|
+
|
|
1175
|
+
|
|
1176
|
+
[Back to List of Controllers](#list_of_controllers)
|
|
1177
|
+
|
|
1178
|
+
## <a name="testing_of_message_api_calls_controller"></a> TestingOfMessageAPICallsController
|
|
1179
|
+
|
|
1180
|
+
### Get singleton instance
|
|
1181
|
+
|
|
1182
|
+
The singleton instance of the ``` TestingOfMessageAPICallsController ``` class can be accessed from the API Client.
|
|
1183
|
+
|
|
1184
|
+
```ruby
|
|
1185
|
+
testingOfMessageAPICalls_controller = client.testing_of_message_api_calls
|
|
1186
|
+
```
|
|
1187
|
+
|
|
1188
|
+
### <a name="get_test_message_threads"></a> get_test_message_threads
|
|
1189
|
+
|
|
1190
|
+
> This function allows the logged in user to get all message threads or message threads with an unresponded message from guest for the whole PM. You need to use PM credentials. There is also paging as optional values. If you do not pass this value, we will return the first page and 10 threads per page.
|
|
1191
|
+
>
|
|
1192
|
+
> Since API calls for messages depend on channel connections and these values will exist in BookingPal only if guests on channel create some message, these calls can work only on production. So for testing purposes we’ve built an additional endpoint with the same API calls where you will be able to test these calls.
|
|
1193
|
+
>
|
|
1194
|
+
> Note: To be able to test these calls, you need to have at least 1 property, since we will in response return you messages for 1 property from your PM.
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
```ruby
|
|
1198
|
+
def get_test_message_threads(page,
|
|
1199
|
+
limit,
|
|
1200
|
+
thread_type); end
|
|
1201
|
+
```
|
|
1202
|
+
|
|
1203
|
+
#### Parameters
|
|
1204
|
+
|
|
1205
|
+
| Parameter | Tags | Description |
|
|
1206
|
+
|-----------|------|-------------|
|
|
1207
|
+
| page | ``` Required ``` | TODO: Add a parameter description |
|
|
1208
|
+
| limit | ``` Required ``` | TODO: Add a parameter description |
|
|
1209
|
+
| thread_type | ``` Required ``` | Request all threads or only threads with unanswered message {new,all} |
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
#### Example Usage
|
|
1213
|
+
|
|
1214
|
+
```ruby
|
|
1215
|
+
page = 35
|
|
1216
|
+
limit = 35
|
|
1217
|
+
thread_type = 'threadType'
|
|
1218
|
+
|
|
1219
|
+
result = testingOfMessageAPICalls_controller.get_test_message_threads(page, limit, thread_type)
|
|
1220
|
+
|
|
1221
|
+
```
|
|
1222
|
+
|
|
1223
|
+
|
|
1224
|
+
### <a name="get_test_message_list_for_specific_thread"></a> get_test_message_list_for_specific_thread
|
|
1225
|
+
|
|
1226
|
+
> Since API calls for messages depend on channel connections and these values will exist in BookingPal only if guests on channel create some message, these calls can work only on production. So for testing purposes, we’ve built an additional endpoint with the same API calls where you will be able to test these calls.
|
|
1227
|
+
>
|
|
1228
|
+
> This function allows the logged-in user to get a list of all messages from passed thread Id. You need to use PM credentials
|
|
1229
|
+
>
|
|
1230
|
+
> Note: To be able to test these calls, you need to have at least 1 property, since we will in response return you messages for 1 property from your PM.
|
|
1231
|
+
|
|
1232
|
+
|
|
1233
|
+
```ruby
|
|
1234
|
+
def get_test_message_list_for_specific_thread(thread_id); end
|
|
1235
|
+
```
|
|
1236
|
+
|
|
1237
|
+
#### Parameters
|
|
1238
|
+
|
|
1239
|
+
| Parameter | Tags | Description |
|
|
1240
|
+
|-----------|------|-------------|
|
|
1241
|
+
| thread_id | ``` Required ``` | ID of thread |
|
|
1242
|
+
|
|
1243
|
+
|
|
1244
|
+
#### Example Usage
|
|
1245
|
+
|
|
1246
|
+
```ruby
|
|
1247
|
+
thread_id = 'threadId'
|
|
1248
|
+
|
|
1249
|
+
result = testingOfMessageAPICalls_controller.get_test_message_list_for_specific_thread(thread_id)
|
|
1250
|
+
|
|
1251
|
+
```
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
### <a name="post_new_test_message_for_specific_thread"></a> post_new_test_message_for_specific_thread
|
|
1255
|
+
|
|
1256
|
+
> This function will allow PM to post new messages in already existing threads. Since this call is only for testing - we will not actually save these passed values.
|
|
1257
|
+
>
|
|
1258
|
+
> Since API calls for messages depend on channel connections and these values will exist in BookingPal only if guests on channel create some message, these calls can work only on production. So for testing purposes, we’ve built an additional endpoint with the same API calls where you will be able to test these calls.
|
|
1259
|
+
>
|
|
1260
|
+
> Note: To be able to test these calls, you need to have at least 1 property, since we will in response return to you messages for 1 property from your PM.
|
|
1261
|
+
|
|
1262
|
+
|
|
1263
|
+
```ruby
|
|
1264
|
+
def post_new_test_message_for_specific_thread(body); end
|
|
1265
|
+
```
|
|
1266
|
+
|
|
1267
|
+
#### Parameters
|
|
1268
|
+
|
|
1269
|
+
| Parameter | Tags | Description |
|
|
1270
|
+
|-----------|------|-------------|
|
|
1271
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
1272
|
+
|
|
1273
|
+
|
|
1274
|
+
#### Example Usage
|
|
1275
|
+
|
|
1276
|
+
```ruby
|
|
1277
|
+
body_value = "{\r\n \"data\": {\r\n \"threadId\": 5656,\r\n \"message\": \"new message\",\r\n \"productId\": 1235124634\r\n }\r\n}";
|
|
1278
|
+
body = JSON.parse(body_value);
|
|
1279
|
+
|
|
1280
|
+
result = testingOfMessageAPICalls_controller.post_new_test_message_for_specific_thread(body)
|
|
1281
|
+
|
|
1282
|
+
```
|
|
1283
|
+
|
|
1284
|
+
|
|
1285
|
+
[Back to List of Controllers](#list_of_controllers)
|
|
1286
|
+
|
|
1287
|
+
## <a name="messaging_controller"></a> MessagingController
|
|
1288
|
+
|
|
1289
|
+
### Get singleton instance
|
|
1290
|
+
|
|
1291
|
+
The singleton instance of the ``` MessagingController ``` class can be accessed from the API Client.
|
|
1292
|
+
|
|
1293
|
+
```ruby
|
|
1294
|
+
messaging_controller = client.messaging
|
|
1295
|
+
```
|
|
1296
|
+
|
|
1297
|
+
### <a name="get_message_threads"></a> get_message_threads
|
|
1298
|
+
|
|
1299
|
+
> This function allows the logged in user to get all message threads or message threads with unresponded message from guest for whole PM. You need to use PM credentials. There is also paging as optional values. If you do not pass this value, we will return first page and 10 threads per page. And in heading you will get a link for the next page.
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
```ruby
|
|
1303
|
+
def get_message_threads(page,
|
|
1304
|
+
limit,
|
|
1305
|
+
thread_type); end
|
|
1306
|
+
```
|
|
1307
|
+
|
|
1308
|
+
#### Parameters
|
|
1309
|
+
|
|
1310
|
+
| Parameter | Tags | Description |
|
|
1311
|
+
|-----------|------|-------------|
|
|
1312
|
+
| page | ``` Required ``` | Number of current page |
|
|
1313
|
+
| limit | ``` Required ``` | Limit of how many threads will be showed at one page |
|
|
1314
|
+
| thread_type | ``` Required ``` | Request all threads or only threads with unanswered message {new,all} |
|
|
1315
|
+
|
|
1316
|
+
|
|
1317
|
+
#### Example Usage
|
|
1318
|
+
|
|
1319
|
+
```ruby
|
|
1320
|
+
page = 1
|
|
1321
|
+
limit = 5
|
|
1322
|
+
thread_type = 'threadType'
|
|
1323
|
+
|
|
1324
|
+
result = messaging_controller.get_message_threads(page, limit, thread_type)
|
|
1325
|
+
|
|
1326
|
+
```
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
### <a name="get_message_list_for_specific_thread"></a> get_message_list_for_specific_thread
|
|
1330
|
+
|
|
1331
|
+
> This function allows the logged in user to get a list of all messages from passed thread Id. You need to use PM credentials.
|
|
1332
|
+
>
|
|
1333
|
+
>
|
|
1334
|
+
|
|
1335
|
+
|
|
1336
|
+
```ruby
|
|
1337
|
+
def get_message_list_for_specific_thread(thread_id); end
|
|
1338
|
+
```
|
|
1339
|
+
|
|
1340
|
+
#### Parameters
|
|
1341
|
+
|
|
1342
|
+
| Parameter | Tags | Description |
|
|
1343
|
+
|-----------|------|-------------|
|
|
1344
|
+
| thread_id | ``` Required ``` | ID of the thread |
|
|
1345
|
+
|
|
1346
|
+
|
|
1347
|
+
#### Example Usage
|
|
1348
|
+
|
|
1349
|
+
```ruby
|
|
1350
|
+
thread_id = 'threadId'
|
|
1351
|
+
|
|
1352
|
+
result = messaging_controller.get_message_list_for_specific_thread(thread_id)
|
|
1353
|
+
|
|
1354
|
+
```
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
### <a name="post_new_message_for_specific_thread"></a> post_new_message_for_specific_thread
|
|
1358
|
+
|
|
1359
|
+
> This function will allow PM to post new messages in already existing threads.
|
|
1360
|
+
|
|
1361
|
+
|
|
1362
|
+
```ruby
|
|
1363
|
+
def post_new_message_for_specific_thread(content_type,
|
|
1364
|
+
body); end
|
|
1365
|
+
```
|
|
1366
|
+
|
|
1367
|
+
#### Parameters
|
|
1368
|
+
|
|
1369
|
+
| Parameter | Tags | Description |
|
|
1370
|
+
|-----------|------|-------------|
|
|
1371
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
1372
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
1373
|
+
|
|
1374
|
+
|
|
1375
|
+
#### Example Usage
|
|
1376
|
+
|
|
1377
|
+
```ruby
|
|
1378
|
+
content_type = 'application/json'
|
|
1379
|
+
body_value = "{\r\n \"data\": {\r\n \"threadId\": 5656,\r\n \"message\": \"New message\"\r\n }\r\n}";
|
|
1380
|
+
body = JSON.parse(body_value);
|
|
1381
|
+
|
|
1382
|
+
result = messaging_controller.post_new_message_for_specific_thread(content_type, body)
|
|
1383
|
+
|
|
1384
|
+
```
|
|
1385
|
+
|
|
1386
|
+
|
|
1387
|
+
[Back to List of Controllers](#list_of_controllers)
|
|
1388
|
+
|
|
1389
|
+
## <a name="request_to_book_controller"></a> RequestToBookController
|
|
1390
|
+
|
|
1391
|
+
### Get singleton instance
|
|
1392
|
+
|
|
1393
|
+
The singleton instance of the ``` RequestToBookController ``` class can be accessed from the API Client.
|
|
1394
|
+
|
|
1395
|
+
```ruby
|
|
1396
|
+
requestToBook_controller = client.request_to_book
|
|
1397
|
+
```
|
|
1398
|
+
|
|
1399
|
+
### <a name="create_request_to_book_answer_from_pms"></a> create_request_to_book_answer_from_pms
|
|
1400
|
+
|
|
1401
|
+
> This is an API call which you should use for accepting on avoiding requests to book.
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
```ruby
|
|
1405
|
+
def create_request_to_book_answer_from_pms(content_type,
|
|
1406
|
+
body); end
|
|
1407
|
+
```
|
|
1408
|
+
|
|
1409
|
+
#### Parameters
|
|
1410
|
+
|
|
1411
|
+
| Parameter | Tags | Description |
|
|
1412
|
+
|-----------|------|-------------|
|
|
1413
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
1414
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
1415
|
+
|
|
1416
|
+
|
|
1417
|
+
#### Example Usage
|
|
1418
|
+
|
|
1419
|
+
```ruby
|
|
1420
|
+
content_type = 'application/json'
|
|
1421
|
+
body_value = "{\r\n \"data\": {\r\n \"requestToBookType\": \"ACCEPT\",\r\n \"requestToBookDeclineReasonType\": \"DATES_NOT_AVAILABLE\",\r\n \"declineMessageToGuest\": \"reTest request to book\",\r\n \"reservationId\": 1235124634\r\n }\r\n}";
|
|
1422
|
+
body = JSON.parse(body_value);
|
|
1423
|
+
|
|
1424
|
+
result = requestToBook_controller.create_request_to_book_answer_from_pms(content_type, body)
|
|
1425
|
+
|
|
1426
|
+
```
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
### <a name="create_request_to_book_test"></a> create_request_to_book_test
|
|
1430
|
+
|
|
1431
|
+
> Since you can not get the request to book on our test environment (since this first needs to be created on the channel) We provide the possibility for PMS to test this request with some random filled data in our system. So when you call this API function - we will send you push notification for the request to book for a provided property ID.
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
```ruby
|
|
1435
|
+
def create_request_to_book_test(body); end
|
|
1436
|
+
```
|
|
1437
|
+
|
|
1438
|
+
#### Parameters
|
|
1439
|
+
|
|
1440
|
+
| Parameter | Tags | Description |
|
|
1441
|
+
|-----------|------|-------------|
|
|
1442
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
1443
|
+
|
|
1444
|
+
|
|
1445
|
+
#### Example Usage
|
|
1446
|
+
|
|
1447
|
+
```ruby
|
|
1448
|
+
body_value = "{\r\n \"data\": {\r\n \"action\": \"RESERVATION_REQUEST_VOIDED\",\r\n \"productId\": 1235124634\r\n }\r\n}";
|
|
1449
|
+
body = JSON.parse(body_value);
|
|
1450
|
+
|
|
1451
|
+
result = requestToBook_controller.create_request_to_book_test(body)
|
|
1452
|
+
|
|
1453
|
+
```
|
|
1454
|
+
|
|
1455
|
+
|
|
1456
|
+
### <a name="create_request_to_book_request"></a> create_request_to_book_request
|
|
1457
|
+
|
|
1458
|
+
> *Tags:* ``` Skips Authentication ```
|
|
1459
|
+
|
|
1460
|
+
> This will be a request which we will send to PMS when we get a request to book from the channel.
|
|
1461
|
+
> So when BookingPal gets a new request to book request - we will push this POST request to the link which you set in BookingPal for your PMS (in Push Notification section - "requestToBook").
|
|
1462
|
+
>
|
|
1463
|
+
> Important note: In this doc to be able to test this - you need to set a full URL on the Configure button in the right section.
|
|
1464
|
+
|
|
1465
|
+
|
|
1466
|
+
```ruby
|
|
1467
|
+
def create_request_to_book_request(body); end
|
|
1468
|
+
```
|
|
1469
|
+
|
|
1470
|
+
#### Parameters
|
|
1471
|
+
|
|
1472
|
+
| Parameter | Tags | Description |
|
|
1473
|
+
|-----------|------|-------------|
|
|
1474
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
#### Example Usage
|
|
1478
|
+
|
|
1479
|
+
```ruby
|
|
1480
|
+
body = RequestToBookRequestModel.new
|
|
1481
|
+
|
|
1482
|
+
result = requestToBook_controller.create_request_to_book_request(body)
|
|
1483
|
+
|
|
1484
|
+
```
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
### <a name="create_request_to_book_cancel_request"></a> create_request_to_book_cancel_request
|
|
1488
|
+
|
|
1489
|
+
> *Tags:* ``` Skips Authentication ```
|
|
1490
|
+
|
|
1491
|
+
> This will be a request which we will send to PMS when we get a request to book from the channel.
|
|
1492
|
+
> So when BookingPal gets a new request to book request - we will push this POST request to the link which you set in BookingPal for your PMS (in Push Notification section - "requestToBook").
|
|
1493
|
+
>
|
|
1494
|
+
> Important note: In this doc to be able to test this - you need to set a full URL on the Configure button in the right section.
|
|
1495
|
+
|
|
1496
|
+
|
|
1497
|
+
```ruby
|
|
1498
|
+
def create_request_to_book_cancel_request(body); end
|
|
1499
|
+
```
|
|
1500
|
+
|
|
1501
|
+
#### Parameters
|
|
1502
|
+
|
|
1503
|
+
| Parameter | Tags | Description |
|
|
1504
|
+
|-----------|------|-------------|
|
|
1505
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
1506
|
+
|
|
1507
|
+
|
|
1508
|
+
#### Example Usage
|
|
1509
|
+
|
|
1510
|
+
```ruby
|
|
1511
|
+
body = RequestToBookCancelRequestModel.new
|
|
1512
|
+
|
|
1513
|
+
result = requestToBook_controller.create_request_to_book_cancel_request(body)
|
|
1514
|
+
|
|
1515
|
+
```
|
|
1516
|
+
|
|
1517
|
+
|
|
1518
|
+
[Back to List of Controllers](#list_of_controllers)
|
|
1519
|
+
|
|
1520
|
+
## <a name="push_notification_controller"></a> PushNotificationController
|
|
1521
|
+
|
|
1522
|
+
### Get singleton instance
|
|
1523
|
+
|
|
1524
|
+
The singleton instance of the ``` PushNotificationController ``` class can be accessed from the API Client.
|
|
1525
|
+
|
|
1526
|
+
```ruby
|
|
1527
|
+
pushNotification_controller = client.push_notification
|
|
1528
|
+
```
|
|
1529
|
+
|
|
1530
|
+
### <a name="create_push_notification_links"></a> create_push_notification_links
|
|
1531
|
+
|
|
1532
|
+
> Provide the links on which the requests about new reservation and cancel reservation will be sent. Links should be https.
|
|
1533
|
+
>
|
|
1534
|
+
> These links should be set on PMS level, so please use your PMS credentials.
|
|
1535
|
+
>
|
|
1536
|
+
>
|
|
1537
|
+
|
|
1538
|
+
|
|
1539
|
+
```ruby
|
|
1540
|
+
def create_push_notification_links(content_type,
|
|
1541
|
+
body); end
|
|
1542
|
+
```
|
|
1543
|
+
|
|
1544
|
+
#### Parameters
|
|
1545
|
+
|
|
1546
|
+
| Parameter | Tags | Description |
|
|
1547
|
+
|-----------|------|-------------|
|
|
1548
|
+
| content_type | ``` Required ``` | TODO: Add a parameter description |
|
|
1549
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
1550
|
+
|
|
1551
|
+
|
|
1552
|
+
#### Example Usage
|
|
1553
|
+
|
|
1554
|
+
```ruby
|
|
1555
|
+
content_type = 'application/json'
|
|
1556
|
+
body_value = "{\r\n \"data\": {\r\n \"bookLink\": \"https://newreservationnotification.link\",\r\n \"cancelLink\": \"https://cancelreservation.link\",\r\n \"asyncPush\": \"https://asyncpush.link\",\r\n \"requestToBook\": \"https://requestToBook.link\"\r\n }\r\n}";
|
|
1557
|
+
body = JSON.parse(body_value);
|
|
1558
|
+
|
|
1559
|
+
result = pushNotification_controller.create_push_notification_links(content_type, body)
|
|
1560
|
+
|
|
1561
|
+
```
|
|
1562
|
+
|
|
1563
|
+
|
|
1564
|
+
### <a name="get_notification_links"></a> get_notification_links
|
|
1565
|
+
|
|
1566
|
+
> This will return all notification URLs which are set. It will work on PMS level, so use PMS credentials.
|
|
1567
|
+
>
|
|
1568
|
+
>
|
|
1569
|
+
|
|
1570
|
+
|
|
1571
|
+
```ruby
|
|
1572
|
+
def get_notification_links; end
|
|
1573
|
+
```
|
|
1574
|
+
|
|
1575
|
+
#### Example Usage
|
|
1576
|
+
|
|
1577
|
+
```ruby
|
|
1578
|
+
|
|
1579
|
+
result = pushNotification_controller.get_notification_links()
|
|
1580
|
+
|
|
1581
|
+
```
|
|
1582
|
+
|
|
1583
|
+
|
|
1584
|
+
[Back to List of Controllers](#list_of_controllers)
|
|
1585
|
+
|
|
1586
|
+
## <a name="reservation_notifications_controller"></a> ReservationNotificationsController
|
|
1587
|
+
|
|
1588
|
+
### Get singleton instance
|
|
1589
|
+
|
|
1590
|
+
The singleton instance of the ``` ReservationNotificationsController ``` class can be accessed from the API Client.
|
|
1591
|
+
|
|
1592
|
+
```ruby
|
|
1593
|
+
reservationNotifications_controller = client.reservation_notifications
|
|
1594
|
+
```
|
|
1595
|
+
|
|
1596
|
+
### <a name="get_reservation_by_product"></a> get_reservation_by_product
|
|
1597
|
+
|
|
1598
|
+
> This function allows logged-in users to get all reservations for the specific product.
|
|
1599
|
+
|
|
1600
|
+
|
|
1601
|
+
```ruby
|
|
1602
|
+
def get_reservation_by_product(product_id); end
|
|
1603
|
+
```
|
|
1604
|
+
|
|
1605
|
+
#### Parameters
|
|
1606
|
+
|
|
1607
|
+
| Parameter | Tags | Description |
|
|
1608
|
+
|-----------|------|-------------|
|
|
1609
|
+
| product_id | ``` Required ``` | Product ID |
|
|
1610
|
+
|
|
1611
|
+
|
|
1612
|
+
#### Example Usage
|
|
1613
|
+
|
|
1614
|
+
```ruby
|
|
1615
|
+
product_id = 'productId'
|
|
1616
|
+
|
|
1617
|
+
result = reservationNotifications_controller.get_reservation_by_product(product_id)
|
|
1618
|
+
|
|
1619
|
+
```
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
### <a name="get_reservation_by_pm"></a> get_reservation_by_pm
|
|
1623
|
+
|
|
1624
|
+
> This API call will return a list of reservations that belong to the current user.
|
|
1625
|
+
|
|
1626
|
+
|
|
1627
|
+
```ruby
|
|
1628
|
+
def get_reservation_by_pm; end
|
|
1629
|
+
```
|
|
1630
|
+
|
|
1631
|
+
#### Example Usage
|
|
1632
|
+
|
|
1633
|
+
```ruby
|
|
1634
|
+
|
|
1635
|
+
result = reservationNotifications_controller.get_reservation_by_pm()
|
|
1636
|
+
|
|
1637
|
+
```
|
|
1638
|
+
|
|
1639
|
+
|
|
1640
|
+
### <a name="new_reservation_notification_push"></a> new_reservation_notification_push
|
|
1641
|
+
|
|
1642
|
+
> *Tags:* ``` Skips Authentication ```
|
|
1643
|
+
|
|
1644
|
+
> This function sends the request to the provided link about a new reservation. So when BookingPal gets a new reservation - we will push this POST request to the link which you set in BookingPal for your PMS (in Push Notification section).
|
|
1645
|
+
>
|
|
1646
|
+
> Important note: In this doc to be able to test this - you need to set a full URL on the Configure button in the right section.
|
|
1647
|
+
>
|
|
1648
|
+
> Note: Credit card data will be sent only if PMS should process payment in their system.
|
|
1649
|
+
> Also, data that will be passed to PMS depends on channels - and do we get all of this data. So we have column ‘Mandatory’ to be aware that some data will be missing if we do not get them from a channel (like some guest address data).
|
|
1650
|
+
> Additional note: Some channels support modification. At this moment we will process modification first by canceling the current reservation and then we will process the new regular reservation. In these cases for tracking purposes, you can use channel reservation ID (confirmationID) which should be the same in these cases.
|
|
1651
|
+
|
|
1652
|
+
|
|
1653
|
+
```ruby
|
|
1654
|
+
def new_reservation_notification_push(body); end
|
|
1655
|
+
```
|
|
1656
|
+
|
|
1657
|
+
#### Parameters
|
|
1658
|
+
|
|
1659
|
+
| Parameter | Tags | Description |
|
|
1660
|
+
|-----------|------|-------------|
|
|
1661
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
1662
|
+
|
|
1663
|
+
|
|
1664
|
+
#### Example Usage
|
|
1665
|
+
|
|
1666
|
+
```ruby
|
|
1667
|
+
body = ReservationNotificationObject.new
|
|
1668
|
+
|
|
1669
|
+
result = reservationNotifications_controller.new_reservation_notification_push(body)
|
|
1670
|
+
|
|
1671
|
+
```
|
|
1672
|
+
|
|
1673
|
+
|
|
1674
|
+
### <a name="create_reservation_cancellation_notification_push"></a> create_reservation_cancellation_notification_push
|
|
1675
|
+
|
|
1676
|
+
> *Tags:* ``` Skips Authentication ```
|
|
1677
|
+
|
|
1678
|
+
> This function sends the request to the provided link about the reservation cancellation. So when BookingPal gets a cancel reservation request from the channel - we will push this POST request to the link which you set in BookingPal for your PMS (in Push Notification section).
|
|
1679
|
+
>
|
|
1680
|
+
> Important note: In this doc to be able to test this - you need to set a full URL on the Configure button in the right section.
|
|
1681
|
+
|
|
1682
|
+
|
|
1683
|
+
```ruby
|
|
1684
|
+
def create_reservation_cancellation_notification_push(body); end
|
|
1685
|
+
```
|
|
1686
|
+
|
|
1687
|
+
#### Parameters
|
|
1688
|
+
|
|
1689
|
+
| Parameter | Tags | Description |
|
|
1690
|
+
|-----------|------|-------------|
|
|
1691
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
1692
|
+
|
|
1693
|
+
|
|
1694
|
+
#### Example Usage
|
|
1695
|
+
|
|
1696
|
+
```ruby
|
|
1697
|
+
body = CancelReservationNotificationObject.new
|
|
1698
|
+
|
|
1699
|
+
result = reservationNotifications_controller.create_reservation_cancellation_notification_push(body)
|
|
1700
|
+
|
|
1701
|
+
```
|
|
1702
|
+
|
|
1703
|
+
|
|
1704
|
+
[Back to List of Controllers](#list_of_controllers)
|
|
1705
|
+
|
|
1706
|
+
## <a name="asynchronous_push_messages_controller"></a> AsynchronousPushMessagesController
|
|
1707
|
+
|
|
1708
|
+
### Get singleton instance
|
|
1709
|
+
|
|
1710
|
+
The singleton instance of the ``` AsynchronousPushMessagesController ``` class can be accessed from the API Client.
|
|
1711
|
+
|
|
1712
|
+
```ruby
|
|
1713
|
+
asynchronousPushMessages_controller = client.asynchronous_push_messages
|
|
1714
|
+
```
|
|
1715
|
+
|
|
1716
|
+
### <a name="create_validation_push_asynchronous_message"></a> create_validation_push_asynchronous_message
|
|
1717
|
+
|
|
1718
|
+
> *Tags:* ``` Skips Authentication ```
|
|
1719
|
+
|
|
1720
|
+
> This is POST request - push notifications (webhooks) which BookingPal will send on PMS endpoint (which is set in push notification API, field - asyncPush) after something is executed in BP. This is necessary since some API calls like validation, onboarding, etc are done over queue in our system, so you will get an asynchronous response.
|
|
1721
|
+
>
|
|
1722
|
+
> In these requests, we do not have expected responses from the PMS system. Since these are just notifications.
|
|
1723
|
+
>
|
|
1724
|
+
> Important note: In this doc to be able to test this - you need to set a full URL on the Configure button in the right section.
|
|
1725
|
+
|
|
1726
|
+
|
|
1727
|
+
```ruby
|
|
1728
|
+
def create_validation_push_asynchronous_message(body); end
|
|
1729
|
+
```
|
|
1730
|
+
|
|
1731
|
+
#### Parameters
|
|
1732
|
+
|
|
1733
|
+
| Parameter | Tags | Description |
|
|
1734
|
+
|-----------|------|-------------|
|
|
1735
|
+
| body | ``` Required ``` | TODO: Add a parameter description |
|
|
1736
|
+
|
|
1737
|
+
|
|
1738
|
+
#### Example Usage
|
|
1739
|
+
|
|
1740
|
+
```ruby
|
|
1741
|
+
body = ValidationAsynchronousPushMessageRequest.new
|
|
1742
|
+
|
|
1743
|
+
asynchronousPushMessages_controller.create_validation_push_asynchronous_message(body)
|
|
1744
|
+
|
|
1745
|
+
```
|
|
1746
|
+
|
|
1747
|
+
|
|
1748
|
+
[Back to List of Controllers](#list_of_controllers)
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
|