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



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

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



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

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



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

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



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

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



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

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



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

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

#preferencesObject (readonly)

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

Returns:

  • (Object)

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



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

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

#timestampObject (readonly)

Returns Operation time, for instance creation time, update time.

Returns:

  • (Object)

    Operation time, for instance creation time, update time



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

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



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

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

Class Method Details

.createIubendaApi::ConsentSolution::Subject, ApiStruct::Errors::Entity .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>>

Overloads:

Returns:

See Also:



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

.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:

See Also:

  • Clients::Subject#list(options)


# 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.get('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.get('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) ⇒ IubendaApi::ConsentSolution::Subject, ApiStruct::Errors::Entity .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>>

Overloads:

Returns:

See Also:



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

client_service IubendaApi::ConsentSolution::Clients::Subject