A példa létrehoz két partnert, aztán háromféleképpen keres. A 'vev' a „Vevő” szó eleje, ezért talál; az 'evő' szó közepe, az adószám pedig nem a név része, ezért ezek üresek. A végén az all() név szerinti sorrendben adja az összes partnert.
Névkeresés a szavak elejére: a „vev” talál, a szó közepe és az adószám nem.
Futtatás a sandboxbanimport { } from 'tarcajs'
const = ()
const = { : '1111', : 'Budapest', : 'Fő utca 1.' }
await ..({ : 'Vevő Kft.', : , : '12345678-2-42' })
await ..({ : 'Minta Bt.', : })
const = await ..({ : 'vev' })
const = await ..({ : 'evő' })
const = await ..({ : '12345678' })
.(
'vev:',
.,
..(() => .),
)
.('evő:', .)
.('adószám:', .)
for await (const of ..()) {
.(., .)
}POST /partners HTTP/1.1
content-type: application/json
{
"name": "Vevő Kft.",
"address": {
"country_code": "HU",
"post_code": "1111",
"city": "Budapest",
"address": "Fő utca 1."
},
"taxcode": "12345678-2-42"
}POST /partners HTTP/1.1
content-type: application/json
{
"name": "Minta Bt.",
"address": {
"country_code": "HU",
"post_code": "1111",
"city": "Budapest",
"address": "Fő utca 1."
}
}GET /partners?query=vev HTTP/1.1GET /partners?query=evő HTTP/1.1GET /partners?query=12345678 HTTP/1.1GET /partners?page=1&per_page=100 HTTP/1.1HTTP/1.1 201
content-type: application/json
{
"id": 1,
"name": "Vevő Kft.",
"address": {
"country_code": "HU",
"post_code": "1111",
"city": "Budapest",
"address": "Fő utca 1."
},
"emails": [],
"taxcode": "12345678-2-42",
"iban": "",
"swift": "",
"account_number": "",
"phone": "",
"general_ledger_number": "",
"tax_type": "",
"custom_billing_settings": {
"payment_method": null,
"document_form": null,
"due_days": null,
"document_currency": null,
"template_language_code": null,
"discount": null,
"custom_label": null
},
"group_member_tax_number": "",
"giro_settings": {
"giro_default_settings": true,
"giro_payment_request_enabled": false,
"giro_different_amount_allowed": false
},
"partner_shipping": {
"match": true,
"name": "",
"mode": "none",
"address": {
"country_code": "HU",
"post_code": "",
"city": "",
"address": ""
}
},
"internal_comment": "",
"partner_show_type": "show_all"
}HTTP/1.1 201
content-type: application/json
{
"id": 2,
"name": "Minta Bt.",
"address": {
"country_code": "HU",
"post_code": "1111",
"city": "Budapest",
"address": "Fő utca 1."
},
"emails": [],
"taxcode": "",
"iban": "",
"swift": "",
"account_number": "",
"phone": "",
"general_ledger_number": "",
"tax_type": "",
"custom_billing_settings": {
"payment_method": null,
"document_form": null,
"due_days": null,
"document_currency": null,
"template_language_code": null,
"discount": null,
"custom_label": null
},
"group_member_tax_number": "",
"giro_settings": {
"giro_default_settings": true,
"giro_payment_request_enabled": false,
"giro_different_amount_allowed": false
},
"partner_shipping": {
"match": true,
"name": "",
"mode": "none",
"address": {
"country_code": "HU",
"post_code": "",
"city": "",
"address": ""
}
},
"internal_comment": "",
"partner_show_type": "show_all"
}HTTP/1.1 200
content-type: application/json
{
"total": 1,
"per_page": 25,
"current_page": 1,
"last_page": 1,
"prev_page_url": null,
"next_page_url": null,
"data": [
{
"id": 1,
"name": "Vevő Kft.",
"address": {
"country_code": "HU",
"post_code": "1111",
"city": "Budapest",
"address": "Fő utca 1."
},
"emails": [],
"taxcode": "12345678-2-42",
"iban": "",
"swift": "",
"account_number": "",
"phone": "",
"general_ledger_number": "",
"tax_type": "",
"custom_billing_settings": {
"payment_method": null,
"document_form": null,
"due_days": null,
"document_currency": null,
"template_language_code": null,
"discount": null,
"custom_label": null
},
"group_member_tax_number": "",
"giro_settings": {
"giro_default_settings": true,
"giro_payment_request_enabled": false,
"giro_different_amount_allowed": false
},
"partner_shipping": {
"match": true,
"name": "",
"mode": "none",
"address": {
"country_code": "HU",
"post_code": "",
"city": "",
"address": ""
}
},
"internal_comment": "",
"partner_show_type": "show_all"
}
]
}HTTP/1.1 200
content-type: application/json
{
"total": 0,
"per_page": 25,
"current_page": 1,
"last_page": 1,
"prev_page_url": null,
"next_page_url": null,
"data": []
}HTTP/1.1 200
content-type: application/json
{
"total": 0,
"per_page": 25,
"current_page": 1,
"last_page": 1,
"prev_page_url": null,
"next_page_url": null,
"data": []
}HTTP/1.1 200
content-type: application/json
{
"total": 2,
"per_page": 100,
"current_page": 1,
"last_page": 1,
"prev_page_url": null,
"next_page_url": null,
"data": [
{
"id": 2,
"name": "Minta Bt.",
"address": {
"country_code": "HU",
"post_code": "1111",
"city": "Budapest",
"address": "Fő utca 1."
},
"emails": [],
"taxcode": "",
"iban": "",
"swift": "",
"account_number": "",
"phone": "",
"general_ledger_number": "",
"tax_type": "",
"custom_billing_settings": {
"payment_method": null,
"document_form": null,
"due_days": null,
"document_currency": null,
"template_language_code": null,
"discount": null,
"custom_label": null
},
"group_member_tax_number": "",
"giro_settings": {
"giro_default_settings": true,
"giro_payment_request_enabled": false,
"giro_different_amount_allowed": false
},
"partner_shipping": {
"match": true,
"name": "",
"mode": "none",
"address": {
"country_code": "HU",
"post_code": "",
"city": "",
"address": ""
}
},
"internal_comment": "",
"partner_show_type": "show_all"
},
{
"id": 1,
"name": "Vevő Kft.",
"address": {
"country_code": "HU",
"post_code": "1111",
"city": "Budapest",
"address": "Fő utca 1."
},
"emails": [],
"taxcode": "12345678-2-42",
"iban": "",
"swift": "",
"account_number": "",
"phone": "",
"general_ledger_number": "",
"tax_type": "",
"custom_billing_settings": {
"payment_method": null,
"document_form": null,
"due_days": null,
"document_currency": null,
"template_language_code": null,
"discount": null,
"custom_label": null
},
"group_member_tax_number": "",
"giro_settings": {
"giro_default_settings": true,
"giro_payment_request_enabled": false,
"giro_different_amount_allowed": false
},
"partner_shipping": {
"match": true,
"name": "",
"mode": "none",
"address": {
"country_code": "HU",
"post_code": "",
"city": "",
"address": ""
}
},
"internal_comment": "",
"partner_show_type": "show_all"
}
]
}vev: 1 [ 'Vevő Kft.' ]
evő: 0
adószám: 0
2 Minta Bt.
1 Vevő Kft.Az Elküldött kérések fülön a három ListPartner kérés query stringjét nézd: a tárca csak a megadott paramétereket küldi, az all() pedig per_page=100-zal lapoz. A hamis Billingo keresőindexe nem késik, élőben a két friss partner egy ideig hiányozhatna a találatok közül.