Skip to content

Commit

Permalink
Merge pull request #171 from CyberSource/march-release-2024
Browse files Browse the repository at this point in the history
March release 2024
  • Loading branch information
gaubansa authored Mar 1, 2024
2 parents decfe5e + 71fa3f1 commit 46dacf6
Show file tree
Hide file tree
Showing 411 changed files with 5,955 additions and 2,902 deletions.
132 changes: 66 additions & 66 deletions Api/InstrumentIdentifierApi.cs

Large diffs are not rendered by default.

27 changes: 19 additions & 8 deletions Client/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,16 @@ private RestRequest PrepareRestRequest(
}

RestRequest requestT = new RestRequest(path);
RestClient.Options.UserAgent = Configuration.UserAgent;
RestClientOptions clientOptions = RestClient.Options;

if (Configuration.Proxy != null)
{
RestClient.Options.Proxy = Configuration.Proxy;
clientOptions.Proxy = Configuration.Proxy;
}

RestClient = new RestClient(clientOptions);
RestClient.Options.UserAgent = Configuration.UserAgent;

// Add Header Parameter, if any
// Passed to this function
foreach (var param in headerParams)
Expand Down Expand Up @@ -442,14 +445,13 @@ public object CallApi(

// set timeout
request.Timeout = Configuration.Timeout;
// set user agent
RestClient.Options.UserAgent = Configuration.UserAgent;
RestClientOptions clientOptions = RestClient.Options;

// RestClient.ClearHandlers();

if (Configuration.Proxy != null)
{
RestClient.Options.Proxy = Configuration.Proxy;
clientOptions.Proxy = Configuration.Proxy;
}

// Adding Client Cert
Expand All @@ -467,9 +469,12 @@ public object CallApi(
// Importing Certificates
var certificate = new X509Certificate2(fileName, clientCertPassword);
clientCertPassword.Dispose();
RestClient.Options.ClientCertificates = new X509CertificateCollection { certificate };
clientOptions.ClientCertificates = new X509CertificateCollection { certificate };
}

RestClient = new RestClient(clientOptions);
RestClient.Options.UserAgent = Configuration.UserAgent;

// Logging Request Headers
var headerPrintOutput = new StringBuilder();
foreach (var param in request.Parameters)
Expand Down Expand Up @@ -570,7 +575,7 @@ public async System.Threading.Tasks.Task<object> CallApiAsync(
// set timeout
request.Timeout = Configuration.Timeout;
// set user agent
RestClient.Options.UserAgent = Configuration.UserAgent;
RestClientOptions clientOptions = RestClient.Options;

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

RestClient = new RestClient(clientOptions);
RestClient.Options.UserAgent = Configuration.UserAgent;

InterceptRequest(request);
var response = await RestClient.ExecuteAsync(request);
InterceptResponse(request, response);
Expand Down Expand Up @@ -991,10 +999,13 @@ public void CallAuthenticationHeaders(string requestType, string requestTarget,
RestClient = new RestClient("https://" + merchantConfig.HostName);
}

RestClientOptions clientOptions = RestClient.Options;
if (Configuration.Proxy != null)
{
RestClient.Options.Proxy = Configuration.Proxy;
clientOptions.Proxy = Configuration.Proxy;
}

RestClient = new RestClient(clientOptions);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
namespace CyberSource.Model
{
/// <summary>
/// PaymentsProductsCardProcessingConfigurationInformationConfigurations
/// CardProcessingConfig
/// </summary>
[DataContract]
public partial class PaymentsProductsCardProcessingConfigurationInformationConfigurations : IEquatable<PaymentsProductsCardProcessingConfigurationInformationConfigurations>, IValidatableObject
public partial class CardProcessingConfig : IEquatable<CardProcessingConfig>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="PaymentsProductsCardProcessingConfigurationInformationConfigurations" /> class.
/// Initializes a new instance of the <see cref="CardProcessingConfig" /> class.
/// </summary>
/// <param name="Common">Common.</param>
/// <param name="Features">Features.</param>
public PaymentsProductsCardProcessingConfigurationInformationConfigurations(PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon Common = default(PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon), PaymentsProductsCardProcessingConfigurationInformationConfigurationsFeatures Features = default(PaymentsProductsCardProcessingConfigurationInformationConfigurationsFeatures))
public CardProcessingConfig(CardProcessingConfigCommon Common = default(CardProcessingConfigCommon), CardProcessingConfigFeatures Features = default(CardProcessingConfigFeatures))
{
this.Common = Common;
this.Features = Features;
Expand All @@ -45,13 +45,13 @@ public partial class PaymentsProductsCardProcessingConfigurationInformationConfi
/// Gets or Sets Common
/// </summary>
[DataMember(Name="common", EmitDefaultValue=false)]
public PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon Common { get; set; }
public CardProcessingConfigCommon Common { get; set; }

/// <summary>
/// Gets or Sets Features
/// </summary>
[DataMember(Name="features", EmitDefaultValue=false)]
public PaymentsProductsCardProcessingConfigurationInformationConfigurationsFeatures Features { get; set; }
public CardProcessingConfigFeatures Features { get; set; }

/// <summary>
/// Returns the string presentation of the object
Expand All @@ -60,7 +60,7 @@ public partial class PaymentsProductsCardProcessingConfigurationInformationConfi
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class PaymentsProductsCardProcessingConfigurationInformationConfigurations {\n");
sb.Append("class CardProcessingConfig {\n");
sb.Append(" Common: ").Append(Common).Append("\n");
sb.Append(" Features: ").Append(Features).Append("\n");
sb.Append("}\n");
Expand All @@ -84,15 +84,15 @@ public string ToJson()
public override bool Equals(object obj)
{
// credit: http://stackoverflow.com/a/10454552/677735
return this.Equals(obj as PaymentsProductsCardProcessingConfigurationInformationConfigurations);
return this.Equals(obj as CardProcessingConfig);
}

/// <summary>
/// Returns true if PaymentsProductsCardProcessingConfigurationInformationConfigurations instances are equal
/// Returns true if CardProcessingConfig instances are equal
/// </summary>
/// <param name="other">Instance of PaymentsProductsCardProcessingConfigurationInformationConfigurations to be compared</param>
/// <param name="other">Instance of CardProcessingConfig to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(PaymentsProductsCardProcessingConfigurationInformationConfigurations other)
public bool Equals(CardProcessingConfig other)
{
// credit: http://stackoverflow.com/a/10454552/677735
if (other == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
namespace CyberSource.Model
{
/// <summary>
/// PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon
/// CardProcessingConfigCommon
/// </summary>
[DataContract]
public partial class PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon : IEquatable<PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon>, IValidatableObject
public partial class CardProcessingConfigCommon : IEquatable<CardProcessingConfigCommon>, IValidatableObject
{
/// <summary>
/// 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;
Expand Down Expand Up @@ -64,7 +64,7 @@ public enum DefaultAuthTypeCodeEnum
[DataMember(Name="defaultAuthTypeCode", EmitDefaultValue=false)]
public DefaultAuthTypeCodeEnum? DefaultAuthTypeCode { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon" /> class.
/// Initializes a new instance of the <see cref="CardProcessingConfigCommon" /> class.
/// </summary>
/// <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>
/// <param name="AmexVendorCode">Vendor code assigned by American Express. Applicable for TSYS (tsys) processor..</param>
Expand All @@ -87,7 +87,7 @@ public enum DefaultAuthTypeCodeEnum
/// <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>
/// <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>
/// <param name="MerchantDescriptorInformation">MerchantDescriptorInformation.</param>
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))
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))
{
this.Processors = Processors;
this.AmexVendorCode = AmexVendorCode;
Expand Down Expand Up @@ -117,7 +117,7 @@ public enum DefaultAuthTypeCodeEnum
/// </summary>
/// <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>
[DataMember(Name="processors", EmitDefaultValue=false)]
public Dictionary<string, PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommonProcessors> Processors { get; set; }
public Dictionary<string, CardProcessingConfigCommonProcessors> Processors { get; set; }

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

/// <summary>
/// Returns the string presentation of the object
Expand All @@ -259,7 +259,7 @@ public enum DefaultAuthTypeCodeEnum
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon {\n");
sb.Append("class CardProcessingConfigCommon {\n");
sb.Append(" Processors: ").Append(Processors).Append("\n");
sb.Append(" AmexVendorCode: ").Append(AmexVendorCode).Append("\n");
sb.Append(" DefaultAuthTypeCode: ").Append(DefaultAuthTypeCode).Append("\n");
Expand Down Expand Up @@ -302,15 +302,15 @@ public string ToJson()
public override bool Equals(object obj)
{
// credit: http://stackoverflow.com/a/10454552/677735
return this.Equals(obj as PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon);
return this.Equals(obj as CardProcessingConfigCommon);
}

/// <summary>
/// Returns true if PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon instances are equal
/// Returns true if CardProcessingConfigCommon instances are equal
/// </summary>
/// <param name="other">Instance of PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon to be compared</param>
/// <param name="other">Instance of CardProcessingConfigCommon to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(PaymentsProductsCardProcessingConfigurationInformationConfigurationsCommon other)
public bool Equals(CardProcessingConfigCommon other)
{
// credit: http://stackoverflow.com/a/10454552/677735
if (other == null)
Expand Down
Loading

0 comments on commit 46dacf6

Please sign in to comment.