From 17b37024c4c5348ef84c87410adf798ab5c9db2c Mon Sep 17 00:00:00 2001 From: Ross Schulman Date: Fri, 20 Dec 2024 07:39:08 -0500 Subject: [PATCH] Add `new` function to `CredentialOfferParameters` (#25) --- src/credential_offer.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/credential_offer.rs b/src/credential_offer.rs index 67eff47..f1d1535 100644 --- a/src/credential_offer.rs +++ b/src/credential_offer.rs @@ -133,6 +133,18 @@ pub struct CredentialOfferParameters { } impl CredentialOfferParameters { + pub fn new( + credential_issuer: IssuerUrl, + credential_configuration_ids: Vec, + grants: Option, + ) -> Self { + Self { + credential_issuer, + credential_configuration_ids, + grants, + } + } + pub fn issuer(&self) -> &IssuerUrl { &self.credential_issuer }