Skip to content

Commit

Permalink
Fix more editor config issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Viincenttt committed May 12, 2024
1 parent f83aefc commit 16ac8e9
Show file tree
Hide file tree
Showing 45 changed files with 110 additions and 95 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@using Mollie.WebApplication.Blazor.Models.Order
@using System.Globalization
@using Mollie.Api.Client
@using Mollie.Api.Models.Order.Request

@inject IOrderClient OrderClient
@inject NavigationManager NavigationManager
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@page "/order/overview"
@using Mollie.Api.Models.Order.Response

@inject IOrderClient OrderClient

Expand Down
2 changes: 1 addition & 1 deletion samples/Mollie.WebApplication.Blazor/Pages/_Host.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@

<script src="_framework/blazor.server.js"></script>
</body>
</html>
</html>
1 change: 1 addition & 0 deletions src/Mollie.Api/Client/Abstract/ICaptureClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Mollie.Api.Models.List;
using Mollie.Api.Models.Capture;
using Mollie.Api.Models.Capture.Request;
using Mollie.Api.Models.Capture.Response;
using Mollie.Api.Models.Url;

namespace Mollie.Api.Client.Abstract {
Expand Down
2 changes: 2 additions & 0 deletions src/Mollie.Api/Client/Abstract/IOrderClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
using Mollie.Api.Models;
using Mollie.Api.Models.List;
using Mollie.Api.Models.Order;
using Mollie.Api.Models.Order.Request;
using Mollie.Api.Models.Order.Request.ManageOrderLines;
using Mollie.Api.Models.Order.Response;
using Mollie.Api.Models.Payment.Response;
using Mollie.Api.Models.Refund;
using Mollie.Api.Models.Url;
Expand Down
4 changes: 2 additions & 2 deletions src/Mollie.Api/Client/Abstract/ISettlementsClient.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using System.Threading.Tasks;
using Mollie.Api.Models.Capture;
using Mollie.Api.Models.Capture.Response;
using Mollie.Api.Models.Chargeback;
using Mollie.Api.Models.List;
using Mollie.Api.Models.Payment.Response;
Expand All @@ -24,7 +24,7 @@ public interface ISettlementsClient : IBaseMollieClient {
Task<ListResponse<CaptureResponse>> GetSettlementCapturesListAsync(string settlementId, string? offset = null, int? count = null);
Task<ListResponse<CaptureResponse>> GetSettlementCapturesListAsync(UrlObjectLink<ListResponse<CaptureResponse>> url);
Task<SettlementResponse> GetSettlementAsync(UrlObjectLink<SettlementResponse> url);

[Obsolete("Use GetSettlementCapturesListAsync instead")]
Task<ListResponse<CaptureResponse>> ListSettlementCapturesAsync(string settlementId);
}
Expand Down
5 changes: 3 additions & 2 deletions src/Mollie.Api/Client/Abstract/IShipmentClient.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Threading.Tasks;
using Mollie.Api.Models.List;
using Mollie.Api.Models.Shipment;
using Mollie.Api.Models.Shipment.Request;
using Mollie.Api.Models.Shipment.Response;
using Mollie.Api.Models.Url;

namespace Mollie.Api.Client.Abstract {
Expand All @@ -12,4 +13,4 @@ public interface IShipmentClient : IBaseMollieClient {
Task<ListResponse<ShipmentResponse>> GetShipmentsListAsync(UrlObjectLink<ListResponse<ShipmentResponse>> url);
Task<ShipmentResponse> UpdateShipmentAsync(string orderId, string shipmentId, ShipmentUpdateRequest shipmentUpdateRequest);
}
}
}
2 changes: 1 addition & 1 deletion src/Mollie.Api/Client/CaptureClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
using System.Threading.Tasks;
using Mollie.Api.Client.Abstract;
using Mollie.Api.Extensions;
using Mollie.Api.Models.Capture;
using Mollie.Api.Models.Capture.Request;
using Mollie.Api.Models.Capture.Response;
using Mollie.Api.Models.List;
using Mollie.Api.Models.Url;

Expand Down
3 changes: 2 additions & 1 deletion src/Mollie.Api/Client/OrderClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
using Mollie.Api.Extensions;
using Mollie.Api.Models;
using Mollie.Api.Models.List;
using Mollie.Api.Models.Order;
using Mollie.Api.Models.Order.Request;
using Mollie.Api.Models.Order.Request.ManageOrderLines;
using Mollie.Api.Models.Order.Response;
using Mollie.Api.Models.Payment.Response;
using Mollie.Api.Models.Refund;
using Mollie.Api.Models.Url;
Expand Down
2 changes: 1 addition & 1 deletion src/Mollie.Api/Client/SettlementsClient.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Net.Http;
using System.Threading.Tasks;
using Mollie.Api.Client.Abstract;
using Mollie.Api.Models.Capture;
using Mollie.Api.Models.Capture.Response;
using Mollie.Api.Models.Chargeback;
using Mollie.Api.Models.List;
using Mollie.Api.Models.Payment.Response;
Expand Down
3 changes: 2 additions & 1 deletion src/Mollie.Api/Client/ShipmentClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
using Mollie.Api.Client.Abstract;
using Mollie.Api.Extensions;
using Mollie.Api.Models.List;
using Mollie.Api.Models.Shipment;
using Mollie.Api.Models.Shipment.Request;
using Mollie.Api.Models.Shipment.Response;
using Mollie.Api.Models.Url;

namespace Mollie.Api.Client
Expand Down
8 changes: 4 additions & 4 deletions src/Mollie.Api/Models/Capture/Response/CaptureResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Mollie.Api.JsonConverters;
using Newtonsoft.Json;

namespace Mollie.Api.Models.Capture
namespace Mollie.Api.Models.Capture.Response
{
public record CaptureResponse {
/// <summary>
Expand All @@ -25,7 +25,7 @@ public record CaptureResponse {
/// The amount captured.
/// </summary>
public required Amount Amount { get; init; }

/// <summary>
/// The capture’s status.
/// </summary>
Expand Down Expand Up @@ -55,7 +55,7 @@ public record CaptureResponse {
/// The capture’s date and time of creation, in ISO 8601 format.
/// </summary>
public required DateTime CreatedAt { get; init; }

/// <summary>
/// The optional metadata you provided upon payment creation. Metadata can be used to link an order to a payment.
/// </summary>
Expand All @@ -68,4 +68,4 @@ public record CaptureResponse {
[JsonProperty("_links")]
public required CaptureResponseLinks Links { get; init; }
}
}
}
10 changes: 5 additions & 5 deletions src/Mollie.Api/Models/Capture/Response/CaptureResponseLinks.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Mollie.Api.Models.Payment.Response;
using Mollie.Api.Models.Settlement;
using Mollie.Api.Models.Shipment;
using Mollie.Api.Models.Shipment.Response;
using Mollie.Api.Models.Url;

namespace Mollie.Api.Models.Capture {
namespace Mollie.Api.Models.Capture.Response {
public record CaptureResponseLinks {
/// <summary>
/// The API resource URL of the capture itself.
Expand All @@ -19,15 +19,15 @@ public record CaptureResponseLinks {
/// The API resource URL of the shipment that triggered the capture to be created.
/// </summary>
public required UrlObjectLink<ShipmentResponse> Shipment { get; init; }

/// <summary>
/// The API resource URL of the settlement this capture has been settled with. Not present if not yet settled.
/// </summary>
public required UrlObjectLink<SettlementResponse> Settlement { get; init; }

/// <summary>
/// The URL to the order retrieval endpoint documentation.
/// </summary>
public required UrlLink Documentation { get; init; }
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
namespace Mollie.Api.Models.Order.Request.ManageOrderLines {
public record ManagerOrderLinesCancelOperationData : OrderLineDetails {
}
}
public record ManagerOrderLinesCancelOperationData : OrderLineDetails;
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Collections.Generic;

namespace Mollie.Api.Models.Order {
namespace Mollie.Api.Models.Order.Request {
public record OrderLineCancellationRequest {
public required IEnumerable<OrderLineDetails> Lines { get; init; }

/// <summary>
/// Oauth only - Optional
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Mollie.Api/Models/Order/Request/OrderLineDetails.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Mollie.Api.Models.Order {
namespace Mollie.Api.Models.Order.Request {
public record OrderLineDetails {
public required string Id { get; init; }
public int? Quantity { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Mollie.Api.Models.Order {
namespace Mollie.Api.Models.Order.Request {
public static class OrderLineDetailsCategory {
public const string Meal = "meal";
public const string Eco = "eco";
public const string Gift = "gift";
}
}
}
4 changes: 2 additions & 2 deletions src/Mollie.Api/Models/Order/Request/OrderLineDetailsType.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Mollie.Api.Models.Order {
namespace Mollie.Api.Models.Order.Request {
public static class OrderLineDetailsType {
public const string Physical = "physical";
public const string Discount = "discount";
Expand All @@ -8,4 +8,4 @@ public static class OrderLineDetailsType {
public const string GiftCard = "gift_card";
public const string Surcharge = "surcharge";
}
}
}
6 changes: 3 additions & 3 deletions src/Mollie.Api/Models/Order/Request/OrderLineRequest.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Mollie.Api.JsonConverters;
using Newtonsoft.Json;

namespace Mollie.Api.Models.Order {
namespace Mollie.Api.Models.Order.Request {
public record OrderLineRequest {
/// <summary>
/// The type of product bought, for example, a physical or a digital product. See the
/// The type of product bought, for example, a physical or a digital product. See the
/// Mollie.Api.Models.Order.OrderLineDetailsType class for a full list of known values.
/// </summary>
public string? Type { get; set; }
Expand Down Expand Up @@ -76,4 +76,4 @@ public record OrderLineRequest {
[JsonConverter(typeof(RawJsonConverter))]
public string? Metadata { get; set; }
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Mollie.Api.JsonConverters;
using Newtonsoft.Json;

namespace Mollie.Api.Models.Order {
namespace Mollie.Api.Models.Order.Request {
public record OrderLineUpdateRequest {
/// <summary>
/// A description of the order line, for example LEGO 4440 Forest Police Station.
Expand Down
20 changes: 10 additions & 10 deletions src/Mollie.Api/Models/Order/Request/OrderPaymentRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
using System.Linq;
using Newtonsoft.Json;

namespace Mollie.Api.Models.Order {
namespace Mollie.Api.Models.Order.Request {
public record OrderPaymentRequest {
/// <summary>
/// Normally, a payment method selection screen is shown. However, when using this parameter, your customer will skip the
/// selection screen and will be sent directly to the chosen payment method. The parameter enables you to fully integrate
/// Normally, a payment method selection screen is shown. However, when using this parameter, your customer will skip the
/// selection screen and will be sent directly to the chosen payment method. The parameter enables you to fully integrate
/// the payment method selection into your website, however note Mollie’s country based conversion optimization is lost.
/// See the Mollie.Api.Models.Payment.PaymentMethod class for a full list of known values.
/// </summary>
[JsonIgnore]
public string? Method {
public string? Method {
get => Methods?.FirstOrDefault();
set {
if (value == null) {
Expand All @@ -26,10 +26,10 @@ public string? Method {

/// <summary>
/// Normally, a payment method screen is shown. However, when using this parameter, you can choose a specific payment method
/// and your customer will skip the selection screen and is sent directly to the chosen payment method. The parameter
/// and your customer will skip the selection screen and is sent directly to the chosen payment method. The parameter
/// enables you to fully integrate the payment method selection into your website.
/// You can also specify the methods in an array.By doing so we will still show the payment method selection screen but will
/// only show the methods specified in the array. For example, you can use this functionality to only show payment methods
/// You can also specify the methods in an array.By doing so we will still show the payment method selection screen but will
/// only show the methods specified in the array. For example, you can use this functionality to only show payment methods
/// from a specific country to your customer.
/// </summary>
[JsonProperty("method")]
Expand All @@ -46,14 +46,14 @@ public string? Method {
/// of the consumer’s accounts should be credited.
/// </summary>
public string? MandateId { get; set; }

/// <summary>
/// Oauth only - Optional – Set this to true to make this payment a test payment.
/// </summary>
public bool? Testmode { get; set; }

/// <summary>
/// Oauth only - Optional – Adding an Application Fee allows you to charge the merchant a small sum for the payment and transfer
/// Oauth only - Optional – Adding an Application Fee allows you to charge the merchant a small sum for the payment and transfer
/// this to your own account.
/// </summary>
public ApplicationFee? ApplicationFee { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions src/Mollie.Api/Models/Order/Request/OrderRefundRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Mollie.Api.JsonConverters;
using Newtonsoft.Json;

namespace Mollie.Api.Models.Order {
namespace Mollie.Api.Models.Order.Request {
public record OrderRefundRequest {
/// <summary>
/// An array of objects containing the order line details you want to create a refund for. If you send
Expand All @@ -21,7 +21,7 @@ public record OrderRefundRequest {
/// </summary>
[JsonConverter(typeof(RawJsonConverter))]
public string? Metadata { get; set; }

/// <summary>
/// Oauth only - Optional
/// </summary>
Expand Down
5 changes: 2 additions & 3 deletions src/Mollie.Api/Models/Order/Request/OrderRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
using System.Collections.Generic;
using System.Linq;
using Mollie.Api.JsonConverters;
using Mollie.Api.Models.Order.Request.PaymentSpecificParameters;
using Newtonsoft.Json;

namespace Mollie.Api.Models.Order {
namespace Mollie.Api.Models.Order.Request {
public record OrderRequest {
/// <summary>
/// The total amount of the order, including VAT and discounts. This is the amount that will be charged
Expand Down Expand Up @@ -102,7 +101,7 @@ public string? Method {
/// <summary>
/// Optional - Any payment specific properties can be passed here.
/// </summary>
public PaymentSpecificParameters? Payment { get; set; }
public PaymentSpecificParameters.PaymentSpecificParameters? Payment { get; set; }

/// <summary>
/// Provide any data you like, and we will save the data alongside the subscription. Whenever you fetch the subscription
Expand Down
12 changes: 6 additions & 6 deletions src/Mollie.Api/Models/Order/Request/OrderUpdateRequest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Mollie.Api.Models.Order {
namespace Mollie.Api.Models.Order.Request {
public record OrderUpdateRequest {
/// <summary>
/// The billing person and address for the order. See Order address details for the
Expand All @@ -16,30 +16,30 @@ public record OrderUpdateRequest {
/// The order number. For example, 16738. We recommend that each order should have a unique order number.
/// </summary>
public string? OrderNumber { get; set; }

/// <summary>
/// The URL your customer will be redirected to after the payment process. Updating this field is only possible
/// when the payment is not yet finalized.
/// </summary>
public string? RedirectUrl { get; set; }

/// <summary>
/// The URL your consumer will be redirected to when the consumer explicitly cancels the order. If this URL
/// is not provided, the consumer will be redirected to the redirectUrl instead — see above. Updating this
/// field is only possible when the payment is not yet finalized.
/// </summary>
public string? CancelUrl { get; set; }

/// <summary>
/// Set the webhook URL, where we will send order status changes to. The webhookUrl must be reachable from
/// Mollie’s point of view, so you cannot use localhost. If you want to use webhook during development on
/// localhost, you should use a tool like ngrok to have the webhooks delivered to your local machine.
/// </summary>
public string? WebhookUrl { get; set; }

/// <summary>
/// Oauth only - Optional
/// </summary>
public bool? Testmode { get; set; }
}
}
}
Loading

0 comments on commit 16ac8e9

Please sign in to comment.