Skip to content

Commit e57313c

Browse files
author
Vítězslav Dvořák
committed
Alpha Version
1 parent 7283c9b commit e57313c

File tree

11 files changed

+434
-66
lines changed

11 files changed

+434
-66
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ composer.phar
66
/nbproject/
77
/tests/.phpunit.result.cache
88
.vscode/settings.json
9+
/.php-cs-fixer.cache
10+
/.vscode/
11+
/.phpunit.result.cache
12+
/src/.php-cs-fixer.cache
13+
/.phpunit.cache/

README.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Realpad Takeout API Client for PHP
22

3-
//for real estate developer IT / reporting departments, integrators, and
4-
other 3rd parties//
3+
*for real estate developer IT / reporting departments, integrators, and other 3rd parties*
54

65
This document describes how to use the Realpad Takeout API to back up the data stored in the
76
system. Both structured data (such as lists of customers, deals, etc) and files uploaded to the
@@ -44,10 +43,14 @@ crc="3826804066"/>
4443

4544
● uid is the unique identifier of this resource, by which it can be retrieved using
4645
get-projects.
46+
4747
● content-type is the MIME type of the file, resolved when uploaded to the system (it’s
4848
the best guess).
49+
4950
● file-name is the original file name when it was uploaded to the system.
51+
5052
● size is the file size in bytes.
53+
5154
● crc is the CRC32 checksum of the file.
5255

5356
This endpoint will always return all the resources. It’s up to your system to determine which
@@ -62,7 +65,7 @@ curl \
6265
https://cms.realpad.eu/resource/bd5563ae-abc...
6366
```
6467

65-
## Endpoints with a binary payload
68+
## Endpoints
6669

6770
All of these endpoints return a single Excel file with a .xls extension, containing all the relevant
6871
data stored in our system. These endpoints behave just like get-resource, in that the HTTP
@@ -136,11 +139,14 @@ Accepts several additional optional parameters:
136139
● `filter_status`` - if left empty, invoices in all statuses are sent. 1 - new invoices. 2 -
137140
invoices in Review #1. 3 - invoices in Review #2. 4 - invoices in approval. 5 - fully
138141
approved invoices. 6 - fully rejected invoices.
142+
139143
`filter_groupcompany` - if left empty, invoices from all the group companies are sent. If
140144
Realpad database IDs of group companies are provided (as a comma-separated list),
141145
then only invoices from these companies are sent.
146+
142147
● `filter_issued_from`` - specify a date in the 2019-12-31 format to only send invoices
143148
issues after that date.
149+
144150
`filter_issued_to` - specify a date in the 2019-12-31 format to only send invoices issues
145151
before that date.
146152
The initial set of columns describes the Invoice itself, and the last set of columns contains the
@@ -150,32 +156,59 @@ data of its Lines.
150156

151157
Unit status enumeration
152158
● 0 - free.
159+
153160
● 1 - pre-reserved.
161+
154162
● 2 - reserved.
163+
155164
● 3 - sold.
165+
156166
● 4 - not for sale.
167+
157168
● 5 - delayed.
158169

159170
Unit type enumeration
171+
160172
● 1 - flat.
173+
161174
● 2 - parking.
175+
162176
● 3 - cellar.
177+
163178
● 4 - outdoor parking.
179+
164180
● 5 - garage.
181+
165182
● 6 - commercial space.
183+
166184
● 7 - family house.
185+
167186
● 8 - land.
187+
168188
● 9 - atelier.
189+
169190
● 10 - office.
191+
170192
● 11 - art workshop.
193+
171194
● 12 - non-residential unit.
195+
172196
● 13 - motorbike parking.
197+
173198
● 14 - creative workshop.
199+
174200
● 15 - townhouse.
201+
175202
● 16 - utility room.
203+
176204
● 17 - condominium.
205+
177206
● 18 - storage.
207+
178208
● 19 - apartment.
209+
179210
● 20 - accommodation unit.
211+
180212
● 21 - bike stand.
213+
181214
● 22 - communal area.

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"description": "Realpad Takeout API Client",
44
"type": "library",
55
"require": {
6-
"vitexsoftware/ease-core": "dev-main"
6+
"vitexsoftware/ease-core": "dev-main",
7+
"phpoffice/phpspreadsheet": "dev-master"
78
},
89
"require-dev": {
910
"phpunit/phpunit": "10.5.x-dev"
@@ -16,7 +17,7 @@
1617
},
1718
"authors": [
1819
{
19-
"name": "CyberVitexus",
20+
"name": "Vítězslav Dvořák",
2021
"email": "[email protected]"
2122
}
2223
],

examples/listcustomers.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
require_once __DIR__ . '/../vendor/autoload.php';
4+
5+
\Ease\Shared::init(['REALPAD_USERNAME', 'REALPAD_PASSWORD'], '../.env');
6+
7+
$client = new \SpojeNet\Realpad\ApiClient();
8+
9+
$customers = $client->listCustomers();
10+
11+
print_r($customers);
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
require_once __DIR__ . '/../vendor/autoload.php';
44

55

6-
\Ease\Shared::init(['REALPAD_USERNAME','REALPAD_PASSWORD'], '../.env' );
6+
\Ease\Shared::init(['REALPAD_USERNAME','REALPAD_PASSWORD'], '../.env');
77

88
$client = new \SpojeNet\Realpad\ApiClient();
99

10-
$resources = $client->getResources();
10+
$resources = $client->listResources();
1111

1212
print_r($resources);
13-

phpunit.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="tests/autoload.php" executionOrder="depends,defects" beStrictAboutOutputDuringTests="true" failOnRisky="true" failOnWarning="true" cacheDirectory=".phpunit.cache" requireCoverageMetadata="true" beStrictAboutCoverageMetadata="true">
3+
<testsuites>
4+
<testsuite name="default">
5+
<directory suffix="Test.php">tests</directory>
6+
</testsuite>
7+
</testsuites>
8+
<coverage/>
9+
<source>
10+
<include>
11+
<directory suffix=".php">src</directory>
12+
</include>
13+
</source>
14+
</phpunit>

0 commit comments

Comments
 (0)