Class: Copyleaks::SubmissionSensitiveData

Inherits:
Object
  • Object
show all
Defined in:
lib/copyleaks/models/submissions/properties/sensitive_data_protection.rb

Instance Method Summary collapse

Constructor Details

#initialize(driversLicense = false, credentials = false, passport = false, network = false, url = false, emailAddress = false, creditCard = false, phoneNumber = false) ⇒ SubmissionSensitiveData

Returns a new instance of SubmissionSensitiveData.

Parameters:

  • driversLicense (Boolean) (defaults to: false)
    • Mask driver’s license numbers from the scanned document with # characters. Available for users on a plan for 2500 pages or more.

  • credentials (Boolean) (defaults to: false)
    • Mask credentials from the scanned document with # characters. Available for users on a plan for 2500 pages or more.

  • passport (Boolean) (defaults to: false)
    • Mask passports from the scanned document with # characters. Available for users on a plan for 2500 pages or more.

  • network (Boolean) (defaults to: false)
    • Mask network identifiers from the scanned document with # characters. Available for users on a plan for 2500 pages or more.

  • url (Boolean) (defaults to: false)
    • Mask url from the scanned document with # characters. Available for users on a plan for 2500 pages or more.

  • emailAddress (Boolean) (defaults to: false)
    • Mask email addresses from the scanned document with # characters. Available for users on a plan for 2500 pages or more.

  • creditCard (Boolean) (defaults to: false)
    • Mask credit card numbers and credit card track numbers from the scanned document with # characters. Available for users on a plan for 2500 pages or more.

  • phoneNumber (Boolean) (defaults to: false)
    • Mask phone numbers from the scanned document with # characters. Available for users on a plan for 2500 pages or more.



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/copyleaks/models/submissions/properties/sensitive_data_protection.rb', line 34

def initialize(
  driversLicense = false,
  credentials = false,
  passport = false,
  network = false,
  url = false,
  emailAddress = false,
  creditCard = false,
  phoneNumber = false
)
  @driversLicense = driversLicense
  @credentials = credentials
  @passport = passport
  @network = network
  @url = url
  @emailAddress = emailAddress
  @creditCard = creditCard
  @phoneNumber = phoneNumber
end

Instance Method Details

#as_json(*_args) ⇒ Object



54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/copyleaks/models/submissions/properties/sensitive_data_protection.rb', line 54

def as_json(*_args)
  {
    driversLicense: @driversLicense,
    credentials: @credentials,
    passport: @passport,
    network: @network,
    url: @url,
    emailAddress: @emailAddress,
    creditCard: @creditCard,
    phoneNumber: @phoneNumber
  }.select { |_k, v| !v.nil? }
end

#to_json(*options) ⇒ Object



67
68
69
# File 'lib/copyleaks/models/submissions/properties/sensitive_data_protection.rb', line 67

def to_json(*options)
  as_json(*options).to_json(*options)
end