ultracart_api 4.0.47.rc → 4.0.50.rc

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b56e3862e653530133f53316374bfe568b508be1397bd342bcb3868d5bd1e2a
4
- data.tar.gz: a1b80bad1c0808acd92f862d5a76d85ce3447ecd56dfb0bbd6a3d3a499889655
3
+ metadata.gz: 20f4107abe5c5c048d1dc72eeb90abe36267fcf46e6a0ee229a61de254aad73f
4
+ data.tar.gz: b0189c7f51337c28dc5a0e6fc1d7490e2b89b3fdbd465e1c05fa5ad651fa1d89
5
5
  SHA512:
6
- metadata.gz: 12c2c978ae72a70c7ac5928d5885b5d932f54884f7c0d6176935f789dac114847c77a201a7f0f8f1f88e290be9e4dac5adc5ffab629779e10680ebc7a9493008
7
- data.tar.gz: 8043d450130625dfe07dc3ee3f33f8e3099d0595c0c17622e7326571cfbfa43a4ebe066978f5d7e972beb205c10fda92eb08e9e8eb5fd4350f8d0d84dca33eec
6
+ metadata.gz: 0cb722ef4e5653b42c999763f81276e56832de9b017ad234f56ccc2e523d1ca32ff82650d2c6f1226541107094af4457f2b6312c532bd6575427f8b892e61767
7
+ data.tar.gz: f94050a8d39e0dcee5b540e9085bc887312fd2320e3ae4be5a6186aff401b8e0b2b2db22ff987d972b762da06309ac30744e4b4b5afb3a7ef9e179a791c7a960
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 4.0.47.rc
10
+ - Package version: 4.0.50.rc
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-4.0.47.rc.gem
27
+ gem install ./ultracart_api-4.0.50.rc.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.47.rc.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.50.rc.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'ultracart_api', '~> 4.0.47.rc'
36
+ gem 'ultracart_api', '~> 4.0.50.rc'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -370,6 +370,7 @@ Class | Method | HTTP request | Description
370
370
  *UltracartClient::StorefrontApi* | [**send_email_test**](docs/StorefrontApi.md#send_email_test) | **POST** /storefront/{storefront_oid}/email/emails/{commseq_email_uuid}/test | Send email test
371
371
  *UltracartClient::StorefrontApi* | [**send_postcard_test**](docs/StorefrontApi.md#send_postcard_test) | **POST** /storefront/{storefront_oid}/email/postcards/{commseq_postcard_uuid}/test | Send postcard test
372
372
  *UltracartClient::StorefrontApi* | [**send_webhook_test**](docs/StorefrontApi.md#send_webhook_test) | **POST** /storefront/{storefront_oid}/email/webhooks/test | Send webhook test
373
+ *UltracartClient::StorefrontApi* | [**sequence_test**](docs/StorefrontApi.md#sequence_test) | **POST** /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/test | Sequence test
373
374
  *UltracartClient::StorefrontApi* | [**start_email_campaign**](docs/StorefrontApi.md#start_email_campaign) | **PUT** /storefront/{storefront_oid}/email/campaigns/{email_campaign_uuid}/start | Start email campaign
374
375
  *UltracartClient::StorefrontApi* | [**subscribe_to_email_list**](docs/StorefrontApi.md#subscribe_to_email_list) | **POST** /storefront/{storefront_oid}/email/lists/{email_list_uuid}/subscribe | Subscribe customers to email list
375
376
  *UltracartClient::StorefrontApi* | [**unfavorite_screen_recording**](docs/StorefrontApi.md#unfavorite_screen_recording) | **DELETE** /storefront/{storefront_oid}/screen_recordings/{screen_recording_uuid}/favorite | Remove favorite flag on screen recording
@@ -569,6 +570,7 @@ Class | Method | HTTP request | Description
569
570
  - [UltracartClient::ConversationAgentAuthResponse](docs/ConversationAgentAuthResponse.md)
570
571
  - [UltracartClient::ConversationEventQueuePosition](docs/ConversationEventQueuePosition.md)
571
572
  - [UltracartClient::ConversationEventRRWeb](docs/ConversationEventRRWeb.md)
573
+ - [UltracartClient::ConversationEventTyping](docs/ConversationEventTyping.md)
572
574
  - [UltracartClient::ConversationMessage](docs/ConversationMessage.md)
573
575
  - [UltracartClient::ConversationMessageTransportStatus](docs/ConversationMessageTransportStatus.md)
574
576
  - [UltracartClient::ConversationMultimediaUploadUrl](docs/ConversationMultimediaUploadUrl.md)
@@ -707,6 +709,8 @@ Class | Method | HTTP request | Description
707
709
  - [UltracartClient::EmailCommseqPostcardsRequest](docs/EmailCommseqPostcardsRequest.md)
708
710
  - [UltracartClient::EmailCommseqPostcardsResponse](docs/EmailCommseqPostcardsResponse.md)
709
711
  - [UltracartClient::EmailCommseqResponse](docs/EmailCommseqResponse.md)
712
+ - [UltracartClient::EmailCommseqSequenceTestRequest](docs/EmailCommseqSequenceTestRequest.md)
713
+ - [UltracartClient::EmailCommseqSequenceTestResponse](docs/EmailCommseqSequenceTestResponse.md)
710
714
  - [UltracartClient::EmailCommseqStat](docs/EmailCommseqStat.md)
711
715
  - [UltracartClient::EmailCommseqStatResponse](docs/EmailCommseqStatResponse.md)
712
716
  - [UltracartClient::EmailCommseqStep](docs/EmailCommseqStep.md)
@@ -1176,6 +1180,9 @@ Not every change is committed to every SDK.
1176
1180
 
1177
1181
  | Version | Date | Comments |
1178
1182
  | --: | :-: | --- |
1183
+ | 4.0.50-RC | 08/03/2022 | conversation summary participants |
1184
+ | 4.0.49-RC | 08/03/2022 | more conversation events |
1185
+ | 4.0.48-RC | 08/02/2022 | storefront communication sequence test method |
1179
1186
  | 4.0.47-RC | 08/01/2022 | conversation event refinement |
1180
1187
  | 4.0.46-RC | 07/29/2022 | conversation development |
1181
1188
  | 4.0.45-RC | 07/28/2022 | conversation bug fixes |
@@ -0,0 +1,22 @@
1
+ # UltracartClient::ConversationEventTyping
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **author_conversation_participant_arn** | **String** | | [optional] |
8
+ | **author_conversation_participant_name** | **String** | | [optional] |
9
+ | **value** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ultracart_api'
15
+
16
+ instance = UltracartClient::ConversationEventTyping.new(
17
+ author_conversation_participant_arn: null,
18
+ author_conversation_participant_name: null,
19
+ value: null
20
+ )
21
+ ```
22
+
@@ -13,6 +13,7 @@
13
13
  | **last_message_dts** | **String** | Last message date/time | [optional] |
14
14
  | **merchant_id** | **String** | | [optional] |
15
15
  | **message_count** | **Integer** | | [optional] |
16
+ | **participants** | [**Array<ConversationParticipant>**](ConversationParticipant.md) | | [optional] |
16
17
  | **start_dts** | **String** | Start of the conversation date/time | [optional] |
17
18
  | **unread_messages** | **Boolean** | | [optional] |
18
19
  | **visible** | **Boolean** | | [optional] |
@@ -32,6 +33,7 @@ instance = UltracartClient::ConversationSummary.new(
32
33
  last_message_dts: null,
33
34
  merchant_id: null,
34
35
  message_count: null,
36
+ participants: null,
35
37
  start_dts: null,
36
38
  unread_messages: null,
37
39
  visible: null
@@ -8,10 +8,12 @@
8
8
  | **event_conversation_closed** | [**ConversationSummary**](ConversationSummary.md) | | [optional] |
9
9
  | **event_new_conversation** | [**ConversationSummary**](ConversationSummary.md) | | [optional] |
10
10
  | **event_new_message** | [**ConversationSummary**](ConversationSummary.md) | | [optional] |
11
+ | **event_participant_update** | [**ConversationSummary**](ConversationSummary.md) | | [optional] |
11
12
  | **event_queue_position** | [**ConversationEventQueuePosition**](ConversationEventQueuePosition.md) | | [optional] |
12
13
  | **event_queue_status_update** | [**ConversationWebchatQueueStatus**](ConversationWebchatQueueStatus.md) | | [optional] |
13
14
  | **event_rrweb** | [**ConversationEventRRWeb**](ConversationEventRRWeb.md) | | [optional] |
14
15
  | **event_type** | **String** | Type of event | [optional] |
16
+ | **event_typing** | [**ConversationEventTyping**](ConversationEventTyping.md) | | [optional] |
15
17
  | **event_updated_message** | [**ConversationMessage**](ConversationMessage.md) | | [optional] |
16
18
  | **message** | [**ConversationMessage**](ConversationMessage.md) | | [optional] |
17
19
  | **type** | **String** | Type of message | [optional] |
@@ -26,10 +28,12 @@ instance = UltracartClient::ConversationWebsocketMessage.new(
26
28
  event_conversation_closed: null,
27
29
  event_new_conversation: null,
28
30
  event_new_message: null,
31
+ event_participant_update: null,
29
32
  event_queue_position: null,
30
33
  event_queue_status_update: null,
31
34
  event_rrweb: null,
32
35
  event_type: null,
36
+ event_typing: null,
33
37
  event_updated_message: null,
34
38
  message: null,
35
39
  type: null
@@ -0,0 +1,32 @@
1
+ # UltracartClient::EmailCommseqSequenceTestRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **cart_id** | **String** | | [optional] |
8
+ | **cart_item_ids** | **Array<String>** | | [optional] |
9
+ | **esp_commseq_uuid** | **String** | | [optional] |
10
+ | **name** | **String** | | [optional] |
11
+ | **order_id** | **String** | | [optional] |
12
+ | **please_review** | **Boolean** | | [optional] |
13
+ | **send_to_email** | **String** | | [optional] |
14
+ | **send_to_logged_in_user** | **Boolean** | | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'ultracart_api'
20
+
21
+ instance = UltracartClient::EmailCommseqSequenceTestRequest.new(
22
+ cart_id: null,
23
+ cart_item_ids: null,
24
+ esp_commseq_uuid: null,
25
+ name: null,
26
+ order_id: null,
27
+ please_review: null,
28
+ send_to_email: null,
29
+ send_to_logged_in_user: null
30
+ )
31
+ ```
32
+
@@ -0,0 +1,24 @@
1
+ # UltracartClient::EmailCommseqSequenceTestResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | [**Error**](Error.md) | | [optional] |
8
+ | **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
9
+ | **success** | **Boolean** | Indicates if API call was successful | [optional] |
10
+ | **warning** | [**Warning**](Warning.md) | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'ultracart_api'
16
+
17
+ instance = UltracartClient::EmailCommseqSequenceTestResponse.new(
18
+ error: null,
19
+ metadata: null,
20
+ success: null,
21
+ warning: null
22
+ )
23
+ ```
24
+
@@ -140,6 +140,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
140
140
  | [**send_email_test**](StorefrontApi.md#send_email_test) | **POST** /storefront/{storefront_oid}/email/emails/{commseq_email_uuid}/test | Send email test |
141
141
  | [**send_postcard_test**](StorefrontApi.md#send_postcard_test) | **POST** /storefront/{storefront_oid}/email/postcards/{commseq_postcard_uuid}/test | Send postcard test |
142
142
  | [**send_webhook_test**](StorefrontApi.md#send_webhook_test) | **POST** /storefront/{storefront_oid}/email/webhooks/test | Send webhook test |
143
+ | [**sequence_test**](StorefrontApi.md#sequence_test) | **POST** /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/test | Sequence test |
143
144
  | [**start_email_campaign**](StorefrontApi.md#start_email_campaign) | **PUT** /storefront/{storefront_oid}/email/campaigns/{email_campaign_uuid}/start | Start email campaign |
144
145
  | [**subscribe_to_email_list**](StorefrontApi.md#subscribe_to_email_list) | **POST** /storefront/{storefront_oid}/email/lists/{email_list_uuid}/subscribe | Subscribe customers to email list |
145
146
  | [**unfavorite_screen_recording**](StorefrontApi.md#unfavorite_screen_recording) | **DELETE** /storefront/{storefront_oid}/screen_recordings/{screen_recording_uuid}/favorite | Remove favorite flag on screen recording |
@@ -9911,6 +9912,79 @@ end
9911
9912
  - **Accept**: application/json
9912
9913
 
9913
9914
 
9915
+ ## sequence_test
9916
+
9917
+ > <EmailCommseqSequenceTestResponse> sequence_test(storefront_oid, commseq_uuid, email_commseq_sequence_test_request)
9918
+
9919
+ Sequence test
9920
+
9921
+ ### Examples
9922
+
9923
+ ```ruby
9924
+ require 'time'
9925
+ require 'ultracart_api'
9926
+ require 'json'
9927
+ require 'yaml'
9928
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
9929
+
9930
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
9931
+ # As such, this might not be the best way to use this object.
9932
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
9933
+
9934
+ api = UltracartClient::StorefrontApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
9935
+ storefront_oid = 56 # Integer |
9936
+ commseq_uuid = 'commseq_uuid_example' # String |
9937
+ email_commseq_sequence_test_request = UltracartClient::EmailCommseqSequenceTestRequest.new # EmailCommseqSequenceTestRequest | Commseq test request
9938
+
9939
+ begin
9940
+ # Sequence test
9941
+ result = api_instance.sequence_test(storefront_oid, commseq_uuid, email_commseq_sequence_test_request)
9942
+ p result
9943
+ rescue UltracartClient::ApiError => e
9944
+ puts "Error when calling StorefrontApi->sequence_test: #{e}"
9945
+ end
9946
+ ```
9947
+
9948
+ #### Using the sequence_test_with_http_info variant
9949
+
9950
+ This returns an Array which contains the response data, status code and headers.
9951
+
9952
+ > <Array(<EmailCommseqSequenceTestResponse>, Integer, Hash)> sequence_test_with_http_info(storefront_oid, commseq_uuid, email_commseq_sequence_test_request)
9953
+
9954
+ ```ruby
9955
+ begin
9956
+ # Sequence test
9957
+ data, status_code, headers = api_instance.sequence_test_with_http_info(storefront_oid, commseq_uuid, email_commseq_sequence_test_request)
9958
+ p status_code # => 2xx
9959
+ p headers # => { ... }
9960
+ p data # => <EmailCommseqSequenceTestResponse>
9961
+ rescue UltracartClient::ApiError => e
9962
+ puts "Error when calling StorefrontApi->sequence_test_with_http_info: #{e}"
9963
+ end
9964
+ ```
9965
+
9966
+ ### Parameters
9967
+
9968
+ | Name | Type | Description | Notes |
9969
+ | ---- | ---- | ----------- | ----- |
9970
+ | **storefront_oid** | **Integer** | | |
9971
+ | **commseq_uuid** | **String** | | |
9972
+ | **email_commseq_sequence_test_request** | [**EmailCommseqSequenceTestRequest**](EmailCommseqSequenceTestRequest.md) | Commseq test request | |
9973
+
9974
+ ### Return type
9975
+
9976
+ [**EmailCommseqSequenceTestResponse**](EmailCommseqSequenceTestResponse.md)
9977
+
9978
+ ### Authorization
9979
+
9980
+ [ultraCartBrowserApiKey](../README.md#ultraCartBrowserApiKey), [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
9981
+
9982
+ ### HTTP request headers
9983
+
9984
+ - **Content-Type**: application/json
9985
+ - **Accept**: application/json
9986
+
9987
+
9914
9988
  ## start_email_campaign
9915
9989
 
9916
9990
  > <BaseResponse> start_email_campaign(storefront_oid, email_campaign_uuid)
@@ -9412,6 +9412,85 @@ module UltracartClient
9412
9412
  return data, status_code, headers
9413
9413
  end
9414
9414
 
9415
+ # Sequence test
9416
+ # @param storefront_oid [Integer]
9417
+ # @param commseq_uuid [String]
9418
+ # @param email_commseq_sequence_test_request [EmailCommseqSequenceTestRequest] Commseq test request
9419
+ # @param [Hash] opts the optional parameters
9420
+ # @return [EmailCommseqSequenceTestResponse]
9421
+ def sequence_test(storefront_oid, commseq_uuid, email_commseq_sequence_test_request, opts = {})
9422
+ data, _status_code, _headers = sequence_test_with_http_info(storefront_oid, commseq_uuid, email_commseq_sequence_test_request, opts)
9423
+ data
9424
+ end
9425
+
9426
+ # Sequence test
9427
+ # @param storefront_oid [Integer]
9428
+ # @param commseq_uuid [String]
9429
+ # @param email_commseq_sequence_test_request [EmailCommseqSequenceTestRequest] Commseq test request
9430
+ # @param [Hash] opts the optional parameters
9431
+ # @return [Array<(EmailCommseqSequenceTestResponse, Integer, Hash)>] EmailCommseqSequenceTestResponse data, response status code and response headers
9432
+ def sequence_test_with_http_info(storefront_oid, commseq_uuid, email_commseq_sequence_test_request, opts = {})
9433
+ if @api_client.config.debugging
9434
+ @api_client.config.logger.debug 'Calling API: StorefrontApi.sequence_test ...'
9435
+ end
9436
+ # verify the required parameter 'storefront_oid' is set
9437
+ if @api_client.config.client_side_validation && storefront_oid.nil?
9438
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling StorefrontApi.sequence_test"
9439
+ end
9440
+ # verify the required parameter 'commseq_uuid' is set
9441
+ if @api_client.config.client_side_validation && commseq_uuid.nil?
9442
+ fail ArgumentError, "Missing the required parameter 'commseq_uuid' when calling StorefrontApi.sequence_test"
9443
+ end
9444
+ # verify the required parameter 'email_commseq_sequence_test_request' is set
9445
+ if @api_client.config.client_side_validation && email_commseq_sequence_test_request.nil?
9446
+ fail ArgumentError, "Missing the required parameter 'email_commseq_sequence_test_request' when calling StorefrontApi.sequence_test"
9447
+ end
9448
+ # resource path
9449
+ local_var_path = '/storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/test'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'commseq_uuid' + '}', CGI.escape(commseq_uuid.to_s))
9450
+
9451
+ # query parameters
9452
+ query_params = opts[:query_params] || {}
9453
+
9454
+ # header parameters
9455
+ header_params = opts[:header_params] || {}
9456
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
9457
+ # HTTP header 'Accept' (if needed)
9458
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
9459
+ # HTTP header 'Content-Type'
9460
+ content_type = @api_client.select_header_content_type(['application/json'])
9461
+ if !content_type.nil?
9462
+ header_params['Content-Type'] = content_type
9463
+ end
9464
+
9465
+ # form parameters
9466
+ form_params = opts[:form_params] || {}
9467
+
9468
+ # http body (model)
9469
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(email_commseq_sequence_test_request)
9470
+
9471
+ # return_type
9472
+ return_type = opts[:debug_return_type] || 'EmailCommseqSequenceTestResponse'
9473
+
9474
+ # auth_names
9475
+ auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
9476
+
9477
+ new_options = opts.merge(
9478
+ :operation => :"StorefrontApi.sequence_test",
9479
+ :header_params => header_params,
9480
+ :query_params => query_params,
9481
+ :form_params => form_params,
9482
+ :body => post_body,
9483
+ :auth_names => auth_names,
9484
+ :return_type => return_type
9485
+ )
9486
+
9487
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
9488
+ if @api_client.config.debugging
9489
+ @api_client.config.logger.debug "API called: StorefrontApi#sequence_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
9490
+ end
9491
+ return data, status_code, headers
9492
+ end
9493
+
9415
9494
  # Start email campaign
9416
9495
  # @param storefront_oid [Integer]
9417
9496
  # @param email_campaign_uuid [String]
@@ -0,0 +1,237 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class ConversationEventTyping
18
+ attr_accessor :author_conversation_participant_arn
19
+
20
+ attr_accessor :author_conversation_participant_name
21
+
22
+ attr_accessor :value
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'author_conversation_participant_arn' => :'author_conversation_participant_arn',
28
+ :'author_conversation_participant_name' => :'author_conversation_participant_name',
29
+ :'value' => :'value'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'author_conversation_participant_arn' => :'String',
42
+ :'author_conversation_participant_name' => :'String',
43
+ :'value' => :'String'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationEventTyping` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationEventTyping`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'author_conversation_participant_arn')
69
+ self.author_conversation_participant_arn = attributes[:'author_conversation_participant_arn']
70
+ end
71
+
72
+ if attributes.key?(:'author_conversation_participant_name')
73
+ self.author_conversation_participant_name = attributes[:'author_conversation_participant_name']
74
+ end
75
+
76
+ if attributes.key?(:'value')
77
+ self.value = attributes[:'value']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ author_conversation_participant_arn == o.author_conversation_participant_arn &&
100
+ author_conversation_participant_name == o.author_conversation_participant_name &&
101
+ value == o.value
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ def hash
113
+ [author_conversation_participant_arn, author_conversation_participant_name, value].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def self.build_from_hash(attributes)
120
+ new.build_from_hash(attributes)
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ self.class.openapi_types.each_pair do |key, type|
130
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
131
+ self.send("#{key}=", nil)
132
+ elsif type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the attribute
134
+ # is documented as an array but the input is not
135
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
136
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
137
+ end
138
+ elsif !attributes[self.class.attribute_map[key]].nil?
139
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
+ end
141
+ end
142
+
143
+ self
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def _deserialize(type, value)
151
+ case type.to_sym
152
+ when :Time
153
+ Time.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value.to_s
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :Boolean
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ # models (e.g. Pet) or oneOf
184
+ klass = UltracartClient.const_get(type)
185
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ # Outputs non-array value in the form of hash
218
+ # For object, use to_hash. Otherwise, just return the value
219
+ # @param [Object] value Any valid value
220
+ # @return [Hash] Returns the value in the form of hash
221
+ def _to_hash(value)
222
+ if value.is_a?(Array)
223
+ value.compact.map { |v| _to_hash(v) }
224
+ elsif value.is_a?(Hash)
225
+ {}.tap do |hash|
226
+ value.each { |k, v| hash[k] = _to_hash(v) }
227
+ end
228
+ elsif value.respond_to? :to_hash
229
+ value.to_hash
230
+ else
231
+ value
232
+ end
233
+ end
234
+
235
+ end
236
+
237
+ end
@@ -34,6 +34,8 @@ module UltracartClient
34
34
 
35
35
  attr_accessor :message_count
36
36
 
37
+ attr_accessor :participants
38
+
37
39
  # Start of the conversation date/time
38
40
  attr_accessor :start_dts
39
41
 
@@ -53,6 +55,7 @@ module UltracartClient
53
55
  :'last_message_dts' => :'last_message_dts',
54
56
  :'merchant_id' => :'merchant_id',
55
57
  :'message_count' => :'message_count',
58
+ :'participants' => :'participants',
56
59
  :'start_dts' => :'start_dts',
57
60
  :'unread_messages' => :'unread_messages',
58
61
  :'visible' => :'visible'
@@ -76,6 +79,7 @@ module UltracartClient
76
79
  :'last_message_dts' => :'String',
77
80
  :'merchant_id' => :'String',
78
81
  :'message_count' => :'Integer',
82
+ :'participants' => :'Array<ConversationParticipant>',
79
83
  :'start_dts' => :'String',
80
84
  :'unread_messages' => :'Boolean',
81
85
  :'visible' => :'Boolean'
@@ -139,6 +143,12 @@ module UltracartClient
139
143
  self.message_count = attributes[:'message_count']
140
144
  end
141
145
 
146
+ if attributes.key?(:'participants')
147
+ if (value = attributes[:'participants']).is_a?(Array)
148
+ self.participants = value
149
+ end
150
+ end
151
+
142
152
  if attributes.key?(:'start_dts')
143
153
  self.start_dts = attributes[:'start_dts']
144
154
  end
@@ -179,6 +189,7 @@ module UltracartClient
179
189
  last_message_dts == o.last_message_dts &&
180
190
  merchant_id == o.merchant_id &&
181
191
  message_count == o.message_count &&
192
+ participants == o.participants &&
182
193
  start_dts == o.start_dts &&
183
194
  unread_messages == o.unread_messages &&
184
195
  visible == o.visible
@@ -193,7 +204,7 @@ module UltracartClient
193
204
  # Calculates hash code according to all attributes.
194
205
  # @return [Integer] Hash code
195
206
  def hash
196
- [closed, conversation_arn, conversation_uuid, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_message_dts, merchant_id, message_count, start_dts, unread_messages, visible].hash
207
+ [closed, conversation_arn, conversation_uuid, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_message_dts, merchant_id, message_count, participants, start_dts, unread_messages, visible].hash
197
208
  end
198
209
 
199
210
  # Builds the object from hash