Class: CreateTemplatePayload

Inherits:
Object
  • Object
show all
Defined in:
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.



101
102
103
104
105
106
107
# File 'lib/apollo_commons_ruby/TemplatesHelper.rb', line 101

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



109
110
111
112
113
114
115
116
117
118
# File 'lib/apollo_commons_ruby/TemplatesHelper.rb', line 109

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