Skip to content

0.9.85

Compare
Choose a tag to compare
@donrestarone donrestarone released this 17 Jan 00:37
· 43 commits to master since this release
b036672

What's Changed

[feature] Web hook drive strategy

Addresses: #682

Api Keys:

Screen.Recording.2022-10-20.at.9.30.58.AM.mov

Webhook:

Screen.Recording.2022-10-20.at.9.34.19.AM.mov

The webhook's payload can be accessed as parameters[:request]['body'] in external api client.

Eg: https://github.com/restarone/violet_rails/pull/1167/files#diff-1aa9cadc4b4c76bf7ec3d7c0cf8d0da66be3ba87336bad4d32241c99d53aa6beR603-R623

    class ExternalApiModelExample
      def initialize(parameters)
        @external_api_client = parameters[:external_api_client]
        @request = parameters[:request]
      end
  
      def start
        if @request['body']['type'] == 'customer.created'
          resource = @external_api_client.api_namespace.api_resources.create(
            properties: {
              request_body: @request["body"]	
            }
          )
          render json: { result: resource } 
        end
      end

Custom webhook verification method:

https://user-images.githubusercontent.com/50227291/197921958-a06b85a8-7c7a-4e3b-afb9-889fe5c6e110.mov
Co-authored-by: Pralish Kayastha [email protected]
Co-authored-by: Pralish Kayastha [email protected]
Co-authored-by: Prashant Khadka [email protected]

Full Changelog: 0.9.84...0.9.85