Method: Bitpesa::Webhook#initialize
- Defined in:
- lib/bitpesa-sdk/models/webhook.rb
#initialize(attributes = {}) ⇒ Webhook
Initializes the object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/bitpesa-sdk/models/webhook.rb', line 47 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'webhook') self.webhook = attributes[:'webhook'] end if attributes.has_key?(:'event') self.event = attributes[:'event'] end if attributes.has_key?(:'object') self.object = attributes[:'object'] end end |