ultracart_api 3.10.80 → 3.10.81

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2b6a4f696143d6c4b507ba947b4546b37a161906814a0907c6eebf351ff1f71d
4
- data.tar.gz: 19662799cfbf6a3850df1d3493a296d9ed11538d82e1dbb6e41d75c3980b6423
3
+ metadata.gz: 06c357e935ee1e8ba7df4774cf3bb451d1bb312f791d215d785a0379ad5181ba
4
+ data.tar.gz: 6b6c63d5b5c705abe450b15d07ee25259091468ae3b6373437709868b4a3fa4f
5
5
  SHA512:
6
- metadata.gz: 8a31b0c962791a1220f043729e5f0d70820118c1c8e142db6916604e5387bd0c0b113036686942959a7d17669e3c7424bf17bf5944a6283489f935c2a4cf694f
7
- data.tar.gz: 8421b0a573e868534462320dafda3dcaecb8bc9e3f6dad03c2e427e759be3b91de676c4bfb40460d3d51b29168300acda10ff9485d1b05d26a1a66e0f50a0f33
6
+ metadata.gz: 3c0ab1e20aa5aca0e2260d57c366ed62d7b37ac49126a6dd592a589f771ccaa03f2a65a8669612e48a850af6b1c69f5859edaf1cacfe4f157bd7ea67eb4e7fc1
7
+ data.tar.gz: 287a398c2da5e9a3f8312cdbb9639ceb164addbee4a494beac618c301b3e7306fb451441681792a964d3d52a8326221ac13fad546f94281c128c4b197566ec93
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 3.10.80
10
+ - Package version: 3.10.81
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-3.10.80.gem
27
+ gem install ./ultracart_api-3.10.81.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.10.80.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.10.81.gem` to install the development dependencies)
30
30
 
31
31
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
32
 
33
33
  Finally add this to the Gemfile:
34
34
 
35
- gem 'ultracart_api', '~> 3.10.80'
35
+ gem 'ultracart_api', '~> 3.10.81'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -136,6 +136,8 @@ Class | Method | HTTP request | Description
136
136
  *UltracartClient::ConversationApi* | [**get_conversation_multimedia_upload_url**](docs/ConversationApi.md#get_conversation_multimedia_upload_url) | **GET** /conversation/upload_url/{extension} | Get a presigned conersation multimedia upload URL
137
137
  *UltracartClient::ConversationApi* | [**get_conversation_webchat_queue_statuses**](docs/ConversationApi.md#get_conversation_webchat_queue_statuses) | **GET** /conversation/conversations/queues/statuses | Retrieve a conversation webchat queue statuses
138
138
  *UltracartClient::ConversationApi* | [**get_conversations**](docs/ConversationApi.md#get_conversations) | **GET** /conversation/conversations | Retrieve a list of conversation summaries newest to oldest
139
+ *UltracartClient::ConversationApi* | [**get_conversations_autocomplete**](docs/ConversationApi.md#get_conversations_autocomplete) | **POST** /conversation/conversations/autocomplete | Retrieve a list of matching terms for a search field
140
+ *UltracartClient::ConversationApi* | [**get_conversations_search**](docs/ConversationApi.md#get_conversations_search) | **POST** /conversation/conversations/search | Search conversations
139
141
  *UltracartClient::ConversationApi* | [**insert_conversation_canned_message**](docs/ConversationApi.md#insert_conversation_canned_message) | **POST** /conversation/canned_messages | Insert a canned message
140
142
  *UltracartClient::ConversationApi* | [**insert_conversation_department**](docs/ConversationApi.md#insert_conversation_department) | **POST** /conversation/departments | Insert a department
141
143
  *UltracartClient::ConversationApi* | [**insert_conversation_engagement**](docs/ConversationApi.md#insert_conversation_engagement) | **POST** /conversation/engagements | Insert a engagement
@@ -595,6 +597,8 @@ Class | Method | HTTP request | Description
595
597
  - [UltracartClient::Conversation](docs/Conversation.md)
596
598
  - [UltracartClient::ConversationAgentAuth](docs/ConversationAgentAuth.md)
597
599
  - [UltracartClient::ConversationAgentAuthResponse](docs/ConversationAgentAuthResponse.md)
600
+ - [UltracartClient::ConversationAutocompleteRequest](docs/ConversationAutocompleteRequest.md)
601
+ - [UltracartClient::ConversationAutocompleteResponse](docs/ConversationAutocompleteResponse.md)
598
602
  - [UltracartClient::ConversationCannedMessage](docs/ConversationCannedMessage.md)
599
603
  - [UltracartClient::ConversationCannedMessageResponse](docs/ConversationCannedMessageResponse.md)
600
604
  - [UltracartClient::ConversationCannedMessagesResponse](docs/ConversationCannedMessagesResponse.md)
@@ -623,6 +627,8 @@ Class | Method | HTTP request | Description
623
627
  - [UltracartClient::ConversationMultimediaUploadUrlResponse](docs/ConversationMultimediaUploadUrlResponse.md)
624
628
  - [UltracartClient::ConversationParticipant](docs/ConversationParticipant.md)
625
629
  - [UltracartClient::ConversationResponse](docs/ConversationResponse.md)
630
+ - [UltracartClient::ConversationSearchRequest](docs/ConversationSearchRequest.md)
631
+ - [UltracartClient::ConversationSearchResponse](docs/ConversationSearchResponse.md)
626
632
  - [UltracartClient::ConversationStartRequest](docs/ConversationStartRequest.md)
627
633
  - [UltracartClient::ConversationStartResponse](docs/ConversationStartResponse.md)
628
634
  - [UltracartClient::ConversationSummary](docs/ConversationSummary.md)
@@ -1251,6 +1257,7 @@ Not every change is committed to every SDK.
1251
1257
 
1252
1258
  | Version | Date | Comments |
1253
1259
  | --: | :-: | --- |
1260
+ | 3.10.81 | 12/15/2022 | conversation searching |
1254
1261
  | 3.10.80 | 12/13/2022 | conversations - add email and sms_phone to participant object |
1255
1262
  | 3.10.79 | 12/09/2022 | conversations - message translation |
1256
1263
  | 3.10.78 | 12/08/2022 | conversation canned messages |
@@ -15,6 +15,8 @@ Method | HTTP request | Description
15
15
  [**get_conversation_multimedia_upload_url**](ConversationApi.md#get_conversation_multimedia_upload_url) | **GET** /conversation/upload_url/{extension} | Get a presigned conersation multimedia upload URL
16
16
  [**get_conversation_webchat_queue_statuses**](ConversationApi.md#get_conversation_webchat_queue_statuses) | **GET** /conversation/conversations/queues/statuses | Retrieve a conversation webchat queue statuses
17
17
  [**get_conversations**](ConversationApi.md#get_conversations) | **GET** /conversation/conversations | Retrieve a list of conversation summaries newest to oldest
18
+ [**get_conversations_autocomplete**](ConversationApi.md#get_conversations_autocomplete) | **POST** /conversation/conversations/autocomplete | Retrieve a list of matching terms for a search field
19
+ [**get_conversations_search**](ConversationApi.md#get_conversations_search) | **POST** /conversation/conversations/search | Search conversations
18
20
  [**insert_conversation_canned_message**](ConversationApi.md#insert_conversation_canned_message) | **POST** /conversation/canned_messages | Insert a canned message
19
21
  [**insert_conversation_department**](ConversationApi.md#insert_conversation_department) | **POST** /conversation/departments | Insert a department
20
22
  [**insert_conversation_engagement**](ConversationApi.md#insert_conversation_engagement) | **POST** /conversation/engagements | Insert a engagement
@@ -566,6 +568,106 @@ Name | Type | Description | Notes
566
568
 
567
569
 
568
570
 
571
+ # **get_conversations_autocomplete**
572
+ > ConversationAutocompleteResponse get_conversations_autocomplete(autocomplete_request)
573
+
574
+ Retrieve a list of matching terms for a search field
575
+
576
+ Retrieve a list of matching terms for a search field
577
+
578
+ ### Example
579
+ ```ruby
580
+ # load the gem
581
+ require 'ultracart_api'
582
+
583
+ # Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
584
+ simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
585
+ api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
586
+
587
+
588
+ autocomplete_request = UltracartClient::ConversationAutocompleteRequest.new # ConversationAutocompleteRequest | Autocomplete Request
589
+
590
+
591
+ begin
592
+ #Retrieve a list of matching terms for a search field
593
+ result = api_instance.get_conversations_autocomplete(autocomplete_request)
594
+ p result
595
+ rescue UltracartClient::ApiError => e
596
+ puts "Exception when calling ConversationApi->get_conversations_autocomplete: #{e}"
597
+ end
598
+ ```
599
+
600
+ ### Parameters
601
+
602
+ Name | Type | Description | Notes
603
+ ------------- | ------------- | ------------- | -------------
604
+ **autocomplete_request** | [**ConversationAutocompleteRequest**](ConversationAutocompleteRequest.md)| Autocomplete Request |
605
+
606
+ ### Return type
607
+
608
+ [**ConversationAutocompleteResponse**](ConversationAutocompleteResponse.md)
609
+
610
+ ### Authorization
611
+
612
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
613
+
614
+ ### HTTP request headers
615
+
616
+ - **Content-Type**: application/json
617
+ - **Accept**: application/json
618
+
619
+
620
+
621
+ # **get_conversations_search**
622
+ > ConversationSearchResponse get_conversations_search(search_request)
623
+
624
+ Search conversations
625
+
626
+ Search conversations
627
+
628
+ ### Example
629
+ ```ruby
630
+ # load the gem
631
+ require 'ultracart_api'
632
+
633
+ # Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
634
+ simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
635
+ api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
636
+
637
+
638
+ search_request = UltracartClient::ConversationSearchRequest.new # ConversationSearchRequest | Search Request
639
+
640
+
641
+ begin
642
+ #Search conversations
643
+ result = api_instance.get_conversations_search(search_request)
644
+ p result
645
+ rescue UltracartClient::ApiError => e
646
+ puts "Exception when calling ConversationApi->get_conversations_search: #{e}"
647
+ end
648
+ ```
649
+
650
+ ### Parameters
651
+
652
+ Name | Type | Description | Notes
653
+ ------------- | ------------- | ------------- | -------------
654
+ **search_request** | [**ConversationSearchRequest**](ConversationSearchRequest.md)| Search Request |
655
+
656
+ ### Return type
657
+
658
+ [**ConversationSearchResponse**](ConversationSearchResponse.md)
659
+
660
+ ### Authorization
661
+
662
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
663
+
664
+ ### HTTP request headers
665
+
666
+ - **Content-Type**: application/json
667
+ - **Accept**: application/json
668
+
669
+
670
+
569
671
  # **insert_conversation_canned_message**
570
672
  > ConversationCannedMessageResponse insert_conversation_canned_message(canned_message)
571
673
 
@@ -0,0 +1,9 @@
1
+ # UltracartClient::ConversationAutocompleteRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **field** | **String** | | [optional]
7
+ **term** | **String** | | [optional]
8
+
9
+
@@ -0,0 +1,14 @@
1
+ # UltracartClient::ConversationAutocompleteResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **error** | [**Error**](Error.md) | | [optional]
7
+ **field** | **String** | | [optional]
8
+ **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
9
+ **results** | **Array<String>** | | [optional]
10
+ **success** | **BOOLEAN** | Indicates if API call was successful | [optional]
11
+ **term** | **String** | | [optional]
12
+ **warning** | [**Warning**](Warning.md) | | [optional]
13
+
14
+
@@ -0,0 +1,17 @@
1
+ # UltracartClient::ConversationSearchRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **email_filter** | **String** | | [optional]
7
+ **language_filter** | **String** | | [optional]
8
+ **medium_filter** | **String** | | [optional]
9
+ **order_by_newest** | **BOOLEAN** | | [optional]
10
+ **order_by_oldest** | **BOOLEAN** | | [optional]
11
+ **range_begin** | **Integer** | | [optional]
12
+ **range_end** | **Integer** | | [optional]
13
+ **sms_phone_number_filter** | **String** | | [optional]
14
+ **text_search** | **String** | | [optional]
15
+ **visible_filter** | **BOOLEAN** | | [optional]
16
+
17
+
@@ -0,0 +1,10 @@
1
+ # UltracartClient::ConversationSearchResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **range_begin** | **Integer** | | [optional]
7
+ **range_end** | **Integer** | | [optional]
8
+ **total** | **Integer** | | [optional]
9
+
10
+
@@ -618,6 +618,116 @@ module UltracartClient
618
618
  end
619
619
  return data, status_code, headers
620
620
  end
621
+ # Retrieve a list of matching terms for a search field
622
+ # Retrieve a list of matching terms for a search field
623
+ # @param autocomplete_request Autocomplete Request
624
+ # @param [Hash] opts the optional parameters
625
+ # @return [ConversationAutocompleteResponse]
626
+ def get_conversations_autocomplete(autocomplete_request, opts = {})
627
+ data, _status_code, _headers = get_conversations_autocomplete_with_http_info(autocomplete_request, opts)
628
+ data
629
+ end
630
+
631
+ # Retrieve a list of matching terms for a search field
632
+ # Retrieve a list of matching terms for a search field
633
+ # @param autocomplete_request Autocomplete Request
634
+ # @param [Hash] opts the optional parameters
635
+ # @return [Array<(ConversationAutocompleteResponse, Fixnum, Hash)>] ConversationAutocompleteResponse data, response status code and response headers
636
+ def get_conversations_autocomplete_with_http_info(autocomplete_request, opts = {})
637
+ if @api_client.config.debugging
638
+ @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversations_autocomplete ...'
639
+ end
640
+ # verify the required parameter 'autocomplete_request' is set
641
+ if @api_client.config.client_side_validation && autocomplete_request.nil?
642
+ fail ArgumentError, "Missing the required parameter 'autocomplete_request' when calling ConversationApi.get_conversations_autocomplete"
643
+ end
644
+ # resource path
645
+ local_var_path = '/conversation/conversations/autocomplete'
646
+
647
+ # query parameters
648
+ query_params = {}
649
+
650
+ # header parameters
651
+ header_params = {}
652
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
653
+ # HTTP header 'Accept' (if needed)
654
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
655
+ # HTTP header 'Content-Type'
656
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
657
+
658
+ # form parameters
659
+ form_params = {}
660
+
661
+ # http body (model)
662
+ post_body = @api_client.object_to_http_body(autocomplete_request)
663
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
664
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
665
+ :header_params => header_params,
666
+ :query_params => query_params,
667
+ :form_params => form_params,
668
+ :body => post_body,
669
+ :auth_names => auth_names,
670
+ :return_type => 'ConversationAutocompleteResponse')
671
+ if @api_client.config.debugging
672
+ @api_client.config.logger.debug "API called: ConversationApi#get_conversations_autocomplete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
673
+ end
674
+ return data, status_code, headers
675
+ end
676
+ # Search conversations
677
+ # Search conversations
678
+ # @param search_request Search Request
679
+ # @param [Hash] opts the optional parameters
680
+ # @return [ConversationSearchResponse]
681
+ def get_conversations_search(search_request, opts = {})
682
+ data, _status_code, _headers = get_conversations_search_with_http_info(search_request, opts)
683
+ data
684
+ end
685
+
686
+ # Search conversations
687
+ # Search conversations
688
+ # @param search_request Search Request
689
+ # @param [Hash] opts the optional parameters
690
+ # @return [Array<(ConversationSearchResponse, Fixnum, Hash)>] ConversationSearchResponse data, response status code and response headers
691
+ def get_conversations_search_with_http_info(search_request, opts = {})
692
+ if @api_client.config.debugging
693
+ @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversations_search ...'
694
+ end
695
+ # verify the required parameter 'search_request' is set
696
+ if @api_client.config.client_side_validation && search_request.nil?
697
+ fail ArgumentError, "Missing the required parameter 'search_request' when calling ConversationApi.get_conversations_search"
698
+ end
699
+ # resource path
700
+ local_var_path = '/conversation/conversations/search'
701
+
702
+ # query parameters
703
+ query_params = {}
704
+
705
+ # header parameters
706
+ header_params = {}
707
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
708
+ # HTTP header 'Accept' (if needed)
709
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
710
+ # HTTP header 'Content-Type'
711
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
712
+
713
+ # form parameters
714
+ form_params = {}
715
+
716
+ # http body (model)
717
+ post_body = @api_client.object_to_http_body(search_request)
718
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
719
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
720
+ :header_params => header_params,
721
+ :query_params => query_params,
722
+ :form_params => form_params,
723
+ :body => post_body,
724
+ :auth_names => auth_names,
725
+ :return_type => 'ConversationSearchResponse')
726
+ if @api_client.config.debugging
727
+ @api_client.config.logger.debug "API called: ConversationApi#get_conversations_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
728
+ end
729
+ return data, status_code, headers
730
+ end
621
731
  # Insert a canned message
622
732
  # Insert a canned message
623
733
  # @param canned_message Canned message
@@ -0,0 +1,193 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class ConversationAutocompleteRequest
17
+ attr_accessor :field
18
+
19
+ attr_accessor :term
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'field' => :'field',
25
+ :'term' => :'term'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.swagger_types
31
+ {
32
+ :'field' => :'String',
33
+ :'term' => :'String'
34
+ }
35
+ end
36
+
37
+ # Initializes the object
38
+ # @param [Hash] attributes Model attributes in the form of hash
39
+ def initialize(attributes = {})
40
+ return unless attributes.is_a?(Hash)
41
+
42
+ # convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
44
+
45
+ if attributes.has_key?(:'field')
46
+ self.field = attributes[:'field']
47
+ end
48
+
49
+ if attributes.has_key?(:'term')
50
+ self.term = attributes[:'term']
51
+ end
52
+ end
53
+
54
+ # Show invalid properties with the reasons. Usually used together with valid?
55
+ # @return Array for valid properties with the reasons
56
+ def list_invalid_properties
57
+ invalid_properties = Array.new
58
+ 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
+ true
65
+ end
66
+
67
+ # Checks equality by comparing each attribute.
68
+ # @param [Object] Object to be compared
69
+ def ==(o)
70
+ return true if self.equal?(o)
71
+ self.class == o.class &&
72
+ field == o.field &&
73
+ term == o.term
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
+ [field, term].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 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 = UltracartClient.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
+ end
@@ -0,0 +1,241 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class ConversationAutocompleteResponse
17
+ attr_accessor :error
18
+
19
+ attr_accessor :field
20
+
21
+ attr_accessor :metadata
22
+
23
+ attr_accessor :results
24
+
25
+ # Indicates if API call was successful
26
+ attr_accessor :success
27
+
28
+ attr_accessor :term
29
+
30
+ attr_accessor :warning
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'error' => :'error',
36
+ :'field' => :'field',
37
+ :'metadata' => :'metadata',
38
+ :'results' => :'results',
39
+ :'success' => :'success',
40
+ :'term' => :'term',
41
+ :'warning' => :'warning'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.swagger_types
47
+ {
48
+ :'error' => :'Error',
49
+ :'field' => :'String',
50
+ :'metadata' => :'ResponseMetadata',
51
+ :'results' => :'Array<String>',
52
+ :'success' => :'BOOLEAN',
53
+ :'term' => :'String',
54
+ :'warning' => :'Warning'
55
+ }
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ return unless attributes.is_a?(Hash)
62
+
63
+ # convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
65
+
66
+ if attributes.has_key?(:'error')
67
+ self.error = attributes[:'error']
68
+ end
69
+
70
+ if attributes.has_key?(:'field')
71
+ self.field = attributes[:'field']
72
+ end
73
+
74
+ if attributes.has_key?(:'metadata')
75
+ self.metadata = attributes[:'metadata']
76
+ end
77
+
78
+ if attributes.has_key?(:'results')
79
+ if (value = attributes[:'results']).is_a?(Array)
80
+ self.results = value
81
+ end
82
+ end
83
+
84
+ if attributes.has_key?(:'success')
85
+ self.success = attributes[:'success']
86
+ end
87
+
88
+ if attributes.has_key?(:'term')
89
+ self.term = attributes[:'term']
90
+ end
91
+
92
+ if attributes.has_key?(:'warning')
93
+ self.warning = attributes[:'warning']
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ invalid_properties = Array.new
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ error == o.error &&
116
+ field == o.field &&
117
+ metadata == o.metadata &&
118
+ results == o.results &&
119
+ success == o.success &&
120
+ term == o.term &&
121
+ warning == o.warning
122
+ end
123
+
124
+ # @see the `==` method
125
+ # @param [Object] Object to be compared
126
+ def eql?(o)
127
+ self == o
128
+ end
129
+
130
+ # Calculates hash code according to all attributes.
131
+ # @return [Fixnum] Hash code
132
+ def hash
133
+ [error, field, metadata, results, success, term, warning].hash
134
+ end
135
+
136
+ # Builds the object from hash
137
+ # @param [Hash] attributes Model attributes in the form of hash
138
+ # @return [Object] Returns the model itself
139
+ def build_from_hash(attributes)
140
+ return nil unless attributes.is_a?(Hash)
141
+ self.class.swagger_types.each_pair do |key, type|
142
+ if type =~ /\AArray<(.*)>/i
143
+ # check to ensure the input is an array given that the attribute
144
+ # is documented as an array but the input is not
145
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
146
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
147
+ end
148
+ elsif !attributes[self.class.attribute_map[key]].nil?
149
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
150
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
151
+ end
152
+
153
+ self
154
+ end
155
+
156
+ # Deserializes the data based on type
157
+ # @param string type Data type
158
+ # @param string value Value to be deserialized
159
+ # @return [Object] Deserialized data
160
+ def _deserialize(type, value)
161
+ case type.to_sym
162
+ when :DateTime
163
+ DateTime.parse(value)
164
+ when :Date
165
+ Date.parse(value)
166
+ when :String
167
+ value.to_s
168
+ when :Integer
169
+ value.to_i
170
+ when :Float
171
+ value.to_f
172
+ when :BOOLEAN
173
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
174
+ true
175
+ else
176
+ false
177
+ end
178
+ when :Object
179
+ # generic object (usually a Hash), return directly
180
+ value
181
+ when /\AArray<(?<inner_type>.+)>\z/
182
+ inner_type = Regexp.last_match[:inner_type]
183
+ value.map { |v| _deserialize(inner_type, v) }
184
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
185
+ k_type = Regexp.last_match[:k_type]
186
+ v_type = Regexp.last_match[:v_type]
187
+ {}.tap do |hash|
188
+ value.each do |k, v|
189
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
190
+ end
191
+ end
192
+ else # model
193
+ temp_model = UltracartClient.const_get(type).new
194
+ temp_model.build_from_hash(value)
195
+ end
196
+ end
197
+
198
+ # Returns the string representation of the object
199
+ # @return [String] String presentation of the object
200
+ def to_s
201
+ to_hash.to_s
202
+ end
203
+
204
+ # to_body is an alias to to_hash (backward compatibility)
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_body
207
+ to_hash
208
+ end
209
+
210
+ # Returns the object in the form of hash
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_hash
213
+ hash = {}
214
+ self.class.attribute_map.each_pair do |attr, param|
215
+ value = self.send(attr)
216
+ next if value.nil?
217
+ hash[param] = _to_hash(value)
218
+ end
219
+ hash
220
+ end
221
+
222
+ # Outputs non-array value in the form of hash
223
+ # For object, use to_hash. Otherwise, just return the value
224
+ # @param [Object] value Any valid value
225
+ # @return [Hash] Returns the value in the form of hash
226
+ def _to_hash(value)
227
+ if value.is_a?(Array)
228
+ value.compact.map { |v| _to_hash(v) }
229
+ elsif value.is_a?(Hash)
230
+ {}.tap do |hash|
231
+ value.each { |k, v| hash[k] = _to_hash(v) }
232
+ end
233
+ elsif value.respond_to? :to_hash
234
+ value.to_hash
235
+ else
236
+ value
237
+ end
238
+ end
239
+
240
+ end
241
+ end
@@ -0,0 +1,265 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class ConversationSearchRequest
17
+ attr_accessor :email_filter
18
+
19
+ attr_accessor :language_filter
20
+
21
+ attr_accessor :medium_filter
22
+
23
+ attr_accessor :order_by_newest
24
+
25
+ attr_accessor :order_by_oldest
26
+
27
+ attr_accessor :range_begin
28
+
29
+ attr_accessor :range_end
30
+
31
+ attr_accessor :sms_phone_number_filter
32
+
33
+ attr_accessor :text_search
34
+
35
+ attr_accessor :visible_filter
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'email_filter' => :'email_filter',
41
+ :'language_filter' => :'language_filter',
42
+ :'medium_filter' => :'medium_filter',
43
+ :'order_by_newest' => :'order_by_newest',
44
+ :'order_by_oldest' => :'order_by_oldest',
45
+ :'range_begin' => :'range_begin',
46
+ :'range_end' => :'range_end',
47
+ :'sms_phone_number_filter' => :'sms_phone_number_filter',
48
+ :'text_search' => :'text_search',
49
+ :'visible_filter' => :'visible_filter'
50
+ }
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.swagger_types
55
+ {
56
+ :'email_filter' => :'String',
57
+ :'language_filter' => :'String',
58
+ :'medium_filter' => :'String',
59
+ :'order_by_newest' => :'BOOLEAN',
60
+ :'order_by_oldest' => :'BOOLEAN',
61
+ :'range_begin' => :'Integer',
62
+ :'range_end' => :'Integer',
63
+ :'sms_phone_number_filter' => :'String',
64
+ :'text_search' => :'String',
65
+ :'visible_filter' => :'BOOLEAN'
66
+ }
67
+ end
68
+
69
+ # Initializes the object
70
+ # @param [Hash] attributes Model attributes in the form of hash
71
+ def initialize(attributes = {})
72
+ return unless attributes.is_a?(Hash)
73
+
74
+ # convert string to symbol for hash key
75
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
76
+
77
+ if attributes.has_key?(:'email_filter')
78
+ self.email_filter = attributes[:'email_filter']
79
+ end
80
+
81
+ if attributes.has_key?(:'language_filter')
82
+ self.language_filter = attributes[:'language_filter']
83
+ end
84
+
85
+ if attributes.has_key?(:'medium_filter')
86
+ self.medium_filter = attributes[:'medium_filter']
87
+ end
88
+
89
+ if attributes.has_key?(:'order_by_newest')
90
+ self.order_by_newest = attributes[:'order_by_newest']
91
+ end
92
+
93
+ if attributes.has_key?(:'order_by_oldest')
94
+ self.order_by_oldest = attributes[:'order_by_oldest']
95
+ end
96
+
97
+ if attributes.has_key?(:'range_begin')
98
+ self.range_begin = attributes[:'range_begin']
99
+ end
100
+
101
+ if attributes.has_key?(:'range_end')
102
+ self.range_end = attributes[:'range_end']
103
+ end
104
+
105
+ if attributes.has_key?(:'sms_phone_number_filter')
106
+ self.sms_phone_number_filter = attributes[:'sms_phone_number_filter']
107
+ end
108
+
109
+ if attributes.has_key?(:'text_search')
110
+ self.text_search = attributes[:'text_search']
111
+ end
112
+
113
+ if attributes.has_key?(:'visible_filter')
114
+ self.visible_filter = attributes[:'visible_filter']
115
+ end
116
+ end
117
+
118
+ # Show invalid properties with the reasons. Usually used together with valid?
119
+ # @return Array for valid properties with the reasons
120
+ def list_invalid_properties
121
+ invalid_properties = Array.new
122
+ invalid_properties
123
+ end
124
+
125
+ # Check to see if the all the properties in the model are valid
126
+ # @return true if the model is valid
127
+ def valid?
128
+ true
129
+ end
130
+
131
+ # Checks equality by comparing each attribute.
132
+ # @param [Object] Object to be compared
133
+ def ==(o)
134
+ return true if self.equal?(o)
135
+ self.class == o.class &&
136
+ email_filter == o.email_filter &&
137
+ language_filter == o.language_filter &&
138
+ medium_filter == o.medium_filter &&
139
+ order_by_newest == o.order_by_newest &&
140
+ order_by_oldest == o.order_by_oldest &&
141
+ range_begin == o.range_begin &&
142
+ range_end == o.range_end &&
143
+ sms_phone_number_filter == o.sms_phone_number_filter &&
144
+ text_search == o.text_search &&
145
+ visible_filter == o.visible_filter
146
+ end
147
+
148
+ # @see the `==` method
149
+ # @param [Object] Object to be compared
150
+ def eql?(o)
151
+ self == o
152
+ end
153
+
154
+ # Calculates hash code according to all attributes.
155
+ # @return [Fixnum] Hash code
156
+ def hash
157
+ [email_filter, language_filter, medium_filter, order_by_newest, order_by_oldest, range_begin, range_end, sms_phone_number_filter, text_search, visible_filter].hash
158
+ end
159
+
160
+ # Builds the object from hash
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ # @return [Object] Returns the model itself
163
+ def build_from_hash(attributes)
164
+ return nil unless attributes.is_a?(Hash)
165
+ self.class.swagger_types.each_pair do |key, type|
166
+ if type =~ /\AArray<(.*)>/i
167
+ # check to ensure the input is an array given that the attribute
168
+ # is documented as an array but the input is not
169
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
170
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
171
+ end
172
+ elsif !attributes[self.class.attribute_map[key]].nil?
173
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
174
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
175
+ end
176
+
177
+ self
178
+ end
179
+
180
+ # Deserializes the data based on type
181
+ # @param string type Data type
182
+ # @param string value Value to be deserialized
183
+ # @return [Object] Deserialized data
184
+ def _deserialize(type, value)
185
+ case type.to_sym
186
+ when :DateTime
187
+ DateTime.parse(value)
188
+ when :Date
189
+ Date.parse(value)
190
+ when :String
191
+ value.to_s
192
+ when :Integer
193
+ value.to_i
194
+ when :Float
195
+ value.to_f
196
+ when :BOOLEAN
197
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
198
+ true
199
+ else
200
+ false
201
+ end
202
+ when :Object
203
+ # generic object (usually a Hash), return directly
204
+ value
205
+ when /\AArray<(?<inner_type>.+)>\z/
206
+ inner_type = Regexp.last_match[:inner_type]
207
+ value.map { |v| _deserialize(inner_type, v) }
208
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
209
+ k_type = Regexp.last_match[:k_type]
210
+ v_type = Regexp.last_match[:v_type]
211
+ {}.tap do |hash|
212
+ value.each do |k, v|
213
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
214
+ end
215
+ end
216
+ else # model
217
+ temp_model = UltracartClient.const_get(type).new
218
+ temp_model.build_from_hash(value)
219
+ end
220
+ end
221
+
222
+ # Returns the string representation of the object
223
+ # @return [String] String presentation of the object
224
+ def to_s
225
+ to_hash.to_s
226
+ end
227
+
228
+ # to_body is an alias to to_hash (backward compatibility)
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_body
231
+ to_hash
232
+ end
233
+
234
+ # Returns the object in the form of hash
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_hash
237
+ hash = {}
238
+ self.class.attribute_map.each_pair do |attr, param|
239
+ value = self.send(attr)
240
+ next if value.nil?
241
+ hash[param] = _to_hash(value)
242
+ end
243
+ hash
244
+ end
245
+
246
+ # Outputs non-array value in the form of hash
247
+ # For object, use to_hash. Otherwise, just return the value
248
+ # @param [Object] value Any valid value
249
+ # @return [Hash] Returns the value in the form of hash
250
+ def _to_hash(value)
251
+ if value.is_a?(Array)
252
+ value.compact.map { |v| _to_hash(v) }
253
+ elsif value.is_a?(Hash)
254
+ {}.tap do |hash|
255
+ value.each { |k, v| hash[k] = _to_hash(v) }
256
+ end
257
+ elsif value.respond_to? :to_hash
258
+ value.to_hash
259
+ else
260
+ value
261
+ end
262
+ end
263
+
264
+ end
265
+ end
@@ -0,0 +1,202 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class ConversationSearchResponse
17
+ attr_accessor :range_begin
18
+
19
+ attr_accessor :range_end
20
+
21
+ attr_accessor :total
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'range_begin' => :'range_begin',
27
+ :'range_end' => :'range_end',
28
+ :'total' => :'total'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'range_begin' => :'Integer',
36
+ :'range_end' => :'Integer',
37
+ :'total' => :'Integer'
38
+ }
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
+
49
+ if attributes.has_key?(:'range_begin')
50
+ self.range_begin = attributes[:'range_begin']
51
+ end
52
+
53
+ if attributes.has_key?(:'range_end')
54
+ self.range_end = attributes[:'range_end']
55
+ end
56
+
57
+ if attributes.has_key?(:'total')
58
+ self.total = attributes[:'total']
59
+ end
60
+ end
61
+
62
+ # Show invalid properties with the reasons. Usually used together with valid?
63
+ # @return Array for valid properties with the reasons
64
+ def list_invalid_properties
65
+ invalid_properties = Array.new
66
+ invalid_properties
67
+ end
68
+
69
+ # Check to see if the all the properties in the model are valid
70
+ # @return true if the model is valid
71
+ def valid?
72
+ true
73
+ end
74
+
75
+ # Checks equality by comparing each attribute.
76
+ # @param [Object] Object to be compared
77
+ def ==(o)
78
+ return true if self.equal?(o)
79
+ self.class == o.class &&
80
+ range_begin == o.range_begin &&
81
+ range_end == o.range_end &&
82
+ total == o.total
83
+ end
84
+
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Fixnum] Hash code
93
+ def hash
94
+ [range_begin, range_end, total].hash
95
+ end
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def build_from_hash(attributes)
101
+ return nil unless attributes.is_a?(Hash)
102
+ self.class.swagger_types.each_pair do |key, type|
103
+ if type =~ /\AArray<(.*)>/i
104
+ # check to ensure the input is an array given that the attribute
105
+ # is documented as an array but the input is not
106
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
107
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
108
+ end
109
+ elsif !attributes[self.class.attribute_map[key]].nil?
110
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
111
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
112
+ end
113
+
114
+ self
115
+ end
116
+
117
+ # Deserializes the data based on type
118
+ # @param string type Data type
119
+ # @param string value Value to be deserialized
120
+ # @return [Object] Deserialized data
121
+ def _deserialize(type, value)
122
+ case type.to_sym
123
+ when :DateTime
124
+ DateTime.parse(value)
125
+ when :Date
126
+ Date.parse(value)
127
+ when :String
128
+ value.to_s
129
+ when :Integer
130
+ value.to_i
131
+ when :Float
132
+ value.to_f
133
+ when :BOOLEAN
134
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
135
+ true
136
+ else
137
+ false
138
+ end
139
+ when :Object
140
+ # generic object (usually a Hash), return directly
141
+ value
142
+ when /\AArray<(?<inner_type>.+)>\z/
143
+ inner_type = Regexp.last_match[:inner_type]
144
+ value.map { |v| _deserialize(inner_type, v) }
145
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
146
+ k_type = Regexp.last_match[:k_type]
147
+ v_type = Regexp.last_match[:v_type]
148
+ {}.tap do |hash|
149
+ value.each do |k, v|
150
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
151
+ end
152
+ end
153
+ else # model
154
+ temp_model = UltracartClient.const_get(type).new
155
+ temp_model.build_from_hash(value)
156
+ end
157
+ end
158
+
159
+ # Returns the string representation of the object
160
+ # @return [String] String presentation of the object
161
+ def to_s
162
+ to_hash.to_s
163
+ end
164
+
165
+ # to_body is an alias to to_hash (backward compatibility)
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_body
168
+ to_hash
169
+ end
170
+
171
+ # Returns the object in the form of hash
172
+ # @return [Hash] Returns the object in the form of hash
173
+ def to_hash
174
+ hash = {}
175
+ self.class.attribute_map.each_pair do |attr, param|
176
+ value = self.send(attr)
177
+ next if value.nil?
178
+ hash[param] = _to_hash(value)
179
+ end
180
+ hash
181
+ end
182
+
183
+ # Outputs non-array value in the form of hash
184
+ # For object, use to_hash. Otherwise, just return the value
185
+ # @param [Object] value Any valid value
186
+ # @return [Hash] Returns the value in the form of hash
187
+ def _to_hash(value)
188
+ if value.is_a?(Array)
189
+ value.compact.map { |v| _to_hash(v) }
190
+ elsif value.is_a?(Hash)
191
+ {}.tap do |hash|
192
+ value.each { |k, v| hash[k] = _to_hash(v) }
193
+ end
194
+ elsif value.respond_to? :to_hash
195
+ value.to_hash
196
+ else
197
+ value
198
+ end
199
+ end
200
+
201
+ end
202
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.10.80'
14
+ VERSION = '3.10.81'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -138,6 +138,8 @@ require 'ultracart_api/models/city_state_zip'
138
138
  require 'ultracart_api/models/conversation'
139
139
  require 'ultracart_api/models/conversation_agent_auth'
140
140
  require 'ultracart_api/models/conversation_agent_auth_response'
141
+ require 'ultracart_api/models/conversation_autocomplete_request'
142
+ require 'ultracart_api/models/conversation_autocomplete_response'
141
143
  require 'ultracart_api/models/conversation_canned_message'
142
144
  require 'ultracart_api/models/conversation_canned_message_response'
143
145
  require 'ultracart_api/models/conversation_canned_messages_response'
@@ -166,6 +168,8 @@ require 'ultracart_api/models/conversation_multimedia_upload_url'
166
168
  require 'ultracart_api/models/conversation_multimedia_upload_url_response'
167
169
  require 'ultracart_api/models/conversation_participant'
168
170
  require 'ultracart_api/models/conversation_response'
171
+ require 'ultracart_api/models/conversation_search_request'
172
+ require 'ultracart_api/models/conversation_search_response'
169
173
  require 'ultracart_api/models/conversation_start_request'
170
174
  require 'ultracart_api/models/conversation_start_response'
171
175
  require 'ultracart_api/models/conversation_summary'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.80
4
+ version: 3.10.81
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-13 00:00:00.000000000 Z
11
+ date: 2022-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -348,6 +348,8 @@ files:
348
348
  - docs/ConversationAgentAuth.md
349
349
  - docs/ConversationAgentAuthResponse.md
350
350
  - docs/ConversationApi.md
351
+ - docs/ConversationAutocompleteRequest.md
352
+ - docs/ConversationAutocompleteResponse.md
351
353
  - docs/ConversationCannedMessage.md
352
354
  - docs/ConversationCannedMessageResponse.md
353
355
  - docs/ConversationCannedMessagesResponse.md
@@ -376,6 +378,8 @@ files:
376
378
  - docs/ConversationMultimediaUploadUrlResponse.md
377
379
  - docs/ConversationParticipant.md
378
380
  - docs/ConversationResponse.md
381
+ - docs/ConversationSearchRequest.md
382
+ - docs/ConversationSearchResponse.md
379
383
  - docs/ConversationStartRequest.md
380
384
  - docs/ConversationStartResponse.md
381
385
  - docs/ConversationSummary.md
@@ -1092,6 +1096,8 @@ files:
1092
1096
  - lib/ultracart_api/models/conversation.rb
1093
1097
  - lib/ultracart_api/models/conversation_agent_auth.rb
1094
1098
  - lib/ultracart_api/models/conversation_agent_auth_response.rb
1099
+ - lib/ultracart_api/models/conversation_autocomplete_request.rb
1100
+ - lib/ultracart_api/models/conversation_autocomplete_response.rb
1095
1101
  - lib/ultracart_api/models/conversation_canned_message.rb
1096
1102
  - lib/ultracart_api/models/conversation_canned_message_response.rb
1097
1103
  - lib/ultracart_api/models/conversation_canned_messages_response.rb
@@ -1120,6 +1126,8 @@ files:
1120
1126
  - lib/ultracart_api/models/conversation_multimedia_upload_url_response.rb
1121
1127
  - lib/ultracart_api/models/conversation_participant.rb
1122
1128
  - lib/ultracart_api/models/conversation_response.rb
1129
+ - lib/ultracart_api/models/conversation_search_request.rb
1130
+ - lib/ultracart_api/models/conversation_search_response.rb
1123
1131
  - lib/ultracart_api/models/conversation_start_request.rb
1124
1132
  - lib/ultracart_api/models/conversation_start_response.rb
1125
1133
  - lib/ultracart_api/models/conversation_summary.rb