ultracart_api 3.10.120 → 3.10.122
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -4
- data/docs/Conversation.md +1 -0
- data/docs/ConversationSentiment.md +13 -0
- data/docs/ConversationSummary.md +1 -0
- data/docs/OrderApi.md +51 -0
- data/docs/OrderEdiDocument.md +21 -0
- data/docs/OrderEdiDocumentsResponse.md +12 -0
- data/lib/ultracart_api/api/order_api.rb +55 -0
- data/lib/ultracart_api/models/conversation.rb +10 -1
- data/lib/ultracart_api/models/conversation_sentiment.rb +269 -0
- data/lib/ultracart_api/models/conversation_summary.rb +10 -1
- data/lib/ultracart_api/models/order_edi_document.rb +337 -0
- data/lib/ultracart_api/models/order_edi_documents_response.rb +224 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +3 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27fd0273e03c2cc30caa02a1cc540813c31cbd8724aabe14ee63c472277758af
|
4
|
+
data.tar.gz: cf3506a5d39c78397701eb152108bab7f2b99934d912b4f90915a32719a77e89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4895417eef9c2e3654181f1c52c35b4cdefe3f5c440907067344e1345da2f44d53a729340b4324bd66393c88b26f76e1a4d04afdb3b3684d78c37cfd6ab94bea
|
7
|
+
data.tar.gz: 42c3090e07e4bc214984d3adb53fa687d2b48c00afd5fbe4614eb13e03a0e3260db5a2e97fd57a5e81512d0c0fd2f727d6f4f9ecb64dae06efadf28d7e6f24d5
|
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.
|
10
|
+
- Package version: 3.10.122
|
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.
|
27
|
+
gem install ./ultracart_api-3.10.122.gem
|
28
28
|
```
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.10.
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.10.122.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.
|
35
|
+
gem 'ultracart_api', '~> 3.10.122'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -254,6 +254,7 @@ Class | Method | HTTP request | Description
|
|
254
254
|
*UltracartClient::OrderApi* | [**get_accounts_receivable_retry_stats**](docs/OrderApi.md#get_accounts_receivable_retry_stats) | **GET** /order/accountsReceivableRetryConfig/stats | Retrieve A/R Retry Statistics
|
255
255
|
*UltracartClient::OrderApi* | [**get_order**](docs/OrderApi.md#get_order) | **GET** /order/orders/{order_id} | Retrieve an order
|
256
256
|
*UltracartClient::OrderApi* | [**get_order_by_token**](docs/OrderApi.md#get_order_by_token) | **POST** /order/orders/token | Retrieve an order using a token
|
257
|
+
*UltracartClient::OrderApi* | [**get_order_edi_documents**](docs/OrderApi.md#get_order_edi_documents) | **GET** /order/orders/{order_id}/edi | Retrieve EDI documents associated with this order.
|
257
258
|
*UltracartClient::OrderApi* | [**get_orders**](docs/OrderApi.md#get_orders) | **GET** /order/orders | Retrieve orders
|
258
259
|
*UltracartClient::OrderApi* | [**get_orders_batch**](docs/OrderApi.md#get_orders_batch) | **POST** /order/orders/batch | Retrieve order batch
|
259
260
|
*UltracartClient::OrderApi* | [**get_orders_by_query**](docs/OrderApi.md#get_orders_by_query) | **POST** /order/orders/query | Retrieve orders by query
|
@@ -663,6 +664,7 @@ Class | Method | HTTP request | Description
|
|
663
664
|
- [UltracartClient::ConversationResponse](docs/ConversationResponse.md)
|
664
665
|
- [UltracartClient::ConversationSearchRequest](docs/ConversationSearchRequest.md)
|
665
666
|
- [UltracartClient::ConversationSearchResponse](docs/ConversationSearchResponse.md)
|
667
|
+
- [UltracartClient::ConversationSentiment](docs/ConversationSentiment.md)
|
666
668
|
- [UltracartClient::ConversationStartRequest](docs/ConversationStartRequest.md)
|
667
669
|
- [UltracartClient::ConversationStartResponse](docs/ConversationStartResponse.md)
|
668
670
|
- [UltracartClient::ConversationSummary](docs/ConversationSummary.md)
|
@@ -1053,6 +1055,8 @@ Class | Method | HTTP request | Description
|
|
1053
1055
|
- [UltracartClient::OrderDigitalItem](docs/OrderDigitalItem.md)
|
1054
1056
|
- [UltracartClient::OrderDigitalOrder](docs/OrderDigitalOrder.md)
|
1055
1057
|
- [UltracartClient::OrderEdi](docs/OrderEdi.md)
|
1058
|
+
- [UltracartClient::OrderEdiDocument](docs/OrderEdiDocument.md)
|
1059
|
+
- [UltracartClient::OrderEdiDocumentsResponse](docs/OrderEdiDocumentsResponse.md)
|
1056
1060
|
- [UltracartClient::OrderFormat](docs/OrderFormat.md)
|
1057
1061
|
- [UltracartClient::OrderFormatResponse](docs/OrderFormatResponse.md)
|
1058
1062
|
- [UltracartClient::OrderFraudScore](docs/OrderFraudScore.md)
|
@@ -1303,6 +1307,8 @@ Not every change is committed to every SDK.
|
|
1303
1307
|
|
1304
1308
|
| Version | Date | Comments |
|
1305
1309
|
| --: | :-: | --- |
|
1310
|
+
| 3.10.122 | 03/14/2023 | order.getOrderEdiDocuments |
|
1311
|
+
| 3.10.121 | 03/01/2023 | convo - add sentiment record to conversation obj |
|
1306
1312
|
| 3.10.120 | 02/22/2023 | convo - customer initiated flag on engagement |
|
1307
1313
|
| 3.10.119 | 02/20/2023 | refund reasons |
|
1308
1314
|
| 3.10.118 | 02/17/2023 | convo api - smsUnsubscribeConversation method |
|
data/docs/Conversation.md
CHANGED
@@ -18,6 +18,7 @@ Name | Type | Description | Notes
|
|
18
18
|
**message_count** | **Integer** | | [optional]
|
19
19
|
**messages** | [**Array<ConversationMessage>**](ConversationMessage.md) | | [optional]
|
20
20
|
**participants** | [**Array<ConversationParticipant>**](ConversationParticipant.md) | | [optional]
|
21
|
+
**sentiment** | [**ConversationSentiment**](ConversationSentiment.md) | | [optional]
|
21
22
|
**start_dts** | **String** | Start of the conversation date/time | [optional]
|
22
23
|
**unread_messages** | **BOOLEAN** | | [optional]
|
23
24
|
**visible** | **BOOLEAN** | | [optional]
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# UltracartClient::ConversationSentiment
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**last_detect_sentiment** | **String** | The last time the detect sentiment was run on this conversation | [optional]
|
7
|
+
**mixed** | **Float** | The mixed score | [optional]
|
8
|
+
**negative** | **Float** | The negative score | [optional]
|
9
|
+
**neutral** | **Float** | The neutral score | [optional]
|
10
|
+
**positive** | **Float** | The positive score | [optional]
|
11
|
+
**sentiment** | **String** | The overall sentiment | [optional]
|
12
|
+
|
13
|
+
|
data/docs/ConversationSummary.md
CHANGED
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
|
|
16
16
|
**merchant_id** | **String** | | [optional]
|
17
17
|
**message_count** | **Integer** | | [optional]
|
18
18
|
**participants** | [**Array<ConversationParticipant>**](ConversationParticipant.md) | | [optional]
|
19
|
+
**sentiment** | [**ConversationSentiment**](ConversationSentiment.md) | | [optional]
|
19
20
|
**start_dts** | **String** | Start of the conversation date/time | [optional]
|
20
21
|
**unread_messages** | **BOOLEAN** | | [optional]
|
21
22
|
**visible** | **BOOLEAN** | | [optional]
|
data/docs/OrderApi.md
CHANGED
@@ -17,6 +17,7 @@ Method | HTTP request | Description
|
|
17
17
|
[**get_accounts_receivable_retry_stats**](OrderApi.md#get_accounts_receivable_retry_stats) | **GET** /order/accountsReceivableRetryConfig/stats | Retrieve A/R Retry Statistics
|
18
18
|
[**get_order**](OrderApi.md#get_order) | **GET** /order/orders/{order_id} | Retrieve an order
|
19
19
|
[**get_order_by_token**](OrderApi.md#get_order_by_token) | **POST** /order/orders/token | Retrieve an order using a token
|
20
|
+
[**get_order_edi_documents**](OrderApi.md#get_order_edi_documents) | **GET** /order/orders/{order_id}/edi | Retrieve EDI documents associated with this order.
|
20
21
|
[**get_orders**](OrderApi.md#get_orders) | **GET** /order/orders | Retrieve orders
|
21
22
|
[**get_orders_batch**](OrderApi.md#get_orders_batch) | **POST** /order/orders/batch | Retrieve order batch
|
22
23
|
[**get_orders_by_query**](OrderApi.md#get_orders_by_query) | **POST** /order/orders/query | Retrieve orders by query
|
@@ -699,6 +700,56 @@ Name | Type | Description | Notes
|
|
699
700
|
|
700
701
|
|
701
702
|
|
703
|
+
# **get_order_edi_documents**
|
704
|
+
> OrderEdiDocumentsResponse get_order_edi_documents(order_id)
|
705
|
+
|
706
|
+
Retrieve EDI documents associated with this order.
|
707
|
+
|
708
|
+
Retrieve EDI documents associated with this order.
|
709
|
+
|
710
|
+
### Example
|
711
|
+
```ruby
|
712
|
+
# load the gem
|
713
|
+
require 'ultracart_api'
|
714
|
+
|
715
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
716
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
717
|
+
api_instance = UltracartClient::OrderApi.new_using_api_key(simple_key, false, false)
|
718
|
+
|
719
|
+
|
720
|
+
order_id = 'order_id_example' # String | The order id to retrieve EDI documents for.
|
721
|
+
|
722
|
+
|
723
|
+
begin
|
724
|
+
#Retrieve EDI documents associated with this order.
|
725
|
+
result = api_instance.get_order_edi_documents(order_id)
|
726
|
+
p result
|
727
|
+
rescue UltracartClient::ApiError => e
|
728
|
+
puts "Exception when calling OrderApi->get_order_edi_documents: #{e}"
|
729
|
+
end
|
730
|
+
```
|
731
|
+
|
732
|
+
### Parameters
|
733
|
+
|
734
|
+
Name | Type | Description | Notes
|
735
|
+
------------- | ------------- | ------------- | -------------
|
736
|
+
**order_id** | **String**| The order id to retrieve EDI documents for. |
|
737
|
+
|
738
|
+
### Return type
|
739
|
+
|
740
|
+
[**OrderEdiDocumentsResponse**](OrderEdiDocumentsResponse.md)
|
741
|
+
|
742
|
+
### Authorization
|
743
|
+
|
744
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
745
|
+
|
746
|
+
### HTTP request headers
|
747
|
+
|
748
|
+
- **Content-Type**: application/json; charset=UTF-8
|
749
|
+
- **Accept**: application/json
|
750
|
+
|
751
|
+
|
752
|
+
|
702
753
|
# **get_orders**
|
703
754
|
> OrdersResponse get_orders(opts)
|
704
755
|
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# UltracartClient::OrderEdiDocument
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**direction** | **String** | Direction the document flowed | [optional]
|
7
|
+
**doc_dts** | **String** | Date/time the document was created/received | [optional]
|
8
|
+
**document** | **String** | | [optional]
|
9
|
+
**document_type_description** | **String** | | [optional]
|
10
|
+
**document_type_number** | **Integer** | | [optional]
|
11
|
+
**external_id** | **String** | | [optional]
|
12
|
+
**functional_acknowledgement** | **String** | | [optional]
|
13
|
+
**functional_acknowledgement_dts** | **String** | | [optional]
|
14
|
+
**functional_acknowledgement_pending** | **BOOLEAN** | | [optional]
|
15
|
+
**group_control_number** | **Integer** | | [optional]
|
16
|
+
**internal_id** | **String** | | [optional]
|
17
|
+
**merchant_id** | **String** | | [optional]
|
18
|
+
**order_id** | **String** | | [optional]
|
19
|
+
**test_mode** | **BOOLEAN** | | [optional]
|
20
|
+
|
21
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# UltracartClient::OrderEdiDocumentsResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**edi_documents** | [**Array<OrderEdiDocument>**](OrderEdiDocument.md) | edi_documents | [optional]
|
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
|
+
|
@@ -767,6 +767,61 @@ module UltracartClient
|
|
767
767
|
end
|
768
768
|
return data, status_code, headers
|
769
769
|
end
|
770
|
+
# Retrieve EDI documents associated with this order.
|
771
|
+
# Retrieve EDI documents associated with this order.
|
772
|
+
# @param order_id The order id to retrieve EDI documents for.
|
773
|
+
# @param [Hash] opts the optional parameters
|
774
|
+
# @return [OrderEdiDocumentsResponse]
|
775
|
+
def get_order_edi_documents(order_id, opts = {})
|
776
|
+
data, _status_code, _headers = get_order_edi_documents_with_http_info(order_id, opts)
|
777
|
+
data
|
778
|
+
end
|
779
|
+
|
780
|
+
# Retrieve EDI documents associated with this order.
|
781
|
+
# Retrieve EDI documents associated with this order.
|
782
|
+
# @param order_id The order id to retrieve EDI documents for.
|
783
|
+
# @param [Hash] opts the optional parameters
|
784
|
+
# @return [Array<(OrderEdiDocumentsResponse, Fixnum, Hash)>] OrderEdiDocumentsResponse data, response status code and response headers
|
785
|
+
def get_order_edi_documents_with_http_info(order_id, opts = {})
|
786
|
+
if @api_client.config.debugging
|
787
|
+
@api_client.config.logger.debug 'Calling API: OrderApi.get_order_edi_documents ...'
|
788
|
+
end
|
789
|
+
# verify the required parameter 'order_id' is set
|
790
|
+
if @api_client.config.client_side_validation && order_id.nil?
|
791
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.get_order_edi_documents"
|
792
|
+
end
|
793
|
+
# resource path
|
794
|
+
local_var_path = '/order/orders/{order_id}/edi'.sub('{' + 'order_id' + '}', order_id.to_s)
|
795
|
+
|
796
|
+
# query parameters
|
797
|
+
query_params = {}
|
798
|
+
|
799
|
+
# header parameters
|
800
|
+
header_params = {}
|
801
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
802
|
+
# HTTP header 'Accept' (if needed)
|
803
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
804
|
+
# HTTP header 'Content-Type'
|
805
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
806
|
+
|
807
|
+
# form parameters
|
808
|
+
form_params = {}
|
809
|
+
|
810
|
+
# http body (model)
|
811
|
+
post_body = nil
|
812
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
813
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
814
|
+
:header_params => header_params,
|
815
|
+
:query_params => query_params,
|
816
|
+
:form_params => form_params,
|
817
|
+
:body => post_body,
|
818
|
+
:auth_names => auth_names,
|
819
|
+
:return_type => 'OrderEdiDocumentsResponse')
|
820
|
+
if @api_client.config.debugging
|
821
|
+
@api_client.config.logger.debug "API called: OrderApi#get_order_edi_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
822
|
+
end
|
823
|
+
return data, status_code, headers
|
824
|
+
end
|
770
825
|
# Retrieve orders
|
771
826
|
# Retrieves a group of orders from the account. If no parameters are specified, the API call will fail with a bad request error. Always specify some parameters to limit the scope of the orders returned to ones you are truly interested in. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
772
827
|
# @param [Hash] opts the optional parameters
|
@@ -49,6 +49,8 @@ module UltracartClient
|
|
49
49
|
|
50
50
|
attr_accessor :participants
|
51
51
|
|
52
|
+
attr_accessor :sentiment
|
53
|
+
|
52
54
|
# Start of the conversation date/time
|
53
55
|
attr_accessor :start_dts
|
54
56
|
|
@@ -96,6 +98,7 @@ module UltracartClient
|
|
96
98
|
:'message_count' => :'message_count',
|
97
99
|
:'messages' => :'messages',
|
98
100
|
:'participants' => :'participants',
|
101
|
+
:'sentiment' => :'sentiment',
|
99
102
|
:'start_dts' => :'start_dts',
|
100
103
|
:'unread_messages' => :'unread_messages',
|
101
104
|
:'visible' => :'visible'
|
@@ -120,6 +123,7 @@ module UltracartClient
|
|
120
123
|
:'message_count' => :'Integer',
|
121
124
|
:'messages' => :'Array<ConversationMessage>',
|
122
125
|
:'participants' => :'Array<ConversationParticipant>',
|
126
|
+
:'sentiment' => :'ConversationSentiment',
|
123
127
|
:'start_dts' => :'String',
|
124
128
|
:'unread_messages' => :'BOOLEAN',
|
125
129
|
:'visible' => :'BOOLEAN'
|
@@ -198,6 +202,10 @@ module UltracartClient
|
|
198
202
|
end
|
199
203
|
end
|
200
204
|
|
205
|
+
if attributes.has_key?(:'sentiment')
|
206
|
+
self.sentiment = attributes[:'sentiment']
|
207
|
+
end
|
208
|
+
|
201
209
|
if attributes.has_key?(:'start_dts')
|
202
210
|
self.start_dts = attributes[:'start_dts']
|
203
211
|
end
|
@@ -256,6 +264,7 @@ module UltracartClient
|
|
256
264
|
message_count == o.message_count &&
|
257
265
|
messages == o.messages &&
|
258
266
|
participants == o.participants &&
|
267
|
+
sentiment == o.sentiment &&
|
259
268
|
start_dts == o.start_dts &&
|
260
269
|
unread_messages == o.unread_messages &&
|
261
270
|
visible == o.visible
|
@@ -270,7 +279,7 @@ module UltracartClient
|
|
270
279
|
# Calculates hash code according to all attributes.
|
271
280
|
# @return [Fixnum] Hash code
|
272
281
|
def hash
|
273
|
-
[base_language_iso_code, closed, conversation_arn, conversation_uuid, customer_first_message_unresponded_to_dts, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_interactive_message_dts, last_message_dts, medium, merchant_id, message_count, messages, participants, start_dts, unread_messages, visible].hash
|
282
|
+
[base_language_iso_code, closed, conversation_arn, conversation_uuid, customer_first_message_unresponded_to_dts, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_interactive_message_dts, last_message_dts, medium, merchant_id, message_count, messages, participants, sentiment, start_dts, unread_messages, visible].hash
|
274
283
|
end
|
275
284
|
|
276
285
|
# Builds the object from hash
|
@@ -0,0 +1,269 @@
|
|
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 ConversationSentiment
|
17
|
+
# The last time the detect sentiment was run on this conversation
|
18
|
+
attr_accessor :last_detect_sentiment
|
19
|
+
|
20
|
+
# The mixed score
|
21
|
+
attr_accessor :mixed
|
22
|
+
|
23
|
+
# The negative score
|
24
|
+
attr_accessor :negative
|
25
|
+
|
26
|
+
# The neutral score
|
27
|
+
attr_accessor :neutral
|
28
|
+
|
29
|
+
# The positive score
|
30
|
+
attr_accessor :positive
|
31
|
+
|
32
|
+
# The overall sentiment
|
33
|
+
attr_accessor :sentiment
|
34
|
+
|
35
|
+
class EnumAttributeValidator
|
36
|
+
attr_reader :datatype
|
37
|
+
attr_reader :allowable_values
|
38
|
+
|
39
|
+
def initialize(datatype, allowable_values)
|
40
|
+
@allowable_values = allowable_values.map do |value|
|
41
|
+
case datatype.to_s
|
42
|
+
when /Integer/i
|
43
|
+
value.to_i
|
44
|
+
when /Float/i
|
45
|
+
value.to_f
|
46
|
+
else
|
47
|
+
value
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def valid?(value)
|
53
|
+
!value || allowable_values.include?(value)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
58
|
+
def self.attribute_map
|
59
|
+
{
|
60
|
+
:'last_detect_sentiment' => :'last_detect_sentiment',
|
61
|
+
:'mixed' => :'mixed',
|
62
|
+
:'negative' => :'negative',
|
63
|
+
:'neutral' => :'neutral',
|
64
|
+
:'positive' => :'positive',
|
65
|
+
:'sentiment' => :'sentiment'
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
# Attribute type mapping.
|
70
|
+
def self.swagger_types
|
71
|
+
{
|
72
|
+
:'last_detect_sentiment' => :'String',
|
73
|
+
:'mixed' => :'Float',
|
74
|
+
:'negative' => :'Float',
|
75
|
+
:'neutral' => :'Float',
|
76
|
+
:'positive' => :'Float',
|
77
|
+
:'sentiment' => :'String'
|
78
|
+
}
|
79
|
+
end
|
80
|
+
|
81
|
+
# Initializes the object
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
83
|
+
def initialize(attributes = {})
|
84
|
+
return unless attributes.is_a?(Hash)
|
85
|
+
|
86
|
+
# convert string to symbol for hash key
|
87
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
88
|
+
|
89
|
+
if attributes.has_key?(:'last_detect_sentiment')
|
90
|
+
self.last_detect_sentiment = attributes[:'last_detect_sentiment']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_key?(:'mixed')
|
94
|
+
self.mixed = attributes[:'mixed']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.has_key?(:'negative')
|
98
|
+
self.negative = attributes[:'negative']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.has_key?(:'neutral')
|
102
|
+
self.neutral = attributes[:'neutral']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.has_key?(:'positive')
|
106
|
+
self.positive = attributes[:'positive']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.has_key?(:'sentiment')
|
110
|
+
self.sentiment = attributes[:'sentiment']
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
115
|
+
# @return Array for valid properties with the reasons
|
116
|
+
def list_invalid_properties
|
117
|
+
invalid_properties = Array.new
|
118
|
+
invalid_properties
|
119
|
+
end
|
120
|
+
|
121
|
+
# Check to see if the all the properties in the model are valid
|
122
|
+
# @return true if the model is valid
|
123
|
+
def valid?
|
124
|
+
sentiment_validator = EnumAttributeValidator.new('String', ['POSITIVE', 'NEUTRAL', 'NEGATIVE', 'MIXED'])
|
125
|
+
return false unless sentiment_validator.valid?(@sentiment)
|
126
|
+
true
|
127
|
+
end
|
128
|
+
|
129
|
+
# Custom attribute writer method checking allowed values (enum).
|
130
|
+
# @param [Object] sentiment Object to be assigned
|
131
|
+
def sentiment=(sentiment)
|
132
|
+
validator = EnumAttributeValidator.new('String', ['POSITIVE', 'NEUTRAL', 'NEGATIVE', 'MIXED'])
|
133
|
+
unless validator.valid?(sentiment)
|
134
|
+
fail ArgumentError, 'invalid value for "sentiment", must be one of #{validator.allowable_values}.'
|
135
|
+
end
|
136
|
+
@sentiment = sentiment
|
137
|
+
end
|
138
|
+
|
139
|
+
# Checks equality by comparing each attribute.
|
140
|
+
# @param [Object] Object to be compared
|
141
|
+
def ==(o)
|
142
|
+
return true if self.equal?(o)
|
143
|
+
self.class == o.class &&
|
144
|
+
last_detect_sentiment == o.last_detect_sentiment &&
|
145
|
+
mixed == o.mixed &&
|
146
|
+
negative == o.negative &&
|
147
|
+
neutral == o.neutral &&
|
148
|
+
positive == o.positive &&
|
149
|
+
sentiment == o.sentiment
|
150
|
+
end
|
151
|
+
|
152
|
+
# @see the `==` method
|
153
|
+
# @param [Object] Object to be compared
|
154
|
+
def eql?(o)
|
155
|
+
self == o
|
156
|
+
end
|
157
|
+
|
158
|
+
# Calculates hash code according to all attributes.
|
159
|
+
# @return [Fixnum] Hash code
|
160
|
+
def hash
|
161
|
+
[last_detect_sentiment, mixed, negative, neutral, positive, sentiment].hash
|
162
|
+
end
|
163
|
+
|
164
|
+
# Builds the object from hash
|
165
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
166
|
+
# @return [Object] Returns the model itself
|
167
|
+
def build_from_hash(attributes)
|
168
|
+
return nil unless attributes.is_a?(Hash)
|
169
|
+
self.class.swagger_types.each_pair do |key, type|
|
170
|
+
if type =~ /\AArray<(.*)>/i
|
171
|
+
# check to ensure the input is an array given that the attribute
|
172
|
+
# is documented as an array but the input is not
|
173
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
174
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
175
|
+
end
|
176
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
177
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
178
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
179
|
+
end
|
180
|
+
|
181
|
+
self
|
182
|
+
end
|
183
|
+
|
184
|
+
# Deserializes the data based on type
|
185
|
+
# @param string type Data type
|
186
|
+
# @param string value Value to be deserialized
|
187
|
+
# @return [Object] Deserialized data
|
188
|
+
def _deserialize(type, value)
|
189
|
+
case type.to_sym
|
190
|
+
when :DateTime
|
191
|
+
DateTime.parse(value)
|
192
|
+
when :Date
|
193
|
+
Date.parse(value)
|
194
|
+
when :String
|
195
|
+
value.to_s
|
196
|
+
when :Integer
|
197
|
+
value.to_i
|
198
|
+
when :Float
|
199
|
+
value.to_f
|
200
|
+
when :BOOLEAN
|
201
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
202
|
+
true
|
203
|
+
else
|
204
|
+
false
|
205
|
+
end
|
206
|
+
when :Object
|
207
|
+
# generic object (usually a Hash), return directly
|
208
|
+
value
|
209
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
210
|
+
inner_type = Regexp.last_match[:inner_type]
|
211
|
+
value.map { |v| _deserialize(inner_type, v) }
|
212
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
213
|
+
k_type = Regexp.last_match[:k_type]
|
214
|
+
v_type = Regexp.last_match[:v_type]
|
215
|
+
{}.tap do |hash|
|
216
|
+
value.each do |k, v|
|
217
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
218
|
+
end
|
219
|
+
end
|
220
|
+
else # model
|
221
|
+
temp_model = UltracartClient.const_get(type).new
|
222
|
+
temp_model.build_from_hash(value)
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
# Returns the string representation of the object
|
227
|
+
# @return [String] String presentation of the object
|
228
|
+
def to_s
|
229
|
+
to_hash.to_s
|
230
|
+
end
|
231
|
+
|
232
|
+
# to_body is an alias to to_hash (backward compatibility)
|
233
|
+
# @return [Hash] Returns the object in the form of hash
|
234
|
+
def to_body
|
235
|
+
to_hash
|
236
|
+
end
|
237
|
+
|
238
|
+
# Returns the object in the form of hash
|
239
|
+
# @return [Hash] Returns the object in the form of hash
|
240
|
+
def to_hash
|
241
|
+
hash = {}
|
242
|
+
self.class.attribute_map.each_pair do |attr, param|
|
243
|
+
value = self.send(attr)
|
244
|
+
next if value.nil?
|
245
|
+
hash[param] = _to_hash(value)
|
246
|
+
end
|
247
|
+
hash
|
248
|
+
end
|
249
|
+
|
250
|
+
# Outputs non-array value in the form of hash
|
251
|
+
# For object, use to_hash. Otherwise, just return the value
|
252
|
+
# @param [Object] value Any valid value
|
253
|
+
# @return [Hash] Returns the value in the form of hash
|
254
|
+
def _to_hash(value)
|
255
|
+
if value.is_a?(Array)
|
256
|
+
value.compact.map { |v| _to_hash(v) }
|
257
|
+
elsif value.is_a?(Hash)
|
258
|
+
{}.tap do |hash|
|
259
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
260
|
+
end
|
261
|
+
elsif value.respond_to? :to_hash
|
262
|
+
value.to_hash
|
263
|
+
else
|
264
|
+
value
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
end
|
269
|
+
end
|
@@ -44,6 +44,8 @@ module UltracartClient
|
|
44
44
|
|
45
45
|
attr_accessor :participants
|
46
46
|
|
47
|
+
attr_accessor :sentiment
|
48
|
+
|
47
49
|
# Start of the conversation date/time
|
48
50
|
attr_accessor :start_dts
|
49
51
|
|
@@ -89,6 +91,7 @@ module UltracartClient
|
|
89
91
|
:'merchant_id' => :'merchant_id',
|
90
92
|
:'message_count' => :'message_count',
|
91
93
|
:'participants' => :'participants',
|
94
|
+
:'sentiment' => :'sentiment',
|
92
95
|
:'start_dts' => :'start_dts',
|
93
96
|
:'unread_messages' => :'unread_messages',
|
94
97
|
:'visible' => :'visible'
|
@@ -111,6 +114,7 @@ module UltracartClient
|
|
111
114
|
:'merchant_id' => :'String',
|
112
115
|
:'message_count' => :'Integer',
|
113
116
|
:'participants' => :'Array<ConversationParticipant>',
|
117
|
+
:'sentiment' => :'ConversationSentiment',
|
114
118
|
:'start_dts' => :'String',
|
115
119
|
:'unread_messages' => :'BOOLEAN',
|
116
120
|
:'visible' => :'BOOLEAN'
|
@@ -179,6 +183,10 @@ module UltracartClient
|
|
179
183
|
end
|
180
184
|
end
|
181
185
|
|
186
|
+
if attributes.has_key?(:'sentiment')
|
187
|
+
self.sentiment = attributes[:'sentiment']
|
188
|
+
end
|
189
|
+
|
182
190
|
if attributes.has_key?(:'start_dts')
|
183
191
|
self.start_dts = attributes[:'start_dts']
|
184
192
|
end
|
@@ -235,6 +243,7 @@ module UltracartClient
|
|
235
243
|
merchant_id == o.merchant_id &&
|
236
244
|
message_count == o.message_count &&
|
237
245
|
participants == o.participants &&
|
246
|
+
sentiment == o.sentiment &&
|
238
247
|
start_dts == o.start_dts &&
|
239
248
|
unread_messages == o.unread_messages &&
|
240
249
|
visible == o.visible
|
@@ -249,7 +258,7 @@ module UltracartClient
|
|
249
258
|
# Calculates hash code according to all attributes.
|
250
259
|
# @return [Fixnum] Hash code
|
251
260
|
def hash
|
252
|
-
[closed, conversation_arn, conversation_uuid, customer_first_message_unresponded_to_dts, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_interactive_message_dts, last_message_dts, medium, merchant_id, message_count, participants, start_dts, unread_messages, visible].hash
|
261
|
+
[closed, conversation_arn, conversation_uuid, customer_first_message_unresponded_to_dts, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_interactive_message_dts, last_message_dts, medium, merchant_id, message_count, participants, sentiment, start_dts, unread_messages, visible].hash
|
253
262
|
end
|
254
263
|
|
255
264
|
# Builds the object from hash
|
@@ -0,0 +1,337 @@
|
|
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 OrderEdiDocument
|
17
|
+
# Direction the document flowed
|
18
|
+
attr_accessor :direction
|
19
|
+
|
20
|
+
# Date/time the document was created/received
|
21
|
+
attr_accessor :doc_dts
|
22
|
+
|
23
|
+
attr_accessor :document
|
24
|
+
|
25
|
+
attr_accessor :document_type_description
|
26
|
+
|
27
|
+
attr_accessor :document_type_number
|
28
|
+
|
29
|
+
attr_accessor :external_id
|
30
|
+
|
31
|
+
attr_accessor :functional_acknowledgement
|
32
|
+
|
33
|
+
attr_accessor :functional_acknowledgement_dts
|
34
|
+
|
35
|
+
attr_accessor :functional_acknowledgement_pending
|
36
|
+
|
37
|
+
attr_accessor :group_control_number
|
38
|
+
|
39
|
+
attr_accessor :internal_id
|
40
|
+
|
41
|
+
attr_accessor :merchant_id
|
42
|
+
|
43
|
+
attr_accessor :order_id
|
44
|
+
|
45
|
+
attr_accessor :test_mode
|
46
|
+
|
47
|
+
class EnumAttributeValidator
|
48
|
+
attr_reader :datatype
|
49
|
+
attr_reader :allowable_values
|
50
|
+
|
51
|
+
def initialize(datatype, allowable_values)
|
52
|
+
@allowable_values = allowable_values.map do |value|
|
53
|
+
case datatype.to_s
|
54
|
+
when /Integer/i
|
55
|
+
value.to_i
|
56
|
+
when /Float/i
|
57
|
+
value.to_f
|
58
|
+
else
|
59
|
+
value
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def valid?(value)
|
65
|
+
!value || allowable_values.include?(value)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
70
|
+
def self.attribute_map
|
71
|
+
{
|
72
|
+
:'direction' => :'direction',
|
73
|
+
:'doc_dts' => :'doc_dts',
|
74
|
+
:'document' => :'document',
|
75
|
+
:'document_type_description' => :'document_type_description',
|
76
|
+
:'document_type_number' => :'document_type_number',
|
77
|
+
:'external_id' => :'external_id',
|
78
|
+
:'functional_acknowledgement' => :'functional_acknowledgement',
|
79
|
+
:'functional_acknowledgement_dts' => :'functional_acknowledgement_dts',
|
80
|
+
:'functional_acknowledgement_pending' => :'functional_acknowledgement_pending',
|
81
|
+
:'group_control_number' => :'group_control_number',
|
82
|
+
:'internal_id' => :'internal_id',
|
83
|
+
:'merchant_id' => :'merchant_id',
|
84
|
+
:'order_id' => :'order_id',
|
85
|
+
:'test_mode' => :'test_mode'
|
86
|
+
}
|
87
|
+
end
|
88
|
+
|
89
|
+
# Attribute type mapping.
|
90
|
+
def self.swagger_types
|
91
|
+
{
|
92
|
+
:'direction' => :'String',
|
93
|
+
:'doc_dts' => :'String',
|
94
|
+
:'document' => :'String',
|
95
|
+
:'document_type_description' => :'String',
|
96
|
+
:'document_type_number' => :'Integer',
|
97
|
+
:'external_id' => :'String',
|
98
|
+
:'functional_acknowledgement' => :'String',
|
99
|
+
:'functional_acknowledgement_dts' => :'String',
|
100
|
+
:'functional_acknowledgement_pending' => :'BOOLEAN',
|
101
|
+
:'group_control_number' => :'Integer',
|
102
|
+
:'internal_id' => :'String',
|
103
|
+
:'merchant_id' => :'String',
|
104
|
+
:'order_id' => :'String',
|
105
|
+
:'test_mode' => :'BOOLEAN'
|
106
|
+
}
|
107
|
+
end
|
108
|
+
|
109
|
+
# Initializes the object
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
111
|
+
def initialize(attributes = {})
|
112
|
+
return unless attributes.is_a?(Hash)
|
113
|
+
|
114
|
+
# convert string to symbol for hash key
|
115
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
116
|
+
|
117
|
+
if attributes.has_key?(:'direction')
|
118
|
+
self.direction = attributes[:'direction']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.has_key?(:'doc_dts')
|
122
|
+
self.doc_dts = attributes[:'doc_dts']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.has_key?(:'document')
|
126
|
+
self.document = attributes[:'document']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.has_key?(:'document_type_description')
|
130
|
+
self.document_type_description = attributes[:'document_type_description']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.has_key?(:'document_type_number')
|
134
|
+
self.document_type_number = attributes[:'document_type_number']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.has_key?(:'external_id')
|
138
|
+
self.external_id = attributes[:'external_id']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.has_key?(:'functional_acknowledgement')
|
142
|
+
self.functional_acknowledgement = attributes[:'functional_acknowledgement']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.has_key?(:'functional_acknowledgement_dts')
|
146
|
+
self.functional_acknowledgement_dts = attributes[:'functional_acknowledgement_dts']
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.has_key?(:'functional_acknowledgement_pending')
|
150
|
+
self.functional_acknowledgement_pending = attributes[:'functional_acknowledgement_pending']
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes.has_key?(:'group_control_number')
|
154
|
+
self.group_control_number = attributes[:'group_control_number']
|
155
|
+
end
|
156
|
+
|
157
|
+
if attributes.has_key?(:'internal_id')
|
158
|
+
self.internal_id = attributes[:'internal_id']
|
159
|
+
end
|
160
|
+
|
161
|
+
if attributes.has_key?(:'merchant_id')
|
162
|
+
self.merchant_id = attributes[:'merchant_id']
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.has_key?(:'order_id')
|
166
|
+
self.order_id = attributes[:'order_id']
|
167
|
+
end
|
168
|
+
|
169
|
+
if attributes.has_key?(:'test_mode')
|
170
|
+
self.test_mode = attributes[:'test_mode']
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
175
|
+
# @return Array for valid properties with the reasons
|
176
|
+
def list_invalid_properties
|
177
|
+
invalid_properties = Array.new
|
178
|
+
invalid_properties
|
179
|
+
end
|
180
|
+
|
181
|
+
# Check to see if the all the properties in the model are valid
|
182
|
+
# @return true if the model is valid
|
183
|
+
def valid?
|
184
|
+
direction_validator = EnumAttributeValidator.new('String', ['inbound', 'outbound'])
|
185
|
+
return false unless direction_validator.valid?(@direction)
|
186
|
+
true
|
187
|
+
end
|
188
|
+
|
189
|
+
# Custom attribute writer method checking allowed values (enum).
|
190
|
+
# @param [Object] direction Object to be assigned
|
191
|
+
def direction=(direction)
|
192
|
+
validator = EnumAttributeValidator.new('String', ['inbound', 'outbound'])
|
193
|
+
unless validator.valid?(direction)
|
194
|
+
fail ArgumentError, 'invalid value for "direction", must be one of #{validator.allowable_values}.'
|
195
|
+
end
|
196
|
+
@direction = direction
|
197
|
+
end
|
198
|
+
|
199
|
+
# Checks equality by comparing each attribute.
|
200
|
+
# @param [Object] Object to be compared
|
201
|
+
def ==(o)
|
202
|
+
return true if self.equal?(o)
|
203
|
+
self.class == o.class &&
|
204
|
+
direction == o.direction &&
|
205
|
+
doc_dts == o.doc_dts &&
|
206
|
+
document == o.document &&
|
207
|
+
document_type_description == o.document_type_description &&
|
208
|
+
document_type_number == o.document_type_number &&
|
209
|
+
external_id == o.external_id &&
|
210
|
+
functional_acknowledgement == o.functional_acknowledgement &&
|
211
|
+
functional_acknowledgement_dts == o.functional_acknowledgement_dts &&
|
212
|
+
functional_acknowledgement_pending == o.functional_acknowledgement_pending &&
|
213
|
+
group_control_number == o.group_control_number &&
|
214
|
+
internal_id == o.internal_id &&
|
215
|
+
merchant_id == o.merchant_id &&
|
216
|
+
order_id == o.order_id &&
|
217
|
+
test_mode == o.test_mode
|
218
|
+
end
|
219
|
+
|
220
|
+
# @see the `==` method
|
221
|
+
# @param [Object] Object to be compared
|
222
|
+
def eql?(o)
|
223
|
+
self == o
|
224
|
+
end
|
225
|
+
|
226
|
+
# Calculates hash code according to all attributes.
|
227
|
+
# @return [Fixnum] Hash code
|
228
|
+
def hash
|
229
|
+
[direction, doc_dts, document, document_type_description, document_type_number, external_id, functional_acknowledgement, functional_acknowledgement_dts, functional_acknowledgement_pending, group_control_number, internal_id, merchant_id, order_id, test_mode].hash
|
230
|
+
end
|
231
|
+
|
232
|
+
# Builds the object from hash
|
233
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
234
|
+
# @return [Object] Returns the model itself
|
235
|
+
def build_from_hash(attributes)
|
236
|
+
return nil unless attributes.is_a?(Hash)
|
237
|
+
self.class.swagger_types.each_pair do |key, type|
|
238
|
+
if type =~ /\AArray<(.*)>/i
|
239
|
+
# check to ensure the input is an array given that the attribute
|
240
|
+
# is documented as an array but the input is not
|
241
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
242
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
243
|
+
end
|
244
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
245
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
246
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
247
|
+
end
|
248
|
+
|
249
|
+
self
|
250
|
+
end
|
251
|
+
|
252
|
+
# Deserializes the data based on type
|
253
|
+
# @param string type Data type
|
254
|
+
# @param string value Value to be deserialized
|
255
|
+
# @return [Object] Deserialized data
|
256
|
+
def _deserialize(type, value)
|
257
|
+
case type.to_sym
|
258
|
+
when :DateTime
|
259
|
+
DateTime.parse(value)
|
260
|
+
when :Date
|
261
|
+
Date.parse(value)
|
262
|
+
when :String
|
263
|
+
value.to_s
|
264
|
+
when :Integer
|
265
|
+
value.to_i
|
266
|
+
when :Float
|
267
|
+
value.to_f
|
268
|
+
when :BOOLEAN
|
269
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
270
|
+
true
|
271
|
+
else
|
272
|
+
false
|
273
|
+
end
|
274
|
+
when :Object
|
275
|
+
# generic object (usually a Hash), return directly
|
276
|
+
value
|
277
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
278
|
+
inner_type = Regexp.last_match[:inner_type]
|
279
|
+
value.map { |v| _deserialize(inner_type, v) }
|
280
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
281
|
+
k_type = Regexp.last_match[:k_type]
|
282
|
+
v_type = Regexp.last_match[:v_type]
|
283
|
+
{}.tap do |hash|
|
284
|
+
value.each do |k, v|
|
285
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
286
|
+
end
|
287
|
+
end
|
288
|
+
else # model
|
289
|
+
temp_model = UltracartClient.const_get(type).new
|
290
|
+
temp_model.build_from_hash(value)
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
# Returns the string representation of the object
|
295
|
+
# @return [String] String presentation of the object
|
296
|
+
def to_s
|
297
|
+
to_hash.to_s
|
298
|
+
end
|
299
|
+
|
300
|
+
# to_body is an alias to to_hash (backward compatibility)
|
301
|
+
# @return [Hash] Returns the object in the form of hash
|
302
|
+
def to_body
|
303
|
+
to_hash
|
304
|
+
end
|
305
|
+
|
306
|
+
# Returns the object in the form of hash
|
307
|
+
# @return [Hash] Returns the object in the form of hash
|
308
|
+
def to_hash
|
309
|
+
hash = {}
|
310
|
+
self.class.attribute_map.each_pair do |attr, param|
|
311
|
+
value = self.send(attr)
|
312
|
+
next if value.nil?
|
313
|
+
hash[param] = _to_hash(value)
|
314
|
+
end
|
315
|
+
hash
|
316
|
+
end
|
317
|
+
|
318
|
+
# Outputs non-array value in the form of hash
|
319
|
+
# For object, use to_hash. Otherwise, just return the value
|
320
|
+
# @param [Object] value Any valid value
|
321
|
+
# @return [Hash] Returns the value in the form of hash
|
322
|
+
def _to_hash(value)
|
323
|
+
if value.is_a?(Array)
|
324
|
+
value.compact.map { |v| _to_hash(v) }
|
325
|
+
elsif value.is_a?(Hash)
|
326
|
+
{}.tap do |hash|
|
327
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
328
|
+
end
|
329
|
+
elsif value.respond_to? :to_hash
|
330
|
+
value.to_hash
|
331
|
+
else
|
332
|
+
value
|
333
|
+
end
|
334
|
+
end
|
335
|
+
|
336
|
+
end
|
337
|
+
end
|
@@ -0,0 +1,224 @@
|
|
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 OrderEdiDocumentsResponse
|
17
|
+
# edi_documents
|
18
|
+
attr_accessor :edi_documents
|
19
|
+
|
20
|
+
attr_accessor :error
|
21
|
+
|
22
|
+
attr_accessor :metadata
|
23
|
+
|
24
|
+
# Indicates if API call was successful
|
25
|
+
attr_accessor :success
|
26
|
+
|
27
|
+
attr_accessor :warning
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'edi_documents' => :'ediDocuments',
|
33
|
+
:'error' => :'error',
|
34
|
+
:'metadata' => :'metadata',
|
35
|
+
:'success' => :'success',
|
36
|
+
:'warning' => :'warning'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Attribute type mapping.
|
41
|
+
def self.swagger_types
|
42
|
+
{
|
43
|
+
:'edi_documents' => :'Array<OrderEdiDocument>',
|
44
|
+
:'error' => :'Error',
|
45
|
+
:'metadata' => :'ResponseMetadata',
|
46
|
+
:'success' => :'BOOLEAN',
|
47
|
+
:'warning' => :'Warning'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
return unless attributes.is_a?(Hash)
|
55
|
+
|
56
|
+
# convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
58
|
+
|
59
|
+
if attributes.has_key?(:'ediDocuments')
|
60
|
+
if (value = attributes[:'ediDocuments']).is_a?(Array)
|
61
|
+
self.edi_documents = value
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.has_key?(:'error')
|
66
|
+
self.error = attributes[:'error']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.has_key?(:'metadata')
|
70
|
+
self.metadata = attributes[:'metadata']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.has_key?(:'success')
|
74
|
+
self.success = attributes[:'success']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'warning')
|
78
|
+
self.warning = attributes[:'warning']
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
83
|
+
# @return Array for valid properties with the reasons
|
84
|
+
def list_invalid_properties
|
85
|
+
invalid_properties = Array.new
|
86
|
+
invalid_properties
|
87
|
+
end
|
88
|
+
|
89
|
+
# Check to see if the all the properties in the model are valid
|
90
|
+
# @return true if the model is valid
|
91
|
+
def valid?
|
92
|
+
true
|
93
|
+
end
|
94
|
+
|
95
|
+
# Checks equality by comparing each attribute.
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def ==(o)
|
98
|
+
return true if self.equal?(o)
|
99
|
+
self.class == o.class &&
|
100
|
+
edi_documents == o.edi_documents &&
|
101
|
+
error == o.error &&
|
102
|
+
metadata == o.metadata &&
|
103
|
+
success == o.success &&
|
104
|
+
warning == o.warning
|
105
|
+
end
|
106
|
+
|
107
|
+
# @see the `==` method
|
108
|
+
# @param [Object] Object to be compared
|
109
|
+
def eql?(o)
|
110
|
+
self == o
|
111
|
+
end
|
112
|
+
|
113
|
+
# Calculates hash code according to all attributes.
|
114
|
+
# @return [Fixnum] Hash code
|
115
|
+
def hash
|
116
|
+
[edi_documents, error, metadata, success, warning].hash
|
117
|
+
end
|
118
|
+
|
119
|
+
# Builds the object from hash
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
121
|
+
# @return [Object] Returns the model itself
|
122
|
+
def build_from_hash(attributes)
|
123
|
+
return nil unless attributes.is_a?(Hash)
|
124
|
+
self.class.swagger_types.each_pair do |key, type|
|
125
|
+
if type =~ /\AArray<(.*)>/i
|
126
|
+
# check to ensure the input is an array given that the attribute
|
127
|
+
# is documented as an array but the input is not
|
128
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
129
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
130
|
+
end
|
131
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
132
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
133
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
134
|
+
end
|
135
|
+
|
136
|
+
self
|
137
|
+
end
|
138
|
+
|
139
|
+
# Deserializes the data based on type
|
140
|
+
# @param string type Data type
|
141
|
+
# @param string value Value to be deserialized
|
142
|
+
# @return [Object] Deserialized data
|
143
|
+
def _deserialize(type, value)
|
144
|
+
case type.to_sym
|
145
|
+
when :DateTime
|
146
|
+
DateTime.parse(value)
|
147
|
+
when :Date
|
148
|
+
Date.parse(value)
|
149
|
+
when :String
|
150
|
+
value.to_s
|
151
|
+
when :Integer
|
152
|
+
value.to_i
|
153
|
+
when :Float
|
154
|
+
value.to_f
|
155
|
+
when :BOOLEAN
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
157
|
+
true
|
158
|
+
else
|
159
|
+
false
|
160
|
+
end
|
161
|
+
when :Object
|
162
|
+
# generic object (usually a Hash), return directly
|
163
|
+
value
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
170
|
+
{}.tap do |hash|
|
171
|
+
value.each do |k, v|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
else # model
|
176
|
+
temp_model = UltracartClient.const_get(type).new
|
177
|
+
temp_model.build_from_hash(value)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
# Returns the string representation of the object
|
182
|
+
# @return [String] String presentation of the object
|
183
|
+
def to_s
|
184
|
+
to_hash.to_s
|
185
|
+
end
|
186
|
+
|
187
|
+
# to_body is an alias to to_hash (backward compatibility)
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
189
|
+
def to_body
|
190
|
+
to_hash
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the object in the form of hash
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
195
|
+
def to_hash
|
196
|
+
hash = {}
|
197
|
+
self.class.attribute_map.each_pair do |attr, param|
|
198
|
+
value = self.send(attr)
|
199
|
+
next if value.nil?
|
200
|
+
hash[param] = _to_hash(value)
|
201
|
+
end
|
202
|
+
hash
|
203
|
+
end
|
204
|
+
|
205
|
+
# Outputs non-array value in the form of hash
|
206
|
+
# For object, use to_hash. Otherwise, just return the value
|
207
|
+
# @param [Object] value Any valid value
|
208
|
+
# @return [Hash] Returns the value in the form of hash
|
209
|
+
def _to_hash(value)
|
210
|
+
if value.is_a?(Array)
|
211
|
+
value.compact.map { |v| _to_hash(v) }
|
212
|
+
elsif value.is_a?(Hash)
|
213
|
+
{}.tap do |hash|
|
214
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
215
|
+
end
|
216
|
+
elsif value.respond_to? :to_hash
|
217
|
+
value.to_hash
|
218
|
+
else
|
219
|
+
value
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
end
|
224
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -187,6 +187,7 @@ require 'ultracart_api/models/conversation_permissions_response'
|
|
187
187
|
require 'ultracart_api/models/conversation_response'
|
188
188
|
require 'ultracart_api/models/conversation_search_request'
|
189
189
|
require 'ultracart_api/models/conversation_search_response'
|
190
|
+
require 'ultracart_api/models/conversation_sentiment'
|
190
191
|
require 'ultracart_api/models/conversation_start_request'
|
191
192
|
require 'ultracart_api/models/conversation_start_response'
|
192
193
|
require 'ultracart_api/models/conversation_summary'
|
@@ -577,6 +578,8 @@ require 'ultracart_api/models/order_coupon'
|
|
577
578
|
require 'ultracart_api/models/order_digital_item'
|
578
579
|
require 'ultracart_api/models/order_digital_order'
|
579
580
|
require 'ultracart_api/models/order_edi'
|
581
|
+
require 'ultracart_api/models/order_edi_document'
|
582
|
+
require 'ultracart_api/models/order_edi_documents_response'
|
580
583
|
require 'ultracart_api/models/order_format'
|
581
584
|
require 'ultracart_api/models/order_format_response'
|
582
585
|
require 'ultracart_api/models/order_fraud_score'
|
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.
|
4
|
+
version: 3.10.122
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -397,6 +397,7 @@ files:
|
|
397
397
|
- docs/ConversationResponse.md
|
398
398
|
- docs/ConversationSearchRequest.md
|
399
399
|
- docs/ConversationSearchResponse.md
|
400
|
+
- docs/ConversationSentiment.md
|
400
401
|
- docs/ConversationStartRequest.md
|
401
402
|
- docs/ConversationStartResponse.md
|
402
403
|
- docs/ConversationSummary.md
|
@@ -795,6 +796,8 @@ files:
|
|
795
796
|
- docs/OrderDigitalItem.md
|
796
797
|
- docs/OrderDigitalOrder.md
|
797
798
|
- docs/OrderEdi.md
|
799
|
+
- docs/OrderEdiDocument.md
|
800
|
+
- docs/OrderEdiDocumentsResponse.md
|
798
801
|
- docs/OrderFormat.md
|
799
802
|
- docs/OrderFormatResponse.md
|
800
803
|
- docs/OrderFraudScore.md
|
@@ -1174,6 +1177,7 @@ files:
|
|
1174
1177
|
- lib/ultracart_api/models/conversation_response.rb
|
1175
1178
|
- lib/ultracart_api/models/conversation_search_request.rb
|
1176
1179
|
- lib/ultracart_api/models/conversation_search_response.rb
|
1180
|
+
- lib/ultracart_api/models/conversation_sentiment.rb
|
1177
1181
|
- lib/ultracart_api/models/conversation_start_request.rb
|
1178
1182
|
- lib/ultracart_api/models/conversation_start_response.rb
|
1179
1183
|
- lib/ultracart_api/models/conversation_summary.rb
|
@@ -1564,6 +1568,8 @@ files:
|
|
1564
1568
|
- lib/ultracart_api/models/order_digital_item.rb
|
1565
1569
|
- lib/ultracart_api/models/order_digital_order.rb
|
1566
1570
|
- lib/ultracart_api/models/order_edi.rb
|
1571
|
+
- lib/ultracart_api/models/order_edi_document.rb
|
1572
|
+
- lib/ultracart_api/models/order_edi_documents_response.rb
|
1567
1573
|
- lib/ultracart_api/models/order_format.rb
|
1568
1574
|
- lib/ultracart_api/models/order_format_response.rb
|
1569
1575
|
- lib/ultracart_api/models/order_fraud_score.rb
|