Class: IubendaApi::ConsentSolution::Subject

Inherits:
ApiStruct::Entity
  • Object
show all
Defined in:
lib/iubenda_api/consent_solution/subject.rb

Overview

Response serializer class for client service IubendaApi::ConsentSolution::Clients::Subject

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#emailString (readonly)

Returns Email of the subject.

Returns:

  • (String)

    Email of the subject



83
# File 'lib/iubenda_api/consent_solution/subject.rb', line 83

attr_entity :id, :owner_id, :email, :first_name, :last_name, :full_name, :verified, :preferences, :timestamp

#first_nameString (readonly)

Returns First name of the subject.

Returns:

  • (String)

    First name of the subject



83
# File 'lib/iubenda_api/consent_solution/subject.rb', line 83

attr_entity :id, :owner_id, :email, :first_name, :last_name, :full_name, :verified, :preferences, :timestamp

#full_nameString (readonly)

Returns Full name of the subject.

Returns:

  • (String)

    Full name of the subject



83
# File 'lib/iubenda_api/consent_solution/subject.rb', line 83

attr_entity :id, :owner_id, :email, :first_name, :last_name, :full_name, :verified, :preferences, :timestamp

#idString (readonly)

Returns ID of the subject.

Returns:

  • (String)

    ID of the subject



83
# File 'lib/iubenda_api/consent_solution/subject.rb', line 83

attr_entity :id, :owner_id, :email, :first_name, :last_name, :full_name, :verified, :preferences, :timestamp

#last_nameString (readonly)

Returns Last name of the subject.

Returns:

  • (String)

    Last name of the subject



83
# File 'lib/iubenda_api/consent_solution/subject.rb', line 83

attr_entity :id, :owner_id, :email, :first_name, :last_name, :full_name, :verified, :preferences, :timestamp

#owner_idString (readonly)

Returns owner id of the subject.

Returns:

  • (String)

    owner id of the subject



83
# File 'lib/iubenda_api/consent_solution/subject.rb', line 83

attr_entity :id, :owner_id, :email, :first_name, :last_name, :full_name, :verified, :preferences, :timestamp

#preferencesHash (readonly)

Returns Set of key-value pairs with user preferences for the consent action.

Returns:

  • (Hash)

    Set of key-value pairs with user preferences for the consent action



83
# File 'lib/iubenda_api/consent_solution/subject.rb', line 83

attr_entity :id, :owner_id, :email, :first_name, :last_name, :full_name, :verified, :preferences, :timestamp

#timestampString (readonly)

Returns ISO 8601 timestamp. Operation time, for instance creation time, update time.

Returns:

  • (String)

    ISO 8601 timestamp. Operation time, for instance creation time, update time



83
# File 'lib/iubenda_api/consent_solution/subject.rb', line 83

attr_entity :id, :owner_id, :email, :first_name, :last_name, :full_name, :verified, :preferences, :timestamp

#verifiedBoolean (readonly)

Returns Reserved field used to signal whether a subject is verified, for instance via the double opt-in method.

Returns:

  • (Boolean)

    Reserved field used to signal whether a subject is verified, for instance via the double opt-in method



83
# File 'lib/iubenda_api/consent_solution/subject.rb', line 83

attr_entity :id, :owner_id, :email, :first_name, :last_name, :full_name, :verified, :preferences, :timestamp

Class Method Details

.create(options) ⇒ IubendaApi::ConsentSolution::Subject, ApiStruct::Errors::Entity

Creates a subject

Examples:

IubendaApi::ConsentSolution::Subject.create(id: 'testsubject', email: '[email protected]', first_name: "John", last_name: "Doe", verified: false) # -> #<IubendaApi::ConsentSolution::Subject id="testsubject" timestamp="2019-11-05T11:33:20.039Z">
IubendaApi::ConsentSolution::Subject.create(id: 'testsubject', email: '[email protected]', first_name: "John", last_name: "Doe", verified: false) # -> #<ApiStruct::Errors::Entity body=#<Hashie::Mash message="Invalid authentication credentials"> error=true status=#<HTTP::Response::Status 403 Forbidden>>

Parameters:

  • options (Hash)

    options to send as subject attributes. Options are same as IubendaApi::ConsentSolution::Clients::Subject#create options

Returns:

See Also:



# File 'lib/iubenda_api/consent_solution/subject.rb', line 33

.listArray<IubendaApi::ConsentSolution::Subject>, ApiStruct::Errors::Entity .list(options) ⇒ Array<IubendaApi::ConsentSolution::Subject>, ApiStruct::Errors::Entity

Gets list of subjects

Examples:

IubendaApi::ConsentSolution::Subject.list(limit: 1) # -> [#<IubendaApi::ConsentSolution::Subject email="[email protected]" first_name="John" full_name=nil id="testsubject" last_name="Doe" owner_id="10240" preferences=nil timestamp="2019-11-05T11:33:20+00:00" verified=false>, ...]
IubendaApi::ConsentSolution::Subject.list(limit: 1) # -> #<ApiStruct::Errors::Entity body=#<Hashie::Mash message="Invalid authentication credentials"> error=true status=#<HTTP::Response::Status 403 Forbidden>>

Overloads:

Returns:



# File 'lib/iubenda_api/consent_solution/subject.rb', line 20

.show(id) ⇒ IubendaApi::ConsentSolution::Subject, ApiStruct::Errors::Entity

Gets a subject

Examples:

IubendaApi::ConsentSolution::Subject.show('testsubject') # -> #<IubendaApi::ConsentSolution::Subject email="[email protected]" first_name="John" full_name=nil id="testsubject" last_name="Doe" owner_id="10240" preferences=nil timestamp="2019-11-05T11:33:20+00:00" verified=false>
IubendaApi::ConsentSolution::Subject.show('notfound') # -> #<ApiStruct::Errors::Entity body=#<Hashie::Mash message="Invalid authentication credentials"> error=true status=#<HTTP::Response::Status 403 Forbidden>>

Parameters:

  • id (String)

    the id of the subject

Returns:

See Also:



# File 'lib/iubenda_api/consent_solution/subject.rb', line 8

.update(id, options) ⇒ IubendaApi::ConsentSolution::Subject, ApiStruct::Errors::Entity

Updates a subject

Examples:

IubendaApi::ConsentSolution::Subject.update('testsubject', email: '[email protected]') # -> #<IubendaApi::ConsentSolution::Subject id="testsubject" timestamp="2019-11-05T11:33:20.039Z">
IubendaApi::ConsentSolution::Subject.update('testsubject', email: '[email protected]') # -> #<ApiStruct::Errors::Entity body=#<Hashie::Mash message="Invalid authentication credentials"> error=true status=#<HTTP::Response::Status 403 Forbidden>>

Parameters:

  • options (Hash)

    options to send as subject attributes. Options are same as IubendaApi::ConsentSolution::Clients::Subject#update options

Returns:

See Also:



54
# File 'lib/iubenda_api/consent_solution/subject.rb', line 54

client_service IubendaApi::ConsentSolution::Clients::Subject