Class: PaypalServerSdk::AuthorizationStatus
- Inherits:
-
Object
- Object
- PaypalServerSdk::AuthorizationStatus
- Defined in:
- lib/paypal_server_sdk/models/authorization_status.rb
Overview
The status for the authorized payment.
Constant Summary collapse
- AUTHORIZATION_STATUS =
[ # The authorized payment is created. No captured payments have been made # for this authorized payment. CREATED = 'CREATED'.freeze, # The authorized payment has one or more captures against it. The sum of # these captured payments is greater than the amount of the original # authorized payment. CAPTURED = 'CAPTURED'.freeze, # PayPal cannot authorize funds for this authorized payment. DENIED = 'DENIED'.freeze, # A captured payment was made for the authorized payment for an amount # that is less than the amount of the original authorized payment. PARTIALLY_CAPTURED = 'PARTIALLY_CAPTURED'.freeze, # The authorized payment was voided. No more captured payments can be made # against this authorized payment. VOIDED = 'VOIDED'.freeze, # The created authorization is in pending state. For more information, see # status.details. PENDING = 'PENDING'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = CREATED) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/paypal_server_sdk/models/authorization_status.rb', line 41 def self.from_value(value, default_value = CREATED) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'created' then CREATED when 'captured' then CAPTURED when 'denied' then DENIED when 'partially_captured' then PARTIALLY_CAPTURED when 'voided' then VOIDED when 'pending' then PENDING else default_value end end |
.validate(value) ⇒ Object
35 36 37 38 39 |
# File 'lib/paypal_server_sdk/models/authorization_status.rb', line 35 def self.validate(value) return false if value.nil? true end |