ultracart_api 3.11.20 → 3.11.21
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 +4 -4
- data/README.md +12 -4
- data/docs/CustomReportAccountConfig.md +1 -0
- data/docs/CustomReportAnalysisRequest.md +9 -0
- data/docs/CustomReportAnalysisResponse.md +12 -0
- data/docs/CustomReportChartPngUploadResponse.md +13 -0
- data/docs/DatawarehouseApi.md +105 -0
- data/docs/ItemTag.md +1 -1
- data/docs/OrderApi.md +58 -0
- data/docs/ReplaceOrderItemIdRequest.md +11 -0
- data/lib/ultracart_api/api/datawarehouse_api.rb +116 -0
- data/lib/ultracart_api/api/order_api.rb +64 -0
- data/lib/ultracart_api/models/custom_report_account_config.rb +10 -1
- data/lib/ultracart_api/models/custom_report_analysis_request.rb +193 -0
- data/lib/ultracart_api/models/custom_report_analysis_response.rb +221 -0
- data/lib/ultracart_api/models/custom_report_chart_png_upload_response.rb +230 -0
- data/lib/ultracart_api/models/item_tag.rb +1 -1
- data/lib/ultracart_api/models/replace_order_item_id_request.rb +245 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +4 -0
- metadata +10 -2
@@ -0,0 +1,245 @@
|
|
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 ReplaceOrderItemIdRequest
|
17
|
+
# Index of the item on the order (one based index)
|
18
|
+
attr_accessor :item_index
|
19
|
+
|
20
|
+
# Item ID
|
21
|
+
attr_accessor :merchant_item_id
|
22
|
+
|
23
|
+
# Order ID
|
24
|
+
attr_accessor :order_id
|
25
|
+
|
26
|
+
# Replacement Item ID
|
27
|
+
attr_accessor :replacement_merchant_item_id
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'item_index' => :'item_index',
|
33
|
+
:'merchant_item_id' => :'merchant_item_id',
|
34
|
+
:'order_id' => :'order_id',
|
35
|
+
:'replacement_merchant_item_id' => :'replacement_merchant_item_id'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.swagger_types
|
41
|
+
{
|
42
|
+
:'item_index' => :'Integer',
|
43
|
+
:'merchant_item_id' => :'String',
|
44
|
+
:'order_id' => :'String',
|
45
|
+
:'replacement_merchant_item_id' => :'String'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
return unless attributes.is_a?(Hash)
|
53
|
+
|
54
|
+
# convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
56
|
+
|
57
|
+
if attributes.has_key?(:'item_index')
|
58
|
+
self.item_index = attributes[:'item_index']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes.has_key?(:'merchant_item_id')
|
62
|
+
self.merchant_item_id = attributes[:'merchant_item_id']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.has_key?(:'order_id')
|
66
|
+
self.order_id = attributes[:'order_id']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.has_key?(:'replacement_merchant_item_id')
|
70
|
+
self.replacement_merchant_item_id = attributes[:'replacement_merchant_item_id']
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
75
|
+
# @return Array for valid properties with the reasons
|
76
|
+
def list_invalid_properties
|
77
|
+
invalid_properties = Array.new
|
78
|
+
if !@merchant_item_id.nil? && @merchant_item_id.to_s.length > 20
|
79
|
+
invalid_properties.push('invalid value for "merchant_item_id", the character length must be smaller than or equal to 20.')
|
80
|
+
end
|
81
|
+
|
82
|
+
if !@replacement_merchant_item_id.nil? && @replacement_merchant_item_id.to_s.length > 20
|
83
|
+
invalid_properties.push('invalid value for "replacement_merchant_item_id", the character length must be smaller than or equal to 20.')
|
84
|
+
end
|
85
|
+
|
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
|
+
return false if !@merchant_item_id.nil? && @merchant_item_id.to_s.length > 20
|
93
|
+
return false if !@replacement_merchant_item_id.nil? && @replacement_merchant_item_id.to_s.length > 20
|
94
|
+
true
|
95
|
+
end
|
96
|
+
|
97
|
+
# Custom attribute writer method with validation
|
98
|
+
# @param [Object] merchant_item_id Value to be assigned
|
99
|
+
def merchant_item_id=(merchant_item_id)
|
100
|
+
if !merchant_item_id.nil? && merchant_item_id.to_s.length > 20
|
101
|
+
fail ArgumentError, 'invalid value for "merchant_item_id", the character length must be smaller than or equal to 20.'
|
102
|
+
end
|
103
|
+
|
104
|
+
@merchant_item_id = merchant_item_id
|
105
|
+
end
|
106
|
+
|
107
|
+
# Custom attribute writer method with validation
|
108
|
+
# @param [Object] replacement_merchant_item_id Value to be assigned
|
109
|
+
def replacement_merchant_item_id=(replacement_merchant_item_id)
|
110
|
+
if !replacement_merchant_item_id.nil? && replacement_merchant_item_id.to_s.length > 20
|
111
|
+
fail ArgumentError, 'invalid value for "replacement_merchant_item_id", the character length must be smaller than or equal to 20.'
|
112
|
+
end
|
113
|
+
|
114
|
+
@replacement_merchant_item_id = replacement_merchant_item_id
|
115
|
+
end
|
116
|
+
|
117
|
+
# Checks equality by comparing each attribute.
|
118
|
+
# @param [Object] Object to be compared
|
119
|
+
def ==(o)
|
120
|
+
return true if self.equal?(o)
|
121
|
+
self.class == o.class &&
|
122
|
+
item_index == o.item_index &&
|
123
|
+
merchant_item_id == o.merchant_item_id &&
|
124
|
+
order_id == o.order_id &&
|
125
|
+
replacement_merchant_item_id == o.replacement_merchant_item_id
|
126
|
+
end
|
127
|
+
|
128
|
+
# @see the `==` method
|
129
|
+
# @param [Object] Object to be compared
|
130
|
+
def eql?(o)
|
131
|
+
self == o
|
132
|
+
end
|
133
|
+
|
134
|
+
# Calculates hash code according to all attributes.
|
135
|
+
# @return [Fixnum] Hash code
|
136
|
+
def hash
|
137
|
+
[item_index, merchant_item_id, order_id, replacement_merchant_item_id].hash
|
138
|
+
end
|
139
|
+
|
140
|
+
# Builds the object from hash
|
141
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
+
# @return [Object] Returns the model itself
|
143
|
+
def build_from_hash(attributes)
|
144
|
+
return nil unless attributes.is_a?(Hash)
|
145
|
+
self.class.swagger_types.each_pair do |key, type|
|
146
|
+
if type =~ /\AArray<(.*)>/i
|
147
|
+
# check to ensure the input is an array given that the attribute
|
148
|
+
# is documented as an array but the input is not
|
149
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
150
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
151
|
+
end
|
152
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
153
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
154
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
155
|
+
end
|
156
|
+
|
157
|
+
self
|
158
|
+
end
|
159
|
+
|
160
|
+
# Deserializes the data based on type
|
161
|
+
# @param string type Data type
|
162
|
+
# @param string value Value to be deserialized
|
163
|
+
# @return [Object] Deserialized data
|
164
|
+
def _deserialize(type, value)
|
165
|
+
case type.to_sym
|
166
|
+
when :DateTime
|
167
|
+
DateTime.parse(value)
|
168
|
+
when :Date
|
169
|
+
Date.parse(value)
|
170
|
+
when :String
|
171
|
+
value.to_s
|
172
|
+
when :Integer
|
173
|
+
value.to_i
|
174
|
+
when :Float
|
175
|
+
value.to_f
|
176
|
+
when :BOOLEAN
|
177
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
178
|
+
true
|
179
|
+
else
|
180
|
+
false
|
181
|
+
end
|
182
|
+
when :Object
|
183
|
+
# generic object (usually a Hash), return directly
|
184
|
+
value
|
185
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
186
|
+
inner_type = Regexp.last_match[:inner_type]
|
187
|
+
value.map { |v| _deserialize(inner_type, v) }
|
188
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
189
|
+
k_type = Regexp.last_match[:k_type]
|
190
|
+
v_type = Regexp.last_match[:v_type]
|
191
|
+
{}.tap do |hash|
|
192
|
+
value.each do |k, v|
|
193
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
194
|
+
end
|
195
|
+
end
|
196
|
+
else # model
|
197
|
+
temp_model = UltracartClient.const_get(type).new
|
198
|
+
temp_model.build_from_hash(value)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
# Returns the string representation of the object
|
203
|
+
# @return [String] String presentation of the object
|
204
|
+
def to_s
|
205
|
+
to_hash.to_s
|
206
|
+
end
|
207
|
+
|
208
|
+
# to_body is an alias to to_hash (backward compatibility)
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
210
|
+
def to_body
|
211
|
+
to_hash
|
212
|
+
end
|
213
|
+
|
214
|
+
# Returns the object in the form of hash
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_hash
|
217
|
+
hash = {}
|
218
|
+
self.class.attribute_map.each_pair do |attr, param|
|
219
|
+
value = self.send(attr)
|
220
|
+
next if value.nil?
|
221
|
+
hash[param] = _to_hash(value)
|
222
|
+
end
|
223
|
+
hash
|
224
|
+
end
|
225
|
+
|
226
|
+
# Outputs non-array value in the form of hash
|
227
|
+
# For object, use to_hash. Otherwise, just return the value
|
228
|
+
# @param [Object] value Any valid value
|
229
|
+
# @return [Hash] Returns the value in the form of hash
|
230
|
+
def _to_hash(value)
|
231
|
+
if value.is_a?(Array)
|
232
|
+
value.compact.map { |v| _to_hash(v) }
|
233
|
+
elsif value.is_a?(Hash)
|
234
|
+
{}.tap do |hash|
|
235
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
236
|
+
end
|
237
|
+
elsif value.respond_to? :to_hash
|
238
|
+
value.to_hash
|
239
|
+
else
|
240
|
+
value
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
end
|
245
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -332,6 +332,9 @@ require 'ultracart_api/models/custom_dashboards_response'
|
|
332
332
|
require 'ultracart_api/models/custom_report'
|
333
333
|
require 'ultracart_api/models/custom_report_account_config'
|
334
334
|
require 'ultracart_api/models/custom_report_account_config_response'
|
335
|
+
require 'ultracart_api/models/custom_report_analysis_request'
|
336
|
+
require 'ultracart_api/models/custom_report_analysis_response'
|
337
|
+
require 'ultracart_api/models/custom_report_chart_png_upload_response'
|
335
338
|
require 'ultracart_api/models/custom_report_execution_parameter'
|
336
339
|
require 'ultracart_api/models/custom_report_execution_request'
|
337
340
|
require 'ultracart_api/models/custom_report_execution_response'
|
@@ -738,6 +741,7 @@ require 'ultracart_api/models/property'
|
|
738
741
|
require 'ultracart_api/models/publish_library_item_request'
|
739
742
|
require 'ultracart_api/models/register_affiliate_click_request'
|
740
743
|
require 'ultracart_api/models/register_affiliate_click_response'
|
744
|
+
require 'ultracart_api/models/replace_order_item_id_request'
|
741
745
|
require 'ultracart_api/models/report'
|
742
746
|
require 'ultracart_api/models/report_auth'
|
743
747
|
require 'ultracart_api/models/report_auth_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.11.
|
4
|
+
version: 3.11.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -542,6 +542,9 @@ files:
|
|
542
542
|
- docs/CustomReport.md
|
543
543
|
- docs/CustomReportAccountConfig.md
|
544
544
|
- docs/CustomReportAccountConfigResponse.md
|
545
|
+
- docs/CustomReportAnalysisRequest.md
|
546
|
+
- docs/CustomReportAnalysisResponse.md
|
547
|
+
- docs/CustomReportChartPngUploadResponse.md
|
545
548
|
- docs/CustomReportExecutionParameter.md
|
546
549
|
- docs/CustomReportExecutionRequest.md
|
547
550
|
- docs/CustomReportExecutionResponse.md
|
@@ -956,6 +959,7 @@ files:
|
|
956
959
|
- docs/PublishLibraryItemRequest.md
|
957
960
|
- docs/RegisterAffiliateClickRequest.md
|
958
961
|
- docs/RegisterAffiliateClickResponse.md
|
962
|
+
- docs/ReplaceOrderItemIdRequest.md
|
959
963
|
- docs/Report.md
|
960
964
|
- docs/ReportAuth.md
|
961
965
|
- docs/ReportAuthResponse.md
|
@@ -1468,6 +1472,9 @@ files:
|
|
1468
1472
|
- lib/ultracart_api/models/custom_report.rb
|
1469
1473
|
- lib/ultracart_api/models/custom_report_account_config.rb
|
1470
1474
|
- lib/ultracart_api/models/custom_report_account_config_response.rb
|
1475
|
+
- lib/ultracart_api/models/custom_report_analysis_request.rb
|
1476
|
+
- lib/ultracart_api/models/custom_report_analysis_response.rb
|
1477
|
+
- lib/ultracart_api/models/custom_report_chart_png_upload_response.rb
|
1471
1478
|
- lib/ultracart_api/models/custom_report_execution_parameter.rb
|
1472
1479
|
- lib/ultracart_api/models/custom_report_execution_request.rb
|
1473
1480
|
- lib/ultracart_api/models/custom_report_execution_response.rb
|
@@ -1874,6 +1881,7 @@ files:
|
|
1874
1881
|
- lib/ultracart_api/models/publish_library_item_request.rb
|
1875
1882
|
- lib/ultracart_api/models/register_affiliate_click_request.rb
|
1876
1883
|
- lib/ultracart_api/models/register_affiliate_click_response.rb
|
1884
|
+
- lib/ultracart_api/models/replace_order_item_id_request.rb
|
1877
1885
|
- lib/ultracart_api/models/report.rb
|
1878
1886
|
- lib/ultracart_api/models/report_auth.rb
|
1879
1887
|
- lib/ultracart_api/models/report_auth_response.rb
|