# dbd_debt_check

Name dbd_debt_check
Type callback
Version 1.0
Since 2020-01-01

# Prologue

Fetches DBD result from remote API for given subject and saves it to result json variable.

NOTE: In order to make this callback work properly, ensure you have following env variables properly set:

  • NETTE__EXTRAS__3RD__DBD__HOST
  • NETTE__EXTRAS__3RD__DBD__USER
  • NETTE__EXTRAS__3RD__DBD__PASS

Input subject variable may be of scalar or json type. If it is scalar, it should contain companyID or personalID. Callback determines itself if it is company or personal ID. If the subject variable is of type json it should contain id key for companyID or pin key for personalID. Or it can contain firstName, lastName and birthDate keys to identify person by these fields.

If neither company not person are identified in subject variable callback will not be called.

The result stored in result variable has following keys:

  • subject_type (person or company)
  • subject (subject data)
  • xml (raw api response)
  • date_performed (when the check was performed)

Variable content can be displayed e.g. using 'dbd_debt_result' panel.

# Configuration

events:

	# Event's name
	on_step_start:

		# Callback's name
		dbd_debt_check:
			config:

				# Required
				# may be scalar or JSON variable
				# if scalar variable, it should contain directly the companyID or personalID
				# if JSON variable, it should contain the `id` for companyID, or `pin` for personalID or set of 'firstName', 'lastName' and 'birthDate' keys.
				#
				# Examples:
				#  - scalar company: '76641040'
				#  - scalar person: '8703243422'
				#  - json company ['id' => '76641040',  ...]
				#  - json person ['pin' => '8703243422', ...]
				#  - json person ['firstName' => 'Michal', 'lastName' => 'Safry', 'birthDate' => '1976-06-05', ...]
				#
				subject: company_or_person

				# Required
				# Must be JSON variable
				# The result of API call will be stored in this variable and can be later displayed by `dbd_debt_result` panel
				result: dbd_result

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28