ultracart_api 4.0.50.rc → 4.0.53.rc
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -4
- data/docs/Conversation.md +19 -1
- data/docs/ConversationApi.md +2 -0
- data/docs/ConversationEventReadMessage.md +22 -0
- data/docs/ConversationMessage.md +6 -0
- data/docs/ConversationMessageTransportStatus.md +1 -1
- data/docs/ConversationParticipant.md +3 -1
- data/docs/ConversationSummary.md +2 -0
- data/docs/ConversationWebsocketMessage.md +2 -0
- data/docs/Coupon.md +1 -1
- data/docs/CouponNoDiscount.md +18 -0
- data/lib/ultracart_api/api/conversation_api.rb +3 -0
- data/lib/ultracart_api/models/conversation.rb +122 -4
- data/lib/ultracart_api/models/conversation_event_read_message.rb +238 -0
- data/lib/ultracart_api/models/conversation_message.rb +29 -1
- data/lib/ultracart_api/models/conversation_message_transport_status.rb +35 -0
- data/lib/ultracart_api/models/conversation_participant.rb +13 -4
- data/lib/ultracart_api/models/conversation_summary.rb +45 -1
- data/lib/ultracart_api/models/conversation_websocket_message.rb +12 -3
- data/lib/ultracart_api/models/coupon.rb +1 -1
- data/lib/ultracart_api/models/coupon_no_discount.rb +220 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +2 -0
- metadata +6 -2
@@ -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
|
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.
|
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-
|
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
|