Class: CreateTemplatePayload

Inherits:
Object
  • Object
show all
Defined in:
lib/apollo_commons_ruby/TemplatesHelper.rb,
lib/apollo_commons_ruby/TemplatesHelper.rb

Instance Method Summary collapse

Constructor Details

#initialize(template_group, language, view, templates, version) ⇒ CreateTemplatePayload

Returns a new instance of CreateTemplatePayload.



57
58
59
60
61
62
63
# File 'lib/apollo_commons_ruby/TemplatesHelper.rb', line 57

def initialize(template_group, language, view, templates, version)
  @template_group = template_group
  @language = language
  @view = view
  @templates = templates
  @version = version
end

Instance Method Details

#to_jsonObject



65
66
67
68
69
70
71
72
73
74
# File 'lib/apollo_commons_ruby/TemplatesHelper.rb', line 65

def to_json
  body = {
      "templateGroup"=> @template_group,
      "language"=> @language,
      "viewType"=> @view,
      "templates"=> @templates,
      "version" => @version
  }
  body.to_json
end