Sha256: f3d2caf588172564e4ef2be3d1ba7a83d4693eb4a811e0a79a196516e8851c43

Contents?: true

Size: 575 Bytes

Versions: 1

Compression:

Stored size: 575 Bytes

Contents

module Line
  module Bot
    module MessageBuilder
      class Action::Postback < Action
        attr_accessor :label, :data, :display_text

        def initialize(label: nil, data: nil, display_text: nil)
          super 'postback' do
            @label = label
            @data = data
            @display_text = display_text
            yield self if block_given?
          end
        end

        def self.required
          {
            'type' => String,
            'label' => String,
            'data' => String
          }
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
line-bot-message-builder-0.1.2 lib/line/bot/message_builder/actions/postback.rb