Sha256: 43bf795a75cfe43f080a30dedda9a4b2ef0759735ca6d7f422466fbe4c0fda3d

Contents?: true

Size: 919 Bytes

Versions: 7

Compression:

Stored size: 919 Bytes

Contents

# frozen_string_literal: true

require 'dry-validation'
KEYS = [0, 1].freeze
MESSAGE_TYPE = %w[text unicode].freeze

module Cequens
  module Contracts
    class SendSMSContract < Dry::Validation::Contract
      params do
        required(:recipients).value(:string)
        required(:messageText).value(:string)
        required(:senderName).value(:string)
        required(:messageType).value(included_in?: MESSAGE_TYPE)
        optional(:validityPeriod).value(:string)
        optional(:clientMessageId).value(:integer)
        optional(:acknowledgement).value(included_in?: KEYS)
        optional(:deliveryTime).value(:string)
        optional(:ip).value(:string)
        optional(:dlrUrl).value(:string)
        optional(:dateStamp).value(:integer)
        optional(:udh).value(:string)
        optional(:dataCoding).value(:integer)
        optional(:flashing).value(included_in?: KEYS)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cequens-0.0.7 lib/cequens/contracts/send_sms_contract.rb
cequens-0.0.6 lib/cequens/contracts/send_sms_contract.rb
cequens-0.0.5 lib/cequens/contracts/send_sms_contract.rb
cequens-0.0.4 lib/cequens/contracts/send_sms_contract.rb
cequens-0.0.3 lib/cequens/contracts/send_sms_contract.rb
cequens-0.0.2 lib/cequens/contracts/send_sms_contract.rb
cequens-0.0.1 lib/cequens/contracts/send_sms_contract.rb