smooch-api 3.5.0 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -1
  3. data/docs/AttachmentRemove.md +8 -0
  4. data/docs/AttachmentsApi.md +55 -0
  5. data/lib/smooch-api.rb +2 -1
  6. data/lib/smooch-api/api/app_api.rb +1 -1
  7. data/lib/smooch-api/api/app_user_api.rb +1 -1
  8. data/lib/smooch-api/api/attachments_api.rb +61 -1
  9. data/lib/smooch-api/api/conversation_api.rb +1 -1
  10. data/lib/smooch-api/api/integration_api.rb +1 -1
  11. data/lib/smooch-api/api/menu_api.rb +1 -1
  12. data/lib/smooch-api/api/service_account_api.rb +1 -1
  13. data/lib/smooch-api/api/webhook_api.rb +1 -1
  14. data/lib/smooch-api/api_client.rb +1 -1
  15. data/lib/smooch-api/api_error.rb +1 -1
  16. data/lib/smooch-api/configuration.rb +1 -1
  17. data/lib/smooch-api/models/action.rb +1 -1
  18. data/lib/smooch-api/models/app.rb +1 -1
  19. data/lib/smooch-api/models/app_create.rb +1 -1
  20. data/lib/smooch-api/models/app_response.rb +1 -1
  21. data/lib/smooch-api/models/app_settings.rb +1 -1
  22. data/lib/smooch-api/models/app_update.rb +1 -1
  23. data/lib/smooch-api/models/app_user.rb +1 -1
  24. data/lib/smooch-api/models/app_user_business_systems_response.rb +1 -1
  25. data/lib/smooch-api/models/app_user_channels_response.rb +1 -1
  26. data/lib/smooch-api/models/app_user_link.rb +1 -1
  27. data/lib/smooch-api/models/app_user_pre_create.rb +1 -1
  28. data/lib/smooch-api/models/app_user_response.rb +1 -1
  29. data/lib/smooch-api/models/app_user_update.rb +1 -1
  30. data/lib/smooch-api/models/attachment_remove.rb +194 -0
  31. data/lib/smooch-api/models/attachment_response.rb +1 -1
  32. data/lib/smooch-api/models/auth_code_response.rb +1 -1
  33. data/lib/smooch-api/models/business_system_item.rb +1 -1
  34. data/lib/smooch-api/models/channel_entity_item.rb +1 -1
  35. data/lib/smooch-api/models/client.rb +1 -1
  36. data/lib/smooch-api/models/client_info.rb +1 -1
  37. data/lib/smooch-api/models/confirmation.rb +1 -1
  38. data/lib/smooch-api/models/conversation.rb +1 -1
  39. data/lib/smooch-api/models/destination.rb +1 -1
  40. data/lib/smooch-api/models/display_settings.rb +1 -1
  41. data/lib/smooch-api/models/get_messages_response.rb +1 -1
  42. data/lib/smooch-api/models/integration.rb +1 -1
  43. data/lib/smooch-api/models/integration_create.rb +1 -1
  44. data/lib/smooch-api/models/integration_response.rb +1 -1
  45. data/lib/smooch-api/models/integration_update.rb +1 -1
  46. data/lib/smooch-api/models/jwt_response.rb +1 -1
  47. data/lib/smooch-api/models/link_request_response.rb +1 -1
  48. data/lib/smooch-api/models/link_request_response_link_requests.rb +1 -1
  49. data/lib/smooch-api/models/list_apps_response.rb +1 -1
  50. data/lib/smooch-api/models/list_integrations_response.rb +1 -1
  51. data/lib/smooch-api/models/list_secret_keys_response.rb +1 -1
  52. data/lib/smooch-api/models/list_service_accounts_response.rb +1 -1
  53. data/lib/smooch-api/models/list_webhooks_response.rb +1 -1
  54. data/lib/smooch-api/models/menu.rb +1 -1
  55. data/lib/smooch-api/models/menu_item.rb +1 -1
  56. data/lib/smooch-api/models/menu_response.rb +1 -1
  57. data/lib/smooch-api/models/message.rb +1 -1
  58. data/lib/smooch-api/models/message_item.rb +1 -1
  59. data/lib/smooch-api/models/message_post.rb +1 -1
  60. data/lib/smooch-api/models/message_response.rb +1 -1
  61. data/lib/smooch-api/models/secret_key.rb +1 -1
  62. data/lib/smooch-api/models/secret_key_create.rb +1 -1
  63. data/lib/smooch-api/models/secret_key_response.rb +1 -1
  64. data/lib/smooch-api/models/service_account.rb +1 -1
  65. data/lib/smooch-api/models/service_account_create.rb +1 -1
  66. data/lib/smooch-api/models/service_account_response.rb +1 -1
  67. data/lib/smooch-api/models/service_account_update.rb +1 -1
  68. data/lib/smooch-api/models/source.rb +1 -1
  69. data/lib/smooch-api/models/typing_activity_trigger.rb +1 -1
  70. data/lib/smooch-api/models/webhook.rb +1 -1
  71. data/lib/smooch-api/models/webhook_create.rb +1 -1
  72. data/lib/smooch-api/models/webhook_response.rb +1 -1
  73. data/lib/smooch-api/models/webhook_update.rb +1 -1
  74. data/lib/smooch-api/version.rb +2 -2
  75. data/smooch-api.gemspec +1 -1
  76. data/spec/api_client_spec.rb +1 -1
  77. data/spec/configuration_spec.rb +1 -1
  78. data/spec/spec_helper.rb +1 -1
  79. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 967c33e9f69f45db845b0e1f582060e89adbdb9a
4
- data.tar.gz: a1761bf3547891874725fac4e9df91bf3215951f
3
+ metadata.gz: 03640ca04c343a78b673d030d80bba0f93223667
4
+ data.tar.gz: f164b1f8d21d2a9279aef262bb8e201f622da339
5
5
  SHA512:
6
- metadata.gz: 7e61957a1bca2fcb1baa20d64e99074c3b9f9482cabf1a1e80e7f4e5f78e8bea920eb9ec739ef0db22b12706c24afe23374928c25ec1b4cdaba1cfda3ac1ccf8
7
- data.tar.gz: 86751dbfdbfbc181e5a468bc90a68fc3f50a987948a389e758122017fc91155f7f82b6c7409b6e6b4821ea6e6682f284ee383c9456f6b308e7c6d1ff3f54aafc
6
+ metadata.gz: 8ce9619d66e36e7dcfb8f89a42cd1622a884d586ff2ef768d6ce0a5d188f1ec1ee75efa07c3b8efaf931d625dde583b83076b0a55bba6eacbbc3561a518602b4
7
+ data.tar.gz: 8931782314f3ec1f400da29756a86760712f0e419fd6cb6e7d3492a6af187e0e97d9559ea4e47dbc13f51da5680073d7f2d07f035254070539aa62452e773724
data/README.md CHANGED
@@ -16,7 +16,7 @@ gem install smooch-api
16
16
 
17
17
  Add this to the Gemfile:
18
18
 
19
- gem 'smooch-api', '~> 3.5.0'
19
+ gem 'smooch-api', '~> 3.6.0'
20
20
 
21
21
  ## Getting Started
22
22
 
@@ -111,6 +111,7 @@ Class | Method | HTTP request | Description
111
111
  *SmoochApi::AppUserApi* | [**pre_create_app_user**](docs/AppUserApi.md#pre_create_app_user) | **POST** /v1/apps/{appId}/appusers |
112
112
  *SmoochApi::AppUserApi* | [**unlink_app_user**](docs/AppUserApi.md#unlink_app_user) | **DELETE** /v1/apps/{appId}/appusers/{userId}/channels/{channel} |
113
113
  *SmoochApi::AppUserApi* | [**update_app_user**](docs/AppUserApi.md#update_app_user) | **PUT** /v1/apps/{appId}/appusers/{userId} |
114
+ *SmoochApi::AttachmentsApi* | [**remove_attachment**](docs/AttachmentsApi.md#remove_attachment) | **POST** /v1/apps/{appId}/attachments/remove |
114
115
  *SmoochApi::AttachmentsApi* | [**upload_attachment**](docs/AttachmentsApi.md#upload_attachment) | **POST** /v1/apps/{appId}/attachments |
115
116
  *SmoochApi::ConversationApi* | [**delete_message**](docs/ConversationApi.md#delete_message) | **DELETE** /v1/apps/{appId}/appusers/{userId}/messages/{messageId} |
116
117
  *SmoochApi::ConversationApi* | [**delete_messages**](docs/ConversationApi.md#delete_messages) | **DELETE** /v1/apps/{appId}/appusers/{userId}/messages |
@@ -162,6 +163,7 @@ Class | Method | HTTP request | Description
162
163
  - [SmoochApi::AppUserPreCreate](docs/AppUserPreCreate.md)
163
164
  - [SmoochApi::AppUserResponse](docs/AppUserResponse.md)
164
165
  - [SmoochApi::AppUserUpdate](docs/AppUserUpdate.md)
166
+ - [SmoochApi::AttachmentRemove](docs/AttachmentRemove.md)
165
167
  - [SmoochApi::AttachmentResponse](docs/AttachmentResponse.md)
166
168
  - [SmoochApi::AuthCodeResponse](docs/AuthCodeResponse.md)
167
169
  - [SmoochApi::BusinessSystemItem](docs/BusinessSystemItem.md)
@@ -0,0 +1,8 @@
1
+ # SmoochApi::AttachmentRemove
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **media_url** | **String** | The mediaUrl for the message. Required for image/file messages. |
7
+
8
+
@@ -4,9 +4,64 @@ All URIs are relative to *https://api.smooch.io*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
+ [**remove_attachment**](AttachmentsApi.md#remove_attachment) | **POST** /v1/apps/{appId}/attachments/remove |
7
8
  [**upload_attachment**](AttachmentsApi.md#upload_attachment) | **POST** /v1/apps/{appId}/attachments |
8
9
 
9
10
 
11
+ # **remove_attachment**
12
+ > remove_attachment(app_id, attachment_remove_body)
13
+
14
+
15
+
16
+ Remove an attachment uploaded to Smooch.
17
+
18
+ ### Example
19
+ ```ruby
20
+ # load the gem
21
+ require 'smooch-api'
22
+ # setup authorization
23
+ SmoochApi.configure do |config|
24
+ # Configure API key authorization: jwt
25
+ config.api_key['Authorization'] = 'YOUR JWT'
26
+ config.api_key_prefix['Authorization'] = 'Bearer'
27
+ end
28
+
29
+ api_instance = SmoochApi::AttachmentsApi.new
30
+
31
+ app_id = "app_id_example" # String | Identifies the app.
32
+
33
+ attachment_remove_body = SmoochApi::AttachmentRemove.new # AttachmentRemove | Body for a removeAttachment request.
34
+
35
+
36
+ begin
37
+ api_instance.remove_attachment(app_id, attachment_remove_body)
38
+ rescue SmoochApi::ApiError => e
39
+ puts "Exception when calling AttachmentsApi->remove_attachment: #{e}"
40
+ end
41
+ ```
42
+
43
+ ### Parameters
44
+
45
+ Name | Type | Description | Notes
46
+ ------------- | ------------- | ------------- | -------------
47
+ **app_id** | **String**| Identifies the app. |
48
+ **attachment_remove_body** | [**AttachmentRemove**](AttachmentRemove.md)| Body for a removeAttachment request. |
49
+
50
+ ### Return type
51
+
52
+ nil (empty response body)
53
+
54
+ ### Authorization
55
+
56
+ [jwt](../README.md#jwt)
57
+
58
+ ### HTTP request headers
59
+
60
+ - **Content-Type**: application/json
61
+ - **Accept**: application/json
62
+
63
+
64
+
10
65
  # **upload_attachment**
11
66
  > AttachmentResponse upload_attachment(app_id, source, access)
12
67
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -30,6 +30,7 @@ require 'smooch-api/models/app_user_link'
30
30
  require 'smooch-api/models/app_user_pre_create'
31
31
  require 'smooch-api/models/app_user_response'
32
32
  require 'smooch-api/models/app_user_update'
33
+ require 'smooch-api/models/attachment_remove'
33
34
  require 'smooch-api/models/attachment_response'
34
35
  require 'smooch-api/models/auth_code_response'
35
36
  require 'smooch-api/models/business_system_item'
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -20,6 +20,66 @@ module SmoochApi
20
20
  @api_client = api_client
21
21
  end
22
22
 
23
+ #
24
+ # Remove an attachment uploaded to Smooch.
25
+ # @param app_id Identifies the app.
26
+ # @param attachment_remove_body Body for a removeAttachment request.
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [nil]
29
+ def remove_attachment(app_id, attachment_remove_body, opts = {})
30
+ remove_attachment_with_http_info(app_id, attachment_remove_body, opts)
31
+ return nil
32
+ end
33
+
34
+ #
35
+ # Remove an attachment uploaded to Smooch.
36
+ # @param app_id Identifies the app.
37
+ # @param attachment_remove_body Body for a removeAttachment request.
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
40
+ def remove_attachment_with_http_info(app_id, attachment_remove_body, opts = {})
41
+ if @api_client.config.debugging
42
+ @api_client.config.logger.debug "Calling API: AttachmentsApi.remove_attachment ..."
43
+ end
44
+ # verify the required parameter 'app_id' is set
45
+ if @api_client.config.client_side_validation && app_id.nil?
46
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling AttachmentsApi.remove_attachment"
47
+ end
48
+ # verify the required parameter 'attachment_remove_body' is set
49
+ if @api_client.config.client_side_validation && attachment_remove_body.nil?
50
+ fail ArgumentError, "Missing the required parameter 'attachment_remove_body' when calling AttachmentsApi.remove_attachment"
51
+ end
52
+ # resource path
53
+ local_var_path = "/v1/apps/{appId}/attachments/remove".sub('{' + 'appId' + '}', app_id.to_s)
54
+
55
+ # query parameters
56
+ query_params = {}
57
+
58
+ # header parameters
59
+ header_params = {}
60
+ # HTTP header 'Accept' (if needed)
61
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
62
+ # HTTP header 'Content-Type'
63
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
64
+
65
+ # form parameters
66
+ form_params = {}
67
+
68
+ # http body (model)
69
+ post_body = @api_client.object_to_http_body(attachment_remove_body)
70
+ auth_names = ['jwt']
71
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
72
+ :header_params => header_params,
73
+ :query_params => query_params,
74
+ :form_params => form_params,
75
+ :body => post_body,
76
+ :auth_names => auth_names)
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: AttachmentsApi#remove_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+
23
83
  #
24
84
  # Upload an attachment to Smooch to use in future messages.
25
85
  # @param app_id Identifies the app.
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
5
 
6
- OpenAPI spec version: 3.5
6
+ OpenAPI spec version: 3.6
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.2.3-SNAPSHOT
@@ -0,0 +1,194 @@
1
+ =begin
2
+ #Smooch
3
+
4
+ #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
5
+
6
+ OpenAPI spec version: 3.6
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.2.3-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module SmoochApi
16
+
17
+ class AttachmentRemove
18
+ # The mediaUrl for the message. Required for image/file messages.
19
+ attr_accessor :media_url
20
+
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'media_url' => :'mediaUrl'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.swagger_types
31
+ {
32
+ :'media_url' => :'String'
33
+ }
34
+ end
35
+
36
+ # Initializes the object
37
+ # @param [Hash] attributes Model attributes in the form of hash
38
+ def initialize(attributes = {})
39
+ return unless attributes.is_a?(Hash)
40
+
41
+ # convert string to symbol for hash key
42
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
43
+
44
+ if attributes.has_key?(:'mediaUrl')
45
+ self.media_url = attributes[:'mediaUrl']
46
+ end
47
+
48
+ end
49
+
50
+ # Show invalid properties with the reasons. Usually used together with valid?
51
+ # @return Array for valid properies with the reasons
52
+ def list_invalid_properties
53
+ invalid_properties = Array.new
54
+ if @media_url.nil?
55
+ invalid_properties.push("invalid value for 'media_url', media_url cannot be nil.")
56
+ end
57
+
58
+ return invalid_properties
59
+ end
60
+
61
+ # Check to see if the all the properties in the model are valid
62
+ # @return true if the model is valid
63
+ def valid?
64
+ return false if @media_url.nil?
65
+ return true
66
+ end
67
+
68
+ # Checks equality by comparing each attribute.
69
+ # @param [Object] Object to be compared
70
+ def ==(o)
71
+ return true if self.equal?(o)
72
+ self.class == o.class &&
73
+ media_url == o.media_url
74
+ end
75
+
76
+ # @see the `==` method
77
+ # @param [Object] Object to be compared
78
+ def eql?(o)
79
+ self == o
80
+ end
81
+
82
+ # Calculates hash code according to all attributes.
83
+ # @return [Fixnum] Hash code
84
+ def hash
85
+ [media_url].hash
86
+ end
87
+
88
+ # Builds the object from hash
89
+ # @param [Hash] attributes Model attributes in the form of hash
90
+ # @return [Object] Returns the model itself
91
+ def build_from_hash(attributes)
92
+ return nil unless attributes.is_a?(Hash)
93
+ self.class.swagger_types.each_pair do |key, type|
94
+ if type =~ /\AArray<(.*)>/i
95
+ # check to ensure the input is an array given that the the attribute
96
+ # is documented as an array but the input is not
97
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
98
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
99
+ end
100
+ elsif !attributes[self.class.attribute_map[key]].nil?
101
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
102
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
103
+ end
104
+
105
+ self
106
+ end
107
+
108
+ # Deserializes the data based on type
109
+ # @param string type Data type
110
+ # @param string value Value to be deserialized
111
+ # @return [Object] Deserialized data
112
+ def _deserialize(type, value)
113
+ case type.to_sym
114
+ when :DateTime
115
+ DateTime.parse(value)
116
+ when :Date
117
+ Date.parse(value)
118
+ when :String
119
+ value.to_s
120
+ when :Integer
121
+ value.to_i
122
+ when :Float
123
+ value.to_f
124
+ when :BOOLEAN
125
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
126
+ true
127
+ else
128
+ false
129
+ end
130
+ when :Object
131
+ # generic object (usually a Hash), return directly
132
+ value
133
+ when /\AArray<(?<inner_type>.+)>\z/
134
+ inner_type = Regexp.last_match[:inner_type]
135
+ value.map { |v| _deserialize(inner_type, v) }
136
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
137
+ k_type = Regexp.last_match[:k_type]
138
+ v_type = Regexp.last_match[:v_type]
139
+ {}.tap do |hash|
140
+ value.each do |k, v|
141
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
142
+ end
143
+ end
144
+ else # model
145
+ temp_model = SmoochApi.const_get(type).new
146
+ temp_model.build_from_hash(value)
147
+ end
148
+ end
149
+
150
+ # Returns the string representation of the object
151
+ # @return [String] String presentation of the object
152
+ def to_s
153
+ to_hash.to_s
154
+ end
155
+
156
+ # to_body is an alias to to_hash (backward compatibility)
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_body
159
+ to_hash
160
+ end
161
+
162
+ # Returns the object in the form of hash
163
+ # @return [Hash] Returns the object in the form of hash
164
+ def to_hash
165
+ hash = {}
166
+ self.class.attribute_map.each_pair do |attr, param|
167
+ value = self.send(attr)
168
+ next if value.nil?
169
+ hash[param] = _to_hash(value)
170
+ end
171
+ hash
172
+ end
173
+
174
+ # Outputs non-array value in the form of hash
175
+ # For object, use to_hash. Otherwise, just return the value
176
+ # @param [Object] value Any valid value
177
+ # @return [Hash] Returns the value in the form of hash
178
+ def _to_hash(value)
179
+ if value.is_a?(Array)
180
+ value.compact.map{ |v| _to_hash(v) }
181
+ elsif value.is_a?(Hash)
182
+ {}.tap do |hash|
183
+ value.each { |k, v| hash[k] = _to_hash(v) }
184
+ end
185
+ elsif value.respond_to? :to_hash
186
+ value.to_hash
187
+ else
188
+ value
189
+ end
190
+ end
191
+
192
+ end
193
+
194
+ end