Sha256: 35aa8aca4e3400c1db886eef309dd3c5d707cb00972203f5aa2e82ad96d7b13d
Contents?: true
Size: 1.02 KB
Versions: 6
Compression:
Stored size: 1.02 KB
Contents
module EWayClient class BaseRequest SOAP_ATTRS = %i[wsdl username password log logger message action] include Virtus.model attribute :wsdl, String attribute :username, String attribute :password, String attribute :log, Boolean, lazy: true, default: false attribute :logger, Object attribute :message, Hash, lazy: true, default: :default_message attribute :action, Symbol, lazy: true, default: :default_action attribute :scrub_directives, Array[Hash], default: :default_scrub_directives attribute(:soap_client_args, Hash, { lazy: true, default: :default_soap_client_args, }) def call SOAPClient.(soap_client_args) end private def default_action GenActionName.(self.class) end def default_scrub_directives [ {name: {matches: /password/i}} ] end def default_soap_client_args SOAP_ATTRS.each_with_object({}) do |attr, hash| hash[attr] = self.send(attr) end.merge(scrub: scrub_directives) end end end
Version data entries
6 entries across 6 versions & 1 rubygems