class Io::Flow::V0::Clients::WebhookSettings
Public Class Methods
new(client)
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 5331 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end
Public Instance Methods
get_channel_and_webhook_and_settings_by_channel(channel)
click to toggle source
Returns
the webhook settings for a channel
# File lib/flow_commerce/flow_api_v0_client.rb, line 5336 def get_channel_and_webhook_and_settings_by_channel(channel) HttpClient::Preconditions.assert_class('channel', channel, String) r = @client.request("/channel/#{CGI.escape(channel)}/webhook/settings").get ::Io::Flow::V0::Models::WebhookSettings.new(r) end
get_webhook_and_settings_by_organization(organization)
click to toggle source
Returns
the webhook settings for an organization
# File lib/flow_commerce/flow_api_v0_client.rb, line 5351 def get_webhook_and_settings_by_organization(organization) HttpClient::Preconditions.assert_class('organization', organization, String) r = @client.request("/#{CGI.escape(organization)}/webhook/settings").get ::Io::Flow::V0::Models::WebhookSettings.new(r) end
put_channel_and_webhook_and_settings_by_channel(channel, webhook_settings)
click to toggle source
Updates the webhook settings for a channel
# File lib/flow_commerce/flow_api_v0_client.rb, line 5343 def put_channel_and_webhook_and_settings_by_channel(channel, webhook_settings) HttpClient::Preconditions.assert_class('channel', channel, String) (x = webhook_settings; x.is_a?(::Io::Flow::V0::Models::WebhookSettings) ? x : ::Io::Flow::V0::Models::WebhookSettings.new(x)) r = @client.request("/channel/#{CGI.escape(channel)}/webhook/settings").with_json(webhook_settings.to_json).put ::Io::Flow::V0::Models::WebhookSettings.new(r) end
put_webhook_and_settings_by_organization(organization, webhook_settings)
click to toggle source
Updates the webhook settings for an organization
# File lib/flow_commerce/flow_api_v0_client.rb, line 5358 def put_webhook_and_settings_by_organization(organization, webhook_settings) HttpClient::Preconditions.assert_class('organization', organization, String) (x = webhook_settings; x.is_a?(::Io::Flow::V0::Models::WebhookSettings) ? x : ::Io::Flow::V0::Models::WebhookSettings.new(x)) r = @client.request("/#{CGI.escape(organization)}/webhook/settings").with_json(webhook_settings.to_json).put ::Io::Flow::V0::Models::WebhookSettings.new(r) end