Class: UserConsent::Agreement::FormObject
- Inherits:
-
Object
- Object
- UserConsent::Agreement::FormObject
- Includes:
- ActiveModel::Model
- Defined in:
- app/models/user_consent/agreement/form_object.rb
Overview
Form object used for handling user consent
Instance Attribute Summary collapse
-
#marketing_policy ⇒ Object
Returns the value of attribute marketing_policy.
-
#privacy_policy ⇒ Object
Returns the value of attribute privacy_policy.
Class Method Summary collapse
-
.model_name ⇒ ActiveModel::Name
Defining this method allows us to use some ActiveModel patterns.
Instance Method Summary collapse
-
#report_consent(imis_id, options = {}) ⇒ Boolean
Method used to report user consent of the privacy policy and marketing.
Instance Attribute Details
#marketing_policy ⇒ Object
Returns the value of attribute marketing_policy.
7 8 9 |
# File 'app/models/user_consent/agreement/form_object.rb', line 7 def marketing_policy @marketing_policy end |
#privacy_policy ⇒ Object
Returns the value of attribute privacy_policy.
7 8 9 |
# File 'app/models/user_consent/agreement/form_object.rb', line 7 def privacy_policy @privacy_policy end |
Class Method Details
.model_name ⇒ ActiveModel::Name
Defining this method allows us to use some ActiveModel patterns. For example, forms will be identified as sign_in instead of session_sign_in_form_object.
28 29 30 |
# File 'app/models/user_consent/agreement/form_object.rb', line 28 def self.model_name ActiveModel::Name.new(self, nil, 'Agreement') end |
Instance Method Details
#report_consent(imis_id, options = {}) ⇒ Boolean
Method used to report user consent of the privacy policy and marketing
Options
- marketing
-
Consent for marketing. Acceptable values are 0 [for NO] and 1 [for YES].
20 21 22 |
# File 'app/models/user_consent/agreement/form_object.rb', line 20 def (imis_id, ={}) Isaca::Request::ReportConsent.get(imis_id, ).success? if valid? end |