Skip to content

Latest commit

 

History

History
155 lines (102 loc) · 3.62 KB

sms-templates.md

File metadata and controls

155 lines (102 loc) · 3.62 KB

SMS Templates

4 operation(s). Part of the API index.

Call these as client.<service>.<method>(...). <service> is the client field for this group — the README lists the field name for every service. These pages group operations the way the OpenAPI specification tags them, which is not always one field per page.


createSmsTemplate

POST /v2/manage/smstemplates

Create SMS template

Creates a new SMS template for a specified customer and Tenant.

Example

public static void callCreateSmsTemplate(LoginRadiusClient client) {
  SmsTemplate smsTemplate = new SmsTemplate().smsTemplateType("<smsTemplateType>").name("<name>").template("<template>"); //Required

  try {
    var response = client.smsTemplates.createSmsTemplate(smsTemplate);
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Request body

SmsTemplate as application/json.

Returns

SmsTemplate


deleteSmsTemplate

DELETE /v2/manage/sms-templates/{templateType}

Delete SMS template

Deletes an SMS template by its type for a specified customer and Tenant.

Example

public static void callDeleteSmsTemplate(LoginRadiusClient client) {
  String templateType = "<templateType>"; //Required
  DeleteSmsTemplateModel deleteSmsTemplateModel = new DeleteSmsTemplateModel().name("<name>"); //Required

  try {
    var response = client.smsTemplates.deleteSmsTemplate(templateType, deleteSmsTemplateModel);
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Parameters

Name In Type Required Description
templateType path string yes The type of SMS template to delete.

Request body

DeleteSmsTemplateModel as application/json.

Returns

DeleteResponse


getSmsTemplates

GET /v2/manage/smstemplates

List SMS templates

Retrieves a list of SMS templates for a specified customer and Tenant.

Example

public static void callGetSmsTemplates(LoginRadiusClient client) {
  try {
    var response = client.smsTemplates.getSmsTemplates();
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Returns

object


updateSmsTemplate

PUT /v2/manage/sms-templates/{templateType}

Update SMS template

Updates an existing SMS template by its type for a specified customer and Tenant.

Example

public static void callUpdateSmsTemplate(LoginRadiusClient client) {
  String templateType = "<templateType>"; //Required
  UpdateSmsTemplateModel updateSmsTemplateModel = new UpdateSmsTemplateModel().name("<name>").template("<template>").isActive(true); //Required

  try {
    var response = client.smsTemplates.updateSmsTemplate(templateType, updateSmsTemplateModel);
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Parameters

Name In Type Required Description
templateType path string yes The type of SMS template to delete.

Request body

UpdateSmsTemplateModel as application/json.

Returns

SmsTemplate