ultracart_api 3.11.20 → 3.11.22
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 +13 -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/Customer.md +1 -0
- data/docs/DatawarehouseApi.md +105 -0
- data/docs/ItemShippingMethod.md +1 -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/customer.rb +26 -1
- data/lib/ultracart_api/models/item_shipping_method.rb +11 -1
- data/lib/ultracart_api/models/item_tag.rb +1 -1
- data/lib/ultracart_api/models/order_payment.rb +2 -2
- 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
@@ -81,6 +81,9 @@ module UltracartClient
|
|
81
81
|
# Exempt shipping handling charge
|
82
82
|
attr_accessor :exempt_shipping_handling_charge
|
83
83
|
|
84
|
+
# Fax Number
|
85
|
+
attr_accessor :fax
|
86
|
+
|
84
87
|
# FedEx account number
|
85
88
|
attr_accessor :fedex_account_number
|
86
89
|
|
@@ -224,6 +227,7 @@ module UltracartClient
|
|
224
227
|
:'edi' => :'edi',
|
225
228
|
:'email' => :'email',
|
226
229
|
:'exempt_shipping_handling_charge' => :'exempt_shipping_handling_charge',
|
230
|
+
:'fax' => :'fax',
|
227
231
|
:'fedex_account_number' => :'fedex_account_number',
|
228
232
|
:'free_shipping' => :'free_shipping',
|
229
233
|
:'free_shipping_minimum' => :'free_shipping_minimum',
|
@@ -294,6 +298,7 @@ module UltracartClient
|
|
294
298
|
:'edi' => :'CustomerEDI',
|
295
299
|
:'email' => :'String',
|
296
300
|
:'exempt_shipping_handling_charge' => :'BOOLEAN',
|
301
|
+
:'fax' => :'String',
|
297
302
|
:'fedex_account_number' => :'String',
|
298
303
|
:'free_shipping' => :'BOOLEAN',
|
299
304
|
:'free_shipping_minimum' => :'Float',
|
@@ -446,6 +451,10 @@ module UltracartClient
|
|
446
451
|
self.exempt_shipping_handling_charge = attributes[:'exempt_shipping_handling_charge']
|
447
452
|
end
|
448
453
|
|
454
|
+
if attributes.has_key?(:'fax')
|
455
|
+
self.fax = attributes[:'fax']
|
456
|
+
end
|
457
|
+
|
449
458
|
if attributes.has_key?(:'fedex_account_number')
|
450
459
|
self.fedex_account_number = attributes[:'fedex_account_number']
|
451
460
|
end
|
@@ -641,6 +650,10 @@ module UltracartClient
|
|
641
650
|
invalid_properties.push('invalid value for "dhl_duty_account_number", the character length must be smaller than or equal to 20.')
|
642
651
|
end
|
643
652
|
|
653
|
+
if !@fax.nil? && @fax.to_s.length > 32
|
654
|
+
invalid_properties.push('invalid value for "fax", the character length must be smaller than or equal to 32.')
|
655
|
+
end
|
656
|
+
|
644
657
|
if !@fedex_account_number.nil? && @fedex_account_number.to_s.length > 20
|
645
658
|
invalid_properties.push('invalid value for "fedex_account_number", the character length must be smaller than or equal to 20.')
|
646
659
|
end
|
@@ -682,6 +695,7 @@ module UltracartClient
|
|
682
695
|
return false if !@business_notes.nil? && @business_notes.to_s.length > 2000
|
683
696
|
return false if !@dhl_account_number.nil? && @dhl_account_number.to_s.length > 20
|
684
697
|
return false if !@dhl_duty_account_number.nil? && @dhl_duty_account_number.to_s.length > 20
|
698
|
+
return false if !@fax.nil? && @fax.to_s.length > 32
|
685
699
|
return false if !@fedex_account_number.nil? && @fedex_account_number.to_s.length > 20
|
686
700
|
return false if !@last_modified_by.nil? && @last_modified_by.to_s.length > 100
|
687
701
|
return false if !@password.nil? && @password.to_s.length > 30
|
@@ -723,6 +737,16 @@ module UltracartClient
|
|
723
737
|
@dhl_duty_account_number = dhl_duty_account_number
|
724
738
|
end
|
725
739
|
|
740
|
+
# Custom attribute writer method with validation
|
741
|
+
# @param [Object] fax Value to be assigned
|
742
|
+
def fax=(fax)
|
743
|
+
if !fax.nil? && fax.to_s.length > 32
|
744
|
+
fail ArgumentError, 'invalid value for "fax", the character length must be smaller than or equal to 32.'
|
745
|
+
end
|
746
|
+
|
747
|
+
@fax = fax
|
748
|
+
end
|
749
|
+
|
726
750
|
# Custom attribute writer method with validation
|
727
751
|
# @param [Object] fedex_account_number Value to be assigned
|
728
752
|
def fedex_account_number=(fedex_account_number)
|
@@ -831,6 +855,7 @@ module UltracartClient
|
|
831
855
|
edi == o.edi &&
|
832
856
|
email == o.email &&
|
833
857
|
exempt_shipping_handling_charge == o.exempt_shipping_handling_charge &&
|
858
|
+
fax == o.fax &&
|
834
859
|
fedex_account_number == o.fedex_account_number &&
|
835
860
|
free_shipping == o.free_shipping &&
|
836
861
|
free_shipping_minimum == o.free_shipping_minimum &&
|
@@ -883,7 +908,7 @@ module UltracartClient
|
|
883
908
|
# Calculates hash code according to all attributes.
|
884
909
|
# @return [Fixnum] Hash code
|
885
910
|
def hash
|
886
|
-
[activity, affiliate_oid, allow_3rd_party_billing, allow_cod, allow_drop_shipping, allow_purchase_order, allow_quote_request, allow_selection_of_address_type, attachments, auto_approve_cod, auto_approve_purchase_order, automatic_merchant_notes, billing, business_notes, cards, cc_emails, customer_profile_oid, dhl_account_number, dhl_duty_account_number, do_not_send_mail, edi, email, exempt_shipping_handling_charge, fedex_account_number, free_shipping, free_shipping_minimum, last_modified_by, last_modified_dts, loyalty, maximum_item_count, merchant_id, minimum_item_count, minimum_subtotal, no_coupons, no_free_shipping, no_realtime_charge, orders, orders_summary, password, pricing_tiers, privacy, properties, qb_class, qb_code, qb_tax_exemption_reason_code, quotes, quotes_summary, referral_source, reviewer, sales_rep_code, send_signup_notification, shipping, signup_dts, software_entitlements, suppress_buysafe, tags, tax_codes, tax_exempt, tax_id, terms, track_separately, unapproved, ups_account_number, website_url].hash
|
911
|
+
[activity, affiliate_oid, allow_3rd_party_billing, allow_cod, allow_drop_shipping, allow_purchase_order, allow_quote_request, allow_selection_of_address_type, attachments, auto_approve_cod, auto_approve_purchase_order, automatic_merchant_notes, billing, business_notes, cards, cc_emails, customer_profile_oid, dhl_account_number, dhl_duty_account_number, do_not_send_mail, edi, email, exempt_shipping_handling_charge, fax, fedex_account_number, free_shipping, free_shipping_minimum, last_modified_by, last_modified_dts, loyalty, maximum_item_count, merchant_id, minimum_item_count, minimum_subtotal, no_coupons, no_free_shipping, no_realtime_charge, orders, orders_summary, password, pricing_tiers, privacy, properties, qb_class, qb_code, qb_tax_exemption_reason_code, quotes, quotes_summary, referral_source, reviewer, sales_rep_code, send_signup_notification, shipping, signup_dts, software_entitlements, suppress_buysafe, tags, tax_codes, tax_exempt, tax_id, terms, track_separately, unapproved, ups_account_number, website_url].hash
|
887
912
|
end
|
888
913
|
|
889
914
|
# Builds the object from hash
|
@@ -56,6 +56,9 @@ module UltracartClient
|
|
56
56
|
# Shipping method validity
|
57
57
|
attr_accessor :shipping_method_validity
|
58
58
|
|
59
|
+
# Ships separately
|
60
|
+
attr_accessor :ships_separately
|
61
|
+
|
59
62
|
# Signature required
|
60
63
|
attr_accessor :signature_required
|
61
64
|
|
@@ -98,6 +101,7 @@ module UltracartClient
|
|
98
101
|
:'shipping_method' => :'shipping_method',
|
99
102
|
:'shipping_method_oid' => :'shipping_method_oid',
|
100
103
|
:'shipping_method_validity' => :'shipping_method_validity',
|
104
|
+
:'ships_separately' => :'ships_separately',
|
101
105
|
:'signature_required' => :'signature_required'
|
102
106
|
}
|
103
107
|
end
|
@@ -119,6 +123,7 @@ module UltracartClient
|
|
119
123
|
:'shipping_method' => :'String',
|
120
124
|
:'shipping_method_oid' => :'Integer',
|
121
125
|
:'shipping_method_validity' => :'String',
|
126
|
+
:'ships_separately' => :'BOOLEAN',
|
122
127
|
:'signature_required' => :'BOOLEAN'
|
123
128
|
}
|
124
129
|
end
|
@@ -187,6 +192,10 @@ module UltracartClient
|
|
187
192
|
self.shipping_method_validity = attributes[:'shipping_method_validity']
|
188
193
|
end
|
189
194
|
|
195
|
+
if attributes.has_key?(:'ships_separately')
|
196
|
+
self.ships_separately = attributes[:'ships_separately']
|
197
|
+
end
|
198
|
+
|
190
199
|
if attributes.has_key?(:'signature_required')
|
191
200
|
self.signature_required = attributes[:'signature_required']
|
192
201
|
end
|
@@ -236,6 +245,7 @@ module UltracartClient
|
|
236
245
|
shipping_method == o.shipping_method &&
|
237
246
|
shipping_method_oid == o.shipping_method_oid &&
|
238
247
|
shipping_method_validity == o.shipping_method_validity &&
|
248
|
+
ships_separately == o.ships_separately &&
|
239
249
|
signature_required == o.signature_required
|
240
250
|
end
|
241
251
|
|
@@ -248,7 +258,7 @@ module UltracartClient
|
|
248
258
|
# Calculates hash code according to all attributes.
|
249
259
|
# @return [Fixnum] Hash code
|
250
260
|
def hash
|
251
|
-
[cost, each_additional_item_markup, filter_to_if_available, first_item_markup, fixed_shipping_cost, flat_fee_markup, free_shipping, per_item_fee_markup, percentage_markup, percentage_of_item_markup, relax_restrictions_on_upsell, shipping_method, shipping_method_oid, shipping_method_validity, signature_required].hash
|
261
|
+
[cost, each_additional_item_markup, filter_to_if_available, first_item_markup, fixed_shipping_cost, flat_fee_markup, free_shipping, per_item_fee_markup, percentage_markup, percentage_of_item_markup, relax_restrictions_on_upsell, shipping_method, shipping_method_oid, shipping_method_validity, ships_separately, signature_required].hash
|
252
262
|
end
|
253
263
|
|
254
264
|
# Builds the object from hash
|
@@ -241,7 +241,7 @@ module UltracartClient
|
|
241
241
|
# Check to see if the all the properties in the model are valid
|
242
242
|
# @return true if the model is valid
|
243
243
|
def valid?
|
244
|
-
payment_method_validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Amazon Pay', 'Amazon SC', 'Cash', 'Check', 'COD', 'Credit Card', 'eBay', 'eCheck', 'Google Shopping', 'Goldbelly', 'GoHighLevel', 'Insurance', 'Link', 'LoanHero', 'Money Order', 'PayPal', 'Purchase Order', 'Quote Request', 'Unknown', 'Wire Transfer', 'Walmart', 'Shop.com', 'Sezzle', 'Venmo', 'Apple Pay', 'Google Pay', 'Health Benefit Card', 'PayPal Fastlane'])
|
244
|
+
payment_method_validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Amazon Pay', 'Amazon SC', 'Cash', 'Check', 'COD', 'Credit Card', 'Crypto', 'eBay', 'eCheck', 'Google Shopping', 'Goldbelly', 'GoHighLevel', 'Insurance', 'Link', 'LoanHero', 'Money Order', 'PayPal', 'Purchase Order', 'Quote Request', 'Unknown', 'Wire Transfer', 'Walmart', 'Shop.com', 'Sezzle', 'Venmo', 'Apple Pay', 'Google Pay', 'Health Benefit Card', 'PayPal Fastlane'])
|
245
245
|
return false unless payment_method_validator.valid?(@payment_method)
|
246
246
|
payment_status_validator = EnumAttributeValidator.new('String', ['Unprocessed', 'Authorized', 'Capture Failed', 'Processed', 'Declined', 'Voided', 'Refunded', 'Skipped'])
|
247
247
|
return false unless payment_status_validator.valid?(@payment_status)
|
@@ -251,7 +251,7 @@ module UltracartClient
|
|
251
251
|
# Custom attribute writer method checking allowed values (enum).
|
252
252
|
# @param [Object] payment_method Object to be assigned
|
253
253
|
def payment_method=(payment_method)
|
254
|
-
validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Amazon Pay', 'Amazon SC', 'Cash', 'Check', 'COD', 'Credit Card', 'eBay', 'eCheck', 'Google Shopping', 'Goldbelly', 'GoHighLevel', 'Insurance', 'Link', 'LoanHero', 'Money Order', 'PayPal', 'Purchase Order', 'Quote Request', 'Unknown', 'Wire Transfer', 'Walmart', 'Shop.com', 'Sezzle', 'Venmo', 'Apple Pay', 'Google Pay', 'Health Benefit Card', 'PayPal Fastlane'])
|
254
|
+
validator = EnumAttributeValidator.new('String', ['Affirm', 'Amazon', 'Amazon Pay', 'Amazon SC', 'Cash', 'Check', 'COD', 'Credit Card', 'Crypto', 'eBay', 'eCheck', 'Google Shopping', 'Goldbelly', 'GoHighLevel', 'Insurance', 'Link', 'LoanHero', 'Money Order', 'PayPal', 'Purchase Order', 'Quote Request', 'Unknown', 'Wire Transfer', 'Walmart', 'Shop.com', 'Sezzle', 'Venmo', 'Apple Pay', 'Google Pay', 'Health Benefit Card', 'PayPal Fastlane'])
|
255
255
|
unless validator.valid?(payment_method)
|
256
256
|
fail ArgumentError, 'invalid value for "payment_method", must be one of #{validator.allowable_values}.'
|
257
257
|
end
|
@@ -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. Must match order.items[].item_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.22
|
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-10-06 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
|