Class: AuthorizeNet::API::SensitiveDataConfigType

Inherits:
Object
  • Object
show all
Defined in:
lib/authorize_net/api/SensitiveDataFilter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSensitiveDataConfigType

Returns a new instance of SensitiveDataConfigType.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/authorize_net/api/SensitiveDataFilter.rb', line 16

def initialize
@sensitiveTags = Array.new([SensitiveTag.new("cardCode", "", "XXX", false),
	      SensitiveTag.new("cardNumber", "(\\p{N}+)(\\p{N}{4})", "XXXX-\\2", false), 
	      SensitiveTag.new("expirationDate", "", "XXX", false),
	      SensitiveTag.new("accountNumber", "(\\p{N}+)(\\p{N}{4})", "XXXX-\\2", false),
	      SensitiveTag.new("nameOnAccount", "", "XXX", false),
	      SensitiveTag.new("transactionKey", "", "XXX", false)]).freeze
@sensitiveStringRegexes = ["4\\p{N}{3}([\\ \\-]?)\\p{N}{4}\\1\\p{N}{4}\\1\\p{N}{4}",
		          "4\\p{N}{3}([\\ \\-]?)(?:\\p{N}{4}\\1){2}\\p{N}(?:\\p{N}{3})?",
           			  "5[1-5]\\p{N}{2}([\\ \\-]?)\\p{N}{4}\\1\\p{N}{4}\\1\\p{N}{4}",
	                  "6(?:011|22(?:1(?=[\\ \\-]?(?:2[6-9]|[3-9]))|[2-8]|9(?=[\\ \\-]?(?:[01]|2[0-5])))|4[4-9]\\p{N}|5\\p{N}\\p{N})([\\ \\-]?)\\p{N}{4}\\1\\p{N}{4}\\1\\p{N}{4}",
	                  "35(?:2[89]|[3-8]\\p{N})([\\ \\-]?)\\p{N}{4}\\1\\p{N}{4}\\1\\p{N}{4}",
	                  "3[47]\\p{N}\\p{N}([\\ \\-]?)\\p{N}{6}\\1\\p{N}{5}"].freeze
end

Instance Attribute Details

#sensitiveStringRegexesObject

Returns the value of attribute sensitiveStringRegexes.



15
16
17
# File 'lib/authorize_net/api/SensitiveDataFilter.rb', line 15

def sensitiveStringRegexes
  @sensitiveStringRegexes
end

#sensitiveTagsObject

Returns the value of attribute sensitiveTags.



15
16
17
# File 'lib/authorize_net/api/SensitiveDataFilter.rb', line 15

def sensitiveTags
  @sensitiveTags
end