Class: AhoSdk::Schemas::RenderTemplatesResource Private
- Inherits:
-
Object
- Object
- AhoSdk::Schemas::RenderTemplatesResource
- Defined in:
- lib/aho_sdk/schemas.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Render_templates resource operations
Instance Method Summary collapse
-
#create(schema_id:, body: nil, idempotency_key: nil) ⇒ Hash
private
Create render template.
-
#delete(schema_id:, id:) ⇒ Hash
private
Delete render template.
-
#get(schema_id:, id:) ⇒ Hash
private
Get render template.
-
#initialize(client) ⇒ RenderTemplatesResource
constructor
private
A new instance of RenderTemplatesResource.
-
#list(schema_id:) ⇒ Hash
private
List render templates.
-
#update(schema_id:, id:, body: nil, idempotency_key: nil) ⇒ Hash
private
Update render template.
-
#validate(schema_id:, body: nil, idempotency_key: nil) ⇒ Hash
private
Validate template.
Constructor Details
#initialize(client) ⇒ RenderTemplatesResource
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of RenderTemplatesResource.
34 35 36 |
# File 'lib/aho_sdk/schemas.rb', line 34 def initialize(client) @client = client end |
Instance Method Details
#create(schema_id:, body: nil, idempotency_key: nil) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create render template
52 53 54 |
# File 'lib/aho_sdk/schemas.rb', line 52 def create(schema_id:, body: nil, idempotency_key: nil) @client.post("/v1/schemas/#{schema_id}/render_templates", body: body, idempotency_key: idempotency_key) end |
#delete(schema_id:, id:) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Delete render template
73 74 75 |
# File 'lib/aho_sdk/schemas.rb', line 73 def delete(schema_id:, id:) @client.delete("/v1/schemas/#{schema_id}/render_templates/#{id}") end |
#get(schema_id:, id:) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Get render template
59 60 61 |
# File 'lib/aho_sdk/schemas.rb', line 59 def get(schema_id:, id:) @client.get("/v1/schemas/#{schema_id}/render_templates/#{id}") end |
#list(schema_id:) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
List render templates
41 42 43 44 45 46 47 |
# File 'lib/aho_sdk/schemas.rb', line 41 def list(schema_id:) fetch_page = ->(p) { response = @client.get("/v1/schemas/#{schema_id}/render_templates") Page.new(data: response[:data], meta: response[:meta], fetch_next: fetch_page) } fetch_page.call(1) end |
#update(schema_id:, id:, body: nil, idempotency_key: nil) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Update render template
66 67 68 |
# File 'lib/aho_sdk/schemas.rb', line 66 def update(schema_id:, id:, body: nil, idempotency_key: nil) @client.patch("/v1/schemas/#{schema_id}/render_templates/#{id}", body: body, idempotency_key: idempotency_key) end |
#validate(schema_id:, body: nil, idempotency_key: nil) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Validate template
80 81 82 |
# File 'lib/aho_sdk/schemas.rb', line 80 def validate(schema_id:, body: nil, idempotency_key: nil) @client.post("/v1/schemas/#{schema_id}/render_templates/validate", body: body, idempotency_key: idempotency_key) end |