0.9.85
What's Changed
- [feature] Web hook drive strategy by @Pralish and @alis-khadka in #1361
[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.
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