Sha256: 1198b0f24416da850ecf8110a7823916e41cc308e00b73e5f082339438276e1a

Contents?: true

Size: 520 Bytes

Versions: 4

Compression:

Stored size: 520 Bytes

Contents

# coding: utf-8
# frozen_string_literal: true

module Stealth
  module Services
    module Smooch

      class PostbackEvent

        attr_reader :service_message, :params

        def initialize(service_message:, params:)
          @service_message = service_message
          @params = params
        end

        def process
          fetch_payload
        end

        private

          def fetch_payload
            service_message.payload = params['action']['payload']
          end

      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
stealth-smooch-1.1.0 lib/stealth/services/smooch/events/postback_event.rb
stealth-smooch-1.0.0 lib/stealth/services/smooch/events/postback_event.rb
stealth-smooch-0.9.1 lib/stealth/services/smooch/events/postback_event.rb
stealth-smooch-0.9.0 lib/stealth/services/smooch/events/postback_event.rb