1.0.43 • Published 6 years ago

rentalsunited v1.0.43

Weekly downloads
15
License
ISC
Repository
github
Last release
6 years ago

Rentals United

RENTALS UNITED

Package for rentalsunited API

Basic usage:

// Import to your project
let RU = require('rentalsunited')

// Set credentials to your app
RU.setCredentials('email', 'password')

// Basic call to Rentals united
RU.getOwners().then(res => console.log(res.data))
              .catch(err => console.log(err))

Insert a reservation:

// create a reservation object
let reservation = {
    StayInfos: [
      {
        pid: '1790744',
        fromDate: '2018-05-18',
        toDate: '2018-05-20',
        pax: '2',
        RUPrice: '4063.11',
        clientPrice: '4130.64',
        alreadyPaid: '0'
      }
    ],
    name: 'John',
    surName: 'Snow',
    email: 'js@gmail.com',
    phone: '960000000',
    skypeId: '',
    address: 'Street o programming well',
    zipcode: '400',
    cityId: '42'
}

// make a call
RU.bookProperty(reservation).then(res => console.log(res.data))
                            .catch(err => console.log(err))

Create seasons for a specific property:

// create seasons for a single property
RU.setSeason('125893', {
    "DateFrom": "2018-04-26",
    "DateTo": "2018-04-30",
    "Price": "100",
    "Extra": "120",
    "EGPS": [
        {
          "ExtraGuests": "1",
          "Price": "120"
        }
    ]
})

Set calendar dates

// set dates
RU.setCalendar('0025625', [
   { DateFrom: '2018-05-01', DateTo: '2018-05-05', Value: true }
])
.then(result => console.log(result.data))
.catch(err => console.log(err))

Set min stay dates

// set dates
RU.setMinStayNights('0025625', [
   { DateFrom: '2018-07-04', DateTo: '2018-07-29', NumNights: '10' }
])
.then(result => console.log(result.data))
.catch(err => console.log(err))

* All methods should return an XML document

Available methods:

  • setCredentials(email, password)
  • RURequest()
  • getPaymentMethods()
  • getAgents()
  • getLocations()
  • getOwners()
  • getOwnerDetails(ownerId)
  • getProperties(ownerId)
  • getProperty(propertyId)
  • getPropertiesList(locCode)
  • addProperty(property)
  • getLocationDetails()
  • getRoomAmenities()
  • getAmenities()
  • getPropertyTypes()
  • getPropertyTypesOTA()
  • getLocationCurrencies()
  • getCalendar(pid, blocks)
  • getRates(pid)
  • getDiscounts(pid)
  • getRealtimeRates(pid, fromDate, toDate)
  • getMinstay(pid)
  • bookProperty(reservation)
  • cancelBooking(bookingId)
  • getReservations(fromDate, toDate, locationID)
  • getPropertyPrice(pid, fromDate, toDate)
  • setCalendar(pid, dates)
  • setLNMPutHandlerUrl(url)
  • setSeason(pid, seasons)
  • getPricesAndAvailability(pid, dateFrom, dateTo)
  • setMinStayNights(pid, datesRange)
  • getMinStayNights(pid)
  • listLanguages()
  • listAdditionFeesKinds()
  • listAdditionFeesTypes()
  • listAdditionFeesDiscriminators()

Rentals United documentation

http://rm.rentalsunited.com/api/RUSpecification.pdf

http://rm.rentalsunited.com/api/RUQuickStartGuide.pdf

Author: Paulo Santos

1.0.43

6 years ago

1.0.42

6 years ago

1.0.41

6 years ago

1.0.40

6 years ago

1.0.39

6 years ago

1.0.38

6 years ago

1.0.37

6 years ago

1.0.36

6 years ago

1.0.35

6 years ago

1.0.34

6 years ago

1.0.33

6 years ago

1.0.32

6 years ago

1.0.31

6 years ago

1.0.30

6 years ago

1.0.29

6 years ago

1.0.28

6 years ago

1.0.27

6 years ago

1.0.26

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago