Sha256: b23672d918a94675a384965a605732f9816e725af8e88d570441cc5c60572e24
Contents?: true
Size: 1.06 KB
Versions: 22
Compression:
Stored size: 1.06 KB
Contents
# Toplevel Pubnub module. module Pubnub # Validator module that holds all validators modules module Validator # Validator for ListPushProvisions event module ListPushProvisions include CommonValidator def validate! return if @skip_validate validate_push_token! validate_push_gateway! validate_topic! if @push_gateway.eql? 'apns2' end private def validate_push_token! return unless @push_token.nil? || @push_token.empty? raise( ArgumentError.new, ':push_token is required for ListPushProvisions event.' ) end def validate_push_gateway! return unless @push_gateway.nil? || @push_gateway.empty? raise( ArgumentError.new, ':push_gateway is required for ListPushProvisions event.' ) end def validate_topic! return unless @topic.nil? || @topic.empty? raise( ArgumentError.new, ':topic is required for ListPushProvisions event.' ) end end end end
Version data entries
22 entries across 22 versions & 1 rubygems