Class: PaypalServerSdk::SellerProtectionStatus
- Inherits:
-
Object
- Object
- PaypalServerSdk::SellerProtectionStatus
- Defined in:
- lib/paypal_server_sdk/models/seller_protection_status.rb
Overview
Indicates whether the transaction is eligible for seller protection. For information, see [PayPal Seller Protection for Merchants](www.paypal.com/us/webapps/mpp/security/seller-protection) .
Constant Summary collapse
- SELLER_PROTECTION_STATUS =
[ # Your PayPal balance remains intact if the customer claims that they did # not receive an item or the account holder claims that they did not # authorize the payment. ELIGIBLE = 'ELIGIBLE'.freeze, # Your PayPal balance remains intact if the customer claims that they did # not receive an item. PARTIALLY_ELIGIBLE = 'PARTIALLY_ELIGIBLE'.freeze, # This transaction is not eligible for seller protection. NOT_ELIGIBLE = 'NOT_ELIGIBLE'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = ELIGIBLE) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/paypal_server_sdk/models/seller_protection_status.rb', line 32 def self.from_value(value, default_value = ELIGIBLE) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'eligible' then ELIGIBLE when 'partially_eligible' then PARTIALLY_ELIGIBLE when 'not_eligible' then NOT_ELIGIBLE else default_value end end |
.validate(value) ⇒ Object
26 27 28 29 30 |
# File 'lib/paypal_server_sdk/models/seller_protection_status.rb', line 26 def self.validate(value) return false if value.nil? true end |