module Oktakit::Client::Templates

Public Instance Methods

add_sms_template(options = {}) click to toggle source

Add SMS Template

@param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] The created SMS Template. @see developer.okta.com/docs/api/resources/templates.html#add-sms-template @example

Oktakit.add_sms_template
# File lib/oktakit/client/templates.rb, line 15
def add_sms_template(options = {})
  post('/templates/sms', options)
end
get_sms_template(id, options = {}) click to toggle source

Get SMS Template

@params id [string] Template ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Fetched SMS Template @see developer.okta.com/docs/api/resources/templates.html#get-sms-template @example

Oktakit.get_sms_template('id')
# File lib/oktakit/client/templates.rb, line 31
def get_sms_template(id, options = {})
  get("/templates/sms/#{id}", options)
end
list_sms_templates(options = {}) click to toggle source

List SMS Templates

@param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Array<Sawyer::Resource>] Array of SMS Template @see developer.okta.com/docs/api/resources/templates.html#list-sms-templates @example

Oktakit.list_sms_templates
# File lib/oktakit/client/templates.rb, line 46
def list_sms_templates(options = {})
  get('/templates/sms', options)
end
partial_sms_template_update(id, options = {}) click to toggle source

Partial SMS Template Update

@params id [string] Template ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Updated Sms Template @see developer.okta.com/docs/api/resources/templates.html#partial-sms-template-update @example

Oktakit.partial_sms_template_update('id')
# File lib/oktakit/client/templates.rb, line 78
def partial_sms_template_update(id, options = {})
  post("/templates/sms/#{id}", options)
end
remove_sms_template(id, options = {}) click to toggle source

Remove SMS Template

@params id [string] Template ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] There is no content in the response. @see developer.okta.com/docs/api/resources/templates.html#remove-sms-template @example

Oktakit.remove_sms_template('id')
# File lib/oktakit/client/templates.rb, line 94
def remove_sms_template(id, options = {})
  delete("/templates/sms/#{id}", options)
end
update_sms_template(id, options = {}) click to toggle source

Update Sms Template

@params id [string] Template ID @param options [Hash] Optional. Query params for request @param options [Hash] Optional. Header params for the request. @param options [String] Optional. The content type to accept. Default application/json @param options [String] Optional. The content type for the request. Default application/json @param options [Hash] Optional. Body params for request. @return [Hash<Sawyer::Resource>] Updated SMS Template @see developer.okta.com/docs/api/resources/templates.html#update-sms-template @example

Oktakit.update_sms_template('id')
# File lib/oktakit/client/templates.rb, line 62
def update_sms_template(id, options = {})
  put("/templates/sms/#{id}", options)
end