Skip to content

Commit cd33374

Browse files
chore: add b.e. url handling
1 parent 5f7544d commit cd33374

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed

src/domains/pay-wallet-app/04_apim_io_payment_wallet.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,20 @@ resource "azurerm_api_management_api_operation_policy" "get_payment_methods_for_
8383
)
8484
}
8585

86+
resource "azurerm_api_management_api_operation_policy" "post_payment_methods_for_io" {
87+
api_name = "${local.project}-io-payment-wallet-api-v1"
88+
resource_group_name = local.pagopa_apim_rg
89+
api_management_name = local.pagopa_apim_name
90+
operation_id = "getAllPaymentMethodsForIOPost"
91+
92+
xml_content = templatefile(
93+
"./api/io-payment-wallet/v1/_post_payment_methods.xml.tpl",
94+
{
95+
ecommerce_hostname = local.ecommerce_hostname
96+
}
97+
)
98+
}
99+
86100
resource "azurerm_api_management_named_value" "pay_wallet_jwt_issuer_api_key_value" {
87101
name = "pay-wallet-jwt-issuer-api-key-value"
88102
api_management_name = local.pagopa_apim_name

src/domains/pay-wallet-app/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
| [azurerm_api_management_api_operation_policy.notify_wallet](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource |
4242
| [azurerm_api_management_api_operation_policy.notify_wallet_auth_request](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource |
4343
| [azurerm_api_management_api_operation_policy.post_io_wallets](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource |
44+
| [azurerm_api_management_api_operation_policy.post_payment_methods_for_io](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_operation_policy) | resource |
4445
| [azurerm_api_management_api_version_set.io_payment_wallet_api](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_version_set) | resource |
4546
| [azurerm_api_management_api_version_set.npg_notifications_api](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_version_set) | resource |
4647
| [azurerm_api_management_api_version_set.pay_wallet_healthcheck_api](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/api_management_api_version_set) | resource |

src/domains/pay-wallet-app/api/io-payment-wallet/v1/_openapi.json.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
"tags": [
117117
"paymentMethods"
118118
],
119-
"operationId": "getAllPaymentMethods",
119+
"operationId": "getAllPaymentMethodsForIOPost",
120120
"summary": "Retrieve all Payment Methods for IO (by filter)",
121121
"description": "POST with body payload - no resources created: API for retrieves payment methods using filter criteria provided in the request body.",
122122
"security": [
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<policies>
2+
<inbound>
3+
<base />
4+
<!-- Set payment-methods API Key header -->
5+
<set-header name="x-api-key" exists-action="override">
6+
<value>{{ecommerce-payment-methods-api-key-value}}</value>
7+
</set-header>
8+
<set-backend-service base-url="https://${ecommerce_hostname}/pagopa-ecommerce-payment-methods-handler"/>
9+
</inbound>
10+
<outbound>
11+
<base />
12+
</outbound>
13+
<backend>
14+
<base />
15+
</backend>
16+
<on-error>
17+
<base />
18+
</on-error>
19+
</policies>

0 commit comments

Comments
 (0)