Iyzipay\JsonBuilder::add PHP Method

add() public method

public add ( $key, $value = null ) : JsonBuilder
$key
$value
return JsonBuilder
    public function add($key, $value = null)
    {
        if (isset($value)) {
            if ($value instanceof JsonConvertible) {
                $this->json[$key] = $value->getJsonObject();
            } else {
                $this->json[$key] = $value;
            }
        }
        return $this;
    }