Sha256: 06871ee0d1ac4a632cf68fb1f0a66c4d257d55715f178d2236c02ac7378a7deb
Contents?: true
Size: 694 Bytes
Versions: 6
Compression:
Stored size: 694 Bytes
Contents
# frozen_string_literal: true module Cequens class Request DEFAULT_OPTIONS = {}.freeze attr_reader :action, :params, :request, :options def initialize(action, params, opts) @action = action @params = params @options = DEFAULT_OPTIONS.merge(opts) build_request end private def build_request case action when 'send_sms' self.class.include Requests::SendSMSRequest validate_params! @request = build_send_sms_request when 'get_sms_details' self.class.include Requests::GetSMSDetailsRequest validate_params! @request = build_get_sms_details_request end end end end
Version data entries
6 entries across 6 versions & 1 rubygems