ultracart_api 4.0.52.rc → 4.0.53.rc

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: 9934de6bf631146a417c171eccb5221176b363b6885ed827b59895d09819394c
4
- data.tar.gz: 5051d974c29f7ae6f8066b3b631578e2d7f70e976cc176fcb8e16bb38a0728a3
3
+ metadata.gz: 90c1f1f46b19290dbacc7ddd905336cc88761c048dd9fd6186b8804cc6ea3f3a
4
+ data.tar.gz: e5d62d5ceada964dda81b4acccc568a214032452befa4ee76bb1e83134b3053a
5
5
  SHA512:
6
- metadata.gz: 5dfc20d26a058aafdcc50ff8d06feeb9cc3002f403577b3fc087d0bba703614ee12462a8a6f99ae41befaedc52e18a69cd29382bb41e47d091e79d8eeee0b802
7
- data.tar.gz: c51ec7e764de01427f7bc6f4ab3fbb0abcdb6bc19964f8ab1acb0d2240f5718533f3425e2fe347cdefbc8e1910a42891a22e800fb830d032ece49e28843110e9
6
+ metadata.gz: 5a3fa783076a129e2db48df1d87d0795cbb406a6094a2925e81b3466d3ebad7b13e84f87b12d394d085d7c20901a0bbb13dc3b7f5b697c9e11a6ac6c7efa01a3
7
+ data.tar.gz: 298e8bbe856eb22a26b95a770b1e67bbd8ea684a048693e7964b7d4b9e77ba49c75c60ec00dc7946075dafdd1efbbebac04c78d449f0b9a8e65719b2114166c3
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 4.0.52.rc
10
+ - Package version: 4.0.53.rc
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-4.0.52.rc.gem
27
+ gem install ./ultracart_api-4.0.53.rc.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.52.rc.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.53.rc.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'ultracart_api', '~> 4.0.52.rc'
36
+ gem 'ultracart_api', '~> 4.0.53.rc'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -570,6 +570,7 @@ Class | Method | HTTP request | Description
570
570
  - [UltracartClient::ConversationAgentAuthResponse](docs/ConversationAgentAuthResponse.md)
571
571
  - [UltracartClient::ConversationEventQueuePosition](docs/ConversationEventQueuePosition.md)
572
572
  - [UltracartClient::ConversationEventRRWeb](docs/ConversationEventRRWeb.md)
573
+ - [UltracartClient::ConversationEventReadMessage](docs/ConversationEventReadMessage.md)
573
574
  - [UltracartClient::ConversationEventTyping](docs/ConversationEventTyping.md)
574
575
  - [UltracartClient::ConversationMessage](docs/ConversationMessage.md)
575
576
  - [UltracartClient::ConversationMessageTransportStatus](docs/ConversationMessageTransportStatus.md)
@@ -624,6 +625,7 @@ Class | Method | HTTP request | Description
624
625
  - [UltracartClient::CouponItemSearchResult](docs/CouponItemSearchResult.md)
625
626
  - [UltracartClient::CouponItemSearchResultsResponse](docs/CouponItemSearchResultsResponse.md)
626
627
  - [UltracartClient::CouponMultipleAmountsOffItems](docs/CouponMultipleAmountsOffItems.md)
628
+ - [UltracartClient::CouponNoDiscount](docs/CouponNoDiscount.md)
627
629
  - [UltracartClient::CouponPercentOffItemWithItemsQuantityPurchase](docs/CouponPercentOffItemWithItemsQuantityPurchase.md)
628
630
  - [UltracartClient::CouponPercentOffItems](docs/CouponPercentOffItems.md)
629
631
  - [UltracartClient::CouponPercentOffItemsAndFreeShipping](docs/CouponPercentOffItemsAndFreeShipping.md)
@@ -1180,6 +1182,7 @@ Not every change is committed to every SDK.
1180
1182
 
1181
1183
  | Version | Date | Comments |
1182
1184
  | --: | :-: | --- |
1185
+ | 4.0.53-RC | 08/10/2022 | conversation event refactoring |
1183
1186
  | 4.0.52-RC | 08/05/2022 | conversation adjustments for ES integration |
1184
1187
  | 4.0.51-RC | 08/05/2022 | conversations query by medium and stats fixes |
1185
1188
  | 4.0.50-RC | 08/03/2022 | conversation summary participants |
@@ -0,0 +1,22 @@
1
+ # UltracartClient::ConversationEventReadMessage
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **conversation_message_uuid** | **String** | | [optional] |
8
+ | **message_dts** | **String** | Message date/time | [optional] |
9
+ | **message_epoch** | **Integer** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ultracart_api'
15
+
16
+ instance = UltracartClient::ConversationEventReadMessage.new(
17
+ conversation_message_uuid: null,
18
+ message_dts: null,
19
+ message_epoch: null
20
+ )
21
+ ```
22
+
@@ -12,6 +12,7 @@
12
12
  | **media_urls** | **Array<String>** | | [optional] |
13
13
  | **merchant_id** | **String** | | [optional] |
14
14
  | **message_dts** | **String** | Message date/time | [optional] |
15
+ | **message_epoch** | **Integer** | Message epoch milliseconds | [optional] |
15
16
  | **transport_statuses** | [**Array<ConversationMessageTransportStatus>**](ConversationMessageTransportStatus.md) | | [optional] |
16
17
  | **type** | **String** | Message type | [optional] |
17
18
  | **upload_keys** | **Array<String>** | | [optional] |
@@ -30,6 +31,7 @@ instance = UltracartClient::ConversationMessage.new(
30
31
  media_urls: null,
31
32
  merchant_id: null,
32
33
  message_dts: null,
34
+ message_epoch: null,
33
35
  transport_statuses: null,
34
36
  type: null,
35
37
  upload_keys: null
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **conversation_participant_arn** | **String** | | [optional] |
8
- | **status** | **String** | | [optional] |
8
+ | **status** | **String** | The status of the message transport | [optional] |
9
9
 
10
10
  ## Example
11
11
 
@@ -11,6 +11,7 @@
11
11
  | **last_message_dts** | **String** | Last message date/time | [optional] |
12
12
  | **left_dts** | **String** | Left conversation date/time | [optional] |
13
13
  | **status** | **String** | | [optional] |
14
+ | **unread_messages** | **Integer** | | [optional] |
14
15
 
15
16
  ## Example
16
17
 
@@ -24,7 +25,8 @@ instance = UltracartClient::ConversationParticipant.new(
24
25
  joined_dts: null,
25
26
  last_message_dts: null,
26
27
  left_dts: null,
27
- status: null
28
+ status: null,
29
+ unread_messages: null
28
30
  )
29
31
  ```
30
32
 
@@ -11,6 +11,7 @@
11
11
  | **event_participant_update** | [**ConversationSummary**](ConversationSummary.md) | | [optional] |
12
12
  | **event_queue_position** | [**ConversationEventQueuePosition**](ConversationEventQueuePosition.md) | | [optional] |
13
13
  | **event_queue_status_update** | [**ConversationWebchatQueueStatus**](ConversationWebchatQueueStatus.md) | | [optional] |
14
+ | **event_read_message** | [**ConversationEventReadMessage**](ConversationEventReadMessage.md) | | [optional] |
14
15
  | **event_rrweb** | [**ConversationEventRRWeb**](ConversationEventRRWeb.md) | | [optional] |
15
16
  | **event_type** | **String** | Type of event | [optional] |
16
17
  | **event_typing** | [**ConversationEventTyping**](ConversationEventTyping.md) | | [optional] |
@@ -31,6 +32,7 @@ instance = UltracartClient::ConversationWebsocketMessage.new(
31
32
  event_participant_update: null,
32
33
  event_queue_position: null,
33
34
  event_queue_status_update: null,
35
+ event_read_message: null,
34
36
  event_rrweb: null,
35
37
  event_type: null,
36
38
  event_typing: null,
data/docs/Coupon.md CHANGED
@@ -39,7 +39,7 @@
39
39
  | **merchant_code** | **String** | Merchant code of coupon up to 20 characters. | [optional] |
40
40
  | **merchant_notes** | **String** | Internal notes about this coupon. These are not visible to customer. | [optional] |
41
41
  | **multiple_amounts_off_items** | [**CouponMultipleAmountsOffItems**](CouponMultipleAmountsOffItems.md) | | [optional] |
42
- | **no_discount** | **Object** | | [optional] |
42
+ | **no_discount** | [**CouponNoDiscount**](CouponNoDiscount.md) | | [optional] |
43
43
  | **percent_off_item_with_items_quantity_purchase** | [**CouponPercentOffItemWithItemsQuantityPurchase**](CouponPercentOffItemWithItemsQuantityPurchase.md) | | [optional] |
44
44
  | **percent_off_items** | [**CouponPercentOffItems**](CouponPercentOffItems.md) | | [optional] |
45
45
  | **percent_off_items_and_free_shipping** | [**CouponPercentOffItemsAndFreeShipping**](CouponPercentOffItemsAndFreeShipping.md) | | [optional] |
@@ -0,0 +1,18 @@
1
+ # UltracartClient::CouponNoDiscount
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ignore_this_property** | **Boolean** | This property does nothing but is included in this object to ensure the object is generated by our sdk builders. | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ultracart_api'
13
+
14
+ instance = UltracartClient::CouponNoDiscount.new(
15
+ ignore_this_property: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,238 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class ConversationEventReadMessage
18
+ attr_accessor :conversation_message_uuid
19
+
20
+ # Message date/time
21
+ attr_accessor :message_dts
22
+
23
+ attr_accessor :message_epoch
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'conversation_message_uuid' => :'conversation_message_uuid',
29
+ :'message_dts' => :'message_dts',
30
+ :'message_epoch' => :'message_epoch'
31
+ }
32
+ end
33
+
34
+ # Returns all the JSON keys this model knows about
35
+ def self.acceptable_attributes
36
+ attribute_map.values
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.openapi_types
41
+ {
42
+ :'conversation_message_uuid' => :'String',
43
+ :'message_dts' => :'String',
44
+ :'message_epoch' => :'Integer'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationEventReadMessage` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h|
63
+ if (!self.class.attribute_map.key?(k.to_sym))
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationEventReadMessage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ end
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:'conversation_message_uuid')
70
+ self.conversation_message_uuid = attributes[:'conversation_message_uuid']
71
+ end
72
+
73
+ if attributes.key?(:'message_dts')
74
+ self.message_dts = attributes[:'message_dts']
75
+ end
76
+
77
+ if attributes.key?(:'message_epoch')
78
+ self.message_epoch = attributes[:'message_epoch']
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
+ conversation_message_uuid == o.conversation_message_uuid &&
101
+ message_dts == o.message_dts &&
102
+ message_epoch == o.message_epoch
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [conversation_message_uuid, message_dts, message_epoch].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ new.build_from_hash(attributes)
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ self.class.openapi_types.each_pair do |key, type|
131
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
132
+ self.send("#{key}=", nil)
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
137
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
138
+ end
139
+ elsif !attributes[self.class.attribute_map[key]].nil?
140
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
+ end
142
+ end
143
+
144
+ self
145
+ end
146
+
147
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def _deserialize(type, value)
152
+ case type.to_sym
153
+ when :Time
154
+ Time.parse(value)
155
+ when :Date
156
+ Date.parse(value)
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :Boolean
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else # model
184
+ # models (e.g. Pet) or oneOf
185
+ klass = UltracartClient.const_get(type)
186
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.openapi_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ # Outputs non-array value in the form of hash
219
+ # For object, use to_hash. Otherwise, just return the value
220
+ # @param [Object] value Any valid value
221
+ # @return [Hash] Returns the value in the form of hash
222
+ def _to_hash(value)
223
+ if value.is_a?(Array)
224
+ value.compact.map { |v| _to_hash(v) }
225
+ elsif value.is_a?(Hash)
226
+ {}.tap do |hash|
227
+ value.each { |k, v| hash[k] = _to_hash(v) }
228
+ end
229
+ elsif value.respond_to? :to_hash
230
+ value.to_hash
231
+ else
232
+ value
233
+ end
234
+ end
235
+
236
+ end
237
+
238
+ end
@@ -32,6 +32,9 @@ module UltracartClient
32
32
  # Message date/time
33
33
  attr_accessor :message_dts
34
34
 
35
+ # Message epoch milliseconds
36
+ attr_accessor :message_epoch
37
+
35
38
  attr_accessor :transport_statuses
36
39
 
37
40
  # Message type
@@ -72,6 +75,7 @@ module UltracartClient
72
75
  :'media_urls' => :'media_urls',
73
76
  :'merchant_id' => :'merchant_id',
74
77
  :'message_dts' => :'message_dts',
78
+ :'message_epoch' => :'message_epoch',
75
79
  :'transport_statuses' => :'transport_statuses',
76
80
  :'type' => :'type',
77
81
  :'upload_keys' => :'upload_keys'
@@ -94,6 +98,7 @@ module UltracartClient
94
98
  :'media_urls' => :'Array<String>',
95
99
  :'merchant_id' => :'String',
96
100
  :'message_dts' => :'String',
101
+ :'message_epoch' => :'Integer',
97
102
  :'transport_statuses' => :'Array<ConversationMessageTransportStatus>',
98
103
  :'type' => :'String',
99
104
  :'upload_keys' => :'Array<String>'
@@ -155,6 +160,10 @@ module UltracartClient
155
160
  self.message_dts = attributes[:'message_dts']
156
161
  end
157
162
 
163
+ if attributes.key?(:'message_epoch')
164
+ self.message_epoch = attributes[:'message_epoch']
165
+ end
166
+
158
167
  if attributes.key?(:'transport_statuses')
159
168
  if (value = attributes[:'transport_statuses']).is_a?(Array)
160
169
  self.transport_statuses = value
@@ -210,6 +219,7 @@ module UltracartClient
210
219
  media_urls == o.media_urls &&
211
220
  merchant_id == o.merchant_id &&
212
221
  message_dts == o.message_dts &&
222
+ message_epoch == o.message_epoch &&
213
223
  transport_statuses == o.transport_statuses &&
214
224
  type == o.type &&
215
225
  upload_keys == o.upload_keys
@@ -224,7 +234,7 @@ module UltracartClient
224
234
  # Calculates hash code according to all attributes.
225
235
  # @return [Integer] Hash code
226
236
  def hash
227
- [author_conversation_participant_arn, author_conversation_participant_name, body, client_message_id, conversation_message_uuid, media_urls, merchant_id, message_dts, transport_statuses, type, upload_keys].hash
237
+ [author_conversation_participant_arn, author_conversation_participant_name, body, client_message_id, conversation_message_uuid, media_urls, merchant_id, message_dts, message_epoch, transport_statuses, type, upload_keys].hash
228
238
  end
229
239
 
230
240
  # Builds the object from hash
@@ -17,8 +17,31 @@ module UltracartClient
17
17
  class ConversationMessageTransportStatus
18
18
  attr_accessor :conversation_participant_arn
19
19
 
20
+ # The status of the message transport
20
21
  attr_accessor :status
21
22
 
23
+ class EnumAttributeValidator
24
+ attr_reader :datatype
25
+ attr_reader :allowable_values
26
+
27
+ def initialize(datatype, allowable_values)
28
+ @allowable_values = allowable_values.map do |value|
29
+ case datatype.to_s
30
+ when /Integer/i
31
+ value.to_i
32
+ when /Float/i
33
+ value.to_f
34
+ else
35
+ value
36
+ end
37
+ end
38
+ end
39
+
40
+ def valid?(value)
41
+ !value || allowable_values.include?(value)
42
+ end
43
+ end
44
+
22
45
  # Attribute mapping from ruby-style variable name to JSON key.
23
46
  def self.attribute_map
24
47
  {
@@ -80,9 +103,21 @@ module UltracartClient
80
103
  # Check to see if the all the properties in the model are valid
81
104
  # @return true if the model is valid
82
105
  def valid?
106
+ status_validator = EnumAttributeValidator.new('String', ["accepted", "scheduled", "queued", "sending", "sent", "read", "TWILIO_CREDENTIALS_MISSING", "SENT_TO_TWILIO", "TWILIO_ERROR", "SENT_TO_PINPOINT", "PINPOINT_ERROR"])
107
+ return false unless status_validator.valid?(@status)
83
108
  true
84
109
  end
85
110
 
111
+ # Custom attribute writer method checking allowed values (enum).
112
+ # @param [Object] status Object to be assigned
113
+ def status=(status)
114
+ validator = EnumAttributeValidator.new('String', ["accepted", "scheduled", "queued", "sending", "sent", "read", "TWILIO_CREDENTIALS_MISSING", "SENT_TO_TWILIO", "TWILIO_ERROR", "SENT_TO_PINPOINT", "PINPOINT_ERROR"])
115
+ unless validator.valid?(status)
116
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
117
+ end
118
+ @status = status
119
+ end
120
+
86
121
  # Checks equality by comparing each attribute.
87
122
  # @param [Object] Object to be compared
88
123
  def ==(o)
@@ -32,6 +32,8 @@ module UltracartClient
32
32
 
33
33
  attr_accessor :status
34
34
 
35
+ attr_accessor :unread_messages
36
+
35
37
  # Attribute mapping from ruby-style variable name to JSON key.
36
38
  def self.attribute_map
37
39
  {
@@ -41,7 +43,8 @@ module UltracartClient
41
43
  :'joined_dts' => :'joined_dts',
42
44
  :'last_message_dts' => :'last_message_dts',
43
45
  :'left_dts' => :'left_dts',
44
- :'status' => :'status'
46
+ :'status' => :'status',
47
+ :'unread_messages' => :'unread_messages'
45
48
  }
46
49
  end
47
50
 
@@ -59,7 +62,8 @@ module UltracartClient
59
62
  :'joined_dts' => :'String',
60
63
  :'last_message_dts' => :'String',
61
64
  :'left_dts' => :'String',
62
- :'status' => :'String'
65
+ :'status' => :'String',
66
+ :'unread_messages' => :'Integer'
63
67
  }
64
68
  end
65
69
 
@@ -111,6 +115,10 @@ module UltracartClient
111
115
  if attributes.key?(:'status')
112
116
  self.status = attributes[:'status']
113
117
  end
118
+
119
+ if attributes.key?(:'unread_messages')
120
+ self.unread_messages = attributes[:'unread_messages']
121
+ end
114
122
  end
115
123
 
116
124
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -137,7 +145,8 @@ module UltracartClient
137
145
  joined_dts == o.joined_dts &&
138
146
  last_message_dts == o.last_message_dts &&
139
147
  left_dts == o.left_dts &&
140
- status == o.status
148
+ status == o.status &&
149
+ unread_messages == o.unread_messages
141
150
  end
142
151
 
143
152
  # @see the `==` method
@@ -149,7 +158,7 @@ module UltracartClient
149
158
  # Calculates hash code according to all attributes.
150
159
  # @return [Integer] Hash code
151
160
  def hash
152
- [conversation_participant_arn, conversation_participant_name, conversation_participant_uuid, joined_dts, last_message_dts, left_dts, status].hash
161
+ [conversation_participant_arn, conversation_participant_name, conversation_participant_uuid, joined_dts, last_message_dts, left_dts, status, unread_messages].hash
153
162
  end
154
163
 
155
164
  # Builds the object from hash
@@ -30,6 +30,8 @@ module UltracartClient
30
30
 
31
31
  attr_accessor :event_queue_status_update
32
32
 
33
+ attr_accessor :event_read_message
34
+
33
35
  attr_accessor :event_rrweb
34
36
 
35
37
  # Type of event
@@ -76,6 +78,7 @@ module UltracartClient
76
78
  :'event_participant_update' => :'event_participant_update',
77
79
  :'event_queue_position' => :'event_queue_position',
78
80
  :'event_queue_status_update' => :'event_queue_status_update',
81
+ :'event_read_message' => :'event_read_message',
79
82
  :'event_rrweb' => :'event_rrweb',
80
83
  :'event_type' => :'event_type',
81
84
  :'event_typing' => :'event_typing',
@@ -100,6 +103,7 @@ module UltracartClient
100
103
  :'event_participant_update' => :'ConversationSummary',
101
104
  :'event_queue_position' => :'ConversationEventQueuePosition',
102
105
  :'event_queue_status_update' => :'ConversationWebchatQueueStatus',
106
+ :'event_read_message' => :'ConversationEventReadMessage',
103
107
  :'event_rrweb' => :'ConversationEventRRWeb',
104
108
  :'event_type' => :'String',
105
109
  :'event_typing' => :'ConversationEventTyping',
@@ -158,6 +162,10 @@ module UltracartClient
158
162
  self.event_queue_status_update = attributes[:'event_queue_status_update']
159
163
  end
160
164
 
165
+ if attributes.key?(:'event_read_message')
166
+ self.event_read_message = attributes[:'event_read_message']
167
+ end
168
+
161
169
  if attributes.key?(:'event_rrweb')
162
170
  self.event_rrweb = attributes[:'event_rrweb']
163
171
  end
@@ -193,7 +201,7 @@ module UltracartClient
193
201
  # Check to see if the all the properties in the model are valid
194
202
  # @return true if the model is valid
195
203
  def valid?
196
- event_type_validator = EnumAttributeValidator.new('String', ["queue position", "webchat start conversation", "conversation closed", "new conversation", "new message", "updated message", "queue status update", "rrweb", "participant update"])
204
+ event_type_validator = EnumAttributeValidator.new('String', ["queue position", "webchat start conversation", "conversation closed", "new conversation", "new message", "updated message", "queue status update", "rrweb", "participant update", "read message"])
197
205
  return false unless event_type_validator.valid?(@event_type)
198
206
  type_validator = EnumAttributeValidator.new('String', ["message", "event", "ping", "check queue position"])
199
207
  return false unless type_validator.valid?(@type)
@@ -203,7 +211,7 @@ module UltracartClient
203
211
  # Custom attribute writer method checking allowed values (enum).
204
212
  # @param [Object] event_type Object to be assigned
205
213
  def event_type=(event_type)
206
- validator = EnumAttributeValidator.new('String', ["queue position", "webchat start conversation", "conversation closed", "new conversation", "new message", "updated message", "queue status update", "rrweb", "participant update"])
214
+ validator = EnumAttributeValidator.new('String', ["queue position", "webchat start conversation", "conversation closed", "new conversation", "new message", "updated message", "queue status update", "rrweb", "participant update", "read message"])
207
215
  unless validator.valid?(event_type)
208
216
  fail ArgumentError, "invalid value for \"event_type\", must be one of #{validator.allowable_values}."
209
217
  end
@@ -232,6 +240,7 @@ module UltracartClient
232
240
  event_participant_update == o.event_participant_update &&
233
241
  event_queue_position == o.event_queue_position &&
234
242
  event_queue_status_update == o.event_queue_status_update &&
243
+ event_read_message == o.event_read_message &&
235
244
  event_rrweb == o.event_rrweb &&
236
245
  event_type == o.event_type &&
237
246
  event_typing == o.event_typing &&
@@ -249,7 +258,7 @@ module UltracartClient
249
258
  # Calculates hash code according to all attributes.
250
259
  # @return [Integer] Hash code
251
260
  def hash
252
- [conversation_uuid, event_conversation_closed, event_new_conversation, event_new_message, event_participant_update, event_queue_position, event_queue_status_update, event_rrweb, event_type, event_typing, event_updated_message, message, type].hash
261
+ [conversation_uuid, event_conversation_closed, event_new_conversation, event_new_message, event_participant_update, event_queue_position, event_queue_status_update, event_read_message, event_rrweb, event_type, event_typing, event_updated_message, message, type].hash
253
262
  end
254
263
 
255
264
  # Builds the object from hash
@@ -262,7 +262,7 @@ module UltracartClient
262
262
  :'merchant_code' => :'String',
263
263
  :'merchant_notes' => :'String',
264
264
  :'multiple_amounts_off_items' => :'CouponMultipleAmountsOffItems',
265
- :'no_discount' => :'Object',
265
+ :'no_discount' => :'CouponNoDiscount',
266
266
  :'percent_off_item_with_items_quantity_purchase' => :'CouponPercentOffItemWithItemsQuantityPurchase',
267
267
  :'percent_off_items' => :'CouponPercentOffItems',
268
268
  :'percent_off_items_and_free_shipping' => :'CouponPercentOffItemsAndFreeShipping',
@@ -0,0 +1,220 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class CouponNoDiscount
18
+ # This property does nothing but is included in this object to ensure the object is generated by our sdk builders.
19
+ attr_accessor :ignore_this_property
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'ignore_this_property' => :'ignore_this_property'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'ignore_this_property' => :'Boolean'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CouponNoDiscount` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CouponNoDiscount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'ignore_this_property')
62
+ self.ignore_this_property = attributes[:'ignore_this_property']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ invalid_properties = Array.new
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ ignore_this_property == o.ignore_this_property
85
+ end
86
+
87
+ # @see the `==` method
88
+ # @param [Object] Object to be compared
89
+ def eql?(o)
90
+ self == o
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ def hash
96
+ [ignore_this_property].hash
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def self.build_from_hash(attributes)
103
+ new.build_from_hash(attributes)
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ self.class.openapi_types.each_pair do |key, type|
113
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
+ self.send("#{key}=", nil)
115
+ elsif type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :Time
136
+ Time.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :Boolean
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ # models (e.g. Pet) or oneOf
167
+ klass = UltracartClient.const_get(type)
168
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
+ end
170
+ end
171
+
172
+ # Returns the string representation of the object
173
+ # @return [String] String presentation of the object
174
+ def to_s
175
+ to_hash.to_s
176
+ end
177
+
178
+ # to_body is an alias to to_hash (backward compatibility)
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_body
181
+ to_hash
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ if value.nil?
191
+ is_nullable = self.class.openapi_nullable.include?(attr)
192
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
+ end
194
+
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map { |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+
218
+ end
219
+
220
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.52.rc'
14
+ VERSION = '4.0.53.rc'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -139,6 +139,7 @@ require 'ultracart_api/models/conversation_agent_auth'
139
139
  require 'ultracart_api/models/conversation_agent_auth_response'
140
140
  require 'ultracart_api/models/conversation_event_queue_position'
141
141
  require 'ultracart_api/models/conversation_event_rr_web'
142
+ require 'ultracart_api/models/conversation_event_read_message'
142
143
  require 'ultracart_api/models/conversation_event_typing'
143
144
  require 'ultracart_api/models/conversation_message'
144
145
  require 'ultracart_api/models/conversation_message_transport_status'
@@ -193,6 +194,7 @@ require 'ultracart_api/models/coupon_free_shipping_with_subtotal'
193
194
  require 'ultracart_api/models/coupon_item_search_result'
194
195
  require 'ultracart_api/models/coupon_item_search_results_response'
195
196
  require 'ultracart_api/models/coupon_multiple_amounts_off_items'
197
+ require 'ultracart_api/models/coupon_no_discount'
196
198
  require 'ultracart_api/models/coupon_percent_off_item_with_items_quantity_purchase'
197
199
  require 'ultracart_api/models/coupon_percent_off_items'
198
200
  require 'ultracart_api/models/coupon_percent_off_items_and_free_shipping'
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: 4.0.52.rc
4
+ version: 4.0.53.rc
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-05 00:00:00.000000000 Z
11
+ date: 2022-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -189,6 +189,7 @@ files:
189
189
  - docs/ConversationApi.md
190
190
  - docs/ConversationEventQueuePosition.md
191
191
  - docs/ConversationEventRRWeb.md
192
+ - docs/ConversationEventReadMessage.md
192
193
  - docs/ConversationEventTyping.md
193
194
  - docs/ConversationMessage.md
194
195
  - docs/ConversationMessageTransportStatus.md
@@ -244,6 +245,7 @@ files:
244
245
  - docs/CouponItemSearchResult.md
245
246
  - docs/CouponItemSearchResultsResponse.md
246
247
  - docs/CouponMultipleAmountsOffItems.md
248
+ - docs/CouponNoDiscount.md
247
249
  - docs/CouponPercentOffItemWithItemsQuantityPurchase.md
248
250
  - docs/CouponPercentOffItems.md
249
251
  - docs/CouponPercentOffItemsAndFreeShipping.md
@@ -884,6 +886,7 @@ files:
884
886
  - lib/ultracart_api/models/conversation_agent_auth.rb
885
887
  - lib/ultracart_api/models/conversation_agent_auth_response.rb
886
888
  - lib/ultracart_api/models/conversation_event_queue_position.rb
889
+ - lib/ultracart_api/models/conversation_event_read_message.rb
887
890
  - lib/ultracart_api/models/conversation_event_rr_web.rb
888
891
  - lib/ultracart_api/models/conversation_event_typing.rb
889
892
  - lib/ultracart_api/models/conversation_message.rb
@@ -939,6 +942,7 @@ files:
939
942
  - lib/ultracart_api/models/coupon_item_search_result.rb
940
943
  - lib/ultracart_api/models/coupon_item_search_results_response.rb
941
944
  - lib/ultracart_api/models/coupon_multiple_amounts_off_items.rb
945
+ - lib/ultracart_api/models/coupon_no_discount.rb
942
946
  - lib/ultracart_api/models/coupon_percent_off_item_with_items_quantity_purchase.rb
943
947
  - lib/ultracart_api/models/coupon_percent_off_items.rb
944
948
  - lib/ultracart_api/models/coupon_percent_off_items_and_free_shipping.rb