Skip to content

Commit

Permalink
Bump version to 2.19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
devops-blockchyp committed Sep 16, 2024
1 parent 8518cda commit a07b030
Show file tree
Hide file tree
Showing 11 changed files with 251 additions and 1 deletion.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3291,6 +3291,41 @@ Console.WriteLine(response);

```

#### Add Gateway Merchant



* **API Credential Types:** Partner
* **Required Role:** Gateway Boarding

This is a partner level API that can be used to manually board gateway merchants. Use this API in conjunction
with Platform Configuration to instantly board gateway merchants. Note that most partners don't have
permission to do this and are unlikely to get it.

Settings can be changed by using the Update Merchant API.




```c#
// Populate request parameters.
AddGatewayMerchantRequest request = new AddGatewayMerchantRequest
{
Profile = new MerchantProfile
{
DbaName = "DBA Name",
CompanyName = "Corporate Entity Name",
},
};

// Run the transaction.
MerchantProfileResponse response = await blockchyp.AddGatewayMerchantAsync(request);

// View the result.
Console.WriteLine(response);

```

#### Add Test Merchant


Expand Down
2 changes: 1 addition & 1 deletion src/BlockChyp/BlockChyp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>BlockChyp is a .NET 4.5+ class library for accessing the BlockChyp Terminal and Gateway APIs.</Description>
<Version>2.18.8</Version>
<Version>2.19.0</Version>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<Authors>BlockChyp</Authors>
<Company>BlockChyp, Inc.</Company>
Expand Down
19 changes: 19 additions & 0 deletions src/BlockChyp/Client/BlockChypClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,25 @@ public Acknowledgement InviteMerchantUser(InviteMerchantUserRequest request)
return DashboardRequest<Acknowledgement>(HttpMethod.Post, "/api/invite-merchant-user", request, null);
}

/// <summary>
/// Adds a live gateway merchant account.
/// </summary>
/// <param name="request">The request details.</param>
public async Task<MerchantProfileResponse> AddGatewayMerchantAsync(AddGatewayMerchantRequest request)
{
return await DashboardRequestAsync<MerchantProfileResponse>(HttpMethod.Post, "/api/add-gateway-merchant", request, null)
.ConfigureAwait(false);
}

/// <summary>
/// Synchronous form of <see cref="AddGatewayMerchantAsync"/>.
/// </summary>
/// <param name="request">The request details.</param>
public MerchantProfileResponse AddGatewayMerchant(AddGatewayMerchantRequest request)
{
return DashboardRequest<MerchantProfileResponse>(HttpMethod.Post, "/api/add-gateway-merchant", request, null);
}

/// <summary>
/// Adds a test merchant account.
/// </summary>
Expand Down
34 changes: 34 additions & 0 deletions src/BlockChyp/Entities/AddGatewayMerchantRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
// governed by a license that can be found in the LICENSE file.
//
// This file was generated automatically by the BlockChyp SDK Generator. Changes
// to this file will be lost every time the code is regenerated.

using Newtonsoft.Json;

namespace BlockChyp.Entities
{
/// <summary>
/// Models basic information needed to create a gateway merchant.
/// </summary>
public class AddGatewayMerchantRequest : BaseEntity, ITimeoutRequest
{
/// <summary>
/// Whether or not to route transaction to the test gateway.
/// </summary>
[JsonProperty(PropertyName = "test")]
public bool Test { get; set; }

/// <summary>
/// The merchant profile to be boarded.
/// </summary>
[JsonProperty(PropertyName = "profile")]
public MerchantProfile Profile { get; set; }

/// <summary>
/// The request timeout in seconds.
/// </summary>
[JsonProperty(PropertyName = "timeout")]
public int Timeout { get; set; }
}
}
6 changes: 6 additions & 0 deletions src/BlockChyp/Entities/MerchantCredentialGenerationRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,11 @@ public class MerchantCredentialGenerationRequest : BaseEntity, ITimeoutRequest
/// </summary>
[JsonProperty(PropertyName = "notes")]
public string Notes { get; set; }

/// <summary>
/// Type of credentials to generate, either API or TOKENIZING. Defaults to API.
/// </summary>
[JsonProperty(PropertyName = "credentialType")]
public string CredentialType { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,11 @@ public class MerchantCredentialGenerationResponse : BaseEntity, IAbstractAcknowl
/// </summary>
[JsonProperty(PropertyName = "signingKey")]
public string SigningKey { get; set; }

/// <summary>
/// The tokenizing key.
/// </summary>
[JsonProperty(PropertyName = "tokenizingKey")]
public string TokenizingKey { get; set; }
}
}
6 changes: 6 additions & 0 deletions src/BlockChyp/Entities/MerchantProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ public class MerchantProfile : BaseEntity, ITimeoutRequest
[JsonProperty(PropertyName = "merchantId")]
public string MerchantId { get; set; }

/// <summary>
/// The primary bank mid.
/// </summary>
[JsonProperty(PropertyName = "bankMid")]
public string BankMid { get; set; }

/// <summary>
/// The merchant's company name.
/// </summary>
Expand Down
6 changes: 6 additions & 0 deletions src/BlockChyp/Entities/MerchantProfileResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ public class MerchantProfileResponse : BaseEntity, IAbstractAcknowledgement
[JsonProperty(PropertyName = "merchantId")]
public string MerchantId { get; set; }

/// <summary>
/// The primary bank mid.
/// </summary>
[JsonProperty(PropertyName = "bankMid")]
public string BankMid { get; set; }

/// <summary>
/// The merchant's company name.
/// </summary>
Expand Down
34 changes: 34 additions & 0 deletions src/BlockChyp/Entities/UpdateMerchantPlatformRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
// governed by a license that can be found in the LICENSE file.
//
// This file was generated automatically by the BlockChyp SDK Generator. Changes
// to this file will be lost every time the code is regenerated.

using Newtonsoft.Json;

namespace BlockChyp.Entities
{
/// <summary>
/// Used to up platform configuration for gateway merchants.
/// </summary>
public class UpdateMerchantPlatformRequest : BaseEntity, ITimeoutRequest
{
/// <summary>
/// The request timeout in seconds.
/// </summary>
[JsonProperty(PropertyName = "timeout")]
public int Timeout { get; set; }

/// <summary>
/// Whether or not to route transaction to the test gateway.
/// </summary>
[JsonProperty(PropertyName = "test")]
public bool Test { get; set; }

/// <summary>
/// The merchant platform configuration.
/// </summary>
[JsonProperty(PropertyName = "platform")]
public MerchantPlatform Platform { get; set; }
}
}
40 changes: 40 additions & 0 deletions src/BlockChyp/Entities/UpdateMerchantPlatformResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
// governed by a license that can be found in the LICENSE file.
//
// This file was generated automatically by the BlockChyp SDK Generator. Changes
// to this file will be lost every time the code is regenerated.

using Newtonsoft.Json;

namespace BlockChyp.Entities
{
/// <summary>
/// Echoes back the state of the current platform configuration after a change.
/// </summary>
public class UpdateMerchantPlatformResponse : BaseEntity, IAbstractAcknowledgement
{
/// <summary>
/// Whether or not the request succeeded.
/// </summary>
[JsonProperty(PropertyName = "success")]
public bool Success { get; set; }

/// <summary>
/// The error, if an error occurred.
/// </summary>
[JsonProperty(PropertyName = "error")]
public string Error { get; set; }

/// <summary>
/// A narrative description of the transaction result.
/// </summary>
[JsonProperty(PropertyName = "responseDescription")]
public string ResponseDescription { get; set; }

/// <summary>
/// The current platform configuration.
/// </summary>
[JsonProperty(PropertyName = "platform")]
public MerchantPlatform Platform { get; set; }
}
}
64 changes: 64 additions & 0 deletions tests/BlockChypTest/Integration/AddGatewayMerchantTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// Copyright 2019-2024 BlockChyp, Inc. All rights reserved. Use of this code is
// governed by a license that can be found in the LICENSE file.
//
// This file was generated automatically by the BlockChyp SDK Generator. Changes
// to this file will be lost every time the code is regenerated.

using System;
using System.Collections.Generic;
using System.IO;
using BlockChyp.Entities;
using Xunit;
using Xunit.Abstractions;

namespace BlockChypTest.Integration
{
public class AddGatewayMerchantTest : IntegrationTest
{
private readonly ITestOutputHelper output;

public AddGatewayMerchantTest(ITestOutputHelper output)
{
this.output = output;
}

[Trait("Category", "partner")]
[Trait("Category", "Integration")]
[Fact]
public async void Run_AddGatewayMerchantTest()
{



UseProfile("partner");


AddGatewayMerchantRequest request = new AddGatewayMerchantRequest
{
Profile = new MerchantProfile
{
DbaName = "DBA Name",
CompanyName = "Corporate Entity Name",
},
};

output.WriteLine("Request: {0}", request);

Exception err = null;
try
{
MerchantProfileResponse response = await blockchyp.AddGatewayMerchantAsync(request);
output.WriteLine("Response: {0}", response);
Assert.True(response.Success, "response.Success");
}
catch (Exception e) {
err = e;
}


Assert.Null(err);


}
}
}

0 comments on commit a07b030

Please sign in to comment.