taskinbirtan/laravel-guesty

You will be able to use guesty api from scratch with this Laravel package, easily.

dev-master 2023-11-07 06:53 UTC

This package is not auto-updated.

Last update: 2024-10-29 07:42:20 UTC


README

Quick start

Install via composer:

composer require taskinbirtan/laravel-guesty

In your env please set:


env("GUESTY_USERNAME") 
env("GUESTY_PASSWORD")
env("GUESTY_ACCOUNT_ID")
these values must be set within .env

'providers' => [
    TaskinBirtan\LaravelGuesty\LaravelGuestyServiceProvider::class
],

In your controller

use TaskinBirtan\LaravelGuesty\GuestyApi;

$client=new GuestyApi();
$client->
setReservationListingId("some-listing-id")
->setReservationCheckInDate("2020-09-27")
->setReservationCheckOutDate("2020-10-04")
->setReservationAccountId(env('GUESTY_ACCOUNT_ID'))
->setReservationGuest("Birtan", "Taskin", "phoneNumber", "someEmail")
->setReservationMoneyObject(200, "TRY")
->setSource("TheSourceString")
->setReservationStatus('awaiting_payment');
$response = json_decode($client->makeReservation());

// add your logic ...

Supported Versions

Please note: wrapper doesn't have all the access of the api. This will cover the basic needs. You will be able to do: get all listings, make reservations, update reservations. I won't be working on this package for a while. Ask me question if you need.

Buy me a beer... just kidding :D