Sha256: b1234ecc57f6f8138e7bca7454976b85db66a8d4455466531982a76b4244662c

Contents?: true

Size: 1.21 KB

Versions: 1

Compression:

Stored size: 1.21 KB

Contents

=begin
#Mailchimp Marketing API

#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

OpenAPI spec version: 3.0.39
Contact: apihelp@mailchimp.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.12

=end

require 'uri'

module MailchimpMarketing
  class CustomerJourneysApi
    attr_accessor :api_client

    def initialize(api_client)
      @api_client = api_client
    end

    # Customer Journeys API trigger for a contact
    def trigger(journey_id, step_id, body, opts = {})
      fail ArgumentError, "Missing required param: 'journey_id'" if journey_id.nil?
      fail ArgumentError, "Missing required param: 'step_id'" if step_id.nil?
      fail ArgumentError, "Missing required param: 'body'" if body.nil?

      query_params = {}
      post_body = @api_client.object_to_http_body(body)

      local_var_path = '/customer-journeys/journeys/{journey_id}/steps/{step_id}/actions/trigger'.sub('{' + 'journey_id' + '}', journey_id.to_s).sub('{' + 'step_id' + '}', step_id.to_s)
      data = @api_client.call_api(:POST, local_var_path,
        :query_params => query_params,
        :body => post_body)
      return data
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
MailchimpMarketing-3.0.39 lib/MailchimpMarketing/api/customer_journeys_api.rb