|
14 | 14 |
|
15 | 15 | module CyberSource |
16 | 16 | class PtsV2PaymentsPost201ResponseErrorInformation |
17 | | - # The reason of the status. Possible values: - AVS_FAILED - CONTACT_PROCESSOR - EXPIRED_CARD - PROCESSOR_DECLINED - INSUFFICIENT_FUND - STOLEN_LOST_CARD - ISSUER_UNAVAILABLE - UNAUTHORIZED_CARD - CVN_NOT_MATCH - EXCEEDS_CREDIT_LIMIT - INVALID_CVN - DECLINED_CHECK - BLACKLISTED_CUSTOMER - SUSPENDED_ACCOUNT - PAYMENT_REFUSED - CV_FAILED - INVALID_ACCOUNT - GENERAL_DECLINE - INVALID_MERCHANT_CONFIGURATION - DECISION_PROFILE_REJECT - SCORE_EXCEEDS_THRESHOLD |
| 17 | + # The reason of the status. Possible values: - AVS_FAILED - CONTACT_PROCESSOR - EXPIRED_CARD - PROCESSOR_DECLINED - INSUFFICIENT_FUND - STOLEN_LOST_CARD - ISSUER_UNAVAILABLE - UNAUTHORIZED_CARD - CVN_NOT_MATCH - EXCEEDS_CREDIT_LIMIT - INVALID_CVN - DECLINED_CHECK - BLACKLISTED_CUSTOMER - SUSPENDED_ACCOUNT - PAYMENT_REFUSED - CV_FAILED - INVALID_ACCOUNT - GENERAL_DECLINE - INVALID_MERCHANT_CONFIGURATION - DECISION_PROFILE_REJECT - SCORE_EXCEEDS_THRESHOLD - PENDING_AUTHENTICATION |
18 | 18 | attr_accessor :reason |
19 | 19 |
|
20 | 20 | # The detail message related to the status and reason listed above. |
@@ -95,15 +95,15 @@ def list_invalid_properties |
95 | 95 | # Check to see if the all the properties in the model are valid |
96 | 96 | # @return true if the model is valid |
97 | 97 | def valid? |
98 | | - reason_validator = EnumAttributeValidator.new('String', ['AVS_FAILED', 'CONTACT_PROCESSOR', 'EXPIRED_CARD', 'PROCESSOR_DECLINED', 'INSUFFICIENT_FUND', 'STOLEN_LOST_CARD', 'ISSUER_UNAVAILABLE', 'UNAUTHORIZED_CARD', 'CVN_NOT_MATCH', 'EXCEEDS_CREDIT_LIMIT', 'INVALID_CVN', 'DECLINED_CHECK', 'BLACKLISTED_CUSTOMER', 'SUSPENDED_ACCOUNT', 'PAYMENT_REFUSED', 'CV_FAILED', 'INVALID_ACCOUNT', 'GENERAL_DECLINE', 'INVALID_MERCHANT_CONFIGURATION', 'DECISION_PROFILE_REJECT', 'SCORE_EXCEEDS_THRESHOLD']) |
| 98 | + reason_validator = EnumAttributeValidator.new('String', ['AVS_FAILED', 'CONTACT_PROCESSOR', 'EXPIRED_CARD', 'PROCESSOR_DECLINED', 'INSUFFICIENT_FUND', 'STOLEN_LOST_CARD', 'ISSUER_UNAVAILABLE', 'UNAUTHORIZED_CARD', 'CVN_NOT_MATCH', 'EXCEEDS_CREDIT_LIMIT', 'INVALID_CVN', 'DECLINED_CHECK', 'BLACKLISTED_CUSTOMER', 'SUSPENDED_ACCOUNT', 'PAYMENT_REFUSED', 'CV_FAILED', 'INVALID_ACCOUNT', 'GENERAL_DECLINE', 'INVALID_MERCHANT_CONFIGURATION', 'DECISION_PROFILE_REJECT', 'SCORE_EXCEEDS_THRESHOLD', 'PENDING_AUTHENTICATION']) |
99 | 99 | return false unless reason_validator.valid?(@reason) |
100 | 100 | true |
101 | 101 | end |
102 | 102 |
|
103 | 103 | # Custom attribute writer method checking allowed values (enum). |
104 | 104 | # @param [Object] reason Object to be assigned |
105 | 105 | def reason=(reason) |
106 | | - validator = EnumAttributeValidator.new('String', ['AVS_FAILED', 'CONTACT_PROCESSOR', 'EXPIRED_CARD', 'PROCESSOR_DECLINED', 'INSUFFICIENT_FUND', 'STOLEN_LOST_CARD', 'ISSUER_UNAVAILABLE', 'UNAUTHORIZED_CARD', 'CVN_NOT_MATCH', 'EXCEEDS_CREDIT_LIMIT', 'INVALID_CVN', 'DECLINED_CHECK', 'BLACKLISTED_CUSTOMER', 'SUSPENDED_ACCOUNT', 'PAYMENT_REFUSED', 'CV_FAILED', 'INVALID_ACCOUNT', 'GENERAL_DECLINE', 'INVALID_MERCHANT_CONFIGURATION', 'DECISION_PROFILE_REJECT', 'SCORE_EXCEEDS_THRESHOLD']) |
| 106 | + validator = EnumAttributeValidator.new('String', ['AVS_FAILED', 'CONTACT_PROCESSOR', 'EXPIRED_CARD', 'PROCESSOR_DECLINED', 'INSUFFICIENT_FUND', 'STOLEN_LOST_CARD', 'ISSUER_UNAVAILABLE', 'UNAUTHORIZED_CARD', 'CVN_NOT_MATCH', 'EXCEEDS_CREDIT_LIMIT', 'INVALID_CVN', 'DECLINED_CHECK', 'BLACKLISTED_CUSTOMER', 'SUSPENDED_ACCOUNT', 'PAYMENT_REFUSED', 'CV_FAILED', 'INVALID_ACCOUNT', 'GENERAL_DECLINE', 'INVALID_MERCHANT_CONFIGURATION', 'DECISION_PROFILE_REJECT', 'SCORE_EXCEEDS_THRESHOLD', 'PENDING_AUTHENTICATION']) |
107 | 107 | unless validator.valid?(reason) |
108 | 108 | fail ArgumentError, 'invalid value for "reason", must be one of #{validator.allowable_values}.' |
109 | 109 | end |
|
0 commit comments