Class: OnlinePayments::SDK::Domain::Feedbacks
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::Feedbacks
- Defined in:
- lib/onlinepayments/sdk/domain/feedbacks.rb
Instance Attribute Summary collapse
-
#webhook_url ⇒ Object
deprecated
Deprecated.
The URL where the webhook will be dispatched for all status change events related to this payment.
-
#webhooks_urls ⇒ Array<String>
The current value of webhooks_urls.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#webhook_url ⇒ Object
Deprecated.
The URL where the webhook will be dispatched for all status change events related to this payment.
11 12 13 |
# File 'lib/onlinepayments/sdk/domain/feedbacks.rb', line 11 def webhook_url @webhook_url end |
#webhooks_urls ⇒ Array<String>
Returns the current value of webhooks_urls.
11 12 13 |
# File 'lib/onlinepayments/sdk/domain/feedbacks.rb', line 11 def webhooks_urls @webhooks_urls end |
Instance Method Details
#from_hash(hash) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/onlinepayments/sdk/domain/feedbacks.rb', line 26 def from_hash(hash) super if hash.has_key? 'webhookUrl' @webhook_url = hash['webhookUrl'] end if hash.has_key? 'webhooksUrls' raise TypeError, "value '%s' is not an Array" % [hash['webhooksUrls']] unless hash['webhooksUrls'].is_a? Array @webhooks_urls = [] hash['webhooksUrls'].each do |e| @webhooks_urls << e end end end |
#to_h ⇒ Hash
19 20 21 22 23 24 |
# File 'lib/onlinepayments/sdk/domain/feedbacks.rb', line 19 def to_h hash = super hash['webhookUrl'] = @webhook_url unless @webhook_url.nil? hash['webhooksUrls'] = @webhooks_urls unless @webhooks_urls.nil? hash end |