diff --git a/Recurly/Resources/FraudRiskRule.cs b/Recurly/Resources/FraudRiskRule.cs new file mode 100644 index 00000000..25f86940 --- /dev/null +++ b/Recurly/Resources/FraudRiskRule.cs @@ -0,0 +1,27 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process + * and thus any edits you make by hand will be lost. If you wish to make a + * change to this file, please create a Github issue explaining the changes you + * need and we will usher them to the appropriate places. + */ +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using Newtonsoft.Json; + +namespace Recurly.Resources +{ + [ExcludeFromCodeCoverage] + public class FraudRiskRule : Resource + { + + /// The Kount rule number. + [JsonProperty("code")] + public string Code { get; set; } + + /// Description of why the rule was triggered + [JsonProperty("message")] + public string Message { get; set; } + + } +} diff --git a/Recurly/Resources/Invoice.cs b/Recurly/Resources/Invoice.cs index 0524aaa9..34c56081 100644 --- a/Recurly/Resources/Invoice.cs +++ b/Recurly/Resources/Invoice.cs @@ -96,16 +96,19 @@ public class Invoice : Resource /// Integer paired with `Net Terms Type` and representing the number /// of days past the current date (for `net` Net Terms Type) or days after /// the last day of the current month (for `eom` Net Terms Type) that the - /// invoice will become past due. For any value, an additional 24 hours is + /// invoice will become past due. For `manual` collection method, an additional 24 hours is /// added to ensure the customer has the entire last day to make payment before - /// becoming past due. For example: + /// becoming past due. For example: /// /// If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. /// If an invoice is due `net 30`, it will become past due at 31 days exactly. /// If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. /// + /// For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection. /// When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. - /// For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + /// + /// For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + /// or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection. [JsonProperty("net_terms")] public int? NetTerms { get; set; } diff --git a/Recurly/Resources/InvoiceCreate.cs b/Recurly/Resources/InvoiceCreate.cs index a2c0275a..7f03f209 100644 --- a/Recurly/Resources/InvoiceCreate.cs +++ b/Recurly/Resources/InvoiceCreate.cs @@ -36,16 +36,19 @@ public class InvoiceCreate : Request /// Integer paired with `Net Terms Type` and representing the number /// of days past the current date (for `net` Net Terms Type) or days after /// the last day of the current month (for `eom` Net Terms Type) that the - /// invoice will become past due. For any value, an additional 24 hours is + /// invoice will become past due. For `manual` collection method, an additional 24 hours is /// added to ensure the customer has the entire last day to make payment before - /// becoming past due. For example: + /// becoming past due. For example: /// /// If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. /// If an invoice is due `net 30`, it will become past due at 31 days exactly. /// If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. /// + /// For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection. /// When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. - /// For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + /// + /// For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + /// or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection. [JsonProperty("net_terms")] public int? NetTerms { get; set; } diff --git a/Recurly/Resources/PurchaseCreate.cs b/Recurly/Resources/PurchaseCreate.cs index 0eb832d5..8bf4989c 100644 --- a/Recurly/Resources/PurchaseCreate.cs +++ b/Recurly/Resources/PurchaseCreate.cs @@ -60,16 +60,19 @@ public class PurchaseCreate : Request /// Integer paired with `Net Terms Type` and representing the number /// of days past the current date (for `net` Net Terms Type) or days after /// the last day of the current month (for `eom` Net Terms Type) that the - /// invoice will become past due. For any value, an additional 24 hours is + /// invoice will become past due. For `manual` collection method, an additional 24 hours is /// added to ensure the customer has the entire last day to make payment before - /// becoming past due. For example: + /// becoming past due. For example: /// /// If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. /// If an invoice is due `net 30`, it will become past due at 31 days exactly. /// If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. /// + /// For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection. /// When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. - /// For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + /// + /// For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + /// or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection. [JsonProperty("net_terms")] public int? NetTerms { get; set; } diff --git a/Recurly/Resources/Subscription.cs b/Recurly/Resources/Subscription.cs index 2919326d..67faec9b 100644 --- a/Recurly/Resources/Subscription.cs +++ b/Recurly/Resources/Subscription.cs @@ -120,16 +120,19 @@ public class Subscription : Resource /// Integer paired with `Net Terms Type` and representing the number /// of days past the current date (for `net` Net Terms Type) or days after /// the last day of the current month (for `eom` Net Terms Type) that the - /// invoice will become past due. For any value, an additional 24 hours is + /// invoice will become past due. For `manual` collection method, an additional 24 hours is /// added to ensure the customer has the entire last day to make payment before - /// becoming past due. For example: + /// becoming past due. For example: /// /// If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. /// If an invoice is due `net 30`, it will become past due at 31 days exactly. /// If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. /// + /// For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection. /// When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. - /// For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + /// + /// For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + /// or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection. [JsonProperty("net_terms")] public int? NetTerms { get; set; } diff --git a/Recurly/Resources/SubscriptionChangeCreate.cs b/Recurly/Resources/SubscriptionChangeCreate.cs index 5e2b76b3..698b891d 100644 --- a/Recurly/Resources/SubscriptionChangeCreate.cs +++ b/Recurly/Resources/SubscriptionChangeCreate.cs @@ -60,7 +60,8 @@ public class SubscriptionChangeCreate : Request /// month (for `eom` Net Terms Type) that the invoice will become past due. During a subscription /// change, it's not necessary to provide both the `Net Terms Type` and `Net Terms` parameters. /// - /// For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + /// For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + /// or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection. [JsonProperty("net_terms")] public int? NetTerms { get; set; } diff --git a/Recurly/Resources/SubscriptionCreate.cs b/Recurly/Resources/SubscriptionCreate.cs index b783d739..eda510d1 100644 --- a/Recurly/Resources/SubscriptionCreate.cs +++ b/Recurly/Resources/SubscriptionCreate.cs @@ -68,16 +68,19 @@ public class SubscriptionCreate : Request /// Integer paired with `Net Terms Type` and representing the number /// of days past the current date (for `net` Net Terms Type) or days after /// the last day of the current month (for `eom` Net Terms Type) that the - /// invoice will become past due. For any value, an additional 24 hours is + /// invoice will become past due. For `manual` collection method, an additional 24 hours is /// added to ensure the customer has the entire last day to make payment before - /// becoming past due. For example: + /// becoming past due. For example: /// /// If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. /// If an invoice is due `net 30`, it will become past due at 31 days exactly. /// If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. /// + /// For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection. /// When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. - /// For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + /// + /// For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + /// or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection. [JsonProperty("net_terms")] public int? NetTerms { get; set; } diff --git a/Recurly/Resources/SubscriptionUpdate.cs b/Recurly/Resources/SubscriptionUpdate.cs index a43302bb..55d1cf77 100644 --- a/Recurly/Resources/SubscriptionUpdate.cs +++ b/Recurly/Resources/SubscriptionUpdate.cs @@ -44,16 +44,19 @@ public class SubscriptionUpdate : Request /// Integer paired with `Net Terms Type` and representing the number /// of days past the current date (for `net` Net Terms Type) or days after /// the last day of the current month (for `eom` Net Terms Type) that the - /// invoice will become past due. For any value, an additional 24 hours is + /// invoice will become past due. For `manual` collection method, an additional 24 hours is /// added to ensure the customer has the entire last day to make payment before - /// becoming past due. For example: + /// becoming past due. For example: /// /// If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. /// If an invoice is due `net 30`, it will become past due at 31 days exactly. /// If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. /// + /// For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection. /// When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. - /// For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + /// + /// For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + /// or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection. [JsonProperty("net_terms")] public int? NetTerms { get; set; } diff --git a/Recurly/Resources/Transaction.cs b/Recurly/Resources/Transaction.cs index 775ba91b..fdf46765 100644 --- a/Recurly/Resources/Transaction.cs +++ b/Recurly/Resources/Transaction.cs @@ -70,6 +70,10 @@ public class Transaction : Resource [JsonConverter(typeof(RecurlyStringEnumConverter))] public Constants.CvvCheck? CvvCheck { get; set; } + /// Fraud information + [JsonProperty("fraud_info")] + public TransactionFraudInfo FraudInfo { get; set; } + /// Transaction approval code from the payment gateway. [JsonProperty("gateway_approval_code")] public string GatewayApprovalCode { get; set; } diff --git a/Recurly/Resources/TransactionFraudInfo.cs b/Recurly/Resources/TransactionFraudInfo.cs new file mode 100644 index 00000000..6ff6ff6f --- /dev/null +++ b/Recurly/Resources/TransactionFraudInfo.cs @@ -0,0 +1,40 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process + * and thus any edits you make by hand will be lost. If you wish to make a + * change to this file, please create a Github issue explaining the changes you + * need and we will usher them to the appropriate places. + */ +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using Newtonsoft.Json; + +namespace Recurly.Resources +{ + [ExcludeFromCodeCoverage] + public class TransactionFraudInfo : Resource + { + + /// Kount decision + [JsonProperty("decision")] + [JsonConverter(typeof(RecurlyStringEnumConverter))] + public Constants.KountDecision? Decision { get; set; } + + /// Object type + [JsonProperty("object")] + public string Object { get; set; } + + /// Kount transaction reference ID + [JsonProperty("reference")] + public string Reference { get; set; } + + /// A list of fraud risk rules that were triggered for the transaction. + [JsonProperty("risk_rules_triggered")] + public List RiskRulesTriggered { get; set; } + + /// Kount score + [JsonProperty("score")] + public int? Score { get; set; } + + } +} diff --git a/openapi/api.yaml b/openapi/api.yaml index c9e015a8..79ef24e9 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -19422,16 +19422,19 @@ components: Integer paired with `Net Terms Type` and representing the number of days past the current date (for `net` Net Terms Type) or days after the last day of the current month (for `eom` Net Terms Type) that the - invoice will become past due. For any value, an additional 24 hours is + invoice will become past due. For `manual` collection method, an additional 24 hours is added to ensure the customer has the entire last day to make payment before - becoming past due. For example: + becoming past due. For example: If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. If an invoice is due `net 30`, it will become past due at 31 days exactly. If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. + For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection. When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. - For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + + For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection. minimum: 0 default: 0 net_terms_type: @@ -19617,16 +19620,19 @@ components: Integer paired with `Net Terms Type` and representing the number of days past the current date (for `net` Net Terms Type) or days after the last day of the current month (for `eom` Net Terms Type) that the - invoice will become past due. For any value, an additional 24 hours is + invoice will become past due. For `manual` collection method, an additional 24 hours is added to ensure the customer has the entire last day to make payment before - becoming past due. For example: + becoming past due. For example: If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. If an invoice is due `net 30`, it will become past due at 31 days exactly. If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. + For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection. When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. - For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + + For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection. minimum: 0 default: 0 net_terms_type: @@ -21733,16 +21739,19 @@ components: Integer paired with `Net Terms Type` and representing the number of days past the current date (for `net` Net Terms Type) or days after the last day of the current month (for `eom` Net Terms Type) that the - invoice will become past due. For any value, an additional 24 hours is + invoice will become past due. For `manual` collection method, an additional 24 hours is added to ensure the customer has the entire last day to make payment before - becoming past due. For example: + becoming past due. For example: If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. If an invoice is due `net 30`, it will become past due at 31 days exactly. If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. + For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection. When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. - For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + + For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection. minimum: 0 default: 0 net_terms_type: @@ -22314,7 +22323,8 @@ components: month (for `eom` Net Terms Type) that the invoice will become past due. During a subscription change, it's not necessary to provide both the `Net Terms Type` and `Net Terms` parameters. - For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection. minimum: 0 default: 0 net_terms_type: @@ -22527,16 +22537,19 @@ components: Integer paired with `Net Terms Type` and representing the number of days past the current date (for `net` Net Terms Type) or days after the last day of the current month (for `eom` Net Terms Type) that the - invoice will become past due. For any value, an additional 24 hours is + invoice will become past due. For `manual` collection method, an additional 24 hours is added to ensure the customer has the entire last day to make payment before - becoming past due. For example: + becoming past due. For example: If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. If an invoice is due `net 30`, it will become past due at 31 days exactly. If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. + For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection. When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. - For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + + For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection. minimum: 0 default: 0 net_terms_type: @@ -22720,16 +22733,19 @@ components: Integer paired with `Net Terms Type` and representing the number of days past the current date (for `net` Net Terms Type) or days after the last day of the current month (for `eom` Net Terms Type) that the - invoice will become past due. For any value, an additional 24 hours is + invoice will become past due. For `manual` collection method, an additional 24 hours is added to ensure the customer has the entire last day to make payment before - becoming past due. For example: + becoming past due. For example: If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. If an invoice is due `net 30`, it will become past due at 31 days exactly. If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. + For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection. When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. - For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + + For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection. minimum: 0 default: 0 net_terms_type: @@ -23154,6 +23170,44 @@ components: For all other countries this will come from the VAT Number field in the Billing Info. title: VAT Number + fraud_info: + "$ref": "#/components/schemas/TransactionFraudInfo" + TransactionFraudInfo: + type: object + title: Fraud information + readOnly: true + properties: + object: + type: string + title: Object type + readOnly: true + score: + type: integer + title: Kount score + minimum: 1 + maximum: 99 + decision: + title: Kount decision + maxLength: 10 + "$ref": "#/components/schemas/KountDecisionEnum" + reference: + type: string + title: Kount transaction reference ID + risk_rules_triggered: + type: array + title: Risk Rules Triggered + description: A list of fraud risk rules that were triggered for the transaction. + items: + "$ref": "#/components/schemas/FraudRiskRule" + FraudRiskRule: + type: object + properties: + code: + type: string + title: The Kount rule number. + message: + type: string + title: Description of why the rule was triggered ExternalTransaction: type: object properties: @@ -23457,16 +23511,19 @@ components: Integer paired with `Net Terms Type` and representing the number of days past the current date (for `net` Net Terms Type) or days after the last day of the current month (for `eom` Net Terms Type) that the - invoice will become past due. For any value, an additional 24 hours is + invoice will become past due. For `manual` collection method, an additional 24 hours is added to ensure the customer has the entire last day to make payment before - becoming past due. For example: + becoming past due. For example: If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. If an invoice is due `net 30`, it will become past due at 31 days exactly. If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. + For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection. When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. - For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + + For more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) + or visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection. minimum: 0 default: 0 net_terms_type: