Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View radimvaculik's full-sized avatar
🚀

Radim Vaculík radimvaculik

🚀
View GitHub Profile
@radimvaculik
radimvaculik / Preset.php
Created August 11, 2020 08:28
JsonMapper examples #2
<?php
declare(strict_types = 1);
namespace App\Data\Preset\Model;
class Preset
{
public int $id;
public string $name;
@radimvaculik
radimvaculik / User.php
Created August 11, 2020 08:23
JsonMapper example
<?php
declare(strict_types = 1);
namespace App\Data\User\Model;
class User
{
public int $id;
public UserRole $role;
------ Request ------
POST /api/global/Transaction HTTP/1.1
Authorization: Basic OUVLVFNMODJZRVU3REtYTU5TUzBXUFI0ME5YSzIzWVk6TVA1NDZRWksyV1hNMEg5M0pMQVpMQ1pVV1AyRlhYQTU=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1
Content-Type: application/json; charset=utf-8
Host: api.eposnowhq.com
Connection: close
Content-Length: 439
[
{
"Id": 14808594,
"Name": "White Wine",
"Description": "White Wine",
"CostPrice": 0.00000,
"IsCostPriceIncTax": false,
"SalePrice": 0.00000,
"IsSalePriceIncTax": true,
"EatOutPrice": 0.00000,
[
{
"Id": 15014,
"Options": [
"Note Choice 1",
"Note Choice 2"
]
},
{
"Id": 15509,
@radimvaculik
radimvaculik / transaction.json
Created December 14, 2017 12:43
EposNow POST Transaction
{
"CustomerId": 1916755,
"DateTime": "2017-12-12T15:43:13+0000",
"StatusId": 1,
"ServiceType": 2,
"ReferenceCode": "ABC123",
"TransactionItems": [
{
"ProductId": "14944172",
"Quantity": 1,
autoCorrect: false
build:
warningThreshold: 1
failThreshold: 1
potential-bugs:
active: true
LateinitUsage:
active: false
plugins {
id "io.gitlab.arturbosch.detekt" version "1.0.0.[version]"
}
detekt {
version = "1.0.0.[version]"
profile("main") {
input = "$projectDir/your/app"
config = "$projectDir/detekt.yml"
filters = ".*test.*,.*/resources/.*,.*/tmp/.*"

Keybase proof

I hereby claim:

  • I am radimvaculik on github.
  • I am radimvaculik (https://keybase.io/radimvaculik) on keybase.
  • I have a public key ASA_hRJ3mHRarEezD5o986xBjfOjyQE6OQqI7E25fJ6nBAo

To claim this, I am signing this object: