Skip to content

Latest commit

 

History

History
302 lines (223 loc) · 18 KB

RebConversionApi.md

File metadata and controls

302 lines (223 loc) · 18 KB

Dangl\AVACloud\RebConversionApi

All URIs are relative to https://avacloud-api.dangl-it.com

Method HTTP request Description
rebConversionConvertToAva POST /conversion/reb/ava Converts REB files to Dangl.AVA projects
rebConversionConvertToExcel POST /conversion/reb/excel Converts REB files to Excel
rebConversionConvertToFlatAva POST /conversion/reb/flat-ava Converts REB files to Dangl.AVA projects
rebConversionConvertToGaeb POST /conversion/reb/gaeb Converts REB files to GAEB files
rebConversionConvertToOenorm POST /conversion/reb/oenorm Converts REB files to Oenorm

rebConversionConvertToAva

\Dangl\AVACloud\Model\ProjectDto rebConversionConvertToAva($reb_file, $remove_plain_text_long_texts, $remove_html_long_texts)

Converts REB 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\RebConversionApi(
    // 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
);
$reb_file = "/path/to/file.txt"; // \SplFileObject | The input file
$remove_plain_text_long_texts = true; // bool | If set to true, plain text long texts will be removed from the output to reduce response sizes
$remove_html_long_texts = true; // bool | If set to true, html long texts will be removed from the output to reduce response sizes

try {
    $result = $apiInstance->rebConversionConvertToAva($reb_file, $remove_plain_text_long_texts, $remove_html_long_texts);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RebConversionApi->rebConversionConvertToAva: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
reb_file \SplFileObject The input file [optional]
remove_plain_text_long_texts bool If set to true, plain text long texts will be removed from the output to reduce response sizes [optional]
remove_html_long_texts bool If set to true, html long texts will be removed from the output to reduce response sizes [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]

rebConversionConvertToExcel

\SplFileObject rebConversionConvertToExcel($reb_file, $write_prices, $write_long_texts, $conversion_culture, $include_article_numbers)

Converts REB 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\RebConversionApi(
    // 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
);
$reb_file = "/path/to/file.txt"; // \SplFileObject | The input file
$write_prices = true; // bool | Defaults to true
$write_long_texts = true; // bool | Defaults to true
$conversion_culture = "conversion_culture_example"; // string | The culture that should be used for the conversion process, to have localized Excel files
$include_article_numbers = 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'

try {
    $result = $apiInstance->rebConversionConvertToExcel($reb_file, $write_prices, $write_long_texts, $conversion_culture, $include_article_numbers);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RebConversionApi->rebConversionConvertToExcel: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
reb_file \SplFileObject The input file [optional]
write_prices bool Defaults to true [optional]
write_long_texts bool Defaults to true [optional]
conversion_culture string The culture that should be used for the conversion process, to have localized Excel files [optional]
include_article_numbers 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]

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]

rebConversionConvertToFlatAva

\Dangl\AVACloud\Model\FlatAvaProject rebConversionConvertToFlatAva($reb_file)

Converts REB 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\RebConversionApi(
    // 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
);
$reb_file = "/path/to/file.txt"; // \SplFileObject | The input file

try {
    $result = $apiInstance->rebConversionConvertToFlatAva($reb_file);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RebConversionApi->rebConversionConvertToFlatAva: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
reb_file \SplFileObject The input file [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]

rebConversionConvertToGaeb

\SplFileObject rebConversionConvertToGaeb($reb_file, $destination_gaeb_type, $target_exchange_phase_transform, $enforce_strict_offer_phase_long_text_output, $export_quantity_determination, $remove_unprintable_characters_from_texts, $force_include_descriptions, $treat_null_item_number_schema_as_invalid)

Converts REB 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\RebConversionApi(
    // 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
);
$reb_file = "/path/to/file.txt"; // \SplFileObject | The input file
$destination_gaeb_type = "destination_gaeb_type_example"; // string | Defaults to GAEB XML V3.2
$target_exchange_phase_transform = "target_exchange_phase_transform_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
$enforce_strict_offer_phase_long_text_output = 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.
$export_quantity_determination = 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.
$remove_unprintable_characters_from_texts = 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.
$force_include_descriptions = 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.
$treat_null_item_number_schema_as_invalid = 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.

try {
    $result = $apiInstance->rebConversionConvertToGaeb($reb_file, $destination_gaeb_type, $target_exchange_phase_transform, $enforce_strict_offer_phase_long_text_output, $export_quantity_determination, $remove_unprintable_characters_from_texts, $force_include_descriptions, $treat_null_item_number_schema_as_invalid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RebConversionApi->rebConversionConvertToGaeb: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
reb_file \SplFileObject The input file [optional]
destination_gaeb_type string Defaults to GAEB XML V3.2 [optional]
target_exchange_phase_transform 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]
enforce_strict_offer_phase_long_text_output 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]
export_quantity_determination 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]
remove_unprintable_characters_from_texts 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]
force_include_descriptions 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]
treat_null_item_number_schema_as_invalid 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]

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]

rebConversionConvertToOenorm

\SplFileObject rebConversionConvertToOenorm($reb_file, $destination_oenorm_type, $try_repair_project_structure, $skip_try_enforce_schema_compliant_xml_output, $remove_unprintable_characters_from_texts)

Converts REB files to Oenorm

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\RebConversionApi(
    // 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
);
$reb_file = "/path/to/file.txt"; // \SplFileObject | The input file
$destination_oenorm_type = "destination_oenorm_type_example"; // string | Defaults to Lv2015
$try_repair_project_structure = 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
$skip_try_enforce_schema_compliant_xml_output = 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.
$remove_unprintable_characters_from_texts = 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.

try {
    $result = $apiInstance->rebConversionConvertToOenorm($reb_file, $destination_oenorm_type, $try_repair_project_structure, $skip_try_enforce_schema_compliant_xml_output, $remove_unprintable_characters_from_texts);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RebConversionApi->rebConversionConvertToOenorm: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
reb_file \SplFileObject The input file [optional]
destination_oenorm_type string Defaults to Lv2015 [optional]
try_repair_project_structure 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]
skip_try_enforce_schema_compliant_xml_output 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]
remove_unprintable_characters_from_texts 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]

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]