diff --git a/lib/fusionauth/fusionauth_client.rb b/lib/fusionauth/fusionauth_client.rb index 2e3656a..0189440 100644 --- a/lib/fusionauth/fusionauth_client.rb +++ b/lib/fusionauth/fusionauth_client.rb @@ -620,6 +620,23 @@ def create_theme(theme_id, request) .go end + # + # Adds the application tenants for universal applications. + # + # @param application_id [string] The Id of the application that the universal application tenant belongs to. + # @param universal_application_tenant_id [string] (Optional) The Id of the universal application tenant. + # @param request [OpenStruct, Hash] The request object that contains all the information used to create the UniversalApplicationTenants. + # @return [FusionAuth::ClientResponse] The ClientResponse object. + def create_universal_application_tenant(application_id, universal_application_tenant_id, request) + start.uri('/api/application') + .url_segment(application_id) + .url_segment("universal-application-tenant") + .url_segment(universal_application_tenant_id) + .body_handler(FusionAuth::JSONBodyHandler.new(request)) + .post + .go + end + # # Creates a user. You can optionally specify an Id for the user, if not provided one will be generated. # @@ -1136,6 +1153,36 @@ def delete_theme(theme_id) .go end + # + # Deletes the universal application tenant. + # + # @param application_id [string] The Id of the application that the UniversalApplicationTenant belongs to. + # @param universal_application_tenant_id [string] The Id of the UniversalApplicationTenant to delete. + # @return [FusionAuth::ClientResponse] The ClientResponse object. + def delete_universal_application_tenant(application_id, universal_application_tenant_id) + start.uri('/api/application') + .url_segment(application_id) + .url_segment("universal-application-tenant") + .url_segment(universal_application_tenant_id) + .delete + .go + end + + # + # Removes the specified tenants from the universal application tenants list. + # + # @param application_id [string] The Id of the universal application that the tenants are linked to. + # @param tenant_ids [Array] The Ids of the tenants to delete from the universal application tenants list. + # @return [FusionAuth::ClientResponse] The ClientResponse object. + def delete_universal_application_tenants(application_id, tenant_ids) + start.uri('/api/application') + .url_segment(application_id) + .url_segment("application-tenant") + .url_parameter('tenantIds', tenant_ids) + .delete + .go + end + # # Deletes the user for the given Id. This permanently deletes all information, metrics, reports and data associated # with the user. @@ -3292,6 +3339,21 @@ def retrieve_two_factor_status(user_id, application_id, two_factor_trust_id) .go end + # + # Retrieves the universal application tenant. + # + # @param application_id [string] The Id of the universal application that tenant is mapped to + # @param universal_application_tenant_id [string] The Id of the universal application tenant. + # @return [FusionAuth::ClientResponse] The ClientResponse object. + def retrieve_universal_application_tenant(application_id, universal_application_tenant_id) + start.uri('/api/application') + .url_segment(application_id) + .url_segment("application-tenant") + .url_segment(universal_application_tenant_id) + .get + .go + end + # # Retrieves the user for the given Id. # @@ -4018,6 +4080,20 @@ def search_themes(request) .go end + # + # Searches universal application tenants for the specified applicationId and with the specified criteria and pagination. + # + # @param request [OpenStruct, Hash] The search criteria and pagination information. + # @return [FusionAuth::ClientResponse] The ClientResponse object. + def search_universal_application_tenants(request) + start.uri('/api/application') + .url_segment("universal-application-tenant") + .url_segment("search") + .body_handler(FusionAuth::JSONBodyHandler.new(request)) + .post + .go + end + # # Searches user comments with the specified criteria and pagination. # @@ -4643,6 +4719,23 @@ def update_theme(theme_id, request) .go end + # + # Adds the application tenants for universal applications. + # + # @param application_id [string] The Id of the application that the UniversalApplicationTenant belongs to. + # @param universal_application_tenant_id [string] The Id of the universal application tenant. + # @param request [OpenStruct, Hash] The request object that contains all the information used to create the UniversalApplicationTenant. + # @return [FusionAuth::ClientResponse] The ClientResponse object. + def update_universal_application_tenant(application_id, universal_application_tenant_id, request) + start.uri('/api/application') + .url_segment(application_id) + .url_segment("universal-application-tenant") + .url_segment(universal_application_tenant_id) + .body_handler(FusionAuth::JSONBodyHandler.new(request)) + .put + .go + end + # # Updates the user with the given Id. #