diff --git a/PagarmeApiSDK.Standard/Controllers/BalanceOperationsController.cs b/PagarmeApiSDK.Standard/Controllers/BalanceOperationsController.cs
index f47fc77..8b7acc2 100644
--- a/PagarmeApiSDK.Standard/Controllers/BalanceOperationsController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/BalanceOperationsController.cs
@@ -32,32 +32,6 @@ internal class BalanceOperationsController : BaseController, IBalanceOperationsC
///
internal BalanceOperationsController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { }
- ///
- /// GetBalanceOperationById EndPoint.
- ///
- /// Required parameter: Example: .
- /// Returns the Models.GetBalanceOperationResponse response from the API call.
- public Models.GetBalanceOperationResponse GetBalanceOperationById(
- long id)
- => CoreHelper.RunTask(GetBalanceOperationByIdAsync(id));
-
- ///
- /// GetBalanceOperationById EndPoint.
- ///
- /// Required parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetBalanceOperationResponse response from the API call.
- public async Task GetBalanceOperationByIdAsync(
- long id,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/balance/operations/{id}")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("id", id))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
///
/// GetBalanceOperations EndPoint.
///
@@ -98,5 +72,31 @@ public Models.ListBalanceOperationResponse GetBalanceOperations(
.Query(_query => _query.Setup("created_until", createdUntil.HasValue ? createdUntil.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
.Query(_query => _query.Setup("recipient_id", recipientId))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
+ ///
+ /// GetBalanceOperationById EndPoint.
+ ///
+ /// Required parameter: Example: .
+ /// Returns the Models.GetBalanceOperationResponse response from the API call.
+ public Models.GetBalanceOperationResponse GetBalanceOperationById(
+ long id)
+ => CoreHelper.RunTask(GetBalanceOperationByIdAsync(id));
+
+ ///
+ /// GetBalanceOperationById EndPoint.
+ ///
+ /// Required parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetBalanceOperationResponse response from the API call.
+ public async Task GetBalanceOperationByIdAsync(
+ long id,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Get, "/balance/operations/{id}")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Template(_template => _template.Setup("id", id))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
}
}
\ No newline at end of file
diff --git a/PagarmeApiSDK.Standard/Controllers/ChargesController.cs b/PagarmeApiSDK.Standard/Controllers/ChargesController.cs
index dfc9dea..2befbb8 100644
--- a/PagarmeApiSDK.Standard/Controllers/ChargesController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/ChargesController.cs
@@ -69,34 +69,34 @@ public Models.GetChargeResponse UpdateChargeMetadata(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Captures a charge.
+ /// Updates a charge's payment method.
///
/// Required parameter: Charge id.
- /// Optional parameter: Request for capturing a charge.
+ /// Required parameter: Request for updating the payment method from a charge.
/// Optional parameter: Example: .
/// Returns the Models.GetChargeResponse response from the API call.
- public Models.GetChargeResponse CaptureCharge(
+ public Models.GetChargeResponse UpdateChargePaymentMethod(
string chargeId,
- Models.CreateCaptureChargeRequest request = null,
+ Models.UpdateChargePaymentMethodRequest request,
string idempotencyKey = null)
- => CoreHelper.RunTask(CaptureChargeAsync(chargeId, request, idempotencyKey));
+ => CoreHelper.RunTask(UpdateChargePaymentMethodAsync(chargeId, request, idempotencyKey));
///
- /// Captures a charge.
+ /// Updates a charge's payment method.
///
/// Required parameter: Charge id.
- /// Optional parameter: Request for capturing a charge.
+ /// Required parameter: Request for updating the payment method from a charge.
/// Optional parameter: Example: .
/// cancellationToken.
/// Returns the Models.GetChargeResponse response from the API call.
- public async Task CaptureChargeAsync(
+ public async Task UpdateChargePaymentMethodAsync(
string chargeId,
- Models.CreateCaptureChargeRequest request = null,
+ Models.UpdateChargePaymentMethodRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
=> await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Post, "/charges/{charge_id}/capture")
+ .Setup(new HttpMethod("PATCH"), "/charges/{charge_id}/payment-method")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(request))
@@ -105,60 +105,70 @@ public Models.GetChargeResponse CaptureCharge(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Get a charge from its id.
+ /// GetChargeTransactions EndPoint.
///
- /// Required parameter: Charge id.
- /// Returns the Models.GetChargeResponse response from the API call.
- public Models.GetChargeResponse GetCharge(
- string chargeId)
- => CoreHelper.RunTask(GetChargeAsync(chargeId));
+ /// Required parameter: Charge Id.
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// Returns the Models.ListChargeTransactionsResponse response from the API call.
+ public Models.ListChargeTransactionsResponse GetChargeTransactions(
+ string chargeId,
+ int? page = null,
+ int? size = null)
+ => CoreHelper.RunTask(GetChargeTransactionsAsync(chargeId, page, size));
///
- /// Get a charge from its id.
+ /// GetChargeTransactions EndPoint.
///
- /// Required parameter: Charge id.
+ /// Required parameter: Charge Id.
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
/// cancellationToken.
- /// Returns the Models.GetChargeResponse response from the API call.
- public async Task GetChargeAsync(
+ /// Returns the Models.ListChargeTransactionsResponse response from the API call.
+ public async Task GetChargeTransactionsAsync(
string chargeId,
+ int? page = null,
+ int? size = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/charges/{charge_id}")
+ .Setup(HttpMethod.Get, "/charges/{charge_id}/transactions")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("charge_id", chargeId))))
+ .Template(_template => _template.Setup("charge_id", chargeId))
+ .Query(_query => _query.Setup("page", page))
+ .Query(_query => _query.Setup("size", size))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// ConfirmPayment EndPoint.
+ /// Updates the due date from a charge.
///
- /// Required parameter: Example: .
- /// Optional parameter: Request for confirm payment.
+ /// Required parameter: Charge Id.
+ /// Required parameter: Request for updating the due date.
/// Optional parameter: Example: .
/// Returns the Models.GetChargeResponse response from the API call.
- public Models.GetChargeResponse ConfirmPayment(
+ public Models.GetChargeResponse UpdateChargeDueDate(
string chargeId,
- Models.CreateConfirmPaymentRequest request = null,
+ Models.UpdateChargeDueDateRequest request,
string idempotencyKey = null)
- => CoreHelper.RunTask(ConfirmPaymentAsync(chargeId, request, idempotencyKey));
+ => CoreHelper.RunTask(UpdateChargeDueDateAsync(chargeId, request, idempotencyKey));
///
- /// ConfirmPayment EndPoint.
+ /// Updates the due date from a charge.
///
- /// Required parameter: Example: .
- /// Optional parameter: Request for confirm payment.
+ /// Required parameter: Charge Id.
+ /// Required parameter: Request for updating the due date.
/// Optional parameter: Example: .
/// cancellationToken.
/// Returns the Models.GetChargeResponse response from the API call.
- public async Task ConfirmPaymentAsync(
+ public async Task UpdateChargeDueDateAsync(
string chargeId,
- Models.CreateConfirmPaymentRequest request = null,
+ Models.UpdateChargeDueDateRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
=> await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Post, "/charges/{charge_id}/confirm-payment")
+ .Setup(new HttpMethod("PATCH"), "/Charges/{charge_id}/due-date")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(request))
@@ -167,70 +177,100 @@ public Models.GetChargeResponse ConfirmPayment(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// GetChargeTransactions EndPoint.
+ /// Lists all charges.
///
- /// Required parameter: Charge Id.
/// Optional parameter: Page number.
/// Optional parameter: Page size.
- /// Returns the Models.ListChargeTransactionsResponse response from the API call.
- public Models.ListChargeTransactionsResponse GetChargeTransactions(
- string chargeId,
+ /// Optional parameter: Filter for charge's code.
+ /// Optional parameter: Filter for charge's status.
+ /// Optional parameter: Filter for charge's payment method.
+ /// Optional parameter: Filter for charge's customer id.
+ /// Optional parameter: Filter for charge's order id.
+ /// Optional parameter: Filter for the beginning of the range for charge's creation.
+ /// Optional parameter: Filter for the end of the range for charge's creation.
+ /// Returns the Models.ListChargesResponse response from the API call.
+ public Models.ListChargesResponse GetCharges(
int? page = null,
- int? size = null)
- => CoreHelper.RunTask(GetChargeTransactionsAsync(chargeId, page, size));
+ int? size = null,
+ string code = null,
+ string status = null,
+ string paymentMethod = null,
+ string customerId = null,
+ string orderId = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null)
+ => CoreHelper.RunTask(GetChargesAsync(page, size, code, status, paymentMethod, customerId, orderId, createdSince, createdUntil));
///
- /// GetChargeTransactions EndPoint.
+ /// Lists all charges.
///
- /// Required parameter: Charge Id.
/// Optional parameter: Page number.
/// Optional parameter: Page size.
+ /// Optional parameter: Filter for charge's code.
+ /// Optional parameter: Filter for charge's status.
+ /// Optional parameter: Filter for charge's payment method.
+ /// Optional parameter: Filter for charge's customer id.
+ /// Optional parameter: Filter for charge's order id.
+ /// Optional parameter: Filter for the beginning of the range for charge's creation.
+ /// Optional parameter: Filter for the end of the range for charge's creation.
/// cancellationToken.
- /// Returns the Models.ListChargeTransactionsResponse response from the API call.
- public async Task GetChargeTransactionsAsync(
- string chargeId,
+ /// Returns the Models.ListChargesResponse response from the API call.
+ public async Task GetChargesAsync(
int? page = null,
int? size = null,
+ string code = null,
+ string status = null,
+ string paymentMethod = null,
+ string customerId = null,
+ string orderId = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/charges/{charge_id}/transactions")
+ .Setup(HttpMethod.Get, "/charges")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("charge_id", chargeId))
.Query(_query => _query.Setup("page", page))
- .Query(_query => _query.Setup("size", size))))
+ .Query(_query => _query.Setup("size", size))
+ .Query(_query => _query.Setup("code", code))
+ .Query(_query => _query.Setup("status", status))
+ .Query(_query => _query.Setup("payment_method", paymentMethod))
+ .Query(_query => _query.Setup("customer_id", customerId))
+ .Query(_query => _query.Setup("order_id", orderId))
+ .Query(_query => _query.Setup("created_since", createdSince.HasValue ? createdSince.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
+ .Query(_query => _query.Setup("created_until", createdUntil.HasValue ? createdUntil.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Updates the card from a charge.
+ /// Captures a charge.
///
/// Required parameter: Charge id.
- /// Required parameter: Request for updating a charge's card.
+ /// Optional parameter: Request for capturing a charge.
/// Optional parameter: Example: .
/// Returns the Models.GetChargeResponse response from the API call.
- public Models.GetChargeResponse UpdateChargeCard(
+ public Models.GetChargeResponse CaptureCharge(
string chargeId,
- Models.UpdateChargeCardRequest request,
+ Models.CreateCaptureChargeRequest request = null,
string idempotencyKey = null)
- => CoreHelper.RunTask(UpdateChargeCardAsync(chargeId, request, idempotencyKey));
+ => CoreHelper.RunTask(CaptureChargeAsync(chargeId, request, idempotencyKey));
///
- /// Updates the card from a charge.
+ /// Captures a charge.
///
/// Required parameter: Charge id.
- /// Required parameter: Request for updating a charge's card.
+ /// Optional parameter: Request for capturing a charge.
/// Optional parameter: Example: .
/// cancellationToken.
/// Returns the Models.GetChargeResponse response from the API call.
- public async Task UpdateChargeCardAsync(
+ public async Task CaptureChargeAsync(
string chargeId,
- Models.UpdateChargeCardRequest request,
+ Models.CreateCaptureChargeRequest request = null,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
=> await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(new HttpMethod("PATCH"), "/charges/{charge_id}/card")
+ .Setup(HttpMethod.Post, "/charges/{charge_id}/capture")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(request))
@@ -239,65 +279,34 @@ public Models.GetChargeResponse UpdateChargeCard(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Creates a new charge.
- ///
- /// Required parameter: Request for creating a charge.
- /// Optional parameter: Example: .
- /// Returns the Models.GetChargeResponse response from the API call.
- public Models.GetChargeResponse CreateCharge(
- Models.CreateChargeRequest request,
- string idempotencyKey = null)
- => CoreHelper.RunTask(CreateChargeAsync(request, idempotencyKey));
-
- ///
- /// Creates a new charge.
- ///
- /// Required parameter: Request for creating a charge.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetChargeResponse response from the API call.
- public async Task CreateChargeAsync(
- Models.CreateChargeRequest request,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Post, "/Charges")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Body(_bodyParameter => _bodyParameter.Setup(request))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
- ///
- /// Updates a charge's payment method.
+ /// Updates the card from a charge.
///
/// Required parameter: Charge id.
- /// Required parameter: Request for updating the payment method from a charge.
+ /// Required parameter: Request for updating a charge's card.
/// Optional parameter: Example: .
/// Returns the Models.GetChargeResponse response from the API call.
- public Models.GetChargeResponse UpdateChargePaymentMethod(
+ public Models.GetChargeResponse UpdateChargeCard(
string chargeId,
- Models.UpdateChargePaymentMethodRequest request,
+ Models.UpdateChargeCardRequest request,
string idempotencyKey = null)
- => CoreHelper.RunTask(UpdateChargePaymentMethodAsync(chargeId, request, idempotencyKey));
+ => CoreHelper.RunTask(UpdateChargeCardAsync(chargeId, request, idempotencyKey));
///
- /// Updates a charge's payment method.
+ /// Updates the card from a charge.
///
/// Required parameter: Charge id.
- /// Required parameter: Request for updating the payment method from a charge.
+ /// Required parameter: Request for updating a charge's card.
/// Optional parameter: Example: .
/// cancellationToken.
/// Returns the Models.GetChargeResponse response from the API call.
- public async Task UpdateChargePaymentMethodAsync(
+ public async Task UpdateChargeCardAsync(
string chargeId,
- Models.UpdateChargePaymentMethodRequest request,
+ Models.UpdateChargeCardRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
=> await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(new HttpMethod("PATCH"), "/charges/{charge_id}/payment-method")
+ .Setup(new HttpMethod("PATCH"), "/charges/{charge_id}/card")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(request))
@@ -306,39 +315,29 @@ public Models.GetChargeResponse UpdateChargePaymentMethod(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Updates the due date from a charge.
+ /// Get a charge from its id.
///
- /// Required parameter: Charge Id.
- /// Required parameter: Request for updating the due date.
- /// Optional parameter: Example: .
+ /// Required parameter: Charge id.
/// Returns the Models.GetChargeResponse response from the API call.
- public Models.GetChargeResponse UpdateChargeDueDate(
- string chargeId,
- Models.UpdateChargeDueDateRequest request,
- string idempotencyKey = null)
- => CoreHelper.RunTask(UpdateChargeDueDateAsync(chargeId, request, idempotencyKey));
+ public Models.GetChargeResponse GetCharge(
+ string chargeId)
+ => CoreHelper.RunTask(GetChargeAsync(chargeId));
///
- /// Updates the due date from a charge.
+ /// Get a charge from its id.
///
- /// Required parameter: Charge Id.
- /// Required parameter: Request for updating the due date.
- /// Optional parameter: Example: .
+ /// Required parameter: Charge id.
/// cancellationToken.
/// Returns the Models.GetChargeResponse response from the API call.
- public async Task UpdateChargeDueDateAsync(
+ public async Task GetChargeAsync(
string chargeId,
- Models.UpdateChargeDueDateRequest request,
- string idempotencyKey = null,
CancellationToken cancellationToken = default)
=> await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(new HttpMethod("PATCH"), "/Charges/{charge_id}/due-date")
+ .Setup(HttpMethod.Get, "/charges/{charge_id}")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Body(_bodyParameter => _bodyParameter.Setup(request))
- .Template(_template => _template.Setup("charge_id", chargeId))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .Template(_template => _template.Setup("charge_id", chargeId))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
@@ -408,72 +407,6 @@ public Models.GetChargeResponse RetryCharge(
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
- ///
- /// Lists all charges.
- ///
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// Optional parameter: Filter for charge's code.
- /// Optional parameter: Filter for charge's status.
- /// Optional parameter: Filter for charge's payment method.
- /// Optional parameter: Filter for charge's customer id.
- /// Optional parameter: Filter for charge's order id.
- /// Optional parameter: Filter for the beginning of the range for charge's creation.
- /// Optional parameter: Filter for the end of the range for charge's creation.
- /// Returns the Models.ListChargesResponse response from the API call.
- public Models.ListChargesResponse GetCharges(
- int? page = null,
- int? size = null,
- string code = null,
- string status = null,
- string paymentMethod = null,
- string customerId = null,
- string orderId = null,
- DateTime? createdSince = null,
- DateTime? createdUntil = null)
- => CoreHelper.RunTask(GetChargesAsync(page, size, code, status, paymentMethod, customerId, orderId, createdSince, createdUntil));
-
- ///
- /// Lists all charges.
- ///
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// Optional parameter: Filter for charge's code.
- /// Optional parameter: Filter for charge's status.
- /// Optional parameter: Filter for charge's payment method.
- /// Optional parameter: Filter for charge's customer id.
- /// Optional parameter: Filter for charge's order id.
- /// Optional parameter: Filter for the beginning of the range for charge's creation.
- /// Optional parameter: Filter for the end of the range for charge's creation.
- /// cancellationToken.
- /// Returns the Models.ListChargesResponse response from the API call.
- public async Task GetChargesAsync(
- int? page = null,
- int? size = null,
- string code = null,
- string status = null,
- string paymentMethod = null,
- string customerId = null,
- string orderId = null,
- DateTime? createdSince = null,
- DateTime? createdUntil = null,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/charges")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Query(_query => _query.Setup("page", page))
- .Query(_query => _query.Setup("size", size))
- .Query(_query => _query.Setup("code", code))
- .Query(_query => _query.Setup("status", status))
- .Query(_query => _query.Setup("payment_method", paymentMethod))
- .Query(_query => _query.Setup("customer_id", customerId))
- .Query(_query => _query.Setup("order_id", orderId))
- .Query(_query => _query.Setup("created_since", createdSince.HasValue ? createdSince.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
- .Query(_query => _query.Setup("created_until", createdUntil.HasValue ? createdUntil.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
///
/// Cancel a charge.
///
@@ -509,5 +442,72 @@ public Models.GetChargeResponse CancelCharge(
.Template(_template => _template.Setup("charge_id", chargeId))
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
+ ///
+ /// Creates a new charge.
+ ///
+ /// Required parameter: Request for creating a charge.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetChargeResponse response from the API call.
+ public Models.GetChargeResponse CreateCharge(
+ Models.CreateChargeRequest request,
+ string idempotencyKey = null)
+ => CoreHelper.RunTask(CreateChargeAsync(request, idempotencyKey));
+
+ ///
+ /// Creates a new charge.
+ ///
+ /// Required parameter: Request for creating a charge.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetChargeResponse response from the API call.
+ public async Task CreateChargeAsync(
+ Models.CreateChargeRequest request,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Post, "/Charges")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Body(_bodyParameter => _bodyParameter.Setup(request))
+ .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
+ ///
+ /// ConfirmPayment EndPoint.
+ ///
+ /// Required parameter: Example: .
+ /// Optional parameter: Request for confirm payment.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetChargeResponse response from the API call.
+ public Models.GetChargeResponse ConfirmPayment(
+ string chargeId,
+ Models.CreateConfirmPaymentRequest request = null,
+ string idempotencyKey = null)
+ => CoreHelper.RunTask(ConfirmPaymentAsync(chargeId, request, idempotencyKey));
+
+ ///
+ /// ConfirmPayment EndPoint.
+ ///
+ /// Required parameter: Example: .
+ /// Optional parameter: Request for confirm payment.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetChargeResponse response from the API call.
+ public async Task ConfirmPaymentAsync(
+ string chargeId,
+ Models.CreateConfirmPaymentRequest request = null,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Post, "/charges/{charge_id}/confirm-payment")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Body(_bodyParameter => _bodyParameter.Setup(request))
+ .Template(_template => _template.Setup("charge_id", chargeId))
+ .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
}
}
\ No newline at end of file
diff --git a/PagarmeApiSDK.Standard/Controllers/CustomersController.cs b/PagarmeApiSDK.Standard/Controllers/CustomersController.cs
index 8a78c8b..5326527 100644
--- a/PagarmeApiSDK.Standard/Controllers/CustomersController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/CustomersController.cs
@@ -33,79 +33,84 @@ internal class CustomersController : BaseController, ICustomersController
internal CustomersController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { }
///
- /// Creates a new address for a customer.
+ /// Updates a card.
///
/// Required parameter: Customer Id.
- /// Required parameter: Request for creating an address.
+ /// Required parameter: Card id.
+ /// Required parameter: Request for updating a card.
/// Optional parameter: Example: .
- /// Returns the Models.GetAddressResponse response from the API call.
- public Models.GetAddressResponse CreateAddress(
+ /// Returns the Models.GetCardResponse response from the API call.
+ public Models.GetCardResponse UpdateCard(
string customerId,
- Models.CreateAddressRequest request,
+ string cardId,
+ Models.UpdateCardRequest request,
string idempotencyKey = null)
- => CoreHelper.RunTask(CreateAddressAsync(customerId, request, idempotencyKey));
+ => CoreHelper.RunTask(UpdateCardAsync(customerId, cardId, request, idempotencyKey));
///
- /// Creates a new address for a customer.
+ /// Updates a card.
///
/// Required parameter: Customer Id.
- /// Required parameter: Request for creating an address.
+ /// Required parameter: Card id.
+ /// Required parameter: Request for updating a card.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetAddressResponse response from the API call.
- public async Task CreateAddressAsync(
+ /// Returns the Models.GetCardResponse response from the API call.
+ public async Task UpdateCardAsync(
string customerId,
- Models.CreateAddressRequest request,
+ string cardId,
+ Models.UpdateCardRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Post, "/customers/{customer_id}/addresses")
+ .Setup(HttpMethod.Put, "/customers/{customer_id}/cards/{card_id}")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(request))
.Template(_template => _template.Setup("customer_id", customerId))
+ .Template(_template => _template.Setup("card_id", cardId))
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Updates a card.
+ /// Updates an address.
///
/// Required parameter: Customer Id.
- /// Required parameter: Card id.
- /// Required parameter: Request for updating a card.
+ /// Required parameter: Address Id.
+ /// Required parameter: Request for updating an address.
/// Optional parameter: Example: .
- /// Returns the Models.GetCardResponse response from the API call.
- public Models.GetCardResponse UpdateCard(
+ /// Returns the Models.GetAddressResponse response from the API call.
+ public Models.GetAddressResponse UpdateAddress(
string customerId,
- string cardId,
- Models.UpdateCardRequest request,
+ string addressId,
+ Models.UpdateAddressRequest request,
string idempotencyKey = null)
- => CoreHelper.RunTask(UpdateCardAsync(customerId, cardId, request, idempotencyKey));
+ => CoreHelper.RunTask(UpdateAddressAsync(customerId, addressId, request, idempotencyKey));
///
- /// Updates a card.
+ /// Updates an address.
///
/// Required parameter: Customer Id.
- /// Required parameter: Card id.
- /// Required parameter: Request for updating a card.
+ /// Required parameter: Address Id.
+ /// Required parameter: Request for updating an address.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetCardResponse response from the API call.
- public async Task UpdateCardAsync(
+ /// Returns the Models.GetAddressResponse response from the API call.
+ public async Task UpdateAddressAsync(
string customerId,
- string cardId,
- Models.UpdateCardRequest request,
+ string addressId,
+ Models.UpdateAddressRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Put, "/customers/{customer_id}/cards/{card_id}")
+ .Setup(HttpMethod.Put, "/customers/{customer_id}/addresses/{address_id}")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(request))
.Template(_template => _template.Setup("customer_id", customerId))
- .Template(_template => _template.Setup("card_id", cardId))
+ .Template(_template => _template.Setup("address_id", addressId))
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
@@ -177,70 +182,65 @@ public Models.GetCustomerResponse CreateCustomer(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Delete a Customer's access tokens.
+ /// Creates a new address for a customer.
///
/// Required parameter: Customer Id.
- /// Returns the Models.ListAccessTokensResponse response from the API call.
- public Models.ListAccessTokensResponse DeleteAccessTokens(
- string customerId)
- => CoreHelper.RunTask(DeleteAccessTokensAsync(customerId));
+ /// Required parameter: Request for creating an address.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetAddressResponse response from the API call.
+ public Models.GetAddressResponse CreateAddress(
+ string customerId,
+ Models.CreateAddressRequest request,
+ string idempotencyKey = null)
+ => CoreHelper.RunTask(CreateAddressAsync(customerId, request, idempotencyKey));
///
- /// Delete a Customer's access tokens.
+ /// Creates a new address for a customer.
///
/// Required parameter: Customer Id.
+ /// Required parameter: Request for creating an address.
+ /// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.ListAccessTokensResponse response from the API call.
- public async Task DeleteAccessTokensAsync(
+ /// Returns the Models.GetAddressResponse response from the API call.
+ public async Task CreateAddressAsync(
string customerId,
+ Models.CreateAddressRequest request,
+ string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/customers/{customer_id}/access-tokens/")
+ .Setup(HttpMethod.Post, "/customers/{customer_id}/addresses")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("customer_id", customerId))))
+ .Body(_bodyParameter => _bodyParameter.Setup(request))
+ .Template(_template => _template.Setup("customer_id", customerId))
+ .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Updates an address.
+ /// Delete a Customer's access tokens.
///
/// Required parameter: Customer Id.
- /// Required parameter: Address Id.
- /// Required parameter: Request for updating an address.
- /// Optional parameter: Example: .
- /// Returns the Models.GetAddressResponse response from the API call.
- public Models.GetAddressResponse UpdateAddress(
- string customerId,
- string addressId,
- Models.UpdateAddressRequest request,
- string idempotencyKey = null)
- => CoreHelper.RunTask(UpdateAddressAsync(customerId, addressId, request, idempotencyKey));
+ /// Returns the Models.ListAccessTokensResponse response from the API call.
+ public Models.ListAccessTokensResponse DeleteAccessTokens(
+ string customerId)
+ => CoreHelper.RunTask(DeleteAccessTokensAsync(customerId));
///
- /// Updates an address.
+ /// Delete a Customer's access tokens.
///
/// Required parameter: Customer Id.
- /// Required parameter: Address Id.
- /// Required parameter: Request for updating an address.
- /// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetAddressResponse response from the API call.
- public async Task UpdateAddressAsync(
+ /// Returns the Models.ListAccessTokensResponse response from the API call.
+ public async Task DeleteAccessTokensAsync(
string customerId,
- string addressId,
- Models.UpdateAddressRequest request,
- string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Put, "/customers/{customer_id}/addresses/{address_id}")
+ .Setup(HttpMethod.Get, "/customers/{customer_id}/access-tokens/")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Body(_bodyParameter => _bodyParameter.Setup(request))
- .Template(_template => _template.Setup("customer_id", customerId))
- .Template(_template => _template.Setup("address_id", addressId))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .Template(_template => _template.Setup("customer_id", customerId))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
@@ -310,6 +310,42 @@ public Models.GetAddressResponse DeleteAddress(
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
+ ///
+ /// Creates a new card for a customer.
+ ///
+ /// Required parameter: Customer id.
+ /// Required parameter: Request for creating a card.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetCardResponse response from the API call.
+ public Models.GetCardResponse CreateCard(
+ string customerId,
+ Models.CreateCardRequest request,
+ string idempotencyKey = null)
+ => CoreHelper.RunTask(CreateCardAsync(customerId, request, idempotencyKey));
+
+ ///
+ /// Creates a new card for a customer.
+ ///
+ /// Required parameter: Customer id.
+ /// Required parameter: Request for creating a card.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetCardResponse response from the API call.
+ public async Task CreateCardAsync(
+ string customerId,
+ Models.CreateCardRequest request,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Post, "/customers/{customer_id}/cards")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Body(_bodyParameter => _bodyParameter.Setup(request))
+ .Template(_template => _template.Setup("customer_id", customerId))
+ .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
///
/// Get all Customers.
///
@@ -362,141 +398,182 @@ public Models.ListCustomersResponse GetCustomers(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Get all access tokens from a customer.
+ /// Updates a customer.
///
- /// Required parameter: Customer Id.
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// Returns the Models.ListAccessTokensResponse response from the API call.
- public Models.ListAccessTokensResponse GetAccessTokens(
+ /// Required parameter: Customer id.
+ /// Required parameter: Request for updating a customer.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetCustomerResponse response from the API call.
+ public Models.GetCustomerResponse UpdateCustomer(
string customerId,
- int? page = null,
- int? size = null)
- => CoreHelper.RunTask(GetAccessTokensAsync(customerId, page, size));
+ Models.UpdateCustomerRequest request,
+ string idempotencyKey = null)
+ => CoreHelper.RunTask(UpdateCustomerAsync(customerId, request, idempotencyKey));
///
- /// Get all access tokens from a customer.
+ /// Updates a customer.
///
- /// Required parameter: Customer Id.
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
+ /// Required parameter: Customer id.
+ /// Required parameter: Request for updating a customer.
+ /// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.ListAccessTokensResponse response from the API call.
- public async Task GetAccessTokensAsync(
+ /// Returns the Models.GetCustomerResponse response from the API call.
+ public async Task UpdateCustomerAsync(
string customerId,
- int? page = null,
- int? size = null,
+ Models.UpdateCustomerRequest request,
+ string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/customers/{customer_id}/access-tokens")
+ .Setup(HttpMethod.Put, "/customers/{customer_id}")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
+ .Body(_bodyParameter => _bodyParameter.Setup(request))
.Template(_template => _template.Setup("customer_id", customerId))
- .Query(_query => _query.Setup("page", page))
- .Query(_query => _query.Setup("size", size))))
+ .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Delete a customer's card.
+ /// Creates a access token for a customer.
///
/// Required parameter: Customer Id.
- /// Required parameter: Card Id.
+ /// Required parameter: Request for creating a access token.
/// Optional parameter: Example: .
- /// Returns the Models.GetCardResponse response from the API call.
- public Models.GetCardResponse DeleteCard(
+ /// Returns the Models.GetAccessTokenResponse response from the API call.
+ public Models.GetAccessTokenResponse CreateAccessToken(
string customerId,
- string cardId,
+ Models.CreateAccessTokenRequest request,
string idempotencyKey = null)
- => CoreHelper.RunTask(DeleteCardAsync(customerId, cardId, idempotencyKey));
+ => CoreHelper.RunTask(CreateAccessTokenAsync(customerId, request, idempotencyKey));
///
- /// Delete a customer's card.
+ /// Creates a access token for a customer.
///
/// Required parameter: Customer Id.
- /// Required parameter: Card Id.
+ /// Required parameter: Request for creating a access token.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetCardResponse response from the API call.
- public async Task DeleteCardAsync(
+ /// Returns the Models.GetAccessTokenResponse response from the API call.
+ public async Task CreateAccessTokenAsync(
string customerId,
- string cardId,
+ Models.CreateAccessTokenRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Delete, "/customers/{customer_id}/cards/{card_id}")
+ .Setup(HttpMethod.Post, "/customers/{customer_id}/access-tokens")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
+ .Body(_bodyParameter => _bodyParameter.Setup(request))
.Template(_template => _template.Setup("customer_id", customerId))
- .Template(_template => _template.Setup("card_id", cardId))
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Get a customer's card.
+ /// Get all access tokens from a customer.
///
- /// Required parameter: Customer id.
- /// Required parameter: Card id.
- /// Returns the Models.GetCardResponse response from the API call.
- public Models.GetCardResponse GetCard(
+ /// Required parameter: Customer Id.
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// Returns the Models.ListAccessTokensResponse response from the API call.
+ public Models.ListAccessTokensResponse GetAccessTokens(
string customerId,
- string cardId)
- => CoreHelper.RunTask(GetCardAsync(customerId, cardId));
-
+ int? page = null,
+ int? size = null)
+ => CoreHelper.RunTask(GetAccessTokensAsync(customerId, page, size));
+
///
- /// Get a customer's card.
+ /// Get all access tokens from a customer.
///
- /// Required parameter: Customer id.
- /// Required parameter: Card id.
+ /// Required parameter: Customer Id.
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
/// cancellationToken.
- /// Returns the Models.GetCardResponse response from the API call.
- public async Task GetCardAsync(
+ /// Returns the Models.ListAccessTokensResponse response from the API call.
+ public async Task GetAccessTokensAsync(
string customerId,
- string cardId,
+ int? page = null,
+ int? size = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/customers/{customer_id}/cards/{card_id}")
+ .Setup(HttpMethod.Get, "/customers/{customer_id}/access-tokens")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Template(_template => _template.Setup("customer_id", customerId))
- .Template(_template => _template.Setup("card_id", cardId))))
+ .Query(_query => _query.Setup("page", page))
+ .Query(_query => _query.Setup("size", size))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Creates a new card for a customer.
+ /// Get all cards from a customer.
+ ///
+ /// Required parameter: Customer Id.
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// Returns the Models.ListCardsResponse response from the API call.
+ public Models.ListCardsResponse GetCards(
+ string customerId,
+ int? page = null,
+ int? size = null)
+ => CoreHelper.RunTask(GetCardsAsync(customerId, page, size));
+
+ ///
+ /// Get all cards from a customer.
+ ///
+ /// Required parameter: Customer Id.
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// cancellationToken.
+ /// Returns the Models.ListCardsResponse response from the API call.
+ public async Task GetCardsAsync(
+ string customerId,
+ int? page = null,
+ int? size = null,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Get, "/customers/{customer_id}/cards")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Template(_template => _template.Setup("customer_id", customerId))
+ .Query(_query => _query.Setup("page", page))
+ .Query(_query => _query.Setup("size", size))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
+ ///
+ /// Renew a card.
///
/// Required parameter: Customer id.
- /// Required parameter: Request for creating a card.
+ /// Required parameter: Card Id.
/// Optional parameter: Example: .
/// Returns the Models.GetCardResponse response from the API call.
- public Models.GetCardResponse CreateCard(
+ public Models.GetCardResponse RenewCard(
string customerId,
- Models.CreateCardRequest request,
+ string cardId,
string idempotencyKey = null)
- => CoreHelper.RunTask(CreateCardAsync(customerId, request, idempotencyKey));
+ => CoreHelper.RunTask(RenewCardAsync(customerId, cardId, idempotencyKey));
///
- /// Creates a new card for a customer.
+ /// Renew a card.
///
/// Required parameter: Customer id.
- /// Required parameter: Request for creating a card.
+ /// Required parameter: Card Id.
/// Optional parameter: Example: .
/// cancellationToken.
/// Returns the Models.GetCardResponse response from the API call.
- public async Task CreateCardAsync(
+ public async Task RenewCardAsync(
string customerId,
- Models.CreateCardRequest request,
+ string cardId,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
=> await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Post, "/customers/{customer_id}/cards")
+ .Setup(HttpMethod.Post, "/customers/{customer_id}/cards/{card_id}/renew")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Body(_bodyParameter => _bodyParameter.Setup(request))
.Template(_template => _template.Setup("customer_id", customerId))
+ .Template(_template => _template.Setup("card_id", cardId))
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
@@ -532,70 +609,34 @@ public Models.GetAccessTokenResponse GetAccessToken(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Gets all adressess from a customer.
- ///
- /// Required parameter: Customer id.
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// Returns the Models.ListAddressesResponse response from the API call.
- public Models.ListAddressesResponse GetAddresses(
- string customerId,
- int? page = null,
- int? size = null)
- => CoreHelper.RunTask(GetAddressesAsync(customerId, page, size));
-
- ///
- /// Gets all adressess from a customer.
- ///
- /// Required parameter: Customer id.
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// cancellationToken.
- /// Returns the Models.ListAddressesResponse response from the API call.
- public async Task GetAddressesAsync(
- string customerId,
- int? page = null,
- int? size = null,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/customers/{customer_id}/addresses")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("customer_id", customerId))
- .Query(_query => _query.Setup("page", page))
- .Query(_query => _query.Setup("size", size))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
- ///
- /// Updates a customer.
+ /// Updates the metadata a customer.
///
- /// Required parameter: Customer id.
- /// Required parameter: Request for updating a customer.
+ /// Required parameter: The customer id.
+ /// Required parameter: Request for updating the customer metadata.
/// Optional parameter: Example: .
/// Returns the Models.GetCustomerResponse response from the API call.
- public Models.GetCustomerResponse UpdateCustomer(
+ public Models.GetCustomerResponse UpdateCustomerMetadata(
string customerId,
- Models.UpdateCustomerRequest request,
+ Models.UpdateMetadataRequest request,
string idempotencyKey = null)
- => CoreHelper.RunTask(UpdateCustomerAsync(customerId, request, idempotencyKey));
+ => CoreHelper.RunTask(UpdateCustomerMetadataAsync(customerId, request, idempotencyKey));
///
- /// Updates a customer.
+ /// Updates the metadata a customer.
///
- /// Required parameter: Customer id.
- /// Required parameter: Request for updating a customer.
+ /// Required parameter: The customer id.
+ /// Required parameter: Request for updating the customer metadata.
/// Optional parameter: Example: .
/// cancellationToken.
/// Returns the Models.GetCustomerResponse response from the API call.
- public async Task UpdateCustomerAsync(
+ public async Task UpdateCustomerMetadataAsync(
string customerId,
- Models.UpdateCustomerRequest request,
+ Models.UpdateMetadataRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
=> await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Put, "/customers/{customer_id}")
+ .Setup(new HttpMethod("PATCH"), "/Customers/{customer_id}/metadata")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(request))
@@ -604,70 +645,70 @@ public Models.GetCustomerResponse UpdateCustomer(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Creates a access token for a customer.
+ /// Delete a customer's card.
///
/// Required parameter: Customer Id.
- /// Required parameter: Request for creating a access token.
+ /// Required parameter: Card Id.
/// Optional parameter: Example: .
- /// Returns the Models.GetAccessTokenResponse response from the API call.
- public Models.GetAccessTokenResponse CreateAccessToken(
+ /// Returns the Models.GetCardResponse response from the API call.
+ public Models.GetCardResponse DeleteCard(
string customerId,
- Models.CreateAccessTokenRequest request,
+ string cardId,
string idempotencyKey = null)
- => CoreHelper.RunTask(CreateAccessTokenAsync(customerId, request, idempotencyKey));
+ => CoreHelper.RunTask(DeleteCardAsync(customerId, cardId, idempotencyKey));
///
- /// Creates a access token for a customer.
+ /// Delete a customer's card.
///
/// Required parameter: Customer Id.
- /// Required parameter: Request for creating a access token.
+ /// Required parameter: Card Id.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetAccessTokenResponse response from the API call.
- public async Task CreateAccessTokenAsync(
+ /// Returns the Models.GetCardResponse response from the API call.
+ public async Task DeleteCardAsync(
string customerId,
- Models.CreateAccessTokenRequest request,
+ string cardId,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Post, "/customers/{customer_id}/access-tokens")
+ .Setup(HttpMethod.Delete, "/customers/{customer_id}/cards/{card_id}")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Body(_bodyParameter => _bodyParameter.Setup(request))
.Template(_template => _template.Setup("customer_id", customerId))
+ .Template(_template => _template.Setup("card_id", cardId))
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Get all cards from a customer.
+ /// Gets all adressess from a customer.
///
- /// Required parameter: Customer Id.
+ /// Required parameter: Customer id.
/// Optional parameter: Page number.
/// Optional parameter: Page size.
- /// Returns the Models.ListCardsResponse response from the API call.
- public Models.ListCardsResponse GetCards(
+ /// Returns the Models.ListAddressesResponse response from the API call.
+ public Models.ListAddressesResponse GetAddresses(
string customerId,
int? page = null,
int? size = null)
- => CoreHelper.RunTask(GetCardsAsync(customerId, page, size));
+ => CoreHelper.RunTask(GetAddressesAsync(customerId, page, size));
///
- /// Get all cards from a customer.
+ /// Gets all adressess from a customer.
///
- /// Required parameter: Customer Id.
+ /// Required parameter: Customer id.
/// Optional parameter: Page number.
/// Optional parameter: Page size.
/// cancellationToken.
- /// Returns the Models.ListCardsResponse response from the API call.
- public async Task GetCardsAsync(
+ /// Returns the Models.ListAddressesResponse response from the API call.
+ public async Task GetAddressesAsync(
string customerId,
int? page = null,
int? size = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/customers/{customer_id}/cards")
+ .Setup(HttpMethod.Get, "/customers/{customer_id}/addresses")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Template(_template => _template.Setup("customer_id", customerId))
@@ -676,101 +717,60 @@ public Models.ListCardsResponse GetCards(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Renew a card.
- ///
- /// Required parameter: Customer id.
- /// Required parameter: Card Id.
- /// Optional parameter: Example: .
- /// Returns the Models.GetCardResponse response from the API call.
- public Models.GetCardResponse RenewCard(
- string customerId,
- string cardId,
- string idempotencyKey = null)
- => CoreHelper.RunTask(RenewCardAsync(customerId, cardId, idempotencyKey));
-
- ///
- /// Renew a card.
- ///
- /// Required parameter: Customer id.
- /// Required parameter: Card Id.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetCardResponse response from the API call.
- public async Task RenewCardAsync(
- string customerId,
- string cardId,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Post, "/customers/{customer_id}/cards/{card_id}/renew")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("customer_id", customerId))
- .Template(_template => _template.Setup("card_id", cardId))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
- ///
- /// Updates the metadata a customer.
+ /// Get a customer.
///
- /// Required parameter: The customer id.
- /// Required parameter: Request for updating the customer metadata.
- /// Optional parameter: Example: .
+ /// Required parameter: Customer Id.
/// Returns the Models.GetCustomerResponse response from the API call.
- public Models.GetCustomerResponse UpdateCustomerMetadata(
- string customerId,
- Models.UpdateMetadataRequest request,
- string idempotencyKey = null)
- => CoreHelper.RunTask(UpdateCustomerMetadataAsync(customerId, request, idempotencyKey));
+ public Models.GetCustomerResponse GetCustomer(
+ string customerId)
+ => CoreHelper.RunTask(GetCustomerAsync(customerId));
///
- /// Updates the metadata a customer.
+ /// Get a customer.
///
- /// Required parameter: The customer id.
- /// Required parameter: Request for updating the customer metadata.
- /// Optional parameter: Example: .
+ /// Required parameter: Customer Id.
/// cancellationToken.
/// Returns the Models.GetCustomerResponse response from the API call.
- public async Task UpdateCustomerMetadataAsync(
+ public async Task GetCustomerAsync(
string customerId,
- Models.UpdateMetadataRequest request,
- string idempotencyKey = null,
CancellationToken cancellationToken = default)
=> await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(new HttpMethod("PATCH"), "/Customers/{customer_id}/metadata")
+ .Setup(HttpMethod.Get, "/customers/{customer_id}")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Body(_bodyParameter => _bodyParameter.Setup(request))
- .Template(_template => _template.Setup("customer_id", customerId))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .Template(_template => _template.Setup("customer_id", customerId))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Get a customer.
+ /// Get a customer's card.
///
- /// Required parameter: Customer Id.
- /// Returns the Models.GetCustomerResponse response from the API call.
- public Models.GetCustomerResponse GetCustomer(
- string customerId)
- => CoreHelper.RunTask(GetCustomerAsync(customerId));
+ /// Required parameter: Customer id.
+ /// Required parameter: Card id.
+ /// Returns the Models.GetCardResponse response from the API call.
+ public Models.GetCardResponse GetCard(
+ string customerId,
+ string cardId)
+ => CoreHelper.RunTask(GetCardAsync(customerId, cardId));
///
- /// Get a customer.
+ /// Get a customer's card.
///
- /// Required parameter: Customer Id.
+ /// Required parameter: Customer id.
+ /// Required parameter: Card id.
/// cancellationToken.
- /// Returns the Models.GetCustomerResponse response from the API call.
- public async Task GetCustomerAsync(
+ /// Returns the Models.GetCardResponse response from the API call.
+ public async Task GetCardAsync(
string customerId,
+ string cardId,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/customers/{customer_id}")
+ .Setup(HttpMethod.Get, "/customers/{customer_id}/cards/{card_id}")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("customer_id", customerId))))
+ .Template(_template => _template.Setup("customer_id", customerId))
+ .Template(_template => _template.Setup("card_id", cardId))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
}
}
\ No newline at end of file
diff --git a/PagarmeApiSDK.Standard/Controllers/IBalanceOperationsController.cs b/PagarmeApiSDK.Standard/Controllers/IBalanceOperationsController.cs
index 408c650..c429e9a 100644
--- a/PagarmeApiSDK.Standard/Controllers/IBalanceOperationsController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/IBalanceOperationsController.cs
@@ -22,24 +22,6 @@ namespace PagarmeApiSDK.Standard.Controllers
///
public interface IBalanceOperationsController
{
- ///
- /// GetBalanceOperationById EndPoint.
- ///
- /// Required parameter: Example: .
- /// Returns the Models.GetBalanceOperationResponse response from the API call.
- Models.GetBalanceOperationResponse GetBalanceOperationById(
- long id);
-
- ///
- /// GetBalanceOperationById EndPoint.
- ///
- /// Required parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetBalanceOperationResponse response from the API call.
- Task GetBalanceOperationByIdAsync(
- long id,
- CancellationToken cancellationToken = default);
-
///
/// GetBalanceOperations EndPoint.
///
@@ -69,5 +51,23 @@ Models.ListBalanceOperationResponse GetBalanceOperations(
DateTime? createdUntil = null,
string recipientId = null,
CancellationToken cancellationToken = default);
+
+ ///
+ /// GetBalanceOperationById EndPoint.
+ ///
+ /// Required parameter: Example: .
+ /// Returns the Models.GetBalanceOperationResponse response from the API call.
+ Models.GetBalanceOperationResponse GetBalanceOperationById(
+ long id);
+
+ ///
+ /// GetBalanceOperationById EndPoint.
+ ///
+ /// Required parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetBalanceOperationResponse response from the API call.
+ Task GetBalanceOperationByIdAsync(
+ long id,
+ CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/PagarmeApiSDK.Standard/Controllers/IChargesController.cs b/PagarmeApiSDK.Standard/Controllers/IChargesController.cs
index 71d5dab..360ae21 100644
--- a/PagarmeApiSDK.Standard/Controllers/IChargesController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/IChargesController.cs
@@ -49,199 +49,201 @@ Models.GetChargeResponse UpdateChargeMetadata(
CancellationToken cancellationToken = default);
///
- /// Captures a charge.
+ /// Updates a charge's payment method.
///
/// Required parameter: Charge id.
- /// Optional parameter: Request for capturing a charge.
+ /// Required parameter: Request for updating the payment method from a charge.
/// Optional parameter: Example: .
/// Returns the Models.GetChargeResponse response from the API call.
- Models.GetChargeResponse CaptureCharge(
+ Models.GetChargeResponse UpdateChargePaymentMethod(
string chargeId,
- Models.CreateCaptureChargeRequest request = null,
+ Models.UpdateChargePaymentMethodRequest request,
string idempotencyKey = null);
///
- /// Captures a charge.
+ /// Updates a charge's payment method.
///
/// Required parameter: Charge id.
- /// Optional parameter: Request for capturing a charge.
+ /// Required parameter: Request for updating the payment method from a charge.
/// Optional parameter: Example: .
/// cancellationToken.
/// Returns the Models.GetChargeResponse response from the API call.
- Task CaptureChargeAsync(
+ Task UpdateChargePaymentMethodAsync(
string chargeId,
- Models.CreateCaptureChargeRequest request = null,
+ Models.UpdateChargePaymentMethodRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// Get a charge from its id.
+ /// GetChargeTransactions EndPoint.
///
- /// Required parameter: Charge id.
- /// Returns the Models.GetChargeResponse response from the API call.
- Models.GetChargeResponse GetCharge(
- string chargeId);
+ /// Required parameter: Charge Id.
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// Returns the Models.ListChargeTransactionsResponse response from the API call.
+ Models.ListChargeTransactionsResponse GetChargeTransactions(
+ string chargeId,
+ int? page = null,
+ int? size = null);
///
- /// Get a charge from its id.
+ /// GetChargeTransactions EndPoint.
///
- /// Required parameter: Charge id.
+ /// Required parameter: Charge Id.
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
/// cancellationToken.
- /// Returns the Models.GetChargeResponse response from the API call.
- Task GetChargeAsync(
+ /// Returns the Models.ListChargeTransactionsResponse response from the API call.
+ Task GetChargeTransactionsAsync(
string chargeId,
+ int? page = null,
+ int? size = null,
CancellationToken cancellationToken = default);
///
- /// ConfirmPayment EndPoint.
+ /// Updates the due date from a charge.
///
- /// Required parameter: Example: .
- /// Optional parameter: Request for confirm payment.
+ /// Required parameter: Charge Id.
+ /// Required parameter: Request for updating the due date.
/// Optional parameter: Example: .
/// Returns the Models.GetChargeResponse response from the API call.
- Models.GetChargeResponse ConfirmPayment(
+ Models.GetChargeResponse UpdateChargeDueDate(
string chargeId,
- Models.CreateConfirmPaymentRequest request = null,
+ Models.UpdateChargeDueDateRequest request,
string idempotencyKey = null);
///
- /// ConfirmPayment EndPoint.
+ /// Updates the due date from a charge.
///
- /// Required parameter: Example: .
- /// Optional parameter: Request for confirm payment.
+ /// Required parameter: Charge Id.
+ /// Required parameter: Request for updating the due date.
/// Optional parameter: Example: .
/// cancellationToken.
/// Returns the Models.GetChargeResponse response from the API call.
- Task ConfirmPaymentAsync(
+ Task UpdateChargeDueDateAsync(
string chargeId,
- Models.CreateConfirmPaymentRequest request = null,
+ Models.UpdateChargeDueDateRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// GetChargeTransactions EndPoint.
+ /// Lists all charges.
///
- /// Required parameter: Charge Id.
/// Optional parameter: Page number.
/// Optional parameter: Page size.
- /// Returns the Models.ListChargeTransactionsResponse response from the API call.
- Models.ListChargeTransactionsResponse GetChargeTransactions(
- string chargeId,
+ /// Optional parameter: Filter for charge's code.
+ /// Optional parameter: Filter for charge's status.
+ /// Optional parameter: Filter for charge's payment method.
+ /// Optional parameter: Filter for charge's customer id.
+ /// Optional parameter: Filter for charge's order id.
+ /// Optional parameter: Filter for the beginning of the range for charge's creation.
+ /// Optional parameter: Filter for the end of the range for charge's creation.
+ /// Returns the Models.ListChargesResponse response from the API call.
+ Models.ListChargesResponse GetCharges(
int? page = null,
- int? size = null);
+ int? size = null,
+ string code = null,
+ string status = null,
+ string paymentMethod = null,
+ string customerId = null,
+ string orderId = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null);
///
- /// GetChargeTransactions EndPoint.
+ /// Lists all charges.
///
- /// Required parameter: Charge Id.
/// Optional parameter: Page number.
/// Optional parameter: Page size.
+ /// Optional parameter: Filter for charge's code.
+ /// Optional parameter: Filter for charge's status.
+ /// Optional parameter: Filter for charge's payment method.
+ /// Optional parameter: Filter for charge's customer id.
+ /// Optional parameter: Filter for charge's order id.
+ /// Optional parameter: Filter for the beginning of the range for charge's creation.
+ /// Optional parameter: Filter for the end of the range for charge's creation.
/// cancellationToken.
- /// Returns the Models.ListChargeTransactionsResponse response from the API call.
- Task GetChargeTransactionsAsync(
- string chargeId,
+ /// Returns the Models.ListChargesResponse response from the API call.
+ Task GetChargesAsync(
int? page = null,
int? size = null,
+ string code = null,
+ string status = null,
+ string paymentMethod = null,
+ string customerId = null,
+ string orderId = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null,
CancellationToken cancellationToken = default);
///
- /// Updates the card from a charge.
+ /// Captures a charge.
///
/// Required parameter: Charge id.
- /// Required parameter: Request for updating a charge's card.
+ /// Optional parameter: Request for capturing a charge.
/// Optional parameter: Example: .
/// Returns the Models.GetChargeResponse response from the API call.
- Models.GetChargeResponse UpdateChargeCard(
+ Models.GetChargeResponse CaptureCharge(
string chargeId,
- Models.UpdateChargeCardRequest request,
+ Models.CreateCaptureChargeRequest request = null,
string idempotencyKey = null);
///
- /// Updates the card from a charge.
+ /// Captures a charge.
///
/// Required parameter: Charge id.
- /// Required parameter: Request for updating a charge's card.
+ /// Optional parameter: Request for capturing a charge.
/// Optional parameter: Example: .
/// cancellationToken.
/// Returns the Models.GetChargeResponse response from the API call.
- Task UpdateChargeCardAsync(
+ Task CaptureChargeAsync(
string chargeId,
- Models.UpdateChargeCardRequest request,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default);
-
- ///
- /// Creates a new charge.
- ///
- /// Required parameter: Request for creating a charge.
- /// Optional parameter: Example: .
- /// Returns the Models.GetChargeResponse response from the API call.
- Models.GetChargeResponse CreateCharge(
- Models.CreateChargeRequest request,
- string idempotencyKey = null);
-
- ///
- /// Creates a new charge.
- ///
- /// Required parameter: Request for creating a charge.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetChargeResponse response from the API call.
- Task CreateChargeAsync(
- Models.CreateChargeRequest request,
+ Models.CreateCaptureChargeRequest request = null,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// Updates a charge's payment method.
+ /// Updates the card from a charge.
///
/// Required parameter: Charge id.
- /// Required parameter: Request for updating the payment method from a charge.
+ /// Required parameter: Request for updating a charge's card.
/// Optional parameter: Example: .
/// Returns the Models.GetChargeResponse response from the API call.
- Models.GetChargeResponse UpdateChargePaymentMethod(
+ Models.GetChargeResponse UpdateChargeCard(
string chargeId,
- Models.UpdateChargePaymentMethodRequest request,
+ Models.UpdateChargeCardRequest request,
string idempotencyKey = null);
///
- /// Updates a charge's payment method.
+ /// Updates the card from a charge.
///
/// Required parameter: Charge id.
- /// Required parameter: Request for updating the payment method from a charge.
+ /// Required parameter: Request for updating a charge's card.
/// Optional parameter: Example: .
/// cancellationToken.
/// Returns the Models.GetChargeResponse response from the API call.
- Task UpdateChargePaymentMethodAsync(
+ Task UpdateChargeCardAsync(
string chargeId,
- Models.UpdateChargePaymentMethodRequest request,
+ Models.UpdateChargeCardRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// Updates the due date from a charge.
+ /// Get a charge from its id.
///
- /// Required parameter: Charge Id.
- /// Required parameter: Request for updating the due date.
- /// Optional parameter: Example: .
+ /// Required parameter: Charge id.
/// Returns the Models.GetChargeResponse response from the API call.
- Models.GetChargeResponse UpdateChargeDueDate(
- string chargeId,
- Models.UpdateChargeDueDateRequest request,
- string idempotencyKey = null);
+ Models.GetChargeResponse GetCharge(
+ string chargeId);
///
- /// Updates the due date from a charge.
+ /// Get a charge from its id.
///
- /// Required parameter: Charge Id.
- /// Required parameter: Request for updating the due date.
- /// Optional parameter: Example: .
+ /// Required parameter: Charge id.
/// cancellationToken.
/// Returns the Models.GetChargeResponse response from the API call.
- Task UpdateChargeDueDateAsync(
+ Task GetChargeAsync(
string chargeId,
- Models.UpdateChargeDueDateRequest request,
- string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
@@ -292,56 +294,6 @@ Models.GetChargeResponse RetryCharge(
string idempotencyKey = null,
CancellationToken cancellationToken = default);
- ///
- /// Lists all charges.
- ///
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// Optional parameter: Filter for charge's code.
- /// Optional parameter: Filter for charge's status.
- /// Optional parameter: Filter for charge's payment method.
- /// Optional parameter: Filter for charge's customer id.
- /// Optional parameter: Filter for charge's order id.
- /// Optional parameter: Filter for the beginning of the range for charge's creation.
- /// Optional parameter: Filter for the end of the range for charge's creation.
- /// Returns the Models.ListChargesResponse response from the API call.
- Models.ListChargesResponse GetCharges(
- int? page = null,
- int? size = null,
- string code = null,
- string status = null,
- string paymentMethod = null,
- string customerId = null,
- string orderId = null,
- DateTime? createdSince = null,
- DateTime? createdUntil = null);
-
- ///
- /// Lists all charges.
- ///
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// Optional parameter: Filter for charge's code.
- /// Optional parameter: Filter for charge's status.
- /// Optional parameter: Filter for charge's payment method.
- /// Optional parameter: Filter for charge's customer id.
- /// Optional parameter: Filter for charge's order id.
- /// Optional parameter: Filter for the beginning of the range for charge's creation.
- /// Optional parameter: Filter for the end of the range for charge's creation.
- /// cancellationToken.
- /// Returns the Models.ListChargesResponse response from the API call.
- Task GetChargesAsync(
- int? page = null,
- int? size = null,
- string code = null,
- string status = null,
- string paymentMethod = null,
- string customerId = null,
- string orderId = null,
- DateTime? createdSince = null,
- DateTime? createdUntil = null,
- CancellationToken cancellationToken = default);
-
///
/// Cancel a charge.
///
@@ -367,5 +319,53 @@ Models.GetChargeResponse CancelCharge(
Models.CreateCancelChargeRequest request = null,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
+
+ ///
+ /// Creates a new charge.
+ ///
+ /// Required parameter: Request for creating a charge.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetChargeResponse response from the API call.
+ Models.GetChargeResponse CreateCharge(
+ Models.CreateChargeRequest request,
+ string idempotencyKey = null);
+
+ ///
+ /// Creates a new charge.
+ ///
+ /// Required parameter: Request for creating a charge.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetChargeResponse response from the API call.
+ Task CreateChargeAsync(
+ Models.CreateChargeRequest request,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
+ ///
+ /// ConfirmPayment EndPoint.
+ ///
+ /// Required parameter: Example: .
+ /// Optional parameter: Request for confirm payment.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetChargeResponse response from the API call.
+ Models.GetChargeResponse ConfirmPayment(
+ string chargeId,
+ Models.CreateConfirmPaymentRequest request = null,
+ string idempotencyKey = null);
+
+ ///
+ /// ConfirmPayment EndPoint.
+ ///
+ /// Required parameter: Example: .
+ /// Optional parameter: Request for confirm payment.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetChargeResponse response from the API call.
+ Task ConfirmPaymentAsync(
+ string chargeId,
+ Models.CreateConfirmPaymentRequest request = null,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/PagarmeApiSDK.Standard/Controllers/ICustomersController.cs b/PagarmeApiSDK.Standard/Controllers/ICustomersController.cs
index e20ed74..63021cc 100644
--- a/PagarmeApiSDK.Standard/Controllers/ICustomersController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/ICustomersController.cs
@@ -23,58 +23,62 @@ namespace PagarmeApiSDK.Standard.Controllers
public interface ICustomersController
{
///
- /// Creates a new address for a customer.
+ /// Updates a card.
///
/// Required parameter: Customer Id.
- /// Required parameter: Request for creating an address.
+ /// Required parameter: Card id.
+ /// Required parameter: Request for updating a card.
/// Optional parameter: Example: .
- /// Returns the Models.GetAddressResponse response from the API call.
- Models.GetAddressResponse CreateAddress(
+ /// Returns the Models.GetCardResponse response from the API call.
+ Models.GetCardResponse UpdateCard(
string customerId,
- Models.CreateAddressRequest request,
+ string cardId,
+ Models.UpdateCardRequest request,
string idempotencyKey = null);
///
- /// Creates a new address for a customer.
+ /// Updates a card.
///
/// Required parameter: Customer Id.
- /// Required parameter: Request for creating an address.
+ /// Required parameter: Card id.
+ /// Required parameter: Request for updating a card.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetAddressResponse response from the API call.
- Task CreateAddressAsync(
+ /// Returns the Models.GetCardResponse response from the API call.
+ Task UpdateCardAsync(
string customerId,
- Models.CreateAddressRequest request,
+ string cardId,
+ Models.UpdateCardRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// Updates a card.
+ /// Updates an address.
///
/// Required parameter: Customer Id.
- /// Required parameter: Card id.
- /// Required parameter: Request for updating a card.
+ /// Required parameter: Address Id.
+ /// Required parameter: Request for updating an address.
/// Optional parameter: Example: .
- /// Returns the Models.GetCardResponse response from the API call.
- Models.GetCardResponse UpdateCard(
+ /// Returns the Models.GetAddressResponse response from the API call.
+ Models.GetAddressResponse UpdateAddress(
string customerId,
- string cardId,
- Models.UpdateCardRequest request,
+ string addressId,
+ Models.UpdateAddressRequest request,
string idempotencyKey = null);
///
- /// Updates a card.
+ /// Updates an address.
///
/// Required parameter: Customer Id.
- /// Required parameter: Card id.
- /// Required parameter: Request for updating a card.
+ /// Required parameter: Address Id.
+ /// Required parameter: Request for updating an address.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetCardResponse response from the API call.
- Task UpdateCardAsync(
+ /// Returns the Models.GetAddressResponse response from the API call.
+ Task UpdateAddressAsync(
string customerId,
- string cardId,
- Models.UpdateCardRequest request,
+ string addressId,
+ Models.UpdateAddressRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
@@ -127,51 +131,47 @@ Models.GetCustomerResponse CreateCustomer(
CancellationToken cancellationToken = default);
///
- /// Delete a Customer's access tokens.
+ /// Creates a new address for a customer.
///
/// Required parameter: Customer Id.
- /// Returns the Models.ListAccessTokensResponse response from the API call.
- Models.ListAccessTokensResponse DeleteAccessTokens(
- string customerId);
+ /// Required parameter: Request for creating an address.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetAddressResponse response from the API call.
+ Models.GetAddressResponse CreateAddress(
+ string customerId,
+ Models.CreateAddressRequest request,
+ string idempotencyKey = null);
///
- /// Delete a Customer's access tokens.
+ /// Creates a new address for a customer.
///
/// Required parameter: Customer Id.
+ /// Required parameter: Request for creating an address.
+ /// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.ListAccessTokensResponse response from the API call.
- Task DeleteAccessTokensAsync(
+ /// Returns the Models.GetAddressResponse response from the API call.
+ Task CreateAddressAsync(
string customerId,
+ Models.CreateAddressRequest request,
+ string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// Updates an address.
+ /// Delete a Customer's access tokens.
///
/// Required parameter: Customer Id.
- /// Required parameter: Address Id.
- /// Required parameter: Request for updating an address.
- /// Optional parameter: Example: .
- /// Returns the Models.GetAddressResponse response from the API call.
- Models.GetAddressResponse UpdateAddress(
- string customerId,
- string addressId,
- Models.UpdateAddressRequest request,
- string idempotencyKey = null);
+ /// Returns the Models.ListAccessTokensResponse response from the API call.
+ Models.ListAccessTokensResponse DeleteAccessTokens(
+ string customerId);
///
- /// Updates an address.
+ /// Delete a Customer's access tokens.
///
/// Required parameter: Customer Id.
- /// Required parameter: Address Id.
- /// Required parameter: Request for updating an address.
- /// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetAddressResponse response from the API call.
- Task UpdateAddressAsync(
+ /// Returns the Models.ListAccessTokensResponse response from the API call.
+ Task DeleteAccessTokensAsync(
string customerId,
- string addressId,
- Models.UpdateAddressRequest request,
- string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
@@ -222,6 +222,32 @@ Models.GetAddressResponse DeleteAddress(
string idempotencyKey = null,
CancellationToken cancellationToken = default);
+ ///
+ /// Creates a new card for a customer.
+ ///
+ /// Required parameter: Customer id.
+ /// Required parameter: Request for creating a card.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetCardResponse response from the API call.
+ Models.GetCardResponse CreateCard(
+ string customerId,
+ Models.CreateCardRequest request,
+ string idempotencyKey = null);
+
+ ///
+ /// Creates a new card for a customer.
+ ///
+ /// Required parameter: Customer id.
+ /// Required parameter: Request for creating a card.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetCardResponse response from the API call.
+ Task CreateCardAsync(
+ string customerId,
+ Models.CreateCardRequest request,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
///
/// Get all Customers.
///
@@ -260,154 +286,6 @@ Models.ListCustomersResponse GetCustomers(
string code = null,
CancellationToken cancellationToken = default);
- ///
- /// Get all access tokens from a customer.
- ///
- /// Required parameter: Customer Id.
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// Returns the Models.ListAccessTokensResponse response from the API call.
- Models.ListAccessTokensResponse GetAccessTokens(
- string customerId,
- int? page = null,
- int? size = null);
-
- ///
- /// Get all access tokens from a customer.
- ///
- /// Required parameter: Customer Id.
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// cancellationToken.
- /// Returns the Models.ListAccessTokensResponse response from the API call.
- Task GetAccessTokensAsync(
- string customerId,
- int? page = null,
- int? size = null,
- CancellationToken cancellationToken = default);
-
- ///
- /// Delete a customer's card.
- ///
- /// Required parameter: Customer Id.
- /// Required parameter: Card Id.
- /// Optional parameter: Example: .
- /// Returns the Models.GetCardResponse response from the API call.
- Models.GetCardResponse DeleteCard(
- string customerId,
- string cardId,
- string idempotencyKey = null);
-
- ///
- /// Delete a customer's card.
- ///
- /// Required parameter: Customer Id.
- /// Required parameter: Card Id.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetCardResponse response from the API call.
- Task DeleteCardAsync(
- string customerId,
- string cardId,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default);
-
- ///
- /// Get a customer's card.
- ///
- /// Required parameter: Customer id.
- /// Required parameter: Card id.
- /// Returns the Models.GetCardResponse response from the API call.
- Models.GetCardResponse GetCard(
- string customerId,
- string cardId);
-
- ///
- /// Get a customer's card.
- ///
- /// Required parameter: Customer id.
- /// Required parameter: Card id.
- /// cancellationToken.
- /// Returns the Models.GetCardResponse response from the API call.
- Task GetCardAsync(
- string customerId,
- string cardId,
- CancellationToken cancellationToken = default);
-
- ///
- /// Creates a new card for a customer.
- ///
- /// Required parameter: Customer id.
- /// Required parameter: Request for creating a card.
- /// Optional parameter: Example: .
- /// Returns the Models.GetCardResponse response from the API call.
- Models.GetCardResponse CreateCard(
- string customerId,
- Models.CreateCardRequest request,
- string idempotencyKey = null);
-
- ///
- /// Creates a new card for a customer.
- ///
- /// Required parameter: Customer id.
- /// Required parameter: Request for creating a card.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetCardResponse response from the API call.
- Task CreateCardAsync(
- string customerId,
- Models.CreateCardRequest request,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default);
-
- ///
- /// Get a Customer's access token.
- ///
- /// Required parameter: Customer Id.
- /// Required parameter: Token Id.
- /// Returns the Models.GetAccessTokenResponse response from the API call.
- Models.GetAccessTokenResponse GetAccessToken(
- string customerId,
- string tokenId);
-
- ///
- /// Get a Customer's access token.
- ///
- /// Required parameter: Customer Id.
- /// Required parameter: Token Id.
- /// cancellationToken.
- /// Returns the Models.GetAccessTokenResponse response from the API call.
- Task GetAccessTokenAsync(
- string customerId,
- string tokenId,
- CancellationToken cancellationToken = default);
-
- ///
- /// Gets all adressess from a customer.
- ///
- /// Required parameter: Customer id.
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// Returns the Models.ListAddressesResponse response from the API call.
- Models.ListAddressesResponse GetAddresses(
- string customerId,
- int? page = null,
- int? size = null);
-
- ///
- /// Gets all adressess from a customer.
- ///
- /// Required parameter: Customer id.
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// cancellationToken.
- /// Returns the Models.ListAddressesResponse response from the API call.
- Task GetAddressesAsync(
- string customerId,
- int? page = null,
- int? size = null,
- CancellationToken cancellationToken = default);
-
///
/// Updates a customer.
///
@@ -460,6 +338,32 @@ Models.GetAccessTokenResponse CreateAccessToken(
string idempotencyKey = null,
CancellationToken cancellationToken = default);
+ ///
+ /// Get all access tokens from a customer.
+ ///
+ /// Required parameter: Customer Id.
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// Returns the Models.ListAccessTokensResponse response from the API call.
+ Models.ListAccessTokensResponse GetAccessTokens(
+ string customerId,
+ int? page = null,
+ int? size = null);
+
+ ///
+ /// Get all access tokens from a customer.
+ ///
+ /// Required parameter: Customer Id.
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// cancellationToken.
+ /// Returns the Models.ListAccessTokensResponse response from the API call.
+ Task GetAccessTokensAsync(
+ string customerId,
+ int? page = null,
+ int? size = null,
+ CancellationToken cancellationToken = default);
+
///
/// Get all cards from a customer.
///
@@ -512,6 +416,28 @@ Models.GetCardResponse RenewCard(
string idempotencyKey = null,
CancellationToken cancellationToken = default);
+ ///
+ /// Get a Customer's access token.
+ ///
+ /// Required parameter: Customer Id.
+ /// Required parameter: Token Id.
+ /// Returns the Models.GetAccessTokenResponse response from the API call.
+ Models.GetAccessTokenResponse GetAccessToken(
+ string customerId,
+ string tokenId);
+
+ ///
+ /// Get a Customer's access token.
+ ///
+ /// Required parameter: Customer Id.
+ /// Required parameter: Token Id.
+ /// cancellationToken.
+ /// Returns the Models.GetAccessTokenResponse response from the API call.
+ Task GetAccessTokenAsync(
+ string customerId,
+ string tokenId,
+ CancellationToken cancellationToken = default);
+
///
/// Updates the metadata a customer.
///
@@ -538,6 +464,58 @@ Models.GetCustomerResponse UpdateCustomerMetadata(
string idempotencyKey = null,
CancellationToken cancellationToken = default);
+ ///
+ /// Delete a customer's card.
+ ///
+ /// Required parameter: Customer Id.
+ /// Required parameter: Card Id.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetCardResponse response from the API call.
+ Models.GetCardResponse DeleteCard(
+ string customerId,
+ string cardId,
+ string idempotencyKey = null);
+
+ ///
+ /// Delete a customer's card.
+ ///
+ /// Required parameter: Customer Id.
+ /// Required parameter: Card Id.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetCardResponse response from the API call.
+ Task DeleteCardAsync(
+ string customerId,
+ string cardId,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
+ ///
+ /// Gets all adressess from a customer.
+ ///
+ /// Required parameter: Customer id.
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// Returns the Models.ListAddressesResponse response from the API call.
+ Models.ListAddressesResponse GetAddresses(
+ string customerId,
+ int? page = null,
+ int? size = null);
+
+ ///
+ /// Gets all adressess from a customer.
+ ///
+ /// Required parameter: Customer id.
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// cancellationToken.
+ /// Returns the Models.ListAddressesResponse response from the API call.
+ Task GetAddressesAsync(
+ string customerId,
+ int? page = null,
+ int? size = null,
+ CancellationToken cancellationToken = default);
+
///
/// Get a customer.
///
@@ -555,5 +533,27 @@ Models.GetCustomerResponse GetCustomer(
Task GetCustomerAsync(
string customerId,
CancellationToken cancellationToken = default);
+
+ ///
+ /// Get a customer's card.
+ ///
+ /// Required parameter: Customer id.
+ /// Required parameter: Card id.
+ /// Returns the Models.GetCardResponse response from the API call.
+ Models.GetCardResponse GetCard(
+ string customerId,
+ string cardId);
+
+ ///
+ /// Get a customer's card.
+ ///
+ /// Required parameter: Customer id.
+ /// Required parameter: Card id.
+ /// cancellationToken.
+ /// Returns the Models.GetCardResponse response from the API call.
+ Task GetCardAsync(
+ string customerId,
+ string cardId,
+ CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/PagarmeApiSDK.Standard/Controllers/IInvoicesController.cs b/PagarmeApiSDK.Standard/Controllers/IInvoicesController.cs
index dc775f5..1e2a206 100644
--- a/PagarmeApiSDK.Standard/Controllers/IInvoicesController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/IInvoicesController.cs
@@ -22,6 +22,102 @@ namespace PagarmeApiSDK.Standard.Controllers
///
public interface IInvoicesController
{
+ ///
+ /// Updates the metadata from an invoice.
+ ///
+ /// Required parameter: The invoice id.
+ /// Required parameter: Request for updating the invoice metadata.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetInvoiceResponse response from the API call.
+ Models.GetInvoiceResponse UpdateInvoiceMetadata(
+ string invoiceId,
+ Models.UpdateMetadataRequest request,
+ string idempotencyKey = null);
+
+ ///
+ /// Updates the metadata from an invoice.
+ ///
+ /// Required parameter: The invoice id.
+ /// Required parameter: Request for updating the invoice metadata.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetInvoiceResponse response from the API call.
+ Task UpdateInvoiceMetadataAsync(
+ string invoiceId,
+ Models.UpdateMetadataRequest request,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
+ ///
+ /// GetPartialInvoice EndPoint.
+ ///
+ /// Required parameter: Subscription Id.
+ /// Returns the Models.GetInvoiceResponse response from the API call.
+ Models.GetInvoiceResponse GetPartialInvoice(
+ string subscriptionId);
+
+ ///
+ /// GetPartialInvoice EndPoint.
+ ///
+ /// Required parameter: Subscription Id.
+ /// cancellationToken.
+ /// Returns the Models.GetInvoiceResponse response from the API call.
+ Task GetPartialInvoiceAsync(
+ string subscriptionId,
+ CancellationToken cancellationToken = default);
+
+ ///
+ /// Cancels an invoice.
+ ///
+ /// Required parameter: Invoice id.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetInvoiceResponse response from the API call.
+ Models.GetInvoiceResponse CancelInvoice(
+ string invoiceId,
+ string idempotencyKey = null);
+
+ ///
+ /// Cancels an invoice.
+ ///
+ /// Required parameter: Invoice id.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetInvoiceResponse response from the API call.
+ Task CancelInvoiceAsync(
+ string invoiceId,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
+ ///
+ /// Create an Invoice.
+ ///
+ /// Required parameter: Subscription Id.
+ /// Required parameter: Cycle Id.
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetInvoiceResponse response from the API call.
+ Models.GetInvoiceResponse CreateInvoice(
+ string subscriptionId,
+ string cycleId,
+ Models.CreateInvoiceRequest request = null,
+ string idempotencyKey = null);
+
+ ///
+ /// Create an Invoice.
+ ///
+ /// Required parameter: Subscription Id.
+ /// Required parameter: Cycle Id.
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetInvoiceResponse response from the API call.
+ Task CreateInvoiceAsync(
+ string subscriptionId,
+ string cycleId,
+ Models.CreateInvoiceRequest request = null,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
///
/// Gets all invoices.
///
@@ -81,25 +177,21 @@ Models.ListInvoicesResponse GetInvoices(
CancellationToken cancellationToken = default);
///
- /// Cancels an invoice.
+ /// Gets an invoice.
///
- /// Required parameter: Invoice id.
- /// Optional parameter: Example: .
+ /// Required parameter: Invoice Id.
/// Returns the Models.GetInvoiceResponse response from the API call.
- Models.GetInvoiceResponse CancelInvoice(
- string invoiceId,
- string idempotencyKey = null);
+ Models.GetInvoiceResponse GetInvoice(
+ string invoiceId);
///
- /// Cancels an invoice.
+ /// Gets an invoice.
///
- /// Required parameter: Invoice id.
- /// Optional parameter: Example: .
+ /// Required parameter: Invoice Id.
/// cancellationToken.
/// Returns the Models.GetInvoiceResponse response from the API call.
- Task CancelInvoiceAsync(
+ Task GetInvoiceAsync(
string invoiceId,
- string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
@@ -127,97 +219,5 @@ Models.GetInvoiceResponse UpdateInvoiceStatus(
Models.UpdateInvoiceStatusRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
-
- ///
- /// Updates the metadata from an invoice.
- ///
- /// Required parameter: The invoice id.
- /// Required parameter: Request for updating the invoice metadata.
- /// Optional parameter: Example: .
- /// Returns the Models.GetInvoiceResponse response from the API call.
- Models.GetInvoiceResponse UpdateInvoiceMetadata(
- string invoiceId,
- Models.UpdateMetadataRequest request,
- string idempotencyKey = null);
-
- ///
- /// Updates the metadata from an invoice.
- ///
- /// Required parameter: The invoice id.
- /// Required parameter: Request for updating the invoice metadata.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetInvoiceResponse response from the API call.
- Task UpdateInvoiceMetadataAsync(
- string invoiceId,
- Models.UpdateMetadataRequest request,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default);
-
- ///
- /// GetPartialInvoice EndPoint.
- ///
- /// Required parameter: Subscription Id.
- /// Returns the Models.GetInvoiceResponse response from the API call.
- Models.GetInvoiceResponse GetPartialInvoice(
- string subscriptionId);
-
- ///
- /// GetPartialInvoice EndPoint.
- ///
- /// Required parameter: Subscription Id.
- /// cancellationToken.
- /// Returns the Models.GetInvoiceResponse response from the API call.
- Task GetPartialInvoiceAsync(
- string subscriptionId,
- CancellationToken cancellationToken = default);
-
- ///
- /// Create an Invoice.
- ///
- /// Required parameter: Subscription Id.
- /// Required parameter: Cycle Id.
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// Returns the Models.GetInvoiceResponse response from the API call.
- Models.GetInvoiceResponse CreateInvoice(
- string subscriptionId,
- string cycleId,
- Models.CreateInvoiceRequest request = null,
- string idempotencyKey = null);
-
- ///
- /// Create an Invoice.
- ///
- /// Required parameter: Subscription Id.
- /// Required parameter: Cycle Id.
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetInvoiceResponse response from the API call.
- Task CreateInvoiceAsync(
- string subscriptionId,
- string cycleId,
- Models.CreateInvoiceRequest request = null,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default);
-
- ///
- /// Gets an invoice.
- ///
- /// Required parameter: Invoice Id.
- /// Returns the Models.GetInvoiceResponse response from the API call.
- Models.GetInvoiceResponse GetInvoice(
- string invoiceId);
-
- ///
- /// Gets an invoice.
- ///
- /// Required parameter: Invoice Id.
- /// cancellationToken.
- /// Returns the Models.GetInvoiceResponse response from the API call.
- Task GetInvoiceAsync(
- string invoiceId,
- CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/PagarmeApiSDK.Standard/Controllers/IOrdersController.cs b/PagarmeApiSDK.Standard/Controllers/IOrdersController.cs
index 9bae0fc..bd8b2ec 100644
--- a/PagarmeApiSDK.Standard/Controllers/IOrdersController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/IOrdersController.cs
@@ -22,120 +22,6 @@ namespace PagarmeApiSDK.Standard.Controllers
///
public interface IOrdersController
{
- ///
- /// DeleteAllOrderItems EndPoint.
- ///
- /// Required parameter: Order Id.
- /// Optional parameter: Example: .
- /// Returns the Models.GetOrderResponse response from the API call.
- Models.GetOrderResponse DeleteAllOrderItems(
- string orderId,
- string idempotencyKey = null);
-
- ///
- /// DeleteAllOrderItems EndPoint.
- ///
- /// Required parameter: Order Id.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetOrderResponse response from the API call.
- Task DeleteAllOrderItemsAsync(
- string orderId,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default);
-
- ///
- /// GetOrderItem EndPoint.
- ///
- /// Required parameter: Order Id.
- /// Required parameter: Item Id.
- /// Returns the Models.GetOrderItemResponse response from the API call.
- Models.GetOrderItemResponse GetOrderItem(
- string orderId,
- string itemId);
-
- ///
- /// GetOrderItem EndPoint.
- ///
- /// Required parameter: Order Id.
- /// Required parameter: Item Id.
- /// cancellationToken.
- /// Returns the Models.GetOrderItemResponse response from the API call.
- Task GetOrderItemAsync(
- string orderId,
- string itemId,
- CancellationToken cancellationToken = default);
-
- ///
- /// Updates the metadata from an order.
- ///
- /// Required parameter: The order id.
- /// Required parameter: Request for updating the order metadata.
- /// Optional parameter: Example: .
- /// Returns the Models.GetOrderResponse response from the API call.
- Models.GetOrderResponse UpdateOrderMetadata(
- string orderId,
- Models.UpdateMetadataRequest request,
- string idempotencyKey = null);
-
- ///
- /// Updates the metadata from an order.
- ///
- /// Required parameter: The order id.
- /// Required parameter: Request for updating the order metadata.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetOrderResponse response from the API call.
- Task UpdateOrderMetadataAsync(
- string orderId,
- Models.UpdateMetadataRequest request,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default);
-
- ///
- /// DeleteOrderItem EndPoint.
- ///
- /// Required parameter: Order Id.
- /// Required parameter: Item Id.
- /// Optional parameter: Example: .
- /// Returns the Models.GetOrderItemResponse response from the API call.
- Models.GetOrderItemResponse DeleteOrderItem(
- string orderId,
- string itemId,
- string idempotencyKey = null);
-
- ///
- /// DeleteOrderItem EndPoint.
- ///
- /// Required parameter: Order Id.
- /// Required parameter: Item Id.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetOrderItemResponse response from the API call.
- Task DeleteOrderItemAsync(
- string orderId,
- string itemId,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default);
-
- ///
- /// Gets an order.
- ///
- /// Required parameter: Order id.
- /// Returns the Models.GetOrderResponse response from the API call.
- Models.GetOrderResponse GetOrder(
- string orderId);
-
- ///
- /// Gets an order.
- ///
- /// Required parameter: Order id.
- /// cancellationToken.
- /// Returns the Models.GetOrderResponse response from the API call.
- Task GetOrderAsync(
- string orderId,
- CancellationToken cancellationToken = default);
-
///
/// Gets all orders.
///
@@ -208,6 +94,54 @@ Models.GetOrderItemResponse UpdateOrderItem(
string idempotencyKey = null,
CancellationToken cancellationToken = default);
+ ///
+ /// DeleteAllOrderItems EndPoint.
+ ///
+ /// Required parameter: Order Id.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetOrderResponse response from the API call.
+ Models.GetOrderResponse DeleteAllOrderItems(
+ string orderId,
+ string idempotencyKey = null);
+
+ ///
+ /// DeleteAllOrderItems EndPoint.
+ ///
+ /// Required parameter: Order Id.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetOrderResponse response from the API call.
+ Task DeleteAllOrderItemsAsync(
+ string orderId,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
+ ///
+ /// DeleteOrderItem EndPoint.
+ ///
+ /// Required parameter: Order Id.
+ /// Required parameter: Item Id.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetOrderItemResponse response from the API call.
+ Models.GetOrderItemResponse DeleteOrderItem(
+ string orderId,
+ string itemId,
+ string idempotencyKey = null);
+
+ ///
+ /// DeleteOrderItem EndPoint.
+ ///
+ /// Required parameter: Order Id.
+ /// Required parameter: Item Id.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetOrderItemResponse response from the API call.
+ Task DeleteOrderItemAsync(
+ string orderId,
+ string itemId,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
///
/// CloseOrder EndPoint.
///
@@ -281,5 +215,71 @@ Models.GetOrderItemResponse CreateOrderItem(
Models.CreateOrderItemRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
+
+ ///
+ /// GetOrderItem EndPoint.
+ ///
+ /// Required parameter: Order Id.
+ /// Required parameter: Item Id.
+ /// Returns the Models.GetOrderItemResponse response from the API call.
+ Models.GetOrderItemResponse GetOrderItem(
+ string orderId,
+ string itemId);
+
+ ///
+ /// GetOrderItem EndPoint.
+ ///
+ /// Required parameter: Order Id.
+ /// Required parameter: Item Id.
+ /// cancellationToken.
+ /// Returns the Models.GetOrderItemResponse response from the API call.
+ Task GetOrderItemAsync(
+ string orderId,
+ string itemId,
+ CancellationToken cancellationToken = default);
+
+ ///
+ /// Updates the metadata from an order.
+ ///
+ /// Required parameter: The order id.
+ /// Required parameter: Request for updating the order metadata.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetOrderResponse response from the API call.
+ Models.GetOrderResponse UpdateOrderMetadata(
+ string orderId,
+ Models.UpdateMetadataRequest request,
+ string idempotencyKey = null);
+
+ ///
+ /// Updates the metadata from an order.
+ ///
+ /// Required parameter: The order id.
+ /// Required parameter: Request for updating the order metadata.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetOrderResponse response from the API call.
+ Task UpdateOrderMetadataAsync(
+ string orderId,
+ Models.UpdateMetadataRequest request,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
+ ///
+ /// Gets an order.
+ ///
+ /// Required parameter: Order id.
+ /// Returns the Models.GetOrderResponse response from the API call.
+ Models.GetOrderResponse GetOrder(
+ string orderId);
+
+ ///
+ /// Gets an order.
+ ///
+ /// Required parameter: Order id.
+ /// cancellationToken.
+ /// Returns the Models.GetOrderResponse response from the API call.
+ Task GetOrderAsync(
+ string orderId,
+ CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/PagarmeApiSDK.Standard/Controllers/IPlansController.cs b/PagarmeApiSDK.Standard/Controllers/IPlansController.cs
index 4c56177..7a5639b 100644
--- a/PagarmeApiSDK.Standard/Controllers/IPlansController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/IPlansController.cs
@@ -41,28 +41,24 @@ Models.GetPlanResponse GetPlan(
CancellationToken cancellationToken = default);
///
- /// Removes an item from a plan.
+ /// Deletes a plan.
///
/// Required parameter: Plan id.
- /// Required parameter: Plan item id.
/// Optional parameter: Example: .
- /// Returns the Models.GetPlanItemResponse response from the API call.
- Models.GetPlanItemResponse DeletePlanItem(
+ /// Returns the Models.GetPlanResponse response from the API call.
+ Models.GetPlanResponse DeletePlan(
string planId,
- string planItemId,
string idempotencyKey = null);
///
- /// Removes an item from a plan.
+ /// Deletes a plan.
///
/// Required parameter: Plan id.
- /// Required parameter: Plan item id.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetPlanItemResponse response from the API call.
- Task DeletePlanItemAsync(
+ /// Returns the Models.GetPlanResponse response from the API call.
+ Task DeletePlanAsync(
string planId,
- string planItemId,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
@@ -93,72 +89,128 @@ Models.GetPlanResponse UpdatePlanMetadata(
CancellationToken cancellationToken = default);
///
- /// Creates a new plan.
+ /// Updates a plan item.
///
- /// Required parameter: Request for creating a plan.
+ /// Required parameter: Plan id.
+ /// Required parameter: Plan item id.
+ /// Required parameter: Request for updating the plan item.
/// Optional parameter: Example: .
- /// Returns the Models.GetPlanResponse response from the API call.
- Models.GetPlanResponse CreatePlan(
- Models.CreatePlanRequest body,
+ /// Returns the Models.GetPlanItemResponse response from the API call.
+ Models.GetPlanItemResponse UpdatePlanItem(
+ string planId,
+ string planItemId,
+ Models.UpdatePlanItemRequest body,
string idempotencyKey = null);
///
- /// Creates a new plan.
+ /// Updates a plan item.
///
- /// Required parameter: Request for creating a plan.
+ /// Required parameter: Plan id.
+ /// Required parameter: Plan item id.
+ /// Required parameter: Request for updating the plan item.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetPlanResponse response from the API call.
- Task CreatePlanAsync(
- Models.CreatePlanRequest body,
+ /// Returns the Models.GetPlanItemResponse response from the API call.
+ Task UpdatePlanItemAsync(
+ string planId,
+ string planItemId,
+ Models.UpdatePlanItemRequest body,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// Updates a plan.
+ /// Adds a new item to a plan.
///
/// Required parameter: Plan id.
- /// Required parameter: Request for updating a plan.
+ /// Required parameter: Request for creating a plan item.
/// Optional parameter: Example: .
- /// Returns the Models.GetPlanResponse response from the API call.
- Models.GetPlanResponse UpdatePlan(
+ /// Returns the Models.GetPlanItemResponse response from the API call.
+ Models.GetPlanItemResponse CreatePlanItem(
string planId,
- Models.UpdatePlanRequest request,
+ Models.CreatePlanItemRequest request,
string idempotencyKey = null);
///
- /// Updates a plan.
+ /// Adds a new item to a plan.
///
/// Required parameter: Plan id.
- /// Required parameter: Request for updating a plan.
+ /// Required parameter: Request for creating a plan item.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetPlanResponse response from the API call.
- Task UpdatePlanAsync(
+ /// Returns the Models.GetPlanItemResponse response from the API call.
+ Task CreatePlanItemAsync(
string planId,
- Models.UpdatePlanRequest request,
+ Models.CreatePlanItemRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// Deletes a plan.
+ /// Gets a plan item.
+ ///
+ /// Required parameter: Plan id.
+ /// Required parameter: Plan item id.
+ /// Returns the Models.GetPlanItemResponse response from the API call.
+ Models.GetPlanItemResponse GetPlanItem(
+ string planId,
+ string planItemId);
+
+ ///
+ /// Gets a plan item.
///
/// Required parameter: Plan id.
+ /// Required parameter: Plan item id.
+ /// cancellationToken.
+ /// Returns the Models.GetPlanItemResponse response from the API call.
+ Task GetPlanItemAsync(
+ string planId,
+ string planItemId,
+ CancellationToken cancellationToken = default);
+
+ ///
+ /// Creates a new plan.
+ ///
+ /// Required parameter: Request for creating a plan.
/// Optional parameter: Example: .
/// Returns the Models.GetPlanResponse response from the API call.
- Models.GetPlanResponse DeletePlan(
+ Models.GetPlanResponse CreatePlan(
+ Models.CreatePlanRequest body,
+ string idempotencyKey = null);
+
+ ///
+ /// Creates a new plan.
+ ///
+ /// Required parameter: Request for creating a plan.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetPlanResponse response from the API call.
+ Task CreatePlanAsync(
+ Models.CreatePlanRequest body,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
+ ///
+ /// Removes an item from a plan.
+ ///
+ /// Required parameter: Plan id.
+ /// Required parameter: Plan item id.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetPlanItemResponse response from the API call.
+ Models.GetPlanItemResponse DeletePlanItem(
string planId,
+ string planItemId,
string idempotencyKey = null);
///
- /// Deletes a plan.
+ /// Removes an item from a plan.
///
/// Required parameter: Plan id.
+ /// Required parameter: Plan item id.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetPlanResponse response from the API call.
- Task DeletePlanAsync(
+ /// Returns the Models.GetPlanItemResponse response from the API call.
+ Task DeletePlanItemAsync(
string planId,
+ string planItemId,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
@@ -205,81 +257,29 @@ Models.ListPlansResponse GetPlans(
CancellationToken cancellationToken = default);
///
- /// Updates a plan item.
- ///
- /// Required parameter: Plan id.
- /// Required parameter: Plan item id.
- /// Required parameter: Request for updating the plan item.
- /// Optional parameter: Example: .
- /// Returns the Models.GetPlanItemResponse response from the API call.
- Models.GetPlanItemResponse UpdatePlanItem(
- string planId,
- string planItemId,
- Models.UpdatePlanItemRequest body,
- string idempotencyKey = null);
-
- ///
- /// Updates a plan item.
- ///
- /// Required parameter: Plan id.
- /// Required parameter: Plan item id.
- /// Required parameter: Request for updating the plan item.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetPlanItemResponse response from the API call.
- Task UpdatePlanItemAsync(
- string planId,
- string planItemId,
- Models.UpdatePlanItemRequest body,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default);
-
- ///
- /// Adds a new item to a plan.
+ /// Updates a plan.
///
/// Required parameter: Plan id.
- /// Required parameter: Request for creating a plan item.
+ /// Required parameter: Request for updating a plan.
/// Optional parameter: Example: .
- /// Returns the Models.GetPlanItemResponse response from the API call.
- Models.GetPlanItemResponse CreatePlanItem(
+ /// Returns the Models.GetPlanResponse response from the API call.
+ Models.GetPlanResponse UpdatePlan(
string planId,
- Models.CreatePlanItemRequest request,
+ Models.UpdatePlanRequest request,
string idempotencyKey = null);
///
- /// Adds a new item to a plan.
+ /// Updates a plan.
///
/// Required parameter: Plan id.
- /// Required parameter: Request for creating a plan item.
+ /// Required parameter: Request for updating a plan.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetPlanItemResponse response from the API call.
- Task CreatePlanItemAsync(
+ /// Returns the Models.GetPlanResponse response from the API call.
+ Task UpdatePlanAsync(
string planId,
- Models.CreatePlanItemRequest request,
+ Models.UpdatePlanRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
-
- ///
- /// Gets a plan item.
- ///
- /// Required parameter: Plan id.
- /// Required parameter: Plan item id.
- /// Returns the Models.GetPlanItemResponse response from the API call.
- Models.GetPlanItemResponse GetPlanItem(
- string planId,
- string planItemId);
-
- ///
- /// Gets a plan item.
- ///
- /// Required parameter: Plan id.
- /// Required parameter: Plan item id.
- /// cancellationToken.
- /// Returns the Models.GetPlanItemResponse response from the API call.
- Task GetPlanItemAsync(
- string planId,
- string planItemId,
- CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/PagarmeApiSDK.Standard/Controllers/IRecipientsController.cs b/PagarmeApiSDK.Standard/Controllers/IRecipientsController.cs
index b0efb7a..5de14d1 100644
--- a/PagarmeApiSDK.Standard/Controllers/IRecipientsController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/IRecipientsController.cs
@@ -49,61 +49,55 @@ Models.GetRecipientResponse UpdateRecipient(
CancellationToken cancellationToken = default);
///
- /// GetWithdrawById EndPoint.
- ///
- /// Required parameter: Example: .
- /// Required parameter: Example: .
- /// Returns the Models.GetWithdrawResponse response from the API call.
- Models.GetWithdrawResponse GetWithdrawById(
- string recipientId,
- string withdrawalId);
-
- ///
- /// GetWithdrawById EndPoint.
+ /// Creates an anticipation.
///
- /// Required parameter: Example: .
- /// Required parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetWithdrawResponse response from the API call.
- Task GetWithdrawByIdAsync(
+ /// Required parameter: Recipient id.
+ /// Required parameter: Anticipation data.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetAnticipationResponse response from the API call.
+ Models.GetAnticipationResponse CreateAnticipation(
string recipientId,
- string withdrawalId,
- CancellationToken cancellationToken = default);
-
- ///
- /// Retrieves recipient information.
- ///
- /// Required parameter: Recipiend id.
- /// Returns the Models.GetRecipientResponse response from the API call.
- Models.GetRecipientResponse GetRecipient(
- string recipientId);
+ Models.CreateAnticipationRequest request,
+ string idempotencyKey = null);
///
- /// Retrieves recipient information.
+ /// Creates an anticipation.
///
- /// Required parameter: Recipiend id.
+ /// Required parameter: Recipient id.
+ /// Required parameter: Anticipation data.
+ /// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetRecipientResponse response from the API call.
- Task GetRecipientAsync(
+ /// Returns the Models.GetAnticipationResponse response from the API call.
+ Task CreateAnticipationAsync(
string recipientId,
+ Models.CreateAnticipationRequest request,
+ string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// Get balance information for a recipient.
+ /// Gets the anticipation limits for a recipient.
///
/// Required parameter: Recipient id.
- /// Returns the Models.GetBalanceResponse response from the API call.
- Models.GetBalanceResponse GetBalance(
- string recipientId);
+ /// Required parameter: Timeframe.
+ /// Required parameter: Anticipation payment date.
+ /// Returns the Models.GetAnticipationLimitResponse response from the API call.
+ Models.GetAnticipationLimitResponse GetAnticipationLimits(
+ string recipientId,
+ string timeframe,
+ DateTime paymentDate);
///
- /// Get balance information for a recipient.
+ /// Gets the anticipation limits for a recipient.
///
/// Required parameter: Recipient id.
+ /// Required parameter: Timeframe.
+ /// Required parameter: Anticipation payment date.
/// cancellationToken.
- /// Returns the Models.GetBalanceResponse response from the API call.
- Task GetBalanceAsync(
+ /// Returns the Models.GetAnticipationLimitResponse response from the API call.
+ Task GetAnticipationLimitsAsync(
string recipientId,
+ string timeframe,
+ DateTime paymentDate,
CancellationToken cancellationToken = default);
///
@@ -128,6 +122,28 @@ Models.ListRecipientResponse GetRecipients(
int? size = null,
CancellationToken cancellationToken = default);
+ ///
+ /// GetWithdrawById EndPoint.
+ ///
+ /// Required parameter: Example: .
+ /// Required parameter: Example: .
+ /// Returns the Models.GetWithdrawResponse response from the API call.
+ Models.GetWithdrawResponse GetWithdrawById(
+ string recipientId,
+ string withdrawalId);
+
+ ///
+ /// GetWithdrawById EndPoint.
+ ///
+ /// Required parameter: Example: .
+ /// Required parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetWithdrawResponse response from the API call.
+ Task GetWithdrawByIdAsync(
+ string recipientId,
+ string withdrawalId,
+ CancellationToken cancellationToken = default);
+
///
/// Updates the default bank account from a recipient.
///
@@ -154,6 +170,32 @@ Models.GetRecipientResponse UpdateRecipientDefaultBankAccount(
string idempotencyKey = null,
CancellationToken cancellationToken = default);
+ ///
+ /// Updates recipient metadata.
+ ///
+ /// Required parameter: Recipient id.
+ /// Required parameter: Metadata.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetRecipientResponse response from the API call.
+ Models.GetRecipientResponse UpdateRecipientMetadata(
+ string recipientId,
+ Models.UpdateMetadataRequest request,
+ string idempotencyKey = null);
+
+ ///
+ /// Updates recipient metadata.
+ ///
+ /// Required parameter: Recipient id.
+ /// Required parameter: Metadata.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetRecipientResponse response from the API call.
+ Task UpdateRecipientMetadataAsync(
+ string recipientId,
+ Models.UpdateMetadataRequest request,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
///
/// Gets a paginated list of transfers for the recipient.
///
@@ -236,6 +278,32 @@ Models.GetWithdrawResponse CreateWithdraw(
Models.CreateWithdrawRequest request,
CancellationToken cancellationToken = default);
+ ///
+ /// Updates recipient metadata.
+ ///
+ /// Required parameter: Recipient id.
+ /// Required parameter: Metadata.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetRecipientResponse response from the API call.
+ Models.GetRecipientResponse UpdateAutomaticAnticipationSettings(
+ string recipientId,
+ Models.UpdateAutomaticAnticipationSettingsRequest request,
+ string idempotencyKey = null);
+
+ ///
+ /// Updates recipient metadata.
+ ///
+ /// Required parameter: Recipient id.
+ /// Required parameter: Metadata.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetRecipientResponse response from the API call.
+ Task UpdateAutomaticAnticipationSettingsAsync(
+ string recipientId,
+ Models.UpdateAutomaticAnticipationSettingsRequest request,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
///
/// Gets an anticipation.
///
@@ -284,48 +352,128 @@ Models.GetRecipientResponse UpdateRecipientTransferSettings(
string idempotencyKey = null,
CancellationToken cancellationToken = default);
+ ///
+ /// Retrieves a paginated list of anticipations from a recipient.
+ ///
+ /// Required parameter: Recipient id.
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// Optional parameter: Filter for anticipation status.
+ /// Optional parameter: Filter for anticipation timeframe.
+ /// Optional parameter: Filter for start range for anticipation payment date.
+ /// Optional parameter: Filter for end range for anticipation payment date.
+ /// Optional parameter: Filter for start range for anticipation creation date.
+ /// Optional parameter: Filter for end range for anticipation creation date.
+ /// Returns the Models.ListAnticipationResponse response from the API call.
+ Models.ListAnticipationResponse GetAnticipations(
+ string recipientId,
+ int? page = null,
+ int? size = null,
+ string status = null,
+ string timeframe = null,
+ DateTime? paymentDateSince = null,
+ DateTime? paymentDateUntil = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null);
+
+ ///
+ /// Retrieves a paginated list of anticipations from a recipient.
+ ///
+ /// Required parameter: Recipient id.
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// Optional parameter: Filter for anticipation status.
+ /// Optional parameter: Filter for anticipation timeframe.
+ /// Optional parameter: Filter for start range for anticipation payment date.
+ /// Optional parameter: Filter for end range for anticipation payment date.
+ /// Optional parameter: Filter for start range for anticipation creation date.
+ /// Optional parameter: Filter for end range for anticipation creation date.
+ /// cancellationToken.
+ /// Returns the Models.ListAnticipationResponse response from the API call.
+ Task GetAnticipationsAsync(
+ string recipientId,
+ int? page = null,
+ int? size = null,
+ string status = null,
+ string timeframe = null,
+ DateTime? paymentDateSince = null,
+ DateTime? paymentDateUntil = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null,
+ CancellationToken cancellationToken = default);
+
///
/// Retrieves recipient information.
///
- /// Required parameter: Recipient code.
+ /// Required parameter: Recipiend id.
/// Returns the Models.GetRecipientResponse response from the API call.
- Models.GetRecipientResponse GetRecipientByCode(
- string code);
+ Models.GetRecipientResponse GetRecipient(
+ string recipientId);
///
/// Retrieves recipient information.
///
- /// Required parameter: Recipient code.
+ /// Required parameter: Recipiend id.
/// cancellationToken.
/// Returns the Models.GetRecipientResponse response from the API call.
- Task GetRecipientByCodeAsync(
- string code,
+ Task GetRecipientAsync(
+ string recipientId,
CancellationToken cancellationToken = default);
///
- /// Updates recipient metadata.
+ /// Get balance information for a recipient.
///
/// Required parameter: Recipient id.
- /// Required parameter: Metadata.
- /// Optional parameter: Example: .
- /// Returns the Models.GetRecipientResponse response from the API call.
- Models.GetRecipientResponse UpdateAutomaticAnticipationSettings(
- string recipientId,
- Models.UpdateAutomaticAnticipationSettingsRequest request,
- string idempotencyKey = null);
+ /// Returns the Models.GetBalanceResponse response from the API call.
+ Models.GetBalanceResponse GetBalance(
+ string recipientId);
///
- /// Updates recipient metadata.
+ /// Get balance information for a recipient.
///
/// Required parameter: Recipient id.
- /// Required parameter: Metadata.
- /// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetRecipientResponse response from the API call.
- Task UpdateAutomaticAnticipationSettingsAsync(
+ /// Returns the Models.GetBalanceResponse response from the API call.
+ Task GetBalanceAsync(
string recipientId,
- Models.UpdateAutomaticAnticipationSettingsRequest request,
- string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
+ ///
+ /// Gets a paginated list of transfers for the recipient.
+ ///
+ /// Required parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Returns the Models.ListWithdrawals response from the API call.
+ Models.ListWithdrawals GetWithdrawals(
+ string recipientId,
+ int? page = null,
+ int? size = null,
+ string status = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null);
+
+ ///
+ /// Gets a paginated list of transfers for the recipient.
+ ///
+ /// Required parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.ListWithdrawals response from the API call.
+ Task GetWithdrawalsAsync(
+ string recipientId,
+ int? page = null,
+ int? size = null,
+ string status = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null,
CancellationToken cancellationToken = default);
///
@@ -377,182 +525,52 @@ Models.GetRecipientResponse CreateRecipient(
CancellationToken cancellationToken = default);
///
- /// GetDefaultRecipient EndPoint.
+ /// Retrieves recipient information.
///
+ /// Required parameter: Recipient code.
/// Returns the Models.GetRecipientResponse response from the API call.
- Models.GetRecipientResponse GetDefaultRecipient();
+ Models.GetRecipientResponse GetRecipientByCode(
+ string code);
///
- /// GetDefaultRecipient EndPoint.
+ /// Retrieves recipient information.
///
+ /// Required parameter: Recipient code.
/// cancellationToken.
/// Returns the Models.GetRecipientResponse response from the API call.
- Task GetDefaultRecipientAsync(CancellationToken cancellationToken = default);
-
- ///
- /// Creates an anticipation.
- ///
- /// Required parameter: Recipient id.
- /// Required parameter: Anticipation data.
- /// Optional parameter: Example: .
- /// Returns the Models.GetAnticipationResponse response from the API call.
- Models.GetAnticipationResponse CreateAnticipation(
- string recipientId,
- Models.CreateAnticipationRequest request,
- string idempotencyKey = null);
-
- ///
- /// Creates an anticipation.
- ///
- /// Required parameter: Recipient id.
- /// Required parameter: Anticipation data.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetAnticipationResponse response from the API call.
- Task CreateAnticipationAsync(
- string recipientId,
- Models.CreateAnticipationRequest request,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default);
-
- ///
- /// Gets the anticipation limits for a recipient.
- ///
- /// Required parameter: Recipient id.
- /// Required parameter: Timeframe.
- /// Required parameter: Anticipation payment date.
- /// Returns the Models.GetAnticipationLimitResponse response from the API call.
- Models.GetAnticipationLimitResponse GetAnticipationLimits(
- string recipientId,
- string timeframe,
- DateTime paymentDate);
-
- ///
- /// Gets the anticipation limits for a recipient.
- ///
- /// Required parameter: Recipient id.
- /// Required parameter: Timeframe.
- /// Required parameter: Anticipation payment date.
- /// cancellationToken.
- /// Returns the Models.GetAnticipationLimitResponse response from the API call.
- Task GetAnticipationLimitsAsync(
- string recipientId,
- string timeframe,
- DateTime paymentDate,
+ Task GetRecipientByCodeAsync(
+ string code,
CancellationToken cancellationToken = default);
///
- /// Updates recipient metadata.
+ /// GetDefaultRecipient EndPoint.
///
- /// Required parameter: Recipient id.
- /// Required parameter: Metadata.
- /// Optional parameter: Example: .
/// Returns the Models.GetRecipientResponse response from the API call.
- Models.GetRecipientResponse UpdateRecipientMetadata(
- string recipientId,
- Models.UpdateMetadataRequest request,
- string idempotencyKey = null);
+ Models.GetRecipientResponse GetDefaultRecipient();
///
- /// Updates recipient metadata.
+ /// GetDefaultRecipient EndPoint.
///
- /// Required parameter: Recipient id.
- /// Required parameter: Metadata.
- /// Optional parameter: Example: .
/// cancellationToken.
/// Returns the Models.GetRecipientResponse response from the API call.
- Task UpdateRecipientMetadataAsync(
- string recipientId,
- Models.UpdateMetadataRequest request,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default);
-
- ///
- /// Retrieves a paginated list of anticipations from a recipient.
- ///
- /// Required parameter: Recipient id.
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// Optional parameter: Filter for anticipation status.
- /// Optional parameter: Filter for anticipation timeframe.
- /// Optional parameter: Filter for start range for anticipation payment date.
- /// Optional parameter: Filter for end range for anticipation payment date.
- /// Optional parameter: Filter for start range for anticipation creation date.
- /// Optional parameter: Filter for end range for anticipation creation date.
- /// Returns the Models.ListAnticipationResponse response from the API call.
- Models.ListAnticipationResponse GetAnticipations(
- string recipientId,
- int? page = null,
- int? size = null,
- string status = null,
- string timeframe = null,
- DateTime? paymentDateSince = null,
- DateTime? paymentDateUntil = null,
- DateTime? createdSince = null,
- DateTime? createdUntil = null);
-
- ///
- /// Retrieves a paginated list of anticipations from a recipient.
- ///
- /// Required parameter: Recipient id.
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// Optional parameter: Filter for anticipation status.
- /// Optional parameter: Filter for anticipation timeframe.
- /// Optional parameter: Filter for start range for anticipation payment date.
- /// Optional parameter: Filter for end range for anticipation payment date.
- /// Optional parameter: Filter for start range for anticipation creation date.
- /// Optional parameter: Filter for end range for anticipation creation date.
- /// cancellationToken.
- /// Returns the Models.ListAnticipationResponse response from the API call.
- Task GetAnticipationsAsync(
- string recipientId,
- int? page = null,
- int? size = null,
- string status = null,
- string timeframe = null,
- DateTime? paymentDateSince = null,
- DateTime? paymentDateUntil = null,
- DateTime? createdSince = null,
- DateTime? createdUntil = null,
- CancellationToken cancellationToken = default);
+ Task GetDefaultRecipientAsync(CancellationToken cancellationToken = default);
///
- /// Gets a paginated list of transfers for the recipient.
+ /// Create a KYC link.
///
/// Required parameter: Example: .
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// Returns the Models.ListWithdrawals response from the API call.
- Models.ListWithdrawals GetWithdrawals(
- string recipientId,
- int? page = null,
- int? size = null,
- string status = null,
- DateTime? createdSince = null,
- DateTime? createdUntil = null);
+ /// Returns the Models.CreateKYCLinkResponse response from the API call.
+ Models.CreateKYCLinkResponse CreateKYCLink(
+ string recipientId);
///
- /// Gets a paginated list of transfers for the recipient.
+ /// Create a KYC link.
///
/// Required parameter: Example: .
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.ListWithdrawals response from the API call.
- Task GetWithdrawalsAsync(
+ /// Returns the Models.CreateKYCLinkResponse response from the API call.
+ Task CreateKYCLinkAsync(
string recipientId,
- int? page = null,
- int? size = null,
- string status = null,
- DateTime? createdSince = null,
- DateTime? createdUntil = null,
CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/PagarmeApiSDK.Standard/Controllers/ISubscriptionsController.cs b/PagarmeApiSDK.Standard/Controllers/ISubscriptionsController.cs
index 748c3b2..3435330 100644
--- a/PagarmeApiSDK.Standard/Controllers/ISubscriptionsController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/ISubscriptionsController.cs
@@ -22,6 +22,28 @@ namespace PagarmeApiSDK.Standard.Controllers
///
public interface ISubscriptionsController
{
+ ///
+ /// RenewSubscription EndPoint.
+ ///
+ /// Required parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetPeriodResponse response from the API call.
+ Models.GetPeriodResponse RenewSubscription(
+ string subscriptionId,
+ string idempotencyKey = null);
+
+ ///
+ /// RenewSubscription EndPoint.
+ ///
+ /// Required parameter: Example: .
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetPeriodResponse response from the API call.
+ Task RenewSubscriptionAsync(
+ string subscriptionId,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
///
/// Updates the credit card from a subscription.
///
@@ -48,6 +70,36 @@ Models.GetSubscriptionResponse UpdateSubscriptionCard(
string idempotencyKey = null,
CancellationToken cancellationToken = default);
+ ///
+ /// Deletes a usage.
+ ///
+ /// Required parameter: The subscription id.
+ /// Required parameter: The subscription item id.
+ /// Required parameter: The usage id.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetUsageResponse response from the API call.
+ Models.GetUsageResponse DeleteUsage(
+ string subscriptionId,
+ string itemId,
+ string usageId,
+ string idempotencyKey = null);
+
+ ///
+ /// Deletes a usage.
+ ///
+ /// Required parameter: The subscription id.
+ /// Required parameter: The subscription item id.
+ /// Required parameter: The usage id.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetUsageResponse response from the API call.
+ Task DeleteUsageAsync(
+ string subscriptionId,
+ string itemId,
+ string usageId,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
///
/// Creates a discount.
///
@@ -75,171 +127,130 @@ Models.GetDiscountResponse CreateDiscount(
CancellationToken cancellationToken = default);
///
- /// Updates the billing date from a subscription.
+ /// Create Usage.
///
- /// Required parameter: The subscription id.
- /// Required parameter: Request for updating the subscription billing date.
+ /// Required parameter: Subscription id.
+ /// Required parameter: Item id.
/// Optional parameter: Example: .
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- Models.GetSubscriptionResponse UpdateSubscriptionBillingDate(
+ /// Returns the Models.GetUsageResponse response from the API call.
+ Models.GetUsageResponse CreateAnUsage(
string subscriptionId,
- Models.UpdateSubscriptionBillingDateRequest request,
+ string itemId,
string idempotencyKey = null);
///
- /// Updates the billing date from a subscription.
+ /// Create Usage.
///
- /// Required parameter: The subscription id.
- /// Required parameter: Request for updating the subscription billing date.
+ /// Required parameter: Subscription id.
+ /// Required parameter: Item id.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- Task UpdateSubscriptionBillingDateAsync(
+ /// Returns the Models.GetUsageResponse response from the API call.
+ Task CreateAnUsageAsync(
string subscriptionId,
- Models.UpdateSubscriptionBillingDateRequest request,
+ string itemId,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// Updates the start at date from a subscription.
+ /// UpdateCurrentCycleStatus EndPoint.
///
- /// Required parameter: The subscription id.
- /// Required parameter: Request for updating the subscription start date.
+ /// Required parameter: Subscription Id.
+ /// Required parameter: Request for updating the end date of the subscription current status.
/// Optional parameter: Example: .
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- Models.GetSubscriptionResponse UpdateSubscriptionStartAt(
+ void UpdateCurrentCycleStatus(
string subscriptionId,
- Models.UpdateSubscriptionStartAtRequest request,
+ Models.UpdateCurrentCycleStatusRequest request,
string idempotencyKey = null);
///
- /// Updates the start at date from a subscription.
+ /// UpdateCurrentCycleStatus EndPoint.
///
- /// Required parameter: The subscription id.
- /// Required parameter: Request for updating the subscription start date.
+ /// Required parameter: Subscription Id.
+ /// Required parameter: Request for updating the end date of the subscription current status.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- Task UpdateSubscriptionStartAtAsync(
+ /// Returns the void response from the API call.
+ Task UpdateCurrentCycleStatusAsync(
string subscriptionId,
- Models.UpdateSubscriptionStartAtRequest request,
+ Models.UpdateCurrentCycleStatusRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// Gets a subscription.
+ /// Deletes a discount.
///
/// Required parameter: Subscription id.
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- Models.GetSubscriptionResponse GetSubscription(
- string subscriptionId);
+ /// Required parameter: Discount Id.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetDiscountResponse response from the API call.
+ Models.GetDiscountResponse DeleteDiscount(
+ string subscriptionId,
+ string discountId,
+ string idempotencyKey = null);
///
- /// Gets a subscription.
+ /// Deletes a discount.
///
/// Required parameter: Subscription id.
+ /// Required parameter: Discount Id.
+ /// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- Task GetSubscriptionAsync(
+ /// Returns the Models.GetDiscountResponse response from the API call.
+ Task DeleteDiscountAsync(
string subscriptionId,
+ string discountId,
+ string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// Lists all usages from a subscription item.
+ /// Get Subscription Items.
///
/// Required parameter: The subscription id.
- /// Required parameter: The subscription item id.
/// Optional parameter: Page number.
/// Optional parameter: Page size.
+ /// Optional parameter: The item name.
/// Optional parameter: Identification code in the client system.
- /// Optional parameter: Identification group in the client system.
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// Returns the Models.ListUsagesResponse response from the API call.
- Models.ListUsagesResponse GetUsages(
+ /// Optional parameter: The item statis.
+ /// Optional parameter: The item description.
+ /// Optional parameter: Filter for item's creation date start range.
+ /// Optional parameter: Filter for item's creation date end range.
+ /// Returns the Models.ListSubscriptionItemsResponse response from the API call.
+ Models.ListSubscriptionItemsResponse GetSubscriptionItems(
string subscriptionId,
- string itemId,
int? page = null,
int? size = null,
+ string name = null,
string code = null,
- string mGroup = null,
- DateTime? usedSince = null,
- DateTime? usedUntil = null);
+ string status = null,
+ string description = null,
+ string createdSince = null,
+ string createdUntil = null);
///
- /// Lists all usages from a subscription item.
+ /// Get Subscription Items.
///
/// Required parameter: The subscription id.
- /// Required parameter: The subscription item id.
/// Optional parameter: Page number.
/// Optional parameter: Page size.
+ /// Optional parameter: The item name.
/// Optional parameter: Identification code in the client system.
- /// Optional parameter: Identification group in the client system.
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
+ /// Optional parameter: The item statis.
+ /// Optional parameter: The item description.
+ /// Optional parameter: Filter for item's creation date start range.
+ /// Optional parameter: Filter for item's creation date end range.
/// cancellationToken.
- /// Returns the Models.ListUsagesResponse response from the API call.
- Task GetUsagesAsync(
+ /// Returns the Models.ListSubscriptionItemsResponse response from the API call.
+ Task GetSubscriptionItemsAsync(
string subscriptionId,
- string itemId,
int? page = null,
int? size = null,
+ string name = null,
string code = null,
- string mGroup = null,
- DateTime? usedSince = null,
- DateTime? usedUntil = null,
- CancellationToken cancellationToken = default);
-
- ///
- /// UpdateLatestPeriodEndAt EndPoint.
- ///
- /// Required parameter: Example: .
- /// Required parameter: Request for updating the end date of the current signature cycle.
- /// Optional parameter: Example: .
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- Models.GetSubscriptionResponse UpdateLatestPeriodEndAt(
- string subscriptionId,
- Models.UpdateCurrentCycleEndDateRequest request,
- string idempotencyKey = null);
-
- ///
- /// UpdateLatestPeriodEndAt EndPoint.
- ///
- /// Required parameter: Example: .
- /// Required parameter: Request for updating the end date of the current signature cycle.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- Task UpdateLatestPeriodEndAtAsync(
- string subscriptionId,
- Models.UpdateCurrentCycleEndDateRequest request,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default);
-
- ///
- /// Deletes a discount.
- ///
- /// Required parameter: Subscription id.
- /// Required parameter: Discount Id.
- /// Optional parameter: Example: .
- /// Returns the Models.GetDiscountResponse response from the API call.
- Models.GetDiscountResponse DeleteDiscount(
- string subscriptionId,
- string discountId,
- string idempotencyKey = null);
-
- ///
- /// Deletes a discount.
- ///
- /// Required parameter: Subscription id.
- /// Required parameter: Discount Id.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetDiscountResponse response from the API call.
- Task DeleteDiscountAsync(
- string subscriptionId,
- string discountId,
- string idempotencyKey = null,
+ string status = null,
+ string description = null,
+ string createdSince = null,
+ string createdUntil = null,
CancellationToken cancellationToken = default);
///
@@ -269,346 +280,443 @@ Models.GetSubscriptionResponse UpdateSubscriptionPaymentMethod(
CancellationToken cancellationToken = default);
///
- /// Cancels a subscription.
+ /// Get Subscription Item.
///
- /// Required parameter: Subscription id.
- /// Optional parameter: Request for cancelling a subscription.
- /// Optional parameter: Example: .
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- Models.GetSubscriptionResponse CancelSubscription(
+ /// Required parameter: Subscription Id.
+ /// Required parameter: Item id.
+ /// Returns the Models.GetSubscriptionItemResponse response from the API call.
+ Models.GetSubscriptionItemResponse GetSubscriptionItem(
string subscriptionId,
- Models.CreateCancelSubscriptionRequest request = null,
- string idempotencyKey = null);
+ string itemId);
///
- /// Cancels a subscription.
+ /// Get Subscription Item.
///
- /// Required parameter: Subscription id.
- /// Optional parameter: Request for cancelling a subscription.
- /// Optional parameter: Example: .
+ /// Required parameter: Subscription Id.
+ /// Required parameter: Item id.
/// cancellationToken.
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- Task CancelSubscriptionAsync(
+ /// Returns the Models.GetSubscriptionItemResponse response from the API call.
+ Task GetSubscriptionItemAsync(
string subscriptionId,
- Models.CreateCancelSubscriptionRequest request = null,
- string idempotencyKey = null,
+ string itemId,
CancellationToken cancellationToken = default);
///
- /// Creates a new subscription.
+ /// Gets all subscriptions.
///
- /// Required parameter: Request for creating a subscription.
- /// Optional parameter: Example: .
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- Models.GetSubscriptionResponse CreateSubscription(
- Models.CreateSubscriptionRequest body,
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// Optional parameter: Filter for subscription's code.
+ /// Optional parameter: Filter for subscription's billing type.
+ /// Optional parameter: Filter for subscription's customer id.
+ /// Optional parameter: Filter for subscription's plan id.
+ /// Optional parameter: Filter for subscription's card id.
+ /// Optional parameter: Filter for subscription's status.
+ /// Optional parameter: Filter for subscription's next billing date start range.
+ /// Optional parameter: Filter for subscription's next billing date end range.
+ /// Optional parameter: Filter for subscription's creation date start range.
+ /// Optional parameter: Filter for subscriptions creation date end range.
+ /// Returns the Models.ListSubscriptionsResponse response from the API call.
+ Models.ListSubscriptionsResponse GetSubscriptions(
+ int? page = null,
+ int? size = null,
+ string code = null,
+ string billingType = null,
+ string customerId = null,
+ string planId = null,
+ string cardId = null,
+ string status = null,
+ DateTime? nextBillingSince = null,
+ DateTime? nextBillingUntil = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null);
+
+ ///
+ /// Gets all subscriptions.
+ ///
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// Optional parameter: Filter for subscription's code.
+ /// Optional parameter: Filter for subscription's billing type.
+ /// Optional parameter: Filter for subscription's customer id.
+ /// Optional parameter: Filter for subscription's plan id.
+ /// Optional parameter: Filter for subscription's card id.
+ /// Optional parameter: Filter for subscription's status.
+ /// Optional parameter: Filter for subscription's next billing date start range.
+ /// Optional parameter: Filter for subscription's next billing date end range.
+ /// Optional parameter: Filter for subscription's creation date start range.
+ /// Optional parameter: Filter for subscriptions creation date end range.
+ /// cancellationToken.
+ /// Returns the Models.ListSubscriptionsResponse response from the API call.
+ Task GetSubscriptionsAsync(
+ int? page = null,
+ int? size = null,
+ string code = null,
+ string billingType = null,
+ string customerId = null,
+ string planId = null,
+ string cardId = null,
+ string status = null,
+ DateTime? nextBillingSince = null,
+ DateTime? nextBillingUntil = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null,
+ CancellationToken cancellationToken = default);
+
+ ///
+ /// Cancels a subscription.
+ ///
+ /// Required parameter: Subscription id.
+ /// Optional parameter: Request for cancelling a subscription.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ Models.GetSubscriptionResponse CancelSubscription(
+ string subscriptionId,
+ Models.CreateCancelSubscriptionRequest request = null,
string idempotencyKey = null);
///
- /// Creates a new subscription.
+ /// Cancels a subscription.
///
- /// Required parameter: Request for creating a subscription.
+ /// Required parameter: Subscription id.
+ /// Optional parameter: Request for cancelling a subscription.
/// Optional parameter: Example: .
/// cancellationToken.
/// Returns the Models.GetSubscriptionResponse response from the API call.
- Task CreateSubscriptionAsync(
- Models.CreateSubscriptionRequest body,
+ Task CancelSubscriptionAsync(
+ string subscriptionId,
+ Models.CreateCancelSubscriptionRequest request = null,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// UpdateSubscriptionAffiliationId EndPoint.
+ /// Creates a increment.
///
- /// Required parameter: Example: .
- /// Required parameter: Request for updating a subscription affiliation id.
+ /// Required parameter: Subscription id.
+ /// Required parameter: Request for creating a increment.
/// Optional parameter: Example: .
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- Models.GetSubscriptionResponse UpdateSubscriptionAffiliationId(
+ /// Returns the Models.GetIncrementResponse response from the API call.
+ Models.GetIncrementResponse CreateIncrement(
string subscriptionId,
- Models.UpdateSubscriptionAffiliationIdRequest request,
+ Models.CreateIncrementRequest request,
string idempotencyKey = null);
///
- /// UpdateSubscriptionAffiliationId EndPoint.
+ /// Creates a increment.
///
- /// Required parameter: Example: .
- /// Required parameter: Request for updating a subscription affiliation id.
+ /// Required parameter: Subscription id.
+ /// Required parameter: Request for creating a increment.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- Task UpdateSubscriptionAffiliationIdAsync(
+ /// Returns the Models.GetIncrementResponse response from the API call.
+ Task CreateIncrementAsync(
string subscriptionId,
- Models.UpdateSubscriptionAffiliationIdRequest request,
+ Models.CreateIncrementRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// Atualização do valor mínimo da assinatura.
+ /// Creates a usage.
///
/// Required parameter: Subscription Id.
- /// Required parameter: Request da requisição com o valor mínimo que será configurado.
+ /// Required parameter: Item id.
+ /// Required parameter: Request for creating a usage.
/// Optional parameter: Example: .
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- Models.GetSubscriptionResponse UpdateSubscriptionMiniumPrice(
+ /// Returns the Models.GetUsageResponse response from the API call.
+ Models.GetUsageResponse CreateUsage(
string subscriptionId,
- Models.UpdateSubscriptionMinimumPriceRequest request,
+ string itemId,
+ Models.CreateUsageRequest body,
string idempotencyKey = null);
///
- /// Atualização do valor mínimo da assinatura.
+ /// Creates a usage.
///
/// Required parameter: Subscription Id.
- /// Required parameter: Request da requisição com o valor mínimo que será configurado.
+ /// Required parameter: Item id.
+ /// Required parameter: Request for creating a usage.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- Task UpdateSubscriptionMiniumPriceAsync(
+ /// Returns the Models.GetUsageResponse response from the API call.
+ Task CreateUsageAsync(
string subscriptionId,
- Models.UpdateSubscriptionMinimumPriceRequest request,
+ string itemId,
+ Models.CreateUsageRequest body,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// GetSubscriptionCycleById EndPoint.
+ /// GetDiscountById EndPoint.
///
/// Required parameter: The subscription id.
- /// Required parameter: Example: .
- /// Returns the Models.GetPeriodResponse response from the API call.
- Models.GetPeriodResponse GetSubscriptionCycleById(
+ /// Required parameter: Example: .
+ /// Returns the Models.GetDiscountResponse response from the API call.
+ Models.GetDiscountResponse GetDiscountById(
string subscriptionId,
- string cycleId);
+ string discountId);
///
- /// GetSubscriptionCycleById EndPoint.
+ /// GetDiscountById EndPoint.
///
/// Required parameter: The subscription id.
- /// Required parameter: Example: .
+ /// Required parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetPeriodResponse response from the API call.
- Task GetSubscriptionCycleByIdAsync(
+ /// Returns the Models.GetDiscountResponse response from the API call.
+ Task GetDiscountByIdAsync(
string subscriptionId,
- string cycleId,
+ string discountId,
CancellationToken cancellationToken = default);
///
- /// GetUsageReport EndPoint.
+ /// Creates a new subscription.
+ ///
+ /// Required parameter: Request for creating a subscription.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ Models.GetSubscriptionResponse CreateSubscription(
+ Models.CreateSubscriptionRequest body,
+ string idempotencyKey = null);
+
+ ///
+ /// Creates a new subscription.
+ ///
+ /// Required parameter: Request for creating a subscription.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ Task CreateSubscriptionAsync(
+ Models.CreateSubscriptionRequest body,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
+ ///
+ /// GetIncrementById EndPoint.
///
/// Required parameter: The subscription Id.
- /// Required parameter: The period Id.
- /// Returns the Models.GetUsageReportResponse response from the API call.
- Models.GetUsageReportResponse GetUsageReport(
+ /// Required parameter: The increment Id.
+ /// Returns the Models.GetIncrementResponse response from the API call.
+ Models.GetIncrementResponse GetIncrementById(
string subscriptionId,
- string periodId);
+ string incrementId);
///
- /// GetUsageReport EndPoint.
+ /// GetIncrementById EndPoint.
///
/// Required parameter: The subscription Id.
- /// Required parameter: The period Id.
+ /// Required parameter: The increment Id.
/// cancellationToken.
- /// Returns the Models.GetUsageReportResponse response from the API call.
- Task GetUsageReportAsync(
+ /// Returns the Models.GetIncrementResponse response from the API call.
+ Task GetIncrementByIdAsync(
string subscriptionId,
- string periodId,
+ string incrementId,
CancellationToken cancellationToken = default);
///
- /// RenewSubscription EndPoint.
+ /// UpdateSubscriptionAffiliationId EndPoint.
///
/// Required parameter: Example: .
+ /// Required parameter: Request for updating a subscription affiliation id.
/// Optional parameter: Example: .
- /// Returns the Models.GetPeriodResponse response from the API call.
- Models.GetPeriodResponse RenewSubscription(
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ Models.GetSubscriptionResponse UpdateSubscriptionAffiliationId(
string subscriptionId,
+ Models.UpdateSubscriptionAffiliationIdRequest request,
string idempotencyKey = null);
///
- /// RenewSubscription EndPoint.
+ /// UpdateSubscriptionAffiliationId EndPoint.
///
/// Required parameter: Example: .
+ /// Required parameter: Request for updating a subscription affiliation id.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetPeriodResponse response from the API call.
- Task RenewSubscriptionAsync(
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ Task UpdateSubscriptionAffiliationIdAsync(
string subscriptionId,
+ Models.UpdateSubscriptionAffiliationIdRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// Deletes a usage.
+ /// Updates the metadata from a subscription.
///
/// Required parameter: The subscription id.
- /// Required parameter: The subscription item id.
- /// Required parameter: The usage id.
+ /// Required parameter: Request for updating the subscrption metadata.
/// Optional parameter: Example: .
- /// Returns the Models.GetUsageResponse response from the API call.
- Models.GetUsageResponse DeleteUsage(
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ Models.GetSubscriptionResponse UpdateSubscriptionMetadata(
string subscriptionId,
- string itemId,
- string usageId,
+ Models.UpdateMetadataRequest request,
string idempotencyKey = null);
///
- /// Deletes a usage.
+ /// Updates the metadata from a subscription.
///
/// Required parameter: The subscription id.
- /// Required parameter: The subscription item id.
- /// Required parameter: The usage id.
+ /// Required parameter: Request for updating the subscrption metadata.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetUsageResponse response from the API call.
- Task DeleteUsageAsync(
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ Task UpdateSubscriptionMetadataAsync(
string subscriptionId,
- string itemId,
- string usageId,
+ Models.UpdateMetadataRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// Create Usage.
+ /// Deletes a increment.
///
/// Required parameter: Subscription id.
- /// Required parameter: Item id.
+ /// Required parameter: Increment id.
/// Optional parameter: Example: .
- /// Returns the Models.GetUsageResponse response from the API call.
- Models.GetUsageResponse CreateAnUsage(
+ /// Returns the Models.GetIncrementResponse response from the API call.
+ Models.GetIncrementResponse DeleteIncrement(
string subscriptionId,
- string itemId,
+ string incrementId,
string idempotencyKey = null);
///
- /// Create Usage.
+ /// Deletes a increment.
///
/// Required parameter: Subscription id.
- /// Required parameter: Item id.
+ /// Required parameter: Increment id.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetUsageResponse response from the API call.
- Task CreateAnUsageAsync(
+ /// Returns the Models.GetIncrementResponse response from the API call.
+ Task DeleteIncrementAsync(
string subscriptionId,
- string itemId,
+ string incrementId,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// UpdateCurrentCycleStatus EndPoint.
+ /// GetSubscriptionCycles EndPoint.
///
/// Required parameter: Subscription Id.
- /// Required parameter: Request for updating the end date of the subscription current status.
- /// Optional parameter: Example: .
- void UpdateCurrentCycleStatus(
- string subscriptionId,
- Models.UpdateCurrentCycleStatusRequest request,
- string idempotencyKey = null);
+ /// Required parameter: Page number.
+ /// Required parameter: Page size.
+ /// Returns the Models.ListCyclesResponse response from the API call.
+ Models.ListCyclesResponse GetSubscriptionCycles(
+ string subscriptionId,
+ string page,
+ string size);
///
- /// UpdateCurrentCycleStatus EndPoint.
+ /// GetSubscriptionCycles EndPoint.
///
/// Required parameter: Subscription Id.
- /// Required parameter: Request for updating the end date of the subscription current status.
- /// Optional parameter: Example: .
+ /// Required parameter: Page number.
+ /// Required parameter: Page size.
/// cancellationToken.
- /// Returns the void response from the API call.
- Task UpdateCurrentCycleStatusAsync(
+ /// Returns the Models.ListCyclesResponse response from the API call.
+ Task GetSubscriptionCyclesAsync(
string subscriptionId,
- Models.UpdateCurrentCycleStatusRequest request,
- string idempotencyKey = null,
+ string page,
+ string size,
CancellationToken cancellationToken = default);
///
- /// Get Subscription Item.
+ /// GetDiscounts EndPoint.
///
- /// Required parameter: Subscription Id.
- /// Required parameter: Item id.
- /// Returns the Models.GetSubscriptionItemResponse response from the API call.
- Models.GetSubscriptionItemResponse GetSubscriptionItem(
+ /// Required parameter: The subscription id.
+ /// Required parameter: Page number.
+ /// Required parameter: Page size.
+ /// Returns the Models.ListDiscountsResponse response from the API call.
+ Models.ListDiscountsResponse GetDiscounts(
string subscriptionId,
- string itemId);
+ int page,
+ int size);
///
- /// Get Subscription Item.
+ /// GetDiscounts EndPoint.
///
- /// Required parameter: Subscription Id.
- /// Required parameter: Item id.
+ /// Required parameter: The subscription id.
+ /// Required parameter: Page number.
+ /// Required parameter: Page size.
/// cancellationToken.
- /// Returns the Models.GetSubscriptionItemResponse response from the API call.
- Task GetSubscriptionItemAsync(
+ /// Returns the Models.ListDiscountsResponse response from the API call.
+ Task GetDiscountsAsync(
string subscriptionId,
- string itemId,
+ int page,
+ int size,
CancellationToken cancellationToken = default);
///
- /// GetIncrementById EndPoint.
+ /// Updates the billing date from a subscription.
///
- /// Required parameter: The subscription Id.
- /// Required parameter: The increment Id.
- /// Returns the Models.GetIncrementResponse response from the API call.
- Models.GetIncrementResponse GetIncrementById(
+ /// Required parameter: The subscription id.
+ /// Required parameter: Request for updating the subscription billing date.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ Models.GetSubscriptionResponse UpdateSubscriptionBillingDate(
string subscriptionId,
- string incrementId);
+ Models.UpdateSubscriptionBillingDateRequest request,
+ string idempotencyKey = null);
///
- /// GetIncrementById EndPoint.
+ /// Updates the billing date from a subscription.
///
- /// Required parameter: The subscription Id.
- /// Required parameter: The increment Id.
+ /// Required parameter: The subscription id.
+ /// Required parameter: Request for updating the subscription billing date.
+ /// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetIncrementResponse response from the API call.
- Task GetIncrementByIdAsync(
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ Task UpdateSubscriptionBillingDateAsync(
string subscriptionId,
- string incrementId,
+ Models.UpdateSubscriptionBillingDateRequest request,
+ string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// Deletes a increment.
+ /// Deletes a subscription item.
///
/// Required parameter: Subscription id.
- /// Required parameter: Increment id.
+ /// Required parameter: Subscription item id.
/// Optional parameter: Example: .
- /// Returns the Models.GetIncrementResponse response from the API call.
- Models.GetIncrementResponse DeleteIncrement(
+ /// Returns the Models.GetSubscriptionItemResponse response from the API call.
+ Models.GetSubscriptionItemResponse DeleteSubscriptionItem(
string subscriptionId,
- string incrementId,
+ string subscriptionItemId,
string idempotencyKey = null);
///
- /// Deletes a increment.
+ /// Deletes a subscription item.
///
/// Required parameter: Subscription id.
- /// Required parameter: Increment id.
+ /// Required parameter: Subscription item id.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetIncrementResponse response from the API call.
- Task DeleteIncrementAsync(
+ /// Returns the Models.GetSubscriptionItemResponse response from the API call.
+ Task DeleteSubscriptionItemAsync(
string subscriptionId,
- string incrementId,
+ string subscriptionItemId,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// GetDiscounts EndPoint.
+ /// GetIncrements EndPoint.
///
/// Required parameter: The subscription id.
- /// Required parameter: Page number.
- /// Required parameter: Page size.
- /// Returns the Models.ListDiscountsResponse response from the API call.
- Models.ListDiscountsResponse GetDiscounts(
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// Returns the Models.ListIncrementsResponse response from the API call.
+ Models.ListIncrementsResponse GetIncrements(
string subscriptionId,
- int page,
- int size);
+ int? page = null,
+ int? size = null);
///
- /// GetDiscounts EndPoint.
+ /// GetIncrements EndPoint.
///
/// Required parameter: The subscription id.
- /// Required parameter: Page number.
- /// Required parameter: Page size.
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
/// cancellationToken.
- /// Returns the Models.ListDiscountsResponse response from the API call.
- Task GetDiscountsAsync(
+ /// Returns the Models.ListIncrementsResponse response from the API call.
+ Task GetIncrementsAsync(
string subscriptionId,
- int page,
- int size,
+ int? page = null,
+ int? size = null,
CancellationToken cancellationToken = default);
///
@@ -637,6 +745,62 @@ Models.GetSubscriptionResponse UpdateSubscriptionDueDays(
string idempotencyKey = null,
CancellationToken cancellationToken = default);
+ ///
+ /// Updates the start at date from a subscription.
+ ///
+ /// Required parameter: The subscription id.
+ /// Required parameter: Request for updating the subscription start date.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ Models.GetSubscriptionResponse UpdateSubscriptionStartAt(
+ string subscriptionId,
+ Models.UpdateSubscriptionStartAtRequest request,
+ string idempotencyKey = null);
+
+ ///
+ /// Updates the start at date from a subscription.
+ ///
+ /// Required parameter: The subscription id.
+ /// Required parameter: Request for updating the subscription start date.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ Task UpdateSubscriptionStartAtAsync(
+ string subscriptionId,
+ Models.UpdateSubscriptionStartAtRequest request,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
+ ///
+ /// Updates a subscription item.
+ ///
+ /// Required parameter: Subscription Id.
+ /// Required parameter: Item id.
+ /// Required parameter: Request for updating a subscription item.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetSubscriptionItemResponse response from the API call.
+ Models.GetSubscriptionItemResponse UpdateSubscriptionItem(
+ string subscriptionId,
+ string itemId,
+ Models.UpdateSubscriptionItemRequest body,
+ string idempotencyKey = null);
+
+ ///
+ /// Updates a subscription item.
+ ///
+ /// Required parameter: Subscription Id.
+ /// Required parameter: Item id.
+ /// Required parameter: Request for updating a subscription item.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetSubscriptionItemResponse response from the API call.
+ Task UpdateSubscriptionItemAsync(
+ string subscriptionId,
+ string itemId,
+ Models.UpdateSubscriptionItemRequest body,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default);
+
///
/// Creates a new Subscription item.
///
@@ -664,349 +828,185 @@ Models.GetSubscriptionItemResponse CreateSubscriptionItem(
CancellationToken cancellationToken = default);
///
- /// UpdateSplitSubscription EndPoint.
+ /// Gets a subscription.
///
- /// Required parameter: Subscription's id.
- /// Required parameter: Example: .
+ /// Required parameter: Subscription id.
/// Returns the Models.GetSubscriptionResponse response from the API call.
- Models.GetSubscriptionResponse UpdateSplitSubscription(
- string id,
- Models.UpdateSubscriptionSplitRequest request);
+ Models.GetSubscriptionResponse GetSubscription(
+ string subscriptionId);
///
- /// UpdateSplitSubscription EndPoint.
+ /// Gets a subscription.
///
- /// Required parameter: Subscription's id.
- /// Required parameter: Example: .
+ /// Required parameter: Subscription id.
/// cancellationToken.
/// Returns the Models.GetSubscriptionResponse response from the API call.
- Task UpdateSplitSubscriptionAsync(
- string id,
- Models.UpdateSubscriptionSplitRequest request,
+ Task GetSubscriptionAsync(
+ string subscriptionId,
CancellationToken cancellationToken = default);
///
- /// Get Subscription Items.
+ /// Lists all usages from a subscription item.
///
/// Required parameter: The subscription id.
+ /// Required parameter: The subscription item id.
/// Optional parameter: Page number.
/// Optional parameter: Page size.
- /// Optional parameter: The item name.
/// Optional parameter: Identification code in the client system.
- /// Optional parameter: The item statis.
- /// Optional parameter: The item description.
- /// Optional parameter: Filter for item's creation date start range.
- /// Optional parameter: Filter for item's creation date end range.
- /// Returns the Models.ListSubscriptionItemsResponse response from the API call.
- Models.ListSubscriptionItemsResponse GetSubscriptionItems(
+ /// Optional parameter: Identification group in the client system.
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Returns the Models.ListUsagesResponse response from the API call.
+ Models.ListUsagesResponse GetUsages(
string subscriptionId,
+ string itemId,
int? page = null,
int? size = null,
- string name = null,
string code = null,
- string status = null,
- string description = null,
- string createdSince = null,
- string createdUntil = null);
+ string mGroup = null,
+ DateTime? usedSince = null,
+ DateTime? usedUntil = null);
///
- /// Get Subscription Items.
+ /// Lists all usages from a subscription item.
///
/// Required parameter: The subscription id.
+ /// Required parameter: The subscription item id.
/// Optional parameter: Page number.
/// Optional parameter: Page size.
- /// Optional parameter: The item name.
/// Optional parameter: Identification code in the client system.
- /// Optional parameter: The item statis.
- /// Optional parameter: The item description.
- /// Optional parameter: Filter for item's creation date start range.
- /// Optional parameter: Filter for item's creation date end range.
+ /// Optional parameter: Identification group in the client system.
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.ListSubscriptionItemsResponse response from the API call.
- Task GetSubscriptionItemsAsync(
+ /// Returns the Models.ListUsagesResponse response from the API call.
+ Task GetUsagesAsync(
string subscriptionId,
+ string itemId,
int? page = null,
int? size = null,
- string name = null,
string code = null,
- string status = null,
- string description = null,
- string createdSince = null,
- string createdUntil = null,
+ string mGroup = null,
+ DateTime? usedSince = null,
+ DateTime? usedUntil = null,
CancellationToken cancellationToken = default);
///
- /// Gets all subscriptions.
+ /// UpdateLatestPeriodEndAt EndPoint.
///
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// Optional parameter: Filter for subscription's code.
- /// Optional parameter: Filter for subscription's billing type.
- /// Optional parameter: Filter for subscription's customer id.
- /// Optional parameter: Filter for subscription's plan id.
- /// Optional parameter: Filter for subscription's card id.
- /// Optional parameter: Filter for subscription's status.
- /// Optional parameter: Filter for subscription's next billing date start range.
- /// Optional parameter: Filter for subscription's next billing date end range.
- /// Optional parameter: Filter for subscription's creation date start range.
- /// Optional parameter: Filter for subscriptions creation date end range.
- /// Returns the Models.ListSubscriptionsResponse response from the API call.
- Models.ListSubscriptionsResponse GetSubscriptions(
- int? page = null,
- int? size = null,
- string code = null,
- string billingType = null,
- string customerId = null,
- string planId = null,
- string cardId = null,
- string status = null,
- DateTime? nextBillingSince = null,
- DateTime? nextBillingUntil = null,
- DateTime? createdSince = null,
- DateTime? createdUntil = null);
-
- ///
- /// Gets all subscriptions.
- ///
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// Optional parameter: Filter for subscription's code.
- /// Optional parameter: Filter for subscription's billing type.
- /// Optional parameter: Filter for subscription's customer id.
- /// Optional parameter: Filter for subscription's plan id.
- /// Optional parameter: Filter for subscription's card id.
- /// Optional parameter: Filter for subscription's status.
- /// Optional parameter: Filter for subscription's next billing date start range.
- /// Optional parameter: Filter for subscription's next billing date end range.
- /// Optional parameter: Filter for subscription's creation date start range.
- /// Optional parameter: Filter for subscriptions creation date end range.
- /// cancellationToken.
- /// Returns the Models.ListSubscriptionsResponse response from the API call.
- Task GetSubscriptionsAsync(
- int? page = null,
- int? size = null,
- string code = null,
- string billingType = null,
- string customerId = null,
- string planId = null,
- string cardId = null,
- string status = null,
- DateTime? nextBillingSince = null,
- DateTime? nextBillingUntil = null,
- DateTime? createdSince = null,
- DateTime? createdUntil = null,
- CancellationToken cancellationToken = default);
-
- ///
- /// Creates a increment.
- ///
- /// Required parameter: Subscription id.
- /// Required parameter: Request for creating a increment.
+ /// Required parameter: Example: .
+ /// Required parameter: Request for updating the end date of the current signature cycle.
/// Optional parameter: Example: .
- /// Returns the Models.GetIncrementResponse response from the API call.
- Models.GetIncrementResponse CreateIncrement(
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ Models.GetSubscriptionResponse UpdateLatestPeriodEndAt(
string subscriptionId,
- Models.CreateIncrementRequest request,
+ Models.UpdateCurrentCycleEndDateRequest request,
string idempotencyKey = null);
///
- /// Creates a increment.
+ /// UpdateLatestPeriodEndAt EndPoint.
///
- /// Required parameter: Subscription id.
- /// Required parameter: Request for creating a increment.
+ /// Required parameter: Example: .
+ /// Required parameter: Request for updating the end date of the current signature cycle.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetIncrementResponse response from the API call.
- Task CreateIncrementAsync(
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ Task UpdateLatestPeriodEndAtAsync(
string subscriptionId,
- Models.CreateIncrementRequest request,
+ Models.UpdateCurrentCycleEndDateRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// Creates a usage.
+ /// Atualização do valor mínimo da assinatura.
///
/// Required parameter: Subscription Id.
- /// Required parameter: Item id.
- /// Required parameter: Request for creating a usage.
+ /// Required parameter: Request da requisição com o valor mínimo que será configurado.
/// Optional parameter: Example: .
- /// Returns the Models.GetUsageResponse response from the API call.
- Models.GetUsageResponse CreateUsage(
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ Models.GetSubscriptionResponse UpdateSubscriptionMiniumPrice(
string subscriptionId,
- string itemId,
- Models.CreateUsageRequest body,
+ Models.UpdateSubscriptionMinimumPriceRequest request,
string idempotencyKey = null);
///
- /// Creates a usage.
+ /// Atualização do valor mínimo da assinatura.
///
/// Required parameter: Subscription Id.
- /// Required parameter: Item id.
- /// Required parameter: Request for creating a usage.
+ /// Required parameter: Request da requisição com o valor mínimo que será configurado.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetUsageResponse response from the API call.
- Task CreateUsageAsync(
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ Task UpdateSubscriptionMiniumPriceAsync(
string subscriptionId,
- string itemId,
- Models.CreateUsageRequest body,
+ Models.UpdateSubscriptionMinimumPriceRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
///
- /// GetDiscountById EndPoint.
- ///
- /// Required parameter: The subscription id.
- /// Required parameter: Example: .
- /// Returns the Models.GetDiscountResponse response from the API call.
- Models.GetDiscountResponse GetDiscountById(
- string subscriptionId,
- string discountId);
-
- ///
- /// GetDiscountById EndPoint.
- ///
- /// Required parameter: The subscription id.
- /// Required parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetDiscountResponse response from the API call.
- Task GetDiscountByIdAsync(
- string subscriptionId,
- string discountId,
- CancellationToken cancellationToken = default);
-
- ///
- /// Updates the metadata from a subscription.
+ /// GetSubscriptionCycleById EndPoint.
///
/// Required parameter: The subscription id.
- /// Required parameter: Request for updating the subscrption metadata.
- /// Optional parameter: Example: .
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- Models.GetSubscriptionResponse UpdateSubscriptionMetadata(
+ /// Required parameter: Example: .
+ /// Returns the Models.GetPeriodResponse response from the API call.
+ Models.GetPeriodResponse GetSubscriptionCycleById(
string subscriptionId,
- Models.UpdateMetadataRequest request,
- string idempotencyKey = null);
+ string cycleId);
///
- /// Updates the metadata from a subscription.
+ /// GetSubscriptionCycleById EndPoint.
///
/// Required parameter: The subscription id.
- /// Required parameter: Request for updating the subscrption metadata.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- Task UpdateSubscriptionMetadataAsync(
- string subscriptionId,
- Models.UpdateMetadataRequest request,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default);
-
- ///
- /// GetSubscriptionCycles EndPoint.
- ///
- /// Required parameter: Subscription Id.
- /// Required parameter: Page number.
- /// Required parameter: Page size.
- /// Returns the Models.ListCyclesResponse response from the API call.
- Models.ListCyclesResponse GetSubscriptionCycles(
- string subscriptionId,
- string page,
- string size);
-
- ///
- /// GetSubscriptionCycles EndPoint.
- ///
- /// Required parameter: Subscription Id.
- /// Required parameter: Page number.
- /// Required parameter: Page size.
- /// cancellationToken.
- /// Returns the Models.ListCyclesResponse response from the API call.
- Task GetSubscriptionCyclesAsync(
- string subscriptionId,
- string page,
- string size,
- CancellationToken cancellationToken = default);
-
- ///
- /// Deletes a subscription item.
- ///
- /// Required parameter: Subscription id.
- /// Required parameter: Subscription item id.
- /// Optional parameter: Example: .
- /// Returns the Models.GetSubscriptionItemResponse response from the API call.
- Models.GetSubscriptionItemResponse DeleteSubscriptionItem(
- string subscriptionId,
- string subscriptionItemId,
- string idempotencyKey = null);
-
- ///
- /// Deletes a subscription item.
- ///
- /// Required parameter: Subscription id.
- /// Required parameter: Subscription item id.
- /// Optional parameter: Example: .
+ /// Required parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetSubscriptionItemResponse response from the API call.
- Task DeleteSubscriptionItemAsync(
+ /// Returns the Models.GetPeriodResponse response from the API call.
+ Task GetSubscriptionCycleByIdAsync(
string subscriptionId,
- string subscriptionItemId,
- string idempotencyKey = null,
+ string cycleId,
CancellationToken cancellationToken = default);
///
- /// GetIncrements EndPoint.
+ /// GetUsageReport EndPoint.
///
- /// Required parameter: The subscription id.
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// Returns the Models.ListIncrementsResponse response from the API call.
- Models.ListIncrementsResponse GetIncrements(
+ /// Required parameter: The subscription Id.
+ /// Required parameter: The period Id.
+ /// Returns the Models.GetUsageReportResponse response from the API call.
+ Models.GetUsageReportResponse GetUsageReport(
string subscriptionId,
- int? page = null,
- int? size = null);
+ string periodId);
///
- /// GetIncrements EndPoint.
+ /// GetUsageReport EndPoint.
///
- /// Required parameter: The subscription id.
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
+ /// Required parameter: The subscription Id.
+ /// Required parameter: The period Id.
/// cancellationToken.
- /// Returns the Models.ListIncrementsResponse response from the API call.
- Task GetIncrementsAsync(
+ /// Returns the Models.GetUsageReportResponse response from the API call.
+ Task GetUsageReportAsync(
string subscriptionId,
- int? page = null,
- int? size = null,
+ string periodId,
CancellationToken cancellationToken = default);
///
- /// Updates a subscription item.
+ /// UpdateSplitSubscription EndPoint.
///
- /// Required parameter: Subscription Id.
- /// Required parameter: Item id.
- /// Required parameter: Request for updating a subscription item.
- /// Optional parameter: Example: .
- /// Returns the Models.GetSubscriptionItemResponse response from the API call.
- Models.GetSubscriptionItemResponse UpdateSubscriptionItem(
- string subscriptionId,
- string itemId,
- Models.UpdateSubscriptionItemRequest body,
- string idempotencyKey = null);
+ /// Required parameter: Subscription's id.
+ /// Required parameter: Example: .
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ Models.GetSubscriptionResponse UpdateSplitSubscription(
+ string id,
+ Models.UpdateSubscriptionSplitRequest request);
///
- /// Updates a subscription item.
+ /// UpdateSplitSubscription EndPoint.
///
- /// Required parameter: Subscription Id.
- /// Required parameter: Item id.
- /// Required parameter: Request for updating a subscription item.
- /// Optional parameter: Example: .
+ /// Required parameter: Subscription's id.
+ /// Required parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetSubscriptionItemResponse response from the API call.
- Task UpdateSubscriptionItemAsync(
- string subscriptionId,
- string itemId,
- Models.UpdateSubscriptionItemRequest body,
- string idempotencyKey = null,
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ Task UpdateSplitSubscriptionAsync(
+ string id,
+ Models.UpdateSubscriptionSplitRequest request,
CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/PagarmeApiSDK.Standard/Controllers/ITokensController.cs b/PagarmeApiSDK.Standard/Controllers/ITokensController.cs
index 1be42e5..052b165 100644
--- a/PagarmeApiSDK.Standard/Controllers/ITokensController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/ITokensController.cs
@@ -22,28 +22,6 @@ namespace PagarmeApiSDK.Standard.Controllers
///
public interface ITokensController
{
- ///
- /// Gets a token from its id.
- ///
- /// Required parameter: Token id.
- /// Required parameter: Public key.
- /// Returns the Models.GetTokenResponse response from the API call.
- Models.GetTokenResponse GetToken(
- string id,
- string publicKey);
-
- ///
- /// Gets a token from its id.
- ///
- /// Required parameter: Token id.
- /// Required parameter: Public key.
- /// cancellationToken.
- /// Returns the Models.GetTokenResponse response from the API call.
- Task GetTokenAsync(
- string id,
- string publicKey,
- CancellationToken cancellationToken = default);
-
///
/// CreateToken EndPoint.
///
@@ -69,5 +47,27 @@ Models.GetTokenResponse CreateToken(
Models.CreateTokenRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default);
+
+ ///
+ /// Gets a token from its id.
+ ///
+ /// Required parameter: Token id.
+ /// Required parameter: Public key.
+ /// Returns the Models.GetTokenResponse response from the API call.
+ Models.GetTokenResponse GetToken(
+ string id,
+ string publicKey);
+
+ ///
+ /// Gets a token from its id.
+ ///
+ /// Required parameter: Token id.
+ /// Required parameter: Public key.
+ /// cancellationToken.
+ /// Returns the Models.GetTokenResponse response from the API call.
+ Task GetTokenAsync(
+ string id,
+ string publicKey,
+ CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/PagarmeApiSDK.Standard/Controllers/ITransfersController.cs b/PagarmeApiSDK.Standard/Controllers/ITransfersController.cs
index 78eab1a..3c6516f 100644
--- a/PagarmeApiSDK.Standard/Controllers/ITransfersController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/ITransfersController.cs
@@ -40,19 +40,6 @@ Models.GetTransfer GetTransferById(
string transferId,
CancellationToken cancellationToken = default);
- ///
- /// Gets all transfers.
- ///
- /// Returns the Models.ListTransfers response from the API call.
- Models.ListTransfers GetTransfers();
-
- ///
- /// Gets all transfers.
- ///
- /// cancellationToken.
- /// Returns the Models.ListTransfers response from the API call.
- Task GetTransfersAsync(CancellationToken cancellationToken = default);
-
///
/// CreateTransfer EndPoint.
///
@@ -70,5 +57,18 @@ Models.GetTransfer CreateTransfer(
Task CreateTransferAsync(
Models.CreateTransfer request,
CancellationToken cancellationToken = default);
+
+ ///
+ /// Gets all transfers.
+ ///
+ /// Returns the Models.ListTransfers response from the API call.
+ Models.ListTransfers GetTransfers();
+
+ ///
+ /// Gets all transfers.
+ ///
+ /// cancellationToken.
+ /// Returns the Models.ListTransfers response from the API call.
+ Task GetTransfersAsync(CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/PagarmeApiSDK.Standard/Controllers/InvoicesController.cs b/PagarmeApiSDK.Standard/Controllers/InvoicesController.cs
index 7935688..477d372 100644
--- a/PagarmeApiSDK.Standard/Controllers/InvoicesController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/InvoicesController.cs
@@ -32,149 +32,6 @@ internal class InvoicesController : BaseController, IInvoicesController
///
internal InvoicesController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { }
- ///
- /// Gets all invoices.
- ///
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// Optional parameter: Filter for Invoice's code.
- /// Optional parameter: Filter for Invoice's customer id.
- /// Optional parameter: Filter for Invoice's subscription id.
- /// Optional parameter: Filter for Invoice's creation date start range.
- /// Optional parameter: Filter for Invoices creation date end range.
- /// Optional parameter: Filter for Invoice's status.
- /// Optional parameter: Filter for Invoice's due date start range.
- /// Optional parameter: Filter for Invoice's due date end range.
- /// Optional parameter: Example: .
- /// Returns the Models.ListInvoicesResponse response from the API call.
- public Models.ListInvoicesResponse GetInvoices(
- int? page = null,
- int? size = null,
- string code = null,
- string customerId = null,
- string subscriptionId = null,
- DateTime? createdSince = null,
- DateTime? createdUntil = null,
- string status = null,
- DateTime? dueSince = null,
- DateTime? dueUntil = null,
- string customerDocument = null)
- => CoreHelper.RunTask(GetInvoicesAsync(page, size, code, customerId, subscriptionId, createdSince, createdUntil, status, dueSince, dueUntil, customerDocument));
-
- ///
- /// Gets all invoices.
- ///
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// Optional parameter: Filter for Invoice's code.
- /// Optional parameter: Filter for Invoice's customer id.
- /// Optional parameter: Filter for Invoice's subscription id.
- /// Optional parameter: Filter for Invoice's creation date start range.
- /// Optional parameter: Filter for Invoices creation date end range.
- /// Optional parameter: Filter for Invoice's status.
- /// Optional parameter: Filter for Invoice's due date start range.
- /// Optional parameter: Filter for Invoice's due date end range.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.ListInvoicesResponse response from the API call.
- public async Task GetInvoicesAsync(
- int? page = null,
- int? size = null,
- string code = null,
- string customerId = null,
- string subscriptionId = null,
- DateTime? createdSince = null,
- DateTime? createdUntil = null,
- string status = null,
- DateTime? dueSince = null,
- DateTime? dueUntil = null,
- string customerDocument = null,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/invoices")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Query(_query => _query.Setup("page", page))
- .Query(_query => _query.Setup("size", size))
- .Query(_query => _query.Setup("code", code))
- .Query(_query => _query.Setup("customer_id", customerId))
- .Query(_query => _query.Setup("subscription_id", subscriptionId))
- .Query(_query => _query.Setup("created_since", createdSince.HasValue ? createdSince.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
- .Query(_query => _query.Setup("created_until", createdUntil.HasValue ? createdUntil.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
- .Query(_query => _query.Setup("status", status))
- .Query(_query => _query.Setup("due_since", dueSince.HasValue ? dueSince.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
- .Query(_query => _query.Setup("due_until", dueUntil.HasValue ? dueUntil.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
- .Query(_query => _query.Setup("customer_document", customerDocument))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
- ///
- /// Cancels an invoice.
- ///
- /// Required parameter: Invoice id.
- /// Optional parameter: Example: .
- /// Returns the Models.GetInvoiceResponse response from the API call.
- public Models.GetInvoiceResponse CancelInvoice(
- string invoiceId,
- string idempotencyKey = null)
- => CoreHelper.RunTask(CancelInvoiceAsync(invoiceId, idempotencyKey));
-
- ///
- /// Cancels an invoice.
- ///
- /// Required parameter: Invoice id.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetInvoiceResponse response from the API call.
- public async Task CancelInvoiceAsync(
- string invoiceId,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Delete, "/invoices/{invoice_id}")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("invoice_id", invoiceId))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
- ///
- /// Updates the status from an invoice.
- ///
- /// Required parameter: Invoice Id.
- /// Required parameter: Request for updating an invoice's status.
- /// Optional parameter: Example: .
- /// Returns the Models.GetInvoiceResponse response from the API call.
- public Models.GetInvoiceResponse UpdateInvoiceStatus(
- string invoiceId,
- Models.UpdateInvoiceStatusRequest request,
- string idempotencyKey = null)
- => CoreHelper.RunTask(UpdateInvoiceStatusAsync(invoiceId, request, idempotencyKey));
-
- ///
- /// Updates the status from an invoice.
- ///
- /// Required parameter: Invoice Id.
- /// Required parameter: Request for updating an invoice's status.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetInvoiceResponse response from the API call.
- public async Task UpdateInvoiceStatusAsync(
- string invoiceId,
- Models.UpdateInvoiceStatusRequest request,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(new HttpMethod("PATCH"), "/invoices/{invoice_id}/status")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Body(_bodyParameter => _bodyParameter.Setup(request))
- .Template(_template => _template.Setup("invoice_id", invoiceId))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
///
/// Updates the metadata from an invoice.
///
@@ -237,6 +94,37 @@ public Models.GetInvoiceResponse GetPartialInvoice(
.Template(_template => _template.Setup("subscription_id", subscriptionId))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
+ ///
+ /// Cancels an invoice.
+ ///
+ /// Required parameter: Invoice id.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetInvoiceResponse response from the API call.
+ public Models.GetInvoiceResponse CancelInvoice(
+ string invoiceId,
+ string idempotencyKey = null)
+ => CoreHelper.RunTask(CancelInvoiceAsync(invoiceId, idempotencyKey));
+
+ ///
+ /// Cancels an invoice.
+ ///
+ /// Required parameter: Invoice id.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetInvoiceResponse response from the API call.
+ public async Task CancelInvoiceAsync(
+ string invoiceId,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Delete, "/invoices/{invoice_id}")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Template(_template => _template.Setup("invoice_id", invoiceId))
+ .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
///
/// Create an Invoice.
///
@@ -278,6 +166,82 @@ public Models.GetInvoiceResponse CreateInvoice(
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
+ ///
+ /// Gets all invoices.
+ ///
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// Optional parameter: Filter for Invoice's code.
+ /// Optional parameter: Filter for Invoice's customer id.
+ /// Optional parameter: Filter for Invoice's subscription id.
+ /// Optional parameter: Filter for Invoice's creation date start range.
+ /// Optional parameter: Filter for Invoices creation date end range.
+ /// Optional parameter: Filter for Invoice's status.
+ /// Optional parameter: Filter for Invoice's due date start range.
+ /// Optional parameter: Filter for Invoice's due date end range.
+ /// Optional parameter: Example: .
+ /// Returns the Models.ListInvoicesResponse response from the API call.
+ public Models.ListInvoicesResponse GetInvoices(
+ int? page = null,
+ int? size = null,
+ string code = null,
+ string customerId = null,
+ string subscriptionId = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null,
+ string status = null,
+ DateTime? dueSince = null,
+ DateTime? dueUntil = null,
+ string customerDocument = null)
+ => CoreHelper.RunTask(GetInvoicesAsync(page, size, code, customerId, subscriptionId, createdSince, createdUntil, status, dueSince, dueUntil, customerDocument));
+
+ ///
+ /// Gets all invoices.
+ ///
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// Optional parameter: Filter for Invoice's code.
+ /// Optional parameter: Filter for Invoice's customer id.
+ /// Optional parameter: Filter for Invoice's subscription id.
+ /// Optional parameter: Filter for Invoice's creation date start range.
+ /// Optional parameter: Filter for Invoices creation date end range.
+ /// Optional parameter: Filter for Invoice's status.
+ /// Optional parameter: Filter for Invoice's due date start range.
+ /// Optional parameter: Filter for Invoice's due date end range.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.ListInvoicesResponse response from the API call.
+ public async Task GetInvoicesAsync(
+ int? page = null,
+ int? size = null,
+ string code = null,
+ string customerId = null,
+ string subscriptionId = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null,
+ string status = null,
+ DateTime? dueSince = null,
+ DateTime? dueUntil = null,
+ string customerDocument = null,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Get, "/invoices")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Query(_query => _query.Setup("page", page))
+ .Query(_query => _query.Setup("size", size))
+ .Query(_query => _query.Setup("code", code))
+ .Query(_query => _query.Setup("customer_id", customerId))
+ .Query(_query => _query.Setup("subscription_id", subscriptionId))
+ .Query(_query => _query.Setup("created_since", createdSince.HasValue ? createdSince.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
+ .Query(_query => _query.Setup("created_until", createdUntil.HasValue ? createdUntil.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
+ .Query(_query => _query.Setup("status", status))
+ .Query(_query => _query.Setup("due_since", dueSince.HasValue ? dueSince.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
+ .Query(_query => _query.Setup("due_until", dueUntil.HasValue ? dueUntil.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
+ .Query(_query => _query.Setup("customer_document", customerDocument))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
///
/// Gets an invoice.
///
@@ -303,5 +267,41 @@ public Models.GetInvoiceResponse GetInvoice(
.Parameters(_parameters => _parameters
.Template(_template => _template.Setup("invoice_id", invoiceId))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
+ ///
+ /// Updates the status from an invoice.
+ ///
+ /// Required parameter: Invoice Id.
+ /// Required parameter: Request for updating an invoice's status.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetInvoiceResponse response from the API call.
+ public Models.GetInvoiceResponse UpdateInvoiceStatus(
+ string invoiceId,
+ Models.UpdateInvoiceStatusRequest request,
+ string idempotencyKey = null)
+ => CoreHelper.RunTask(UpdateInvoiceStatusAsync(invoiceId, request, idempotencyKey));
+
+ ///
+ /// Updates the status from an invoice.
+ ///
+ /// Required parameter: Invoice Id.
+ /// Required parameter: Request for updating an invoice's status.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetInvoiceResponse response from the API call.
+ public async Task UpdateInvoiceStatusAsync(
+ string invoiceId,
+ Models.UpdateInvoiceStatusRequest request,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(new HttpMethod("PATCH"), "/invoices/{invoice_id}/status")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Body(_bodyParameter => _bodyParameter.Setup(request))
+ .Template(_template => _template.Setup("invoice_id", invoiceId))
+ .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
}
}
\ No newline at end of file
diff --git a/PagarmeApiSDK.Standard/Controllers/OrdersController.cs b/PagarmeApiSDK.Standard/Controllers/OrdersController.cs
index 92b6f8b..13d5017 100644
--- a/PagarmeApiSDK.Standard/Controllers/OrdersController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/OrdersController.cs
@@ -32,166 +32,6 @@ internal class OrdersController : BaseController, IOrdersController
///
internal OrdersController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { }
- ///
- /// DeleteAllOrderItems EndPoint.
- ///
- /// Required parameter: Order Id.
- /// Optional parameter: Example: .
- /// Returns the Models.GetOrderResponse response from the API call.
- public Models.GetOrderResponse DeleteAllOrderItems(
- string orderId,
- string idempotencyKey = null)
- => CoreHelper.RunTask(DeleteAllOrderItemsAsync(orderId, idempotencyKey));
-
- ///
- /// DeleteAllOrderItems EndPoint.
- ///
- /// Required parameter: Order Id.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetOrderResponse response from the API call.
- public async Task DeleteAllOrderItemsAsync(
- string orderId,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Delete, "/orders/{orderId}/items")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("orderId", orderId))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
- ///
- /// GetOrderItem EndPoint.
- ///
- /// Required parameter: Order Id.
- /// Required parameter: Item Id.
- /// Returns the Models.GetOrderItemResponse response from the API call.
- public Models.GetOrderItemResponse GetOrderItem(
- string orderId,
- string itemId)
- => CoreHelper.RunTask(GetOrderItemAsync(orderId, itemId));
-
- ///
- /// GetOrderItem EndPoint.
- ///
- /// Required parameter: Order Id.
- /// Required parameter: Item Id.
- /// cancellationToken.
- /// Returns the Models.GetOrderItemResponse response from the API call.
- public async Task GetOrderItemAsync(
- string orderId,
- string itemId,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/orders/{orderId}/items/{itemId}")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("orderId", orderId))
- .Template(_template => _template.Setup("itemId", itemId))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
- ///
- /// Updates the metadata from an order.
- ///
- /// Required parameter: The order id.
- /// Required parameter: Request for updating the order metadata.
- /// Optional parameter: Example: .
- /// Returns the Models.GetOrderResponse response from the API call.
- public Models.GetOrderResponse UpdateOrderMetadata(
- string orderId,
- Models.UpdateMetadataRequest request,
- string idempotencyKey = null)
- => CoreHelper.RunTask(UpdateOrderMetadataAsync(orderId, request, idempotencyKey));
-
- ///
- /// Updates the metadata from an order.
- ///
- /// Required parameter: The order id.
- /// Required parameter: Request for updating the order metadata.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetOrderResponse response from the API call.
- public async Task UpdateOrderMetadataAsync(
- string orderId,
- Models.UpdateMetadataRequest request,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(new HttpMethod("PATCH"), "/Orders/{order_id}/metadata")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Body(_bodyParameter => _bodyParameter.Setup(request))
- .Template(_template => _template.Setup("order_id", orderId))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
- ///
- /// DeleteOrderItem EndPoint.
- ///
- /// Required parameter: Order Id.
- /// Required parameter: Item Id.
- /// Optional parameter: Example: .
- /// Returns the Models.GetOrderItemResponse response from the API call.
- public Models.GetOrderItemResponse DeleteOrderItem(
- string orderId,
- string itemId,
- string idempotencyKey = null)
- => CoreHelper.RunTask(DeleteOrderItemAsync(orderId, itemId, idempotencyKey));
-
- ///
- /// DeleteOrderItem EndPoint.
- ///
- /// Required parameter: Order Id.
- /// Required parameter: Item Id.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetOrderItemResponse response from the API call.
- public async Task DeleteOrderItemAsync(
- string orderId,
- string itemId,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Delete, "/orders/{orderId}/items/{itemId}")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("orderId", orderId))
- .Template(_template => _template.Setup("itemId", itemId))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
- ///
- /// Gets an order.
- ///
- /// Required parameter: Order id.
- /// Returns the Models.GetOrderResponse response from the API call.
- public Models.GetOrderResponse GetOrder(
- string orderId)
- => CoreHelper.RunTask(GetOrderAsync(orderId));
-
- ///
- /// Gets an order.
- ///
- /// Required parameter: Order id.
- /// cancellationToken.
- /// Returns the Models.GetOrderResponse response from the API call.
- public async Task GetOrderAsync(
- string orderId,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/orders/{order_id}")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("order_id", orderId))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
///
/// Gets all orders.
///
@@ -289,6 +129,73 @@ public Models.GetOrderItemResponse UpdateOrderItem(
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
+ ///
+ /// DeleteAllOrderItems EndPoint.
+ ///
+ /// Required parameter: Order Id.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetOrderResponse response from the API call.
+ public Models.GetOrderResponse DeleteAllOrderItems(
+ string orderId,
+ string idempotencyKey = null)
+ => CoreHelper.RunTask(DeleteAllOrderItemsAsync(orderId, idempotencyKey));
+
+ ///
+ /// DeleteAllOrderItems EndPoint.
+ ///
+ /// Required parameter: Order Id.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetOrderResponse response from the API call.
+ public async Task DeleteAllOrderItemsAsync(
+ string orderId,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Delete, "/orders/{orderId}/items")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Template(_template => _template.Setup("orderId", orderId))
+ .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
+ ///
+ /// DeleteOrderItem EndPoint.
+ ///
+ /// Required parameter: Order Id.
+ /// Required parameter: Item Id.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetOrderItemResponse response from the API call.
+ public Models.GetOrderItemResponse DeleteOrderItem(
+ string orderId,
+ string itemId,
+ string idempotencyKey = null)
+ => CoreHelper.RunTask(DeleteOrderItemAsync(orderId, itemId, idempotencyKey));
+
+ ///
+ /// DeleteOrderItem EndPoint.
+ ///
+ /// Required parameter: Order Id.
+ /// Required parameter: Item Id.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetOrderItemResponse response from the API call.
+ public async Task DeleteOrderItemAsync(
+ string orderId,
+ string itemId,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Delete, "/orders/{orderId}/items/{itemId}")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Template(_template => _template.Setup("orderId", orderId))
+ .Template(_template => _template.Setup("itemId", itemId))
+ .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
///
/// CloseOrder EndPoint.
///
@@ -391,5 +298,98 @@ public Models.GetOrderItemResponse CreateOrderItem(
.Template(_template => _template.Setup("orderId", orderId))
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
+ ///
+ /// GetOrderItem EndPoint.
+ ///
+ /// Required parameter: Order Id.
+ /// Required parameter: Item Id.
+ /// Returns the Models.GetOrderItemResponse response from the API call.
+ public Models.GetOrderItemResponse GetOrderItem(
+ string orderId,
+ string itemId)
+ => CoreHelper.RunTask(GetOrderItemAsync(orderId, itemId));
+
+ ///
+ /// GetOrderItem EndPoint.
+ ///
+ /// Required parameter: Order Id.
+ /// Required parameter: Item Id.
+ /// cancellationToken.
+ /// Returns the Models.GetOrderItemResponse response from the API call.
+ public async Task GetOrderItemAsync(
+ string orderId,
+ string itemId,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Get, "/orders/{orderId}/items/{itemId}")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Template(_template => _template.Setup("orderId", orderId))
+ .Template(_template => _template.Setup("itemId", itemId))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
+ ///
+ /// Updates the metadata from an order.
+ ///
+ /// Required parameter: The order id.
+ /// Required parameter: Request for updating the order metadata.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetOrderResponse response from the API call.
+ public Models.GetOrderResponse UpdateOrderMetadata(
+ string orderId,
+ Models.UpdateMetadataRequest request,
+ string idempotencyKey = null)
+ => CoreHelper.RunTask(UpdateOrderMetadataAsync(orderId, request, idempotencyKey));
+
+ ///
+ /// Updates the metadata from an order.
+ ///
+ /// Required parameter: The order id.
+ /// Required parameter: Request for updating the order metadata.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetOrderResponse response from the API call.
+ public async Task UpdateOrderMetadataAsync(
+ string orderId,
+ Models.UpdateMetadataRequest request,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(new HttpMethod("PATCH"), "/Orders/{order_id}/metadata")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Body(_bodyParameter => _bodyParameter.Setup(request))
+ .Template(_template => _template.Setup("order_id", orderId))
+ .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
+ ///
+ /// Gets an order.
+ ///
+ /// Required parameter: Order id.
+ /// Returns the Models.GetOrderResponse response from the API call.
+ public Models.GetOrderResponse GetOrder(
+ string orderId)
+ => CoreHelper.RunTask(GetOrderAsync(orderId));
+
+ ///
+ /// Gets an order.
+ ///
+ /// Required parameter: Order id.
+ /// cancellationToken.
+ /// Returns the Models.GetOrderResponse response from the API call.
+ public async Task GetOrderAsync(
+ string orderId,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Get, "/orders/{order_id}")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Template(_template => _template.Setup("order_id", orderId))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
}
}
\ No newline at end of file
diff --git a/PagarmeApiSDK.Standard/Controllers/PlansController.cs b/PagarmeApiSDK.Standard/Controllers/PlansController.cs
index 154d70a..8e47dcb 100644
--- a/PagarmeApiSDK.Standard/Controllers/PlansController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/PlansController.cs
@@ -59,38 +59,33 @@ public Models.GetPlanResponse GetPlan(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Removes an item from a plan.
+ /// Deletes a plan.
///
/// Required parameter: Plan id.
- /// Required parameter: Plan item id.
/// Optional parameter: Example: .
- /// Returns the Models.GetPlanItemResponse response from the API call.
- public Models.GetPlanItemResponse DeletePlanItem(
+ /// Returns the Models.GetPlanResponse response from the API call.
+ public Models.GetPlanResponse DeletePlan(
string planId,
- string planItemId,
string idempotencyKey = null)
- => CoreHelper.RunTask(DeletePlanItemAsync(planId, planItemId, idempotencyKey));
+ => CoreHelper.RunTask(DeletePlanAsync(planId, idempotencyKey));
///
- /// Removes an item from a plan.
+ /// Deletes a plan.
///
/// Required parameter: Plan id.
- /// Required parameter: Plan item id.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetPlanItemResponse response from the API call.
- public async Task DeletePlanItemAsync(
+ /// Returns the Models.GetPlanResponse response from the API call.
+ public async Task DeletePlanAsync(
string planId,
- string planItemId,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Delete, "/plans/{plan_id}/items/{plan_item_id}")
+ .Setup(HttpMethod.Delete, "/plans/{plan_id}")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Template(_template => _template.Setup("plan_id", planId))
- .Template(_template => _template.Setup("plan_item_id", planItemId))
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
@@ -131,65 +126,75 @@ public Models.GetPlanResponse UpdatePlanMetadata(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Creates a new plan.
+ /// Updates a plan item.
///
- /// Required parameter: Request for creating a plan.
+ /// Required parameter: Plan id.
+ /// Required parameter: Plan item id.
+ /// Required parameter: Request for updating the plan item.
/// Optional parameter: Example: .
- /// Returns the Models.GetPlanResponse response from the API call.
- public Models.GetPlanResponse CreatePlan(
- Models.CreatePlanRequest body,
+ /// Returns the Models.GetPlanItemResponse response from the API call.
+ public Models.GetPlanItemResponse UpdatePlanItem(
+ string planId,
+ string planItemId,
+ Models.UpdatePlanItemRequest body,
string idempotencyKey = null)
- => CoreHelper.RunTask(CreatePlanAsync(body, idempotencyKey));
+ => CoreHelper.RunTask(UpdatePlanItemAsync(planId, planItemId, body, idempotencyKey));
///
- /// Creates a new plan.
+ /// Updates a plan item.
///
- /// Required parameter: Request for creating a plan.
+ /// Required parameter: Plan id.
+ /// Required parameter: Plan item id.
+ /// Required parameter: Request for updating the plan item.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetPlanResponse response from the API call.
- public async Task CreatePlanAsync(
- Models.CreatePlanRequest body,
+ /// Returns the Models.GetPlanItemResponse response from the API call.
+ public async Task UpdatePlanItemAsync(
+ string planId,
+ string planItemId,
+ Models.UpdatePlanItemRequest body,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Post, "/plans")
+ .Setup(HttpMethod.Put, "/plans/{plan_id}/items/{plan_item_id}")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(body))
+ .Template(_template => _template.Setup("plan_id", planId))
+ .Template(_template => _template.Setup("plan_item_id", planItemId))
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Updates a plan.
+ /// Adds a new item to a plan.
///
/// Required parameter: Plan id.
- /// Required parameter: Request for updating a plan.
+ /// Required parameter: Request for creating a plan item.
/// Optional parameter: Example: .
- /// Returns the Models.GetPlanResponse response from the API call.
- public Models.GetPlanResponse UpdatePlan(
+ /// Returns the Models.GetPlanItemResponse response from the API call.
+ public Models.GetPlanItemResponse CreatePlanItem(
string planId,
- Models.UpdatePlanRequest request,
+ Models.CreatePlanItemRequest request,
string idempotencyKey = null)
- => CoreHelper.RunTask(UpdatePlanAsync(planId, request, idempotencyKey));
+ => CoreHelper.RunTask(CreatePlanItemAsync(planId, request, idempotencyKey));
///
- /// Updates a plan.
+ /// Adds a new item to a plan.
///
/// Required parameter: Plan id.
- /// Required parameter: Request for updating a plan.
+ /// Required parameter: Request for creating a plan item.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetPlanResponse response from the API call.
- public async Task UpdatePlanAsync(
+ /// Returns the Models.GetPlanItemResponse response from the API call.
+ public async Task CreatePlanItemAsync(
string planId,
- Models.UpdatePlanRequest request,
+ Models.CreatePlanItemRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Put, "/plans/{plan_id}")
+ .Setup(HttpMethod.Post, "/plans/{plan_id}/items")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(request))
@@ -198,33 +203,100 @@ public Models.GetPlanResponse UpdatePlan(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Deletes a plan.
+ /// Gets a plan item.
+ ///
+ /// Required parameter: Plan id.
+ /// Required parameter: Plan item id.
+ /// Returns the Models.GetPlanItemResponse response from the API call.
+ public Models.GetPlanItemResponse GetPlanItem(
+ string planId,
+ string planItemId)
+ => CoreHelper.RunTask(GetPlanItemAsync(planId, planItemId));
+
+ ///
+ /// Gets a plan item.
///
/// Required parameter: Plan id.
+ /// Required parameter: Plan item id.
+ /// cancellationToken.
+ /// Returns the Models.GetPlanItemResponse response from the API call.
+ public async Task GetPlanItemAsync(
+ string planId,
+ string planItemId,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Get, "/plans/{plan_id}/items/{plan_item_id}")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Template(_template => _template.Setup("plan_id", planId))
+ .Template(_template => _template.Setup("plan_item_id", planItemId))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
+ ///
+ /// Creates a new plan.
+ ///
+ /// Required parameter: Request for creating a plan.
/// Optional parameter: Example: .
/// Returns the Models.GetPlanResponse response from the API call.
- public Models.GetPlanResponse DeletePlan(
+ public Models.GetPlanResponse CreatePlan(
+ Models.CreatePlanRequest body,
+ string idempotencyKey = null)
+ => CoreHelper.RunTask(CreatePlanAsync(body, idempotencyKey));
+
+ ///
+ /// Creates a new plan.
+ ///
+ /// Required parameter: Request for creating a plan.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetPlanResponse response from the API call.
+ public async Task CreatePlanAsync(
+ Models.CreatePlanRequest body,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Post, "/plans")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Body(_bodyParameter => _bodyParameter.Setup(body))
+ .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
+ ///
+ /// Removes an item from a plan.
+ ///
+ /// Required parameter: Plan id.
+ /// Required parameter: Plan item id.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetPlanItemResponse response from the API call.
+ public Models.GetPlanItemResponse DeletePlanItem(
string planId,
+ string planItemId,
string idempotencyKey = null)
- => CoreHelper.RunTask(DeletePlanAsync(planId, idempotencyKey));
+ => CoreHelper.RunTask(DeletePlanItemAsync(planId, planItemId, idempotencyKey));
///
- /// Deletes a plan.
+ /// Removes an item from a plan.
///
/// Required parameter: Plan id.
+ /// Required parameter: Plan item id.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetPlanResponse response from the API call.
- public async Task DeletePlanAsync(
+ /// Returns the Models.GetPlanItemResponse response from the API call.
+ public async Task DeletePlanItemAsync(
string planId,
+ string planItemId,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Delete, "/plans/{plan_id}")
+ .Setup(HttpMethod.Delete, "/plans/{plan_id}/items/{plan_item_id}")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Template(_template => _template.Setup("plan_id", planId))
+ .Template(_template => _template.Setup("plan_item_id", planItemId))
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
@@ -285,111 +357,39 @@ public Models.ListPlansResponse GetPlans(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Updates a plan item.
- ///
- /// Required parameter: Plan id.
- /// Required parameter: Plan item id.
- /// Required parameter: Request for updating the plan item.
- /// Optional parameter: Example: .
- /// Returns the Models.GetPlanItemResponse response from the API call.
- public Models.GetPlanItemResponse UpdatePlanItem(
- string planId,
- string planItemId,
- Models.UpdatePlanItemRequest body,
- string idempotencyKey = null)
- => CoreHelper.RunTask(UpdatePlanItemAsync(planId, planItemId, body, idempotencyKey));
-
- ///
- /// Updates a plan item.
- ///
- /// Required parameter: Plan id.
- /// Required parameter: Plan item id.
- /// Required parameter: Request for updating the plan item.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetPlanItemResponse response from the API call.
- public async Task UpdatePlanItemAsync(
- string planId,
- string planItemId,
- Models.UpdatePlanItemRequest body,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Put, "/plans/{plan_id}/items/{plan_item_id}")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Body(_bodyParameter => _bodyParameter.Setup(body))
- .Template(_template => _template.Setup("plan_id", planId))
- .Template(_template => _template.Setup("plan_item_id", planItemId))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
- ///
- /// Adds a new item to a plan.
+ /// Updates a plan.
///
/// Required parameter: Plan id.
- /// Required parameter: Request for creating a plan item.
+ /// Required parameter: Request for updating a plan.
/// Optional parameter: Example: .
- /// Returns the Models.GetPlanItemResponse response from the API call.
- public Models.GetPlanItemResponse CreatePlanItem(
+ /// Returns the Models.GetPlanResponse response from the API call.
+ public Models.GetPlanResponse UpdatePlan(
string planId,
- Models.CreatePlanItemRequest request,
+ Models.UpdatePlanRequest request,
string idempotencyKey = null)
- => CoreHelper.RunTask(CreatePlanItemAsync(planId, request, idempotencyKey));
+ => CoreHelper.RunTask(UpdatePlanAsync(planId, request, idempotencyKey));
///
- /// Adds a new item to a plan.
+ /// Updates a plan.
///
/// Required parameter: Plan id.
- /// Required parameter: Request for creating a plan item.
+ /// Required parameter: Request for updating a plan.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetPlanItemResponse response from the API call.
- public async Task CreatePlanItemAsync(
+ /// Returns the Models.GetPlanResponse response from the API call.
+ public async Task UpdatePlanAsync(
string planId,
- Models.CreatePlanItemRequest request,
+ Models.UpdatePlanRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Post, "/plans/{plan_id}/items")
+ .Setup(HttpMethod.Put, "/plans/{plan_id}")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(request))
.Template(_template => _template.Setup("plan_id", planId))
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
- ///
- /// Gets a plan item.
- ///
- /// Required parameter: Plan id.
- /// Required parameter: Plan item id.
- /// Returns the Models.GetPlanItemResponse response from the API call.
- public Models.GetPlanItemResponse GetPlanItem(
- string planId,
- string planItemId)
- => CoreHelper.RunTask(GetPlanItemAsync(planId, planItemId));
-
- ///
- /// Gets a plan item.
- ///
- /// Required parameter: Plan id.
- /// Required parameter: Plan item id.
- /// cancellationToken.
- /// Returns the Models.GetPlanItemResponse response from the API call.
- public async Task GetPlanItemAsync(
- string planId,
- string planItemId,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/plans/{plan_id}/items/{plan_item_id}")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("plan_id", planId))
- .Template(_template => _template.Setup("plan_item_id", planItemId))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
}
}
\ No newline at end of file
diff --git a/PagarmeApiSDK.Standard/Controllers/RecipientsController.cs b/PagarmeApiSDK.Standard/Controllers/RecipientsController.cs
index 372f2e9..fdd36ab 100644
--- a/PagarmeApiSDK.Standard/Controllers/RecipientsController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/RecipientsController.cs
@@ -69,86 +69,75 @@ public Models.GetRecipientResponse UpdateRecipient(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// GetWithdrawById EndPoint.
+ /// Creates an anticipation.
///
- /// Required parameter: Example: .
- /// Required parameter: Example: .
- /// Returns the Models.GetWithdrawResponse response from the API call.
- public Models.GetWithdrawResponse GetWithdrawById(
+ /// Required parameter: Recipient id.
+ /// Required parameter: Anticipation data.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetAnticipationResponse response from the API call.
+ public Models.GetAnticipationResponse CreateAnticipation(
string recipientId,
- string withdrawalId)
- => CoreHelper.RunTask(GetWithdrawByIdAsync(recipientId, withdrawalId));
+ Models.CreateAnticipationRequest request,
+ string idempotencyKey = null)
+ => CoreHelper.RunTask(CreateAnticipationAsync(recipientId, request, idempotencyKey));
///
- /// GetWithdrawById EndPoint.
+ /// Creates an anticipation.
///
- /// Required parameter: Example: .
- /// Required parameter: Example: .
+ /// Required parameter: Recipient id.
+ /// Required parameter: Anticipation data.
+ /// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetWithdrawResponse response from the API call.
- public async Task GetWithdrawByIdAsync(
+ /// Returns the Models.GetAnticipationResponse response from the API call.
+ public async Task CreateAnticipationAsync(
string recipientId,
- string withdrawalId,
+ Models.CreateAnticipationRequest request,
+ string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/recipients/{recipient_id}/withdrawals/{withdrawal_id}")
+ .Setup(HttpMethod.Post, "/recipients/{recipient_id}/anticipations")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
+ .Body(_bodyParameter => _bodyParameter.Setup(request))
.Template(_template => _template.Setup("recipient_id", recipientId))
- .Template(_template => _template.Setup("withdrawal_id", withdrawalId))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
- ///
- /// Retrieves recipient information.
- ///
- /// Required parameter: Recipiend id.
- /// Returns the Models.GetRecipientResponse response from the API call.
- public Models.GetRecipientResponse GetRecipient(
- string recipientId)
- => CoreHelper.RunTask(GetRecipientAsync(recipientId));
-
- ///
- /// Retrieves recipient information.
- ///
- /// Required parameter: Recipiend id.
- /// cancellationToken.
- /// Returns the Models.GetRecipientResponse response from the API call.
- public async Task GetRecipientAsync(
- string recipientId,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/recipients/{recipient_id}")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("recipient_id", recipientId))))
+ .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Get balance information for a recipient.
+ /// Gets the anticipation limits for a recipient.
///
/// Required parameter: Recipient id.
- /// Returns the Models.GetBalanceResponse response from the API call.
- public Models.GetBalanceResponse GetBalance(
- string recipientId)
- => CoreHelper.RunTask(GetBalanceAsync(recipientId));
+ /// Required parameter: Timeframe.
+ /// Required parameter: Anticipation payment date.
+ /// Returns the Models.GetAnticipationLimitResponse response from the API call.
+ public Models.GetAnticipationLimitResponse GetAnticipationLimits(
+ string recipientId,
+ string timeframe,
+ DateTime paymentDate)
+ => CoreHelper.RunTask(GetAnticipationLimitsAsync(recipientId, timeframe, paymentDate));
///
- /// Get balance information for a recipient.
+ /// Gets the anticipation limits for a recipient.
///
/// Required parameter: Recipient id.
+ /// Required parameter: Timeframe.
+ /// Required parameter: Anticipation payment date.
/// cancellationToken.
- /// Returns the Models.GetBalanceResponse response from the API call.
- public async Task GetBalanceAsync(
+ /// Returns the Models.GetAnticipationLimitResponse response from the API call.
+ public async Task GetAnticipationLimitsAsync(
string recipientId,
+ string timeframe,
+ DateTime paymentDate,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/recipients/{recipient_id}/balance")
+ .Setup(HttpMethod.Get, "/recipients/{recipient_id}/anticipation_limits")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("recipient_id", recipientId))))
+ .Template(_template => _template.Setup("recipient_id", recipientId))
+ .Query(_query => _query.Setup("timeframe", timeframe))
+ .Query(_query => _query.Setup("payment_date", paymentDate.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK")))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
@@ -182,6 +171,37 @@ public Models.ListRecipientResponse GetRecipients(
.Query(_query => _query.Setup("size", size))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
+ ///
+ /// GetWithdrawById EndPoint.
+ ///
+ /// Required parameter: Example: .
+ /// Required parameter: Example: .
+ /// Returns the Models.GetWithdrawResponse response from the API call.
+ public Models.GetWithdrawResponse GetWithdrawById(
+ string recipientId,
+ string withdrawalId)
+ => CoreHelper.RunTask(GetWithdrawByIdAsync(recipientId, withdrawalId));
+
+ ///
+ /// GetWithdrawById EndPoint.
+ ///
+ /// Required parameter: Example: .
+ /// Required parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetWithdrawResponse response from the API call.
+ public async Task GetWithdrawByIdAsync(
+ string recipientId,
+ string withdrawalId,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Get, "/recipients/{recipient_id}/withdrawals/{withdrawal_id}")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Template(_template => _template.Setup("recipient_id", recipientId))
+ .Template(_template => _template.Setup("withdrawal_id", withdrawalId))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
///
/// Updates the default bank account from a recipient.
///
@@ -218,6 +238,42 @@ public Models.GetRecipientResponse UpdateRecipientDefaultBankAccount(
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
+ ///
+ /// Updates recipient metadata.
+ ///
+ /// Required parameter: Recipient id.
+ /// Required parameter: Metadata.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetRecipientResponse response from the API call.
+ public Models.GetRecipientResponse UpdateRecipientMetadata(
+ string recipientId,
+ Models.UpdateMetadataRequest request,
+ string idempotencyKey = null)
+ => CoreHelper.RunTask(UpdateRecipientMetadataAsync(recipientId, request, idempotencyKey));
+
+ ///
+ /// Updates recipient metadata.
+ ///
+ /// Required parameter: Recipient id.
+ /// Required parameter: Metadata.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetRecipientResponse response from the API call.
+ public async Task UpdateRecipientMetadataAsync(
+ string recipientId,
+ Models.UpdateMetadataRequest request,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(new HttpMethod("PATCH"), "/recipients/{recipient_id}/metadata")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Body(_bodyParameter => _bodyParameter.Setup(request))
+ .Template(_template => _template.Setup("recipient_id", recipientId))
+ .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
///
/// Gets a paginated list of transfers for the recipient.
///
@@ -331,6 +387,42 @@ public Models.GetWithdrawResponse CreateWithdraw(
.Template(_template => _template.Setup("recipient_id", recipientId))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
+ ///
+ /// Updates recipient metadata.
+ ///
+ /// Required parameter: Recipient id.
+ /// Required parameter: Metadata.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetRecipientResponse response from the API call.
+ public Models.GetRecipientResponse UpdateAutomaticAnticipationSettings(
+ string recipientId,
+ Models.UpdateAutomaticAnticipationSettingsRequest request,
+ string idempotencyKey = null)
+ => CoreHelper.RunTask(UpdateAutomaticAnticipationSettingsAsync(recipientId, request, idempotencyKey));
+
+ ///
+ /// Updates recipient metadata.
+ ///
+ /// Required parameter: Recipient id.
+ /// Required parameter: Metadata.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetRecipientResponse response from the API call.
+ public async Task UpdateAutomaticAnticipationSettingsAsync(
+ string recipientId,
+ Models.UpdateAutomaticAnticipationSettingsRequest request,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(new HttpMethod("PATCH"), "/recipients/{recipient_id}/automatic-anticipation-settings")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Body(_bodyParameter => _bodyParameter.Setup(request))
+ .Template(_template => _template.Setup("recipient_id", recipientId))
+ .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
///
/// Gets an anticipation.
///
@@ -399,65 +491,172 @@ public Models.GetRecipientResponse UpdateRecipientTransferSettings(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Retrieves recipient information.
+ /// Retrieves a paginated list of anticipations from a recipient.
///
- /// Required parameter: Recipient code.
- /// Returns the Models.GetRecipientResponse response from the API call.
- public Models.GetRecipientResponse GetRecipientByCode(
- string code)
- => CoreHelper.RunTask(GetRecipientByCodeAsync(code));
+ /// Required parameter: Recipient id.
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// Optional parameter: Filter for anticipation status.
+ /// Optional parameter: Filter for anticipation timeframe.
+ /// Optional parameter: Filter for start range for anticipation payment date.
+ /// Optional parameter: Filter for end range for anticipation payment date.
+ /// Optional parameter: Filter for start range for anticipation creation date.
+ /// Optional parameter: Filter for end range for anticipation creation date.
+ /// Returns the Models.ListAnticipationResponse response from the API call.
+ public Models.ListAnticipationResponse GetAnticipations(
+ string recipientId,
+ int? page = null,
+ int? size = null,
+ string status = null,
+ string timeframe = null,
+ DateTime? paymentDateSince = null,
+ DateTime? paymentDateUntil = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null)
+ => CoreHelper.RunTask(GetAnticipationsAsync(recipientId, page, size, status, timeframe, paymentDateSince, paymentDateUntil, createdSince, createdUntil));
///
- /// Retrieves recipient information.
+ /// Retrieves a paginated list of anticipations from a recipient.
///
- /// Required parameter: Recipient code.
+ /// Required parameter: Recipient id.
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// Optional parameter: Filter for anticipation status.
+ /// Optional parameter: Filter for anticipation timeframe.
+ /// Optional parameter: Filter for start range for anticipation payment date.
+ /// Optional parameter: Filter for end range for anticipation payment date.
+ /// Optional parameter: Filter for start range for anticipation creation date.
+ /// Optional parameter: Filter for end range for anticipation creation date.
/// cancellationToken.
- /// Returns the Models.GetRecipientResponse response from the API call.
- public async Task GetRecipientByCodeAsync(
- string code,
+ /// Returns the Models.ListAnticipationResponse response from the API call.
+ public async Task GetAnticipationsAsync(
+ string recipientId,
+ int? page = null,
+ int? size = null,
+ string status = null,
+ string timeframe = null,
+ DateTime? paymentDateSince = null,
+ DateTime? paymentDateUntil = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/recipients/{code}")
+ .Setup(HttpMethod.Get, "/recipients/{recipient_id}/anticipations")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("code", code))))
+ .Template(_template => _template.Setup("recipient_id", recipientId))
+ .Query(_query => _query.Setup("page", page))
+ .Query(_query => _query.Setup("size", size))
+ .Query(_query => _query.Setup("status", status))
+ .Query(_query => _query.Setup("timeframe", timeframe))
+ .Query(_query => _query.Setup("payment_date_since", paymentDateSince.HasValue ? paymentDateSince.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
+ .Query(_query => _query.Setup("payment_date_until", paymentDateUntil.HasValue ? paymentDateUntil.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
+ .Query(_query => _query.Setup("created_since", createdSince.HasValue ? createdSince.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
+ .Query(_query => _query.Setup("created_until", createdUntil.HasValue ? createdUntil.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Updates recipient metadata.
+ /// Retrieves recipient information.
///
- /// Required parameter: Recipient id.
- /// Required parameter: Metadata.
- /// Optional parameter: Example: .
+ /// Required parameter: Recipiend id.
/// Returns the Models.GetRecipientResponse response from the API call.
- public Models.GetRecipientResponse UpdateAutomaticAnticipationSettings(
- string recipientId,
- Models.UpdateAutomaticAnticipationSettingsRequest request,
- string idempotencyKey = null)
- => CoreHelper.RunTask(UpdateAutomaticAnticipationSettingsAsync(recipientId, request, idempotencyKey));
+ public Models.GetRecipientResponse GetRecipient(
+ string recipientId)
+ => CoreHelper.RunTask(GetRecipientAsync(recipientId));
///
- /// Updates recipient metadata.
+ /// Retrieves recipient information.
///
- /// Required parameter: Recipient id.
- /// Required parameter: Metadata.
- /// Optional parameter: Example: .
+ /// Required parameter: Recipiend id.
/// cancellationToken.
/// Returns the Models.GetRecipientResponse response from the API call.
- public async Task UpdateAutomaticAnticipationSettingsAsync(
+ public async Task GetRecipientAsync(
string recipientId,
- Models.UpdateAutomaticAnticipationSettingsRequest request,
- string idempotencyKey = null,
CancellationToken cancellationToken = default)
=> await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(new HttpMethod("PATCH"), "/recipients/{recipient_id}/automatic-anticipation-settings")
+ .Setup(HttpMethod.Get, "/recipients/{recipient_id}")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Template(_template => _template.Setup("recipient_id", recipientId))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
+ ///
+ /// Get balance information for a recipient.
+ ///
+ /// Required parameter: Recipient id.
+ /// Returns the Models.GetBalanceResponse response from the API call.
+ public Models.GetBalanceResponse GetBalance(
+ string recipientId)
+ => CoreHelper.RunTask(GetBalanceAsync(recipientId));
+
+ ///
+ /// Get balance information for a recipient.
+ ///
+ /// Required parameter: Recipient id.
+ /// cancellationToken.
+ /// Returns the Models.GetBalanceResponse response from the API call.
+ public async Task GetBalanceAsync(
+ string recipientId,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Get, "/recipients/{recipient_id}/balance")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Template(_template => _template.Setup("recipient_id", recipientId))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
+ ///
+ /// Gets a paginated list of transfers for the recipient.
+ ///
+ /// Required parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Returns the Models.ListWithdrawals response from the API call.
+ public Models.ListWithdrawals GetWithdrawals(
+ string recipientId,
+ int? page = null,
+ int? size = null,
+ string status = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null)
+ => CoreHelper.RunTask(GetWithdrawalsAsync(recipientId, page, size, status, createdSince, createdUntil));
+
+ ///
+ /// Gets a paginated list of transfers for the recipient.
+ ///
+ /// Required parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.ListWithdrawals response from the API call.
+ public async Task GetWithdrawalsAsync(
+ string recipientId,
+ int? page = null,
+ int? size = null,
+ string status = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Get, "/recipients/{recipient_id}/withdrawals")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Body(_bodyParameter => _bodyParameter.Setup(request))
.Template(_template => _template.Setup("recipient_id", recipientId))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .Query(_query => _query.Setup("page", page))
+ .Query(_query => _query.Setup("size", size))
+ .Query(_query => _query.Setup("status", status))
+ .Query(_query => _query.Setup("created_since", createdSince.HasValue ? createdSince.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
+ .Query(_query => _query.Setup("created_until", createdUntil.HasValue ? createdUntil.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
@@ -528,247 +727,74 @@ public Models.GetRecipientResponse CreateRecipient(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// GetDefaultRecipient EndPoint.
+ /// Retrieves recipient information.
///
+ /// Required parameter: Recipient code.
/// Returns the Models.GetRecipientResponse response from the API call.
- public Models.GetRecipientResponse GetDefaultRecipient()
- => CoreHelper.RunTask(GetDefaultRecipientAsync());
+ public Models.GetRecipientResponse GetRecipientByCode(
+ string code)
+ => CoreHelper.RunTask(GetRecipientByCodeAsync(code));
///
- /// GetDefaultRecipient EndPoint.
+ /// Retrieves recipient information.
///
+ /// Required parameter: Recipient code.
/// cancellationToken.
/// Returns the Models.GetRecipientResponse response from the API call.
- public async Task GetDefaultRecipientAsync(CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/recipients/default")
- .WithAuth("httpBasic"))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
- ///
- /// Creates an anticipation.
- ///
- /// Required parameter: Recipient id.
- /// Required parameter: Anticipation data.
- /// Optional parameter: Example: .
- /// Returns the Models.GetAnticipationResponse response from the API call.
- public Models.GetAnticipationResponse CreateAnticipation(
- string recipientId,
- Models.CreateAnticipationRequest request,
- string idempotencyKey = null)
- => CoreHelper.RunTask(CreateAnticipationAsync(recipientId, request, idempotencyKey));
-
- ///
- /// Creates an anticipation.
- ///
- /// Required parameter: Recipient id.
- /// Required parameter: Anticipation data.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetAnticipationResponse response from the API call.
- public async Task CreateAnticipationAsync(
- string recipientId,
- Models.CreateAnticipationRequest request,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Post, "/recipients/{recipient_id}/anticipations")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Body(_bodyParameter => _bodyParameter.Setup(request))
- .Template(_template => _template.Setup("recipient_id", recipientId))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
- ///
- /// Gets the anticipation limits for a recipient.
- ///
- /// Required parameter: Recipient id.
- /// Required parameter: Timeframe.
- /// Required parameter: Anticipation payment date.
- /// Returns the Models.GetAnticipationLimitResponse response from the API call.
- public Models.GetAnticipationLimitResponse GetAnticipationLimits(
- string recipientId,
- string timeframe,
- DateTime paymentDate)
- => CoreHelper.RunTask(GetAnticipationLimitsAsync(recipientId, timeframe, paymentDate));
-
- ///
- /// Gets the anticipation limits for a recipient.
- ///
- /// Required parameter: Recipient id.
- /// Required parameter: Timeframe.
- /// Required parameter: Anticipation payment date.
- /// cancellationToken.
- /// Returns the Models.GetAnticipationLimitResponse response from the API call.
- public async Task GetAnticipationLimitsAsync(
- string recipientId,
- string timeframe,
- DateTime paymentDate,
+ public async Task GetRecipientByCodeAsync(
+ string code,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/recipients/{recipient_id}/anticipation_limits")
+ .Setup(HttpMethod.Get, "/recipients/{code}")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("recipient_id", recipientId))
- .Query(_query => _query.Setup("timeframe", timeframe))
- .Query(_query => _query.Setup("payment_date", paymentDate.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK")))))
+ .Template(_template => _template.Setup("code", code))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Updates recipient metadata.
+ /// GetDefaultRecipient EndPoint.
///
- /// Required parameter: Recipient id.
- /// Required parameter: Metadata.
- /// Optional parameter: Example: .
/// Returns the Models.GetRecipientResponse response from the API call.
- public Models.GetRecipientResponse UpdateRecipientMetadata(
- string recipientId,
- Models.UpdateMetadataRequest request,
- string idempotencyKey = null)
- => CoreHelper.RunTask(UpdateRecipientMetadataAsync(recipientId, request, idempotencyKey));
+ public Models.GetRecipientResponse GetDefaultRecipient()
+ => CoreHelper.RunTask(GetDefaultRecipientAsync());
///
- /// Updates recipient metadata.
+ /// GetDefaultRecipient EndPoint.
///
- /// Required parameter: Recipient id.
- /// Required parameter: Metadata.
- /// Optional parameter: Example: .
/// cancellationToken.
/// Returns the Models.GetRecipientResponse response from the API call.
- public async Task UpdateRecipientMetadataAsync(
- string recipientId,
- Models.UpdateMetadataRequest request,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default)
+ public async Task GetDefaultRecipientAsync(CancellationToken cancellationToken = default)
=> await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(new HttpMethod("PATCH"), "/recipients/{recipient_id}/metadata")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Body(_bodyParameter => _bodyParameter.Setup(request))
- .Template(_template => _template.Setup("recipient_id", recipientId))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
- ///
- /// Retrieves a paginated list of anticipations from a recipient.
- ///
- /// Required parameter: Recipient id.
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// Optional parameter: Filter for anticipation status.
- /// Optional parameter: Filter for anticipation timeframe.
- /// Optional parameter: Filter for start range for anticipation payment date.
- /// Optional parameter: Filter for end range for anticipation payment date.
- /// Optional parameter: Filter for start range for anticipation creation date.
- /// Optional parameter: Filter for end range for anticipation creation date.
- /// Returns the Models.ListAnticipationResponse response from the API call.
- public Models.ListAnticipationResponse GetAnticipations(
- string recipientId,
- int? page = null,
- int? size = null,
- string status = null,
- string timeframe = null,
- DateTime? paymentDateSince = null,
- DateTime? paymentDateUntil = null,
- DateTime? createdSince = null,
- DateTime? createdUntil = null)
- => CoreHelper.RunTask(GetAnticipationsAsync(recipientId, page, size, status, timeframe, paymentDateSince, paymentDateUntil, createdSince, createdUntil));
-
- ///
- /// Retrieves a paginated list of anticipations from a recipient.
- ///
- /// Required parameter: Recipient id.
- /// Optional parameter: Page number.
- /// Optional parameter: Page size.
- /// Optional parameter: Filter for anticipation status.
- /// Optional parameter: Filter for anticipation timeframe.
- /// Optional parameter: Filter for start range for anticipation payment date.
- /// Optional parameter: Filter for end range for anticipation payment date.
- /// Optional parameter: Filter for start range for anticipation creation date.
- /// Optional parameter: Filter for end range for anticipation creation date.
- /// cancellationToken.
- /// Returns the Models.ListAnticipationResponse response from the API call.
- public async Task GetAnticipationsAsync(
- string recipientId,
- int? page = null,
- int? size = null,
- string status = null,
- string timeframe = null,
- DateTime? paymentDateSince = null,
- DateTime? paymentDateUntil = null,
- DateTime? createdSince = null,
- DateTime? createdUntil = null,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/recipients/{recipient_id}/anticipations")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("recipient_id", recipientId))
- .Query(_query => _query.Setup("page", page))
- .Query(_query => _query.Setup("size", size))
- .Query(_query => _query.Setup("status", status))
- .Query(_query => _query.Setup("timeframe", timeframe))
- .Query(_query => _query.Setup("payment_date_since", paymentDateSince.HasValue ? paymentDateSince.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
- .Query(_query => _query.Setup("payment_date_until", paymentDateUntil.HasValue ? paymentDateUntil.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
- .Query(_query => _query.Setup("created_since", createdSince.HasValue ? createdSince.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
- .Query(_query => _query.Setup("created_until", createdUntil.HasValue ? createdUntil.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))))
+ .Setup(HttpMethod.Get, "/recipients/default")
+ .WithAuth("httpBasic"))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Gets a paginated list of transfers for the recipient.
+ /// Create a KYC link.
///
/// Required parameter: Example: .
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// Returns the Models.ListWithdrawals response from the API call.
- public Models.ListWithdrawals GetWithdrawals(
- string recipientId,
- int? page = null,
- int? size = null,
- string status = null,
- DateTime? createdSince = null,
- DateTime? createdUntil = null)
- => CoreHelper.RunTask(GetWithdrawalsAsync(recipientId, page, size, status, createdSince, createdUntil));
+ /// Returns the Models.CreateKYCLinkResponse response from the API call.
+ public Models.CreateKYCLinkResponse CreateKYCLink(
+ string recipientId)
+ => CoreHelper.RunTask(CreateKYCLinkAsync(recipientId));
///
- /// Gets a paginated list of transfers for the recipient.
+ /// Create a KYC link.
///
/// Required parameter: Example: .
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.ListWithdrawals response from the API call.
- public async Task GetWithdrawalsAsync(
+ /// Returns the Models.CreateKYCLinkResponse response from the API call.
+ public async Task CreateKYCLinkAsync(
string recipientId,
- int? page = null,
- int? size = null,
- string status = null,
- DateTime? createdSince = null,
- DateTime? createdUntil = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/recipients/{recipient_id}/withdrawals")
+ .Setup(HttpMethod.Post, "/recipients/{recipient_id}/kyc_link")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("recipient_id", recipientId))
- .Query(_query => _query.Setup("page", page))
- .Query(_query => _query.Setup("size", size))
- .Query(_query => _query.Setup("status", status))
- .Query(_query => _query.Setup("created_since", createdSince.HasValue ? createdSince.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
- .Query(_query => _query.Setup("created_until", createdUntil.HasValue ? createdUntil.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))))
+ .Template(_template => _template.Setup("recipient_id", recipientId))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
}
}
\ No newline at end of file
diff --git a/PagarmeApiSDK.Standard/Controllers/SubscriptionsController.cs b/PagarmeApiSDK.Standard/Controllers/SubscriptionsController.cs
index 136893e..112e184 100644
--- a/PagarmeApiSDK.Standard/Controllers/SubscriptionsController.cs
+++ b/PagarmeApiSDK.Standard/Controllers/SubscriptionsController.cs
@@ -32,6 +32,37 @@ internal class SubscriptionsController : BaseController, ISubscriptionsControlle
///
internal SubscriptionsController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { }
+ ///
+ /// RenewSubscription EndPoint.
+ ///
+ /// Required parameter: Example: .
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetPeriodResponse response from the API call.
+ public Models.GetPeriodResponse RenewSubscription(
+ string subscriptionId,
+ string idempotencyKey = null)
+ => CoreHelper.RunTask(RenewSubscriptionAsync(subscriptionId, idempotencyKey));
+
+ ///
+ /// RenewSubscription EndPoint.
+ ///
+ /// Required parameter: Example: .
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetPeriodResponse response from the API call.
+ public async Task RenewSubscriptionAsync(
+ string subscriptionId,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Post, "/subscriptions/{subscription_id}/cycles")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Template(_template => _template.Setup("subscription_id", subscriptionId))
+ .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
///
/// Updates the credit card from a subscription.
///
@@ -68,6 +99,47 @@ public Models.GetSubscriptionResponse UpdateSubscriptionCard(
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
+ ///
+ /// Deletes a usage.
+ ///
+ /// Required parameter: The subscription id.
+ /// Required parameter: The subscription item id.
+ /// Required parameter: The usage id.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetUsageResponse response from the API call.
+ public Models.GetUsageResponse DeleteUsage(
+ string subscriptionId,
+ string itemId,
+ string usageId,
+ string idempotencyKey = null)
+ => CoreHelper.RunTask(DeleteUsageAsync(subscriptionId, itemId, usageId, idempotencyKey));
+
+ ///
+ /// Deletes a usage.
+ ///
+ /// Required parameter: The subscription id.
+ /// Required parameter: The subscription item id.
+ /// Required parameter: The usage id.
+ /// Optional parameter: Example: .
+ /// cancellationToken.
+ /// Returns the Models.GetUsageResponse response from the API call.
+ public async Task DeleteUsageAsync(
+ string subscriptionId,
+ string itemId,
+ string usageId,
+ string idempotencyKey = null,
+ CancellationToken cancellationToken = default)
+ => await CreateApiCall()
+ .RequestBuilder(_requestBuilder => _requestBuilder
+ .Setup(HttpMethod.Delete, "/subscriptions/{subscription_id}/items/{item_id}/usages/{usage_id}")
+ .WithAuth("httpBasic")
+ .Parameters(_parameters => _parameters
+ .Template(_template => _template.Setup("subscription_id", subscriptionId))
+ .Template(_template => _template.Setup("item_id", itemId))
+ .Template(_template => _template.Setup("usage_id", usageId))
+ .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .ExecuteAsync(cancellationToken).ConfigureAwait(false);
+
///
/// Creates a discount.
///
@@ -105,70 +177,69 @@ public Models.GetDiscountResponse CreateDiscount(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Updates the billing date from a subscription.
+ /// Create Usage.
///
- /// Required parameter: The subscription id.
- /// Required parameter: Request for updating the subscription billing date.
+ /// Required parameter: Subscription id.
+ /// Required parameter: Item id.
/// Optional parameter: Example: .
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- public Models.GetSubscriptionResponse UpdateSubscriptionBillingDate(
+ /// Returns the Models.GetUsageResponse response from the API call.
+ public Models.GetUsageResponse CreateAnUsage(
string subscriptionId,
- Models.UpdateSubscriptionBillingDateRequest request,
+ string itemId,
string idempotencyKey = null)
- => CoreHelper.RunTask(UpdateSubscriptionBillingDateAsync(subscriptionId, request, idempotencyKey));
+ => CoreHelper.RunTask(CreateAnUsageAsync(subscriptionId, itemId, idempotencyKey));
///
- /// Updates the billing date from a subscription.
+ /// Create Usage.
///
- /// Required parameter: The subscription id.
- /// Required parameter: Request for updating the subscription billing date.
+ /// Required parameter: Subscription id.
+ /// Required parameter: Item id.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- public async Task UpdateSubscriptionBillingDateAsync(
+ /// Returns the Models.GetUsageResponse response from the API call.
+ public async Task CreateAnUsageAsync(
string subscriptionId,
- Models.UpdateSubscriptionBillingDateRequest request,
+ string itemId,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(new HttpMethod("PATCH"), "/subscriptions/{subscription_id}/billing-date")
+ .Setup(HttpMethod.Post, "/subscriptions/{subscription_id}/items/{item_id}/usages")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Body(_bodyParameter => _bodyParameter.Setup(request))
.Template(_template => _template.Setup("subscription_id", subscriptionId))
+ .Template(_template => _template.Setup("item_id", itemId))
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Updates the start at date from a subscription.
+ /// UpdateCurrentCycleStatus EndPoint.
///
- /// Required parameter: The subscription id.
- /// Required parameter: Request for updating the subscription start date.
+ /// Required parameter: Subscription Id.
+ /// Required parameter: Request for updating the end date of the subscription current status.
/// Optional parameter: Example: .
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- public Models.GetSubscriptionResponse UpdateSubscriptionStartAt(
+ public void UpdateCurrentCycleStatus(
string subscriptionId,
- Models.UpdateSubscriptionStartAtRequest request,
+ Models.UpdateCurrentCycleStatusRequest request,
string idempotencyKey = null)
- => CoreHelper.RunTask(UpdateSubscriptionStartAtAsync(subscriptionId, request, idempotencyKey));
+ => CoreHelper.RunVoidTask(UpdateCurrentCycleStatusAsync(subscriptionId, request, idempotencyKey));
///
- /// Updates the start at date from a subscription.
+ /// UpdateCurrentCycleStatus EndPoint.
///
- /// Required parameter: The subscription id.
- /// Required parameter: Request for updating the subscription start date.
+ /// Required parameter: Subscription Id.
+ /// Required parameter: Request for updating the end date of the subscription current status.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- public async Task UpdateSubscriptionStartAtAsync(
+ /// Returns the void response from the API call.
+ public async Task UpdateCurrentCycleStatusAsync(
string subscriptionId,
- Models.UpdateSubscriptionStartAtRequest request,
+ Models.UpdateCurrentCycleStatusRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(new HttpMethod("PATCH"), "/subscriptions/{subscription_id}/start-at")
+ .Setup(new HttpMethod("PATCH"), "/subscriptions/{subscription_id}/cycle-status")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(request))
@@ -177,121 +248,136 @@ public Models.GetSubscriptionResponse UpdateSubscriptionStartAt(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Gets a subscription.
+ /// Deletes a discount.
///
/// Required parameter: Subscription id.
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- public Models.GetSubscriptionResponse GetSubscription(
- string subscriptionId)
- => CoreHelper.RunTask(GetSubscriptionAsync(subscriptionId));
+ /// Required parameter: Discount Id.
+ /// Optional parameter: Example: .
+ /// Returns the Models.GetDiscountResponse response from the API call.
+ public Models.GetDiscountResponse DeleteDiscount(
+ string subscriptionId,
+ string discountId,
+ string idempotencyKey = null)
+ => CoreHelper.RunTask(DeleteDiscountAsync(subscriptionId, discountId, idempotencyKey));
///
- /// Gets a subscription.
+ /// Deletes a discount.
///
/// Required parameter: Subscription id.
+ /// Required parameter: Discount Id.
+ /// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- public async Task GetSubscriptionAsync(
+ /// Returns the Models.GetDiscountResponse response from the API call.
+ public async Task DeleteDiscountAsync(
string subscriptionId,
+ string discountId,
+ string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/subscriptions/{subscription_id}")
+ .Setup(HttpMethod.Delete, "/subscriptions/{subscription_id}/discounts/{discount_id}")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("subscription_id", subscriptionId))))
+ .Template(_template => _template.Setup("subscription_id", subscriptionId))
+ .Template(_template => _template.Setup("discount_id", discountId))
+ .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Lists all usages from a subscription item.
+ /// Get Subscription Items.
///
/// Required parameter: The subscription id.
- /// Required parameter: The subscription item id.
/// Optional parameter: Page number.
/// Optional parameter: Page size.
+ /// Optional parameter: The item name.
/// Optional parameter: Identification code in the client system.
- /// Optional parameter: Identification group in the client system.
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
- /// Returns the Models.ListUsagesResponse response from the API call.
- public Models.ListUsagesResponse GetUsages(
+ /// Optional parameter: The item statis.
+ /// Optional parameter: The item description.
+ /// Optional parameter: Filter for item's creation date start range.
+ /// Optional parameter: Filter for item's creation date end range.
+ /// Returns the Models.ListSubscriptionItemsResponse response from the API call.
+ public Models.ListSubscriptionItemsResponse GetSubscriptionItems(
string subscriptionId,
- string itemId,
int? page = null,
int? size = null,
+ string name = null,
string code = null,
- string mGroup = null,
- DateTime? usedSince = null,
- DateTime? usedUntil = null)
- => CoreHelper.RunTask(GetUsagesAsync(subscriptionId, itemId, page, size, code, mGroup, usedSince, usedUntil));
+ string status = null,
+ string description = null,
+ string createdSince = null,
+ string createdUntil = null)
+ => CoreHelper.RunTask(GetSubscriptionItemsAsync(subscriptionId, page, size, name, code, status, description, createdSince, createdUntil));
///
- /// Lists all usages from a subscription item.
+ /// Get Subscription Items.
///
/// Required parameter: The subscription id.
- /// Required parameter: The subscription item id.
/// Optional parameter: Page number.
/// Optional parameter: Page size.
+ /// Optional parameter: The item name.
/// Optional parameter: Identification code in the client system.
- /// Optional parameter: Identification group in the client system.
- /// Optional parameter: Example: .
- /// Optional parameter: Example: .
+ /// Optional parameter: The item statis.
+ /// Optional parameter: The item description.
+ /// Optional parameter: Filter for item's creation date start range.
+ /// Optional parameter: Filter for item's creation date end range.
/// cancellationToken.
- /// Returns the Models.ListUsagesResponse response from the API call.
- public async Task GetUsagesAsync(
+ /// Returns the Models.ListSubscriptionItemsResponse response from the API call.
+ public async Task GetSubscriptionItemsAsync(
string subscriptionId,
- string itemId,
int? page = null,
int? size = null,
+ string name = null,
string code = null,
- string mGroup = null,
- DateTime? usedSince = null,
- DateTime? usedUntil = null,
+ string status = null,
+ string description = null,
+ string createdSince = null,
+ string createdUntil = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/subscriptions/{subscription_id}/items/{item_id}/usages")
+ .Setup(HttpMethod.Get, "/subscriptions/{subscription_id}/items")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Template(_template => _template.Setup("subscription_id", subscriptionId))
- .Template(_template => _template.Setup("item_id", itemId))
.Query(_query => _query.Setup("page", page))
.Query(_query => _query.Setup("size", size))
+ .Query(_query => _query.Setup("name", name))
.Query(_query => _query.Setup("code", code))
- .Query(_query => _query.Setup("group", mGroup))
- .Query(_query => _query.Setup("used_since", usedSince.HasValue ? usedSince.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
- .Query(_query => _query.Setup("used_until", usedUntil.HasValue ? usedUntil.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))))
+ .Query(_query => _query.Setup("status", status))
+ .Query(_query => _query.Setup("description", description))
+ .Query(_query => _query.Setup("created_since", createdSince))
+ .Query(_query => _query.Setup("created_until", createdUntil))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// UpdateLatestPeriodEndAt EndPoint.
+ /// Updates the payment method from a subscription.
///
- /// Required parameter: Example: .
- /// Required parameter: Request for updating the end date of the current signature cycle.
+ /// Required parameter: Subscription id.
+ /// Required parameter: Request for updating the paymentmethod from a subscription.
/// Optional parameter: Example: .
/// Returns the Models.GetSubscriptionResponse response from the API call.
- public Models.GetSubscriptionResponse UpdateLatestPeriodEndAt(
+ public Models.GetSubscriptionResponse UpdateSubscriptionPaymentMethod(
string subscriptionId,
- Models.UpdateCurrentCycleEndDateRequest request,
+ Models.UpdateSubscriptionPaymentMethodRequest request,
string idempotencyKey = null)
- => CoreHelper.RunTask(UpdateLatestPeriodEndAtAsync(subscriptionId, request, idempotencyKey));
+ => CoreHelper.RunTask(UpdateSubscriptionPaymentMethodAsync(subscriptionId, request, idempotencyKey));
///
- /// UpdateLatestPeriodEndAt EndPoint.
+ /// Updates the payment method from a subscription.
///
- /// Required parameter: Example: .
- /// Required parameter: Request for updating the end date of the current signature cycle.
+ /// Required parameter: Subscription id.
+ /// Required parameter: Request for updating the paymentmethod from a subscription.
/// Optional parameter: Example: .
/// cancellationToken.
/// Returns the Models.GetSubscriptionResponse response from the API call.
- public async Task UpdateLatestPeriodEndAtAsync(
+ public async Task UpdateSubscriptionPaymentMethodAsync(
string subscriptionId,
- Models.UpdateCurrentCycleEndDateRequest request,
+ Models.UpdateSubscriptionPaymentMethodRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
=> await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(new HttpMethod("PATCH"), "/subscriptions/{subscription_id}/periods/latest/end-at")
+ .Setup(new HttpMethod("PATCH"), "/subscriptions/{subscription_id}/payment-method")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(request))
@@ -300,75 +386,115 @@ public Models.GetSubscriptionResponse UpdateLatestPeriodEndAt(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Deletes a discount.
+ /// Get Subscription Item.
///
- /// Required parameter: Subscription id.
- /// Required parameter: Discount Id.
- /// Optional parameter: Example: .
- /// Returns the Models.GetDiscountResponse response from the API call.
- public Models.GetDiscountResponse DeleteDiscount(
+ /// Required parameter: Subscription Id.
+ /// Required parameter: Item id.
+ /// Returns the Models.GetSubscriptionItemResponse response from the API call.
+ public Models.GetSubscriptionItemResponse GetSubscriptionItem(
string subscriptionId,
- string discountId,
- string idempotencyKey = null)
- => CoreHelper.RunTask(DeleteDiscountAsync(subscriptionId, discountId, idempotencyKey));
+ string itemId)
+ => CoreHelper.RunTask(GetSubscriptionItemAsync(subscriptionId, itemId));
///
- /// Deletes a discount.
+ /// Get Subscription Item.
///
- /// Required parameter: Subscription id.
- /// Required parameter: Discount Id.
- /// Optional parameter: Example: .
+ /// Required parameter: Subscription Id.
+ /// Required parameter: Item id.
/// cancellationToken.
- /// Returns the Models.GetDiscountResponse response from the API call.
- public async Task DeleteDiscountAsync(
+ /// Returns the Models.GetSubscriptionItemResponse response from the API call.
+ public async Task GetSubscriptionItemAsync(
string subscriptionId,
- string discountId,
- string idempotencyKey = null,
+ string itemId,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Delete, "/subscriptions/{subscription_id}/discounts/{discount_id}")
+ .Setup(HttpMethod.Get, "/subscriptions/{subscription_id}/items/{item_id}")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Template(_template => _template.Setup("subscription_id", subscriptionId))
- .Template(_template => _template.Setup("discount_id", discountId))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .Template(_template => _template.Setup("item_id", itemId))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Updates the payment method from a subscription.
+ /// Gets all subscriptions.
///
- /// Required parameter: Subscription id.
- /// Required parameter: Request for updating the paymentmethod from a subscription.
- /// Optional parameter: Example: .
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- public Models.GetSubscriptionResponse UpdateSubscriptionPaymentMethod(
- string subscriptionId,
- Models.UpdateSubscriptionPaymentMethodRequest request,
- string idempotencyKey = null)
- => CoreHelper.RunTask(UpdateSubscriptionPaymentMethodAsync(subscriptionId, request, idempotencyKey));
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// Optional parameter: Filter for subscription's code.
+ /// Optional parameter: Filter for subscription's billing type.
+ /// Optional parameter: Filter for subscription's customer id.
+ /// Optional parameter: Filter for subscription's plan id.
+ /// Optional parameter: Filter for subscription's card id.
+ /// Optional parameter: Filter for subscription's status.
+ /// Optional parameter: Filter for subscription's next billing date start range.
+ /// Optional parameter: Filter for subscription's next billing date end range.
+ /// Optional parameter: Filter for subscription's creation date start range.
+ /// Optional parameter: Filter for subscriptions creation date end range.
+ /// Returns the Models.ListSubscriptionsResponse response from the API call.
+ public Models.ListSubscriptionsResponse GetSubscriptions(
+ int? page = null,
+ int? size = null,
+ string code = null,
+ string billingType = null,
+ string customerId = null,
+ string planId = null,
+ string cardId = null,
+ string status = null,
+ DateTime? nextBillingSince = null,
+ DateTime? nextBillingUntil = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null)
+ => CoreHelper.RunTask(GetSubscriptionsAsync(page, size, code, billingType, customerId, planId, cardId, status, nextBillingSince, nextBillingUntil, createdSince, createdUntil));
///
- /// Updates the payment method from a subscription.
+ /// Gets all subscriptions.
///
- /// Required parameter: Subscription id.
- /// Required parameter: Request for updating the paymentmethod from a subscription.
- /// Optional parameter: Example: .
+ /// Optional parameter: Page number.
+ /// Optional parameter: Page size.
+ /// Optional parameter: Filter for subscription's code.
+ /// Optional parameter: Filter for subscription's billing type.
+ /// Optional parameter: Filter for subscription's customer id.
+ /// Optional parameter: Filter for subscription's plan id.
+ /// Optional parameter: Filter for subscription's card id.
+ /// Optional parameter: Filter for subscription's status.
+ /// Optional parameter: Filter for subscription's next billing date start range.
+ /// Optional parameter: Filter for subscription's next billing date end range.
+ /// Optional parameter: Filter for subscription's creation date start range.
+ /// Optional parameter: Filter for subscriptions creation date end range.
/// cancellationToken.
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- public async Task UpdateSubscriptionPaymentMethodAsync(
- string subscriptionId,
- Models.UpdateSubscriptionPaymentMethodRequest request,
- string idempotencyKey = null,
+ /// Returns the Models.ListSubscriptionsResponse response from the API call.
+ public async Task GetSubscriptionsAsync(
+ int? page = null,
+ int? size = null,
+ string code = null,
+ string billingType = null,
+ string customerId = null,
+ string planId = null,
+ string cardId = null,
+ string status = null,
+ DateTime? nextBillingSince = null,
+ DateTime? nextBillingUntil = null,
+ DateTime? createdSince = null,
+ DateTime? createdUntil = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(new HttpMethod("PATCH"), "/subscriptions/{subscription_id}/payment-method")
+ .Setup(HttpMethod.Get, "/subscriptions")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Body(_bodyParameter => _bodyParameter.Setup(request))
- .Template(_template => _template.Setup("subscription_id", subscriptionId))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .Query(_query => _query.Setup("page", page))
+ .Query(_query => _query.Setup("size", size))
+ .Query(_query => _query.Setup("code", code))
+ .Query(_query => _query.Setup("billing_type", billingType))
+ .Query(_query => _query.Setup("customer_id", customerId))
+ .Query(_query => _query.Setup("plan_id", planId))
+ .Query(_query => _query.Setup("card_id", cardId))
+ .Query(_query => _query.Setup("status", status))
+ .Query(_query => _query.Setup("next_billing_since", nextBillingSince.HasValue ? nextBillingSince.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
+ .Query(_query => _query.Setup("next_billing_until", nextBillingUntil.HasValue ? nextBillingUntil.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
+ .Query(_query => _query.Setup("created_since", createdSince.HasValue ? createdSince.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))
+ .Query(_query => _query.Setup("created_until", createdUntil.HasValue ? createdUntil.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
@@ -408,65 +534,34 @@ public Models.GetSubscriptionResponse CancelSubscription(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Creates a new subscription.
- ///
- /// Required parameter: Request for creating a subscription.
- /// Optional parameter: Example: .
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- public Models.GetSubscriptionResponse CreateSubscription(
- Models.CreateSubscriptionRequest body,
- string idempotencyKey = null)
- => CoreHelper.RunTask(CreateSubscriptionAsync(body, idempotencyKey));
-
- ///
- /// Creates a new subscription.
- ///
- /// Required parameter: Request for creating a subscription.
- /// Optional parameter: Example: .
- /// cancellationToken.
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- public async Task CreateSubscriptionAsync(
- Models.CreateSubscriptionRequest body,
- string idempotencyKey = null,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Post, "/subscriptions")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Body(_bodyParameter => _bodyParameter.Setup(body))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
- ///
- /// UpdateSubscriptionAffiliationId EndPoint.
+ /// Creates a increment.
///
- /// Required parameter: Example: .
- /// Required parameter: Request for updating a subscription affiliation id.
+ /// Required parameter: Subscription id.
+ /// Required parameter: Request for creating a increment.
/// Optional parameter: Example: .
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- public Models.GetSubscriptionResponse UpdateSubscriptionAffiliationId(
+ /// Returns the Models.GetIncrementResponse response from the API call.
+ public Models.GetIncrementResponse CreateIncrement(
string subscriptionId,
- Models.UpdateSubscriptionAffiliationIdRequest request,
+ Models.CreateIncrementRequest request,
string idempotencyKey = null)
- => CoreHelper.RunTask(UpdateSubscriptionAffiliationIdAsync(subscriptionId, request, idempotencyKey));
+ => CoreHelper.RunTask(CreateIncrementAsync(subscriptionId, request, idempotencyKey));
///
- /// UpdateSubscriptionAffiliationId EndPoint.
+ /// Creates a increment.
///
- /// Required parameter: Example: .
- /// Required parameter: Request for updating a subscription affiliation id.
+ /// Required parameter: Subscription id.
+ /// Required parameter: Request for creating a increment.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- public async Task UpdateSubscriptionAffiliationIdAsync(
+ /// Returns the Models.GetIncrementResponse response from the API call.
+ public async Task CreateIncrementAsync(
string subscriptionId,
- Models.UpdateSubscriptionAffiliationIdRequest request,
+ Models.CreateIncrementRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(new HttpMethod("PATCH"), "/subscriptions/{subscription_id}/gateway-affiliation-id")
+ .Setup(HttpMethod.Post, "/subscriptions/{subscription_id}/increments")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(request))
@@ -475,239 +570,204 @@ public Models.GetSubscriptionResponse UpdateSubscriptionAffiliationId(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Atualização do valor mínimo da assinatura.
+ /// Creates a usage.
///
/// Required parameter: Subscription Id.
- /// Required parameter: Request da requisição com o valor mínimo que será configurado.
+ /// Required parameter: Item id.
+ /// Required parameter: Request for creating a usage.
/// Optional parameter: Example: .
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- public Models.GetSubscriptionResponse UpdateSubscriptionMiniumPrice(
+ /// Returns the Models.GetUsageResponse response from the API call.
+ public Models.GetUsageResponse CreateUsage(
string subscriptionId,
- Models.UpdateSubscriptionMinimumPriceRequest request,
+ string itemId,
+ Models.CreateUsageRequest body,
string idempotencyKey = null)
- => CoreHelper.RunTask(UpdateSubscriptionMiniumPriceAsync(subscriptionId, request, idempotencyKey));
+ => CoreHelper.RunTask(CreateUsageAsync(subscriptionId, itemId, body, idempotencyKey));
///
- /// Atualização do valor mínimo da assinatura.
+ /// Creates a usage.
///
/// Required parameter: Subscription Id.
- /// Required parameter: Request da requisição com o valor mínimo que será configurado.
+ /// Required parameter: Item id.
+ /// Required parameter: Request for creating a usage.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetSubscriptionResponse response from the API call.
- public async Task UpdateSubscriptionMiniumPriceAsync(
+ /// Returns the Models.GetUsageResponse response from the API call.
+ public async Task CreateUsageAsync(
string subscriptionId,
- Models.UpdateSubscriptionMinimumPriceRequest request,
+ string itemId,
+ Models.CreateUsageRequest body,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(new HttpMethod("PATCH"), "/subscriptions/{subscription_id}/minimum_price")
+ .Setup(HttpMethod.Post, "/subscriptions/{subscription_id}/items/{item_id}/usages")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Body(_bodyParameter => _bodyParameter.Setup(request))
+ .Body(_bodyParameter => _bodyParameter.Setup(body))
.Template(_template => _template.Setup("subscription_id", subscriptionId))
+ .Template(_template => _template.Setup("item_id", itemId))
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// GetSubscriptionCycleById EndPoint.
+ /// GetDiscountById EndPoint.
///
/// Required parameter: The subscription id.
- /// Required parameter: Example: .
- /// Returns the Models.GetPeriodResponse response from the API call.
- public Models.GetPeriodResponse GetSubscriptionCycleById(
+ /// Required parameter: Example: .
+ /// Returns the Models.GetDiscountResponse response from the API call.
+ public Models.GetDiscountResponse GetDiscountById(
string subscriptionId,
- string cycleId)
- => CoreHelper.RunTask(GetSubscriptionCycleByIdAsync(subscriptionId, cycleId));
+ string discountId)
+ => CoreHelper.RunTask(GetDiscountByIdAsync(subscriptionId, discountId));
///
- /// GetSubscriptionCycleById EndPoint.
+ /// GetDiscountById EndPoint.
///
/// Required parameter: The subscription id.
- /// Required parameter: Example: .
+ /// Required parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetPeriodResponse response from the API call.
- public async Task GetSubscriptionCycleByIdAsync(
+ /// Returns the Models.GetDiscountResponse response from the API call.
+ public async Task GetDiscountByIdAsync(
string subscriptionId,
- string cycleId,
+ string discountId,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/subscriptions/{subscription_id}/cycles/{cycleId}")
+ .Setup(HttpMethod.Get, "/subscriptions/{subscription_id}/discounts/{discountId}")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Template(_template => _template.Setup("subscription_id", subscriptionId))
- .Template(_template => _template.Setup("cycleId", cycleId))))
+ .Template(_template => _template.Setup("discountId", discountId))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// GetUsageReport EndPoint.
+ /// Creates a new subscription.
///
- /// Required parameter: The subscription Id.
- /// Required parameter: The period Id.
- /// Returns the Models.GetUsageReportResponse response from the API call.
- public Models.GetUsageReportResponse GetUsageReport(
- string subscriptionId,
- string periodId)
- => CoreHelper.RunTask(GetUsageReportAsync(subscriptionId, periodId));
-
- ///
- /// GetUsageReport EndPoint.
- ///
- /// Required parameter: The subscription Id.
- /// Required parameter: The period Id.
- /// cancellationToken.
- /// Returns the Models.GetUsageReportResponse response from the API call.
- public async Task GetUsageReportAsync(
- string subscriptionId,
- string periodId,
- CancellationToken cancellationToken = default)
- => await CreateApiCall()
- .RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Get, "/subscriptions/{subscription_id}/periods/{period_id}/usages/report")
- .WithAuth("httpBasic")
- .Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("subscription_id", subscriptionId))
- .Template(_template => _template.Setup("period_id", periodId))))
- .ExecuteAsync(cancellationToken).ConfigureAwait(false);
-
- ///
- /// RenewSubscription EndPoint.
- ///
- /// Required parameter: Example: .
+ /// Required parameter: Request for creating a subscription.
/// Optional parameter: Example: .
- /// Returns the Models.GetPeriodResponse response from the API call.
- public Models.GetPeriodResponse RenewSubscription(
- string subscriptionId,
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ public Models.GetSubscriptionResponse CreateSubscription(
+ Models.CreateSubscriptionRequest body,
string idempotencyKey = null)
- => CoreHelper.RunTask(RenewSubscriptionAsync(subscriptionId, idempotencyKey));
+ => CoreHelper.RunTask(CreateSubscriptionAsync(body, idempotencyKey));
///
- /// RenewSubscription EndPoint.
+ /// Creates a new subscription.
///
- /// Required parameter: Example: .
+ /// Required parameter: Request for creating a subscription.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetPeriodResponse response from the API call.
- public async Task RenewSubscriptionAsync(
- string subscriptionId,
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ public async Task CreateSubscriptionAsync(
+ Models.CreateSubscriptionRequest body,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Post, "/subscriptions/{subscription_id}/cycles")
+ .Setup(HttpMethod.Post, "/subscriptions")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
- .Template(_template => _template.Setup("subscription_id", subscriptionId))
+ .Body(_bodyParameter => _bodyParameter.Setup(body))
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Deletes a usage.
+ /// GetIncrementById EndPoint.
///
- /// Required parameter: The subscription id.
- /// Required parameter: The subscription item id.
- /// Required parameter: The usage id.
- /// Optional parameter: Example: .
- /// Returns the Models.GetUsageResponse response from the API call.
- public Models.GetUsageResponse DeleteUsage(
+ /// Required parameter: The subscription Id.
+ /// Required parameter: The increment Id.
+ /// Returns the Models.GetIncrementResponse response from the API call.
+ public Models.GetIncrementResponse GetIncrementById(
string subscriptionId,
- string itemId,
- string usageId,
- string idempotencyKey = null)
- => CoreHelper.RunTask(DeleteUsageAsync(subscriptionId, itemId, usageId, idempotencyKey));
+ string incrementId)
+ => CoreHelper.RunTask(GetIncrementByIdAsync(subscriptionId, incrementId));
///
- /// Deletes a usage.
+ /// GetIncrementById EndPoint.
///
- /// Required parameter: The subscription id.
- /// Required parameter: The subscription item id.
- /// Required parameter: The usage id.
- /// Optional parameter: Example: .
+ /// Required parameter: The subscription Id.
+ /// Required parameter: The increment Id.
/// cancellationToken.
- /// Returns the Models.GetUsageResponse response from the API call.
- public async Task DeleteUsageAsync(
+ /// Returns the Models.GetIncrementResponse response from the API call.
+ public async Task GetIncrementByIdAsync(
string subscriptionId,
- string itemId,
- string usageId,
- string idempotencyKey = null,
+ string incrementId,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Delete, "/subscriptions/{subscription_id}/items/{item_id}/usages/{usage_id}")
+ .Setup(HttpMethod.Get, "/subscriptions/{subscription_id}/increments/{increment_id}")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Template(_template => _template.Setup("subscription_id", subscriptionId))
- .Template(_template => _template.Setup("item_id", itemId))
- .Template(_template => _template.Setup("usage_id", usageId))
- .Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
+ .Template(_template => _template.Setup("increment_id", incrementId))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Create Usage.
+ /// UpdateSubscriptionAffiliationId EndPoint.
///
- /// Required parameter: Subscription id.
- /// Required parameter: Item id.
+ /// Required parameter: Example: .
+ /// Required parameter: Request for updating a subscription affiliation id.
/// Optional parameter: Example: .
- /// Returns the Models.GetUsageResponse response from the API call.
- public Models.GetUsageResponse CreateAnUsage(
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ public Models.GetSubscriptionResponse UpdateSubscriptionAffiliationId(
string subscriptionId,
- string itemId,
+ Models.UpdateSubscriptionAffiliationIdRequest request,
string idempotencyKey = null)
- => CoreHelper.RunTask(CreateAnUsageAsync(subscriptionId, itemId, idempotencyKey));
+ => CoreHelper.RunTask(UpdateSubscriptionAffiliationIdAsync(subscriptionId, request, idempotencyKey));
///
- /// Create Usage.
+ /// UpdateSubscriptionAffiliationId EndPoint.
///
- /// Required parameter: Subscription id.
- /// Required parameter: Item id.
+ /// Required parameter: Example: .
+ /// Required parameter: Request for updating a subscription affiliation id.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the Models.GetUsageResponse response from the API call.
- public async Task CreateAnUsageAsync(
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ public async Task UpdateSubscriptionAffiliationIdAsync(
string subscriptionId,
- string itemId,
+ Models.UpdateSubscriptionAffiliationIdRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(HttpMethod.Post, "/subscriptions/{subscription_id}/items/{item_id}/usages")
+ .Setup(new HttpMethod("PATCH"), "/subscriptions/{subscription_id}/gateway-affiliation-id")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
+ .Body(_bodyParameter => _bodyParameter.Setup(request))
.Template(_template => _template.Setup("subscription_id", subscriptionId))
- .Template(_template => _template.Setup("item_id", itemId))
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// UpdateCurrentCycleStatus EndPoint.
+ /// Updates the metadata from a subscription.
///
- /// Required parameter: Subscription Id.
- /// Required parameter: Request for updating the end date of the subscription current status.
+ /// Required parameter: The subscription id.
+ /// Required parameter: Request for updating the subscrption metadata.
/// Optional parameter: Example: .
- public void UpdateCurrentCycleStatus(
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ public Models.GetSubscriptionResponse UpdateSubscriptionMetadata(
string subscriptionId,
- Models.UpdateCurrentCycleStatusRequest request,
+ Models.UpdateMetadataRequest request,
string idempotencyKey = null)
- => CoreHelper.RunVoidTask(UpdateCurrentCycleStatusAsync(subscriptionId, request, idempotencyKey));
+ => CoreHelper.RunTask(UpdateSubscriptionMetadataAsync(subscriptionId, request, idempotencyKey));
///
- /// UpdateCurrentCycleStatus EndPoint.
+ /// Updates the metadata from a subscription.
///
- /// Required parameter: Subscription Id.
- /// Required parameter: Request for updating the end date of the subscription current status.
+ /// Required parameter: The subscription id.
+ /// Required parameter: Request for updating the subscrption metadata.
/// Optional parameter: Example: .
/// cancellationToken.
- /// Returns the void response from the API call.
- public async Task UpdateCurrentCycleStatusAsync(
+ /// Returns the Models.GetSubscriptionResponse response from the API call.
+ public async Task UpdateSubscriptionMetadataAsync(
string subscriptionId,
- Models.UpdateCurrentCycleStatusRequest request,
+ Models.UpdateMetadataRequest request,
string idempotencyKey = null,
CancellationToken cancellationToken = default)
- => await CreateApiCall()
+ => await CreateApiCall()
.RequestBuilder(_requestBuilder => _requestBuilder
- .Setup(new HttpMethod("PATCH"), "/subscriptions/{subscription_id}/cycle-status")
+ .Setup(new HttpMethod("PATCH"), "/Subscriptions/{subscription_id}/metadata")
.WithAuth("httpBasic")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(request))
@@ -715,68 +775,6 @@ public async Task UpdateCurrentCycleStatusAsync(
.Header(_header => _header.Setup("idempotency-key", idempotencyKey))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
- ///