Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OpenAPI Specification #23

Merged
merged 3 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .konfig/changesets/tall-pillows-ask.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
java: patch
python: patch
typescript: patch
csharp: patch
php: patch
go: patch
phpGuzzle6: patch
---

Regenerate SDKs
16 changes: 8 additions & 8 deletions STATISTICS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

| SDK Name | Lines of Code |
| -------- | ------------- |
| java | 42046 |
| python | 39710 |
| typescript | 12148 |
| csharp | 25643 |
| php | 42688 |
| go | 30063 |
| phpGuzzle6 | 42688 |
| **Total** | 234986 |
| java | 42939 |
| python | 41193 |
| typescript | 12367 |
| csharp | 26272 |
| php | 43719 |
| go | 30656 |
| phpGuzzle6 | 43719 |
| **Total** | 240865 |
2 changes: 1 addition & 1 deletion csharp/.konfig/generate-id.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fe1d252b-9c2a-4e7e-9e01-0a110c68633a
e52a4d5f-7b21-4f9a-8380-7a784f10dd2d
2 changes: 2 additions & 0 deletions csharp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*InstallmentPlanApi* | [**CheckEligibility**](docs/InstallmentPlanApi.md#checkeligibility) | **POST** /api/installmentplans/check-eligibility |
*InstallmentPlanApi* | [**Get**](docs/InstallmentPlanApi.md#get) | **GET** /api/installmentplans/{installmentPlanNumber} |
*InstallmentPlanApi* | [**GetEligibilityTermsAndCondition**](docs/InstallmentPlanApi.md#geteligibilitytermsandcondition) | **GET** /api/installmentplans/{ipn}/legal |
*InstallmentPlanApi* | [**Post**](docs/InstallmentPlanApi.md#post) | **POST** /api/installmentplans/initiate |
*InstallmentPlanApi* | [**Post2**](docs/InstallmentPlanApi.md#post2) | **POST** /api/installmentplans |
*InstallmentPlanApi* | [**Refund**](docs/InstallmentPlanApi.md#refund) | **POST** /api/installmentplans/{installmentPlanNumber}/refund |
Expand All @@ -121,6 +122,7 @@ Class | Method | HTTP request | Description
- [CardData](docs/CardData.md)
- [CardType](docs/CardType.md)
- [CheckInstallmentsEligibilityRequest](docs/CheckInstallmentsEligibilityRequest.md)
- [EligibilityTermsAndConditionResponse](docs/EligibilityTermsAndConditionResponse.md)
- [Error](docs/Error.md)
- [ErrorExtended](docs/ErrorExtended.md)
- [ErrorExtendedAllOf](docs/ErrorExtendedAllOf.md)
Expand Down
10 changes: 5 additions & 5 deletions csharp/Splitit.Web.Net.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}") = "Splitit.Web.Net", "src\Splitit.Web.Net\Splitit.Web.Net.csproj", "{E1C4375C-779B-429F-9058-0A2F3C4BC73E}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Splitit.Web.Net", "src\Splitit.Web.Net\Splitit.Web.Net.csproj", "{A9C862E9-B2B9-4B6A-B13E-4FB84E3878B4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Splitit.Web.Net.Test", "src\Splitit.Web.Net.Test\Splitit.Web.Net.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
{E1C4375C-779B-429F-9058-0A2F3C4BC73E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E1C4375C-779B-429F-9058-0A2F3C4BC73E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E1C4375C-779B-429F-9058-0A2F3C4BC73E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E1C4375C-779B-429F-9058-0A2F3C4BC73E}.Release|Any CPU.Build.0 = Release|Any CPU
{A9C862E9-B2B9-4B6A-B13E-4FB84E3878B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A9C862E9-B2B9-4B6A-B13E-4FB84E3878B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9C862E9-B2B9-4B6A-B13E-4FB84E3878B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9C862E9-B2B9-4B6A-B13E-4FB84E3878B4}.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
11 changes: 11 additions & 0 deletions csharp/docs/EligibilityTermsAndConditionResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Splitit.Web.Net.Model.EligibilityTermsAndConditionResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**TermsAndConditions** | **string** | | [optional]
**PrivacyPolicy** | **string** | | [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)

94 changes: 94 additions & 0 deletions csharp/docs/InstallmentPlanApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All URIs are relative to *https://web-api-v3.production.splitit.com*
|--------|--------------|-------------|
| [**CheckEligibility**](InstallmentPlanApi.md#checkeligibility) | **POST** /api/installmentplans/check-eligibility | |
| [**Get**](InstallmentPlanApi.md#get) | **GET** /api/installmentplans/{installmentPlanNumber} | |
| [**GetEligibilityTermsAndCondition**](InstallmentPlanApi.md#geteligibilitytermsandcondition) | **GET** /api/installmentplans/{ipn}/legal | |
| [**Post**](InstallmentPlanApi.md#post) | **POST** /api/installmentplans/initiate | |
| [**Post2**](InstallmentPlanApi.md#post2) | **POST** /api/installmentplans | |
| [**Refund**](InstallmentPlanApi.md#refund) | **POST** /api/installmentplans/{installmentPlanNumber}/refund | |
Expand Down Expand Up @@ -211,6 +212,99 @@ catch (ApiException e)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


# **GetEligibilityTermsAndCondition**



### Example
```csharp
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Splitit.Web.Net.Client;
using Splitit.Web.Net.Model;

namespace Example
{
public class GetEligibilityTermsAndConditionExample
{
public static void Main()
{
SplititClient client = new SplititClient();
// Configure OAuth2 credentials for "application" OAuth flow
client.SetOAuthClientId(System.Environment.GetEnvironmentVariable("CLIENT_ID"));
client.SetOAuthClientSecret(System.Environment.GetEnvironmentVariable("CLIENT_SECRET"));

var ipn = "ipn_example";
var xSplititIdempotencyKey = "xSplititIdempotencyKey_example";
var xSplititTouchPoint = ""; // TouchPoint (default to "")

try
{
EligibilityTermsAndConditionResponse result = client.InstallmentPlan.GetEligibilityTermsAndCondition(ipn, xSplititIdempotencyKey, xSplititTouchPoint);
Console.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling InstallmentPlanApi.GetEligibilityTermsAndCondition: " + e.Message);
Console.WriteLine("Status Code: "+ e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
catch (ClientException e)
{
Console.WriteLine(e.Response.StatusCode);
Console.WriteLine(e.Response.RawContent);
Console.WriteLine(e.InnerException);
}
}
}
}
```

#### Using the GetEligibilityTermsAndConditionWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.

```csharp
try
{
ApiResponse<EligibilityTermsAndConditionResponse> response = apiInstance.GetEligibilityTermsAndConditionWithHttpInfo(ipn, xSplititIdempotencyKey, xSplititTouchPoint);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling InstallmentPlanApi.GetEligibilityTermsAndConditionWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
```

### Parameters

| Name | Type | Description | Notes |
|------|------|-------------|-------|
| **ipn** | **string** | | |
| **xSplititIdempotencyKey** | **string** | | |
| **xSplititTouchPoint** | **string** | TouchPoint | [default to &quot;&quot;] |

### Return type

[**EligibilityTermsAndConditionResponse**](EligibilityTermsAndConditionResponse.md)


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | | - |
| **401** | | - |
| **403** | | - |
| **404** | | - |
| **500** | | - |

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


# **Post**


Expand Down
29 changes: 29 additions & 0 deletions csharp/src/Splitit.Web.Net.Test/Api/InstallmentPlanApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,35 @@ public void GetTest()
}
}

/// <summary>
/// Test GetEligibilityTermsAndCondition
/// </summary>
[Fact]
public void GetEligibilityTermsAndConditionTest()
{
var ipn = "ipn_example";
var xSplititIdempotencyKey = "xSplititIdempotencyKey_example";
var xSplititTouchPoint = ""; // TouchPoint (default to "")

try
{
EligibilityTermsAndConditionResponse result = client.InstallmentPlan.GetEligibilityTermsAndCondition(ipn, xSplititIdempotencyKey, xSplititTouchPoint);
Console.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling InstallmentPlanApi.GetEligibilityTermsAndCondition: " + e.Message);
Console.WriteLine("Status Code: "+ e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
catch (ClientException e)
{
Console.WriteLine(e.Response.StatusCode);
Console.WriteLine(e.Response.RawContent);
Console.WriteLine(e.InnerException);
}
}

/// <summary>
/// Test Post
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*
* splitit-web-api-v3
*
* Splitit's Web API
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://konfigthis.com
*/


using Xunit;

using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Splitit.Web.Net.Api;
using Splitit.Web.Net.Model;
using Splitit.Web.Net.Client;
using System.Reflection;
using Newtonsoft.Json;

namespace Splitit.Web.Net.Test.Model
{
/// <summary>
/// Class for testing EligibilityTermsAndConditionResponse
/// </summary>
/// <remarks>
/// This file is automatically generated by Konfig (https://konfigthis.com).
/// Please update the test case below to test the model.
/// </remarks>
public class EligibilityTermsAndConditionResponseTests : IDisposable
{
// TODO uncomment below to declare an instance variable for EligibilityTermsAndConditionResponse
//private EligibilityTermsAndConditionResponse instance;

public EligibilityTermsAndConditionResponseTests()
{
// TODO uncomment below to create an instance of EligibilityTermsAndConditionResponse
//instance = new EligibilityTermsAndConditionResponse();
}

public void Dispose()
{
// Cleanup when everything is done.
}

/// <summary>
/// Test an instance of EligibilityTermsAndConditionResponse
/// </summary>
[Fact]
public void EligibilityTermsAndConditionResponseInstanceTest()
{
// TODO uncomment below to test "IsType" EligibilityTermsAndConditionResponse
//Assert.IsType<EligibilityTermsAndConditionResponse>(instance);
}


/// <summary>
/// Test the property 'TermsAndConditions'
/// </summary>
[Fact]
public void TermsAndConditionsTest()
{
// TODO unit test for the property 'TermsAndConditions'
}
/// <summary>
/// Test the property 'PrivacyPolicy'
/// </summary>
[Fact]
public void PrivacyPolicyTest()
{
// TODO unit test for the property 'PrivacyPolicy'
}

}

}
Loading