Skip to content

Commit 46dacf6

Browse files
authored
Merge pull request #171 from CyberSource/march-release-2024
March release 2024
2 parents decfe5e + 71fa3f1 commit 46dacf6

File tree

411 files changed

+5955
-2902
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

411 files changed

+5955
-2902
lines changed

Api/InstrumentIdentifierApi.cs

Lines changed: 66 additions & 66 deletions
Large diffs are not rendered by default.

Client/ApiClient.cs

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,16 @@ private RestRequest PrepareRestRequest(
270270
}
271271

272272
RestRequest requestT = new RestRequest(path);
273-
RestClient.Options.UserAgent = Configuration.UserAgent;
273+
RestClientOptions clientOptions = RestClient.Options;
274274

275275
if (Configuration.Proxy != null)
276276
{
277-
RestClient.Options.Proxy = Configuration.Proxy;
277+
clientOptions.Proxy = Configuration.Proxy;
278278
}
279279

280+
RestClient = new RestClient(clientOptions);
281+
RestClient.Options.UserAgent = Configuration.UserAgent;
282+
280283
// Add Header Parameter, if any
281284
// Passed to this function
282285
foreach (var param in headerParams)
@@ -442,14 +445,13 @@ public object CallApi(
442445

443446
// set timeout
444447
request.Timeout = Configuration.Timeout;
445-
// set user agent
446-
RestClient.Options.UserAgent = Configuration.UserAgent;
448+
RestClientOptions clientOptions = RestClient.Options;
447449

448450
// RestClient.ClearHandlers();
449451

450452
if (Configuration.Proxy != null)
451453
{
452-
RestClient.Options.Proxy = Configuration.Proxy;
454+
clientOptions.Proxy = Configuration.Proxy;
453455
}
454456

455457
// Adding Client Cert
@@ -467,9 +469,12 @@ public object CallApi(
467469
// Importing Certificates
468470
var certificate = new X509Certificate2(fileName, clientCertPassword);
469471
clientCertPassword.Dispose();
470-
RestClient.Options.ClientCertificates = new X509CertificateCollection { certificate };
472+
clientOptions.ClientCertificates = new X509CertificateCollection { certificate };
471473
}
472474

475+
RestClient = new RestClient(clientOptions);
476+
RestClient.Options.UserAgent = Configuration.UserAgent;
477+
473478
// Logging Request Headers
474479
var headerPrintOutput = new StringBuilder();
475480
foreach (var param in request.Parameters)
@@ -570,7 +575,7 @@ public async System.Threading.Tasks.Task<object> CallApiAsync(
570575
// set timeout
571576
request.Timeout = Configuration.Timeout;
572577
// set user agent
573-
RestClient.Options.UserAgent = Configuration.UserAgent;
578+
RestClientOptions clientOptions = RestClient.Options;
574579

575580
if (logUtility.IsMaskingEnabled(logger))
576581
{
@@ -581,6 +586,9 @@ public async System.Threading.Tasks.Task<object> CallApiAsync(
581586
logger.Debug($"HTTP Request Headers :\n{headerPrintOutput.ToString()}");
582587
}
583588

589+
RestClient = new RestClient(clientOptions);
590+
RestClient.Options.UserAgent = Configuration.UserAgent;
591+
584592
InterceptRequest(request);
585593
var response = await RestClient.ExecuteAsync(request);
586594
InterceptResponse(request, response);
@@ -991,10 +999,13 @@ public void CallAuthenticationHeaders(string requestType, string requestTarget,
991999
RestClient = new RestClient("https://" + merchantConfig.HostName);
9921000
}
9931001

1002+
RestClientOptions clientOptions = RestClient.Options;
9941003
if (Configuration.Proxy != null)
9951004
{
996-
RestClient.Options.Proxy = Configuration.Proxy;
1005+
clientOptions.Proxy = Configuration.Proxy;
9971006
}
1007+
1008+
RestClient = new RestClient(clientOptions);
9981009
}
9991010
}
10001011
}
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@
2525
namespace CyberSource.Model
2626
{
2727
/// <summary>
28-
/// PaymentsProductsCardProcessingConfigurationInformationConfigurations
28+
/// CardProcessingConfig
2929
/// </summary>
3030
[DataContract]
31-
public partial class PaymentsProductsCardProcessingConfigurationInformationConfigurations : IEquatable<PaymentsProductsCardProcessingConfigurationInformationConfigurations>, IValidatableObject
31+
public partial class CardProcessingConfig : IEquatable<CardProcessingConfig>, IValidatableObject
3232
{
3333
/// <summary>
34-
/// Initializes a new instance of the <see cref="PaymentsProductsCardProcessingConfigurationInformationConfigurations" /> class.
34+
/// Initializes a new instance of the <see cref="CardProcessingConfig" /> class.
3535
/// </summary>
3636
/// <param name="Common">Common.</param>
3737
/// <param name="Features">Features.</param>
38-
public PaymentsProductsCardProcessingConfigurationInformationConfigurations(PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon Common = default(PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon), PaymentsProductsCardProcessingConfigurationInformationConfigurationsFeatures Features = default(PaymentsProductsCardProcessingConfigurationInformationConfigurationsFeatures))
38+
public CardProcessingConfig(CardProcessingConfigCommon Common = default(CardProcessingConfigCommon), CardProcessingConfigFeatures Features = default(CardProcessingConfigFeatures))
3939
{
4040
this.Common = Common;
4141
this.Features = Features;
@@ -45,13 +45,13 @@ public partial class PaymentsProductsCardProcessingConfigurationInformationConfi
4545
/// Gets or Sets Common
4646
/// </summary>
4747
[DataMember(Name="common", EmitDefaultValue=false)]
48-
public PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon Common { get; set; }
48+
public CardProcessingConfigCommon Common { get; set; }
4949

5050
/// <summary>
5151
/// Gets or Sets Features
5252
/// </summary>
5353
[DataMember(Name="features", EmitDefaultValue=false)]
54-
public PaymentsProductsCardProcessingConfigurationInformationConfigurationsFeatures Features { get; set; }
54+
public CardProcessingConfigFeatures Features { get; set; }
5555

5656
/// <summary>
5757
/// Returns the string presentation of the object
@@ -60,7 +60,7 @@ public partial class PaymentsProductsCardProcessingConfigurationInformationConfi
6060
public override string ToString()
6161
{
6262
var sb = new StringBuilder();
63-
sb.Append("class PaymentsProductsCardProcessingConfigurationInformationConfigurations {\n");
63+
sb.Append("class CardProcessingConfig {\n");
6464
sb.Append(" Common: ").Append(Common).Append("\n");
6565
sb.Append(" Features: ").Append(Features).Append("\n");
6666
sb.Append("}\n");
@@ -84,15 +84,15 @@ public string ToJson()
8484
public override bool Equals(object obj)
8585
{
8686
// credit: http://stackoverflow.com/a/10454552/677735
87-
return this.Equals(obj as PaymentsProductsCardProcessingConfigurationInformationConfigurations);
87+
return this.Equals(obj as CardProcessingConfig);
8888
}
8989

9090
/// <summary>
91-
/// Returns true if PaymentsProductsCardProcessingConfigurationInformationConfigurations instances are equal
91+
/// Returns true if CardProcessingConfig instances are equal
9292
/// </summary>
93-
/// <param name="other">Instance of PaymentsProductsCardProcessingConfigurationInformationConfigurations to be compared</param>
93+
/// <param name="other">Instance of CardProcessingConfig to be compared</param>
9494
/// <returns>Boolean</returns>
95-
public bool Equals(PaymentsProductsCardProcessingConfigurationInformationConfigurations other)
95+
public bool Equals(CardProcessingConfig other)
9696
{
9797
// credit: http://stackoverflow.com/a/10454552/677735
9898
if (other == null)
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
namespace CyberSource.Model
2626
{
2727
/// <summary>
28-
/// PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon
28+
/// CardProcessingConfigCommon
2929
/// </summary>
3030
[DataContract]
31-
public partial class PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon : IEquatable<PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon>, IValidatableObject
31+
public partial class CardProcessingConfigCommon : IEquatable<CardProcessingConfigCommon>, IValidatableObject
3232
{
3333
/// <summary>
3434
/// Authorization Finality indicator. Please note that the input can be in small case or capitals but response is in small case as of now. It will be made capitals everywhere in the next version. Applicable for Elavon Americas (elavonamericas), TSYS (tsys), Barclays (barclays2), Streamline (streamline2), Six (six), Barclays HISO (barclayshiso), GPN (gpn), FDI Global (fdiglobal), GPX (gpx), Paymentech Tampa (paymentechtampa), FDC Nashville (smartfdc), VPC and Chase Paymentech Salem (chasepaymentechsalem) processors. Validation details (for selected processors)... &lt;table&gt; &lt;thead&gt;&lt;tr&gt;&lt;th&gt;Processor&lt;/th&gt;&lt;th&gt;Acceptance Type&lt;/th&gt;&lt;th&gt;Required&lt;/th&gt;&lt;th&gt;Default Value&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt; &lt;tr&gt;&lt;td&gt;Barclays&lt;/td&gt;&lt;td&gt;cnp, cp, hybrid&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;FINAL&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Barclays HISO&lt;/td&gt;&lt;td&gt;cnp, cp, hybrid&lt;/td&gt;&lt;td&gt;Yes&lt;/td&gt;&lt;td&gt;FINAL&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt;
@@ -64,7 +64,7 @@ public enum DefaultAuthTypeCodeEnum
6464
[DataMember(Name="defaultAuthTypeCode", EmitDefaultValue=false)]
6565
public DefaultAuthTypeCodeEnum? DefaultAuthTypeCode { get; set; }
6666
/// <summary>
67-
/// Initializes a new instance of the <see cref="PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon" /> class.
67+
/// Initializes a new instance of the <see cref="CardProcessingConfigCommon" /> class.
6868
/// </summary>
6969
/// <param name="Processors">e.g. * amexdirect * barclays2 * CUP * EFTPOS * fdiglobal * gpx * smartfdc * tsys * vero * VPC For VPC, CUP and EFTPOS processors, replace the processor name from VPC or CUP or EFTPOS to the actual processor name in the sample request. e.g. replace VPC with &amp;lt;your vpc processor&amp;gt; .</param>
7070
/// <param name="AmexVendorCode">Vendor code assigned by American Express. Applicable for TSYS (tsys) processor..</param>
@@ -87,7 +87,7 @@ public enum DefaultAuthTypeCodeEnum
8787
/// <param name="SubMerchantBusinessName">Sub-merchant&#39;s business name. Applicable for American Express Direct (amexdirect) processor. Validation details (for selected processors)... &lt;table&gt; &lt;thead&gt;&lt;tr&gt;&lt;th&gt;Processor&lt;/th&gt;&lt;th&gt;Acceptance Type&lt;/th&gt;&lt;th&gt;Required&lt;/th&gt;&lt;th&gt;Min. Length&lt;/th&gt;&lt;th&gt;Max. Length&lt;/th&gt;&lt;th&gt;Regex&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt; &lt;tr&gt;&lt;td&gt;American Express Direct&lt;/td&gt;&lt;td&gt;cnp, cp, hybrid&lt;/td&gt;&lt;td&gt;No&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;37&lt;/td&gt;&lt;td&gt;^[0-9a-zA-Z&amp;#92;-&amp;#92;_&amp;#92;,\\s.]+$&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt; .</param>
8888
/// <param name="PreferCobadgedSecondaryBrand">It denotes merchant&#39;s preference on secondary brand for routing in case of co-branded cards. Applicable for EFTPOS processors..</param>
8989
/// <param name="MerchantDescriptorInformation">MerchantDescriptorInformation.</param>
90-
public PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon(Dictionary<string, PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommonProcessors> Processors = default(Dictionary<string, PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommonProcessors>), string AmexVendorCode = default(string), DefaultAuthTypeCodeEnum? DefaultAuthTypeCode = default(DefaultAuthTypeCodeEnum?), string MasterCardAssignedId = default(string), bool? EnablePartialAuth = default(bool?), string MerchantCategoryCode = default(string), string SicCode = default(string), string FoodAndConsumerServiceId = default(string), bool? EnableSplitShipment = default(bool?), bool? EnableInterchangeOptimization = default(bool?), string VisaDelegatedAuthenticationId = default(string), string CreditCardRefundLimitPercent = default(string), string BusinessCenterCreditCardRefundLimitPercent = default(string), bool? AllowCapturesGreaterThanAuthorizations = default(bool?), bool? EnableDuplicateMerchantReferenceNumberBlocking = default(bool?), bool? DomesticMerchantId = default(bool?), string ProcessLevel3Data = default(string), string SubMerchantId = default(string), string SubMerchantBusinessName = default(string), bool? PreferCobadgedSecondaryBrand = default(bool?), PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommonMerchantDescriptorInformation MerchantDescriptorInformation = default(PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommonMerchantDescriptorInformation))
90+
public CardProcessingConfigCommon(Dictionary<string, CardProcessingConfigCommonProcessors> Processors = default(Dictionary<string, CardProcessingConfigCommonProcessors>), string AmexVendorCode = default(string), DefaultAuthTypeCodeEnum? DefaultAuthTypeCode = default(DefaultAuthTypeCodeEnum?), string MasterCardAssignedId = default(string), bool? EnablePartialAuth = default(bool?), string MerchantCategoryCode = default(string), string SicCode = default(string), string FoodAndConsumerServiceId = default(string), bool? EnableSplitShipment = default(bool?), bool? EnableInterchangeOptimization = default(bool?), string VisaDelegatedAuthenticationId = default(string), string CreditCardRefundLimitPercent = default(string), string BusinessCenterCreditCardRefundLimitPercent = default(string), bool? AllowCapturesGreaterThanAuthorizations = default(bool?), bool? EnableDuplicateMerchantReferenceNumberBlocking = default(bool?), bool? DomesticMerchantId = default(bool?), string ProcessLevel3Data = default(string), string SubMerchantId = default(string), string SubMerchantBusinessName = default(string), bool? PreferCobadgedSecondaryBrand = default(bool?), CardProcessingConfigCommonMerchantDescriptorInformation MerchantDescriptorInformation = default(CardProcessingConfigCommonMerchantDescriptorInformation))
9191
{
9292
this.Processors = Processors;
9393
this.AmexVendorCode = AmexVendorCode;
@@ -117,7 +117,7 @@ public enum DefaultAuthTypeCodeEnum
117117
/// </summary>
118118
/// <value>e.g. * amexdirect * barclays2 * CUP * EFTPOS * fdiglobal * gpx * smartfdc * tsys * vero * VPC For VPC, CUP and EFTPOS processors, replace the processor name from VPC or CUP or EFTPOS to the actual processor name in the sample request. e.g. replace VPC with &amp;lt;your vpc processor&amp;gt; </value>
119119
[DataMember(Name="processors", EmitDefaultValue=false)]
120-
public Dictionary<string, PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommonProcessors> Processors { get; set; }
120+
public Dictionary<string, CardProcessingConfigCommonProcessors> Processors { get; set; }
121121

122122
/// <summary>
123123
/// Vendor code assigned by American Express. Applicable for TSYS (tsys) processor.
@@ -250,7 +250,7 @@ public enum DefaultAuthTypeCodeEnum
250250
/// Gets or Sets MerchantDescriptorInformation
251251
/// </summary>
252252
[DataMember(Name="merchantDescriptorInformation", EmitDefaultValue=false)]
253-
public PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommonMerchantDescriptorInformation MerchantDescriptorInformation { get; set; }
253+
public CardProcessingConfigCommonMerchantDescriptorInformation MerchantDescriptorInformation { get; set; }
254254

255255
/// <summary>
256256
/// Returns the string presentation of the object
@@ -259,7 +259,7 @@ public enum DefaultAuthTypeCodeEnum
259259
public override string ToString()
260260
{
261261
var sb = new StringBuilder();
262-
sb.Append("class PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon {\n");
262+
sb.Append("class CardProcessingConfigCommon {\n");
263263
sb.Append(" Processors: ").Append(Processors).Append("\n");
264264
sb.Append(" AmexVendorCode: ").Append(AmexVendorCode).Append("\n");
265265
sb.Append(" DefaultAuthTypeCode: ").Append(DefaultAuthTypeCode).Append("\n");
@@ -302,15 +302,15 @@ public string ToJson()
302302
public override bool Equals(object obj)
303303
{
304304
// credit: http://stackoverflow.com/a/10454552/677735
305-
return this.Equals(obj as PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon);
305+
return this.Equals(obj as CardProcessingConfigCommon);
306306
}
307307

308308
/// <summary>
309-
/// Returns true if PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon instances are equal
309+
/// Returns true if CardProcessingConfigCommon instances are equal
310310
/// </summary>
311-
/// <param name="other">Instance of PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon to be compared</param>
311+
/// <param name="other">Instance of CardProcessingConfigCommon to be compared</param>
312312
/// <returns>Boolean</returns>
313-
public bool Equals(PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon other)
313+
public bool Equals(CardProcessingConfigCommon other)
314314
{
315315
// credit: http://stackoverflow.com/a/10454552/677735
316316
if (other == null)

0 commit comments

Comments
 (0)