lib/fusionauth/fusionauth_client.rb in fusionauth_client-1.17.0 vs lib/fusionauth/fusionauth_client.rb in fusionauth_client-1.18.0
- old
+ new
@@ -169,10 +169,24 @@
.post()
.go()
end
#
+ # Creates a connector. You can optionally specify an Id for the connector, if not provided one will be generated.
+ #
+ # @param connector_id [string] (Optional) The Id for the connector. If not provided a secure random UUID will be generated.
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the connector.
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def create_connector(connector_id, request)
+ start.uri('/api/connector')
+ .url_segment(connector_id)
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
+ .post()
+ .go()
+ end
+
+ #
# Creates a user consent type. You can optionally specify an Id for the consent type, if not provided one will be generated.
#
# @param consent_id [string] (Optional) The Id for the consent. If not provided a secure random UUID will be generated.
# @param request [OpenStruct, Hash] The request object that contains all of the information used to create the consent.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -212,10 +226,38 @@
.post()
.go()
end
#
+ # Creates a form. You can optionally specify an Id for the form, if not provided one will be generated.
+ #
+ # @param form_id [string] (Optional) The Id for the form. If not provided a secure random UUID will be generated.
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the form.
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def create_form(form_id, request)
+ start.uri('/api/form')
+ .url_segment(form_id)
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
+ .post()
+ .go()
+ end
+
+ #
+ # Creates a form field. You can optionally specify an Id for the form, if not provided one will be generated.
+ #
+ # @param field_id [string] (Optional) The Id for the form field. If not provided a secure random UUID will be generated.
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the form field.
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def create_form_field(field_id, request)
+ start.uri('/api/form/field')
+ .url_segment(field_id)
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
+ .post()
+ .go()
+ end
+
+ #
# Creates a group. You can optionally specify an Id for the group, if not provided one will be generated.
#
# @param group_id [string] (Optional) The Id for the group. If not provided a secure random UUID will be generated.
# @param request [OpenStruct, Hash] The request object that contains all of the information used to create the group.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -463,10 +505,22 @@
.delete()
.go()
end
#
+ # Deletes the connector for the given Id.
+ #
+ # @param connector_id [string] The Id of the connector to delete.
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def delete_connector(connector_id)
+ start.uri('/api/connector')
+ .url_segment(connector_id)
+ .delete()
+ .go()
+ end
+
+ #
# Deletes the consent for the given Id.
#
# @param consent_id [string] The Id of the consent to delete.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
def delete_consent(consent_id)
@@ -487,10 +541,34 @@
.delete()
.go()
end
#
+ # Deletes the form for the given Id.
+ #
+ # @param form_id [string] The Id of the form to delete.
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def delete_form(form_id)
+ start.uri('/api/form')
+ .url_segment(form_id)
+ .delete()
+ .go()
+ end
+
+ #
+ # Deletes the form field for the given Id.
+ #
+ # @param field_id [string] The Id of the form field to delete.
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def delete_form_field(field_id)
+ start.uri('/api/form/field')
+ .url_segment(field_id)
+ .delete()
+ .go()
+ end
+
+ #
# Deletes the group for the given Id.
#
# @param group_id [string] The Id of the group to delete.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
def delete_group(group_id)
@@ -525,15 +603,15 @@
end
#
# Deletes the key for the given Id.
#
- # @param key_od [string] The Id of the key to delete.
+ # @param key_id [string] The Id of the key to delete.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
- def delete_key(key_od)
+ def delete_key(key_id)
start.uri('/api/key')
- .url_segment(key_od)
+ .url_segment(key_id)
.delete()
.go()
end
#
@@ -1054,10 +1132,24 @@
.patch()
.go()
end
#
+ # Updates, via PATCH, the connector with the given Id.
+ #
+ # @param connector_id [string] The Id of the connector to update.
+ # @param request [OpenStruct, Hash] The request that contains just the new connector information.
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def patch_connector(connector_id, request)
+ start.uri('/api/connector')
+ .url_segment(connector_id)
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
+ .patch()
+ .go()
+ end
+
+ #
# Updates, via PATCH, the consent with the given Id.
#
# @param consent_id [string] The Id of the consent to update.
# @param request [OpenStruct, Hash] The request that contains just the new consent information.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -1454,10 +1546,32 @@
.get()
.go()
end
#
+ # Retrieves the connector with the given Id.
+ #
+ # @param connector_id [string] The Id of the connector.
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def retrieve_connector(connector_id)
+ start.uri('/api/connector')
+ .url_segment(connector_id)
+ .get()
+ .go()
+ end
+
+ #
+ # Retrieves all of the connectors.
+ #
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def retrieve_connectors()
+ start.uri('/api/connector')
+ .get()
+ .go()
+ end
+
+ #
# Retrieves the Consent for the given Id.
#
# @param consent_id [string] The Id of the consent.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
def retrieve_consent(consent_id)
@@ -1565,10 +1679,54 @@
.get()
.go()
end
#
+ # Retrieves the form with the given Id.
+ #
+ # @param form_id [string] The Id of the form.
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def retrieve_form(form_id)
+ start.uri('/api/form')
+ .url_segment(form_id)
+ .get()
+ .go()
+ end
+
+ #
+ # Retrieves the form field with the given Id.
+ #
+ # @param field_id [string] The Id of the form field.
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def retrieve_form_field(field_id)
+ start.uri('/api/form/field')
+ .url_segment(field_id)
+ .get()
+ .go()
+ end
+
+ #
+ # Retrieves all of the forms fields
+ #
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def retrieve_form_fields()
+ start.uri('/api/form/field')
+ .get()
+ .go()
+ end
+
+ #
+ # Retrieves all of the forms.
+ #
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def retrieve_forms()
+ start.uri('/api/form')
+ .get()
+ .go()
+ end
+
+ #
# Retrieves the group for the given Id.
#
# @param group_id [string] The Id of the group.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
def retrieve_group(group_id)
@@ -2466,10 +2624,24 @@
.put()
.go()
end
#
+ # Updates the connector with the given Id.
+ #
+ # @param connector_id [string] The Id of the connector to update.
+ # @param request [OpenStruct, Hash] The request object that contains all of the new connector information.
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def update_connector(connector_id, request)
+ start.uri('/api/connector')
+ .url_segment(connector_id)
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
+ .put()
+ .go()
+ end
+
+ #
# Updates the consent with the given Id.
#
# @param consent_id [string] The Id of the consent to update.
# @param request [OpenStruct, Hash] The request that contains all of the new consent information.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -2488,9 +2660,37 @@
# @param request [OpenStruct, Hash] The request that contains all of the new email template information.
# @return [FusionAuth::ClientResponse] The ClientResponse object.
def update_email_template(email_template_id, request)
start.uri('/api/email/template')
.url_segment(email_template_id)
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
+ .put()
+ .go()
+ end
+
+ #
+ # Updates the form with the given Id.
+ #
+ # @param form_id [string] The Id of the form to update.
+ # @param request [OpenStruct, Hash] The request object that contains all of the new form information.
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def update_form(form_id, request)
+ start.uri('/api/form')
+ .url_segment(form_id)
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
+ .put()
+ .go()
+ end
+
+ #
+ # Updates the form field with the given Id.
+ #
+ # @param field_id [string] The Id of the form field to update.
+ # @param request [OpenStruct, Hash] The request object that contains all of the new form field information.
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
+ def update_form_field(field_id, request)
+ start.uri('/api/form/field')
+ .url_segment(field_id)
.body_handler(FusionAuth::JSONBodyHandler.new(request))
.put()
.go()
end