Skip to content

Commit

Permalink
Automated commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
andreals committed Oct 8, 2024
1 parent d584d48 commit 7542e77
Show file tree
Hide file tree
Showing 9 changed files with 191 additions and 62 deletions.
82 changes: 82 additions & 0 deletions PagarmeApiSDK.Standard/Models/GetIntegrationResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// <copyright file="GetIntegrationResponse.cs" company="APIMatic">
// Copyright (c) APIMatic. All rights reserved.
// </copyright>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using APIMatic.Core.Utilities.Converters;
using JsonSubTypes;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PagarmeApiSDK.Standard;
using PagarmeApiSDK.Standard.Utilities;

namespace PagarmeApiSDK.Standard.Models
{
/// <summary>
/// GetIntegrationResponse.
/// </summary>
public class GetIntegrationResponse
{
/// <summary>
/// Initializes a new instance of the <see cref="GetIntegrationResponse"/> class.
/// </summary>
public GetIntegrationResponse()
{
}

/// <summary>
/// Initializes a new instance of the <see cref="GetIntegrationResponse"/> class.
/// </summary>
/// <param name="code">code.</param>
public GetIntegrationResponse(
string code = null)
{
this.Code = code;
}

/// <summary>
/// Gets or sets Code.
/// </summary>
[JsonProperty("code", NullValueHandling = NullValueHandling.Ignore)]
public string Code { get; set; }

/// <inheritdoc/>
public override string ToString()
{
var toStringOutput = new List<string>();

this.ToString(toStringOutput);

return $"GetIntegrationResponse : ({string.Join(", ", toStringOutput)})";
}

/// <inheritdoc/>
public override bool Equals(object obj)
{
if (obj == null)
{
return false;
}

if (obj == this)
{
return true;
}
return obj is GetIntegrationResponse other && ((this.Code == null && other.Code == null) || (this.Code?.Equals(other.Code) == true));
}

/// <summary>
/// ToString overload.
/// </summary>
/// <param name="toStringOutput">List of strings.</param>
protected void ToString(List<string> toStringOutput)
{
toStringOutput.Add($"this.Code = {(this.Code == null ? "null" : this.Code)}");
}
}
}
50 changes: 48 additions & 2 deletions PagarmeApiSDK.Standard/Models/GetOrderResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class GetOrderResponse
private string sessionId;
private Models.GetLocationResponse location;
private Models.GetDeviceResponse device;
private Models.GetIntegrationResponse integration;
private Dictionary<string, bool> shouldSerialize = new Dictionary<string, bool>
{
{ "id", false },
Expand All @@ -64,6 +65,7 @@ public class GetOrderResponse
{ "session_id", false },
{ "location", false },
{ "device", false },
{ "integration", false },
};

/// <summary>
Expand Down Expand Up @@ -96,6 +98,7 @@ public GetOrderResponse()
/// <param name="sessionId">session_id.</param>
/// <param name="location">location.</param>
/// <param name="device">device.</param>
/// <param name="integration">integration.</param>
public GetOrderResponse(
string id = null,
string code = null,
Expand All @@ -116,7 +119,8 @@ public GetOrderResponse(
string ip = null,
string sessionId = null,
Models.GetLocationResponse location = null,
Models.GetDeviceResponse device = null)
Models.GetDeviceResponse device = null,
Models.GetIntegrationResponse integration = null)
{
if (id != null)
{
Expand Down Expand Up @@ -218,6 +222,11 @@ public GetOrderResponse(
this.Device = device;
}

if (integration != null)
{
this.Integration = integration;
}

}

/// <summary>
Expand Down Expand Up @@ -583,6 +592,24 @@ public Models.GetDeviceResponse Device
}
}

/// <summary>
/// Gets or sets Integration.
/// </summary>
[JsonProperty("integration")]
public Models.GetIntegrationResponse Integration
{
get
{
return this.integration;
}

set
{
this.shouldSerialize["integration"] = true;
this.integration = value;
}
}

/// <inheritdoc/>
public override string ToString()
{
Expand Down Expand Up @@ -753,6 +780,14 @@ public void UnsetDevice()
this.shouldSerialize["device"] = false;
}

/// <summary>
/// Marks the field to not be serailized.
/// </summary>
public void UnsetIntegration()
{
this.shouldSerialize["integration"] = false;
}

/// <summary>
/// Checks if the field should be serialized or not.
/// </summary>
Expand Down Expand Up @@ -932,6 +967,15 @@ public bool ShouldSerializeDevice()
{
return this.shouldSerialize["device"];
}

/// <summary>
/// Checks if the field should be serialized or not.
/// </summary>
/// <returns>A boolean weather the field should be serialized or not.</returns>
public bool ShouldSerializeIntegration()
{
return this.shouldSerialize["integration"];
}

/// <inheritdoc/>
public override bool Equals(object obj)
Expand Down Expand Up @@ -964,7 +1008,8 @@ public override bool Equals(object obj)
((this.Ip == null && other.Ip == null) || (this.Ip?.Equals(other.Ip) == true)) &&
((this.SessionId == null && other.SessionId == null) || (this.SessionId?.Equals(other.SessionId) == true)) &&
((this.Location == null && other.Location == null) || (this.Location?.Equals(other.Location) == true)) &&
((this.Device == null && other.Device == null) || (this.Device?.Equals(other.Device) == true));
((this.Device == null && other.Device == null) || (this.Device?.Equals(other.Device) == true)) &&
((this.Integration == null && other.Integration == null) || (this.Integration?.Equals(other.Integration) == true));
}

/// <summary>
Expand Down Expand Up @@ -993,6 +1038,7 @@ protected void ToString(List<string> toStringOutput)
toStringOutput.Add($"this.SessionId = {(this.SessionId == null ? "null" : this.SessionId)}");
toStringOutput.Add($"this.Location = {(this.Location == null ? "null" : this.Location.ToString())}");
toStringOutput.Add($"this.Device = {(this.Device == null ? "null" : this.Device.ToString())}");
toStringOutput.Add($"this.Integration = {(this.Integration == null ? "null" : this.Integration.ToString())}");
}
}
}
6 changes: 3 additions & 3 deletions PagarmeApiSDK.Standard/PagarmeApiSDK.Standard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>PagarmeApiSDKStandard</AssemblyName>
<Version>6.8.12.0</Version>
<Version>6.8.13.0</Version>
<Authors>Pagar.me Pagamentos S/A</Authors>
<Owners>Pagar.me Pagamentos S/A</Owners>
<Product>PagarmeApiSDK.Standard</Product>
<Copyright>Copyright © 2019</Copyright>
<AssemblyVersion>6.8.12.0</AssemblyVersion>
<FileVersion>6.8.12.0</FileVersion>
<AssemblyVersion>6.8.13.0</AssemblyVersion>
<FileVersion>6.8.13.0</FileVersion>
<Description>.NET client library for the PagarmeApiSDK</Description>
<LangVersion>7.3</LangVersion>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
Expand Down
21 changes: 0 additions & 21 deletions PagarmeApiSDK.Standard/PagarmeApiSDK.Standard.nuspec

This file was deleted.

2 changes: 1 addition & 1 deletion PagarmeApiSDK.Standard/PagarmeApiSDKClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public sealed class PagarmeApiSDKClient : IPagarmeApiSDKClient
};

private readonly GlobalConfiguration globalConfiguration;
private const string userAgent = "PagarmeApiSDK - DotNet 6.8.12";
private const string userAgent = "PagarmeApiSDK - DotNet 6.8.13";
private readonly HttpCallback httpCallback;
private readonly Lazy<ISubscriptionsController> subscriptions;
private readonly Lazy<IOrdersController> orders;
Expand Down
10 changes: 5 additions & 5 deletions PagarmeApiSDK.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PagarmeApiSDK.Standard", "PagarmeApiSDK.Standard/PagarmeApiSDK.Standard.csproj", "{3b426030-ca89-448c-be75-d97436242e47}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PagarmeApiSDK.Standard", "PagarmeApiSDK.Standard/PagarmeApiSDK.Standard.csproj", "{330c3994-8848-4754-9cee-58c9cd5f031c}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3b426030-ca89-448c-be75-d97436242e47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3b426030-ca89-448c-be75-d97436242e47}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3b426030-ca89-448c-be75-d97436242e47}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3b426030-ca89-448c-be75-d97436242e47}.Release|Any CPU.Build.0 = Release|Any CPU
{330c3994-8848-4754-9cee-58c9cd5f031c}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{330c3994-8848-4754-9cee-58c9cd5f031c}.Debug|Any CPU.Build.0 = Debug|Any CPU
{330c3994-8848-4754-9cee-58c9cd5f031c}.Release|Any CPU.ActiveCfg = Release|Any CPU
{330c3994-8848-4754-9cee-58c9cd5f031c}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
60 changes: 30 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ Once the `TestConsoleProject` is created, a file named `Program.cs` will be visi

## Initialize the API Client

**_Note:_** Documentation for the client can be found [here.](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/client.md)
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/client.md)

The following parameters are configurable for the API Client:

| Parameter | Type | Description |
| --- | --- | --- |
| `ServiceRefererName` | `string` | |
| `Timeout` | `TimeSpan` | Http client timeout.<br>*Default*: `TimeSpan.FromSeconds(100)` |
| `BasicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication |
| `BasicAuthCredentials` | [`BasicAuthCredentials`](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication |

The API client can be initialized as follows:

Expand All @@ -83,45 +83,45 @@ PagarmeApiSDKClient client = new PagarmeApiSDKClient.Builder()

This API uses the following authentication schemes.

* [`httpBasic (Basic Authentication)`](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/auth/basic-authentication.md)
* [`httpBasic (Basic Authentication)`](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/auth/basic-authentication.md)

## API Errors

Here is the list of errors that the API might throw.

| HTTP Status Code | Error Description | Exception Class |
| --- | --- | --- |
| 400 | Invalid request | [`ErrorException`](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/models/error-exception.md) |
| 401 | Invalid API key | [`ErrorException`](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/models/error-exception.md) |
| 404 | An informed resource was not found | [`ErrorException`](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/models/error-exception.md) |
| 412 | Business validation error | [`ErrorException`](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/models/error-exception.md) |
| 422 | Contract validation error | [`ErrorException`](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/models/error-exception.md) |
| 500 | Internal server error | [`ErrorException`](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/models/error-exception.md) |
| 400 | Invalid request | [`ErrorException`](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/models/error-exception.md) |
| 401 | Invalid API key | [`ErrorException`](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/models/error-exception.md) |
| 404 | An informed resource was not found | [`ErrorException`](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/models/error-exception.md) |
| 412 | Business validation error | [`ErrorException`](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/models/error-exception.md) |
| 422 | Contract validation error | [`ErrorException`](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/models/error-exception.md) |
| 500 | Internal server error | [`ErrorException`](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/models/error-exception.md) |

## List of APIs

* [Subscriptions](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/controllers/subscriptions.md)
* [Orders](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/controllers/orders.md)
* [Plans](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/controllers/plans.md)
* [Invoices](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/controllers/invoices.md)
* [Customers](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/controllers/customers.md)
* [Charges](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/controllers/charges.md)
* [Recipients](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/controllers/recipients.md)
* [Tokens](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/controllers/tokens.md)
* [Transactions](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/controllers/transactions.md)
* [Transfers](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/controllers/transfers.md)
* [Payables](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/controllers/payables.md)
* [Balance Operations](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/controllers/balance-operations.md)
* [Subscriptions](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/controllers/subscriptions.md)
* [Orders](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/controllers/orders.md)
* [Plans](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/controllers/plans.md)
* [Invoices](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/controllers/invoices.md)
* [Customers](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/controllers/customers.md)
* [Charges](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/controllers/charges.md)
* [Recipients](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/controllers/recipients.md)
* [Tokens](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/controllers/tokens.md)
* [Transactions](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/controllers/transactions.md)
* [Transfers](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/controllers/transfers.md)
* [Payables](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/controllers/payables.md)
* [Balance Operations](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/controllers/balance-operations.md)

## Classes Documentation

* [Utility Classes](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/utility-classes.md)
* [HttpRequest](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/http-request.md)
* [HttpResponse](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/http-response.md)
* [HttpStringResponse](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/http-string-response.md)
* [HttpContext](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/http-context.md)
* [HttpClientConfiguration](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/http-client-configuration.md)
* [HttpClientConfiguration Builder](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/http-client-configuration-builder.md)
* [IAuthManager](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/i-auth-manager.md)
* [ApiException](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.12/doc/api-exception.md)
* [Utility Classes](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/utility-classes.md)
* [HttpRequest](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/http-request.md)
* [HttpResponse](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/http-response.md)
* [HttpStringResponse](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/http-string-response.md)
* [HttpContext](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/http-context.md)
* [HttpClientConfiguration](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/http-client-configuration.md)
* [HttpClientConfiguration Builder](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/http-client-configuration-builder.md)
* [IAuthManager](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/i-auth-manager.md)
* [ApiException](https://www.github.com/pagarme/pagarme-net-standard-sdk/tree/6.8.13/doc/api-exception.md)

21 changes: 21 additions & 0 deletions doc/models/get-integration-response.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

# Get Integration Response

## Structure

`GetIntegrationResponse`

## Fields

| Name | Type | Tags | Description |
| --- | --- | --- | --- |
| `Code` | `string` | Optional | - |

## Example (as JSON)

```json
{
"code": "code2"
}
```

1 change: 1 addition & 0 deletions doc/models/get-order-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Response object for getting an Order
| `SessionId` | `string` | Optional | Session id |
| `Location` | [`GetLocationResponse`](../../doc/models/get-location-response.md) | Optional | Location |
| `Device` | [`GetDeviceResponse`](../../doc/models/get-device-response.md) | Optional | Device's informations |
| `Integration` | [`GetIntegrationResponse`](../../doc/models/get-integration-response.md) | Optional | - |

## Example (as JSON)

Expand Down

0 comments on commit 7542e77

Please sign in to comment.