omnichannel 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +8 -0
  3. data/Gemfile.lock +79 -0
  4. data/README.md +120 -0
  5. data/Rakefile +10 -0
  6. data/config.json +12 -0
  7. data/docs/Channel.md +7 -0
  8. data/docs/DeliveryReportApi.md +58 -0
  9. data/docs/DeliveryReportResponse.md +10 -0
  10. data/docs/DeliveryResult.md +13 -0
  11. data/docs/Err.md +7 -0
  12. data/docs/ErrorItem.md +11 -0
  13. data/docs/ErrorResponse.md +8 -0
  14. data/docs/Message.md +9 -0
  15. data/docs/MessageResult.md +10 -0
  16. data/docs/OmniMessageCreateSuccessResponse.md +10 -0
  17. data/docs/Omnimessage.md +11 -0
  18. data/docs/OmnimessageApi.md +107 -0
  19. data/docs/ResponseErrorCode.md +7 -0
  20. data/docs/ResponseErrorTitle.md +7 -0
  21. data/docs/SMS.md +13 -0
  22. data/docs/Status.md +7 -0
  23. data/docs/Viber.md +14 -0
  24. data/docs/WhatsApp.md +14 -0
  25. data/docs/WhatsAppAudio.md +8 -0
  26. data/docs/WhatsAppDocument.md +9 -0
  27. data/docs/WhatsAppImage.md +9 -0
  28. data/docs/WhatsAppText.md +9 -0
  29. data/git_push.sh +55 -0
  30. data/lib/omnichannel.rb +60 -0
  31. data/lib/omnichannel/api/delivery_report_api.rb +74 -0
  32. data/lib/omnichannel/api/omnimessage_api.rb +126 -0
  33. data/lib/omnichannel/api_client.rb +387 -0
  34. data/lib/omnichannel/api_error.rb +38 -0
  35. data/lib/omnichannel/configuration.rb +251 -0
  36. data/lib/omnichannel/models/channel.rb +39 -0
  37. data/lib/omnichannel/models/delivery_report_response.rb +229 -0
  38. data/lib/omnichannel/models/delivery_result.rb +239 -0
  39. data/lib/omnichannel/models/err.rb +48 -0
  40. data/lib/omnichannel/models/error_item.rb +240 -0
  41. data/lib/omnichannel/models/error_response.rb +198 -0
  42. data/lib/omnichannel/models/message.rb +207 -0
  43. data/lib/omnichannel/models/message_result.rb +226 -0
  44. data/lib/omnichannel/models/omni_message_create_success_response.rb +229 -0
  45. data/lib/omnichannel/models/omnimessage.rb +233 -0
  46. data/lib/omnichannel/models/response_error_code.rb +43 -0
  47. data/lib/omnichannel/models/response_error_title.rb +42 -0
  48. data/lib/omnichannel/models/sms.rb +249 -0
  49. data/lib/omnichannel/models/status.rb +47 -0
  50. data/lib/omnichannel/models/viber.rb +254 -0
  51. data/lib/omnichannel/models/whats_app.rb +250 -0
  52. data/lib/omnichannel/models/whats_app_audio.rb +197 -0
  53. data/lib/omnichannel/models/whats_app_document.rb +207 -0
  54. data/lib/omnichannel/models/whats_app_image.rb +207 -0
  55. data/lib/omnichannel/models/whats_app_text.rb +209 -0
  56. data/lib/omnichannel/version.rb +15 -0
  57. data/lib/openapi_client.rb +61 -0
  58. data/lib/openapi_client/api/delivery_report_api.rb +74 -0
  59. data/lib/openapi_client/api/omnimessage_api.rb +126 -0
  60. data/lib/openapi_client/api_client.rb +387 -0
  61. data/lib/openapi_client/api_error.rb +38 -0
  62. data/lib/openapi_client/configuration.rb +251 -0
  63. data/lib/openapi_client/models/channel.rb +39 -0
  64. data/lib/openapi_client/models/delivery_report_response.rb +229 -0
  65. data/lib/openapi_client/models/delivery_result.rb +239 -0
  66. data/lib/openapi_client/models/err.rb +48 -0
  67. data/lib/openapi_client/models/error_item.rb +240 -0
  68. data/lib/openapi_client/models/error_response.rb +198 -0
  69. data/lib/openapi_client/models/message.rb +221 -0
  70. data/lib/openapi_client/models/message_result.rb +226 -0
  71. data/lib/openapi_client/models/omni_message_create_success_response.rb +229 -0
  72. data/lib/openapi_client/models/omnimessage.rb +233 -0
  73. data/lib/openapi_client/models/response_error_code.rb +43 -0
  74. data/lib/openapi_client/models/response_error_title.rb +42 -0
  75. data/lib/openapi_client/models/sms.rb +228 -0
  76. data/lib/openapi_client/models/status.rb +47 -0
  77. data/lib/openapi_client/models/viber.rb +233 -0
  78. data/lib/openapi_client/models/whats_app.rb +229 -0
  79. data/lib/openapi_client/models/whats_app_audio.rb +197 -0
  80. data/lib/openapi_client/models/whats_app_document.rb +207 -0
  81. data/lib/openapi_client/models/whats_app_image.rb +207 -0
  82. data/lib/openapi_client/models/whats_app_text.rb +209 -0
  83. data/lib/openapi_client/version.rb +15 -0
  84. data/omnichannel.gemspec +45 -0
  85. data/spec/api/delivery_report_api_spec.rb +46 -0
  86. data/spec/api/omnimessage_api_spec.rb +57 -0
  87. data/spec/api_client_spec.rb +226 -0
  88. data/spec/configuration_spec.rb +42 -0
  89. data/spec/models/channel_spec.rb +35 -0
  90. data/spec/models/delivery_report_response_spec.rb +53 -0
  91. data/spec/models/delivery_result_spec.rb +71 -0
  92. data/spec/models/err_spec.rb +35 -0
  93. data/spec/models/error_item_spec.rb +59 -0
  94. data/spec/models/error_response_spec.rb +41 -0
  95. data/spec/models/message_result_spec.rb +53 -0
  96. data/spec/models/message_spec.rb +53 -0
  97. data/spec/models/omni_message_create_success_response_spec.rb +53 -0
  98. data/spec/models/omnimessage_spec.rb +59 -0
  99. data/spec/models/response_error_code_spec.rb +35 -0
  100. data/spec/models/response_error_title_spec.rb +35 -0
  101. data/spec/models/sms_spec.rb +71 -0
  102. data/spec/models/status_spec.rb +35 -0
  103. data/spec/models/viber_spec.rb +77 -0
  104. data/spec/models/whats_app_audio_spec.rb +41 -0
  105. data/spec/models/whats_app_document_spec.rb +47 -0
  106. data/spec/models/whats_app_image_spec.rb +47 -0
  107. data/spec/models/whats_app_spec.rb +77 -0
  108. data/spec/models/whats_app_text_spec.rb +47 -0
  109. data/spec/spec_helper.rb +111 -0
  110. data/templates/README.mustache +114 -0
  111. metadata +358 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: fcb40664af6082c343420b34b6e49529f9281008396b29a093c5bdc7fd2927ef
4
+ data.tar.gz: f232737461d35cbbf36de4a25613ce26a60883806f07fedd021c36cfe598c185
5
+ SHA512:
6
+ metadata.gz: 0fe14171d0add910bae2c8a72f29e86d0a95cb21d10ab7a2d16642222bd5a78cfaef8ff657806678b5520da71d2113908b465c6640d21c8b401dc94df7be5b3d
7
+ data.tar.gz: 0b074b0928c0419c3fdbfa0b4d3426fec6beff41d41bb604a6b19ef04546185aca00108f0d8fc982c9a828bdddff83393783994494945fed385e9dd0fbb9420d
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.0.0'
7
+ gem 'pry-byebug'
8
+ end
@@ -0,0 +1,79 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ omnichannel (1.0.0)
5
+ json (~> 2.1, >= 2.1.0)
6
+ typhoeus (~> 1.0, >= 1.0.1)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ ZenTest (4.11.1)
12
+ addressable (2.5.2)
13
+ public_suffix (>= 2.0.2, < 4.0)
14
+ autotest (4.4.6)
15
+ ZenTest (>= 4.4.1)
16
+ autotest-fsevent (0.2.14)
17
+ sys-uname
18
+ autotest-growl (0.2.16)
19
+ autotest-rails-pure (4.1.2)
20
+ byebug (10.0.2)
21
+ coderay (1.1.2)
22
+ crack (0.4.3)
23
+ safe_yaml (~> 1.0.0)
24
+ diff-lcs (1.3)
25
+ ethon (0.11.0)
26
+ ffi (>= 1.3.0)
27
+ ffi (1.9.25)
28
+ hashdiff (0.3.7)
29
+ json (2.1.0)
30
+ method_source (0.9.0)
31
+ pry (0.11.3)
32
+ coderay (~> 1.1.0)
33
+ method_source (~> 0.9.0)
34
+ pry-byebug (3.6.0)
35
+ byebug (~> 10.0)
36
+ pry (~> 0.10)
37
+ public_suffix (3.0.3)
38
+ rake (12.0.0)
39
+ rspec (3.8.0)
40
+ rspec-core (~> 3.8.0)
41
+ rspec-expectations (~> 3.8.0)
42
+ rspec-mocks (~> 3.8.0)
43
+ rspec-core (3.8.0)
44
+ rspec-support (~> 3.8.0)
45
+ rspec-expectations (3.8.1)
46
+ diff-lcs (>= 1.2.0, < 2.0)
47
+ rspec-support (~> 3.8.0)
48
+ rspec-mocks (3.8.0)
49
+ diff-lcs (>= 1.2.0, < 2.0)
50
+ rspec-support (~> 3.8.0)
51
+ rspec-support (3.8.0)
52
+ safe_yaml (1.0.4)
53
+ sys-uname (1.0.3)
54
+ ffi (>= 1.0.0)
55
+ typhoeus (1.3.0)
56
+ ethon (>= 0.9.0)
57
+ vcr (3.0.3)
58
+ webmock (1.24.6)
59
+ addressable (>= 2.3.6)
60
+ crack (>= 0.3.2)
61
+ hashdiff
62
+
63
+ PLATFORMS
64
+ ruby
65
+
66
+ DEPENDENCIES
67
+ autotest (~> 4.4, >= 4.4.6)
68
+ autotest-fsevent (~> 0.2, >= 0.2.12)
69
+ autotest-growl (~> 0.2, >= 0.2.16)
70
+ autotest-rails-pure (~> 4.1, >= 4.1.2)
71
+ omnichannel!
72
+ pry-byebug
73
+ rake (~> 12.0.0)
74
+ rspec (~> 3.6, >= 3.6.0)
75
+ vcr (~> 3.0, >= 3.0.1)
76
+ webmock (~> 1.24, >= 1.24.3)
77
+
78
+ BUNDLED WITH
79
+ 1.16.1
@@ -0,0 +1,120 @@
1
+ # omnichannel
2
+
3
+ Omnichannel - the Ruby gem for the Omnichannel API
4
+
5
+ ## Installation
6
+
7
+ ### Build a gem
8
+
9
+ To build the Ruby code into a gem:
10
+
11
+ ```shell
12
+ gem build omnichannel.gemspec
13
+ ```
14
+
15
+ Then either install the gem locally:
16
+
17
+ ```shell
18
+ gem install ./omnichannel-1.0.0.gem
19
+ ```
20
+ (for development, run `gem install --dev ./omnichannel-1.0.0.gem` to install the development dependencies)
21
+
22
+ Finally add this to the Gemfile:
23
+
24
+ gem 'omnichannel', '~> 1.0.0'
25
+
26
+ ### Install from Git
27
+
28
+ gem 'omnichannel', :git => 'https://github.com/messente/messente-omnichannel-ruby.git'
29
+
30
+
31
+ ## Getting Started
32
+
33
+ Please follow the [installation](#installation) procedure and then run the following code:
34
+ ```ruby
35
+ require 'omnichannel'
36
+ # setup authorization
37
+ Omnichannel.configure do |config|
38
+ # Configure HTTP basic authorization: basicAuth
39
+ config.username = '<MESSENTE_API_USERNAME>'
40
+ config.password = '<MESSENTE_API_PASSWORD>'
41
+ end
42
+
43
+ api_instance = Omnichannel::OmnimessageApi.new
44
+ omnimessage = Omnichannel::Omnimessage.new
45
+ omnimessage.to = '<phone number in e.164 format>'
46
+ omnimessage.messages = [
47
+ Omnichannel::SMS.new(
48
+ {
49
+ :sender => "<sender name or phone number in e.164 format>",
50
+ :text => "Hello SMS!"
51
+ }
52
+ ),
53
+ Omnichannel::WhatsApp.new(
54
+ {
55
+ :sender => "<sender name or phone number in e.164 format>",
56
+ :text => Omnichannel::WhatsAppText.new(
57
+ {
58
+ :body => "Hello from WhatsApp!",
59
+ :preview_url => false
60
+ }
61
+ )
62
+ }
63
+ ),
64
+ Omnichannel::Viber.new(
65
+ {
66
+ :sender => "<sender name or phone number in e.164 format>",
67
+ :text => "Hello from Viber!"
68
+ }
69
+ )
70
+ ]
71
+
72
+ begin
73
+ result = api_instance.send_omnimessage(omnimessage)
74
+ rescue Omnichannel::ApiError => e
75
+ puts "Exception when calling OmnimessageApi->send_omnimessage: #{e}"
76
+ puts e.response_body
77
+ end
78
+ ```
79
+
80
+ ## Documentation for API Endpoints
81
+
82
+ All URIs are relative to *https://api.messente.com/v1*
83
+
84
+ Class | Method | HTTP request | Description
85
+ ------------ | ------------- | ------------- | -------------
86
+ *Omnichannel::DeliveryReportApi* | [**retrieve_delivery_report**](docs/DeliveryReportApi.md#retrieve_delivery_report) | **GET** /omnimessage/{omnimessage_id}/status | Retrieves the delivery report for the Omnimessage
87
+ *Omnichannel::OmnimessageApi* | [**cancel_scheduled_message**](docs/OmnimessageApi.md#cancel_scheduled_message) | **DELETE** /omnimessage/{omnimessage_id} | Cancels a scheduled Omnimessage
88
+ *Omnichannel::OmnimessageApi* | [**send_omnimessage**](docs/OmnimessageApi.md#send_omnimessage) | **POST** /omnimessage | Sends an Omnimessage
89
+
90
+
91
+ ## Documentation for Models
92
+
93
+ - [Omnichannel::Channel](docs/Channel.md)
94
+ - [Omnichannel::DeliveryReportResponse](docs/DeliveryReportResponse.md)
95
+ - [Omnichannel::DeliveryResult](docs/DeliveryResult.md)
96
+ - [Omnichannel::Err](docs/Err.md)
97
+ - [Omnichannel::ErrorItem](docs/ErrorItem.md)
98
+ - [Omnichannel::ErrorResponse](docs/ErrorResponse.md)
99
+ - [Omnichannel::MessageResult](docs/MessageResult.md)
100
+ - [Omnichannel::OmniMessageCreateSuccessResponse](docs/OmniMessageCreateSuccessResponse.md)
101
+ - [Omnichannel::Omnimessage](docs/Omnimessage.md)
102
+ - [Omnichannel::ResponseErrorCode](docs/ResponseErrorCode.md)
103
+ - [Omnichannel::ResponseErrorTitle](docs/ResponseErrorTitle.md)
104
+ - [Omnichannel::SMS](docs/SMS.md)
105
+ - [Omnichannel::Status](docs/Status.md)
106
+ - [Omnichannel::Viber](docs/Viber.md)
107
+ - [Omnichannel::WhatsApp](docs/WhatsApp.md)
108
+ - [Omnichannel::WhatsAppAudio](docs/WhatsAppAudio.md)
109
+ - [Omnichannel::WhatsAppDocument](docs/WhatsAppDocument.md)
110
+ - [Omnichannel::WhatsAppImage](docs/WhatsAppImage.md)
111
+ - [Omnichannel::WhatsAppText](docs/WhatsAppText.md)
112
+
113
+
114
+ ## Documentation for Authorization
115
+
116
+
117
+ ### basicAuth
118
+
119
+ - **Type**: HTTP basic authentication
120
+
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
@@ -0,0 +1,12 @@
1
+ {
2
+
3
+ "gemAuthor": "Messente",
4
+ "gemAuthorEmail": "messente@messente.com",
5
+ "gemSummary": "Ruby library for Messente Omnichannel API",
6
+ "gemDescription": "This libraries allows sending messages to various channels such as WhatsApp, Viber and SMS with fallback to backup channels in case of failure.",
7
+ "gemLicense": "Apache 2.0",
8
+ "gemVersion": "1.0.0",
9
+ "gemName": "omnichannel",
10
+ "gitUserId": "messente",
11
+ "gitRepoId": "messente-omnichannel-ruby"
12
+ }
@@ -0,0 +1,7 @@
1
+ # Omnichannel::Channel
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
@@ -0,0 +1,58 @@
1
+ # Omnichannel::DeliveryReportApi
2
+
3
+ All URIs are relative to *https://api.messente.com/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**retrieve_delivery_report**](DeliveryReportApi.md#retrieve_delivery_report) | **GET** /omnimessage/{omnimessage_id}/status | Retrieves the delivery report for the Omnimessage
8
+
9
+
10
+ # **retrieve_delivery_report**
11
+ > DeliveryReportResponse retrieve_delivery_report(omnimessage_id)
12
+
13
+ Retrieves the delivery report for the Omnimessage
14
+
15
+ ### Example
16
+ ```ruby
17
+ # load the gem
18
+ require 'omnichannel'
19
+ # setup authorization
20
+ Omnichannel.configure do |config|
21
+ # Configure HTTP basic authorization: basicAuth
22
+ config.username = 'YOUR USERNAME'
23
+ config.password = 'YOUR PASSWORD'
24
+ end
25
+
26
+ api_instance = Omnichannel::DeliveryReportApi.new
27
+ omnimessage_id = 'omnimessage_id_example' # String | UUID of the Omnimessage to for which the delivery report is to be retrieved
28
+
29
+ begin
30
+ #Retrieves the delivery report for the Omnimessage
31
+ result = api_instance.retrieve_delivery_report(omnimessage_id)
32
+ p result
33
+ rescue Omnichannel::ApiError => e
34
+ puts "Exception when calling DeliveryReportApi->retrieve_delivery_report: #{e}"
35
+ end
36
+ ```
37
+
38
+ ### Parameters
39
+
40
+ Name | Type | Description | Notes
41
+ ------------- | ------------- | ------------- | -------------
42
+ **omnimessage_id** | [**String**](.md)| UUID of the Omnimessage to for which the delivery report is to be retrieved |
43
+
44
+ ### Return type
45
+
46
+ [**DeliveryReportResponse**](DeliveryReportResponse.md)
47
+
48
+ ### Authorization
49
+
50
+ [basicAuth](../README.md#basicAuth)
51
+
52
+ ### HTTP request headers
53
+
54
+ - **Content-Type**: Not defined
55
+ - **Accept**: */*
56
+
57
+
58
+
@@ -0,0 +1,10 @@
1
+ # Omnichannel::DeliveryReportResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **statuses** | [**Array&lt;DeliveryResult&gt;**](DeliveryResult.md) | Contains the delivery reports for each channnel, ordered by send order |
7
+ **to** | **String** | Recipient phone number in e.164 format |
8
+ **omnimessage_id** | **String** | Unique identifier for the Omnimessage |
9
+
10
+
@@ -0,0 +1,13 @@
1
+ # Omnichannel::DeliveryResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **status** | [**Status**](Status.md) | | [optional]
7
+ **channel** | [**Channel**](Channel.md) | | [optional]
8
+ **message_id** | **String** | Unique identifier for the message | [optional]
9
+ **error** | **String** | Human-readable description of what went wrong, *null* in case of success or if the messages has not been processed yet | [optional]
10
+ **err** | [**Err**](Err.md) | | [optional]
11
+ **timestamp** | **DateTime** | When this status was received by Omnichannel API | [optional]
12
+
13
+
@@ -0,0 +1,7 @@
1
+ # Omnichannel::Err
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
@@ -0,0 +1,11 @@
1
+ # Omnichannel::ErrorItem
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **title** | [**ResponseErrorTitle**](ResponseErrorTitle.md) | |
7
+ **detail** | **String** | Free form more detailed description of the error. |
8
+ **code** | [**ResponseErrorCode**](ResponseErrorCode.md) | |
9
+ **source** | **String** | Describes which field is causing the issue in the payload, null for non 400 status code responses |
10
+
11
+
@@ -0,0 +1,8 @@
1
+ # Omnichannel::ErrorResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **errors** | [**Array&lt;ErrorItem&gt;**](ErrorItem.md) | |
7
+
8
+
@@ -0,0 +1,9 @@
1
+ # Omnichannel::Message
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **sender** | **String** | Phone number or alphanumeric sender name | [optional]
7
+ **validity** | **Integer** | After how many minutes this channel is considered as failed and the next channel is attempted | [optional]
8
+
9
+
@@ -0,0 +1,10 @@
1
+ # Omnichannel::MessageResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **message_id** | **String** | Unique identifier for the message |
7
+ **channel** | [**Channel**](Channel.md) | |
8
+ **sender** | **String** | Sender that was used for the message |
9
+
10
+
@@ -0,0 +1,10 @@
1
+ # Omnichannel::OmniMessageCreateSuccessResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **messages** | [**Array&lt;MessageResult&gt;**](MessageResult.md) | List of messages that compose the Omnimessage |
7
+ **to** | **String** | Recipient phone number in e.164 format |
8
+ **omnimessage_id** | **String** | Unique identifier for the Omnimessage |
9
+
10
+
@@ -0,0 +1,11 @@
1
+ # Omnichannel::Omnimessage
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **messages** | [**Array&lt;OneOfViberSMSWhatsApp&gt;**](OneOfViberSMSWhatsApp.md) | |
7
+ **to** | **String** | Phone number of the recipient in e.164 format |
8
+ **dlr_url** | **String** | URL where the delivery report will be sent | [optional]
9
+ **time_to_send** | **DateTime** | Optional parameter for sending messages at some specific time in the future. Time must be specified in the 8601 format. If no timezone is specified, then the timezone is assumed to be UTC. Examples: Time specified with timezone: 2018-06-22T09:05:07+00:00 Time specified in UTC: 2018-06-22T09:05:07Z Time specified without timezone: 2018-06-22T09:05 (equivalent to 2018-06-22T09:05+00:00) | [optional]
10
+
11
+
@@ -0,0 +1,107 @@
1
+ # Omnichannel::OmnimessageApi
2
+
3
+ All URIs are relative to *https://api.messente.com/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**cancel_scheduled_message**](OmnimessageApi.md#cancel_scheduled_message) | **DELETE** /omnimessage/{omnimessage_id} | Cancels a scheduled Omnimessage
8
+ [**send_omnimessage**](OmnimessageApi.md#send_omnimessage) | **POST** /omnimessage | Sends an Omnimessage
9
+
10
+
11
+ # **cancel_scheduled_message**
12
+ > cancel_scheduled_message(omnimessage_id)
13
+
14
+ Cancels a scheduled Omnimessage
15
+
16
+ ### Example
17
+ ```ruby
18
+ # load the gem
19
+ require 'omnichannel'
20
+ # setup authorization
21
+ Omnichannel.configure do |config|
22
+ # Configure HTTP basic authorization: basicAuth
23
+ config.username = 'YOUR USERNAME'
24
+ config.password = 'YOUR PASSWORD'
25
+ end
26
+
27
+ api_instance = Omnichannel::OmnimessageApi.new
28
+ omnimessage_id = 'omnimessage_id_example' # String | UUID of the scheduled Omnimessage to be cancelled
29
+
30
+ begin
31
+ #Cancels a scheduled Omnimessage
32
+ api_instance.cancel_scheduled_message(omnimessage_id)
33
+ rescue Omnichannel::ApiError => e
34
+ puts "Exception when calling OmnimessageApi->cancel_scheduled_message: #{e}"
35
+ end
36
+ ```
37
+
38
+ ### Parameters
39
+
40
+ Name | Type | Description | Notes
41
+ ------------- | ------------- | ------------- | -------------
42
+ **omnimessage_id** | [**String**](.md)| UUID of the scheduled Omnimessage to be cancelled |
43
+
44
+ ### Return type
45
+
46
+ nil (empty response body)
47
+
48
+ ### Authorization
49
+
50
+ [basicAuth](../README.md#basicAuth)
51
+
52
+ ### HTTP request headers
53
+
54
+ - **Content-Type**: Not defined
55
+ - **Accept**: application/json
56
+
57
+
58
+
59
+ # **send_omnimessage**
60
+ > OmniMessageCreateSuccessResponse send_omnimessage(omnimessage)
61
+
62
+ Sends an Omnimessage
63
+
64
+ ### Example
65
+ ```ruby
66
+ # load the gem
67
+ require 'omnichannel'
68
+ # setup authorization
69
+ Omnichannel.configure do |config|
70
+ # Configure HTTP basic authorization: basicAuth
71
+ config.username = 'YOUR USERNAME'
72
+ config.password = 'YOUR PASSWORD'
73
+ end
74
+
75
+ api_instance = Omnichannel::OmnimessageApi.new
76
+ omnimessage = Omnichannel::Omnimessage.new # Omnimessage | Omnimessage to be sent
77
+
78
+ begin
79
+ #Sends an Omnimessage
80
+ result = api_instance.send_omnimessage(omnimessage)
81
+ p result
82
+ rescue Omnichannel::ApiError => e
83
+ puts "Exception when calling OmnimessageApi->send_omnimessage: #{e}"
84
+ end
85
+ ```
86
+
87
+ ### Parameters
88
+
89
+ Name | Type | Description | Notes
90
+ ------------- | ------------- | ------------- | -------------
91
+ **omnimessage** | [**Omnimessage**](Omnimessage.md)| Omnimessage to be sent |
92
+
93
+ ### Return type
94
+
95
+ [**OmniMessageCreateSuccessResponse**](OmniMessageCreateSuccessResponse.md)
96
+
97
+ ### Authorization
98
+
99
+ [basicAuth](../README.md#basicAuth)
100
+
101
+ ### HTTP request headers
102
+
103
+ - **Content-Type**: application/json
104
+ - **Accept**: application/json
105
+
106
+
107
+