Skip to content

Commit

Permalink
Merge branch 'relay/api-contract' of https://github.com/juspay/hypers…
Browse files Browse the repository at this point in the history
…witch into relay/api-contract
  • Loading branch information
ShankarSinghC committed Dec 19, 2024
2 parents 22be8b7 + 0b5a2e9 commit 0b5c449
Show file tree
Hide file tree
Showing 10 changed files with 300 additions and 9 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ All notable changes to HyperSwitch will be documented here.

- - -

## 2024.12.19.0

### Refactors

- **dynamic_routing:** Update the authentication for update config to include JWT type ([#6785](https://github.com/juspay/hyperswitch/pull/6785)) ([`db51ec4`](https://github.com/juspay/hyperswitch/commit/db51ec43bc629dc20ceaa2bb57ede888d2d2fc2c))

### Miscellaneous Tasks

- **env:** Remove unified_authentication_service base_url from integ, sandbox and production toml ([#6865](https://github.com/juspay/hyperswitch/pull/6865)) ([`03c71ea`](https://github.com/juspay/hyperswitch/commit/03c71ea366041af060b385dc9d88d4b9eda4abea))

**Full Changelog:** [`2024.12.18.0...2024.12.19.0`](https://github.com/juspay/hyperswitch/compare/2024.12.18.0...2024.12.19.0)

- - -

## 2024.12.18.0

### Features
Expand Down
239 changes: 238 additions & 1 deletion api-reference/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -4020,7 +4020,91 @@
]
}
},
"/account/:account_id/business_profile/:profile_id/dynamic_routing/success_based/toggle": {
"/account/{account_id}/business_profile/{profile_id}/dynamic_routing/success_based/config/{algorithm_id}": {
"patch": {
"tags": [
"Routing"
],
"summary": "Routing - Update success based dynamic routing config for profile",
"description": "Update success based dynamic routing algorithm",
"operationId": "Update success based dynamic routing configs",
"parameters": [
{
"name": "account_id",
"in": "path",
"description": "Merchant id",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "profile_id",
"in": "path",
"description": "Profile id under which Dynamic routing needs to be toggled",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "algorithm_id",
"in": "path",
"description": "Success based routing algorithm id which was last activated to update the config",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DynamicRoutingFeatures"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Routing Algorithm updated",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RoutingDictionaryRecord"
}
}
}
},
"400": {
"description": "Update body is malformed"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Resource missing"
},
"422": {
"description": "Unprocessable request"
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"api_key": []
},
{
"jwt_key": []
}
]
}
},
"/account/{account_id}/business_profile/{profile_id}/dynamic_routing/success_based/toggle": {
"post": {
"tags": [
"Routing"
Expand Down Expand Up @@ -4094,6 +4178,80 @@
]
}
},
"/account/{account_id}/business_profile/{profile_id}/dynamic_routing/elimination/toggle": {
"post": {
"tags": [
"Routing"
],
"summary": "Routing - Toggle elimination routing for profile",
"description": "Create a elimination based dynamic routing algorithm",
"operationId": "Toggle elimination routing algorithm",
"parameters": [
{
"name": "account_id",
"in": "path",
"description": "Merchant id",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "profile_id",
"in": "path",
"description": "Profile id under which Dynamic routing needs to be toggled",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "enable",
"in": "query",
"description": "Feature to enable for success based routing",
"required": true,
"schema": {
"$ref": "#/components/schemas/DynamicRoutingFeatures"
}
}
],
"responses": {
"200": {
"description": "Routing Algorithm created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RoutingDictionaryRecord"
}
}
}
},
"400": {
"description": "Request body is malformed"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Resource missing"
},
"422": {
"description": "Unprocessable request"
},
"500": {
"description": "Internal server error"
}
},
"security": [
{
"api_key": []
},
{
"jwt_key": []
}
]
}
},
"/blocklist": {
"delete": {
"tags": [
Expand Down Expand Up @@ -9649,6 +9807,23 @@
"ZWL"
]
},
"CurrentBlockThreshold": {
"type": "object",
"properties": {
"duration_in_mins": {
"type": "integer",
"format": "int64",
"nullable": true,
"minimum": 0
},
"max_total_count": {
"type": "integer",
"format": "int64",
"nullable": true,
"minimum": 0
}
}
},
"CustomerAcceptance": {
"type": "object",
"description": "This \"CustomerAcceptance\" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.",
Expand Down Expand Up @@ -10471,6 +10646,18 @@
}
}
},
"DynamicRoutingConfigParams": {
"type": "string",
"enum": [
"PaymentMethod",
"PaymentMethodType",
"AuthenticationType",
"Currency",
"Country",
"CardNetwork",
"CardBin"
]
},
"DynamicRoutingFeatures": {
"type": "string",
"enum": [
Expand Down Expand Up @@ -24598,6 +24785,56 @@
},
"additionalProperties": false
},
"SuccessBasedRoutingConfig": {
"type": "object",
"properties": {
"params": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DynamicRoutingConfigParams"
},
"nullable": true
},
"config": {
"allOf": [
{
"$ref": "#/components/schemas/SuccessBasedRoutingConfigBody"
}
],
"nullable": true
}
}
},
"SuccessBasedRoutingConfigBody": {
"type": "object",
"properties": {
"min_aggregates_size": {
"type": "integer",
"format": "int32",
"nullable": true,
"minimum": 0
},
"default_success_rate": {
"type": "number",
"format": "double",
"nullable": true
},
"max_aggregates_size": {
"type": "integer",
"format": "int32",
"nullable": true,
"minimum": 0
},
"current_block_threshold": {
"allOf": [
{
"$ref": "#/components/schemas/CurrentBlockThreshold"
}
],
"nullable": true
}
}
},
"SurchargeDetailsResponse": {
"type": "object",
"required": [
Expand Down
3 changes: 3 additions & 0 deletions config/deployments/env_specific.toml
Original file line number Diff line number Diff line change
Expand Up @@ -342,3 +342,6 @@ entity_logo_url = "https://example.com/logo.svg" # Logo URL of the entity to be
foreground_color = "#000000" # Foreground color of email text
primary_color = "#006DF9" # Primary color of email body
background_color = "#FFFFFF" # Background color of email body

[connectors.unified_authentication_service] #Unified Authentication Service Configuration
base_url = "http://localhost:8000" #base url to call unified authentication service
1 change: 0 additions & 1 deletion config/deployments/integration_test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ thunes.base_url = "https://api.limonetikqualif.com/"
trustpay.base_url = "https://test-tpgw.trustpay.eu/"
trustpay.base_url_bank_redirects = "https://aapi.trustpay.eu/"
tsys.base_url = "https://stagegw.transnox.com/"
unified_authentication_service.base_url = "http://localhost:8000"
volt.base_url = "https://api.sandbox.volt.io/"
wellsfargo.base_url = "https://apitest.cybersource.com/"
wellsfargopayout.base_url = "https://api-sandbox.wellsfargo.com/"
Expand Down
1 change: 0 additions & 1 deletion config/deployments/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ thunes.base_url = "https://api.limonetik.com/"
trustpay.base_url = "https://tpgw.trustpay.eu/"
trustpay.base_url_bank_redirects = "https://aapi.trustpay.eu/"
tsys.base_url = "https://gateway.transit-pass.com/"
unified_authentication_service.base_url = "http://localhost:8000"
volt.base_url = "https://api.volt.io/"
wellsfargo.base_url = "https://api.cybersource.com/"
wellsfargopayout.base_url = "https://api.wellsfargo.com/"
Expand Down
1 change: 0 additions & 1 deletion config/deployments/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ thunes.base_url = "https://api.limonetikqualif.com/"
trustpay.base_url = "https://test-tpgw.trustpay.eu/"
trustpay.base_url_bank_redirects = "https://aapi.trustpay.eu/"
tsys.base_url = "https://stagegw.transnox.com/"
unified_authentication_service.base_url = "http://localhost:8000"
volt.base_url = "https://api.sandbox.volt.io/"
wellsfargo.base_url = "https://apitest.cybersource.com/"
wellsfargopayout.base_url = "https://api-sandbox.wellsfargo.com/"
Expand Down
2 changes: 1 addition & 1 deletion crates/api_models/src/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub struct RelayResponse {
/// The identifier that is associated to a resource at the connector reference to which the relay request is being made
#[schema(example = "7256228702616471803954")]
pub connector_resource_id: String,
/// Identifier of the connector ( merchant connector account ) which was chosen to make the payment
/// Identifier of the connector ( merchant connector account ) to which relay request is being made
#[schema(example = "mca_5apGeP94tMts6rg3U3kR", value_type = String)]
pub connector_id: common_utils::id_type::MerchantConnectorAccountId,
/// The business profile that is associated with this relay request.
Expand Down
6 changes: 6 additions & 0 deletions crates/openapi/src/openapi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ Never share your secret api keys. Keep them guarded and secure.
routes::routing::routing_retrieve_linked_config,
routes::routing::routing_retrieve_default_config_for_profiles,
routes::routing::routing_update_default_config_for_profile,
routes::routing::success_based_routing_update_configs,
routes::routing::toggle_success_based_routing,
routes::routing::toggle_elimination_routing,
// Routes for blocklist
routes::blocklist::remove_entry_from_blocklist,
Expand Down Expand Up @@ -601,6 +603,10 @@ Never share your secret api keys. Keep them guarded and secure.
api_models::routing::RoutingKind,
api_models::routing::RoutableConnectorChoice,
api_models::routing::DynamicRoutingFeatures,
api_models::routing::SuccessBasedRoutingConfig,
api_models::routing::DynamicRoutingConfigParams,
api_models::routing::CurrentBlockThreshold,
api_models::routing::SuccessBasedRoutingConfigBody,
api_models::routing::LinkedRoutingConfigRetrieveResponse,
api_models::routing::RoutingRetrieveResponse,
api_models::routing::ProfileDefaultRoutingConfig,
Expand Down
Loading

0 comments on commit 0b5c449

Please sign in to comment.