EPG PHP SDK
Loading...
Searching...
No Matches
AccommodationItem Class Reference
+ Inheritance diagram for AccommodationItem:

Public Member Functions

 __construct ()
 
 setCheckinDate (string $checkInDate)
 Set the check-in date for the accommodation.
 
 setCheckoutDate (string $checkOutDate)
 Set the check-out date for the accommodation.
 
 setEstablishmentName (string $establishmentName)
 Set the name of the accommodation establishment.
 
 setGuests (int $guests)
 Set the number of guests for the accommodation.
 
 setAddress (string $streetAddress, int $postalCode, string $city, string $country)
 Set the address of the accommodation.
 
 isValidDateTime (mixed $value)
 
 validate ()
 Validate the accommodation item data.
 
- Public Member Functions inherited from Item
 setName (string $name)
 Set the name of the item.
 
 setType (string $type)
 Set the type of the item.
 
 setCategory (Category $category)
 Set the category of the item.
 
 setBrand (string $brand)
 Set the brand of the item.
 
 setDescription (string $description)
 Set the description of the item.
 
 setMPN (string $mpn)
 Set the MPN (Manufacturer Part Number) of the item.
 
 setImageUrl (string $imageUrl)
 Set the image URL of the item.
 
 setURL (string $url)
 Set the URL of the item.
 
 setReference (int $reference)
 Set the reference of the item.
 
 setTotalDiscount (float $totalDiscount)
 Set the total discount of the item.
 
 setUnitPriceWithTax (float $unitPrice)
 Set the unit price with tax of the item.
 
 setUnits (int $units)
 Set the number of units of the item.
 
 setTotalPriceWithTax (float $totalPrice)
 Set the total price with tax of the item.
 
 setAutoShipping (bool $autoShipping)
 Set whether the item has auto shipping.
 
 getItem ()
 Get the item data as an array.
 
 getTotalPriceWithTax ()
 Get the total price with tax of the item.
 

Additional Inherited Members

- Protected Attributes inherited from Item
array $item = []
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Reimplemented from Item.

Member Function Documentation

◆ isValidDateTime()

isValidDateTime ( mixed  $value)

◆ setAddress()

setAddress ( string  $streetAddress,
int  $postalCode,
string  $city,
string  $country 
)

Set the address of the accommodation.

Parameters
string$streetAddressThe street address of the accommodation.
int$postalCodeThe postal code of the accommodation.
string$cityThe city of the accommodation.
string$countryThe country of the accommodation.
Returns
self Returns the instance of the class for method chaining.

◆ setCheckinDate()

setCheckinDate ( string  $checkInDate)

Set the check-in date for the accommodation.

Parameters
string$checkInDateThe check-in date in the format YYYY-MM-DDTHH:mm:ss+HH:mm.
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionIf the check-in date is not in the correct format.

◆ setCheckoutDate()

setCheckoutDate ( string  $checkOutDate)

Set the check-out date for the accommodation.

Parameters
string$checkOutDateThe check-out date in the format YYYY-MM-DDTHH:mm:ss+HH:mm.
Returns
self Returns the instance of the class for method chaining.
Exceptions
InvalidFieldExceptionIf the check-out date is not in the correct format.

◆ setEstablishmentName()

setEstablishmentName ( string  $establishmentName)

Set the name of the accommodation establishment.

Parameters
string$establishmentNameThe name of the establishment.
Returns
self Returns the instance of the class for method chaining.

◆ setGuests()

setGuests ( int  $guests)

Set the number of guests for the accommodation.

Parameters
int$guestsThe number of guests.
Returns
self Returns the instance of the class for method chaining.

◆ validate()

validate ( )

Validate the accommodation item data.

Returns
void
Exceptions
InvalidFieldExceptionIf any required fields are missing.

Reimplemented from Item.


The documentation for this class was generated from the following file: