WIP: add requests for elixForms module RDA Manutenzione #8

Draft
pierpaolo.mammi wants to merge 5 commits from feature/add-rda-manutenzione into main
pull from: feature/add-rda-manutenzione
2 changed files with 100 additions and 0 deletions
Showing only changes of commit 539650c336 - Show all commits

No files matched your search

@@ -0,0 +1,50 @@
info:
name: Importo richiesta - Calcolo importo Cassa Previdenziale
type: http
seq: 1
http:
method: POST
url: "{{elixFormsApiUrl}}/eftl/process/v1"
headers:
- name: x-requested-with
value: XMLHttpRequest
- name: x-api-key
value: "{{elixFormsWsAuthenticationToken}}"
- name: x-ef-request-id
value: "40749"
body:
type: json
data: |-
{
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
"userContext": {
"lang": "IT",
"crlf": "\r\n"
}
}
auth: inherit
runtime:
scripts:
- type: before-request
code: |-
// Copy-pasta your EFTL document below inside the template literals (`)
var eftlDocumentToBeProcessed = bru.setVar("elixBase64EftlDocument", btoa(String.raw`
[EFTL][HEADER name="trimDocument" value="true" type="boolean" /]
[VAR name="imponibile" type="number"][TAG]GETVALUEBYTAG,RICHIESTA_IMPONIBILE,REQUEST,ID_OBJECT[/TAG][/VAR]
[VAR name="cassaPrevidenzialePercentuale" type="number"][TAG]GETVALUEBYTAG,RICHIESTA_CASSA_PREVIDENZIALE_PERCENTUALE,REQUEST,ID_OBJECT[/TAG][/VAR]
[% cassaPrevidenziale = imponibile * cassaPrevidenzialePercentuale / 100; %]
[FORMAT type="number" pattern="#,##0.00"][% cassaPrevidenziale %][/FORMAT]
[/EFTL]
`));
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
forwardAuthorizationHeader: true
@@ -0,0 +1,50 @@
info:
name: Importo richiesta - Calcolo importo IVA
type: http
seq: 2
http:
method: POST
url: "{{elixFormsApiUrl}}/eftl/process/v1"
headers:
- name: x-requested-with
value: XMLHttpRequest
- name: x-api-key
value: "{{elixFormsWsAuthenticationToken}}"
- name: x-ef-request-id
value: "40749"
body:
type: json
data: |-
{
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
"userContext": {
"lang": "IT",
"crlf": "\r\n"
}
}
auth: inherit
runtime:
scripts:
- type: before-request
code: |-
// Copy-pasta your EFTL document below inside the template literals (`)
var eftlDocumentToBeProcessed = bru.setVar("elixBase64EftlDocument", btoa(String.raw`
[EFTL][HEADER name="trimDocument" value="true" type="boolean" /]
[VAR name="imponibile" type="number"][TAG]GETVALUEBYTAG,RICHIESTA_IMPONIBILE,REQUEST,ID_OBJECT[/TAG][/VAR]
[VAR name="ivaPercentuale" type="number"][TAG]GETVALUEBYTAG,RICHIESTA_IVA_PERCENTUALE,REQUEST,ID_OBJECT[/TAG][/VAR]
[% iva = imponibile * ivaPercentuale / 100; %]
[FORMAT type="number" pattern="#,##0.00"][% iva %][/FORMAT]
[/EFTL]
`));
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
forwardAuthorizationHeader: true