mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 13:07:02 +00:00
consumers/current adding consumer name etc
This commit is contained in:
parent
eccd54bb40
commit
b0182792e3
@ -567,6 +567,9 @@ trait APIMethods600 {
|
||||
|""",
|
||||
EmptyBody,
|
||||
CurrentConsumerJsonV600(
|
||||
app_name = "SOFI",
|
||||
app_type = "Web",
|
||||
description = "Account Management",
|
||||
consumer_id = "123",
|
||||
call_counters = redisCallCountersJsonV600
|
||||
),
|
||||
@ -597,7 +600,7 @@ trait APIMethods600 {
|
||||
currentConsumerCallCounters <- Future(RateLimitingUtil.consumerRateLimitState(consumer.consumerId.get).toList)
|
||||
callCountersJson = createRedisCallCountersJson(currentConsumerCallCounters)
|
||||
} yield {
|
||||
(CurrentConsumerJsonV600(consumer.consumerId.get, callCountersJson), HttpCode.`200`(callContext))
|
||||
(CurrentConsumerJsonV600(consumer.name.get, consumer.appType.get, consumer.description.get, consumer.consumerId.get, callCountersJson), HttpCode.`200`(callContext))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,6 +68,9 @@ case class TokenJSON(
|
||||
)
|
||||
|
||||
case class CurrentConsumerJsonV600(
|
||||
app_name: String,
|
||||
app_type: String,
|
||||
description: String,
|
||||
consumer_id: String,
|
||||
call_counters: RedisCallCountersJsonV600
|
||||
)
|
||||
|
||||
@ -94,6 +94,12 @@ class ConsumerTest extends V600ServerSetup {
|
||||
consumerJson.consumer_id should not be empty
|
||||
consumerJson.consumer_id should not be null
|
||||
consumerJson.consumer_id shouldBe a[String]
|
||||
// consumerJson.app_name should not be empty (can be empty)
|
||||
consumerJson.app_name shouldBe a[String]
|
||||
// consumerJson.app_type should not be empty (can be empty)
|
||||
consumerJson.app_type shouldBe a[String]
|
||||
// consumerJson.description should not be empty (can be empty)
|
||||
consumerJson.description shouldBe a[String]
|
||||
consumerJson.call_counters should not be null
|
||||
consumerJson.call_counters.per_second should not be null
|
||||
consumerJson.call_counters.per_minute should not be null
|
||||
|
||||
Loading…
Reference in New Issue
Block a user