Skip to content

Latest commit

 

History

History
355 lines (250 loc) · 22.7 KB

File metadata and controls

355 lines (250 loc) · 22.7 KB

Dangl\AVACloud\OenormConversionApi

All URIs are relative to https://avacloud-api.dangl-it.com, except if the operation defines another base path.

Method HTTP request Description
oenormConversionConvertToAva() POST /conversion/oenorm/ava Converts ÖNorm files to Dangl.AVA projects
oenormConversionConvertToExcel() POST /conversion/oenorm/excel Converts ÖNorm files to Excel
oenormConversionConvertToFlatAva() POST /conversion/oenorm/flat-ava Converts ÖNorm files to Dangl.AVA projects
oenormConversionConvertToGaeb() POST /conversion/oenorm/gaeb Converts ÖNorm files to GAEB files.
oenormConversionConvertToOenorm() POST /conversion/oenorm/oenorm Converts ÖNorm files to Oenorm files.

oenormConversionConvertToAva()

oenormConversionConvertToAva($oenormFile, $removePlainTextLongTexts, $removeHtmlLongTexts, $useOenormFileDeclarationForItemNumberSchema): \Dangl\AVACloud\Model\ProjectDto

Converts ÖNorm files to Dangl.AVA projects

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: Dangl.Identity
$config = Dangl\AVACloud\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');



$apiInstance = new Dangl\AVACloud\Api\OenormConversionApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$oenormFile = '/path/to/file.txt'; // \SplFileObject | The input file
$removePlainTextLongTexts = True; // bool | If set to true, plain text long texts will be removed from the output to reduce response sizes
$removeHtmlLongTexts = True; // bool | If set to true, html long texts will be removed from the output to reduce response sizes
$useOenormFileDeclarationForItemNumberSchema = True; // bool | If this is enabled, then the actual content structure inside the ÖNorm file is ignored. The item number schema of the target will be built based on the top level structure definition of the ÖNorm file, even if the file content itself might be different or empty

try {
    $result = $apiInstance->oenormConversionConvertToAva($oenormFile, $removePlainTextLongTexts, $removeHtmlLongTexts, $useOenormFileDeclarationForItemNumberSchema);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OenormConversionApi->oenormConversionConvertToAva: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
oenormFile \SplFileObject**\SplFileObject** The input file [optional]
removePlainTextLongTexts bool If set to true, plain text long texts will be removed from the output to reduce response sizes [optional]
removeHtmlLongTexts bool If set to true, html long texts will be removed from the output to reduce response sizes [optional]
useOenormFileDeclarationForItemNumberSchema bool If this is enabled, then the actual content structure inside the ÖNorm file is ignored. The item number schema of the target will be built based on the top level structure definition of the ÖNorm file, even if the file content itself might be different or empty [optional]

Return type

\Dangl\AVACloud\Model\ProjectDto

Authorization

Dangl.Identity

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/vnd.com.dangl-it.ProjectDto.v1+json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

oenormConversionConvertToExcel()

oenormConversionConvertToExcel($oenormFile, $writePrices, $writeLongTexts, $conversionCulture, $includeArticleNumbers, $lockAllCellsButPrices, $useOenormFileDeclarationForItemNumberSchema): \SplFileObject

Converts ÖNorm files to Excel

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: Dangl.Identity
$config = Dangl\AVACloud\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');



$apiInstance = new Dangl\AVACloud\Api\OenormConversionApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$oenormFile = '/path/to/file.txt'; // \SplFileObject | The input file
$writePrices = True; // bool | Defaults to true
$writeLongTexts = True; // bool | Defaults to true
$conversionCulture = 'conversionCulture_example'; // string | The culture that should be used for the conversion process, to have localized Excel files. The following conversion cultures are available: 'en' for English, 'de' for German, 'fr' for French, ' it' for Italian and ' es' for Spanish. If the culture is not supported, 'en' will be used.
$includeArticleNumbers = True; // bool | If this is enabled, then a new column will be created in the overview worksheet that contains the article numbers for positions. Article numbers will be read from 'position.commerceProperties.articleNumber'
$lockAllCellsButPrices = True; // bool | If this is enabled, then all cells except the unit price cells will be locked, so users can not accidentally modify other fields.
$useOenormFileDeclarationForItemNumberSchema = True; // bool | If this is enabled, then the actual content structure inside the ÖNorm file is ignored. The item number schema of the target will be built based on the top level structure definition of the ÖNorm file, even if the file content itself might be different or empty

try {
    $result = $apiInstance->oenormConversionConvertToExcel($oenormFile, $writePrices, $writeLongTexts, $conversionCulture, $includeArticleNumbers, $lockAllCellsButPrices, $useOenormFileDeclarationForItemNumberSchema);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OenormConversionApi->oenormConversionConvertToExcel: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
oenormFile \SplFileObject**\SplFileObject** The input file [optional]
writePrices bool Defaults to true [optional]
writeLongTexts bool Defaults to true [optional]
conversionCulture string The culture that should be used for the conversion process, to have localized Excel files. The following conversion cultures are available: 'en' for English, 'de' for German, 'fr' for French, ' it' for Italian and ' es' for Spanish. If the culture is not supported, 'en' will be used. [optional]
includeArticleNumbers bool If this is enabled, then a new column will be created in the overview worksheet that contains the article numbers for positions. Article numbers will be read from 'position.commerceProperties.articleNumber' [optional]
lockAllCellsButPrices bool If this is enabled, then all cells except the unit price cells will be locked, so users can not accidentally modify other fields. [optional]
useOenormFileDeclarationForItemNumberSchema bool If this is enabled, then the actual content structure inside the ÖNorm file is ignored. The item number schema of the target will be built based on the top level structure definition of the ÖNorm file, even if the file content itself might be different or empty [optional]

Return type

\SplFileObject

Authorization

Dangl.Identity

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: text/plain, application/json, text/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

oenormConversionConvertToFlatAva()

oenormConversionConvertToFlatAva($oenormFile, $useOenormFileDeclarationForItemNumberSchema): \Dangl\AVACloud\Model\FlatAvaProject

Converts ÖNorm files to Dangl.AVA projects

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: Dangl.Identity
$config = Dangl\AVACloud\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');



$apiInstance = new Dangl\AVACloud\Api\OenormConversionApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$oenormFile = '/path/to/file.txt'; // \SplFileObject | The input file
$useOenormFileDeclarationForItemNumberSchema = True; // bool | If this is enabled, then the actual content structure inside the ÖNorm file is ignored. The item number schema of the target will be built based on the top level structure definition of the ÖNorm file, even if the file content itself might be different or empty

try {
    $result = $apiInstance->oenormConversionConvertToFlatAva($oenormFile, $useOenormFileDeclarationForItemNumberSchema);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OenormConversionApi->oenormConversionConvertToFlatAva: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
oenormFile \SplFileObject**\SplFileObject** The input file [optional]
useOenormFileDeclarationForItemNumberSchema bool If this is enabled, then the actual content structure inside the ÖNorm file is ignored. The item number schema of the target will be built based on the top level structure definition of the ÖNorm file, even if the file content itself might be different or empty [optional]

Return type

\Dangl\AVACloud\Model\FlatAvaProject

Authorization

Dangl.Identity

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

oenormConversionConvertToGaeb()

oenormConversionConvertToGaeb($oenormFile, $destinationGaebType, $targetExchangePhaseTransform, $enforceStrictOfferPhaseLongTextOutput, $exportQuantityDetermination, $removeUnprintableCharactersFromTexts, $forceIncludeDescriptions, $treatNullItemNumberSchemaAsInvalid, $useOenormFileDeclarationForItemNumberSchema): \SplFileObject

Converts ÖNorm files to GAEB files.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: Dangl.Identity
$config = Dangl\AVACloud\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');



$apiInstance = new Dangl\AVACloud\Api\OenormConversionApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$oenormFile = '/path/to/file.txt'; // \SplFileObject | The input file
$destinationGaebType = 'destinationGaebType_example'; // string | Defaults to GAEB XML V3.2
$targetExchangePhaseTransform = 'targetExchangePhaseTransform_example'; // string | Defaults to none, meaning no transformation will be done. The phases are: Base = 81 CostEstimate = 82 OfferRequest = 83 Offer = 84 SideOffer = 85 Grant = 86
$enforceStrictOfferPhaseLongTextOutput = True; // bool | Defaults to false. If this is enabled, exported long texts to GAEB XML that use text additions will be strictly schema compliant. If this is not enabled, any text that is marked to contain a text addition is exported in full to ensure that incorrectly used text additions are still preserved in the export.
$exportQuantityDetermination = True; // bool | Defaults to false. If this is enabled, quantities are exported in detail in GAEB XML targets via the 'QtyDeterm' (Quantity Determination, or Quantity Take Off) fields. To control this, you can set custom quantity calculations in the 'QuantityComponents' property of positions. Please see the entry for 'Quantity Determination' in the Dangl.AVA HowTo documentation section. Please be advised that enabling this might export data that was not intended to be exported, like internal quantity calculation details, depending on what data you put in the 'QuantityComponents' property.
$removeUnprintableCharactersFromTexts = True; // bool | If this is enabled, unprintable characters are removed from text elements. Otherwise, the conversion might fail in case some text content contains characters that are not allowed in XML output formats. Defaults to true.
$forceIncludeDescriptions = True; // bool | If this is enabled, all description elements like texts and execution descriptions will be output to the result. This is mostly only applicable to GAEB exports to phase 84 - Offer, which does typically not include descriptions.
$treatNullItemNumberSchemaAsInvalid = True; // bool | When exporting to GAEB, an item number schema is usually required. AVACloud will try to fix invalid item number schemas. With this setting, you can also tell AVACloud to treat a null value as invalid. Otherwise, null schemas will simply be ignored and not lead to any schema being generated. It is recommended to enable this option, but it is disabled by default for compatibility reasons.
$useOenormFileDeclarationForItemNumberSchema = True; // bool | If this is enabled, then the actual content structure inside the ÖNorm file is ignored. The item number schema of the target will be built based on the top level structure definition of the ÖNorm file, even if the file content itself might be different or empty

try {
    $result = $apiInstance->oenormConversionConvertToGaeb($oenormFile, $destinationGaebType, $targetExchangePhaseTransform, $enforceStrictOfferPhaseLongTextOutput, $exportQuantityDetermination, $removeUnprintableCharactersFromTexts, $forceIncludeDescriptions, $treatNullItemNumberSchemaAsInvalid, $useOenormFileDeclarationForItemNumberSchema);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OenormConversionApi->oenormConversionConvertToGaeb: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
oenormFile \SplFileObject**\SplFileObject** The input file [optional]
destinationGaebType string Defaults to GAEB XML V3.2 [optional]
targetExchangePhaseTransform string Defaults to none, meaning no transformation will be done. The phases are: Base = 81 CostEstimate = 82 OfferRequest = 83 Offer = 84 SideOffer = 85 Grant = 86 [optional]
enforceStrictOfferPhaseLongTextOutput bool Defaults to false. If this is enabled, exported long texts to GAEB XML that use text additions will be strictly schema compliant. If this is not enabled, any text that is marked to contain a text addition is exported in full to ensure that incorrectly used text additions are still preserved in the export. [optional]
exportQuantityDetermination bool Defaults to false. If this is enabled, quantities are exported in detail in GAEB XML targets via the 'QtyDeterm' (Quantity Determination, or Quantity Take Off) fields. To control this, you can set custom quantity calculations in the 'QuantityComponents' property of positions. Please see the entry for 'Quantity Determination' in the Dangl.AVA HowTo documentation section. Please be advised that enabling this might export data that was not intended to be exported, like internal quantity calculation details, depending on what data you put in the 'QuantityComponents' property. [optional]
removeUnprintableCharactersFromTexts bool If this is enabled, unprintable characters are removed from text elements. Otherwise, the conversion might fail in case some text content contains characters that are not allowed in XML output formats. Defaults to true. [optional]
forceIncludeDescriptions bool If this is enabled, all description elements like texts and execution descriptions will be output to the result. This is mostly only applicable to GAEB exports to phase 84 - Offer, which does typically not include descriptions. [optional]
treatNullItemNumberSchemaAsInvalid bool When exporting to GAEB, an item number schema is usually required. AVACloud will try to fix invalid item number schemas. With this setting, you can also tell AVACloud to treat a null value as invalid. Otherwise, null schemas will simply be ignored and not lead to any schema being generated. It is recommended to enable this option, but it is disabled by default for compatibility reasons. [optional]
useOenormFileDeclarationForItemNumberSchema bool If this is enabled, then the actual content structure inside the ÖNorm file is ignored. The item number schema of the target will be built based on the top level structure definition of the ÖNorm file, even if the file content itself might be different or empty [optional]

Return type

\SplFileObject

Authorization

Dangl.Identity

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: text/plain, application/json, text/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

oenormConversionConvertToOenorm()

oenormConversionConvertToOenorm($oenormFile, $destinationOenormType, $tryRepairProjectStructure, $skipTryEnforceSchemaCompliantXmlOutput, $removeUnprintableCharactersFromTexts, $useOenormFileDeclarationForItemNumberSchema): \SplFileObject

Converts ÖNorm files to Oenorm files.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: Dangl.Identity
$config = Dangl\AVACloud\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');



$apiInstance = new Dangl\AVACloud\Api\OenormConversionApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$oenormFile = '/path/to/file.txt'; // \SplFileObject | The input file
$destinationOenormType = 'destinationOenormType_example'; // string | Defaults to Lv2015
$tryRepairProjectStructure = True; // bool | Defaults to false. If this is enabled, the converter will try to ensure that the project structure can be mapped to Oenorm. It might introduce additional group levels to ensure a compatible target
$skipTryEnforceSchemaCompliantXmlOutput = True; // bool | If this option is enabled, AVACloud will not attempt to force a schema-compliant Xml output for ÖNorm targets that are Xml based. By default, AVACloud will try to add required fields, even if no data is present, with sensible defaults. This behavior can be disabled with this option.
$removeUnprintableCharactersFromTexts = True; // bool | If this is enabled, unprintable characters are removed from text elements. Otherwise, the conversion might fail in case some text content contains characters that are not allowed in XML output formats. Defaults to true.
$useOenormFileDeclarationForItemNumberSchema = True; // bool | If this is enabled, then the actual content structure inside the ÖNorm file is ignored. The item number schema of the target will be built based on the top level structure definition of the ÖNorm file, even if the file content itself might be different or empty

try {
    $result = $apiInstance->oenormConversionConvertToOenorm($oenormFile, $destinationOenormType, $tryRepairProjectStructure, $skipTryEnforceSchemaCompliantXmlOutput, $removeUnprintableCharactersFromTexts, $useOenormFileDeclarationForItemNumberSchema);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OenormConversionApi->oenormConversionConvertToOenorm: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
oenormFile \SplFileObject**\SplFileObject** The input file [optional]
destinationOenormType string Defaults to Lv2015 [optional]
tryRepairProjectStructure bool Defaults to false. If this is enabled, the converter will try to ensure that the project structure can be mapped to Oenorm. It might introduce additional group levels to ensure a compatible target [optional]
skipTryEnforceSchemaCompliantXmlOutput bool If this option is enabled, AVACloud will not attempt to force a schema-compliant Xml output for ÖNorm targets that are Xml based. By default, AVACloud will try to add required fields, even if no data is present, with sensible defaults. This behavior can be disabled with this option. [optional]
removeUnprintableCharactersFromTexts bool If this is enabled, unprintable characters are removed from text elements. Otherwise, the conversion might fail in case some text content contains characters that are not allowed in XML output formats. Defaults to true. [optional]
useOenormFileDeclarationForItemNumberSchema bool If this is enabled, then the actual content structure inside the ÖNorm file is ignored. The item number schema of the target will be built based on the top level structure definition of the ÖNorm file, even if the file content itself might be different or empty [optional]

Return type

\SplFileObject

Authorization

Dangl.Identity

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: text/plain, application/json, text/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]