Skip to content

Commit fc91f5f

Browse files
committed
fix: Corrects parameter passing in constructors
Ensures correct parameter passing by using properties instead of local variables in the constructors of `CreateHyperGuestSubscriptionRequest` and `CreateOTASubscriptionRequest`. This change improves the reliability and maintainability of the subscription creation process.
1 parent 4ffd504 commit fc91f5f

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

libs/HyperGuestSDK/Api/Pdm/Subscriptions/Subscription.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,14 @@ public record CreateHyperGuestSubscriptionRequest(
169169
int Version = 1,
170170
string? ChannelMapping = null)
171171
: CreateSubscriptionRequest(
172-
method,
173-
propertyIds,
174-
new Dictionary<CallbackUrls, string> { { CallbackUrls.Callback, callbackUrl } },
172+
Method,
173+
PropertyIds,
174+
new Dictionary<CallbackUrls, string> { { CallbackUrls.Callback, CallbackUrl } },
175175
SubscriptionEnvelope.HyperGuest,
176-
emails,
177-
authentication,
178-
version,
179-
channelMapping);
176+
Emails,
177+
Authentication,
178+
Version,
179+
ChannelMapping);
180180

181181
/// <summary>
182182
/// Represents a request to create a subscription using the OTA envelope.
@@ -200,14 +200,14 @@ public record CreateOTASubscriptionRequest(
200200
int Version = 1,
201201
string? ChannelMapping = null)
202202
: CreateSubscriptionRequest(
203-
method,
204-
propertyIds,
205-
MapUrls(hotelNotificationUrl, hotelRateNotificationUrl),
203+
Method,
204+
PropertyIds,
205+
MapUrls(HotelNotificationUrl, HotelRateNotificationUrl),
206206
SubscriptionEnvelope.HyperGuest,
207-
emails,
208-
authentication,
209-
version,
210-
channelMapping)
207+
Emails,
208+
Authentication,
209+
Version,
210+
ChannelMapping)
211211
{
212212
static Dictionary<CallbackUrls, string> MapUrls(string? hotelNotificationUrl, string? hotelRateNotificationUrl)
213213
{

0 commit comments

Comments
 (0)