Class: PaypalServerSdk::CallbackEvents
- Inherits:
-
Object
- Object
- PaypalServerSdk::CallbackEvents
- Defined in:
- lib/paypal_server_sdk/models/callback_events.rb
Overview
CallBack event.
Constant Summary collapse
- CALLBACK_EVENTS =
[ # When Buyer changes or selects the shipping address on the PayPal/Venmo # buyer approval flow , PayPal/Venmo will call merchant with the callback # URL to update order totals. SHIPPING_ADDRESS = 'SHIPPING_ADDRESS'.freeze, # When Buyer changes or selects the shipping options on the PayPal/Venmo # buyer approval flow , PayPal/Venmo will call merchant with the callback # URL to update order totals. SHIPPING_OPTIONS = 'SHIPPING_OPTIONS'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = SHIPPING_ADDRESS) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/paypal_server_sdk/models/callback_events.rb', line 27 def self.from_value(value, default_value = SHIPPING_ADDRESS) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'shipping_address' then SHIPPING_ADDRESS when 'shipping_options' then SHIPPING_OPTIONS else default_value end end |
.validate(value) ⇒ Object
21 22 23 24 25 |
# File 'lib/paypal_server_sdk/models/callback_events.rb', line 21 def self.validate(value) return false if value.nil? true end |