Skip to content

Commit a20e731

Browse files
authored
Merge pull request #7 from CyberSource/akshunya
Phase 2 BT API Changes
2 parents 45c3f91 + 61de3e7 commit a20e731

File tree

664 files changed

+34335
-9280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

664 files changed

+34335
-9280
lines changed

Api/CaptureApi.cs

Lines changed: 27 additions & 200 deletions
Large diffs are not rendered by default.

Api/CreditApi.cs

Lines changed: 28 additions & 201 deletions
Large diffs are not rendered by default.

Api/TokenizationApi.cs renamed to Api/FlexTokenApi.cs

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -21,68 +21,68 @@ namespace CyberSource.Api
2121
/// <summary>
2222
/// Represents a collection of functions to interact with the API endpoints
2323
/// </summary>
24-
public interface ITokenizationApi : IApiAccessor
24+
public interface IFlexTokenApi : IApiAccessor
2525
{
2626
#region Synchronous Operations
2727
/// <summary>
28-
/// Tokenize card
28+
/// Flex Tokenize card
2929
/// </summary>
3030
/// <remarks>
3131
/// Returns a token representing the supplied card details. The token replaces card data and can be used as the Subscription ID in the CyberSource Simple Order API or SCMP API. This is an unauthenticated call that you should initiate from your customer’s device or browser.
3232
/// </remarks>
3333
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
3434
/// <param name="tokenizeRequest"> (optional)</param>
35-
/// <returns>InlineResponse2001</returns>
36-
InlineResponse2001 Tokenize (TokenizeRequest tokenizeRequest = null);
35+
/// <returns>FlexV1TokensPost200Response</returns>
36+
FlexV1TokensPost200Response Tokenize (TokenizeRequest tokenizeRequest = null);
3737

3838
/// <summary>
39-
/// Tokenize card
39+
/// Flex Tokenize card
4040
/// </summary>
4141
/// <remarks>
4242
/// Returns a token representing the supplied card details. The token replaces card data and can be used as the Subscription ID in the CyberSource Simple Order API or SCMP API. This is an unauthenticated call that you should initiate from your customer’s device or browser.
4343
/// </remarks>
4444
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
4545
/// <param name="tokenizeRequest"> (optional)</param>
46-
/// <returns>ApiResponse of InlineResponse2001</returns>
47-
ApiResponse<InlineResponse2001> TokenizeWithHttpInfo (TokenizeRequest tokenizeRequest = null);
46+
/// <returns>ApiResponse of FlexV1TokensPost200Response</returns>
47+
ApiResponse<FlexV1TokensPost200Response> TokenizeWithHttpInfo (TokenizeRequest tokenizeRequest = null);
4848
#endregion Synchronous Operations
4949
#region Asynchronous Operations
5050
/// <summary>
51-
/// Tokenize card
51+
/// Flex Tokenize card
5252
/// </summary>
5353
/// <remarks>
5454
/// Returns a token representing the supplied card details. The token replaces card data and can be used as the Subscription ID in the CyberSource Simple Order API or SCMP API. This is an unauthenticated call that you should initiate from your customer’s device or browser.
5555
/// </remarks>
5656
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
5757
/// <param name="tokenizeRequest"> (optional)</param>
58-
/// <returns>Task of InlineResponse2001</returns>
59-
System.Threading.Tasks.Task<InlineResponse2001> TokenizeAsync (TokenizeRequest tokenizeRequest = null);
58+
/// <returns>Task of FlexV1TokensPost200Response</returns>
59+
System.Threading.Tasks.Task<FlexV1TokensPost200Response> TokenizeAsync (TokenizeRequest tokenizeRequest = null);
6060

6161
/// <summary>
62-
/// Tokenize card
62+
/// Flex Tokenize card
6363
/// </summary>
6464
/// <remarks>
6565
/// Returns a token representing the supplied card details. The token replaces card data and can be used as the Subscription ID in the CyberSource Simple Order API or SCMP API. This is an unauthenticated call that you should initiate from your customer’s device or browser.
6666
/// </remarks>
6767
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
6868
/// <param name="tokenizeRequest"> (optional)</param>
69-
/// <returns>Task of ApiResponse (InlineResponse2001)</returns>
70-
System.Threading.Tasks.Task<ApiResponse<InlineResponse2001>> TokenizeAsyncWithHttpInfo (TokenizeRequest tokenizeRequest = null);
69+
/// <returns>Task of ApiResponse (FlexV1TokensPost200Response)</returns>
70+
System.Threading.Tasks.Task<ApiResponse<FlexV1TokensPost200Response>> TokenizeAsyncWithHttpInfo (TokenizeRequest tokenizeRequest = null);
7171
#endregion Asynchronous Operations
7272
}
7373

7474
/// <summary>
7575
/// Represents a collection of functions to interact with the API endpoints
7676
/// </summary>
77-
public partial class TokenizationApi : ITokenizationApi
77+
public partial class FlexTokenApi : IFlexTokenApi
7878
{
7979
private CyberSource.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
8080

8181
/// <summary>
82-
/// Initializes a new instance of the <see cref="TokenizationApi"/> class.
82+
/// Initializes a new instance of the <see cref="FlexTokenApi"/> class.
8383
/// </summary>
8484
/// <returns></returns>
85-
public TokenizationApi(String basePath)
85+
public FlexTokenApi(String basePath)
8686
{
8787
this.Configuration = new Configuration(new ApiClient(basePath));
8888

@@ -96,12 +96,12 @@ public TokenizationApi(String basePath)
9696
}
9797

9898
/// <summary>
99-
/// Initializes a new instance of the <see cref="TokenizationApi"/> class
99+
/// Initializes a new instance of the <see cref="FlexTokenApi"/> class
100100
/// using Configuration object
101101
/// </summary>
102102
/// <param name="configuration">An instance of Configuration</param>
103103
/// <returns></returns>
104-
public TokenizationApi(Configuration configuration = null)
104+
public FlexTokenApi(Configuration configuration = null)
105105
{
106106
if (configuration == null) // use the default one in Configuration
107107
this.Configuration = Configuration.Default;
@@ -181,27 +181,27 @@ public void AddDefaultHeader(string key, string value)
181181
}
182182

183183
/// <summary>
184-
/// Tokenize card Returns a token representing the supplied card details. The token replaces card data and can be used as the Subscription ID in the CyberSource Simple Order API or SCMP API. This is an unauthenticated call that you should initiate from your customer’s device or browser.
184+
/// Flex Tokenize card Returns a token representing the supplied card details. The token replaces card data and can be used as the Subscription ID in the CyberSource Simple Order API or SCMP API. This is an unauthenticated call that you should initiate from your customer’s device or browser.
185185
/// </summary>
186186
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
187187
/// <param name="tokenizeRequest"> (optional)</param>
188-
/// <returns>InlineResponse2001</returns>
189-
public InlineResponse2001 Tokenize (TokenizeRequest tokenizeRequest = null)
188+
/// <returns>FlexV1TokensPost200Response</returns>
189+
public FlexV1TokensPost200Response Tokenize (TokenizeRequest tokenizeRequest = null)
190190
{
191-
ApiResponse<InlineResponse2001> localVarResponse = TokenizeWithHttpInfo(tokenizeRequest);
191+
ApiResponse<FlexV1TokensPost200Response> localVarResponse = TokenizeWithHttpInfo(tokenizeRequest);
192192
return localVarResponse.Data;
193193
}
194194

195195
/// <summary>
196-
/// Tokenize card Returns a token representing the supplied card details. The token replaces card data and can be used as the Subscription ID in the CyberSource Simple Order API or SCMP API. This is an unauthenticated call that you should initiate from your customer’s device or browser.
196+
/// Flex Tokenize card Returns a token representing the supplied card details. The token replaces card data and can be used as the Subscription ID in the CyberSource Simple Order API or SCMP API. This is an unauthenticated call that you should initiate from your customer’s device or browser.
197197
/// </summary>
198198
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
199199
/// <param name="tokenizeRequest"> (optional)</param>
200-
/// <returns>ApiResponse of InlineResponse2001</returns>
201-
public ApiResponse< InlineResponse2001 > TokenizeWithHttpInfo (TokenizeRequest tokenizeRequest = null)
200+
/// <returns>ApiResponse of FlexV1TokensPost200Response</returns>
201+
public ApiResponse< FlexV1TokensPost200Response > TokenizeWithHttpInfo (TokenizeRequest tokenizeRequest = null)
202202
{
203203

204-
var localVarPath = $"/flex/v1/tokens";
204+
var localVarPath = "/flex/v1/tokens/";
205205
var localVarPathParams = new Dictionary<String, String>();
206206
var localVarQueryParams = new Dictionary<String, String>();
207207
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
@@ -211,12 +211,13 @@ public ApiResponse< InlineResponse2001 > TokenizeWithHttpInfo (TokenizeRequest t
211211

212212
// to determine the Content-Type header
213213
String[] localVarHttpContentTypes = new String[] {
214+
"application/json;charset=utf-8"
214215
};
215216
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
216217

217218
// to determine the Accept header
218219
String[] localVarHttpHeaderAccepts = new String[] {
219-
//"application/json"
220+
"application/json"
220221
};
221222
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
222223
if (localVarHttpHeaderAccept != null)
@@ -245,34 +246,34 @@ public ApiResponse< InlineResponse2001 > TokenizeWithHttpInfo (TokenizeRequest t
245246
if (exception != null) throw exception;
246247
}
247248

248-
return new ApiResponse<InlineResponse2001>(localVarStatusCode,
249+
return new ApiResponse<FlexV1TokensPost200Response>(localVarStatusCode,
249250
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
250-
(InlineResponse2001) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2001)));
251+
(FlexV1TokensPost200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(FlexV1TokensPost200Response)));
251252
}
252253

253254
/// <summary>
254-
/// Tokenize card Returns a token representing the supplied card details. The token replaces card data and can be used as the Subscription ID in the CyberSource Simple Order API or SCMP API. This is an unauthenticated call that you should initiate from your customer’s device or browser.
255+
/// Flex Tokenize card Returns a token representing the supplied card details. The token replaces card data and can be used as the Subscription ID in the CyberSource Simple Order API or SCMP API. This is an unauthenticated call that you should initiate from your customer’s device or browser.
255256
/// </summary>
256257
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
257258
/// <param name="tokenizeRequest"> (optional)</param>
258-
/// <returns>Task of InlineResponse2001</returns>
259-
public async System.Threading.Tasks.Task<InlineResponse2001> TokenizeAsync (TokenizeRequest tokenizeRequest = null)
259+
/// <returns>Task of FlexV1TokensPost200Response</returns>
260+
public async System.Threading.Tasks.Task<FlexV1TokensPost200Response> TokenizeAsync (TokenizeRequest tokenizeRequest = null)
260261
{
261-
ApiResponse<InlineResponse2001> localVarResponse = await TokenizeAsyncWithHttpInfo(tokenizeRequest);
262+
ApiResponse<FlexV1TokensPost200Response> localVarResponse = await TokenizeAsyncWithHttpInfo(tokenizeRequest);
262263
return localVarResponse.Data;
263264

264265
}
265266

266267
/// <summary>
267-
/// Tokenize card Returns a token representing the supplied card details. The token replaces card data and can be used as the Subscription ID in the CyberSource Simple Order API or SCMP API. This is an unauthenticated call that you should initiate from your customer’s device or browser.
268+
/// Flex Tokenize card Returns a token representing the supplied card details. The token replaces card data and can be used as the Subscription ID in the CyberSource Simple Order API or SCMP API. This is an unauthenticated call that you should initiate from your customer’s device or browser.
268269
/// </summary>
269270
/// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
270271
/// <param name="tokenizeRequest"> (optional)</param>
271-
/// <returns>Task of ApiResponse (InlineResponse2001)</returns>
272-
public async System.Threading.Tasks.Task<ApiResponse<InlineResponse2001>> TokenizeAsyncWithHttpInfo (TokenizeRequest tokenizeRequest = null)
272+
/// <returns>Task of ApiResponse (FlexV1TokensPost200Response)</returns>
273+
public async System.Threading.Tasks.Task<ApiResponse<FlexV1TokensPost200Response>> TokenizeAsyncWithHttpInfo (TokenizeRequest tokenizeRequest = null)
273274
{
274275

275-
var localVarPath = $"/payments/flex/v1/tokens/";
276+
var localVarPath = "/flex/v1/tokens/";
276277
var localVarPathParams = new Dictionary<String, String>();
277278
var localVarQueryParams = new Dictionary<String, String>();
278279
var localVarHeaderParams = new Dictionary<String, String>(Configuration.DefaultHeader);
@@ -282,12 +283,13 @@ public async System.Threading.Tasks.Task<ApiResponse<InlineResponse2001>> Tokeni
282283

283284
// to determine the Content-Type header
284285
String[] localVarHttpContentTypes = new String[] {
286+
"application/json;charset=utf-8"
285287
};
286288
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
287289

288290
// to determine the Accept header
289291
String[] localVarHttpHeaderAccepts = new String[] {
290-
//"application/json"
292+
"application/json"
291293
};
292294
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
293295
if (localVarHttpHeaderAccept != null)
@@ -316,9 +318,9 @@ public async System.Threading.Tasks.Task<ApiResponse<InlineResponse2001>> Tokeni
316318
if (exception != null) throw exception;
317319
}
318320

319-
return new ApiResponse<InlineResponse2001>(localVarStatusCode,
321+
return new ApiResponse<FlexV1TokensPost200Response>(localVarStatusCode,
320322
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
321-
(InlineResponse2001) Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2001)));
323+
(FlexV1TokensPost200Response) Configuration.ApiClient.Deserialize(localVarResponse, typeof(FlexV1TokensPost200Response)));
322324
}
323325

324326
}

0 commit comments

Comments
 (0)