Giter Site home page Giter Site logo

myallocator-pms-php's Introduction

#myallocator-pms-php

Myallocator PMS PHP SDK (JSON & XML). Property management systems (PMS) can use this SDK to quickly and reliably integrate with the myallocator API to enable distribution for their customers.

Note, this is not the BuildToUs PHP SDK for OTA's. The BuildToUs PHP SDK can be found at https://github.com/MyAllocator/myallocator-ota-php

Myallocator API Version: 201408

Myallocator PHP SDK Documentation [http://myallocator.github.io/myallocator-pms-php-docs/]

Myallocator API Documentation [http://myallocator.github.io/apidocs/]

Myallocator API Integration Guide [https://docs.google.com/document/d/1_OuI0Z6rTkkuA9xxlJUvhXlazJ9w_iqsp1QzIj4gb2U/edit?usp=sharing]

Myallocator [https://www.myallocator.com/]

Myallocator Development Support [[email protected]]

Requirements

PHP 5.3.2 and later.

Documentation

Please see http://myallocator.github.io/myallocator-pms-php-docs/ for the complete and up-to-date SDK documentation.

Composer

You can install via composer. Add the following to your project's composer.json.

{
    "require": {
        "myallocator/myallocator-php-sdk": "1.*"
    }
}

Then install via:

composer.phar install

To use the bindings, either use Composer's autoload [https://getcomposer.org/doc/00-intro.md#autoloading]:

require_once('vendor/autoload.php');

Or manually:

require_once('/path/to/vendor/MyAllocator/myallocator-php-sdk/src/MyAllocator.php');

Manual Installation

Grab the latest version of the SDK:

git clone https://github.com/MyAllocator/myallocator-pms-php.git

To use the bindings, add the following to a PHP script:

require_once('/path/to/myallocator-php-sdk/src/MyAllocator.php');

Getting Started

Installation and usage example with composer installation:

root@nate:/var/www# mkdir project
root@nate:/var/www# cd project/
root@nate:/var/www/project# echo '{"require": {"myallocator/myallocator-php-sdk": "1.*"}}' > composer.json
root@nate:/var/www/project# composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing myallocator/myallocator-php-sdk (1.2.1)
    Downloading: 100%         
Writing lock file
Generating autoload files
root@nate:/var/www/project# cp vendor/myallocator/myallocator-php-sdk/src/example_autoload.php .
root@nate:/var/www/project# v example_autoload.php 

Edit require_once autoload in example_autoload.php in line 33 to:

require_once(dirname(__FILE__) . '/vendor/autoload.php');

Run HelloWorld ping to myallocator:

root@nate:/var/www/project# php example_autoload.php
{"Auth" : "true", hello" : "world"}

Installation and usage example with manual installation:

root@nate:/var/www# mkdir -p project/lib
root@nate:/var/www# cd project/lib/
root@nate:/var/www/project/lib# git clone https://github.com/MyAllocator/myallocator-pms-php.git
Cloning into 'myallocator-pms-php'...
remote: Counting objects: 1133, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 1133 (delta 0), reused 0 (delta 0), pack-reused 1127
Receiving objects: 100% (1133/1133), 186.80 KiB | 0 bytes/s, done.
Resolving deltas: 100% (874/874), done.
Checking connectivity... done.
root@nate:/var/www/project/lib# cd ..
root@nate:/var/www/project# cp lib/myallocator-pms-php/src/example_autoload.php .
root@nate:/var/www/project# v example_autoload.php 

Edit require_once autoload in example_autoload.php in line 33 to:

require_once(dirname(__FILE__) . '/lib/myallocator-pms-php/src/MyAllocator.php');

Run HelloWorld ping to myallocator:

root@nate:/var/www/project# php example_autoload.php
{"Auth" : "true", hello" : "world"}

Simple usage example:

Can be found at myallocator-pms-php/src/example_autoload.php. You may need to modify the autoload require path as shown above.

The setConfig is not required once src/MyAllocator/Config/Config.php has been configured.

Configuration

The default configuration file can be found at at src/MyAllocator/Config/Config.php. The following is configurable:

paramValidationEnabled

The SDK supports parameter validation for array and json data formats, which can be configured via the paramValidationEnabled configuration in src/MyAllocator/Config/Config.php. If you prefer to send a raw request for performance, or other reasons, set this configuration to false. If parameter validation is enabled:

  1. Required and optional Api keys are defined via $keys array in each Api class.
  2. Top level required and optional keys are validated prior to sending a request to myallocator.
  3. An ApiException is thrown if a required key is not present.
  4. Top level keys not defined in $keys are stripped from parameters.
  5. Minimum optional parameters are enforced.

dataFormat

The SDK supports three data in/out formats (array, json, xml), which can be configured via the dataFormat configuration in src/MyAllocator/Config/Config.php. The following table illustrates the formats used for the request flow based on dataFormat.

you->SDK(dataFormat)    SDK->MA     MA->SDK     SDK->you
--------------------    -------     -------     --------
array                   json        json        array
json                    json        json        json
xml                     xml         xml         xml

array and json data formats are preferred vs. xml.

Note, parameter validation only supports array and json data formats. For json data validation, the data must be decoded and re-encoded after validation. For xml data, the raw request is sent to myallocator and raw response returned to you. Disable paramValidationEnabled in Config.php to skip parameter validation.

dataResponse

Define what data you prefer to be included in Api responses. The response 'body', 'code', and 'headers' keys are not configurable and will always be included in a response. Each piece of data may be useful if you intend to store request and response data locally. The following keys in the dataResponse array below will cause the related data to be returned in all responses:

1. timeRequest - The time immediately before the request is sent
    to myallocator (from Requestor). timeRequest is returned
    as a DateTime object.
2. timeResponse - The time immediately after the response is
    received from myallocator (from Requestor). timeResponse is
    returned as a DateTime object.
3. request - The exact request data sent from myallocator including
    authentication and provided parameters. The request is returned
    in the configured dataFormat format. Note, for xml, the request
    is stored in the result prior to url encoding.

debugsEnabled

Set debugsEnabled to true in src/MyAllocator/Config/Config.php to display request and response data in the SDK interface and API transfer data formats for an API request.

API Response Format

A successful request call will return an array with the following response structure. By default, all key/values are returned. If you prefer to not receive request data or response['time'] in an Api response, you may configure the dataResponse array in src/MyAllocator/Config/Config.php to remove the data.

return array(
    'request' => array(
        'time' => {DateTime Object},
        'body' => {Request body in dataFormat}
    ),
    'response' => array(
        'time' => {DateTime Object},
        'code' => {int},
        'headers' => {string},
        'body' => {Response body in dataFormat}      
    )
);

request['time'] (optional) is a DateTime object representing the time immediately before sending the request to myallocator.

request['body'] (optional) is the request body sent to myallocator in your configured dataFormat.

response['time'] (optional) is a DateTime object representing the time immediately after receiving the response from myallocator.

response['code'] is the HTTP response code.

response['headers'] are the HTTP response headers.

response['body'] is the response body.

Requests may also return any of the exceptions defined in src/MyAllocator/Exception/. Be sure to wrap your API calls in try blocks. You may use the getHttpStatus, getHttpBody, and getJsonBody methods defined in /Exception/MaException.php within an exception block for information. Additionally, the getState method may be called for an exception to retrieve the state information for the request up to the point of failure in the same format as the response structure above (request/response). For example, if an HTTP connection timeout exception occurs, you may access the request time/body and response code/headers via getState.

Tests

You can run phpunit tests from the top directory:

Run common infra, JSON API, and XML API test cases. This excludes some of the advanced API's. Refer to `phpunit.xml`.
vendor/bin/phpunit --debug

Run JSON API test cases.
vendor/bin/phpunit --debug tests/json

Run XML API test cases.
vendor/bin/phpunit --debug tests/xml

Run common infra test cases.
vendor/bin/phpunit --debug tests/common

Note, there is a different set of tests for json and XML.

The json tests use the array dataFormat to interface with the SDK. Refer to src/MyAllocator/Config/Config.php.

Setup Local Environment Variables

Most of the test cases use local environment variables and will be skipped if not provided. Export the following local environment variables from your data to use with the related test cases:

myallocator-pms-php$ cat test/ENVIRONMENT_CREDENTIALS 
#!/bin/bash
export ma_vendorId=xxxxx
export ma_vendorPassword=xxxxx
export ma_userId=xxxxx
export ma_userPassword=xxxxx
export ma_userToken=xxxxx
export ma_propertyId=xxxxx
export ma_PMSUserId=xxxxx
myallocator-pms-php$ source test/ENVIRONMENT_CREDENTIALS

myallocator-pms-php's People

Contributors

mopagemo avatar nathanhelenihi avatar sterfried avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

myallocator-pms-php's Issues

Composer Deprecation Notice ... does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0

Installing the latest release (and also using dev-master in composer) gives the following errors. It looks like they are all coming from the tests folder, so maybe they should be excluded from the class-map anyway? https://getcomposer.org/doc/04-schema.md#exclude-files-from-classmaps

Also, maybe time to tag a new release after that?

Thanks!

Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\PropertyCurrencyOverrideUpdateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/PropertyCurrencyOverrideUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\RoomListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/RoomListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\PropertyUpdateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/PropertyUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\PropertyCurrencyOverrideListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/PropertyCurrencyOverrideListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\HelloUserTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/HelloUserTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\RoomImageCreateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/RoomImageCreateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\BookingListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/BookingListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\UserExistsTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/UserExistsTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\PropertyListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/PropertyListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\RoomImageRemoveTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/RoomImageRemoveTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\PropertyImageRemoveTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/PropertyImageRemoveTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\PropertyImageCreateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/PropertyImageCreateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\PropertyChannelListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/PropertyChannelListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\PropertyChannelUpdateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/PropertyChannelUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\AssociateUserToPMSTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/AssociateUserToPMSTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\RoomImageUpdateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/RoomImageUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\RoomImageListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/RoomImageListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\PropertyCreateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/PropertyCreateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\RoomRemoveTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/RoomRemoveTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\ARIUpdateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/ARIUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\RoomCreateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/RoomCreateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\ARIUpdateStatusTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/ARIUpdateStatusTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\RoomAvailabilityListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/RoomAvailabilityListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\HelloWorldTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/HelloWorldTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\HelloVendorUserTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/HelloVendorUserTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\AmenityListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/AmenityListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\HelloVendorTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/HelloVendorTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\UserUpdateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/UserUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\VendorSetTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/VendorSetTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\RoomUpdateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/RoomUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\ARIRulesUpdateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/ARIRulesUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\BookingCancelTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/BookingCancelTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\BookingPaymentDownloadTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/BookingPaymentDownloadTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\ARIRulesListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/ARIRulesListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\BookingRemovePIITest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/BookingRemovePIITest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\PropertyImageUpdateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/PropertyImageUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\PropertyImageListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/PropertyImageListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\BookingPaymentPasswordValidateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/BookingPaymentPasswordValidateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\UserCreateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/UserCreateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\xml\ChannelListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/xml/Api/ChannelListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\PropertyCurrencyOverrideUpdateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/PropertyCurrencyOverrideUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\RoomListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/RoomListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\PropertyUpdateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/PropertyUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\PropertyCurrencyOverrideListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/PropertyCurrencyOverrideListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\HelloUserTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/HelloUserTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\RoomImageCreateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/RoomImageCreateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\BookingListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/BookingListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\UserExistsTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/UserExistsTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\PropertyListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/PropertyListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\RoomImageRemoveTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/RoomImageRemoveTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\PropertyImageRemoveTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/PropertyImageRemoveTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\PropertyImageCreateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/PropertyImageCreateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\PropertyChannelListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/PropertyChannelListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\PropertyChannelUpdateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/PropertyChannelUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\AssociateUserToPMSTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/AssociateUserToPMSTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\RoomImageUpdateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/RoomImageUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\RoomImageListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/RoomImageListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\PropertyCreateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/PropertyCreateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\RoomRemoveTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/RoomRemoveTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\ARIUpdateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/ARIUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\RoomCreateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/RoomCreateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\ARIUpdateStatusTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/ARIUpdateStatusTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\RoomAvailabilityListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/RoomAvailabilityListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\HelloWorldTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/HelloWorldTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\HelloVendorUserTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/HelloVendorUserTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\AmenityListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/AmenityListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\HelloVendorTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/HelloVendorTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\UserUpdateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/UserUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\VendorSetTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/VendorSetTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\RoomUpdateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/RoomUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\ARIRulesUpdateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/ARIRulesUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\BookingCancelTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/BookingCancelTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\BookingPaymentDownloadTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/BookingPaymentDownloadTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\ARIRulesListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/ARIRulesListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\BookingRemovePIITest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/BookingRemovePIITest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\PropertyImageUpateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/PropertyImageUpdateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\PropertyImageListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/PropertyImageListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\BookingPaymentPasswordValidateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/BookingPaymentPasswordValidateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\UserCreateTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/UserCreateTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class MyAllocator\phpsdk\tests\json\ChannelListTest located in ./vendor/myallocator/myallocator-php-sdk/tests/json/Api/ChannelListTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201

json decode MyApi.php error on lines 223 & 224

on line 223 & 224

Current:
$params['_method'] = $this->id;
$params['_version'] = $requestor->version;
Should be
$params_decoded['_method'] = $this->id;
$params_decoded['_version'] = $requestor->version;

API response is inconsistent with documentation

API response is inconsistent with documentation. When errors occur according to the documentation a 'Success': false should be present in the json, but it is not.

For example:

https://apidocs.myallocator.com/#tag/room/operation/room_list

documentation states for RoomList Error Response that the above mentioned flag is required/should be present.

What we receive:

{"Errors":[{"ErrorTicket":"[omitted]","ErrorMsg":"Property does not have an active billing subscription","ErrorId":560}]}

Flag is not present. This seems to be the problem with all error responses.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.