diff --git a/Marqeta.Core.Sdk/MarqetaClient.g.cs b/Marqeta.Core.Sdk/MarqetaClient.g.cs
index b7a6fac1..2f0196a4 100644
--- a/Marqeta.Core.Sdk/MarqetaClient.g.cs
+++ b/Marqeta.Core.Sdk/MarqetaClient.g.cs
@@ -273,19 +273,30 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns a specific account holder group object
+ /// Lists account holder groups
///
- /// Account holder group token
+ /// Number of items to retrieve. Count can be between 1 - 10 items.
+ /// Indicates from what row to start returning data.
+ /// Field by which to sort the returned items. Use any field in the model, or system fields lastModifiedTime or createdTime.
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task AccountholdergroupsGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task AccountholdergroupsGetAsync(int? count = null, int? start_index = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
-
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/accountholdergroups/{token}");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/accountholdergroups?");
+ if (count != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (start_index != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (sort_by != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ urlBuilder_.Length--;
var client_ = _httpClient;
var disposeClient_ = false;
@@ -319,7 +330,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -333,12 +344,6 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 404)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Auto reload not found", status_, responseText_, headers_, null);
- }
- else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -366,22 +371,18 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Updates an account holder group object
+ /// Creates an account holder group object
///
- /// Account holder group update object
- /// Success
+ /// Account holder group object
+ /// Created
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task AccountholdergroupsPutAsync(Account_holder_group_update_request body, string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task AccountholdergroupsPostAsync(Account_holder_group_request body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
-
if (body == null)
throw new System.ArgumentNullException("body");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/accountholdergroups/{token}");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/accountholdergroups");
var client_ = _httpClient;
var disposeClient_ = false;
@@ -393,7 +394,7 @@ public string BaseUrl
var content_ = new System.Net.Http.StringContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("PUT");
+ request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -417,7 +418,7 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 200)
+ if (status_ == 201)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
@@ -433,6 +434,12 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
+ if (status_ == 409)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
+ }
+ else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -460,30 +467,19 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Lists account holder groups
+ /// Returns a specific account holder group object
///
- /// Number of items to retrieve. Count can be between 1 - 10 items.
- /// Indicates from what row to start returning data.
- /// Field by which to sort the returned items. Use any field in the model, or system fields lastModifiedTime or createdTime.
+ /// Account holder group token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task AccountholdergroupsGetAsync(int? count = null, int? start_index = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task AccountholdergroupsGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
+ if (token == null)
+ throw new System.ArgumentNullException("token");
+
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/accountholdergroups?");
- if (count != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (start_index != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (sort_by != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- urlBuilder_.Length--;
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/accountholdergroups/{token}");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -517,7 +513,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -531,6 +527,12 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
+ if (status_ == 404)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Auto reload not found", status_, responseText_, headers_, null);
+ }
+ else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -558,18 +560,22 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Creates an account holder group object
+ /// Updates an account holder group object
///
- /// Account holder group object
- /// Created
+ /// Account holder group update object
+ /// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task AccountholdergroupsPostAsync(Account_holder_group_request body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task AccountholdergroupsPutAsync(Account_holder_group_update_request body, string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
+ if (token == null)
+ throw new System.ArgumentNullException("token");
+
if (body == null)
throw new System.ArgumentNullException("body");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/accountholdergroups");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/accountholdergroups/{token}");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -581,7 +587,7 @@ public string BaseUrl
var content_ = new System.Net.Http.StringContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("POST");
+ request_.Method = new System.Net.Http.HttpMethod("PUT");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -605,7 +611,7 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 201)
+ if (status_ == 200)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
@@ -621,12 +627,6 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 409)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
- }
- else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -654,45 +654,19 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Lists all global auth control exceptions for the program
+ /// Returns a specific auth control exemptmids
///
- /// Card product token. Use "null" to get auth controls that are not associated with any card product.
- /// User token. Use "null" to get auth controls that are not associated with any user.
- /// Number of items to retrieve. Count can be between 1 - 10 items.
- /// Indicates from what row to start returning data.
- /// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
- /// Field by which to sort the returned items. Use any field in the model, or system fields lastModifiedTime or createdTime.
+ /// Auth control token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task AuthcontrolsGetAsync(string card_product = null, string user = null, int? count = null, int? start_index = null, string fields = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task AuthcontrolsExemptmidsGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
+ if (token == null)
+ throw new System.ArgumentNullException("token");
+
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/authcontrols?");
- if (card_product != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("card_product") + "=").Append(System.Uri.EscapeDataString(ConvertToString(card_product, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (user != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("user") + "=").Append(System.Uri.EscapeDataString(ConvertToString(user, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (count != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (start_index != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (fields != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (sort_by != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- urlBuilder_.Length--;
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/authcontrols/exemptmids/{token}");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -726,7 +700,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -740,6 +714,12 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
+ if (status_ == 404)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Auth control exception MIDs not found", status_, responseText_, headers_, null);
+ }
+ else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -767,18 +747,19 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Creates an auth control exception
+ /// Updates the status an auth control exemptmids
///
- /// Auth control object
- /// Created
+ /// Auth control token
+ /// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task AuthcontrolsPostAsync(Auth_control_request body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task AuthcontrolsExemptmidsPutAsync(string token, Auth_control_exempt_mids_update_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (body == null)
- throw new System.ArgumentNullException("body");
+ if (token == null)
+ throw new System.ArgumentNullException("token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/authcontrols");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/authcontrols/exemptmids/{token}");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -790,8 +771,7 @@ public string BaseUrl
var content_ = new System.Net.Http.StringContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("POST");
- request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
+ request_.Method = new System.Net.Http.HttpMethod("PUT");
PrepareRequest(client_, request_, urlBuilder_);
@@ -814,14 +794,9 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 201)
+ if (status_ == 204)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
- if (objectResponse_.Object == null)
- {
- throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
- }
- return objectResponse_.Object;
+ return;
}
else
if (status_ == 400)
@@ -830,12 +805,6 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 409)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
- }
- else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -1072,19 +1041,45 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns a specific auth control exemptmids
+ /// Lists all global auth control exceptions for the program
///
- /// Auth control token
+ /// Card product token. Use "null" to get auth controls that are not associated with any card product.
+ /// User token. Use "null" to get auth controls that are not associated with any user.
+ /// Number of items to retrieve. Count can be between 1 - 10 items.
+ /// Indicates from what row to start returning data.
+ /// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
+ /// Field by which to sort the returned items. Use any field in the model, or system fields lastModifiedTime or createdTime.
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task AuthcontrolsExemptmidsGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task AuthcontrolsGetAsync(string card_product = null, string user = null, int? count = null, int? start_index = null, string fields = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
-
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/authcontrols/exemptmids/{token}");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/authcontrols?");
+ if (card_product != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("card_product") + "=").Append(System.Uri.EscapeDataString(ConvertToString(card_product, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (user != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("user") + "=").Append(System.Uri.EscapeDataString(ConvertToString(user, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (count != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (start_index != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (fields != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (sort_by != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ urlBuilder_.Length--;
var client_ = _httpClient;
var disposeClient_ = false;
@@ -1118,7 +1113,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -1132,12 +1127,6 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 404)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Auth control exception MIDs not found", status_, responseText_, headers_, null);
- }
- else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -1165,19 +1154,18 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Updates the status an auth control exemptmids
+ /// Creates an auth control exception
///
- /// Auth control token
- /// Success
- /// A server side error occurred.
- public virtual async System.Threading.Tasks.Task AuthcontrolsExemptmidsPutAsync(string token, Auth_control_exempt_mids_update_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ /// Auth control object
+ /// Created
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task AuthcontrolsPostAsync(Auth_control_request body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
+ if (body == null)
+ throw new System.ArgumentNullException("body");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/authcontrols/exemptmids/{token}");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/authcontrols");
var client_ = _httpClient;
var disposeClient_ = false;
@@ -1189,7 +1177,8 @@ public string BaseUrl
var content_ = new System.Net.Http.StringContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("PUT");
+ request_.Method = new System.Net.Http.HttpMethod("POST");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -1212,9 +1201,14 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 204)
+ if (status_ == 201)
{
- return;
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ return objectResponse_.Object;
}
else
if (status_ == 400)
@@ -1223,6 +1217,12 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
+ if (status_ == 409)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
+ }
+ else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -1444,24 +1444,49 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns a specific auto reload object
+ /// Lists all auto reloads for the program
///
- /// Auto reload token
+ /// Card product token
+ /// User token
+ /// Business token
+ /// Number of items to retrieve. Count can be between 1 - 10 items.
+ /// Indicates from what row to start returning data.
/// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
+ /// Field by which to sort the returned items. Use any field in the model, or system fields lastModifiedTime or createdTime.
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task AutoreloadsGetAsync(string token, string fields = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task AutoreloadsGetAsync(string card_product = null, string user_token = null, string business_token = null, int? count = null, int? start_index = null, string fields = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
-
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/autoreloads/{token}?");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/autoreloads?");
+ if (card_product != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("card_product") + "=").Append(System.Uri.EscapeDataString(ConvertToString(card_product, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (user_token != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("user_token") + "=").Append(System.Uri.EscapeDataString(ConvertToString(user_token, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (business_token != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("business_token") + "=").Append(System.Uri.EscapeDataString(ConvertToString(business_token, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (count != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (start_index != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
if (fields != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
+ if (sort_by != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
urlBuilder_.Length--;
var client_ = _httpClient;
@@ -1496,7 +1521,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -1510,12 +1535,6 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 404)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Auto reload not found", status_, responseText_, headers_, null);
- }
- else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -1543,22 +1562,18 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Updates a specific auto reload object
+ /// Creates an auto reload object
///
/// Auto reload object
- /// Success
+ /// Created
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task AutoreloadsPutAsync(Auto_reload_update_model body, string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task AutoreloadsPostAsync(Auto_reload_model body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
-
if (body == null)
throw new System.ArgumentNullException("body");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/autoreloads/{token}");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/autoreloads");
var client_ = _httpClient;
var disposeClient_ = false;
@@ -1570,7 +1585,7 @@ public string BaseUrl
var content_ = new System.Net.Http.StringContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("PUT");
+ request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -1594,7 +1609,7 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 200)
+ if (status_ == 201)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
@@ -1610,6 +1625,12 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
+ if (status_ == 409)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
+ }
+ else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -1637,49 +1658,24 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Lists all auto reloads for the program
+ /// Returns a specific auto reload object
///
- /// Card product token
- /// User token
- /// Business token
- /// Number of items to retrieve. Count can be between 1 - 10 items.
- /// Indicates from what row to start returning data.
+ /// Auto reload token
/// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
- /// Field by which to sort the returned items. Use any field in the model, or system fields lastModifiedTime or createdTime.
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task AutoreloadsGetAsync(string card_product = null, string user_token = null, string business_token = null, int? count = null, int? start_index = null, string fields = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task AutoreloadsGetAsync(string token, string fields = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
+ if (token == null)
+ throw new System.ArgumentNullException("token");
+
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/autoreloads?");
- if (card_product != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("card_product") + "=").Append(System.Uri.EscapeDataString(ConvertToString(card_product, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (user_token != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("user_token") + "=").Append(System.Uri.EscapeDataString(ConvertToString(user_token, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (business_token != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("business_token") + "=").Append(System.Uri.EscapeDataString(ConvertToString(business_token, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (count != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (start_index != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/autoreloads/{token}?");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
if (fields != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
- if (sort_by != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
urlBuilder_.Length--;
var client_ = _httpClient;
@@ -1714,7 +1710,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -1728,6 +1724,12 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
+ if (status_ == 404)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Auto reload not found", status_, responseText_, headers_, null);
+ }
+ else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -1755,18 +1757,22 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Creates an auto reload object
+ /// Updates a specific auto reload object
///
/// Auto reload object
- /// Created
+ /// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task AutoreloadsPostAsync(Auto_reload_model body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task AutoreloadsPutAsync(Auto_reload_update_model body, string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
+ if (token == null)
+ throw new System.ArgumentNullException("token");
+
if (body == null)
throw new System.ArgumentNullException("body");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/autoreloads");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/autoreloads/{token}");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -1778,7 +1784,7 @@ public string BaseUrl
var content_ = new System.Net.Http.StringContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("POST");
+ request_.Method = new System.Net.Http.HttpMethod("PUT");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -1802,7 +1808,7 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 201)
+ if (status_ == 200)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
@@ -1818,12 +1824,6 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 409)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
- }
- else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -5651,38 +5651,28 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Lists cards by the last 4 digits
+ /// Returns a specific card
///
- /// Last four digits of card number
- /// Number of cards to retrieve
- /// Start index
+ /// Card token
/// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
- /// Sort order
+ /// Object to expand
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task CardsGetAsync(string last_four, int? count = null, int? start_index = null, string fields = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task CardsGetAsync(string token, string fields = null, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (last_four == null)
- throw new System.ArgumentNullException("last_four");
+ if (token == null)
+ throw new System.ArgumentNullException("token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/cards?");
- urlBuilder_.Append(System.Uri.EscapeDataString("last_four") + "=").Append(System.Uri.EscapeDataString(ConvertToString(last_four, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- if (count != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (start_index != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/cards/{token}?");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
if (fields != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
- if (sort_by != null)
+ if (expand != null)
{
- urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ urlBuilder_.Append(System.Uri.EscapeDataString("expand") + "=").Append(System.Uri.EscapeDataString(ConvertToString(expand, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
urlBuilder_.Length--;
@@ -5718,7 +5708,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -5729,7 +5719,13 @@ public string BaseUrl
if (status_ == 400)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Bad request", status_, responseText_, headers_, null);
+ throw new ApiException("User input error/Bad request", status_, responseText_, headers_, null);
+ }
+ else
+ if (status_ == 404)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Card not found", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -5759,25 +5755,19 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Creates a card
+ /// Updates a specific card
///
- /// Show CVV
- /// Show PAN
+ /// Card token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task CardsPostAsync(Card_request body = null, bool? show_cvv_number = null, bool? show_pan = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task CardsPutAsync(string token, Card_update_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
+ if (token == null)
+ throw new System.ArgumentNullException("token");
+
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/cards?");
- if (show_cvv_number != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("show_cvv_number") + "=").Append(System.Uri.EscapeDataString(ConvertToString(show_cvv_number, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (show_pan != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("show_pan") + "=").Append(System.Uri.EscapeDataString(ConvertToString(show_pan, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- urlBuilder_.Length--;
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/cards/{token}");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -5789,7 +5779,7 @@ public string BaseUrl
var content_ = new System.Net.Http.StringContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("POST");
+ request_.Method = new System.Net.Http.HttpMethod("PUT");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -5813,7 +5803,7 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 201)
+ if (status_ == 200)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
@@ -5829,12 +5819,6 @@ public string BaseUrl
throw new ApiException("User input error/Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 409)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
- }
- else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -5862,28 +5846,38 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns a specific card
+ /// Lists cards by the last 4 digits
///
- /// Card token
+ /// Last four digits of card number
+ /// Number of cards to retrieve
+ /// Start index
/// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
- /// Object to expand
+ /// Sort order
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task CardsGetAsync(string token, string fields = null, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task CardsGetAsync(string last_four, int? count = null, int? start_index = null, string fields = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
+ if (last_four == null)
+ throw new System.ArgumentNullException("last_four");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/cards/{token}?");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/cards?");
+ urlBuilder_.Append(System.Uri.EscapeDataString("last_four") + "=").Append(System.Uri.EscapeDataString(ConvertToString(last_four, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ if (count != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (start_index != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
if (fields != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
- if (expand != null)
+ if (sort_by != null)
{
- urlBuilder_.Append(System.Uri.EscapeDataString("expand") + "=").Append(System.Uri.EscapeDataString(ConvertToString(expand, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
urlBuilder_.Length--;
@@ -5919,7 +5913,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -5930,13 +5924,7 @@ public string BaseUrl
if (status_ == 400)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("User input error/Bad request", status_, responseText_, headers_, null);
- }
- else
- if (status_ == 404)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Card not found", status_, responseText_, headers_, null);
+ throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -5966,19 +5954,25 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Updates a specific card
+ /// Creates a card
///
- /// Card token
+ /// Show CVV
+ /// Show PAN
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task CardsPutAsync(string token, Card_update_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task CardsPostAsync(Card_request body = null, bool? show_cvv_number = null, bool? show_pan = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
-
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/cards/{token}");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/cards?");
+ if (show_cvv_number != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("show_cvv_number") + "=").Append(System.Uri.EscapeDataString(ConvertToString(show_cvv_number, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (show_pan != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("show_pan") + "=").Append(System.Uri.EscapeDataString(ConvertToString(show_pan, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ urlBuilder_.Length--;
var client_ = _httpClient;
var disposeClient_ = false;
@@ -5990,7 +5984,7 @@ public string BaseUrl
var content_ = new System.Net.Http.StringContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("PUT");
+ request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -6014,7 +6008,7 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 200)
+ if (status_ == 201)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
@@ -6030,6 +6024,12 @@ public string BaseUrl
throw new ApiException("User input error/Bad request", status_, responseText_, headers_, null);
}
else
+ if (status_ == 409)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
+ }
+ else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -6165,18 +6165,17 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns a specific chargeback transition
+ /// Returns a specific chargeback
///
- /// Chargeback transition token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task ChargebacksTransitionsGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task ChargebacksGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (token == null)
throw new System.ArgumentNullException("token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/chargebacks/transitions/{token}");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/chargebacks/{token}");
urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
@@ -6211,7 +6210,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -6219,16 +6218,10 @@ public string BaseUrl
return objectResponse_.Object;
}
else
- if (status_ == 400)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("User input error/Bad request", status_, responseText_, headers_, null);
- }
- else
if (status_ == 404)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Transition not found", status_, responseText_, headers_, null);
+ throw new ApiException("Chargeback not found", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -6258,11 +6251,11 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns a specific chargeback
+ /// Updates chargeback data
///
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task ChargebacksGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task ChargebacksPutAsync(string token, ChargebackUpdateRequest body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (token == null)
throw new System.ArgumentNullException("token");
@@ -6277,7 +6270,11 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- request_.Method = new System.Net.Http.HttpMethod("GET");
+ var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
+ var content_ = new System.Net.Http.StringContent(json_);
+ content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ request_.Content = content_;
+ request_.Method = new System.Net.Http.HttpMethod("PUT");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -6311,12 +6308,18 @@ public string BaseUrl
return objectResponse_.Object;
}
else
- if (status_ == 404)
+ if (status_ == 400)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
throw new ApiException("Chargeback not found", status_, responseText_, headers_, null);
}
else
+ if (status_ == 422)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Unable to update chargeback", status_, responseText_, headers_, null);
+ }
+ else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -6344,17 +6347,18 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Updates chargeback data
+ /// Returns a specific chargeback transition
///
+ /// Chargeback transition token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task ChargebacksPutAsync(string token, ChargebackUpdateRequest body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task ChargebacksTransitionsGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (token == null)
throw new System.ArgumentNullException("token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/chargebacks/{token}");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/chargebacks/transitions/{token}");
urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
@@ -6363,11 +6367,7 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
- var content_ = new System.Net.Http.StringContent(json_);
- content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("PUT");
+ request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -6393,7 +6393,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -6404,13 +6404,13 @@ public string BaseUrl
if (status_ == 400)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Chargeback not found", status_, responseText_, headers_, null);
+ throw new ApiException("User input error/Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 422)
+ if (status_ == 404)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Unable to update chargeback", status_, responseText_, headers_, null);
+ throw new ApiException("Transition not found", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -7231,19 +7231,30 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns a specific commando mode transition
+ /// Lists all commando mode control sets
///
- /// Commando mode transition token
+ /// Number of commando modes to retrieve
+ /// Start index
+ /// Sort order
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task CommandomodesTransitionsGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task CommandomodesGetAsync(int? count = null, int? start_index = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
-
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/commandomodes/transitions/{token}");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/commandomodes?");
+ if (count != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (start_index != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (sort_by != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ urlBuilder_.Length--;
var client_ = _httpClient;
var disposeClient_ = false;
@@ -7277,7 +7288,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -7288,13 +7299,7 @@ public string BaseUrl
if (status_ == 400)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("User input error/Bad request", status_, responseText_, headers_, null);
- }
- else
- if (status_ == 404)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Transition not found", status_, responseText_, headers_, null);
+ throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -7324,35 +7329,19 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Lists all commando mode transitions related to a commando mode control set
+ /// Returns a specific commando mode transition
///
- /// Commando mode token
- /// Number of transitions to retrieve
- /// Start index
- /// Sort order
+ /// Commando mode transition token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task CommandomodesTransitionsGetAsync(string commandomode_token, int? count = null, int? start_index = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task CommandomodesTransitionsGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (commandomode_token == null)
- throw new System.ArgumentNullException("commandomode_token");
+ if (token == null)
+ throw new System.ArgumentNullException("token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/commandomodes/{commandomode_token}/transitions?");
- urlBuilder_.Replace("{commandomode_token}", System.Uri.EscapeDataString(ConvertToString(commandomode_token, System.Globalization.CultureInfo.InvariantCulture)));
- if (count != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (start_index != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (sort_by != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- urlBuilder_.Length--;
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/commandomodes/transitions/{token}");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -7386,7 +7375,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -7397,7 +7386,13 @@ public string BaseUrl
if (status_ == 400)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Bad request", status_, responseText_, headers_, null);
+ throw new ApiException("User input error/Bad request", status_, responseText_, headers_, null);
+ }
+ else
+ if (status_ == 404)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Transition not found", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -7427,17 +7422,22 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Lists all commando mode control sets
+ /// Lists all commando mode transitions related to a commando mode control set
///
- /// Number of commando modes to retrieve
+ /// Commando mode token
+ /// Number of transitions to retrieve
/// Start index
/// Sort order
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task CommandomodesGetAsync(int? count = null, int? start_index = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task CommandomodesTransitionsGetAsync(string commandomode_token, int? count = null, int? start_index = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
+ if (commandomode_token == null)
+ throw new System.ArgumentNullException("commandomode_token");
+
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/commandomodes?");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/commandomodes/{commandomode_token}/transitions?");
+ urlBuilder_.Replace("{commandomode_token}", System.Uri.EscapeDataString(ConvertToString(commandomode_token, System.Globalization.CultureInfo.InvariantCulture)));
if (count != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
@@ -7484,7 +7484,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -8907,19 +8907,19 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Get direct deposit account transition.
+ /// Get User for Plain Text Account Number
///
- /// Get specific direct deposit account transition
+ /// Get user associated with direct deposit account number
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task DepositaccountsTransitionsGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task DepositaccountsAccountUserAsync(string account_number, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
+ if (account_number == null)
+ throw new System.ArgumentNullException("account_number");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/depositaccounts/transitions/{token}");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/depositaccounts/account/{account_number}/user");
+ urlBuilder_.Replace("{account_number}", System.Uri.EscapeDataString(ConvertToString(account_number, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -8953,7 +8953,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -8994,39 +8994,49 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Update CDD answers for Direct Deposit Account
+ /// List all specific direct deposit accounts.
///
- /// Update CDD answers
+ /// Get specific direct deposit account
+ /// Number of users to retrieve
+ /// Start index
+ /// Sort order
+ /// Direct deposit account status
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task DepositaccountsCddPutAsync(CustomerDueDiligenceUpdateRequest body, string token, string cddtoken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task DepositaccountsUserAsync(string token, int? count = null, int? start_index = null, string sort_by = null, State? state = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (token == null)
throw new System.ArgumentNullException("token");
- if (cddtoken == null)
- throw new System.ArgumentNullException("cddtoken");
-
- if (body == null)
- throw new System.ArgumentNullException("body");
-
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/depositaccounts/{token}/cdd/{cddtoken}");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/depositaccounts/user/{token}?");
urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
- urlBuilder_.Replace("{cddtoken}", System.Uri.EscapeDataString(ConvertToString(cddtoken, System.Globalization.CultureInfo.InvariantCulture)));
-
- var client_ = _httpClient;
- var disposeClient_ = false;
- try
+ if (count != null)
{
- using (var request_ = new System.Net.Http.HttpRequestMessage())
- {
- var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
- var content_ = new System.Net.Http.StringContent(json_);
- content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("PUT");
- request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
+ urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (start_index != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (sort_by != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (state != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("state") + "=").Append(System.Uri.EscapeDataString(ConvertToString(state, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ urlBuilder_.Length--;
+
+ var client_ = _httpClient;
+ var disposeClient_ = false;
+ try
+ {
+ using (var request_ = new System.Net.Http.HttpRequestMessage())
+ {
+ request_.Method = new System.Net.Http.HttpMethod("GET");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -9051,7 +9061,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -9092,35 +9102,19 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Get direct deposit account transition list for card holder.
+ /// Get direct deposit account transition.
///
- /// Get direct deposit account transition list for user
- /// Number of users to retrieve
- /// Start index
- /// Sort order
+ /// Get specific direct deposit account transition
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task DepositaccountsTransitionsGetAsync(string user_token, int? count = null, int? start_index = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task DepositaccountsTransitionsGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (user_token == null)
- throw new System.ArgumentNullException("user_token");
+ if (token == null)
+ throw new System.ArgumentNullException("token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/depositaccounts/{user_token}/transitions?");
- urlBuilder_.Replace("{user_token}", System.Uri.EscapeDataString(ConvertToString(user_token, System.Globalization.CultureInfo.InvariantCulture)));
- if (count != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (start_index != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (sort_by != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- urlBuilder_.Length--;
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/depositaccounts/transitions/{token}");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -9197,17 +9191,33 @@ public string BaseUrl
///
/// Get direct deposit account transition list for card holder.
///
- /// Get CDD info for a specific DDA token
+ /// Get direct deposit account transition list for user
+ /// Number of users to retrieve
+ /// Start index
+ /// Sort order
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task DepositaccountsCddGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task DepositaccountsTransitionsGetAsync(string user_token, int? count = null, int? start_index = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
+ if (user_token == null)
+ throw new System.ArgumentNullException("user_token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/depositaccounts/{token}/cdd");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/depositaccounts/{user_token}/transitions?");
+ urlBuilder_.Replace("{user_token}", System.Uri.EscapeDataString(ConvertToString(user_token, System.Globalization.CultureInfo.InvariantCulture)));
+ if (count != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (start_index != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (sort_by != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ urlBuilder_.Length--;
var client_ = _httpClient;
var disposeClient_ = false;
@@ -9241,7 +9251,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -9282,19 +9292,19 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Get User for Plain Text Account Number
+ /// Get direct deposit account transition list for card holder.
///
- /// Get user associated with direct deposit account number
+ /// Get CDD info for a specific DDA token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task DepositaccountsAccountUserAsync(string account_number, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task DepositaccountsCddGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (account_number == null)
- throw new System.ArgumentNullException("account_number");
+ if (token == null)
+ throw new System.ArgumentNullException("token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/depositaccounts/account/{account_number}/user");
- urlBuilder_.Replace("{account_number}", System.Uri.EscapeDataString(ConvertToString(account_number, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/depositaccounts/{token}/cdd");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -9328,7 +9338,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -9369,40 +9379,26 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// List all specific direct deposit accounts.
+ /// Update CDD answers for Direct Deposit Account
///
- /// Get specific direct deposit account
- /// Number of users to retrieve
- /// Start index
- /// Sort order
- /// Direct deposit account status
+ /// Update CDD answers
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task DepositaccountsUserAsync(string token, int? count = null, int? start_index = null, string sort_by = null, State? state = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task DepositaccountsCddPutAsync(CustomerDueDiligenceUpdateRequest body, string token, string cddtoken, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (token == null)
throw new System.ArgumentNullException("token");
+ if (cddtoken == null)
+ throw new System.ArgumentNullException("cddtoken");
+
+ if (body == null)
+ throw new System.ArgumentNullException("body");
+
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/depositaccounts/user/{token}?");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/depositaccounts/{token}/cdd/{cddtoken}");
urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
- if (count != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (start_index != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (sort_by != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (state != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("state") + "=").Append(System.Uri.EscapeDataString(ConvertToString(state, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- urlBuilder_.Length--;
+ urlBuilder_.Replace("{cddtoken}", System.Uri.EscapeDataString(ConvertToString(cddtoken, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -9410,7 +9406,11 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- request_.Method = new System.Net.Http.HttpMethod("GET");
+ var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
+ var content_ = new System.Net.Http.StringContent(json_);
+ content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ request_.Content = content_;
+ request_.Method = new System.Net.Http.HttpMethod("PUT");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -9436,7 +9436,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -9567,19 +9567,18 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns an account and routing number which can be used for direct deposit
+ /// Returns a direct deposit entry
///
/// Success
/// A server side error occurred.
- [System.Obsolete]
- public virtual async System.Threading.Tasks.Task DirectdepositsAccountsGetAsync(string user_or_business_token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task DirectdepositsGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (user_or_business_token == null)
- throw new System.ArgumentNullException("user_or_business_token");
+ if (token == null)
+ throw new System.ArgumentNullException("token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/directdeposits/accounts/{user_or_business_token}");
- urlBuilder_.Replace("{user_or_business_token}", System.Uri.EscapeDataString(ConvertToString(user_or_business_token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/directdeposits/{token}");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -9613,7 +9612,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -9621,16 +9620,10 @@ public string BaseUrl
return objectResponse_.Object;
}
else
- if (status_ == 400)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Cardholder not found", status_, responseText_, headers_, null);
- }
- else
if (status_ == 404)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Account not found", status_, responseText_, headers_, null);
+ throw new ApiException("Direct deposit entry not found", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -9660,21 +9653,16 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Updates a specific direct deposit account
+ /// Returns an account and routing number which can be used for direct deposit
///
- /// User or business token
- /// Deposit account update request
/// Success
/// A server side error occurred.
[System.Obsolete]
- public virtual async System.Threading.Tasks.Task DirectdepositsAccountsPutAsync(string user_or_business_token, DepositAccountUpdateRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task DirectdepositsAccountsGetAsync(string user_or_business_token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (user_or_business_token == null)
throw new System.ArgumentNullException("user_or_business_token");
- if (body == null)
- throw new System.ArgumentNullException("body");
-
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/directdeposits/accounts/{user_or_business_token}");
urlBuilder_.Replace("{user_or_business_token}", System.Uri.EscapeDataString(ConvertToString(user_or_business_token, System.Globalization.CultureInfo.InvariantCulture)));
@@ -9685,11 +9673,7 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
- var content_ = new System.Net.Http.StringContent(json_);
- content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("PUT");
+ request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -9726,7 +9710,13 @@ public string BaseUrl
if (status_ == 400)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("User input error/Bad request", status_, responseText_, headers_, null);
+ throw new ApiException("Cardholder not found", status_, responseText_, headers_, null);
+ }
+ else
+ if (status_ == 404)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Account not found", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -9756,18 +9746,24 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns a direct deposit entry
+ /// Updates a specific direct deposit account
///
+ /// User or business token
+ /// Deposit account update request
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task DirectdepositsGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ [System.Obsolete]
+ public virtual async System.Threading.Tasks.Task DirectdepositsAccountsPutAsync(string user_or_business_token, DepositAccountUpdateRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
+ if (user_or_business_token == null)
+ throw new System.ArgumentNullException("user_or_business_token");
+
+ if (body == null)
+ throw new System.ArgumentNullException("body");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/directdeposits/{token}");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/directdeposits/accounts/{user_or_business_token}");
+ urlBuilder_.Replace("{user_or_business_token}", System.Uri.EscapeDataString(ConvertToString(user_or_business_token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -9775,7 +9771,11 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- request_.Method = new System.Net.Http.HttpMethod("GET");
+ var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
+ var content_ = new System.Net.Http.StringContent(json_);
+ content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ request_.Content = content_;
+ request_.Method = new System.Net.Http.HttpMethod("PUT");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -9801,7 +9801,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -9809,10 +9809,10 @@ public string BaseUrl
return objectResponse_.Object;
}
else
- if (status_ == 404)
+ if (status_ == 400)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Direct deposit entry not found", status_, responseText_, headers_, null);
+ throw new ApiException("User input error/Bad request", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -11007,19 +11007,14 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Retrieves a linked funding source balance from a partner
+ /// Registers a payment card funding source
///
- /// Funding source token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesAchPartnerBalanceAsync(string funding_source_token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesPaymentcardPostAsync(Token_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (funding_source_token == null)
- throw new System.ArgumentNullException("funding_source_token");
-
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/ach/partner/{funding_source_token}/balance");
- urlBuilder_.Replace("{funding_source_token}", System.Uri.EscapeDataString(ConvertToString(funding_source_token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/paymentcard");
var client_ = _httpClient;
var disposeClient_ = false;
@@ -11027,7 +11022,11 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- request_.Method = new System.Net.Http.HttpMethod("GET");
+ var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
+ var content_ = new System.Net.Http.StringContent(json_);
+ content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ request_.Content = content_;
+ request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -11053,7 +11052,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -11067,10 +11066,10 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 404)
+ if (status_ == 409)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Not found", status_, responseText_, headers_, null);
+ throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -11100,18 +11099,18 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns a user ACH account
+ /// Returns a specific payment card
///
- /// Funding account token
+ /// Funding token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesAchGetAsync(string funding_source_token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesPaymentcardGetAsync(string funding_source_token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (funding_source_token == null)
throw new System.ArgumentNullException("funding_source_token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/ach/{funding_source_token}");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/paymentcard/{funding_source_token}");
urlBuilder_.Replace("{funding_source_token}", System.Uri.EscapeDataString(ConvertToString(funding_source_token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
@@ -11146,7 +11145,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -11193,17 +11192,22 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Verifies a bank account as a funding source
+ /// Updates a specific payment card
///
+ /// Funding account token
+ /// Payment card
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesAchPutAsync(string funding_source_token, Ach_verification_model body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesPaymentcardPutAsync(string funding_source_token, Token_update_request body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (funding_source_token == null)
throw new System.ArgumentNullException("funding_source_token");
+ if (body == null)
+ throw new System.ArgumentNullException("body");
+
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/ach/{funding_source_token}");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/paymentcard/{funding_source_token}");
urlBuilder_.Replace("{funding_source_token}", System.Uri.EscapeDataString(ConvertToString(funding_source_token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
@@ -11242,7 +11246,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -11283,19 +11287,30 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns the dollar amounts used to verify the ACH account
+ /// Lists all funding sources for a user
///
- /// Funding account token
+ /// User token
+ /// Type, such as a payment card or ACH
+ /// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesAchVerificationamountsAsync(string funding_source_token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesUserAsync(string user_token, string type = null, string fields = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (funding_source_token == null)
- throw new System.ArgumentNullException("funding_source_token");
+ if (user_token == null)
+ throw new System.ArgumentNullException("user_token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/ach/{funding_source_token}/verificationamounts");
- urlBuilder_.Replace("{funding_source_token}", System.Uri.EscapeDataString(ConvertToString(funding_source_token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/user/{user_token}?");
+ urlBuilder_.Replace("{user_token}", System.Uri.EscapeDataString(ConvertToString(user_token, System.Globalization.CultureInfo.InvariantCulture)));
+ if (type != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("type") + "=").Append(System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (fields != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ urlBuilder_.Length--;
var client_ = _httpClient;
var disposeClient_ = false;
@@ -11329,7 +11344,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -11343,6 +11358,12 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
+ if (status_ == 404)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("No funding accounts found", status_, responseText_, headers_, null);
+ }
+ else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -11370,20 +11391,25 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Lists all addresses for a user
+ /// Lists all funding sources for a business
///
- /// User token
+ /// Business token
+ /// Type, such as a payment card or ACH
/// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesAddressesUserAsync(string user_token, string fields = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesBusinessAsync(string business_token, string type = null, string fields = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (user_token == null)
- throw new System.ArgumentNullException("user_token");
+ if (business_token == null)
+ throw new System.ArgumentNullException("business_token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/addresses/user/{user_token}?");
- urlBuilder_.Replace("{user_token}", System.Uri.EscapeDataString(ConvertToString(user_token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/business/{business_token}?");
+ urlBuilder_.Replace("{business_token}", System.Uri.EscapeDataString(ConvertToString(business_token, System.Globalization.CultureInfo.InvariantCulture)));
+ if (type != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("type") + "=").Append(System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
if (fields != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
@@ -11422,7 +11448,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -11439,7 +11465,7 @@ public string BaseUrl
if (status_ == 404)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Not found", status_, responseText_, headers_, null);
+ throw new ApiException("No funding accounts found", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -11469,25 +11495,19 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Lists all addresses for a business
+ /// Configures a default funding source
///
- /// Business token
- /// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
+ /// Funding account
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesAddressesBusinessAsync(string business_token, string fields = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesDefaultAsync(string funding_source_token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (business_token == null)
- throw new System.ArgumentNullException("business_token");
+ if (funding_source_token == null)
+ throw new System.ArgumentNullException("funding_source_token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/addresses/business/{business_token}?");
- urlBuilder_.Replace("{business_token}", System.Uri.EscapeDataString(ConvertToString(business_token, System.Globalization.CultureInfo.InvariantCulture)));
- if (fields != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- urlBuilder_.Length--;
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/{funding_source_token}/default");
+ urlBuilder_.Replace("{funding_source_token}", System.Uri.EscapeDataString(ConvertToString(funding_source_token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -11495,7 +11515,8 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- request_.Method = new System.Net.Http.HttpMethod("GET");
+ request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json");
+ request_.Method = new System.Net.Http.HttpMethod("PUT");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -11521,7 +11542,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -11535,12 +11556,6 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 404)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Not found", status_, responseText_, headers_, null);
- }
- else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -11568,19 +11583,14 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns a user address for a funding source
+ /// Registers an ACH funding source
///
- /// Funding source address token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesAddressesGetAsync(string funding_source_address_token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesAchPostAsync(Ach_model body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (funding_source_address_token == null)
- throw new System.ArgumentNullException("funding_source_address_token");
-
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/addresses/{funding_source_address_token}");
- urlBuilder_.Replace("{funding_source_address_token}", System.Uri.EscapeDataString(ConvertToString(funding_source_address_token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/ach");
var client_ = _httpClient;
var disposeClient_ = false;
@@ -11588,7 +11598,11 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- request_.Method = new System.Net.Http.HttpMethod("GET");
+ var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
+ var content_ = new System.Net.Http.StringContent(json_);
+ content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ request_.Content = content_;
+ request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -11614,7 +11628,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -11628,10 +11642,10 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 404)
+ if (status_ == 409)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Not found", status_, responseText_, headers_, null);
+ throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -11661,19 +11675,14 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Updates the account holder address for a funding source
+ /// Registers an ACH funding source through a partner
///
- /// Funding source address token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesAddressesPutAsync(string funding_source_address_token, Card_holder_address_update_model body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesAchPartnerAsync(Ach_partner_request_model body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (funding_source_address_token == null)
- throw new System.ArgumentNullException("funding_source_address_token");
-
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/addresses/{funding_source_address_token}");
- urlBuilder_.Replace("{funding_source_address_token}", System.Uri.EscapeDataString(ConvertToString(funding_source_address_token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/ach/partner");
var client_ = _httpClient;
var disposeClient_ = false;
@@ -11685,7 +11694,7 @@ public string BaseUrl
var content_ = new System.Net.Http.StringContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("PUT");
+ request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -11711,7 +11720,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -11725,6 +11734,12 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
+ if (status_ == 409)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
+ }
+ else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -11752,18 +11767,18 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns a specific program funding source
+ /// Returns a gateway program funding source
///
- /// Program funding source token
+ /// Gateway program funding source token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesProgramGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesProgramgatewayGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (token == null)
throw new System.ArgumentNullException("token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/program/{token}");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/programgateway/{token}");
urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
@@ -11798,7 +11813,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 201)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -11809,7 +11824,7 @@ public string BaseUrl
if (status_ == 404)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Program funding source not found", status_, responseText_, headers_, null);
+ throw new ApiException("Gateway program funding source not found", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -11839,18 +11854,18 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Updates a specific program funding source
+ /// Updates a specific gateway program funding source
///
- /// Program funding source token
+ /// Gateway program funding source token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesProgramPutAsync(string token, Program_funding_source_update_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesProgramgatewayPutAsync(string token, Gateway_program_funding_source_update_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (token == null)
throw new System.ArgumentNullException("token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/program/{token}");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/programgateway/{token}");
urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
@@ -11889,7 +11904,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -11930,14 +11945,19 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Creates a gateway program funding source
+ /// Updates a specific gateway program funding source Custom headers
///
+ /// Gateway program funding source token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesProgramgatewayPostAsync(Gateway_program_funding_source_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesProgramgatewayCustomheadersAsync(string token, Gateway_program_custom_header_update_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
+ if (token == null)
+ throw new System.ArgumentNullException("token");
+
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/programgateway");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/programgateway/customheaders/{token}");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -11949,7 +11969,7 @@ public string BaseUrl
var content_ = new System.Net.Http.StringContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("POST");
+ request_.Method = new System.Net.Http.HttpMethod("PUT");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -11973,7 +11993,7 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 201)
+ if (status_ == 200)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
@@ -11989,12 +12009,6 @@ public string BaseUrl
throw new ApiException("Invalid fields detected", status_, responseText_, headers_, null);
}
else
- if (status_ == 409)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Request already processed with a different payload", status_, responseText_, headers_, null);
- }
- else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -12022,14 +12036,14 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Registers a payment card funding source
+ /// Creates a gateway program funding source
///
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesPaymentcardPostAsync(Token_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesProgramgatewayPostAsync(Gateway_program_funding_source_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/paymentcard");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/programgateway");
var client_ = _httpClient;
var disposeClient_ = false;
@@ -12065,9 +12079,9 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 200)
+ if (status_ == 201)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -12078,13 +12092,13 @@ public string BaseUrl
if (status_ == 400)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Bad request", status_, responseText_, headers_, null);
+ throw new ApiException("Invalid fields detected", status_, responseText_, headers_, null);
}
else
if (status_ == 409)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
+ throw new ApiException("Request already processed with a different payload", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -12114,18 +12128,18 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns a specific payment card
+ /// Retrieves a linked funding source balance from a partner
///
- /// Funding token
+ /// Funding source token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesPaymentcardGetAsync(string funding_source_token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesAchPartnerBalanceAsync(string funding_source_token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (funding_source_token == null)
throw new System.ArgumentNullException("funding_source_token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/paymentcard/{funding_source_token}");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/ach/partner/{funding_source_token}/balance");
urlBuilder_.Replace("{funding_source_token}", System.Uri.EscapeDataString(ConvertToString(funding_source_token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
@@ -12160,7 +12174,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -12207,22 +12221,18 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Updates a specific payment card
+ /// Returns a user ACH account
///
/// Funding account token
- /// Payment card
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesPaymentcardPutAsync(string funding_source_token, Token_update_request body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesAchGetAsync(string funding_source_token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (funding_source_token == null)
throw new System.ArgumentNullException("funding_source_token");
- if (body == null)
- throw new System.ArgumentNullException("body");
-
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/paymentcard/{funding_source_token}");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/ach/{funding_source_token}");
urlBuilder_.Replace("{funding_source_token}", System.Uri.EscapeDataString(ConvertToString(funding_source_token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
@@ -12231,11 +12241,7 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
- var content_ = new System.Net.Http.StringContent(json_);
- content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("PUT");
+ request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -12261,7 +12267,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -12275,6 +12281,12 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
+ if (status_ == 404)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Not found", status_, responseText_, headers_, null);
+ }
+ else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -12302,38 +12314,30 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Lists all funding sources for a user
+ /// Verifies a bank account as a funding source
///
- /// User token
- /// Type, such as a payment card or ACH
- /// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesUserAsync(string user_token, string type = null, string fields = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesAchPutAsync(string funding_source_token, Ach_verification_model body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (user_token == null)
- throw new System.ArgumentNullException("user_token");
+ if (funding_source_token == null)
+ throw new System.ArgumentNullException("funding_source_token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/user/{user_token}?");
- urlBuilder_.Replace("{user_token}", System.Uri.EscapeDataString(ConvertToString(user_token, System.Globalization.CultureInfo.InvariantCulture)));
- if (type != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("type") + "=").Append(System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (fields != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- urlBuilder_.Length--;
-
- var client_ = _httpClient;
- var disposeClient_ = false;
- try
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/ach/{funding_source_token}");
+ urlBuilder_.Replace("{funding_source_token}", System.Uri.EscapeDataString(ConvertToString(funding_source_token, System.Globalization.CultureInfo.InvariantCulture)));
+
+ var client_ = _httpClient;
+ var disposeClient_ = false;
+ try
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- request_.Method = new System.Net.Http.HttpMethod("GET");
+ var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
+ var content_ = new System.Net.Http.StringContent(json_);
+ content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ request_.Content = content_;
+ request_.Method = new System.Net.Http.HttpMethod("PUT");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -12359,7 +12363,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -12373,12 +12377,6 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 404)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("No funding accounts found", status_, responseText_, headers_, null);
- }
- else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -12406,30 +12404,19 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Lists all funding sources for a business
+ /// Returns the dollar amounts used to verify the ACH account
///
- /// Business token
- /// Type, such as a payment card or ACH
- /// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
+ /// Funding account token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesBusinessAsync(string business_token, string type = null, string fields = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesAchVerificationamountsAsync(string funding_source_token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (business_token == null)
- throw new System.ArgumentNullException("business_token");
+ if (funding_source_token == null)
+ throw new System.ArgumentNullException("funding_source_token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/business/{business_token}?");
- urlBuilder_.Replace("{business_token}", System.Uri.EscapeDataString(ConvertToString(business_token, System.Globalization.CultureInfo.InvariantCulture)));
- if (type != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("type") + "=").Append(System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (fields != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- urlBuilder_.Length--;
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/ach/{funding_source_token}/verificationamounts");
+ urlBuilder_.Replace("{funding_source_token}", System.Uri.EscapeDataString(ConvertToString(funding_source_token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -12463,7 +12450,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -12477,12 +12464,6 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 404)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("No funding accounts found", status_, responseText_, headers_, null);
- }
- else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -12510,19 +12491,25 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Configures a default funding source
+ /// Lists all addresses for a user
///
- /// Funding account
+ /// User token
+ /// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesDefaultAsync(string funding_source_token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesAddressesUserAsync(string user_token, string fields = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (funding_source_token == null)
- throw new System.ArgumentNullException("funding_source_token");
+ if (user_token == null)
+ throw new System.ArgumentNullException("user_token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/{funding_source_token}/default");
- urlBuilder_.Replace("{funding_source_token}", System.Uri.EscapeDataString(ConvertToString(funding_source_token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/addresses/user/{user_token}?");
+ urlBuilder_.Replace("{user_token}", System.Uri.EscapeDataString(ConvertToString(user_token, System.Globalization.CultureInfo.InvariantCulture)));
+ if (fields != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ urlBuilder_.Length--;
var client_ = _httpClient;
var disposeClient_ = false;
@@ -12530,8 +12517,7 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json");
- request_.Method = new System.Net.Http.HttpMethod("PUT");
+ request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -12557,7 +12543,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -12571,6 +12557,12 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
+ if (status_ == 404)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Not found", status_, responseText_, headers_, null);
+ }
+ else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -12598,14 +12590,25 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Registers an ACH funding source
+ /// Lists all addresses for a business
///
+ /// Business token
+ /// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesAchPostAsync(Ach_model body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesAddressesBusinessAsync(string business_token, string fields = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
+ if (business_token == null)
+ throw new System.ArgumentNullException("business_token");
+
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/ach");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/addresses/business/{business_token}?");
+ urlBuilder_.Replace("{business_token}", System.Uri.EscapeDataString(ConvertToString(business_token, System.Globalization.CultureInfo.InvariantCulture)));
+ if (fields != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ urlBuilder_.Length--;
var client_ = _httpClient;
var disposeClient_ = false;
@@ -12613,11 +12616,7 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
- var content_ = new System.Net.Http.StringContent(json_);
- content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("POST");
+ request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -12643,7 +12642,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -12657,10 +12656,10 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 409)
+ if (status_ == 404)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
+ throw new ApiException("Not found", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -12690,14 +12689,19 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Registers an ACH funding source through a partner
+ /// Returns a user address for a funding source
///
+ /// Funding source address token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesAchPartnerAsync(Ach_partner_request_model body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesAddressesGetAsync(string funding_source_address_token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
+ if (funding_source_address_token == null)
+ throw new System.ArgumentNullException("funding_source_address_token");
+
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/ach/partner");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/addresses/{funding_source_address_token}");
+ urlBuilder_.Replace("{funding_source_address_token}", System.Uri.EscapeDataString(ConvertToString(funding_source_address_token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -12705,11 +12709,7 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
- var content_ = new System.Net.Http.StringContent(json_);
- content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("POST");
+ request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -12735,7 +12735,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -12749,10 +12749,10 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 409)
+ if (status_ == 404)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
+ throw new ApiException("Not found", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -12782,19 +12782,19 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns a gateway program funding source
+ /// Updates the account holder address for a funding source
///
- /// Gateway program funding source token
+ /// Funding source address token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesProgramgatewayGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesAddressesPutAsync(string funding_source_address_token, Card_holder_address_update_model body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
+ if (funding_source_address_token == null)
+ throw new System.ArgumentNullException("funding_source_address_token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/programgateway/{token}");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/addresses/{funding_source_address_token}");
+ urlBuilder_.Replace("{funding_source_address_token}", System.Uri.EscapeDataString(ConvertToString(funding_source_address_token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -12802,7 +12802,11 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- request_.Method = new System.Net.Http.HttpMethod("GET");
+ var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
+ var content_ = new System.Net.Http.StringContent(json_);
+ content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ request_.Content = content_;
+ request_.Method = new System.Net.Http.HttpMethod("PUT");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -12826,9 +12830,9 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 201)
+ if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -12836,10 +12840,10 @@ public string BaseUrl
return objectResponse_.Object;
}
else
- if (status_ == 404)
+ if (status_ == 400)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Gateway program funding source not found", status_, responseText_, headers_, null);
+ throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -12869,18 +12873,18 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Updates a specific gateway program funding source
+ /// Returns a specific program funding source
///
- /// Gateway program funding source token
+ /// Program funding source token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesProgramgatewayPutAsync(string token, Gateway_program_funding_source_update_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesProgramGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (token == null)
throw new System.ArgumentNullException("token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/programgateway/{token}");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/program/{token}");
urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
@@ -12889,11 +12893,7 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
- var content_ = new System.Net.Http.StringContent(json_);
- content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("PUT");
+ request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -12917,9 +12917,9 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 200)
+ if (status_ == 201)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -12927,10 +12927,10 @@ public string BaseUrl
return objectResponse_.Object;
}
else
- if (status_ == 400)
+ if (status_ == 404)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Invalid fields detected", status_, responseText_, headers_, null);
+ throw new ApiException("Program funding source not found", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -12960,18 +12960,18 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Updates a specific gateway program funding source Custom headers
+ /// Updates a specific program funding source
///
- /// Gateway program funding source token
+ /// Program funding source token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task FundingsourcesProgramgatewayCustomheadersAsync(string token, Gateway_program_custom_header_update_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task FundingsourcesProgramPutAsync(string token, Program_funding_source_update_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (token == null)
throw new System.ArgumentNullException("token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/programgateway/customheaders/{token}");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/fundingsources/program/{token}");
urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
@@ -13010,7 +13010,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -14134,19 +14134,35 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns a specific MCC group
+ /// Lists all MCC groups
///
- /// MCC group token
+ /// MCC
+ /// Number of items to retrieve. Count can be between 1 - 10 items.
+ /// Indicates from what row to start returning data.
+ /// Field by which to sort the returned items. Use any field in the model, or system fields lastModifiedTime or createdTime.
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task MccgroupsGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task MccgroupsGetAsync(string mcc = null, int? count = null, int? start_index = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
-
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/mccgroups/{token}");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/mccgroups?");
+ if (mcc != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("mcc") + "=").Append(System.Uri.EscapeDataString(ConvertToString(mcc, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (count != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (start_index != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (sort_by != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ urlBuilder_.Length--;
var client_ = _httpClient;
var disposeClient_ = false;
@@ -14180,7 +14196,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -14194,12 +14210,6 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 404)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("MCC group not found", status_, responseText_, headers_, null);
- }
- else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -14227,22 +14237,18 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Updates an MCC group
+ /// Creates an MCC group
///
/// MCC group
- /// Success
+ /// Created
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task MccgroupsPutAsync(Mcc_group_update_model body, string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task MccgroupsPostAsync(Mcc_group_model body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
-
if (body == null)
throw new System.ArgumentNullException("body");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/mccgroups/{token}");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/mccgroups");
var client_ = _httpClient;
var disposeClient_ = false;
@@ -14254,7 +14260,7 @@ public string BaseUrl
var content_ = new System.Net.Http.StringContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("PUT");
+ request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -14278,9 +14284,9 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 200)
+ if (status_ == 201)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -14294,6 +14300,12 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
+ if (status_ == 409)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
+ }
+ else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -14321,35 +14333,19 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Lists all MCC groups
+ /// Returns a specific MCC group
///
- /// MCC
- /// Number of items to retrieve. Count can be between 1 - 10 items.
- /// Indicates from what row to start returning data.
- /// Field by which to sort the returned items. Use any field in the model, or system fields lastModifiedTime or createdTime.
+ /// MCC group token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task MccgroupsGetAsync(string mcc = null, int? count = null, int? start_index = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task MccgroupsGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
+ if (token == null)
+ throw new System.ArgumentNullException("token");
+
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/mccgroups?");
- if (mcc != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("mcc") + "=").Append(System.Uri.EscapeDataString(ConvertToString(mcc, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (count != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (start_index != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (sort_by != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- urlBuilder_.Length--;
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/mccgroups/{token}");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -14383,7 +14379,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -14397,6 +14393,12 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
+ if (status_ == 404)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("MCC group not found", status_, responseText_, headers_, null);
+ }
+ else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -14424,18 +14426,22 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Creates an MCC group
+ /// Updates an MCC group
///
/// MCC group
- /// Created
+ /// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task MccgroupsPostAsync(Mcc_group_model body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task MccgroupsPutAsync(Mcc_group_update_model body, string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
+ if (token == null)
+ throw new System.ArgumentNullException("token");
+
if (body == null)
throw new System.ArgumentNullException("body");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/mccgroups");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/mccgroups/{token}");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -14447,7 +14453,7 @@ public string BaseUrl
var content_ = new System.Net.Http.StringContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("POST");
+ request_.Method = new System.Net.Http.HttpMethod("PUT");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -14471,9 +14477,9 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 201)
+ if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -14487,12 +14493,6 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 409)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
- }
- else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -14520,19 +14520,35 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns a Merchant Group
+ /// Lists all Merchant Groups
///
- /// Merchant Group token
+ /// mid
+ /// Number of items to retrieve. Count can be between 1 - 10 items.
+ /// Indicates from what row to start returning data.
+ /// Field by which to sort the returned items. Use any field in the model, or system fields lastModifiedTime or createdTime.
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task MerchantgroupsGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task MerchantgroupsGetAsync(string mid = null, int? count = null, int? start_index = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
-
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/merchantgroups/{token}");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/merchantgroups?");
+ if (mid != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("mid") + "=").Append(System.Uri.EscapeDataString(ConvertToString(mid, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (count != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (start_index != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (sort_by != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ urlBuilder_.Length--;
var client_ = _httpClient;
var disposeClient_ = false;
@@ -14566,7 +14582,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -14580,12 +14596,6 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 404)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Merchant Group not found", status_, responseText_, headers_, null);
- }
- else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -14613,22 +14623,14 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Updates an Merchant Group
+ /// Creates a merchant group
///
- /// Merchant Group
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task MerchantgroupsPutAsync(Merchant_group_update_request body, string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task MerchantgroupsPostAsync(Merchant_group_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
-
- if (body == null)
- throw new System.ArgumentNullException("body");
-
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/merchantgroups/{token}");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/merchantgroups");
var client_ = _httpClient;
var disposeClient_ = false;
@@ -14640,7 +14642,7 @@ public string BaseUrl
var content_ = new System.Net.Http.StringContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("PUT");
+ request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -14664,7 +14666,7 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 200)
+ if (status_ == 201)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
@@ -14677,7 +14679,13 @@ public string BaseUrl
if (status_ == 400)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Bad request", status_, responseText_, headers_, null);
+ throw new ApiException("User input error/Bad request", status_, responseText_, headers_, null);
+ }
+ else
+ if (status_ == 409)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -14707,35 +14715,19 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Lists all Merchant Groups
+ /// Returns a Merchant Group
///
- /// mid
- /// Number of items to retrieve. Count can be between 1 - 10 items.
- /// Indicates from what row to start returning data.
- /// Field by which to sort the returned items. Use any field in the model, or system fields lastModifiedTime or createdTime.
+ /// Merchant Group token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task MerchantgroupsGetAsync(string mid = null, int? count = null, int? start_index = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task MerchantgroupsGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
+ if (token == null)
+ throw new System.ArgumentNullException("token");
+
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/merchantgroups?");
- if (mid != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("mid") + "=").Append(System.Uri.EscapeDataString(ConvertToString(mid, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (count != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (start_index != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (sort_by != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- urlBuilder_.Length--;
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/merchantgroups/{token}");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -14769,7 +14761,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -14783,6 +14775,12 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
+ if (status_ == 404)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Merchant Group not found", status_, responseText_, headers_, null);
+ }
+ else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -14810,14 +14808,22 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Creates a merchant group
+ /// Updates an Merchant Group
///
+ /// Merchant Group
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task MerchantgroupsPostAsync(Merchant_group_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task MerchantgroupsPutAsync(Merchant_group_update_request body, string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
+ if (token == null)
+ throw new System.ArgumentNullException("token");
+
+ if (body == null)
+ throw new System.ArgumentNullException("body");
+
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/merchantgroups");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/merchantgroups/{token}");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -14829,7 +14835,7 @@ public string BaseUrl
var content_ = new System.Net.Http.StringContent(json_);
content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("POST");
+ request_.Method = new System.Net.Http.HttpMethod("PUT");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -14853,7 +14859,7 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 201)
+ if (status_ == 200)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
@@ -14866,13 +14872,7 @@ public string BaseUrl
if (status_ == 400)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("User input error/Bad request", status_, responseText_, headers_, null);
- }
- else
- if (status_ == 409)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Token already associated with a different payload", status_, responseText_, headers_, null);
+ throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -14902,14 +14902,35 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Performs a peer transfer from one user to another
+ /// Returns all peer transfers for a user
///
+ /// User or business token
+ /// Number of transfers to retrieve
+ /// Start index
+ /// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task PeertransfersPostAsync(Peer_transfer_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task PeertransfersUserAsync(string user_or_business_token, int? count = null, int? start_index = null, string fields = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
+ if (user_or_business_token == null)
+ throw new System.ArgumentNullException("user_or_business_token");
+
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/peertransfers");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/peertransfers/user/{user_or_business_token}?");
+ urlBuilder_.Replace("{user_or_business_token}", System.Uri.EscapeDataString(ConvertToString(user_or_business_token, System.Globalization.CultureInfo.InvariantCulture)));
+ if (count != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (start_index != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (fields != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ urlBuilder_.Length--;
var client_ = _httpClient;
var disposeClient_ = false;
@@ -14917,11 +14938,7 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
- var content_ = new System.Net.Http.StringContent(json_);
- content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
- request_.Content = content_;
- request_.Method = new System.Net.Http.HttpMethod("POST");
+ request_.Method = new System.Net.Http.HttpMethod("GET");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -14945,32 +14962,20 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 201)
+ if (status_ == 200)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
- throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
- }
- return objectResponse_.Object;
- }
- else
- if (status_ == 400)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Invalid fields detected: either sender or recipient is not found", status_, responseText_, headers_, null);
- }
- else
- if (status_ == 409)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Request already processed with a different payload", status_, responseText_, headers_, null);
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ return objectResponse_.Object;
}
else
- if (status_ == 422)
+ if (status_ == 400)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Rule violations", status_, responseText_, headers_, null);
+ throw new ApiException("User input error/Bad request", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -15000,18 +15005,35 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns details of a previous transfer
+ /// Returns sent peer transfers for a user
///
+ /// User or business token
+ /// Number of transfers to retrieve
+ /// Start index
+ /// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task PeertransfersGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task PeertransfersUserSenderAsync(string user_or_business_token, int? count = null, int? start_index = null, string fields = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
+ if (user_or_business_token == null)
+ throw new System.ArgumentNullException("user_or_business_token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/peertransfers/{token}");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/peertransfers/user/{user_or_business_token}/sender?");
+ urlBuilder_.Replace("{user_or_business_token}", System.Uri.EscapeDataString(ConvertToString(user_or_business_token, System.Globalization.CultureInfo.InvariantCulture)));
+ if (count != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (start_index != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (fields != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ urlBuilder_.Length--;
var client_ = _httpClient;
var disposeClient_ = false;
@@ -15053,10 +15075,10 @@ public string BaseUrl
return objectResponse_.Object;
}
else
- if (status_ == 404)
+ if (status_ == 400)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Transfer token not found", status_, responseText_, headers_, null);
+ throw new ApiException("User input error/Bad request", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -15086,7 +15108,7 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns all peer transfers for a user
+ /// Returns received peer transfers for a user
///
/// User or business token
/// Number of transfers to retrieve
@@ -15094,13 +15116,13 @@ public string BaseUrl
/// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task PeertransfersUserAsync(string user_or_business_token, int? count = null, int? start_index = null, string fields = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task PeertransfersUserRecipientAsync(string user_or_business_token, int? count = null, int? start_index = null, string fields = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
if (user_or_business_token == null)
throw new System.ArgumentNullException("user_or_business_token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/peertransfers/user/{user_or_business_token}?");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/peertransfers/user/{user_or_business_token}/recipient?");
urlBuilder_.Replace("{user_or_business_token}", System.Uri.EscapeDataString(ConvertToString(user_or_business_token, System.Globalization.CultureInfo.InvariantCulture)));
if (count != null)
{
@@ -15156,10 +15178,10 @@ public string BaseUrl
return objectResponse_.Object;
}
else
- if (status_ == 400)
+ if (status_ == 404)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("User input error/Bad request", status_, responseText_, headers_, null);
+ throw new ApiException("User token not found", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -15189,35 +15211,14 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns sent peer transfers for a user
+ /// Performs a peer transfer from one user to another
///
- /// User or business token
- /// Number of transfers to retrieve
- /// Start index
- /// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task PeertransfersUserSenderAsync(string user_or_business_token, int? count = null, int? start_index = null, string fields = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task PeertransfersPostAsync(Peer_transfer_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (user_or_business_token == null)
- throw new System.ArgumentNullException("user_or_business_token");
-
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/peertransfers/user/{user_or_business_token}/sender?");
- urlBuilder_.Replace("{user_or_business_token}", System.Uri.EscapeDataString(ConvertToString(user_or_business_token, System.Globalization.CultureInfo.InvariantCulture)));
- if (count != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (start_index != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (fields != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- urlBuilder_.Length--;
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/peertransfers");
var client_ = _httpClient;
var disposeClient_ = false;
@@ -15225,7 +15226,11 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- request_.Method = new System.Net.Http.HttpMethod("GET");
+ var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
+ var content_ = new System.Net.Http.StringContent(json_);
+ content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ request_.Content = content_;
+ request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -15249,7 +15254,7 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 200)
+ if (status_ == 201)
{
var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
@@ -15262,7 +15267,19 @@ public string BaseUrl
if (status_ == 400)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("User input error/Bad request", status_, responseText_, headers_, null);
+ throw new ApiException("Invalid fields detected: either sender or recipient is not found", status_, responseText_, headers_, null);
+ }
+ else
+ if (status_ == 409)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Request already processed with a different payload", status_, responseText_, headers_, null);
+ }
+ else
+ if (status_ == 422)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Rule violations", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -15292,35 +15309,18 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns received peer transfers for a user
+ /// Returns details of a previous transfer
///
- /// User or business token
- /// Number of transfers to retrieve
- /// Start index
- /// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task PeertransfersUserRecipientAsync(string user_or_business_token, int? count = null, int? start_index = null, string fields = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task PeertransfersGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (user_or_business_token == null)
- throw new System.ArgumentNullException("user_or_business_token");
+ if (token == null)
+ throw new System.ArgumentNullException("token");
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/peertransfers/user/{user_or_business_token}/recipient?");
- urlBuilder_.Replace("{user_or_business_token}", System.Uri.EscapeDataString(ConvertToString(user_or_business_token, System.Globalization.CultureInfo.InvariantCulture)));
- if (count != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (start_index != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (fields != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- urlBuilder_.Length--;
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/peertransfers/{token}");
+ urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
var client_ = _httpClient;
var disposeClient_ = false;
@@ -15365,7 +15365,7 @@ public string BaseUrl
if (status_ == 404)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("User token not found", status_, responseText_, headers_, null);
+ throw new ApiException("Transfer token not found", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -16430,21 +16430,18 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Lists all program transfers
+ /// Lists all program transfer types
///
- /// Number of program transfers to retrieve
+ /// Number of program transfer types to retrieve
/// Start index
/// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
/// Sort order
- /// User token
- /// Business token
- /// Program type token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task ProgramtransfersGetAsync(int? count = null, int? start_index = null, string fields = null, string sort_by = null, string user_token = null, string business_token = null, string type_token = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task ProgramtransfersTypesGetAsync(int? count = null, int? start_index = null, string fields = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/programtransfers?");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/programtransfers/types?");
if (count != null)
{
urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
@@ -16461,18 +16458,6 @@ public string BaseUrl
{
urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
}
- if (user_token != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("user_token") + "=").Append(System.Uri.EscapeDataString(ConvertToString(user_token, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (business_token != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("business_token") + "=").Append(System.Uri.EscapeDataString(ConvertToString(business_token, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (type_token != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("type_token") + "=").Append(System.Uri.EscapeDataString(ConvertToString(type_token, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
urlBuilder_.Length--;
var client_ = _httpClient;
@@ -16507,7 +16492,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -16548,14 +16533,14 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Transfers to a program funding source
+ /// Creates a program transfer type
///
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task ProgramtransfersPostAsync(Program_transfer body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task ProgramtransfersTypesPostAsync(Program_transfer_type_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/programtransfers");
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/programtransfers/types");
var client_ = _httpClient;
var disposeClient_ = false;
@@ -16593,7 +16578,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 201)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -16610,19 +16595,13 @@ public string BaseUrl
if (status_ == 404)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Not found", status_, responseText_, headers_, null);
+ throw new ApiException("Program funding source not found", status_, responseText_, headers_, null);
}
else
if (status_ == 409)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Request already processed with a different payload", status_, responseText_, headers_, null);
- }
- else
- if (status_ == 412)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Pre-condition failed. Unload amount is greater than load amount", status_, responseText_, headers_, null);
+ throw new ApiException("Token already used", status_, responseText_, headers_, null);
}
else
if (status_ == 500)
@@ -16842,19 +16821,50 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Returns a specific program transfer
+ /// Lists all program transfers
///
- /// Program transfer token
+ /// Number of program transfers to retrieve
+ /// Start index
+ /// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
+ /// Sort order
+ /// User token
+ /// Business token
+ /// Program type token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task ProgramtransfersGetAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task ProgramtransfersGetAsync(int? count = null, int? start_index = null, string fields = null, string sort_by = null, string user_token = null, string business_token = null, string type_token = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
- if (token == null)
- throw new System.ArgumentNullException("token");
-
var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/programtransfers/{token}");
- urlBuilder_.Replace("{token}", System.Uri.EscapeDataString(ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)));
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/programtransfers?");
+ if (count != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (start_index != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (fields != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (sort_by != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (user_token != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("user_token") + "=").Append(System.Uri.EscapeDataString(ConvertToString(user_token, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (business_token != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("business_token") + "=").Append(System.Uri.EscapeDataString(ConvertToString(business_token, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ if (type_token != null)
+ {
+ urlBuilder_.Append(System.Uri.EscapeDataString("type_token") + "=").Append(System.Uri.EscapeDataString(ConvertToString(type_token, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
+ }
+ urlBuilder_.Length--;
var client_ = _httpClient;
var disposeClient_ = false;
@@ -16888,7 +16898,7 @@ public string BaseUrl
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -16902,12 +16912,6 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
- if (status_ == 404)
- {
- string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
- throw new ApiException("Return not found", status_, responseText_, headers_, null);
- }
- else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -16935,35 +16939,14 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Lists all program transfer types
+ /// Transfers to a program funding source
///
- /// Number of program transfer types to retrieve
- /// Start index
- /// Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
- /// Sort order
/// Success
- /// A server side error occurred.
- public virtual async System.Threading.Tasks.Task ProgramtransfersTypesGetAsync(int? count = null, int? start_index = null, string fields = null, string sort_by = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
- {
- var urlBuilder_ = new System.Text.StringBuilder();
- urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/programtransfers/types?");
- if (count != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("count") + "=").Append(System.Uri.EscapeDataString(ConvertToString(count, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (start_index != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("start_index") + "=").Append(System.Uri.EscapeDataString(ConvertToString(start_index, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (fields != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("fields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(fields, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- if (sort_by != null)
- {
- urlBuilder_.Append(System.Uri.EscapeDataString("sort_by") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sort_by, System.Globalization.CultureInfo.InvariantCulture))).Append("&");
- }
- urlBuilder_.Length--;
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task ProgramtransfersPostAsync(Program_transfer body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ var urlBuilder_ = new System.Text.StringBuilder();
+ urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/programtransfers");
var client_ = _httpClient;
var disposeClient_ = false;
@@ -16971,7 +16954,11 @@ public string BaseUrl
{
using (var request_ = new System.Net.Http.HttpRequestMessage())
{
- request_.Method = new System.Net.Http.HttpMethod("GET");
+ var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value);
+ var content_ = new System.Net.Http.StringContent(json_);
+ content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ request_.Content = content_;
+ request_.Method = new System.Net.Http.HttpMethod("POST");
request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
PrepareRequest(client_, request_, urlBuilder_);
@@ -16995,9 +16982,9 @@ public string BaseUrl
ProcessResponse(client_, response_);
var status_ = (int)response_.StatusCode;
- if (status_ == 200)
+ if (status_ == 201)
{
- var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
@@ -17011,6 +16998,24 @@ public string BaseUrl
throw new ApiException("Bad request", status_, responseText_, headers_, null);
}
else
+ if (status_ == 404)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Not found", status_, responseText_, headers_, null);
+ }
+ else
+ if (status_ == 409)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Request already processed with a different payload", status_, responseText_, headers_, null);
+ }
+ else
+ if (status_ == 412)
+ {
+ string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("Pre-condition failed. Unload amount is greater than load amount", status_, responseText_, headers_, null);
+ }
+ else
if (status_ == 500)
{
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
@@ -17038,14 +17043,19 @@ public string BaseUrl
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
- /// Creates a program transfer type
+ /// Returns a specific program transfer
///
+ /// Program transfer token
/// Success
/// A server side error occurred.
- public virtual async System.Threading.Tasks.Task ProgramtransfersTypesPostAsync(Program_transfer_type_request body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public virtual async System.Threading.Tasks.Task