dyspatch_client 5.0.1 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +9 -7
  3. data/docs/CompiledRead.md +4 -2
  4. data/docs/DraftsApi.md +21 -21
  5. data/docs/LocalizationsApi.md +70 -9
  6. data/docs/TemplatesApi.md +6 -6
  7. data/dyspatch_client.gemspec +1 -1
  8. data/lib/dyspatch_client.rb +1 -1
  9. data/lib/dyspatch_client/api/drafts_api.rb +26 -26
  10. data/lib/dyspatch_client/api/localizations_api.rb +102 -15
  11. data/lib/dyspatch_client/api/templates_api.rb +8 -8
  12. data/lib/dyspatch_client/api_client.rb +1 -1
  13. data/lib/dyspatch_client/api_error.rb +1 -1
  14. data/lib/dyspatch_client/configuration.rb +1 -1
  15. data/lib/dyspatch_client/models/api_error.rb +1 -1
  16. data/lib/dyspatch_client/models/compiled_read.rb +12 -2
  17. data/lib/dyspatch_client/models/cursor.rb +1 -1
  18. data/lib/dyspatch_client/models/draft_meta_read.rb +1 -1
  19. data/lib/dyspatch_client/models/draft_read.rb +1 -1
  20. data/lib/dyspatch_client/models/drafts_read.rb +1 -1
  21. data/lib/dyspatch_client/models/inline_object.rb +1 -1
  22. data/lib/dyspatch_client/models/localization_key_read.rb +1 -1
  23. data/lib/dyspatch_client/models/localization_meta_read.rb +1 -1
  24. data/lib/dyspatch_client/models/localization_read.rb +1 -1
  25. data/lib/dyspatch_client/models/template_meta_read.rb +1 -1
  26. data/lib/dyspatch_client/models/template_read.rb +1 -1
  27. data/lib/dyspatch_client/models/templates_read.rb +1 -1
  28. data/lib/dyspatch_client/version.rb +2 -2
  29. data/spec/api/drafts_api_spec.rb +10 -10
  30. data/spec/api/localizations_api_spec.rb +20 -5
  31. data/spec/api/templates_api_spec.rb +3 -3
  32. data/spec/api_client_spec.rb +1 -1
  33. data/spec/configuration_spec.rb +1 -1
  34. data/spec/spec_helper.rb +1 -1
  35. metadata +16 -46
  36. data/LICENSE +0 -202
  37. data/pkg/dyspatch_client-5.0.0.gem +0 -0
  38. data/pkg/dyspatch_client-5.0.1.gem +0 -0
  39. data/spec/integration_spec.rb +0 -41
  40. data/spec/models/api_error_spec.rb +0 -57
  41. data/spec/models/compiled_read_spec.rb +0 -65
  42. data/spec/models/cursor_spec.rb +0 -47
  43. data/spec/models/draft_meta_read_spec.rb +0 -77
  44. data/spec/models/draft_read_spec.rb +0 -83
  45. data/spec/models/drafts_read_spec.rb +0 -47
  46. data/spec/models/inline_object_spec.rb +0 -41
  47. data/spec/models/localization_key_read_spec.rb +0 -47
  48. data/spec/models/localization_meta_read_spec.rb +0 -65
  49. data/spec/models/localization_read_spec.rb +0 -89
  50. data/spec/models/template_meta_read_spec.rb +0 -77
  51. data/spec/models/template_read_spec.rb +0 -83
  52. data/spec/models/templates_read_spec.rb +0 -47
@@ -3,7 +3,7 @@
3
3
 
4
4
  ## Introduction The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response codes to indicate errors. We use standard HTTP authentication and request verbs, and all responses are JSON formatted. See our [Implementation Guide](https://docs.dyspatch.io/development/implementing_dyspatch/) for more details on how to implement Dyspatch. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python) - [C#](https://github.com/getdyspatch/dyspatch-dotnet) - [Go](https://github.com/getdyspatch/dyspatch-golang) - [Ruby](https://github.com/getdyspatch/dyspatch-ruby)
5
5
 
6
- The version of the OpenAPI document: 2020.04
6
+ The version of the OpenAPI document: 2020.11
7
7
  Contact: support@dyspatch.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
@@ -23,7 +23,7 @@ module DyspatchClient
23
23
  # Deletes the localization with the given language ID if it exists
24
24
  # @param draft_id [String] A draft ID
25
25
  # @param language_id [String] A language ID (eg: en-US)
26
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\"
26
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\"
27
27
  # @param [Hash] opts the optional parameters
28
28
  # @return [nil]
29
29
  def delete_localization(draft_id, language_id, accept, opts = {})
@@ -35,7 +35,7 @@ module DyspatchClient
35
35
  # Deletes the localization with the given language ID if it exists
36
36
  # @param draft_id [String] A draft ID
37
37
  # @param language_id [String] A language ID (eg: en-US)
38
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\"
38
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\"
39
39
  # @param [Hash] opts the optional parameters
40
40
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
41
41
  def delete_localization_with_http_info(draft_id, language_id, accept, opts = {})
@@ -96,7 +96,7 @@ module DyspatchClient
96
96
  # Gets a draft object with the matching ID. The \"compiled\" field will contain the template in the default, unlocalized form.
97
97
  # @param draft_id [String] A draft ID
98
98
  # @param target_language [String] The type of templating language to compile as. Should only be used for visual templates.
99
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
99
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
100
100
  # @param [Hash] opts the optional parameters
101
101
  # @return [DraftRead]
102
102
  def get_draft_by_id(draft_id, target_language, accept, opts = {})
@@ -108,7 +108,7 @@ module DyspatchClient
108
108
  # Gets a draft object with the matching ID. The \&quot;compiled\&quot; field will contain the template in the default, unlocalized form.
109
109
  # @param draft_id [String] A draft ID
110
110
  # @param target_language [String] The type of templating language to compile as. Should only be used for visual templates.
111
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
111
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
112
112
  # @param [Hash] opts the optional parameters
113
113
  # @return [Array<(DraftRead, Integer, Hash)>] DraftRead data, response status code and response headers
114
114
  def get_draft_by_id_with_http_info(draft_id, target_language, accept, opts = {})
@@ -124,7 +124,7 @@ module DyspatchClient
124
124
  fail ArgumentError, "Missing the required parameter 'target_language' when calling DraftsApi.get_draft_by_id"
125
125
  end
126
126
  # verify enum value
127
- allowable_values = ["html", "handlebars", "ampscript", "freemarker", "cheetah", "jinja"]
127
+ allowable_values = ["html", "handlebars", "ampscript", "freemarker", "cheetah", "jinja", "liquid"]
128
128
  if @api_client.config.client_side_validation && !allowable_values.include?(target_language)
129
129
  fail ArgumentError, "invalid value for \"target_language\", must be one of #{allowable_values}"
130
130
  end
@@ -142,7 +142,7 @@ module DyspatchClient
142
142
  # header parameters
143
143
  header_params = opts[:header_params] || {}
144
144
  # HTTP header 'Accept' (if needed)
145
- header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.04+json', '*/*'])
145
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.11+json', '*/*'])
146
146
  header_params[:'Accept'] = accept
147
147
 
148
148
  # form parameters
@@ -174,9 +174,9 @@ module DyspatchClient
174
174
  end
175
175
 
176
176
  # Get localization keys
177
- # Returns the list of values that need to be translated for the draft. Set the `Accept` header to `application/vnd.dyspatch.2020.04+json` to get a JSON object, or `text/vnd.dyspatch.2020.04+x-gettext-translation` to get the POT file.
177
+ # Returns the list of values that need to be translated for the draft. Set the `Accept` header to `application/vnd.dyspatch.2020.11+json` to get a JSON object, or `text/vnd.dyspatch.2020.11+x-gettext-translation` to get the POT file.
178
178
  # @param draft_id [String] A draft ID
179
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
179
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
180
180
  # @param [Hash] opts the optional parameters
181
181
  # @return [Array<LocalizationKeyRead>]
182
182
  def get_draft_localization_keys(draft_id, accept, opts = {})
@@ -185,9 +185,9 @@ module DyspatchClient
185
185
  end
186
186
 
187
187
  # Get localization keys
188
- # Returns the list of values that need to be translated for the draft. Set the &#x60;Accept&#x60; header to &#x60;application/vnd.dyspatch.2020.04+json&#x60; to get a JSON object, or &#x60;text/vnd.dyspatch.2020.04+x-gettext-translation&#x60; to get the POT file.
188
+ # Returns the list of values that need to be translated for the draft. Set the &#x60;Accept&#x60; header to &#x60;application/vnd.dyspatch.2020.11+json&#x60; to get a JSON object, or &#x60;text/vnd.dyspatch.2020.11+x-gettext-translation&#x60; to get the POT file.
189
189
  # @param draft_id [String] A draft ID
190
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
190
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
191
191
  # @param [Hash] opts the optional parameters
192
192
  # @return [Array<(Array<LocalizationKeyRead>, Integer, Hash)>] Array<LocalizationKeyRead> data, response status code and response headers
193
193
  def get_draft_localization_keys_with_http_info(draft_id, accept, opts = {})
@@ -211,7 +211,7 @@ module DyspatchClient
211
211
  # header parameters
212
212
  header_params = opts[:header_params] || {}
213
213
  # HTTP header 'Accept' (if needed)
214
- header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.04+json', '*/*'])
214
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.11+json', '*/*'])
215
215
  header_params[:'Accept'] = accept
216
216
 
217
217
  # form parameters
@@ -244,7 +244,7 @@ module DyspatchClient
244
244
 
245
245
  # List Drafts
246
246
  # Returns all drafts for your organization.
247
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
247
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
248
248
  # @param [Hash] opts the optional parameters
249
249
  # @option opts [String] :cursor A cursor value used to retrieve a specific page from a paginated result set.
250
250
  # @option opts [String] :status Filter the list of drafts by a particular status
@@ -256,7 +256,7 @@ module DyspatchClient
256
256
 
257
257
  # List Drafts
258
258
  # Returns all drafts for your organization.
259
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
259
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
260
260
  # @param [Hash] opts the optional parameters
261
261
  # @option opts [String] :cursor A cursor value used to retrieve a specific page from a paginated result set.
262
262
  # @option opts [String] :status Filter the list of drafts by a particular status
@@ -284,7 +284,7 @@ module DyspatchClient
284
284
  # header parameters
285
285
  header_params = opts[:header_params] || {}
286
286
  # HTTP header 'Accept' (if needed)
287
- header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.04+json', '*/*'])
287
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.11+json', '*/*'])
288
288
  header_params[:'Accept'] = accept
289
289
 
290
290
  # form parameters
@@ -318,7 +318,7 @@ module DyspatchClient
318
318
  # Get localizations on a draft
319
319
  # Returns localization metadata for the draft
320
320
  # @param draft_id [String] A draft ID
321
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
321
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
322
322
  # @param [Hash] opts the optional parameters
323
323
  # @return [Array<LocalizationMetaRead>]
324
324
  def get_localization_for_draft(draft_id, accept, opts = {})
@@ -329,7 +329,7 @@ module DyspatchClient
329
329
  # Get localizations on a draft
330
330
  # Returns localization metadata for the draft
331
331
  # @param draft_id [String] A draft ID
332
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
332
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
333
333
  # @param [Hash] opts the optional parameters
334
334
  # @return [Array<(Array<LocalizationMetaRead>, Integer, Hash)>] Array<LocalizationMetaRead> data, response status code and response headers
335
335
  def get_localization_for_draft_with_http_info(draft_id, accept, opts = {})
@@ -353,7 +353,7 @@ module DyspatchClient
353
353
  # header parameters
354
354
  header_params = opts[:header_params] || {}
355
355
  # HTTP header 'Accept' (if needed)
356
- header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.04+json', '*/*'])
356
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.11+json', '*/*'])
357
357
  header_params[:'Accept'] = accept
358
358
 
359
359
  # form parameters
@@ -388,7 +388,7 @@ module DyspatchClient
388
388
  # Inserts a localization or sets the name on an existing localization that already uses the languageId
389
389
  # @param draft_id [String] A draft ID
390
390
  # @param language_id [String] A language ID (eg: en-US)
391
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
391
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
392
392
  # @param inline_object [InlineObject]
393
393
  # @param [Hash] opts the optional parameters
394
394
  # @return [nil]
@@ -401,7 +401,7 @@ module DyspatchClient
401
401
  # Inserts a localization or sets the name on an existing localization that already uses the languageId
402
402
  # @param draft_id [String] A draft ID
403
403
  # @param language_id [String] A language ID (eg: en-US)
404
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
404
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
405
405
  # @param inline_object [InlineObject]
406
406
  # @param [Hash] opts the optional parameters
407
407
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -469,7 +469,7 @@ module DyspatchClient
469
469
  # Completely replaces any existing translations for the given language with those provided in request body. Variables embedded in keys or values are expected to be in the format `%(my_variable)s` and will automatically convert to the correct Dyspatch format depending on the type of template. Accepts key/value pairs in JSON format or in gettext PO file format. For JSON set `Content-Type` header to `application/json`. For gettext PO format set `Content-Type` header to `text/x-gettext-translation`.
470
470
  # @param draft_id [String] A draft ID
471
471
  # @param language_id [String] A language ID (eg: en-US)
472
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
472
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
473
473
  # @param request_body [Hash<String, String>]
474
474
  # @param [Hash] opts the optional parameters
475
475
  # @return [nil]
@@ -482,7 +482,7 @@ module DyspatchClient
482
482
  # Completely replaces any existing translations for the given language with those provided in request body. Variables embedded in keys or values are expected to be in the format &#x60;%(my_variable)s&#x60; and will automatically convert to the correct Dyspatch format depending on the type of template. Accepts key/value pairs in JSON format or in gettext PO file format. For JSON set &#x60;Content-Type&#x60; header to &#x60;application/json&#x60;. For gettext PO format set &#x60;Content-Type&#x60; header to &#x60;text/x-gettext-translation&#x60;.
483
483
  # @param draft_id [String] A draft ID
484
484
  # @param language_id [String] A language ID (eg: en-US)
485
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
485
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
486
486
  # @param request_body [Hash<String, String>]
487
487
  # @param [Hash] opts the optional parameters
488
488
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -515,7 +515,7 @@ module DyspatchClient
515
515
  # header parameters
516
516
  header_params = opts[:header_params] || {}
517
517
  # HTTP header 'Accept' (if needed)
518
- header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.04+json', '*/*'])
518
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.11+json', '*/*'])
519
519
  # HTTP header 'Content-Type'
520
520
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
521
521
  header_params[:'Accept'] = accept
@@ -551,7 +551,7 @@ module DyspatchClient
551
551
  # Submit the draft for approval
552
552
  # Moves the draft into submitted state.
553
553
  # @param draft_id [String] A draft ID
554
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
554
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
555
555
  # @param [Hash] opts the optional parameters
556
556
  # @return [nil]
557
557
  def submit_draft_for_approval(draft_id, accept, opts = {})
@@ -562,7 +562,7 @@ module DyspatchClient
562
562
  # Submit the draft for approval
563
563
  # Moves the draft into submitted state.
564
564
  # @param draft_id [String] A draft ID
565
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
565
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
566
566
  # @param [Hash] opts the optional parameters
567
567
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
568
568
  def submit_draft_for_approval_with_http_info(draft_id, accept, opts = {})
@@ -586,7 +586,7 @@ module DyspatchClient
586
586
  # header parameters
587
587
  header_params = opts[:header_params] || {}
588
588
  # HTTP header 'Accept' (if needed)
589
- header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.04+json', '*/*'])
589
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.11+json', '*/*'])
590
590
  header_params[:'Accept'] = accept
591
591
 
592
592
  # form parameters
@@ -3,7 +3,7 @@
3
3
 
4
4
  ## Introduction The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response codes to indicate errors. We use standard HTTP authentication and request verbs, and all responses are JSON formatted. See our [Implementation Guide](https://docs.dyspatch.io/development/implementing_dyspatch/) for more details on how to implement Dyspatch. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python) - [C#](https://github.com/getdyspatch/dyspatch-dotnet) - [Go](https://github.com/getdyspatch/dyspatch-golang) - [Ruby](https://github.com/getdyspatch/dyspatch-ruby)
5
5
 
6
- The version of the OpenAPI document: 2020.04
6
+ The version of the OpenAPI document: 2020.11
7
7
  Contact: support@dyspatch.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
@@ -19,45 +19,132 @@ module DyspatchClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Get Draft Localization Object by ID
23
+ # Returns a specific localization object of the matching draft with a matching localization ID
24
+ # @param draft_id [String] A draft ID
25
+ # @param localization_id [String] A localization ID
26
+ # @param target_language [String] The type of templating language to compile as. Should only be used for visual templates.
27
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
28
+ # @param [Hash] opts the optional parameters
29
+ # @return [LocalizationRead]
30
+ def get_draft_localization_by_id(draft_id, localization_id, target_language, accept, opts = {})
31
+ data, _status_code, _headers = get_draft_localization_by_id_with_http_info(draft_id, localization_id, target_language, accept, opts)
32
+ data
33
+ end
34
+
35
+ # Get Draft Localization Object by ID
36
+ # Returns a specific localization object of the matching draft with a matching localization ID
37
+ # @param draft_id [String] A draft ID
38
+ # @param localization_id [String] A localization ID
39
+ # @param target_language [String] The type of templating language to compile as. Should only be used for visual templates.
40
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
41
+ # @param [Hash] opts the optional parameters
42
+ # @return [Array<(LocalizationRead, Integer, Hash)>] LocalizationRead data, response status code and response headers
43
+ def get_draft_localization_by_id_with_http_info(draft_id, localization_id, target_language, accept, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: LocalizationsApi.get_draft_localization_by_id ...'
46
+ end
47
+ # verify the required parameter 'draft_id' is set
48
+ if @api_client.config.client_side_validation && draft_id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'draft_id' when calling LocalizationsApi.get_draft_localization_by_id"
50
+ end
51
+ # verify the required parameter 'localization_id' is set
52
+ if @api_client.config.client_side_validation && localization_id.nil?
53
+ fail ArgumentError, "Missing the required parameter 'localization_id' when calling LocalizationsApi.get_draft_localization_by_id"
54
+ end
55
+ # verify the required parameter 'target_language' is set
56
+ if @api_client.config.client_side_validation && target_language.nil?
57
+ fail ArgumentError, "Missing the required parameter 'target_language' when calling LocalizationsApi.get_draft_localization_by_id"
58
+ end
59
+ # verify enum value
60
+ allowable_values = ["html", "handlebars", "ampscript", "freemarker", "cheetah", "jinja", "liquid"]
61
+ if @api_client.config.client_side_validation && !allowable_values.include?(target_language)
62
+ fail ArgumentError, "invalid value for \"target_language\", must be one of #{allowable_values}"
63
+ end
64
+ # verify the required parameter 'accept' is set
65
+ if @api_client.config.client_side_validation && accept.nil?
66
+ fail ArgumentError, "Missing the required parameter 'accept' when calling LocalizationsApi.get_draft_localization_by_id"
67
+ end
68
+ # resource path
69
+ local_var_path = '/localizations/{localizationId}/drafts/{draftId}'.sub('{' + 'draftId' + '}', CGI.escape(draft_id.to_s)).sub('{' + 'localizationId' + '}', CGI.escape(localization_id.to_s))
70
+
71
+ # query parameters
72
+ query_params = opts[:query_params] || {}
73
+ query_params[:'targetLanguage'] = target_language
74
+
75
+ # header parameters
76
+ header_params = opts[:header_params] || {}
77
+ # HTTP header 'Accept' (if needed)
78
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.11+json', '*/*'])
79
+ header_params[:'Accept'] = accept
80
+
81
+ # form parameters
82
+ form_params = opts[:form_params] || {}
83
+
84
+ # http body (model)
85
+ post_body = opts[:body]
86
+
87
+ # return_type
88
+ return_type = opts[:return_type] || 'LocalizationRead'
89
+
90
+ # auth_names
91
+ auth_names = opts[:auth_names] || ['Bearer']
92
+
93
+ new_options = opts.merge(
94
+ :header_params => header_params,
95
+ :query_params => query_params,
96
+ :form_params => form_params,
97
+ :body => post_body,
98
+ :auth_names => auth_names,
99
+ :return_type => return_type
100
+ )
101
+
102
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
103
+ if @api_client.config.debugging
104
+ @api_client.config.logger.debug "API called: LocalizationsApi#get_draft_localization_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
105
+ end
106
+ return data, status_code, headers
107
+ end
108
+
22
109
  # Get Localization Object by ID
23
- # Returns a specific localization object with a matching ID
110
+ # Returns the published content associated with the localization of the matching ID
24
111
  # @param localization_id [String] A localization ID
25
112
  # @param target_language [String] The type of templating language to compile as. Should only be used for visual templates.
26
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
113
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
27
114
  # @param [Hash] opts the optional parameters
28
115
  # @return [LocalizationRead]
29
- def get_localization_by_id(localization_id, target_language, accept, opts = {})
30
- data, _status_code, _headers = get_localization_by_id_with_http_info(localization_id, target_language, accept, opts)
116
+ def get_published_localization_by_id(localization_id, target_language, accept, opts = {})
117
+ data, _status_code, _headers = get_published_localization_by_id_with_http_info(localization_id, target_language, accept, opts)
31
118
  data
32
119
  end
33
120
 
34
121
  # Get Localization Object by ID
35
- # Returns a specific localization object with a matching ID
122
+ # Returns the published content associated with the localization of the matching ID
36
123
  # @param localization_id [String] A localization ID
37
124
  # @param target_language [String] The type of templating language to compile as. Should only be used for visual templates.
38
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
125
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
39
126
  # @param [Hash] opts the optional parameters
40
127
  # @return [Array<(LocalizationRead, Integer, Hash)>] LocalizationRead data, response status code and response headers
41
- def get_localization_by_id_with_http_info(localization_id, target_language, accept, opts = {})
128
+ def get_published_localization_by_id_with_http_info(localization_id, target_language, accept, opts = {})
42
129
  if @api_client.config.debugging
43
- @api_client.config.logger.debug 'Calling API: LocalizationsApi.get_localization_by_id ...'
130
+ @api_client.config.logger.debug 'Calling API: LocalizationsApi.get_published_localization_by_id ...'
44
131
  end
45
132
  # verify the required parameter 'localization_id' is set
46
133
  if @api_client.config.client_side_validation && localization_id.nil?
47
- fail ArgumentError, "Missing the required parameter 'localization_id' when calling LocalizationsApi.get_localization_by_id"
134
+ fail ArgumentError, "Missing the required parameter 'localization_id' when calling LocalizationsApi.get_published_localization_by_id"
48
135
  end
49
136
  # verify the required parameter 'target_language' is set
50
137
  if @api_client.config.client_side_validation && target_language.nil?
51
- fail ArgumentError, "Missing the required parameter 'target_language' when calling LocalizationsApi.get_localization_by_id"
138
+ fail ArgumentError, "Missing the required parameter 'target_language' when calling LocalizationsApi.get_published_localization_by_id"
52
139
  end
53
140
  # verify enum value
54
- allowable_values = ["html", "handlebars", "ampscript", "freemarker", "cheetah", "jinja"]
141
+ allowable_values = ["html", "handlebars", "ampscript", "freemarker", "cheetah", "jinja", "liquid"]
55
142
  if @api_client.config.client_side_validation && !allowable_values.include?(target_language)
56
143
  fail ArgumentError, "invalid value for \"target_language\", must be one of #{allowable_values}"
57
144
  end
58
145
  # verify the required parameter 'accept' is set
59
146
  if @api_client.config.client_side_validation && accept.nil?
60
- fail ArgumentError, "Missing the required parameter 'accept' when calling LocalizationsApi.get_localization_by_id"
147
+ fail ArgumentError, "Missing the required parameter 'accept' when calling LocalizationsApi.get_published_localization_by_id"
61
148
  end
62
149
  # resource path
63
150
  local_var_path = '/localizations/{localizationId}'.sub('{' + 'localizationId' + '}', CGI.escape(localization_id.to_s))
@@ -69,7 +156,7 @@ module DyspatchClient
69
156
  # header parameters
70
157
  header_params = opts[:header_params] || {}
71
158
  # HTTP header 'Accept' (if needed)
72
- header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.04+json', '*/*'])
159
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.11+json', '*/*'])
73
160
  header_params[:'Accept'] = accept
74
161
 
75
162
  # form parameters
@@ -95,7 +182,7 @@ module DyspatchClient
95
182
 
96
183
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
97
184
  if @api_client.config.debugging
98
- @api_client.config.logger.debug "API called: LocalizationsApi#get_localization_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
185
+ @api_client.config.logger.debug "API called: LocalizationsApi#get_published_localization_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
99
186
  end
100
187
  return data, status_code, headers
101
188
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  ## Introduction The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response codes to indicate errors. We use standard HTTP authentication and request verbs, and all responses are JSON formatted. See our [Implementation Guide](https://docs.dyspatch.io/development/implementing_dyspatch/) for more details on how to implement Dyspatch. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python) - [C#](https://github.com/getdyspatch/dyspatch-dotnet) - [Go](https://github.com/getdyspatch/dyspatch-golang) - [Ruby](https://github.com/getdyspatch/dyspatch-ruby)
5
5
 
6
- The version of the OpenAPI document: 2020.04
6
+ The version of the OpenAPI document: 2020.11
7
7
  Contact: support@dyspatch.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
@@ -23,7 +23,7 @@ module DyspatchClient
23
23
  # Gets a template object with the matching ID. If the template has published content the \"compiled\" field will contain the template .
24
24
  # @param template_id [String] A template ID
25
25
  # @param target_language [String] The type of templating language to compile as. Should only be used for visual templates.
26
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
26
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
27
27
  # @param [Hash] opts the optional parameters
28
28
  # @return [TemplateRead]
29
29
  def get_template_by_id(template_id, target_language, accept, opts = {})
@@ -35,7 +35,7 @@ module DyspatchClient
35
35
  # Gets a template object with the matching ID. If the template has published content the \&quot;compiled\&quot; field will contain the template .
36
36
  # @param template_id [String] A template ID
37
37
  # @param target_language [String] The type of templating language to compile as. Should only be used for visual templates.
38
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
38
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
39
39
  # @param [Hash] opts the optional parameters
40
40
  # @return [Array<(TemplateRead, Integer, Hash)>] TemplateRead data, response status code and response headers
41
41
  def get_template_by_id_with_http_info(template_id, target_language, accept, opts = {})
@@ -51,7 +51,7 @@ module DyspatchClient
51
51
  fail ArgumentError, "Missing the required parameter 'target_language' when calling TemplatesApi.get_template_by_id"
52
52
  end
53
53
  # verify enum value
54
- allowable_values = ["html", "handlebars", "ampscript", "freemarker", "cheetah", "jinja"]
54
+ allowable_values = ["html", "handlebars", "ampscript", "freemarker", "cheetah", "jinja", "liquid"]
55
55
  if @api_client.config.client_side_validation && !allowable_values.include?(target_language)
56
56
  fail ArgumentError, "invalid value for \"target_language\", must be one of #{allowable_values}"
57
57
  end
@@ -69,7 +69,7 @@ module DyspatchClient
69
69
  # header parameters
70
70
  header_params = opts[:header_params] || {}
71
71
  # HTTP header 'Accept' (if needed)
72
- header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.04+json', '*/*'])
72
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.11+json', '*/*'])
73
73
  header_params[:'Accept'] = accept
74
74
 
75
75
  # form parameters
@@ -102,7 +102,7 @@ module DyspatchClient
102
102
 
103
103
  # List Templates
104
104
  # Gets a list of Template Metadata objects for all templates. Up to 25 results returned before results are paginated.
105
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
105
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
106
106
  # @param [Hash] opts the optional parameters
107
107
  # @option opts [String] :cursor A cursor value used to retrieve a specific page from a paginated result set.
108
108
  # @return [TemplatesRead]
@@ -113,7 +113,7 @@ module DyspatchClient
113
113
 
114
114
  # List Templates
115
115
  # Gets a list of Template Metadata objects for all templates. Up to 25 results returned before results are paginated.
116
- # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.04\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.04+json\&quot;
116
+ # @param accept [String] A version of the API that should be used for the request. For example, to use version \&quot;2020.11\&quot;, set the value to \&quot;application/vnd.dyspatch.2020.11+json\&quot;
117
117
  # @param [Hash] opts the optional parameters
118
118
  # @option opts [String] :cursor A cursor value used to retrieve a specific page from a paginated result set.
119
119
  # @return [Array<(TemplatesRead, Integer, Hash)>] TemplatesRead data, response status code and response headers
@@ -135,7 +135,7 @@ module DyspatchClient
135
135
  # header parameters
136
136
  header_params = opts[:header_params] || {}
137
137
  # HTTP header 'Accept' (if needed)
138
- header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.04+json', '*/*'])
138
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2020.11+json', '*/*'])
139
139
  header_params[:'Accept'] = accept
140
140
 
141
141
  # form parameters
@@ -3,7 +3,7 @@
3
3
 
4
4
  ## Introduction The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response codes to indicate errors. We use standard HTTP authentication and request verbs, and all responses are JSON formatted. See our [Implementation Guide](https://docs.dyspatch.io/development/implementing_dyspatch/) for more details on how to implement Dyspatch. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python) - [C#](https://github.com/getdyspatch/dyspatch-dotnet) - [Go](https://github.com/getdyspatch/dyspatch-golang) - [Ruby](https://github.com/getdyspatch/dyspatch-ruby)
5
5
 
6
- The version of the OpenAPI document: 2020.04
6
+ The version of the OpenAPI document: 2020.11
7
7
  Contact: support@dyspatch.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1