-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTemplateParam.cs
More file actions
29 lines (26 loc) · 838 Bytes
/
TemplateParam.cs
File metadata and controls
29 lines (26 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// <copyright file="TemplateParam.cs" company="APIMatic">
// Copyright (c) APIMatic. All rights reserved.
// </copyright>
using System;
using System.Collections;
using System.Collections.Generic;
using APIMatic.Core.Utilities;
namespace APIMatic.Core.Request.Parameters
{
/// <summary>
/// Template parameter class used to send a request parameter in template
/// </summary>
public class TemplateParam : Parameter
{
internal TemplateParam() => typeName = "template";
internal override void Apply(RequestBuilder requestBuilder)
{
if (!validated)
{
return;
}
CoreHelper.TryGetInnerValueForContainer(value, out var innerValue);
requestBuilder.templateParameters.Add(key, innerValue ?? value);
}
}
}