Skip to content

Commit

Permalink
Merge pull request #669 from recurly/v3-v2021-02-25-7645912432
Browse files Browse the repository at this point in the history
Generated Latest Changes for v2021-02-25
  • Loading branch information
douglasmiller authored Jan 24, 2024
2 parents ba9a7e3 + 17698fd commit fa767bb
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 42 deletions.
4 changes: 3 additions & 1 deletion openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ paths:
Alabama St.\"),\n\t\t\tCity: recurly.String(\"San Francisco\"),\n\t\t\tPostalCode:
recurly.String(\"94110\"),\n\t\t\tCountry: recurly.String(\"US\"),\n\t\t\tRegion:
\ recurly.String(\"CA\"),\n\t\t},\n\t\tNumber: recurly.String(\"4111111111111111\"),\n\t\tMonth:
\ recurly.String(\"12\"),\n\t\tYear: recurly.String(\"22\"),\n\t\tCvv:
\ recurly.String(\"12\"),\n\t\tYear: recurly.String(\"30\"),\n\t\tCvv:
\ recurly.String(\"123\"),\n\t},\n}\n\naccount, err := client.CreateAccount(accountReq)\nif
e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation
{\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected
Expand Down Expand Up @@ -24833,6 +24833,8 @@ components:
a transaction. Pass this value to Recurly.js so it can continue
the challenge flow.
maxLength: 22
fraud_info:
"$ref": "#/components/schemas/TransactionFraudInfo"
RelatedTypeEnum:
type: string
enum:
Expand Down
85 changes: 44 additions & 41 deletions recurly/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,8 @@ class TransactionError(Resource):
Code
decline_code : str
Decline code
fraud_info : TransactionFraudInfo
Fraud information
merchant_advice : str
Merchant message
message : str
Expand All @@ -535,6 +537,7 @@ class TransactionError(Resource):
"category": str,
"code": str,
"decline_code": str,
"fraud_info": "TransactionFraudInfo",
"merchant_advice": str,
"message": str,
"object": str,
Expand All @@ -543,6 +546,47 @@ class TransactionError(Resource):
}


class TransactionFraudInfo(Resource):
"""
Attributes
----------
decision : str
Kount decision
object : str
Object type
reference : str
Kount transaction reference ID
risk_rules_triggered : :obj:`list` of :obj:`FraudRiskRule`
A list of fraud risk rules that were triggered for the transaction.
score : int
Kount score
"""

schema = {
"decision": str,
"object": str,
"reference": str,
"risk_rules_triggered": ["FraudRiskRule"],
"score": int,
}


class FraudRiskRule(Resource):
"""
Attributes
----------
code : str
The Kount rule number.
message : str
Description of why the rule was triggered
"""

schema = {
"code": str,
"message": str,
}


class AccountAcquisition(Resource):
"""
Attributes
Expand Down Expand Up @@ -896,47 +940,6 @@ class TransactionPaymentGateway(Resource):
}


class TransactionFraudInfo(Resource):
"""
Attributes
----------
decision : str
Kount decision
object : str
Object type
reference : str
Kount transaction reference ID
risk_rules_triggered : :obj:`list` of :obj:`FraudRiskRule`
A list of fraud risk rules that were triggered for the transaction.
score : int
Kount score
"""

schema = {
"decision": str,
"object": str,
"reference": str,
"risk_rules_triggered": ["FraudRiskRule"],
"score": int,
}


class FraudRiskRule(Resource):
"""
Attributes
----------
code : str
The Kount rule number.
message : str
Description of why the rule was triggered
"""

schema = {
"code": str,
"message": str,
}


class CouponRedemption(Resource):
"""
Attributes
Expand Down

0 comments on commit fa767bb

Please sign in to comment.