From b4409b67c376eba0539d1ec4412b7d2a3e1be4b8 Mon Sep 17 00:00:00 2001 From: "monika.stojkova" Date: Thu, 18 Feb 2021 13:19:21 +0100 Subject: [PATCH] Changing Recurring property to CofType --- src/GloballyPaid.CSharp.Sdk/Enums/CofType.cs | 10 ++++++++++ src/GloballyPaid.CSharp.Sdk/Requests/ChargeRequest.cs | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 src/GloballyPaid.CSharp.Sdk/Enums/CofType.cs diff --git a/src/GloballyPaid.CSharp.Sdk/Enums/CofType.cs b/src/GloballyPaid.CSharp.Sdk/Enums/CofType.cs new file mode 100644 index 0000000..2db8106 --- /dev/null +++ b/src/GloballyPaid.CSharp.Sdk/Enums/CofType.cs @@ -0,0 +1,10 @@ +namespace GloballyPaid +{ + public enum CofType + { + UNSCHEDULED_CARDHOLDER, + UNSCHEDULED_MERCHANT, + RECURRING, + INSTALLMENT + } +} diff --git a/src/GloballyPaid.CSharp.Sdk/Requests/ChargeRequest.cs b/src/GloballyPaid.CSharp.Sdk/Requests/ChargeRequest.cs index 56ace73..9282759 100644 --- a/src/GloballyPaid.CSharp.Sdk/Requests/ChargeRequest.cs +++ b/src/GloballyPaid.CSharp.Sdk/Requests/ChargeRequest.cs @@ -18,8 +18,9 @@ public class ChargeRequest : Request [JsonProperty("capture")] public bool Capture { get; set; } = true; - [JsonProperty("recurring")] - public bool Recurring { get; set; } + [JsonProperty("cof_type")] + [JsonConverter(typeof(StringEnumConverter))] + public CofType CofType { get; set; } [JsonProperty("currency_code")] [JsonConverter(typeof(StringEnumConverter))]