Skip to content

Commit

Permalink
Merge pull request #37 from cashfree/4.1.0
Browse files Browse the repository at this point in the history
4.1.0
  • Loading branch information
suhas-cashfree authored Mar 29, 2024
2 parents 94217b7 + b075cc0 commit 9cf9b86
Show file tree
Hide file tree
Showing 10 changed files with 191 additions and 120 deletions.
10 changes: 5 additions & 5 deletions cashfree_pg.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cashfree_pg", "src\cashfree_pg\cashfree_pg.csproj", "{C04E8D42-4226-489F-A86F-F15F408C63E3}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cashfree_pg", "src\cashfree_pg\cashfree_pg.csproj", "{BB145740-4559-4D1E-ADC9-D2609E30B26C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cashfree_pg.Test", "src\cashfree_pg.Test\cashfree_pg.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
Expand All @@ -12,10 +12,10 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C04E8D42-4226-489F-A86F-F15F408C63E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C04E8D42-4226-489F-A86F-F15F408C63E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C04E8D42-4226-489F-A86F-F15F408C63E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C04E8D42-4226-489F-A86F-F15F408C63E3}.Release|Any CPU.Build.0 = Release|Any CPU
{BB145740-4559-4D1E-ADC9-D2609E30B26C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BB145740-4559-4D1E-ADC9-D2609E30B26C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BB145740-4559-4D1E-ADC9-D2609E30B26C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BB145740-4559-4D1E-ADC9-D2609E30B26C}.Release|Any CPU.Build.0 = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
1 change: 1 addition & 0 deletions docs/CreateLinkRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Name | Type | Description | Notes
**link_auto_reminders** | **bool** | If \"true\", reminders will be sent to customers for collecting payments. | [optional]
**link_notes** | **Dictionary<string, string>** | Key-value pair that can be used to store additional information about the entity. Maximum 5 key-value pairs | [optional]
**link_meta** | [**LinkMetaResponseEntity**](LinkMetaResponseEntity.md) | | [optional]
**order_splits** | [**List<VendorSplit>**](VendorSplit.md) | Use this option to split order amount and settle to Multiple Vendors. Contact care@cashfree.com to enable this feature. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

1 change: 1 addition & 0 deletions docs/LinkEntity.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Name | Type | Description | Notes
**link_auto_reminders** | **bool** | | [optional]
**link_notify** | [**LinkNotifyEntity**](LinkNotifyEntity.md) | | [optional]
**link_qrcode** | **string** | Base64 encoded string for payment link. You can scan with camera to open a link in the browser to complete the payment. | [optional]
**order_splits** | [**List<VendorSplit>**](VendorSplit.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

5 changes: 3 additions & 2 deletions docs/VendorSplit.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ Use to split order when cashfree's Easy Split is enabled for your account.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**vendor_id** | **string** | Vendor id created in Cashfree system | [optional]
**amount** | **decimal** | Amount which will be associated with this vendor | [optional]
**percentage** | **decimal** | Percentage of order amount which shall get added to vendor account | [optional]
**amount** | **decimal?** | Amount which will be associated with this vendor | [optional]
**percentage** | **decimal?** | Percentage of order amount which shall get added to vendor account | [optional]
**tags** | **Dictionary<string, Object>** | Custom Tags in thr form of {\"key\":\"value\"} which can be passed for an order. A maximum of 10 tags can be added | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

196 changes: 98 additions & 98 deletions src/cashfree_pg/Client/ApiClient.cs

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/cashfree_pg/Client/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Configuration : IReadableConfiguration
/// Version of the package.
/// </summary>
/// <value>Version of the package.</value>
public const string Version = "4.0.10";
public const string Version = "4.1.0";

/// <summary>
/// Identifier for ISO 8601 DateTime Format
Expand Down Expand Up @@ -113,7 +113,7 @@ public class Configuration : IReadableConfiguration
public Configuration()
{
Proxy = null;
UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/4.0.10/csharp");
UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/4.1.0/csharp");
BasePath = "https://sandbox.cashfree.com/pg";
DefaultHeaders = new ConcurrentDictionary<string, string>();
ApiKey = new ConcurrentDictionary<string, string>();
Expand Down Expand Up @@ -542,7 +542,7 @@ public static string ToDebugReport()
report += " OS: " + System.Environment.OSVersion + "\n";
report += " .NET Framework Version: " + System.Environment.Version + "\n";
report += " Version of the API: 2023-08-01\n";
report += " SDK Package Version: 4.0.10\n";
report += " SDK Package Version: 4.1.0\n";

return report;
}
Expand Down
23 changes: 22 additions & 1 deletion src/cashfree_pg/Model/CreateLinkRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ protected CreateLinkRequest() { }
/// <param name="linkAutoReminders">If \&quot;true\&quot;, reminders will be sent to customers for collecting payments..</param>
/// <param name="linkNotes">Key-value pair that can be used to store additional information about the entity. Maximum 5 key-value pairs.</param>
/// <param name="linkMeta">linkMeta.</param>
public CreateLinkRequest(string linkId = default(string), double linkAmount = default(double), string linkCurrency = default(string), string linkPurpose = default(string), LinkCustomerDetailsEntity customerDetails = default(LinkCustomerDetailsEntity), bool linkPartialPayments = default(bool), double linkMinimumPartialAmount = default(double), string linkExpiryTime = default(string), LinkNotifyEntity linkNotify = default(LinkNotifyEntity), bool linkAutoReminders = default(bool), Dictionary<string, string> linkNotes = default(Dictionary<string, string>), LinkMetaResponseEntity linkMeta = default(LinkMetaResponseEntity))
/// <param name="orderSplits">Use this option to split order amount and settle to Multiple Vendors. Contact care@cashfree.com to enable this feature..</param>
public CreateLinkRequest(string linkId = default(string), double linkAmount = default(double), string linkCurrency = default(string), string linkPurpose = default(string), LinkCustomerDetailsEntity customerDetails = default(LinkCustomerDetailsEntity), bool linkPartialPayments = default(bool), double linkMinimumPartialAmount = default(double), string linkExpiryTime = default(string), LinkNotifyEntity linkNotify = default(LinkNotifyEntity), bool linkAutoReminders = default(bool), Dictionary<string, string> linkNotes = default(Dictionary<string, string>), LinkMetaResponseEntity linkMeta = default(LinkMetaResponseEntity), List<VendorSplit> orderSplits = default(List<VendorSplit>))
{
// to ensure "linkId" is required (not null)
if (linkId == null)
Expand Down Expand Up @@ -86,6 +87,7 @@ protected CreateLinkRequest() { }
this.link_auto_reminders = linkAutoReminders;
this.link_notes = linkNotes;
this.link_meta = linkMeta;
this.order_splits = orderSplits;
}

/// <summary>
Expand Down Expand Up @@ -170,6 +172,14 @@ protected CreateLinkRequest() { }
[DataMember(Name = "link_meta", EmitDefaultValue = false)]
public LinkMetaResponseEntity link_meta { get; set; }

/// <summary>
/// Use this option to split order amount and settle to Multiple Vendors. Contact care@cashfree.com to enable this feature.
/// </summary>
/// <value>Use this option to split order amount and settle to Multiple Vendors. Contact care@cashfree.com to enable this feature.</value>
/// <example>[{&quot;amount&quot;:10,&quot;vendor&quot;:&quot;john&quot;}]</example>
[DataMember(Name = "order_splits", EmitDefaultValue = false)]
public List<VendorSplit> order_splits { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand All @@ -190,6 +200,7 @@ public override string ToString()
sb.Append(" link_auto_reminders: ").Append(link_auto_reminders).Append("\n");
sb.Append(" link_notes: ").Append(link_notes).Append("\n");
sb.Append(" link_meta: ").Append(link_meta).Append("\n");
sb.Append(" order_splits: ").Append(order_splits).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down Expand Up @@ -281,6 +292,12 @@ public bool Equals(CreateLinkRequest input)
this.link_meta == input.link_meta ||
(this.link_meta != null &&
this.link_meta.Equals(input.link_meta))
) &&
(
this.order_splits == input.order_splits ||
this.order_splits != null &&
input.order_splits != null &&
this.order_splits.SequenceEqual(input.order_splits)
);
}

Expand Down Expand Up @@ -337,6 +354,10 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + this.link_meta.GetHashCode();
}
if (this.order_splits != null)
{
hashCode = (hashCode * 59) + this.order_splits.GetHashCode();
}
return hashCode;
}
}
Expand Down
21 changes: 20 additions & 1 deletion src/cashfree_pg/Model/LinkEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ public class LinkEntity : IEquatable<LinkEntity>, IValidatableObject
/// <param name="linkAutoReminders">linkAutoReminders.</param>
/// <param name="linkNotify">linkNotify.</param>
/// <param name="linkQrcode">Base64 encoded string for payment link. You can scan with camera to open a link in the browser to complete the payment..</param>
public LinkEntity(string cfLinkId = default(string), string linkId = default(string), string linkStatus = default(string), string linkCurrency = default(string), decimal linkAmount = default(decimal), decimal linkAmountPaid = default(decimal), bool linkPartialPayments = default(bool), decimal linkMinimumPartialAmount = default(decimal), string linkPurpose = default(string), string linkCreatedAt = default(string), LinkCustomerDetailsEntity customerDetails = default(LinkCustomerDetailsEntity), LinkMetaResponseEntity linkMeta = default(LinkMetaResponseEntity), string linkUrl = default(string), string linkExpiryTime = default(string), Dictionary<string, string> linkNotes = default(Dictionary<string, string>), bool linkAutoReminders = default(bool), LinkNotifyEntity linkNotify = default(LinkNotifyEntity), string linkQrcode = default(string))
/// <param name="orderSplits">orderSplits.</param>
public LinkEntity(string cfLinkId = default(string), string linkId = default(string), string linkStatus = default(string), string linkCurrency = default(string), decimal linkAmount = default(decimal), decimal linkAmountPaid = default(decimal), bool linkPartialPayments = default(bool), decimal linkMinimumPartialAmount = default(decimal), string linkPurpose = default(string), string linkCreatedAt = default(string), LinkCustomerDetailsEntity customerDetails = default(LinkCustomerDetailsEntity), LinkMetaResponseEntity linkMeta = default(LinkMetaResponseEntity), string linkUrl = default(string), string linkExpiryTime = default(string), Dictionary<string, string> linkNotes = default(Dictionary<string, string>), bool linkAutoReminders = default(bool), LinkNotifyEntity linkNotify = default(LinkNotifyEntity), string linkQrcode = default(string), List<VendorSplit> orderSplits = default(List<VendorSplit>))
{
this.cf_link_id = cfLinkId;
this.link_id = linkId;
Expand All @@ -73,6 +74,7 @@ public class LinkEntity : IEquatable<LinkEntity>, IValidatableObject
this.link_auto_reminders = linkAutoReminders;
this.link_notify = linkNotify;
this.link_qrcode = linkQrcode;
this.order_splits = orderSplits;
}

/// <summary>
Expand Down Expand Up @@ -186,6 +188,12 @@ public class LinkEntity : IEquatable<LinkEntity>, IValidatableObject
[DataMember(Name = "link_qrcode", EmitDefaultValue = false)]
public string link_qrcode { get; set; }

/// <summary>
/// Gets or Sets order_splits
/// </summary>
[DataMember(Name = "order_splits", EmitDefaultValue = false)]
public List<VendorSplit> order_splits { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand All @@ -212,6 +220,7 @@ public override string ToString()
sb.Append(" link_auto_reminders: ").Append(link_auto_reminders).Append("\n");
sb.Append(" link_notify: ").Append(link_notify).Append("\n");
sb.Append(" link_qrcode: ").Append(link_qrcode).Append("\n");
sb.Append(" order_splits: ").Append(order_splits).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down Expand Up @@ -332,6 +341,12 @@ public bool Equals(LinkEntity input)
this.link_qrcode == input.link_qrcode ||
(this.link_qrcode != null &&
this.link_qrcode.Equals(input.link_qrcode))
) &&
(
this.order_splits == input.order_splits ||
this.order_splits != null &&
input.order_splits != null &&
this.order_splits.SequenceEqual(input.order_splits)
);
}

Expand Down Expand Up @@ -409,6 +424,10 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + this.link_qrcode.GetHashCode();
}
if (this.order_splits != null)
{
hashCode = (hashCode * 59) + this.order_splits.GetHashCode();
}
return hashCode;
}
}
Expand Down
46 changes: 37 additions & 9 deletions src/cashfree_pg/Model/VendorSplit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ public class VendorSplit : IEquatable<VendorSplit>, IValidatableObject
/// <param name="vendorId">Vendor id created in Cashfree system.</param>
/// <param name="amount">Amount which will be associated with this vendor.</param>
/// <param name="percentage">Percentage of order amount which shall get added to vendor account.</param>
public VendorSplit(string vendorId = default(string), decimal amount = default(decimal), decimal percentage = default(decimal))
/// <param name="tags">Custom Tags in thr form of {\&quot;key\&quot;:\&quot;value\&quot;} which can be passed for an order. A maximum of 10 tags can be added.</param>
public VendorSplit(string vendorId = default(string), decimal? amount = default(decimal?), decimal? percentage = default(decimal?), Dictionary<string, Object> tags = default(Dictionary<string, Object>))
{
this.vendor_id = vendorId;
this.amount = amount;
this.percentage = percentage;
this.tags = tags;
}

/// <summary>
Expand All @@ -56,15 +58,22 @@ public class VendorSplit : IEquatable<VendorSplit>, IValidatableObject
/// Amount which will be associated with this vendor
/// </summary>
/// <value>Amount which will be associated with this vendor</value>
[DataMember(Name = "amount", EmitDefaultValue = false)]
public decimal amount { get; set; }
[DataMember(Name = "amount", EmitDefaultValue = true)]
public decimal? amount { get; set; }

/// <summary>
/// Percentage of order amount which shall get added to vendor account
/// </summary>
/// <value>Percentage of order amount which shall get added to vendor account</value>
[DataMember(Name = "percentage", EmitDefaultValue = false)]
public decimal percentage { get; set; }
[DataMember(Name = "percentage", EmitDefaultValue = true)]
public decimal? percentage { get; set; }

/// <summary>
/// Custom Tags in thr form of {\&quot;key\&quot;:\&quot;value\&quot;} which can be passed for an order. A maximum of 10 tags can be added
/// </summary>
/// <value>Custom Tags in thr form of {\&quot;key\&quot;:\&quot;value\&quot;} which can be passed for an order. A maximum of 10 tags can be added</value>
[DataMember(Name = "tags", EmitDefaultValue = false)]
public Dictionary<string, Object> tags { get; set; }

/// <summary>
/// Returns the string presentation of the object
Expand All @@ -77,6 +86,7 @@ public override string ToString()
sb.Append(" vendor_id: ").Append(vendor_id).Append("\n");
sb.Append(" amount: ").Append(amount).Append("\n");
sb.Append(" percentage: ").Append(percentage).Append("\n");
sb.Append(" tags: ").Append(tags).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down Expand Up @@ -119,11 +129,19 @@ public bool Equals(VendorSplit input)
) &&
(
this.amount == input.amount ||
this.amount.Equals(input.amount)
(this.amount != null &&
this.amount.Equals(input.amount))
) &&
(
this.percentage == input.percentage ||
this.percentage.Equals(input.percentage)
(this.percentage != null &&
this.percentage.Equals(input.percentage))
) &&
(
this.tags == input.tags ||
this.tags != null &&
input.tags != null &&
this.tags.SequenceEqual(input.tags)
);
}

Expand All @@ -148,8 +166,18 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + this.vendor_id.GetHashCode();
}
hashCode = (hashCode * 59) + this.amount.GetHashCode();
hashCode = (hashCode * 59) + this.percentage.GetHashCode();
if (this.amount != null)
{
hashCode = (hashCode * 59) + this.amount.GetHashCode();
}
if (this.percentage != null)
{
hashCode = (hashCode * 59) + this.percentage.GetHashCode();
}
if (this.tags != null)
{
hashCode = (hashCode * 59) + this.tags.GetHashCode();
}
return hashCode;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/cashfree_pg/cashfree_pg.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Description>Cashfree&#39;s Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites.</Description>
<Copyright>© 2023 Cashfree Payments India Private Limited</Copyright>
<RootNamespace>com.cashfree</RootNamespace>
<Version>4.0.10</Version>
<Version>4.1.0</Version>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\cashfree_pg.xml</DocumentationFile>
<RepositoryUrl>https://github.com/cashfree/cashfree-pg-sdk-dotnet.git</RepositoryUrl>
Expand Down

0 comments on commit 9cf9b86

Please sign in to comment.