Parent

Methods

Simplify::Event

An Event object

Public Class Methods

create(params, *auth) click to toggle source

Creates a webhook Event object

params

a hash of parameters; valid keys are:

  • payload The raw JWS message payload. required

  • url The URL for the webhook. If present it must match the URL registered for the webhook.

auth

Authentication information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. For backwards compatibility the public and private keys may be passed instead of the authentication object.

# File lib/simplify/event.rb, line 42
def self.create(params, *auth)

        h = Simplify::PaymentsApi.jws_decode(params, Simplify::PaymentsApi.create_auth_object(auth))

        if !h['event']
            raise ApiException.new("Incorrect data in webhook event", nil, nil)
        end

        obj = Event.new()
        obj = obj.merge!(h['event'])

        obj
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.