From bc43dea6b7fc47071999ca5e99e4c53575b0e946 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:14:23 +0000 Subject: [PATCH] Changes generated by 62d50e1318f39166898c5e2201057b2ba5b82a9b This commit was automatically created from gocardless/gocardless-dotnet-template@62d50e1318f39166898c5e2201057b2ba5b82a9b by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-dotnet-template/actions/runs/12123374524 --- GoCardless/Resources/BillingRequest.cs | 420 ++++++++++++++++++- GoCardless/Services/BillingRequestService.cs | 339 ++++++++++++++- 2 files changed, 739 insertions(+), 20 deletions(-) diff --git a/GoCardless/Resources/BillingRequest.cs b/GoCardless/Resources/BillingRequest.cs index 62d5e30..2b3df9f 100644 --- a/GoCardless/Resources/BillingRequest.cs +++ b/GoCardless/Resources/BillingRequest.cs @@ -11,17 +11,17 @@ namespace GoCardless.Resources /// /// Represents a billing request resource. /// - /// Billing Requests help create resources that require input or action from - /// a - /// customer. An example of required input might be additional customer - /// billing - /// details, while an action would be asking a customer to authorise a - /// payment - /// using their mobile banking app. + /// Billing Requests help create resources that require input or action + /// from a customer. An example of required input might be additional + /// customer billing details, while an action would be asking a customer to + /// authorise a payment using their mobile banking app. /// /// See [Billing Requests: /// Overview](https://developer.gocardless.com/getting-started/billing-requests/overview/) - /// for how-to's, explanations and tutorials. + /// for how-to's, explanations and tutorials.

Important: All properties associated + /// with `subscription_request` and `instalment_schedule_request` are only + /// supported for ACH and PAD schemes.

///
public class BillingRequest { @@ -64,6 +64,12 @@ public class BillingRequest [JsonProperty("id")] public string Id { get; set; } + /// + /// Request for an instalment schedule + /// + [JsonProperty("instalment_schedule_request")] + public BillingRequestInstalmentScheduleRequest InstalmentScheduleRequest { get; set; } + /// /// Resources linked to this BillingRequest. /// @@ -120,6 +126,12 @@ public class BillingRequest /// [JsonProperty("status")] public string Status { get; set; } + + /// + /// Request for a subscription + /// + [JsonProperty("subscription_request")] + public BillingRequestSubscriptionRequest SubscriptionRequest { get; set; } } /// @@ -395,6 +407,147 @@ public enum BillingRequestActionType { SelectInstitution, } + /// + /// Represents a billing request instalment schedule request resource. + /// + /// Request for an instalment schedule + /// + public class BillingRequestInstalmentScheduleRequest + { + /// + /// The amount to be deducted from each payment as an app fee, to be + /// paid to the partner integration which created the subscription, in + /// the lowest denomination for the currency (e.g. pence in GBP, cents + /// in EUR). + /// + [JsonProperty("app_fee")] + public int? AppFee { get; set; } + + /// + /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) + /// currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", + /// "SEK" and "USD" are supported. + /// + [JsonProperty("currency")] + public BillingRequestInstalmentScheduleRequestCurrency? Currency { get; set; } + + /// + /// instalments to be created. See [create (with + /// dates)](#instalment-schedules-create-with-dates) and [create (with + /// schedule)](#instalment-schedules-create-with-schedule) for more + /// information on how to specify instalments. + /// + [JsonProperty("instalments")] + public List Instalments { get; set; } + + /// + /// Resources linked to this BillingRequestInstalmentScheduleRequest. + /// + [JsonProperty("links")] + public BillingRequestInstalmentScheduleRequestLinks Links { get; set; } + + /// + /// Key-value store of custom data. Up to 3 keys are permitted, with key + /// names up to 50 characters and values up to 500 characters. + /// + [JsonProperty("metadata")] + public IDictionary Metadata { get; set; } + + /// + /// Name of the instalment schedule, up to 100 chars. This name will + /// also be + /// copied to the payments of the instalment schedule if you use + /// schedule-based creation. + /// + [JsonProperty("name")] + public string Name { get; set; } + + /// + /// An optional payment reference. This will be set as the reference on + /// each payment + /// created and will appear on your customer's bank statement. See the + /// documentation for + /// the [create payment endpoint](#payments-create-a-payment) for more + /// details. + ///
+ ///
+ [JsonProperty("payment_reference")] + public string PaymentReference { get; set; } + + /// + /// On failure, automatically retry payments using [intelligent + /// retries](#success-intelligent-retries). Default is `false`.

Important: To be able to use + /// intelligent retries, Success+ needs to be enabled in [GoCardless + /// dashboard](https://manage.gocardless.com/success-plus).

+ ///
+ [JsonProperty("retry_if_possible")] + public bool? RetryIfPossible { get; set; } + + /// + /// The total amount of the instalment schedule, defined as the sum of + /// all individual + /// payments, in the lowest denomination for the currency (e.g. pence in + /// GBP, cents in + /// EUR). If the requested payment amounts do not sum up correctly, a + /// validation error + /// will be returned. + /// + [JsonProperty("total_amount")] + public int? TotalAmount { get; set; } + } + + /// + /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code. Currently + /// "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" and "USD" are supported. + /// + [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] + public enum BillingRequestInstalmentScheduleRequestCurrency { + /// Unknown status + [EnumMember(Value = "unknown")] + Unknown = 0, + + /// `currency` with a value of "AUD" + [EnumMember(Value = "AUD")] + AUD, + /// `currency` with a value of "CAD" + [EnumMember(Value = "CAD")] + CAD, + /// `currency` with a value of "DKK" + [EnumMember(Value = "DKK")] + DKK, + /// `currency` with a value of "EUR" + [EnumMember(Value = "EUR")] + EUR, + /// `currency` with a value of "GBP" + [EnumMember(Value = "GBP")] + GBP, + /// `currency` with a value of "NZD" + [EnumMember(Value = "NZD")] + NZD, + /// `currency` with a value of "SEK" + [EnumMember(Value = "SEK")] + SEK, + /// `currency` with a value of "USD" + [EnumMember(Value = "USD")] + USD, + } + + /// + /// Resources linked to this BillingRequestInstalmentScheduleRequest + /// + public class BillingRequestInstalmentScheduleRequestLinks + { + /// + /// (Optional) ID of the + /// [instalment_schedule](#core-endpoints-instalment-schedules) that was + /// created from this instalment schedule request. + /// + /// + [JsonProperty("instalment_schedule")] + public string InstalmentSchedule { get; set; } + } + /// /// Resources linked to this BillingRequest /// @@ -435,6 +588,20 @@ public class BillingRequestLinks [JsonProperty("customer_billing_detail")] public string CustomerBillingDetail { get; set; } + /// + /// (Optional) ID of the associated instalment schedule request + /// + [JsonProperty("instalment_schedule_request")] + public string InstalmentScheduleRequest { get; set; } + + /// + /// (Optional) ID of the + /// [instalment_schedule](#core-endpoints-instalment-schedules) that was + /// created from this instalment schedule request. + /// + [JsonProperty("instalment_schedule_request_instalment_schedule")] + public string InstalmentScheduleRequestInstalmentSchedule { get; set; } + /// /// (Optional) ID of the associated mandate request /// @@ -472,6 +639,19 @@ public class BillingRequestLinks ///
[JsonProperty("payment_request_payment")] public string PaymentRequestPayment { get; set; } + + /// + /// (Optional) ID of the associated subscription request + /// + [JsonProperty("subscription_request")] + public string SubscriptionRequest { get; set; } + + /// + /// (Optional) ID of the [subscription](#core-endpoints-subscriptions) + /// that was created from this subscription request. + /// + [JsonProperty("subscription_request_subscription")] + public string SubscriptionRequestSubscription { get; set; } } /// @@ -499,8 +679,11 @@ public class BillingRequestMandateRequest /// /// This attribute represents the authorisation type between the payer - /// and merchant. It can be set to one-off, recurring or standing for - /// ACH scheme. And single, recurring and sporadic for PAD scheme. + /// and merchant. It can be set to `one_off`, + /// `recurring` or `standing` for ACH scheme. And `single`, `recurring` + /// and `sporadic` for PAD scheme. _Note:_ This is only supported for + /// ACH and PAD schemes. + /// /// [JsonProperty("consent_type")] public string ConsentType { get; set; } @@ -651,6 +834,15 @@ public class BillingRequestMandateRequestConstraints [JsonProperty("max_amount_per_payment")] public int? MaxAmountPerPayment { get; set; } + /// + /// A constraint where you can specify info (free text string) about how + /// payments are calculated. _Note:_ This is only supported for ACH and + /// PAD schemes. + /// + /// + [JsonProperty("payment_method")] + public string PaymentMethod { get; set; } + /// /// List of periodic limits and constraints which apply to them /// @@ -1355,4 +1547,212 @@ public enum BillingRequestStatus { Cancelled, } + /// + /// Represents a billing request subscription request resource. + /// + /// Request for a subscription + /// + public class BillingRequestSubscriptionRequest + { + /// + /// Amount in the lowest denomination for the currency (e.g. pence in + /// GBP, cents in EUR). + /// + [JsonProperty("amount")] + public int? Amount { get; set; } + + /// + /// The amount to be deducted from each payment as an app fee, to be + /// paid to the partner integration which created the subscription, in + /// the lowest denomination for the currency (e.g. pence in GBP, cents + /// in EUR). + /// + [JsonProperty("app_fee")] + public int? AppFee { get; set; } + + /// + /// The total number of payments that should be taken by this + /// subscription. + /// + [JsonProperty("count")] + public int? Count { get; set; } + + /// + /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) + /// currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", + /// "SEK" and "USD" are supported. + /// + [JsonProperty("currency")] + public string Currency { get; set; } + + /// + /// As per RFC 2445. The day of the month to charge customers on. + /// `1`-`28` or `-1` to indicate the last day of the month. + /// + [JsonProperty("day_of_month")] + public int? DayOfMonth { get; set; } + + /// + /// Number of `interval_units` between customer charge dates. Must be + /// greater than or equal to `1`. Must result in at least one charge + /// date per year. Defaults to `1`. + /// + [JsonProperty("interval")] + public int? Interval { get; set; } + + /// + /// The unit of time between customer charge dates. One of `weekly`, + /// `monthly` or `yearly`. + /// + [JsonProperty("interval_unit")] + public BillingRequestSubscriptionRequestIntervalUnit? IntervalUnit { get; set; } + + /// + /// Resources linked to this BillingRequestSubscriptionRequest. + /// + [JsonProperty("links")] + public BillingRequestSubscriptionRequestLinks Links { get; set; } + + /// + /// Key-value store of custom data. Up to 3 keys are permitted, with key + /// names up to 50 characters and values up to 500 characters. + /// + [JsonProperty("metadata")] + public IDictionary Metadata { get; set; } + + /// + /// Name of the month on which to charge a customer. Must be lowercase. + /// Only applies + /// when the interval_unit is `yearly`. + /// + /// + [JsonProperty("month")] + public BillingRequestSubscriptionRequestMonth? Month { get; set; } + + /// + /// Optional name for the subscription. This will be set as the + /// description on each payment created. Must not exceed 255 characters. + /// + [JsonProperty("name")] + public string Name { get; set; } + + /// + /// An optional payment reference. This will be set as the reference on + /// each payment + /// created and will appear on your customer's bank statement. See the + /// documentation for + /// the [create payment endpoint](#payments-create-a-payment) for more + /// details. + ///
+ ///
+ [JsonProperty("payment_reference")] + public string PaymentReference { get; set; } + + /// + /// On failure, automatically retry payments using [intelligent + /// retries](#success-intelligent-retries). Default is `false`.

Important: To be able to use + /// intelligent retries, Success+ needs to be enabled in [GoCardless + /// dashboard](https://manage.gocardless.com/success-plus).

+ ///
+ [JsonProperty("retry_if_possible")] + public bool? RetryIfPossible { get; set; } + + /// + /// The date on which the first payment should be charged. If fulfilled + /// after this date, this will be set as the mandate's + /// `next_possible_charge_date`. + /// When left blank and `month` or `day_of_month` are provided, this + /// will be set to the date of the first payment. + /// If created without `month` or `day_of_month` this will be set as the + /// mandate's `next_possible_charge_date`. + /// + /// + [JsonProperty("start_date")] + public string StartDate { get; set; } + } + + /// + /// The unit of time between customer charge dates. One of `weekly`, `monthly` or `yearly`. + /// + [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] + public enum BillingRequestSubscriptionRequestIntervalUnit { + /// Unknown status + [EnumMember(Value = "unknown")] + Unknown = 0, + + /// `interval_unit` with a value of "weekly" + [EnumMember(Value = "weekly")] + Weekly, + /// `interval_unit` with a value of "monthly" + [EnumMember(Value = "monthly")] + Monthly, + /// `interval_unit` with a value of "yearly" + [EnumMember(Value = "yearly")] + Yearly, + } + + /// + /// Resources linked to this BillingRequestSubscriptionRequest + /// + public class BillingRequestSubscriptionRequestLinks + { + /// + /// (Optional) ID of the [subscription](#core-endpoints-subscriptions) + /// that was created from this subscription request. + /// + /// + [JsonProperty("subscription")] + public string Subscription { get; set; } + } + + /// + /// Name of the month on which to charge a customer. Must be lowercase. Only applies + /// when the interval_unit is `yearly`. + /// + /// + [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] + public enum BillingRequestSubscriptionRequestMonth { + /// Unknown status + [EnumMember(Value = "unknown")] + Unknown = 0, + + /// `month` with a value of "january" + [EnumMember(Value = "january")] + January, + /// `month` with a value of "february" + [EnumMember(Value = "february")] + February, + /// `month` with a value of "march" + [EnumMember(Value = "march")] + March, + /// `month` with a value of "april" + [EnumMember(Value = "april")] + April, + /// `month` with a value of "may" + [EnumMember(Value = "may")] + May, + /// `month` with a value of "june" + [EnumMember(Value = "june")] + June, + /// `month` with a value of "july" + [EnumMember(Value = "july")] + July, + /// `month` with a value of "august" + [EnumMember(Value = "august")] + August, + /// `month` with a value of "september" + [EnumMember(Value = "september")] + September, + /// `month` with a value of "october" + [EnumMember(Value = "october")] + October, + /// `month` with a value of "november" + [EnumMember(Value = "november")] + November, + /// `month` with a value of "december" + [EnumMember(Value = "december")] + December, + } + } diff --git a/GoCardless/Services/BillingRequestService.cs b/GoCardless/Services/BillingRequestService.cs index 59b6bf1..08a1561 100644 --- a/GoCardless/Services/BillingRequestService.cs +++ b/GoCardless/Services/BillingRequestService.cs @@ -16,17 +16,17 @@ namespace GoCardless.Services /// /// Service class for working with billing request resources. /// - /// Billing Requests help create resources that require input or action from - /// a - /// customer. An example of required input might be additional customer - /// billing - /// details, while an action would be asking a customer to authorise a - /// payment - /// using their mobile banking app. + /// Billing Requests help create resources that require input or action + /// from a customer. An example of required input might be additional + /// customer billing details, while an action would be asking a customer to + /// authorise a payment using their mobile banking app. /// /// See [Billing Requests: /// Overview](https://developer.gocardless.com/getting-started/billing-requests/overview/) - /// for how-to's, explanations and tutorials. + /// for how-to's, explanations and tutorials.

Important: All properties associated + /// with `subscription_request` and `instalment_schedule_request` are only + /// supported for ACH and PAD schemes.

///
public class BillingRequestService @@ -43,7 +43,10 @@ public BillingRequestService(GoCardlessClient goCardlessClient) } /// - /// + ///

Important: All properties + /// associated with `subscription_request` and + /// `instalment_schedule_request` are only supported for ACH and PAD + /// schemes.

///
/// An optional `BillingRequestCreateRequest` representing the body for this create request. /// An optional `RequestSettings` allowing you to configure the request @@ -376,7 +379,9 @@ public Task SelectInstitutionAsync(string identity, Bill /// - /// + ///

Important: All properties associated + /// with `subscription_request` and `instalment_schedule_request` are only + /// supported for ACH and PAD schemes.

///
public class BillingRequestCreateRequest : IHasIdempotencyKey { @@ -394,6 +399,125 @@ public class BillingRequestCreateRequest : IHasIdempotencyKey [JsonProperty("fallback_enabled")] public bool? FallbackEnabled { get; set; } + [JsonProperty("instalment_schedule_request")] + public BillingRequestInstalmentScheduleRequest InstalmentScheduleRequest { get; set; } + /// + /// + /// + public class BillingRequestInstalmentScheduleRequest + { + + /// + /// The amount to be deducted from each payment as an app fee, to be + /// paid to the partner integration which created the subscription, + /// in the lowest denomination for the currency (e.g. pence in GBP, + /// cents in EUR). + /// + [JsonProperty("app_fee")] + public int? AppFee { get; set; } + + /// + /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) + /// currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", + /// "NZD", "SEK" and "USD" are supported. + /// + [JsonProperty("currency")] + public BillingRequestCurrency? Currency { get; set; } + /// + /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) + /// currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", + /// "SEK" and "USD" are supported. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum BillingRequestCurrency + { + + /// `currency` with a value of "AUD" + [EnumMember(Value = "AUD")] + AUD, + /// `currency` with a value of "CAD" + [EnumMember(Value = "CAD")] + CAD, + /// `currency` with a value of "DKK" + [EnumMember(Value = "DKK")] + DKK, + /// `currency` with a value of "EUR" + [EnumMember(Value = "EUR")] + EUR, + /// `currency` with a value of "GBP" + [EnumMember(Value = "GBP")] + GBP, + /// `currency` with a value of "NZD" + [EnumMember(Value = "NZD")] + NZD, + /// `currency` with a value of "SEK" + [EnumMember(Value = "SEK")] + SEK, + /// `currency` with a value of "USD" + [EnumMember(Value = "USD")] + USD, + } + + /// + /// instalments to be created. See [create (with + /// dates)](#instalment-schedules-create-with-dates) and [create + /// (with schedule)](#instalment-schedules-create-with-schedule) for + /// more information on how to specify instalments. + /// + [JsonProperty("instalments")] + public string[] Instalments { get; set; } + + /// + /// Key-value store of custom data. Up to 3 keys are permitted, with + /// key names up to 50 characters and values up to 500 characters. + /// + [JsonProperty("metadata")] + public IDictionary Metadata { get; set; } + + /// + /// Name of the instalment schedule, up to 100 chars. This name will + /// also be + /// copied to the payments of the instalment schedule if you use + /// schedule-based creation. + /// + [JsonProperty("name")] + public string Name { get; set; } + + /// + /// An optional payment reference. This will be set as the reference + /// on each payment + /// created and will appear on your customer's bank statement. See + /// the documentation for + /// the [create payment endpoint](#payments-create-a-payment) for + /// more details. + ///
+ ///
+ [JsonProperty("payment_reference")] + public string PaymentReference { get; set; } + + /// + /// On failure, automatically retry payments using [intelligent + /// retries](#success-intelligent-retries). Default is `false`.

Important: To be able to use + /// intelligent retries, Success+ needs to be enabled in [GoCardless + /// dashboard](https://manage.gocardless.com/success-plus).

+ ///
+ [JsonProperty("retry_if_possible")] + public bool? RetryIfPossible { get; set; } + + /// + /// The total amount of the instalment schedule, defined as the sum + /// of all individual + /// payments, in the lowest denomination for the currency (e.g. + /// pence in GBP, cents in + /// EUR). If the requested payment amounts do not sum up correctly, + /// a validation error + /// will be returned. + /// + [JsonProperty("total_amount")] + public int? TotalAmount { get; set; } + } + /// /// Linked resources. /// @@ -515,6 +639,15 @@ public class BillingRequestConstraints [JsonProperty("max_amount_per_payment")] public int? MaxAmountPerPayment { get; set; } + /// + /// A constraint where you can specify info (free text string) about + /// how payments are calculated. _Note:_ This is only supported for + /// ACH and PAD schemes. + /// + /// + [JsonProperty("payment_method")] + public string PaymentMethod { get; set; } + /// /// List of periodic limits and constraints which apply to them /// @@ -928,6 +1061,192 @@ public enum BillingRequestPurposeCode Other, } + [JsonProperty("subscription_request")] + public BillingRequestSubscriptionRequest SubscriptionRequest { get; set; } + /// + /// + /// + public class BillingRequestSubscriptionRequest + { + + /// + /// Amount in the lowest denomination for the currency (e.g. pence + /// in GBP, cents in EUR). + /// + [JsonProperty("amount")] + public int? Amount { get; set; } + + /// + /// The amount to be deducted from each payment as an app fee, to be + /// paid to the partner integration which created the subscription, + /// in the lowest denomination for the currency (e.g. pence in GBP, + /// cents in EUR). + /// + [JsonProperty("app_fee")] + public int? AppFee { get; set; } + + /// + /// The total number of payments that should be taken by this + /// subscription. + /// + [JsonProperty("count")] + public int? Count { get; set; } + + /// + /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) + /// currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", + /// "NZD", "SEK" and "USD" are supported. + /// + [JsonProperty("currency")] + public string Currency { get; set; } + + /// + /// As per RFC 2445. The day of the month to charge customers on. + /// `1`-`28` or `-1` to indicate the last day of the month. + /// + [JsonProperty("day_of_month")] + public int? DayOfMonth { get; set; } + + /// + /// Number of `interval_units` between customer charge dates. Must + /// be greater than or equal to `1`. Must result in at least one + /// charge date per year. Defaults to `1`. + /// + [JsonProperty("interval")] + public int? Interval { get; set; } + + /// + /// The unit of time between customer charge dates. One of `weekly`, + /// `monthly` or `yearly`. + /// + [JsonProperty("interval_unit")] + public BillingRequestIntervalUnit? IntervalUnit { get; set; } + /// + /// The unit of time between customer charge dates. One of `weekly`, + /// `monthly` or `yearly`. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum BillingRequestIntervalUnit + { + + /// `interval_unit` with a value of "weekly" + [EnumMember(Value = "weekly")] + Weekly, + /// `interval_unit` with a value of "monthly" + [EnumMember(Value = "monthly")] + Monthly, + /// `interval_unit` with a value of "yearly" + [EnumMember(Value = "yearly")] + Yearly, + } + + /// + /// Key-value store of custom data. Up to 3 keys are permitted, with + /// key names up to 50 characters and values up to 500 characters. + /// + [JsonProperty("metadata")] + public IDictionary Metadata { get; set; } + + /// + /// Name of the month on which to charge a customer. Must be + /// lowercase. Only applies + /// when the interval_unit is `yearly`. + /// + /// + [JsonProperty("month")] + public BillingRequestMonth? Month { get; set; } + /// + /// Name of the month on which to charge a customer. Must be lowercase. + /// Only applies + /// when the interval_unit is `yearly`. + /// + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum BillingRequestMonth + { + + /// `month` with a value of "january" + [EnumMember(Value = "january")] + January, + /// `month` with a value of "february" + [EnumMember(Value = "february")] + February, + /// `month` with a value of "march" + [EnumMember(Value = "march")] + March, + /// `month` with a value of "april" + [EnumMember(Value = "april")] + April, + /// `month` with a value of "may" + [EnumMember(Value = "may")] + May, + /// `month` with a value of "june" + [EnumMember(Value = "june")] + June, + /// `month` with a value of "july" + [EnumMember(Value = "july")] + July, + /// `month` with a value of "august" + [EnumMember(Value = "august")] + August, + /// `month` with a value of "september" + [EnumMember(Value = "september")] + September, + /// `month` with a value of "october" + [EnumMember(Value = "october")] + October, + /// `month` with a value of "november" + [EnumMember(Value = "november")] + November, + /// `month` with a value of "december" + [EnumMember(Value = "december")] + December, + } + + /// + /// Optional name for the subscription. This will be set as the + /// description on each payment created. Must not exceed 255 + /// characters. + /// + [JsonProperty("name")] + public string Name { get; set; } + + /// + /// An optional payment reference. This will be set as the reference + /// on each payment + /// created and will appear on your customer's bank statement. See + /// the documentation for + /// the [create payment endpoint](#payments-create-a-payment) for + /// more details. + ///
+ ///
+ [JsonProperty("payment_reference")] + public string PaymentReference { get; set; } + + /// + /// On failure, automatically retry payments using [intelligent + /// retries](#success-intelligent-retries). Default is `false`.

Important: To be able to use + /// intelligent retries, Success+ needs to be enabled in [GoCardless + /// dashboard](https://manage.gocardless.com/success-plus).

+ ///
+ [JsonProperty("retry_if_possible")] + public bool? RetryIfPossible { get; set; } + + /// + /// The date on which the first payment should be charged. If + /// fulfilled after this date, this will be set as the mandate's + /// `next_possible_charge_date`. + /// When left blank and `month` or `day_of_month` are provided, this + /// will be set to the date of the first payment. + /// If created without `month` or `day_of_month` this will be set as + /// the mandate's `next_possible_charge_date`. + /// + /// + [JsonProperty("start_date")] + public string StartDate { get; set; } + } + /// /// A unique key to ensure that this request only succeeds once, allowing you to safely retry request errors such as network failures. /// Any requests, where supported, to create a resource with a key that has previously been used will not succeed.