Loading...
Searching...
No Matches
AccelByte::Api::Agreement Class Reference

Agreement API to obtain and accept legal in a namespace. More...

#include <AccelByteAgreementApi.h>

Inheritance diagram for AccelByte::Api::Agreement:

Public Member Functions

 Agreement (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient=nullptr)
 Agreement (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelBytePlatformPtr const &InAccelBytePlatform)
FAccelByteTaskWPtr GetLegalPolicies (EAccelByteAgreementPolicyType const &AgreementPolicyType, bool DefaultOnEmpty, THandler< TArray< FAccelByteModelsPublicPolicy > > const &OnSuccess, FErrorHandler const &OnError)
 Retrieve all active latest policies based on a namespace and country. The namespace is current client namespace. The country will be read from user token.
FAccelByteTaskWPtr GetLegalPolicies (FString const &Namespace, EAccelByteAgreementPolicyType const &AgreementPolicyType, bool DefaultOnEmpty, THandler< TArray< FAccelByteModelsPublicPolicy > > const &OnSuccess, FErrorHandler const &OnError)
 Retrieve all active latest policies based on a namespace and country. The namespace can be filled with namespace or publisher namespace. The country will be read from user token.
FAccelByteTaskWPtr GetLegalPolicies (EAccelByteAgreementPolicyType const &AgreementPolicyType, TArray< FString > const &Tags, bool DefaultOnEmpty, THandler< TArray< FAccelByteModelsPublicPolicy > > const &OnSuccess, FErrorHandler const &OnError)
 Retrieve all active latest policies based on a namespace and country. The namespace is current client namespace. The country will be read from user token.
FAccelByteTaskWPtr GetLegalPoliciesByCountry (FString const &CountryCode, EAccelByteAgreementPolicyType const &AgreementPolicyType, bool DefaultOnEmpty, THandler< TArray< FAccelByteModelsPublicPolicy > > const &OnSuccess, FErrorHandler const &OnError)
 Retrieve all active latest policies based on a country.
FAccelByteTaskWPtr GetLegalPoliciesByCountry (FString const &CountryCode, EAccelByteAgreementPolicyType const &AgreementPolicyType, TArray< FString > const &Tags, bool DefaultOnEmpty, THandler< TArray< FAccelByteModelsPublicPolicy > > const &OnSuccess, FErrorHandler const &OnError)
 Retrieve all active latest policies based on a country.
FAccelByteTaskWPtr GetLegalPoliciesByNamespaceAndCountry (FString const &Namespace, FString const &CountryCode, EAccelByteAgreementPolicyType const &AgreementPolicyType, bool DefaultOnEmpty, THandler< TArray< FAccelByteModelsPublicPolicy > > const &OnSuccess, FErrorHandler const &OnError)
 Retrieve all active latest policies based on a country and namespace.
FAccelByteTaskWPtr GetLegalPoliciesByNamespaceAndCountry (FString const &Namespace, FString const &CountryCode, EAccelByteAgreementPolicyType const &AgreementPolicyType, TArray< FString > const &Tags, bool DefaultOnEmpty, THandler< TArray< FAccelByteModelsPublicPolicy > > const &OnSuccess, FErrorHandler const &OnError)
 Retrieve all active latest policies based on a country and namespace.
FAccelByteTaskWPtr BulkAcceptPolicyVersions (TArray< FAccelByteModelsAcceptAgreementRequest > const &AgreementRequests, THandler< FAccelByteModelsAcceptAgreementResponse > const &OnSuccess, FErrorHandler const &OnError)
 Accepts many legal policy versions all at once. Supply with localized version policy id to accept an agreement.
FAccelByteTaskWPtr RetrieveAcceptedPolicies (THandler< TArray< FAccelByteModelsRetrieveAcceptedAgreementResponse > > const &OnSuccess, FErrorHandler const &OnError)
 Retrieve accepted Legal Agreements.
FAccelByteTaskWPtr AcceptPolicyVersion (FString const &LocalizedPolicyVersionId, FVoidHandler const &OnSuccess, FErrorHandler const &OnError)
 Accepts a legal policy version. Supply with localized version policy id to accept an agreement.
FAccelByteTaskWPtr ChangePolicyPreferences (TArray< FAccelByteModelsChangeAgreementRequest > const &ChangeAgreementRequests, FVoidHandler const &OnSuccess, FErrorHandler const &OnError)
 Accept or changes preference to specific legal policy versions.
FAccelByteTaskWPtr QueryLegalEligibilities (FString const &Namespace, THandler< TArray< FAccelByteModelsRetrieveUserEligibilitiesResponse > > const &OnSuccess, FErrorHandler const &OnError)
 Query all player's legal eligibilities on a namespace, use to check is player already commited to legal or not.
FAccelByteTaskWPtr GetLegalDocument (FString const &Url, THandler< FString > const &OnSuccess, FErrorHandler const &OnError)
 Get the content of the legal document.
Public Member Functions inherited from AccelByte::FApiBase
 FApiBase (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient)
 FApiBase (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelBytePlatformPtr const &InAccelBytePlatform)
void SetApiClient (TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient)

Additional Inherited Members

Protected Member Functions inherited from AccelByte::FApiBase
template<typename T>
bool ValidateAccelByteId (FString const &Id, EAccelByteIdHypensRule HypenRule, FString const &ErrorMessage, T const &OnError)
Protected Attributes inherited from AccelByte::FApiBase
TSharedRef< Credentials const, ESPMode::ThreadSafe > CredentialsRef
Settings const & SettingsRef
FHttpRetrySchedulerBaseHttpRef
FHttpClient HttpClient
FAccelBytePlatformPtr AccelBytePlatformPtr

Detailed Description

Agreement API to obtain and accept legal in a namespace.

Member Function Documentation

◆ AcceptPolicyVersion()

FAccelByteTaskWPtr AccelByte::Api::Agreement::AcceptPolicyVersion ( FString const & LocalizedPolicyVersionId,
FVoidHandler const & OnSuccess,
FErrorHandler const & OnError )

Accepts a legal policy version. Supply with localized version policy id to accept an agreement.

Parameters
LocalizedPolicyVersionIdA localized policy version Id to accept.
OnSuccessThis will be called when the operation succeeded.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ BulkAcceptPolicyVersions()

FAccelByteTaskWPtr AccelByte::Api::Agreement::BulkAcceptPolicyVersions ( TArray< FAccelByteModelsAcceptAgreementRequest > const & AgreementRequests,
THandler< FAccelByteModelsAcceptAgreementResponse > const & OnSuccess,
FErrorHandler const & OnError )

Accepts many legal policy versions all at once. Supply with localized version policy id to accept an agreement.

Parameters
AgreementRequestsList of localized policy versions to accept.
OnSuccessThis will be called when the operation succeeded. The result is an FAccelByteModelsAcceptAgreementResponse.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ ChangePolicyPreferences()

FAccelByteTaskWPtr AccelByte::Api::Agreement::ChangePolicyPreferences ( TArray< FAccelByteModelsChangeAgreementRequest > const & ChangeAgreementRequests,
FVoidHandler const & OnSuccess,
FErrorHandler const & OnError )

Accept or changes preference to specific legal policy versions.

Parameters
ChangeAgreementRequestsRequest for localized policy version id to change.
OnSuccessThis will be called when the operation succeeded.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetLegalDocument()

FAccelByteTaskWPtr AccelByte::Api::Agreement::GetLegalDocument ( FString const & Url,
THandler< FString > const & OnSuccess,
FErrorHandler const & OnError )

Get the content of the legal document.

Parameters
UrlThe url of the legal document, you can get it from GetLegalPolicies query.
OnSuccessThis will be called when the operation succeeded. The result is a string.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetLegalPolicies() [1/3]

FAccelByteTaskWPtr AccelByte::Api::Agreement::GetLegalPolicies ( EAccelByteAgreementPolicyType const & AgreementPolicyType,
bool DefaultOnEmpty,
THandler< TArray< FAccelByteModelsPublicPolicy > > const & OnSuccess,
FErrorHandler const & OnError )

Retrieve all active latest policies based on a namespace and country. The namespace is current client namespace. The country will be read from user token.

Parameters
AgreementPolicyTypeFilter the responded policy by policy type. Choose the EAccelByteAgreementPolicyType::EMPTY if you want to be responded with all policy type.
DefaultOnEmptySpecify with true if you want to be responded with default country-specific policy if your requested country is not exist.
OnSuccessThis will be called when the operation succeeded. The result is a TArray<FAccelByteModelsPublicPolicy>.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetLegalPolicies() [2/3]

FAccelByteTaskWPtr AccelByte::Api::Agreement::GetLegalPolicies ( EAccelByteAgreementPolicyType const & AgreementPolicyType,
TArray< FString > const & Tags,
bool DefaultOnEmpty,
THandler< TArray< FAccelByteModelsPublicPolicy > > const & OnSuccess,
FErrorHandler const & OnError )

Retrieve all active latest policies based on a namespace and country. The namespace is current client namespace. The country will be read from user token.

Parameters
AgreementPolicyTypeFilter the responded policy by policy type. Choose the EAccelByteAgreementPolicyType::EMPTY if you want to be responded with all policy type.
TagsFilter the responded policy by tags.
DefaultOnEmptySpecify with true if you want to be responded with default country-specific policy if your requested country is not exist.
OnSuccessThis will be called when the operation succeeded. The result is a TArray<FAccelByteModelsPublicPolicy>.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetLegalPolicies() [3/3]

FAccelByteTaskWPtr AccelByte::Api::Agreement::GetLegalPolicies ( FString const & Namespace,
EAccelByteAgreementPolicyType const & AgreementPolicyType,
bool DefaultOnEmpty,
THandler< TArray< FAccelByteModelsPublicPolicy > > const & OnSuccess,
FErrorHandler const & OnError )

Retrieve all active latest policies based on a namespace and country. The namespace can be filled with namespace or publisher namespace. The country will be read from user token.

Parameters
NamespaceFilter the responded policy by namespace.
AgreementPolicyTypeFilter the responded policy by policy type. Choose the EAccelByteAgreementPolicyType::EMPTY if you want to be responded with all policy type.
DefaultOnEmptySpecify with true if you want to be responded with default country-specific policy if your requested country is not exist.
OnSuccessThis will be called when the operation succeeded. The result is a TArray<FAccelByteModelsPublicPolicy>.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetLegalPoliciesByCountry() [1/2]

FAccelByteTaskWPtr AccelByte::Api::Agreement::GetLegalPoliciesByCountry ( FString const & CountryCode,
EAccelByteAgreementPolicyType const & AgreementPolicyType,
bool DefaultOnEmpty,
THandler< TArray< FAccelByteModelsPublicPolicy > > const & OnSuccess,
FErrorHandler const & OnError )

Retrieve all active latest policies based on a country.

Parameters
CountryCodeRequested policy country code.
AgreementPolicyTypeFilter the responded policy by policy type. Choose the EAccelByteAgreementPolicyType::EMPTY if you want to be responded with all policy type.
DefaultOnEmptySpecify with true if you want to be responded with default country-specific policy if your requested country is not exist.
OnSuccessThis will be called when the operation succeeded. The result is a TArray<FAccelByteModelsPublicPolicy>.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetLegalPoliciesByCountry() [2/2]

FAccelByteTaskWPtr AccelByte::Api::Agreement::GetLegalPoliciesByCountry ( FString const & CountryCode,
EAccelByteAgreementPolicyType const & AgreementPolicyType,
TArray< FString > const & Tags,
bool DefaultOnEmpty,
THandler< TArray< FAccelByteModelsPublicPolicy > > const & OnSuccess,
FErrorHandler const & OnError )

Retrieve all active latest policies based on a country.

Parameters
CountryCodeRequested policy country code.
AgreementPolicyTypeFilter the responded policy by policy type. Choose the EAccelByteAgreementPolicyType::EMPTY if you want to be responded with all policy type.
TagsFilter the responded policy by tags.
DefaultOnEmptySpecify with true if you want to be responded with default country-specific policy if your requested country is not exist.
OnSuccessThis will be called when the operation succeeded. The result is a TArray<FAccelByteModelsPublicPolicy>.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetLegalPoliciesByNamespaceAndCountry() [1/2]

FAccelByteTaskWPtr AccelByte::Api::Agreement::GetLegalPoliciesByNamespaceAndCountry ( FString const & Namespace,
FString const & CountryCode,
EAccelByteAgreementPolicyType const & AgreementPolicyType,
bool DefaultOnEmpty,
THandler< TArray< FAccelByteModelsPublicPolicy > > const & OnSuccess,
FErrorHandler const & OnError )

Retrieve all active latest policies based on a country and namespace.

Parameters
NamespaceRequested namespace.
CountryCodeRequested policy country code.
AgreementPolicyTypeFilter the responded policy by policy type. Choose the EAccelByteAgreementPolicyType::EMPTY if you want to be responded with all policy type.
DefaultOnEmptySpecify with true if you want to be responded with default country-specific policy if your requested country is not exist.
OnSuccessThis will be called when the operation succeeded. The result is a TArray<FAccelByteModelsPublicPolicy>.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetLegalPoliciesByNamespaceAndCountry() [2/2]

FAccelByteTaskWPtr AccelByte::Api::Agreement::GetLegalPoliciesByNamespaceAndCountry ( FString const & Namespace,
FString const & CountryCode,
EAccelByteAgreementPolicyType const & AgreementPolicyType,
TArray< FString > const & Tags,
bool DefaultOnEmpty,
THandler< TArray< FAccelByteModelsPublicPolicy > > const & OnSuccess,
FErrorHandler const & OnError )

Retrieve all active latest policies based on a country and namespace.

Parameters
NamespaceRequested namespace.
CountryCodeRequested policy country code.
AgreementPolicyTypeFilter the responded policy by policy type. Choose the EAccelByteAgreementPolicyType::EMPTY if you want to be responded with all policy type.
TagsFilter the responded policy by tags.
DefaultOnEmptySpecify with true if you want to be responded with default country-specific policy if your requested country is not exist.
OnSuccessThis will be called when the operation succeeded. The result is a TArray<FAccelByteModelsPublicPolicy>.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ QueryLegalEligibilities()

FAccelByteTaskWPtr AccelByte::Api::Agreement::QueryLegalEligibilities ( FString const & Namespace,
THandler< TArray< FAccelByteModelsRetrieveUserEligibilitiesResponse > > const & OnSuccess,
FErrorHandler const & OnError )

Query all player's legal eligibilities on a namespace, use to check is player already commited to legal or not.

Parameters
NamespaceFilter the eligibilities by namespace.
OnSuccessThis will be called when the operation succeeded. The result is a TArray<RetrieveUserEligibilitiesResponse>.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ RetrieveAcceptedPolicies()

FAccelByteTaskWPtr AccelByte::Api::Agreement::RetrieveAcceptedPolicies ( THandler< TArray< FAccelByteModelsRetrieveAcceptedAgreementResponse > > const & OnSuccess,
FErrorHandler const & OnError )

Retrieve accepted Legal Agreements.

Parameters
OnSuccessThis will be called when the operation succeeded. The result is an FAccelByteModelsAcceptAgreementResponse.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.