dyspatch_client 3.0.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/README.md +35 -41
- data/Rakefile +2 -0
- data/docs/APIError.md +13 -2
- data/docs/CompiledRead.md +13 -0
- data/docs/Cursor.md +11 -1
- data/docs/DraftMetaRead.md +15 -0
- data/docs/DraftRead.md +17 -1
- data/docs/DraftsApi.md +140 -133
- data/docs/DraftsRead.md +11 -1
- data/docs/{Body.md → InlineObject.md} +10 -1
- data/docs/LocalizationKeyRead.md +10 -0
- data/docs/LocalizationMetaRead.md +14 -3
- data/docs/LocalizationRead.md +17 -1
- data/docs/LocalizationsApi.md +14 -13
- data/docs/TemplateMetaRead.md +16 -1
- data/docs/TemplateRead.md +17 -1
- data/docs/TemplatesApi.md +40 -36
- data/docs/TemplatesRead.md +11 -1
- data/dyspatch_client.gemspec +5 -11
- data/lib/dyspatch_client.rb +5 -19
- data/lib/dyspatch_client/api/drafts_api.rb +372 -236
- data/lib/dyspatch_client/api/localizations_api.rb +47 -30
- data/lib/dyspatch_client/api/templates_api.rb +98 -64
- data/lib/dyspatch_client/api_client.rb +40 -43
- data/lib/dyspatch_client/api_error.rb +23 -4
- data/lib/dyspatch_client/configuration.rb +48 -9
- data/lib/dyspatch_client/models/api_error.rb +46 -22
- data/lib/dyspatch_client/models/compiled_read.rb +45 -66
- data/lib/dyspatch_client/models/cursor.rb +43 -20
- data/lib/dyspatch_client/models/draft_meta_read.rb +49 -25
- data/lib/dyspatch_client/models/draft_read.rb +49 -25
- data/lib/dyspatch_client/models/drafts_read.rb +41 -17
- data/lib/dyspatch_client/models/{body.rb → inline_object.rb} +40 -17
- data/lib/dyspatch_client/models/localization_key_read.rb +41 -17
- data/lib/dyspatch_client/models/localization_meta_read.rb +53 -39
- data/lib/dyspatch_client/models/localization_read.rb +50 -26
- data/lib/dyspatch_client/models/template_meta_read.rb +48 -24
- data/lib/dyspatch_client/models/template_read.rb +49 -25
- data/lib/dyspatch_client/models/templates_read.rb +41 -17
- data/lib/dyspatch_client/version.rb +5 -5
- data/spec/api/drafts_api_spec.rb +61 -53
- data/spec/api/localizations_api_spec.rb +11 -10
- data/spec/api/templates_api_spec.rb +22 -20
- data/spec/api_client_spec.rb +5 -5
- data/spec/configuration_spec.rb +12 -14
- data/spec/integration_spec.rb +41 -0
- data/spec/models/api_error_spec.rb +6 -6
- data/spec/models/compiled_read_spec.rb +5 -5
- data/spec/models/cursor_spec.rb +5 -5
- data/spec/models/draft_meta_read_spec.rb +5 -5
- data/spec/models/draft_read_spec.rb +5 -5
- data/spec/models/drafts_read_spec.rb +5 -5
- data/spec/models/inline_object_spec.rb +41 -0
- data/spec/models/localization_key_read_spec.rb +5 -5
- data/spec/models/localization_meta_read_spec.rb +6 -12
- data/spec/models/localization_read_spec.rb +5 -5
- data/spec/models/template_meta_read_spec.rb +5 -5
- data/spec/models/template_read_spec.rb +5 -5
- data/spec/models/templates_read_spec.rb +5 -5
- data/spec/spec_helper.rb +4 -4
- metadata +15 -190
- data/docs/CreatedAt.md +0 -7
- data/docs/DraftDescription.md +0 -7
- data/docs/DraftId.md +0 -7
- data/docs/DraftName.md +0 -7
- data/docs/DraftUrl.md +0 -7
- data/docs/LanguageId.md +0 -7
- data/docs/LocalizationId.md +0 -7
- data/docs/LocalizationName.md +0 -7
- data/docs/LocalizationUrl.md +0 -7
- data/docs/TemplateDescription.md +0 -7
- data/docs/TemplateId.md +0 -7
- data/docs/TemplateName.md +0 -7
- data/docs/TemplateUrl.md +0 -7
- data/docs/UpdatedAt.md +0 -7
- data/git_push.sh +0 -55
- data/lib/dyspatch_client/models/created_at.rb +0 -175
- data/lib/dyspatch_client/models/draft_description.rb +0 -175
- data/lib/dyspatch_client/models/draft_id.rb +0 -175
- data/lib/dyspatch_client/models/draft_name.rb +0 -175
- data/lib/dyspatch_client/models/draft_url.rb +0 -175
- data/lib/dyspatch_client/models/language_id.rb +0 -175
- data/lib/dyspatch_client/models/localization_id.rb +0 -175
- data/lib/dyspatch_client/models/localization_name.rb +0 -175
- data/lib/dyspatch_client/models/localization_url.rb +0 -175
- data/lib/dyspatch_client/models/template_description.rb +0 -175
- data/lib/dyspatch_client/models/template_id.rb +0 -175
- data/lib/dyspatch_client/models/template_name.rb +0 -175
- data/lib/dyspatch_client/models/template_url.rb +0 -175
- data/lib/dyspatch_client/models/updated_at.rb +0 -175
- data/spec/models/body_spec.rb +0 -41
- data/spec/models/created_at_spec.rb +0 -35
- data/spec/models/draft_description_spec.rb +0 -35
- data/spec/models/draft_id_spec.rb +0 -35
- data/spec/models/draft_name_spec.rb +0 -35
- data/spec/models/draft_url_spec.rb +0 -35
- data/spec/models/language_id_spec.rb +0 -35
- data/spec/models/localization_id_spec.rb +0 -35
- data/spec/models/localization_name_spec.rb +0 -35
- data/spec/models/localization_url_spec.rb +0 -35
- data/spec/models/template_description_spec.rb +0 -35
- data/spec/models/template_id_spec.rb +0 -35
- data/spec/models/template_name_spec.rb +0 -35
- data/spec/models/template_url_spec.rb +0 -35
- data/spec/models/updated_at_spec.rb +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 506b511bcf51b01de550903e22b0ce4758c7a6a8b1bb3796deaa599d140e5f9d
|
4
|
+
data.tar.gz: d78408ecc189018bdf49924b5708fdbabc42d2687efa8271d355828bf04aafa6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f0b7a4e848cabaaff65d1f0ad7d9d431df3faa38c357e6baf951cddcd5e2c43155969c6c4e12fcd61aeaa89f6a93d820289f7343a77bd854d10d3b378307f59
|
7
|
+
data.tar.gz: 5d687adb4d35a9477fa9a9fe687f7c5433fabcf6be3cf0db92bf9603c7c3f7de848011951f47581dbc298da7ba8c45ad0233fb0638422dafaf6210a9f1a43623
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,17 +1,27 @@
|
|
1
1
|
# Dyspatch Ruby API Client
|
2
2
|
|
3
|
-
# Introduction
|
4
|
-
|
5
|
-
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.
|
6
|
-
|
7
3
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
4
|
|
9
5
|
- API version: 2019.10
|
10
|
-
- Package version:
|
6
|
+
- Package version: 4.0.0
|
11
7
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
8
|
|
13
9
|
For more information, please visit [https://docs.dyspatch.io](https://docs.dyspatch.io)
|
14
10
|
|
11
|
+
# Introduction
|
12
|
+
|
13
|
+
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.
|
14
|
+
|
15
|
+
## API Client Libraries
|
16
|
+
Dyspatch provides API Clients for popular languages and web frameworks.
|
17
|
+
|
18
|
+
- [Java](https://github.com/getdyspatch/dyspatch-java)
|
19
|
+
- [Javascript](https://github.com/getdyspatch/dyspatch-javascript)
|
20
|
+
- [Python](https://github.com/getdyspatch/dyspatch-python)
|
21
|
+
- [C#](https://github.com/getdyspatch/dyspatch-dotnet)
|
22
|
+
- [Go](https://github.com/getdyspatch/dyspatch-golang)
|
23
|
+
- [Ruby](https://github.com/getdyspatch/dyspatch-ruby)
|
24
|
+
|
15
25
|
## Installation
|
16
26
|
|
17
27
|
### RubyGems
|
@@ -60,6 +70,7 @@ ruby -Ilib script.rb
|
|
60
70
|
## Getting Started
|
61
71
|
|
62
72
|
Please follow the [installation](#installation) procedure and then run the following code:
|
73
|
+
|
63
74
|
```ruby
|
64
75
|
# Load the gem
|
65
76
|
require 'dyspatch_client'
|
@@ -68,22 +79,20 @@ require 'dyspatch_client'
|
|
68
79
|
DyspatchClient.configure do |config|
|
69
80
|
# Configure API key authorization: Bearer
|
70
81
|
config.api_key['Authorization'] = 'YOUR API KEY'
|
71
|
-
|
82
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
83
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
72
84
|
end
|
73
85
|
|
74
86
|
api_instance = DyspatchClient::DraftsApi.new
|
75
|
-
|
76
87
|
draft_id = 'draft_id_example' # String | A draft ID
|
77
|
-
|
78
|
-
|
79
|
-
|
88
|
+
language_id = 'language_id_example' # String | A language ID (eg: en-US)
|
89
|
+
accept = 'accept_example' # String | A version of the API that should be used for the request. For example, to use version \"2019.10\", set the value to \"application/vnd.dyspatch.2019.10+json\"
|
80
90
|
|
81
91
|
begin
|
82
|
-
#
|
83
|
-
|
84
|
-
p result
|
92
|
+
#Remove a localization
|
93
|
+
api_instance.delete_localization(draft_id, language_id, accept)
|
85
94
|
rescue DyspatchClient::ApiError => e
|
86
|
-
puts "Exception when calling DraftsApi->
|
95
|
+
puts "Exception when calling DraftsApi->delete_localization: #{e}"
|
87
96
|
end
|
88
97
|
|
89
98
|
```
|
@@ -94,48 +103,34 @@ All URIs are relative to *https://api.dyspatch.io*
|
|
94
103
|
|
95
104
|
Class | Method | HTTP request | Description
|
96
105
|
------------ | ------------- | ------------- | -------------
|
97
|
-
*DyspatchClient::DraftsApi* | [**
|
98
|
-
*DyspatchClient::DraftsApi* | [**
|
99
|
-
*DyspatchClient::DraftsApi* | [**
|
100
|
-
*DyspatchClient::DraftsApi* | [**
|
101
|
-
*DyspatchClient::DraftsApi* | [**
|
102
|
-
*DyspatchClient::DraftsApi* | [**
|
103
|
-
*DyspatchClient::DraftsApi* | [**
|
104
|
-
*DyspatchClient::DraftsApi* | [**
|
105
|
-
*DyspatchClient::LocalizationsApi* | [**
|
106
|
-
*DyspatchClient::TemplatesApi* | [**
|
107
|
-
*DyspatchClient::TemplatesApi* | [**
|
106
|
+
*DyspatchClient::DraftsApi* | [**delete_localization**](docs/DraftsApi.md#delete_localization) | **DELETE** /drafts/{draftId}/localizations/{languageId} | Remove a localization
|
107
|
+
*DyspatchClient::DraftsApi* | [**get_draft_by_id**](docs/DraftsApi.md#get_draft_by_id) | **GET** /drafts/{draftId} | Get Draft by ID
|
108
|
+
*DyspatchClient::DraftsApi* | [**get_draft_localization_keys**](docs/DraftsApi.md#get_draft_localization_keys) | **GET** /drafts/{draftId}/localizationKeys | Get localization keys
|
109
|
+
*DyspatchClient::DraftsApi* | [**get_drafts**](docs/DraftsApi.md#get_drafts) | **GET** /drafts | List Drafts
|
110
|
+
*DyspatchClient::DraftsApi* | [**get_localization_for_draft**](docs/DraftsApi.md#get_localization_for_draft) | **GET** /drafts/{draftId}/localizations | Get localizations on a draft
|
111
|
+
*DyspatchClient::DraftsApi* | [**save_localization**](docs/DraftsApi.md#save_localization) | **PUT** /drafts/{draftId}/localizations/{languageId} | Create or update a localization
|
112
|
+
*DyspatchClient::DraftsApi* | [**set_translation**](docs/DraftsApi.md#set_translation) | **PUT** /drafts/{draftId}/localizations/{languageId}/translations | Set translations for language
|
113
|
+
*DyspatchClient::DraftsApi* | [**submit_draft_for_approval**](docs/DraftsApi.md#submit_draft_for_approval) | **POST** /drafts/{draftId}/publishRequest | Submit the draft for approval
|
114
|
+
*DyspatchClient::LocalizationsApi* | [**get_localization_by_id**](docs/LocalizationsApi.md#get_localization_by_id) | **GET** /localizations/{localizationId} | Get Localization Object by ID
|
115
|
+
*DyspatchClient::TemplatesApi* | [**get_template_by_id**](docs/TemplatesApi.md#get_template_by_id) | **GET** /templates/{templateId} | Get Template by ID
|
116
|
+
*DyspatchClient::TemplatesApi* | [**get_templates**](docs/TemplatesApi.md#get_templates) | **GET** /templates | List Templates
|
108
117
|
|
109
118
|
|
110
119
|
## Documentation for Models
|
111
120
|
|
112
121
|
- [DyspatchClient::APIError](docs/APIError.md)
|
113
|
-
- [DyspatchClient::Body](docs/Body.md)
|
114
122
|
- [DyspatchClient::CompiledRead](docs/CompiledRead.md)
|
115
|
-
- [DyspatchClient::CreatedAt](docs/CreatedAt.md)
|
116
123
|
- [DyspatchClient::Cursor](docs/Cursor.md)
|
117
|
-
- [DyspatchClient::DraftDescription](docs/DraftDescription.md)
|
118
|
-
- [DyspatchClient::DraftId](docs/DraftId.md)
|
119
124
|
- [DyspatchClient::DraftMetaRead](docs/DraftMetaRead.md)
|
120
|
-
- [DyspatchClient::DraftName](docs/DraftName.md)
|
121
125
|
- [DyspatchClient::DraftRead](docs/DraftRead.md)
|
122
|
-
- [DyspatchClient::DraftUrl](docs/DraftUrl.md)
|
123
126
|
- [DyspatchClient::DraftsRead](docs/DraftsRead.md)
|
124
|
-
- [DyspatchClient::
|
125
|
-
- [DyspatchClient::LocalizationId](docs/LocalizationId.md)
|
127
|
+
- [DyspatchClient::InlineObject](docs/InlineObject.md)
|
126
128
|
- [DyspatchClient::LocalizationKeyRead](docs/LocalizationKeyRead.md)
|
127
129
|
- [DyspatchClient::LocalizationMetaRead](docs/LocalizationMetaRead.md)
|
128
|
-
- [DyspatchClient::LocalizationName](docs/LocalizationName.md)
|
129
130
|
- [DyspatchClient::LocalizationRead](docs/LocalizationRead.md)
|
130
|
-
- [DyspatchClient::LocalizationUrl](docs/LocalizationUrl.md)
|
131
|
-
- [DyspatchClient::TemplateDescription](docs/TemplateDescription.md)
|
132
|
-
- [DyspatchClient::TemplateId](docs/TemplateId.md)
|
133
131
|
- [DyspatchClient::TemplateMetaRead](docs/TemplateMetaRead.md)
|
134
|
-
- [DyspatchClient::TemplateName](docs/TemplateName.md)
|
135
132
|
- [DyspatchClient::TemplateRead](docs/TemplateRead.md)
|
136
|
-
- [DyspatchClient::TemplateUrl](docs/TemplateUrl.md)
|
137
133
|
- [DyspatchClient::TemplatesRead](docs/TemplatesRead.md)
|
138
|
-
- [DyspatchClient::UpdatedAt](docs/UpdatedAt.md)
|
139
134
|
|
140
135
|
|
141
136
|
## Documentation for Authorization
|
@@ -146,4 +141,3 @@ Class | Method | HTTP request | Description
|
|
146
141
|
- **Type**: API key
|
147
142
|
- **API key parameter name**: Authorization
|
148
143
|
- **Location**: HTTP header
|
149
|
-
|
data/Rakefile
CHANGED
data/docs/APIError.md
CHANGED
@@ -1,10 +1,21 @@
|
|
1
1
|
# DyspatchClient::APIError
|
2
2
|
|
3
3
|
## Properties
|
4
|
+
|
4
5
|
Name | Type | Description | Notes
|
5
6
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**code** | **String** | Error code: * server_error - Internal server error. * invalid_parameter - Validation error, parameter will contain invalid field and message will contain the reason. * invalid_body - Body could not be parsed, message will contain the reason. * invalid_request - Validation error, the protocol used to make the request was not https. * unauthorized - Credentials were found but permissions were not sufficient. * unauthenticated - Credentials were not found or were not valid. * not_found - The requested resource was not found. * rate_limited - The request was refused because a rate limit was exceeded. There is an account wide rate limit of 3600 requests per-minute, although that is subject to change. The current remaining rate limit can be viewed by checking the X-Ratelimit-Remaining header. | [optional]
|
7
|
+
**code** | **String** | Error code: * server_error - Internal server error. * invalid_parameter - Validation error, parameter will contain invalid field and message will contain the reason. * invalid_body - Body could not be parsed, message will contain the reason. * invalid_request - Validation error, the protocol used to make the request was not https. * unauthorized - Credentials were found but permissions were not sufficient. * unauthenticated - Credentials were not found or were not valid. * not_found - The requested resource was not found. * rate_limited - The request was refused because a rate limit was exceeded. There is an account wide rate limit of 3600 requests per-minute, although that is subject to change. The current remaining rate limit can be viewed by checking the X-Ratelimit-Remaining header. * prohibited_action - The request was refused because an action was not valid for the requested resource. Typically this will happen if you try to make changes to a locked resource. | [optional]
|
7
8
|
**message** | **String** | Human readable error message | [optional]
|
8
|
-
**parameter** | **String** | The invalid parameter, if
|
9
|
+
**parameter** | **String** | The invalid parameter, if 'code' is invalid_parameter | [optional]
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'DyspatchClient'
|
15
|
+
|
16
|
+
instance = DyspatchClient::APIError.new(code: null,
|
17
|
+
message: null,
|
18
|
+
parameter: null)
|
19
|
+
```
|
9
20
|
|
10
21
|
|
data/docs/CompiledRead.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# DyspatchClient::CompiledRead
|
2
2
|
|
3
3
|
## Properties
|
4
|
+
|
4
5
|
Name | Type | Description | Notes
|
5
6
|
------------ | ------------- | ------------- | -------------
|
6
7
|
**sender** | **String** | Sender address | [optional]
|
@@ -9,4 +10,16 @@ Name | Type | Description | Notes
|
|
9
10
|
**html** | **String** | Base64 encoded template HTML body | [optional]
|
10
11
|
**text** | **String** | Base64 encoded template text body | [optional]
|
11
12
|
|
13
|
+
## Code Sample
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'DyspatchClient'
|
17
|
+
|
18
|
+
instance = DyspatchClient::CompiledRead.new(sender: Example,
|
19
|
+
reply_to: Example,
|
20
|
+
subject: null,
|
21
|
+
html: null,
|
22
|
+
text: null)
|
23
|
+
```
|
24
|
+
|
12
25
|
|
data/docs/Cursor.md
CHANGED
@@ -1,9 +1,19 @@
|
|
1
1
|
# DyspatchClient::Cursor
|
2
2
|
|
3
3
|
## Properties
|
4
|
+
|
4
5
|
Name | Type | Description | Notes
|
5
6
|
------------ | ------------- | ------------- | -------------
|
6
7
|
**_next** | **String** | A cursor to fetch the next page of results | [optional]
|
7
|
-
**has_more** | **
|
8
|
+
**has_more** | **Boolean** | Whether there is a next page of results | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'DyspatchClient'
|
14
|
+
|
15
|
+
instance = DyspatchClient::Cursor.new(_next: null,
|
16
|
+
has_more: null)
|
17
|
+
```
|
8
18
|
|
9
19
|
|
data/docs/DraftMetaRead.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# DyspatchClient::DraftMetaRead
|
2
2
|
|
3
3
|
## Properties
|
4
|
+
|
4
5
|
Name | Type | Description | Notes
|
5
6
|
------------ | ------------- | ------------- | -------------
|
6
7
|
**id** | **String** | An opaque, unique identifier for a draft | [optional]
|
@@ -11,4 +12,18 @@ Name | Type | Description | Notes
|
|
11
12
|
**created_at** | **DateTime** | The time of initial creation | [optional]
|
12
13
|
**updated_at** | **DateTime** | The time of last update | [optional]
|
13
14
|
|
15
|
+
## Code Sample
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'DyspatchClient'
|
19
|
+
|
20
|
+
instance = DyspatchClient::DraftMetaRead.new(id: tdft_g3L7Cw6Hp5wU,
|
21
|
+
template_id: tem_g3L7Cw6Hp5wU,
|
22
|
+
name: null,
|
23
|
+
description: null,
|
24
|
+
url: /drafts/tdft_g3L7Cw6Hp5wUaf395LehwK/dft_g3L7Cw6Hp5wU,
|
25
|
+
created_at: null,
|
26
|
+
updated_at: null)
|
27
|
+
```
|
28
|
+
|
14
29
|
|
data/docs/DraftRead.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# DyspatchClient::DraftRead
|
2
2
|
|
3
3
|
## Properties
|
4
|
+
|
4
5
|
Name | Type | Description | Notes
|
5
6
|
------------ | ------------- | ------------- | -------------
|
6
7
|
**id** | **String** | An opaque, unique identifier for a draft | [optional]
|
@@ -10,6 +11,21 @@ Name | Type | Description | Notes
|
|
10
11
|
**compiled** | [**CompiledRead**](CompiledRead.md) | | [optional]
|
11
12
|
**created_at** | **DateTime** | The time of initial creation | [optional]
|
12
13
|
**updated_at** | **DateTime** | The time of last update | [optional]
|
13
|
-
**localizations** | [**Array
|
14
|
+
**localizations** | [**Array<LocalizationMetaRead>**](LocalizationMetaRead.md) | A list of the Template's available localizations | [optional]
|
15
|
+
|
16
|
+
## Code Sample
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'DyspatchClient'
|
20
|
+
|
21
|
+
instance = DyspatchClient::DraftRead.new(id: tdft_g3L7Cw6Hp5wU,
|
22
|
+
template: tem_g3L7Cw6Hp5wU,
|
23
|
+
name: null,
|
24
|
+
url: /drafts/tdft_g3L7Cw6Hp5wUaf395LehwK/dft_g3L7Cw6Hp5wU,
|
25
|
+
compiled: null,
|
26
|
+
created_at: null,
|
27
|
+
updated_at: null,
|
28
|
+
localizations: null)
|
29
|
+
```
|
14
30
|
|
15
31
|
|
data/docs/DraftsApi.md
CHANGED
@@ -4,24 +4,27 @@ All URIs are relative to *https://api.dyspatch.io*
|
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
|
-
[**
|
8
|
-
[**
|
9
|
-
[**
|
10
|
-
[**
|
11
|
-
[**
|
12
|
-
[**
|
13
|
-
[**
|
14
|
-
[**
|
7
|
+
[**delete_localization**](DraftsApi.md#delete_localization) | **DELETE** /drafts/{draftId}/localizations/{languageId} | Remove a localization
|
8
|
+
[**get_draft_by_id**](DraftsApi.md#get_draft_by_id) | **GET** /drafts/{draftId} | Get Draft by ID
|
9
|
+
[**get_draft_localization_keys**](DraftsApi.md#get_draft_localization_keys) | **GET** /drafts/{draftId}/localizationKeys | Get localization keys
|
10
|
+
[**get_drafts**](DraftsApi.md#get_drafts) | **GET** /drafts | List Drafts
|
11
|
+
[**get_localization_for_draft**](DraftsApi.md#get_localization_for_draft) | **GET** /drafts/{draftId}/localizations | Get localizations on a draft
|
12
|
+
[**save_localization**](DraftsApi.md#save_localization) | **PUT** /drafts/{draftId}/localizations/{languageId} | Create or update a localization
|
13
|
+
[**set_translation**](DraftsApi.md#set_translation) | **PUT** /drafts/{draftId}/localizations/{languageId}/translations | Set translations for language
|
14
|
+
[**submit_draft_for_approval**](DraftsApi.md#submit_draft_for_approval) | **POST** /drafts/{draftId}/publishRequest | Submit the draft for approval
|
15
15
|
|
16
16
|
|
17
|
-
# **drafts_draft_id_get**
|
18
|
-
> DraftRead drafts_draft_id_get(draft_id, target_language)
|
19
17
|
|
20
|
-
|
18
|
+
## delete_localization
|
19
|
+
|
20
|
+
> delete_localization(draft_id, language_id, accept)
|
21
|
+
|
22
|
+
Remove a localization
|
21
23
|
|
22
|
-
|
24
|
+
Deletes the localization with the given language ID if it exists
|
23
25
|
|
24
26
|
### Example
|
27
|
+
|
25
28
|
```ruby
|
26
29
|
# load the gem
|
27
30
|
require 'dyspatch_client'
|
@@ -34,31 +37,30 @@ DyspatchClient.configure do |config|
|
|
34
37
|
end
|
35
38
|
|
36
39
|
api_instance = DyspatchClient::DraftsApi.new
|
37
|
-
|
38
40
|
draft_id = 'draft_id_example' # String | A draft ID
|
39
|
-
|
40
|
-
|
41
|
-
|
41
|
+
language_id = 'language_id_example' # String | A language ID (eg: en-US)
|
42
|
+
accept = 'accept_example' # String | A version of the API that should be used for the request. For example, to use version \"2019.10\", set the value to \"application/vnd.dyspatch.2019.10+json\"
|
42
43
|
|
43
44
|
begin
|
44
|
-
#
|
45
|
-
|
46
|
-
p result
|
45
|
+
#Remove a localization
|
46
|
+
api_instance.delete_localization(draft_id, language_id, accept)
|
47
47
|
rescue DyspatchClient::ApiError => e
|
48
|
-
puts "Exception when calling DraftsApi->
|
48
|
+
puts "Exception when calling DraftsApi->delete_localization: #{e}"
|
49
49
|
end
|
50
50
|
```
|
51
51
|
|
52
52
|
### Parameters
|
53
53
|
|
54
|
+
|
54
55
|
Name | Type | Description | Notes
|
55
56
|
------------- | ------------- | ------------- | -------------
|
56
57
|
**draft_id** | **String**| A draft ID |
|
57
|
-
**
|
58
|
+
**language_id** | **String**| A language ID (eg: en-US) |
|
59
|
+
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2019.10\", set the value to \"application/vnd.dyspatch.2019.10+json\" |
|
58
60
|
|
59
61
|
### Return type
|
60
62
|
|
61
|
-
|
63
|
+
nil (empty response body)
|
62
64
|
|
63
65
|
### Authorization
|
64
66
|
|
@@ -66,19 +68,20 @@ Name | Type | Description | Notes
|
|
66
68
|
|
67
69
|
### HTTP request headers
|
68
70
|
|
69
|
-
|
70
|
-
|
71
|
+
- **Content-Type**: Not defined
|
72
|
+
- **Accept**: Not defined
|
71
73
|
|
72
74
|
|
75
|
+
## get_draft_by_id
|
73
76
|
|
74
|
-
|
75
|
-
> Array<LocalizationKeyRead> drafts_draft_id_localization_keys_get(draft_id, , opts)
|
77
|
+
> DraftRead get_draft_by_id(draft_id, target_language, accept)
|
76
78
|
|
77
|
-
Get
|
79
|
+
Get Draft by ID
|
78
80
|
|
79
|
-
|
81
|
+
Gets a draft object with the matching ID. The \"compiled\" field will contain the template in the default, unlocalized form.
|
80
82
|
|
81
83
|
### Example
|
84
|
+
|
82
85
|
```ruby
|
83
86
|
# load the gem
|
84
87
|
require 'dyspatch_client'
|
@@ -91,32 +94,31 @@ DyspatchClient.configure do |config|
|
|
91
94
|
end
|
92
95
|
|
93
96
|
api_instance = DyspatchClient::DraftsApi.new
|
94
|
-
|
95
97
|
draft_id = 'draft_id_example' # String | A draft ID
|
96
|
-
|
97
|
-
|
98
|
-
accept: 'accept_example' # String | A version of the API that should be used for the request. For example, to use version "2019.10", set the value to "application/vnd.dyspatch.2019.10+json".
|
99
|
-
}
|
98
|
+
target_language = 'target_language_example' # String | The type of templating language to compile as. Should only be used for visual templates.
|
99
|
+
accept = 'accept_example' # String | A version of the API that should be used for the request. For example, to use version \"2019.10\", set the value to \"application/vnd.dyspatch.2019.10+json\"
|
100
100
|
|
101
101
|
begin
|
102
|
-
#Get
|
103
|
-
result = api_instance.
|
102
|
+
#Get Draft by ID
|
103
|
+
result = api_instance.get_draft_by_id(draft_id, target_language, accept)
|
104
104
|
p result
|
105
105
|
rescue DyspatchClient::ApiError => e
|
106
|
-
puts "Exception when calling DraftsApi->
|
106
|
+
puts "Exception when calling DraftsApi->get_draft_by_id: #{e}"
|
107
107
|
end
|
108
108
|
```
|
109
109
|
|
110
110
|
### Parameters
|
111
111
|
|
112
|
+
|
112
113
|
Name | Type | Description | Notes
|
113
114
|
------------- | ------------- | ------------- | -------------
|
114
115
|
**draft_id** | **String**| A draft ID |
|
115
|
-
**
|
116
|
+
**target_language** | **String**| The type of templating language to compile as. Should only be used for visual templates. |
|
117
|
+
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2019.10\", set the value to \"application/vnd.dyspatch.2019.10+json\" |
|
116
118
|
|
117
119
|
### Return type
|
118
120
|
|
119
|
-
[**
|
121
|
+
[**DraftRead**](DraftRead.md)
|
120
122
|
|
121
123
|
### Authorization
|
122
124
|
|
@@ -124,19 +126,20 @@ Name | Type | Description | Notes
|
|
124
126
|
|
125
127
|
### HTTP request headers
|
126
128
|
|
127
|
-
|
128
|
-
|
129
|
+
- **Content-Type**: Not defined
|
130
|
+
- **Accept**: application/vnd.dyspatch.2019.10+json, */*
|
129
131
|
|
130
132
|
|
133
|
+
## get_draft_localization_keys
|
131
134
|
|
132
|
-
|
133
|
-
> Array<LocalizationMetaRead> drafts_draft_id_localizations_get(draft_id, )
|
135
|
+
> Array<LocalizationKeyRead> get_draft_localization_keys(draft_id, accept)
|
134
136
|
|
135
|
-
Get
|
137
|
+
Get localization keys
|
136
138
|
|
137
|
-
Returns
|
139
|
+
Returns the list of values that need to be translated for the draft. Set the `Accept` header to `application/vnd.dyspatch.2019.10+json` to get a JSON object, or `text/vnd.dyspatch.2019.10+x-gettext-translation` to get the POT file.
|
138
140
|
|
139
141
|
### Example
|
142
|
+
|
140
143
|
```ruby
|
141
144
|
# load the gem
|
142
145
|
require 'dyspatch_client'
|
@@ -149,28 +152,29 @@ DyspatchClient.configure do |config|
|
|
149
152
|
end
|
150
153
|
|
151
154
|
api_instance = DyspatchClient::DraftsApi.new
|
152
|
-
|
153
155
|
draft_id = 'draft_id_example' # String | A draft ID
|
154
|
-
|
156
|
+
accept = 'accept_example' # String | A version of the API that should be used for the request. For example, to use version \"2019.10\", set the value to \"application/vnd.dyspatch.2019.10+json\"
|
155
157
|
|
156
158
|
begin
|
157
|
-
#Get
|
158
|
-
result = api_instance.
|
159
|
+
#Get localization keys
|
160
|
+
result = api_instance.get_draft_localization_keys(draft_id, accept)
|
159
161
|
p result
|
160
162
|
rescue DyspatchClient::ApiError => e
|
161
|
-
puts "Exception when calling DraftsApi->
|
163
|
+
puts "Exception when calling DraftsApi->get_draft_localization_keys: #{e}"
|
162
164
|
end
|
163
165
|
```
|
164
166
|
|
165
167
|
### Parameters
|
166
168
|
|
169
|
+
|
167
170
|
Name | Type | Description | Notes
|
168
171
|
------------- | ------------- | ------------- | -------------
|
169
172
|
**draft_id** | **String**| A draft ID |
|
173
|
+
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2019.10\", set the value to \"application/vnd.dyspatch.2019.10+json\" |
|
170
174
|
|
171
175
|
### Return type
|
172
176
|
|
173
|
-
[**Array
|
177
|
+
[**Array<LocalizationKeyRead>**](LocalizationKeyRead.md)
|
174
178
|
|
175
179
|
### Authorization
|
176
180
|
|
@@ -178,19 +182,20 @@ Name | Type | Description | Notes
|
|
178
182
|
|
179
183
|
### HTTP request headers
|
180
184
|
|
181
|
-
|
182
|
-
|
185
|
+
- **Content-Type**: Not defined
|
186
|
+
- **Accept**: application/vnd.dyspatch.2019.10+json, text/vnd.dyspatch.2019.10+x-gettext-translation
|
183
187
|
|
184
188
|
|
189
|
+
## get_drafts
|
185
190
|
|
186
|
-
|
187
|
-
> drafts_draft_id_localizations_language_id_delete(draft_id, language_id)
|
191
|
+
> DraftsRead get_drafts(accept, opts)
|
188
192
|
|
189
|
-
|
193
|
+
List Drafts
|
190
194
|
|
191
|
-
|
195
|
+
Returns all drafts for your organization.
|
192
196
|
|
193
197
|
### Example
|
198
|
+
|
194
199
|
```ruby
|
195
200
|
# load the gem
|
196
201
|
require 'dyspatch_client'
|
@@ -203,30 +208,33 @@ DyspatchClient.configure do |config|
|
|
203
208
|
end
|
204
209
|
|
205
210
|
api_instance = DyspatchClient::DraftsApi.new
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
+
accept = 'accept_example' # String | A version of the API that should be used for the request. For example, to use version \"2019.10\", set the value to \"application/vnd.dyspatch.2019.10+json\"
|
212
|
+
opts = {
|
213
|
+
cursor: 'cursor_example', # String | A cursor value used to retrieve a specific page from a paginated result set.
|
214
|
+
status: 'status_example' # String | Filter the list of drafts by a particular status
|
215
|
+
}
|
211
216
|
|
212
217
|
begin
|
213
|
-
#
|
214
|
-
api_instance.
|
218
|
+
#List Drafts
|
219
|
+
result = api_instance.get_drafts(accept, opts)
|
220
|
+
p result
|
215
221
|
rescue DyspatchClient::ApiError => e
|
216
|
-
puts "Exception when calling DraftsApi->
|
222
|
+
puts "Exception when calling DraftsApi->get_drafts: #{e}"
|
217
223
|
end
|
218
224
|
```
|
219
225
|
|
220
226
|
### Parameters
|
221
227
|
|
228
|
+
|
222
229
|
Name | Type | Description | Notes
|
223
230
|
------------- | ------------- | ------------- | -------------
|
224
|
-
**
|
225
|
-
**
|
231
|
+
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2019.10\", set the value to \"application/vnd.dyspatch.2019.10+json\" |
|
232
|
+
**cursor** | **String**| A cursor value used to retrieve a specific page from a paginated result set. | [optional]
|
233
|
+
**status** | **String**| Filter the list of drafts by a particular status | [optional]
|
226
234
|
|
227
235
|
### Return type
|
228
236
|
|
229
|
-
|
237
|
+
[**DraftsRead**](DraftsRead.md)
|
230
238
|
|
231
239
|
### Authorization
|
232
240
|
|
@@ -234,19 +242,20 @@ nil (empty response body)
|
|
234
242
|
|
235
243
|
### HTTP request headers
|
236
244
|
|
237
|
-
|
238
|
-
|
245
|
+
- **Content-Type**: Not defined
|
246
|
+
- **Accept**: application/vnd.dyspatch.2019.10+json, */*
|
239
247
|
|
240
248
|
|
249
|
+
## get_localization_for_draft
|
241
250
|
|
242
|
-
|
243
|
-
> drafts_draft_id_localizations_language_id_put(draft_id, language_idbody)
|
251
|
+
> Array<LocalizationMetaRead> get_localization_for_draft(draft_id, accept)
|
244
252
|
|
245
|
-
|
253
|
+
Get localizations on a draft
|
246
254
|
|
247
|
-
|
255
|
+
Returns localization metadata for the draft
|
248
256
|
|
249
257
|
### Example
|
258
|
+
|
250
259
|
```ruby
|
251
260
|
# load the gem
|
252
261
|
require 'dyspatch_client'
|
@@ -259,33 +268,29 @@ DyspatchClient.configure do |config|
|
|
259
268
|
end
|
260
269
|
|
261
270
|
api_instance = DyspatchClient::DraftsApi.new
|
262
|
-
|
263
271
|
draft_id = 'draft_id_example' # String | A draft ID
|
264
|
-
|
265
|
-
language_id = 'language_id_example' # String | A language ID (eg: en-US)
|
266
|
-
|
267
|
-
body = DyspatchClient::Body.new # Body |
|
268
|
-
|
272
|
+
accept = 'accept_example' # String | A version of the API that should be used for the request. For example, to use version \"2019.10\", set the value to \"application/vnd.dyspatch.2019.10+json\"
|
269
273
|
|
270
274
|
begin
|
271
|
-
#
|
272
|
-
api_instance.
|
275
|
+
#Get localizations on a draft
|
276
|
+
result = api_instance.get_localization_for_draft(draft_id, accept)
|
277
|
+
p result
|
273
278
|
rescue DyspatchClient::ApiError => e
|
274
|
-
puts "Exception when calling DraftsApi->
|
279
|
+
puts "Exception when calling DraftsApi->get_localization_for_draft: #{e}"
|
275
280
|
end
|
276
281
|
```
|
277
282
|
|
278
283
|
### Parameters
|
279
284
|
|
285
|
+
|
280
286
|
Name | Type | Description | Notes
|
281
287
|
------------- | ------------- | ------------- | -------------
|
282
288
|
**draft_id** | **String**| A draft ID |
|
283
|
-
**
|
284
|
-
**body** | [**Body**](Body.md)| |
|
289
|
+
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2019.10\", set the value to \"application/vnd.dyspatch.2019.10+json\" |
|
285
290
|
|
286
291
|
### Return type
|
287
292
|
|
288
|
-
|
293
|
+
[**Array<LocalizationMetaRead>**](LocalizationMetaRead.md)
|
289
294
|
|
290
295
|
### Authorization
|
291
296
|
|
@@ -293,19 +298,20 @@ nil (empty response body)
|
|
293
298
|
|
294
299
|
### HTTP request headers
|
295
300
|
|
296
|
-
|
297
|
-
|
301
|
+
- **Content-Type**: Not defined
|
302
|
+
- **Accept**: application/vnd.dyspatch.2019.10+json
|
298
303
|
|
299
304
|
|
305
|
+
## save_localization
|
300
306
|
|
301
|
-
|
302
|
-
> drafts_draft_id_localizations_language_id_translations_put(draft_id, language_idbody)
|
307
|
+
> save_localization(draft_id, language_id, accept, inline_object)
|
303
308
|
|
304
|
-
|
309
|
+
Create or update a localization
|
305
310
|
|
306
|
-
|
311
|
+
Inserts a localization or sets the name on an existing localization that already uses the languageId
|
307
312
|
|
308
313
|
### Example
|
314
|
+
|
309
315
|
```ruby
|
310
316
|
# load the gem
|
311
317
|
require 'dyspatch_client'
|
@@ -318,29 +324,28 @@ DyspatchClient.configure do |config|
|
|
318
324
|
end
|
319
325
|
|
320
326
|
api_instance = DyspatchClient::DraftsApi.new
|
321
|
-
|
322
327
|
draft_id = 'draft_id_example' # String | A draft ID
|
323
|
-
|
324
328
|
language_id = 'language_id_example' # String | A language ID (eg: en-US)
|
325
|
-
|
326
|
-
|
327
|
-
|
329
|
+
accept = 'accept_example' # String | A version of the API that should be used for the request. For example, to use version \"2019.10\", set the value to \"application/vnd.dyspatch.2019.10+json\"
|
330
|
+
inline_object = DyspatchClient::InlineObject.new # InlineObject |
|
328
331
|
|
329
332
|
begin
|
330
|
-
#
|
331
|
-
api_instance.
|
333
|
+
#Create or update a localization
|
334
|
+
api_instance.save_localization(draft_id, language_id, accept, inline_object)
|
332
335
|
rescue DyspatchClient::ApiError => e
|
333
|
-
puts "Exception when calling DraftsApi->
|
336
|
+
puts "Exception when calling DraftsApi->save_localization: #{e}"
|
334
337
|
end
|
335
338
|
```
|
336
339
|
|
337
340
|
### Parameters
|
338
341
|
|
342
|
+
|
339
343
|
Name | Type | Description | Notes
|
340
344
|
------------- | ------------- | ------------- | -------------
|
341
345
|
**draft_id** | **String**| A draft ID |
|
342
346
|
**language_id** | **String**| A language ID (eg: en-US) |
|
343
|
-
**
|
347
|
+
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2019.10\", set the value to \"application/vnd.dyspatch.2019.10+json\" |
|
348
|
+
**inline_object** | [**InlineObject**](InlineObject.md)| |
|
344
349
|
|
345
350
|
### Return type
|
346
351
|
|
@@ -352,19 +357,20 @@ nil (empty response body)
|
|
352
357
|
|
353
358
|
### HTTP request headers
|
354
359
|
|
355
|
-
|
356
|
-
|
360
|
+
- **Content-Type**: application/json
|
361
|
+
- **Accept**: Not defined
|
357
362
|
|
358
363
|
|
364
|
+
## set_translation
|
359
365
|
|
360
|
-
|
361
|
-
> drafts_draft_id_publish_request_post(draft_id, )
|
366
|
+
> set_translation(draft_id, language_id, accept, request_body)
|
362
367
|
|
363
|
-
|
368
|
+
Set translations for language
|
364
369
|
|
365
|
-
|
370
|
+
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`.
|
366
371
|
|
367
372
|
### Example
|
373
|
+
|
368
374
|
```ruby
|
369
375
|
# load the gem
|
370
376
|
require 'dyspatch_client'
|
@@ -377,23 +383,28 @@ DyspatchClient.configure do |config|
|
|
377
383
|
end
|
378
384
|
|
379
385
|
api_instance = DyspatchClient::DraftsApi.new
|
380
|
-
|
381
386
|
draft_id = 'draft_id_example' # String | A draft ID
|
382
|
-
|
387
|
+
language_id = 'language_id_example' # String | A language ID (eg: en-US)
|
388
|
+
accept = 'accept_example' # String | A version of the API that should be used for the request. For example, to use version \"2019.10\", set the value to \"application/vnd.dyspatch.2019.10+json\"
|
389
|
+
request_body = {'key' => 'request_body_example'} # Hash<String, String> |
|
383
390
|
|
384
391
|
begin
|
385
|
-
#
|
386
|
-
api_instance.
|
392
|
+
#Set translations for language
|
393
|
+
api_instance.set_translation(draft_id, language_id, accept, request_body)
|
387
394
|
rescue DyspatchClient::ApiError => e
|
388
|
-
puts "Exception when calling DraftsApi->
|
395
|
+
puts "Exception when calling DraftsApi->set_translation: #{e}"
|
389
396
|
end
|
390
397
|
```
|
391
398
|
|
392
399
|
### Parameters
|
393
400
|
|
401
|
+
|
394
402
|
Name | Type | Description | Notes
|
395
403
|
------------- | ------------- | ------------- | -------------
|
396
404
|
**draft_id** | **String**| A draft ID |
|
405
|
+
**language_id** | **String**| A language ID (eg: en-US) |
|
406
|
+
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2019.10\", set the value to \"application/vnd.dyspatch.2019.10+json\" |
|
407
|
+
**request_body** | [**Hash<String, String>**](String.md)| |
|
397
408
|
|
398
409
|
### Return type
|
399
410
|
|
@@ -405,19 +416,20 @@ nil (empty response body)
|
|
405
416
|
|
406
417
|
### HTTP request headers
|
407
418
|
|
408
|
-
|
409
|
-
|
419
|
+
- **Content-Type**: application/json
|
420
|
+
- **Accept**: Not defined
|
410
421
|
|
411
422
|
|
423
|
+
## submit_draft_for_approval
|
412
424
|
|
413
|
-
|
414
|
-
> DraftsRead drafts_get(opts)
|
425
|
+
> submit_draft_for_approval(draft_id, accept)
|
415
426
|
|
416
|
-
|
427
|
+
Submit the draft for approval
|
417
428
|
|
418
|
-
|
429
|
+
Moves the draft into submitted state.
|
419
430
|
|
420
431
|
### Example
|
432
|
+
|
421
433
|
```ruby
|
422
434
|
# load the gem
|
423
435
|
require 'dyspatch_client'
|
@@ -430,31 +442,28 @@ DyspatchClient.configure do |config|
|
|
430
442
|
end
|
431
443
|
|
432
444
|
api_instance = DyspatchClient::DraftsApi.new
|
433
|
-
|
434
|
-
|
435
|
-
cursor: 'cursor_example', # String | A cursor value used to retrieve a specific page from a paginated result set.
|
436
|
-
status: 'status_example' # String | Filter the list of drafts by a particular status
|
437
|
-
}
|
445
|
+
draft_id = 'draft_id_example' # String | A draft ID
|
446
|
+
accept = 'accept_example' # String | A version of the API that should be used for the request. For example, to use version \"2019.10\", set the value to \"application/vnd.dyspatch.2019.10+json\"
|
438
447
|
|
439
448
|
begin
|
440
|
-
#
|
441
|
-
|
442
|
-
p result
|
449
|
+
#Submit the draft for approval
|
450
|
+
api_instance.submit_draft_for_approval(draft_id, accept)
|
443
451
|
rescue DyspatchClient::ApiError => e
|
444
|
-
puts "Exception when calling DraftsApi->
|
452
|
+
puts "Exception when calling DraftsApi->submit_draft_for_approval: #{e}"
|
445
453
|
end
|
446
454
|
```
|
447
455
|
|
448
456
|
### Parameters
|
449
457
|
|
458
|
+
|
450
459
|
Name | Type | Description | Notes
|
451
460
|
------------- | ------------- | ------------- | -------------
|
452
|
-
**
|
453
|
-
**
|
461
|
+
**draft_id** | **String**| A draft ID |
|
462
|
+
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2019.10\", set the value to \"application/vnd.dyspatch.2019.10+json\" |
|
454
463
|
|
455
464
|
### Return type
|
456
465
|
|
457
|
-
|
466
|
+
nil (empty response body)
|
458
467
|
|
459
468
|
### Authorization
|
460
469
|
|
@@ -462,8 +471,6 @@ Name | Type | Description | Notes
|
|
462
471
|
|
463
472
|
### HTTP request headers
|
464
473
|
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
474
|
+
- **Content-Type**: Not defined
|
475
|
+
- **Accept**: */*
|
469
476
|
|