ultracart_api 3.10.7 → 3.10.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -4
- data/docs/CustomerApi.md +105 -0
- data/docs/CustomerEditorValues.md +1 -0
- data/docs/CustomerStoreCredit.md +13 -0
- data/docs/CustomerStoreCreditAddRequest.md +11 -0
- data/docs/CustomerStoreCreditLedgerEntry.md +14 -0
- data/docs/CustomerStoreCreditResponse.md +12 -0
- data/docs/EmailSegment.md +2 -0
- data/lib/ultracart_api/api/customer_api.rb +116 -0
- data/lib/ultracart_api/models/customer_editor_values.rb +11 -1
- data/lib/ultracart_api/models/customer_store_credit.rb +239 -0
- data/lib/ultracart_api/models/customer_store_credit_add_request.rb +215 -0
- data/lib/ultracart_api/models/customer_store_credit_ledger_entry.rb +260 -0
- data/lib/ultracart_api/models/customer_store_credit_response.rb +221 -0
- data/lib/ultracart_api/models/email_segment.rb +21 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +4 -0
- metadata +10 -2
@@ -0,0 +1,221 @@
|
|
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 CustomerStoreCreditResponse
|
17
|
+
attr_accessor :customer_store_credit
|
18
|
+
|
19
|
+
attr_accessor :error
|
20
|
+
|
21
|
+
attr_accessor :metadata
|
22
|
+
|
23
|
+
# Indicates if API call was successful
|
24
|
+
attr_accessor :success
|
25
|
+
|
26
|
+
attr_accessor :warning
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
:'customer_store_credit' => :'customer_store_credit',
|
32
|
+
:'error' => :'error',
|
33
|
+
:'metadata' => :'metadata',
|
34
|
+
:'success' => :'success',
|
35
|
+
:'warning' => :'warning'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.swagger_types
|
41
|
+
{
|
42
|
+
:'customer_store_credit' => :'CustomerStoreCredit',
|
43
|
+
:'error' => :'Error',
|
44
|
+
:'metadata' => :'ResponseMetadata',
|
45
|
+
:'success' => :'BOOLEAN',
|
46
|
+
:'warning' => :'Warning'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Initializes the object
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
52
|
+
def initialize(attributes = {})
|
53
|
+
return unless attributes.is_a?(Hash)
|
54
|
+
|
55
|
+
# convert string to symbol for hash key
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
57
|
+
|
58
|
+
if attributes.has_key?(:'customer_store_credit')
|
59
|
+
self.customer_store_credit = attributes[:'customer_store_credit']
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes.has_key?(:'error')
|
63
|
+
self.error = attributes[:'error']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.has_key?(:'metadata')
|
67
|
+
self.metadata = attributes[:'metadata']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.has_key?(:'success')
|
71
|
+
self.success = attributes[:'success']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.has_key?(:'warning')
|
75
|
+
self.warning = attributes[:'warning']
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
80
|
+
# @return Array for valid properties with the reasons
|
81
|
+
def list_invalid_properties
|
82
|
+
invalid_properties = Array.new
|
83
|
+
invalid_properties
|
84
|
+
end
|
85
|
+
|
86
|
+
# Check to see if the all the properties in the model are valid
|
87
|
+
# @return true if the model is valid
|
88
|
+
def valid?
|
89
|
+
true
|
90
|
+
end
|
91
|
+
|
92
|
+
# Checks equality by comparing each attribute.
|
93
|
+
# @param [Object] Object to be compared
|
94
|
+
def ==(o)
|
95
|
+
return true if self.equal?(o)
|
96
|
+
self.class == o.class &&
|
97
|
+
customer_store_credit == o.customer_store_credit &&
|
98
|
+
error == o.error &&
|
99
|
+
metadata == o.metadata &&
|
100
|
+
success == o.success &&
|
101
|
+
warning == o.warning
|
102
|
+
end
|
103
|
+
|
104
|
+
# @see the `==` method
|
105
|
+
# @param [Object] Object to be compared
|
106
|
+
def eql?(o)
|
107
|
+
self == o
|
108
|
+
end
|
109
|
+
|
110
|
+
# Calculates hash code according to all attributes.
|
111
|
+
# @return [Fixnum] Hash code
|
112
|
+
def hash
|
113
|
+
[customer_store_credit, error, metadata, success, warning].hash
|
114
|
+
end
|
115
|
+
|
116
|
+
# Builds the object from hash
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
+
# @return [Object] Returns the model itself
|
119
|
+
def build_from_hash(attributes)
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
121
|
+
self.class.swagger_types.each_pair do |key, type|
|
122
|
+
if type =~ /\AArray<(.*)>/i
|
123
|
+
# check to ensure the input is an array given that the attribute
|
124
|
+
# is documented as an array but the input is not
|
125
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
126
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
127
|
+
end
|
128
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
129
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
130
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
131
|
+
end
|
132
|
+
|
133
|
+
self
|
134
|
+
end
|
135
|
+
|
136
|
+
# Deserializes the data based on type
|
137
|
+
# @param string type Data type
|
138
|
+
# @param string value Value to be deserialized
|
139
|
+
# @return [Object] Deserialized data
|
140
|
+
def _deserialize(type, value)
|
141
|
+
case type.to_sym
|
142
|
+
when :DateTime
|
143
|
+
DateTime.parse(value)
|
144
|
+
when :Date
|
145
|
+
Date.parse(value)
|
146
|
+
when :String
|
147
|
+
value.to_s
|
148
|
+
when :Integer
|
149
|
+
value.to_i
|
150
|
+
when :Float
|
151
|
+
value.to_f
|
152
|
+
when :BOOLEAN
|
153
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
154
|
+
true
|
155
|
+
else
|
156
|
+
false
|
157
|
+
end
|
158
|
+
when :Object
|
159
|
+
# generic object (usually a Hash), return directly
|
160
|
+
value
|
161
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
162
|
+
inner_type = Regexp.last_match[:inner_type]
|
163
|
+
value.map { |v| _deserialize(inner_type, v) }
|
164
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
165
|
+
k_type = Regexp.last_match[:k_type]
|
166
|
+
v_type = Regexp.last_match[:v_type]
|
167
|
+
{}.tap do |hash|
|
168
|
+
value.each do |k, v|
|
169
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
else # model
|
173
|
+
temp_model = UltracartClient.const_get(type).new
|
174
|
+
temp_model.build_from_hash(value)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
# Returns the string representation of the object
|
179
|
+
# @return [String] String presentation of the object
|
180
|
+
def to_s
|
181
|
+
to_hash.to_s
|
182
|
+
end
|
183
|
+
|
184
|
+
# to_body is an alias to to_hash (backward compatibility)
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_body
|
187
|
+
to_hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Returns the object in the form of hash
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
192
|
+
def to_hash
|
193
|
+
hash = {}
|
194
|
+
self.class.attribute_map.each_pair do |attr, param|
|
195
|
+
value = self.send(attr)
|
196
|
+
next if value.nil?
|
197
|
+
hash[param] = _to_hash(value)
|
198
|
+
end
|
199
|
+
hash
|
200
|
+
end
|
201
|
+
|
202
|
+
# Outputs non-array value in the form of hash
|
203
|
+
# For object, use to_hash. Otherwise, just return the value
|
204
|
+
# @param [Object] value Any valid value
|
205
|
+
# @return [Hash] Returns the value in the form of hash
|
206
|
+
def _to_hash(value)
|
207
|
+
if value.is_a?(Array)
|
208
|
+
value.compact.map { |v| _to_hash(v) }
|
209
|
+
elsif value.is_a?(Hash)
|
210
|
+
{}.tap do |hash|
|
211
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
212
|
+
end
|
213
|
+
elsif value.respond_to? :to_hash
|
214
|
+
value.to_hash
|
215
|
+
else
|
216
|
+
value
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
end
|
221
|
+
end
|
@@ -56,6 +56,12 @@ module UltracartClient
|
|
56
56
|
# Storefront oid
|
57
57
|
attr_accessor :storefront_oid
|
58
58
|
|
59
|
+
# List id of third party provider to sync with.
|
60
|
+
attr_accessor :thirdparty_list_id
|
61
|
+
|
62
|
+
# Name of third party provider to sync segment to a list with.
|
63
|
+
attr_accessor :thirdparty_provider_name
|
64
|
+
|
59
65
|
# Details on the flows or campaigns that use this list.
|
60
66
|
attr_accessor :used_by
|
61
67
|
|
@@ -76,6 +82,8 @@ module UltracartClient
|
|
76
82
|
:'rank_json' => :'rank_json',
|
77
83
|
:'rebuild_required' => :'rebuild_required',
|
78
84
|
:'storefront_oid' => :'storefront_oid',
|
85
|
+
:'thirdparty_list_id' => :'thirdparty_list_id',
|
86
|
+
:'thirdparty_provider_name' => :'thirdparty_provider_name',
|
79
87
|
:'used_by' => :'used_by'
|
80
88
|
}
|
81
89
|
end
|
@@ -97,6 +105,8 @@ module UltracartClient
|
|
97
105
|
:'rank_json' => :'String',
|
98
106
|
:'rebuild_required' => :'BOOLEAN',
|
99
107
|
:'storefront_oid' => :'Integer',
|
108
|
+
:'thirdparty_list_id' => :'String',
|
109
|
+
:'thirdparty_provider_name' => :'String',
|
100
110
|
:'used_by' => :'Array<EmailListSegmentUsedBy>'
|
101
111
|
}
|
102
112
|
end
|
@@ -165,6 +175,14 @@ module UltracartClient
|
|
165
175
|
self.storefront_oid = attributes[:'storefront_oid']
|
166
176
|
end
|
167
177
|
|
178
|
+
if attributes.has_key?(:'thirdparty_list_id')
|
179
|
+
self.thirdparty_list_id = attributes[:'thirdparty_list_id']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes.has_key?(:'thirdparty_provider_name')
|
183
|
+
self.thirdparty_provider_name = attributes[:'thirdparty_provider_name']
|
184
|
+
end
|
185
|
+
|
168
186
|
if attributes.has_key?(:'used_by')
|
169
187
|
if (value = attributes[:'used_by']).is_a?(Array)
|
170
188
|
self.used_by = value
|
@@ -219,6 +237,8 @@ module UltracartClient
|
|
219
237
|
rank_json == o.rank_json &&
|
220
238
|
rebuild_required == o.rebuild_required &&
|
221
239
|
storefront_oid == o.storefront_oid &&
|
240
|
+
thirdparty_list_id == o.thirdparty_list_id &&
|
241
|
+
thirdparty_provider_name == o.thirdparty_provider_name &&
|
222
242
|
used_by == o.used_by
|
223
243
|
end
|
224
244
|
|
@@ -231,7 +251,7 @@ module UltracartClient
|
|
231
251
|
# Calculates hash code according to all attributes.
|
232
252
|
# @return [Fixnum] Hash code
|
233
253
|
def hash
|
234
|
-
[allow_csv_download, allow_facebook_audiences, created_dts, deleted, email_segment_uuid, esp_list_segment_folder_uuid, facebook_custom_audience, filter_profile_equation_json, member_count, merchant_id, name, rank_json, rebuild_required, storefront_oid, used_by].hash
|
254
|
+
[allow_csv_download, allow_facebook_audiences, created_dts, deleted, email_segment_uuid, esp_list_segment_folder_uuid, facebook_custom_audience, filter_profile_equation_json, member_count, merchant_id, name, rank_json, rebuild_required, storefront_oid, thirdparty_list_id, thirdparty_provider_name, used_by].hash
|
235
255
|
end
|
236
256
|
|
237
257
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
@@ -219,6 +219,10 @@ require 'ultracart_api/models/customer_response'
|
|
219
219
|
require 'ultracart_api/models/customer_reviewer'
|
220
220
|
require 'ultracart_api/models/customer_shipping'
|
221
221
|
require 'ultracart_api/models/customer_software_entitlement'
|
222
|
+
require 'ultracart_api/models/customer_store_credit'
|
223
|
+
require 'ultracart_api/models/customer_store_credit_add_request'
|
224
|
+
require 'ultracart_api/models/customer_store_credit_ledger_entry'
|
225
|
+
require 'ultracart_api/models/customer_store_credit_response'
|
222
226
|
require 'ultracart_api/models/customer_tag'
|
223
227
|
require 'ultracart_api/models/customer_tax_codes'
|
224
228
|
require 'ultracart_api/models/customers_response'
|
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.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -431,6 +431,10 @@ files:
|
|
431
431
|
- docs/CustomerReviewer.md
|
432
432
|
- docs/CustomerShipping.md
|
433
433
|
- docs/CustomerSoftwareEntitlement.md
|
434
|
+
- docs/CustomerStoreCredit.md
|
435
|
+
- docs/CustomerStoreCreditAddRequest.md
|
436
|
+
- docs/CustomerStoreCreditLedgerEntry.md
|
437
|
+
- docs/CustomerStoreCreditResponse.md
|
434
438
|
- docs/CustomerTag.md
|
435
439
|
- docs/CustomerTaxCodes.md
|
436
440
|
- docs/CustomersResponse.md
|
@@ -1131,6 +1135,10 @@ files:
|
|
1131
1135
|
- lib/ultracart_api/models/customer_reviewer.rb
|
1132
1136
|
- lib/ultracart_api/models/customer_shipping.rb
|
1133
1137
|
- lib/ultracart_api/models/customer_software_entitlement.rb
|
1138
|
+
- lib/ultracart_api/models/customer_store_credit.rb
|
1139
|
+
- lib/ultracart_api/models/customer_store_credit_add_request.rb
|
1140
|
+
- lib/ultracart_api/models/customer_store_credit_ledger_entry.rb
|
1141
|
+
- lib/ultracart_api/models/customer_store_credit_response.rb
|
1134
1142
|
- lib/ultracart_api/models/customer_tag.rb
|
1135
1143
|
- lib/ultracart_api/models/customer_tax_codes.rb
|
1136
1144
|
- lib/ultracart_api/models/customers_response.rb
|