Class: PaypalServerSdk::CallbackConfiguration
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- PaypalServerSdk::CallbackConfiguration
- Defined in:
- lib/paypal_server_sdk/models/callback_configuration.rb
Overview
CallBack Configuration that the merchant can provide to PayPal/Venmo.
Instance Attribute Summary collapse
-
#callback_events ⇒ Array[CallbackEvents]
An array of callback events merchant can subscribe to for the corresponding callback url.
-
#callback_url ⇒ String
Merchant provided CallBack url.PayPal/Venmo will use this url to call the merchant back when the events occur .PayPal/Venmo expects a secured url usually in the https format.merchant can append the cart id or other params part of the url as query or path params.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(callback_events:, callback_url:) ⇒ CallbackConfiguration
constructor
A new instance of CallbackConfiguration.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(callback_events:, callback_url:) ⇒ CallbackConfiguration
Returns a new instance of CallbackConfiguration.
42 43 44 45 |
# File 'lib/paypal_server_sdk/models/callback_configuration.rb', line 42 def initialize(callback_events:, callback_url:) @callback_events = callback_events @callback_url = callback_url end |
Instance Attribute Details
#callback_events ⇒ Array[CallbackEvents]
An array of callback events merchant can subscribe to for the corresponding callback url.
15 16 17 |
# File 'lib/paypal_server_sdk/models/callback_configuration.rb', line 15 def callback_events @callback_events end |
#callback_url ⇒ String
Merchant provided CallBack url.PayPal/Venmo will use this url to call the merchant back when the events occur .PayPal/Venmo expects a secured url usually in the https format.merchant can append the cart id or other params part of the url as query or path params.
22 23 24 |
# File 'lib/paypal_server_sdk/models/callback_configuration.rb', line 22 def callback_url @callback_url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/paypal_server_sdk/models/callback_configuration.rb', line 48 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. callback_events = hash.key?('callback_events') ? hash['callback_events'] : nil callback_url = hash.key?('callback_url') ? hash['callback_url'] : nil # Create object from extracted values. CallbackConfiguration.new(callback_events: callback_events, callback_url: callback_url) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 |
# File 'lib/paypal_server_sdk/models/callback_configuration.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['callback_events'] = 'callback_events' @_hash['callback_url'] = 'callback_url' @_hash end |
.nullables ⇒ Object
An array for nullable fields
38 39 40 |
# File 'lib/paypal_server_sdk/models/callback_configuration.rb', line 38 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
33 34 35 |
# File 'lib/paypal_server_sdk/models/callback_configuration.rb', line 33 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
68 69 70 71 72 |
# File 'lib/paypal_server_sdk/models/callback_configuration.rb', line 68 def inspect class_name = self.class.name.split('::').last "<#{class_name} callback_events: #{@callback_events.inspect}, callback_url:"\ " #{@callback_url.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
62 63 64 65 |
# File 'lib/paypal_server_sdk/models/callback_configuration.rb', line 62 def to_s class_name = self.class.name.split('::').last "<#{class_name} callback_events: #{@callback_events}, callback_url: #{@callback_url}>" end |