ultracart_api 4.1.237 → 4.1.239
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 +15 -2
- data/docs/SfvbApi.md +229 -0
- data/docs/SfvbApprovalCreateRequest.md +4 -0
- data/docs/SfvbItemPreorder.md +36 -0
- data/docs/SfvbItemPreorderChange.md +24 -0
- data/docs/SfvbItemPreorderChildRow.md +20 -0
- data/docs/SfvbItemPreorderChildrenRequest.md +24 -0
- data/docs/SfvbItemPreorderListResponse.md +20 -0
- data/docs/SfvbItemPreorderOption.md +20 -0
- data/docs/SfvbItemPreorderRequest.md +22 -0
- data/docs/SfvbTrackingProviderSecrets.md +2 -0
- data/docs/SfvbWhoamiResponse.md +4 -0
- data/docs/TaxJarConfig.md +2 -0
- data/lib/ultracart_api/api/sfvb_api.rb +315 -0
- data/lib/ultracart_api/models/sfvb_approval_create_request.rb +21 -3
- data/lib/ultracart_api/models/sfvb_item_preorder.rb +347 -0
- data/lib/ultracart_api/models/sfvb_item_preorder_change.rb +250 -0
- data/lib/ultracart_api/models/sfvb_item_preorder_child_row.rb +230 -0
- data/lib/ultracart_api/models/sfvb_item_preorder_children_request.rb +252 -0
- data/lib/ultracart_api/models/sfvb_item_preorder_list_response.rb +231 -0
- data/lib/ultracart_api/models/sfvb_item_preorder_option.rb +230 -0
- data/lib/ultracart_api/models/sfvb_item_preorder_request.rb +240 -0
- data/lib/ultracart_api/models/sfvb_tracking_provider_secrets.rb +11 -1
- data/lib/ultracart_api/models/sfvb_whoami_response.rb +21 -1
- data/lib/ultracart_api/models/tax_jar_config.rb +11 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +7 -0
- metadata +15 -1
|
@@ -0,0 +1,230 @@
|
|
|
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 SfvbItemPreorderOption
|
|
18
|
+
# The variation's name, such as Size.
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
21
|
+
# The option value, such as 2T.
|
|
22
|
+
attr_accessor :value
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'name' => :'name',
|
|
28
|
+
:'value' => :'value'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'name' => :'String',
|
|
41
|
+
:'value' => :'String'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbItemPreorderOption` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbItemPreorderOption`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'name')
|
|
67
|
+
self.name = attributes[:'name']
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'value')
|
|
71
|
+
self.value = attributes[:'value']
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
76
|
+
# @return Array for valid properties with the reasons
|
|
77
|
+
def list_invalid_properties
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
invalid_properties
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Check to see if the all the properties in the model are valid
|
|
83
|
+
# @return true if the model is valid
|
|
84
|
+
def valid?
|
|
85
|
+
true
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Checks equality by comparing each attribute.
|
|
89
|
+
# @param [Object] Object to be compared
|
|
90
|
+
def ==(o)
|
|
91
|
+
return true if self.equal?(o)
|
|
92
|
+
self.class == o.class &&
|
|
93
|
+
name == o.name &&
|
|
94
|
+
value == o.value
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# @see the `==` method
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def eql?(o)
|
|
100
|
+
self == o
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Calculates hash code according to all attributes.
|
|
104
|
+
# @return [Integer] Hash code
|
|
105
|
+
def hash
|
|
106
|
+
[name, value].hash
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Builds the object from hash
|
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
111
|
+
# @return [Object] Returns the model itself
|
|
112
|
+
def self.build_from_hash(attributes)
|
|
113
|
+
new.build_from_hash(attributes)
|
|
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
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
122
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
123
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
124
|
+
self.send("#{key}=", nil)
|
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
126
|
+
# check to ensure the input is an array given that the attribute
|
|
127
|
+
# is documented as an array but the input is not
|
|
128
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
129
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
132
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
self
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Deserializes the data based on type
|
|
140
|
+
# @param string type Data type
|
|
141
|
+
# @param string value Value to be deserialized
|
|
142
|
+
# @return [Object] Deserialized data
|
|
143
|
+
def _deserialize(type, value)
|
|
144
|
+
case type.to_sym
|
|
145
|
+
when :Time
|
|
146
|
+
Time.parse(value)
|
|
147
|
+
when :Date
|
|
148
|
+
Date.parse(value)
|
|
149
|
+
when :String
|
|
150
|
+
value.to_s
|
|
151
|
+
when :Integer
|
|
152
|
+
value.to_i
|
|
153
|
+
when :Float
|
|
154
|
+
value.to_f
|
|
155
|
+
when :Boolean
|
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
157
|
+
true
|
|
158
|
+
else
|
|
159
|
+
false
|
|
160
|
+
end
|
|
161
|
+
when :Object
|
|
162
|
+
# generic object (usually a Hash), return directly
|
|
163
|
+
value
|
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
|
170
|
+
{}.tap do |hash|
|
|
171
|
+
value.each do |k, v|
|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
else # model
|
|
176
|
+
# models (e.g. Pet) or oneOf
|
|
177
|
+
klass = UltracartClient.const_get(type)
|
|
178
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Returns the string representation of the object
|
|
183
|
+
# @return [String] String presentation of the object
|
|
184
|
+
def to_s
|
|
185
|
+
to_hash.to_s
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
|
190
|
+
def to_body
|
|
191
|
+
to_hash
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Returns the object in the form of hash
|
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
|
196
|
+
def to_hash
|
|
197
|
+
hash = {}
|
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
199
|
+
value = self.send(attr)
|
|
200
|
+
if value.nil?
|
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
hash[param] = _to_hash(value)
|
|
206
|
+
end
|
|
207
|
+
hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Outputs non-array value in the form of hash
|
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
212
|
+
# @param [Object] value Any valid value
|
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
|
214
|
+
def _to_hash(value)
|
|
215
|
+
if value.is_a?(Array)
|
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
|
217
|
+
elsif value.is_a?(Hash)
|
|
218
|
+
{}.tap do |hash|
|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
220
|
+
end
|
|
221
|
+
elsif value.respond_to? :to_hash
|
|
222
|
+
value.to_hash
|
|
223
|
+
else
|
|
224
|
+
value
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
end
|
|
@@ -0,0 +1,240 @@
|
|
|
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 SfvbItemPreorderRequest
|
|
18
|
+
# True to remove the ETA. Not with eta.
|
|
19
|
+
attr_accessor :clear_eta
|
|
20
|
+
|
|
21
|
+
# The expected date, YYYY-MM-DD. Not with clear_eta.
|
|
22
|
+
attr_accessor :eta
|
|
23
|
+
|
|
24
|
+
# True to put the item on pre-order, false to take it off. Either needs an approved item.preorder request when it changes the item.
|
|
25
|
+
attr_accessor :preorder
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'clear_eta' => :'clear_eta',
|
|
31
|
+
:'eta' => :'eta',
|
|
32
|
+
:'preorder' => :'preorder'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'clear_eta' => :'Boolean',
|
|
45
|
+
:'eta' => :'String',
|
|
46
|
+
:'preorder' => :'Boolean'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbItemPreorderRequest` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbItemPreorderRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
67
|
+
end
|
|
68
|
+
h[k.to_sym] = v
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'clear_eta')
|
|
72
|
+
self.clear_eta = attributes[:'clear_eta']
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'eta')
|
|
76
|
+
self.eta = attributes[:'eta']
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'preorder')
|
|
80
|
+
self.preorder = attributes[:'preorder']
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
85
|
+
# @return Array for valid properties with the reasons
|
|
86
|
+
def list_invalid_properties
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
invalid_properties
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Check to see if the all the properties in the model are valid
|
|
92
|
+
# @return true if the model is valid
|
|
93
|
+
def valid?
|
|
94
|
+
true
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Checks equality by comparing each attribute.
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def ==(o)
|
|
100
|
+
return true if self.equal?(o)
|
|
101
|
+
self.class == o.class &&
|
|
102
|
+
clear_eta == o.clear_eta &&
|
|
103
|
+
eta == o.eta &&
|
|
104
|
+
preorder == o.preorder
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# @see the `==` method
|
|
108
|
+
# @param [Object] Object to be compared
|
|
109
|
+
def eql?(o)
|
|
110
|
+
self == o
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Calculates hash code according to all attributes.
|
|
114
|
+
# @return [Integer] Hash code
|
|
115
|
+
def hash
|
|
116
|
+
[clear_eta, eta, preorder].hash
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Builds the object from hash
|
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
121
|
+
# @return [Object] Returns the model itself
|
|
122
|
+
def self.build_from_hash(attributes)
|
|
123
|
+
new.build_from_hash(attributes)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Builds the object from hash
|
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
128
|
+
# @return [Object] Returns the model itself
|
|
129
|
+
def build_from_hash(attributes)
|
|
130
|
+
return nil unless attributes.is_a?(Hash)
|
|
131
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
132
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
133
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
134
|
+
self.send("#{key}=", nil)
|
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
136
|
+
# check to ensure the input is an array given that the attribute
|
|
137
|
+
# is documented as an array but the input is not
|
|
138
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
139
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
140
|
+
end
|
|
141
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
142
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
self
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Deserializes the data based on type
|
|
150
|
+
# @param string type Data type
|
|
151
|
+
# @param string value Value to be deserialized
|
|
152
|
+
# @return [Object] Deserialized data
|
|
153
|
+
def _deserialize(type, value)
|
|
154
|
+
case type.to_sym
|
|
155
|
+
when :Time
|
|
156
|
+
Time.parse(value)
|
|
157
|
+
when :Date
|
|
158
|
+
Date.parse(value)
|
|
159
|
+
when :String
|
|
160
|
+
value.to_s
|
|
161
|
+
when :Integer
|
|
162
|
+
value.to_i
|
|
163
|
+
when :Float
|
|
164
|
+
value.to_f
|
|
165
|
+
when :Boolean
|
|
166
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
167
|
+
true
|
|
168
|
+
else
|
|
169
|
+
false
|
|
170
|
+
end
|
|
171
|
+
when :Object
|
|
172
|
+
# generic object (usually a Hash), return directly
|
|
173
|
+
value
|
|
174
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
175
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
176
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
177
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
178
|
+
k_type = Regexp.last_match[:k_type]
|
|
179
|
+
v_type = Regexp.last_match[:v_type]
|
|
180
|
+
{}.tap do |hash|
|
|
181
|
+
value.each do |k, v|
|
|
182
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
else # model
|
|
186
|
+
# models (e.g. Pet) or oneOf
|
|
187
|
+
klass = UltracartClient.const_get(type)
|
|
188
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Returns the string representation of the object
|
|
193
|
+
# @return [String] String presentation of the object
|
|
194
|
+
def to_s
|
|
195
|
+
to_hash.to_s
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
|
200
|
+
def to_body
|
|
201
|
+
to_hash
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Returns the object in the form of hash
|
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
|
206
|
+
def to_hash
|
|
207
|
+
hash = {}
|
|
208
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
209
|
+
value = self.send(attr)
|
|
210
|
+
if value.nil?
|
|
211
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
212
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
hash[param] = _to_hash(value)
|
|
216
|
+
end
|
|
217
|
+
hash
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Outputs non-array value in the form of hash
|
|
221
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
222
|
+
# @param [Object] value Any valid value
|
|
223
|
+
# @return [Hash] Returns the value in the form of hash
|
|
224
|
+
def _to_hash(value)
|
|
225
|
+
if value.is_a?(Array)
|
|
226
|
+
value.compact.map { |v| _to_hash(v) }
|
|
227
|
+
elsif value.is_a?(Hash)
|
|
228
|
+
{}.tap do |hash|
|
|
229
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
230
|
+
end
|
|
231
|
+
elsif value.respond_to? :to_hash
|
|
232
|
+
value.to_hash
|
|
233
|
+
else
|
|
234
|
+
value
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
end
|
|
@@ -51,6 +51,9 @@ module UltracartClient
|
|
|
51
51
|
# Northbeam API Key. A secret handle (sec_...) made for this storefront by POST secrets with sink tracking.northbeam.api_key, or an empty string to clear it.
|
|
52
52
|
attr_accessor :northbeam_api_key
|
|
53
53
|
|
|
54
|
+
# OpenAI Conversions API Key. A secret handle (sec_...) made for this storefront by POST secrets with sink tracking.openai.conversions_api_key, or an empty string to clear it.
|
|
55
|
+
attr_accessor :openai_conversions_api_key
|
|
56
|
+
|
|
54
57
|
# Pinterest Conversion Token. A secret handle (sec_...) made for this storefront by POST secrets with sink tracking.pinterest.capi_token, or an empty string to clear it.
|
|
55
58
|
attr_accessor :pinterest_token
|
|
56
59
|
|
|
@@ -75,6 +78,7 @@ module UltracartClient
|
|
|
75
78
|
:'klaviyo_private_api_key' => :'klaviyo_private_api_key',
|
|
76
79
|
:'nextdoor_access_token' => :'nextdoor_access_token',
|
|
77
80
|
:'northbeam_api_key' => :'northbeam_api_key',
|
|
81
|
+
:'openai_conversions_api_key' => :'openai_conversions_api_key',
|
|
78
82
|
:'pinterest_token' => :'pinterest_token',
|
|
79
83
|
:'referralcandy_secret_key' => :'referralcandy_secret_key',
|
|
80
84
|
:'retention_key' => :'retention_key'
|
|
@@ -101,6 +105,7 @@ module UltracartClient
|
|
|
101
105
|
:'klaviyo_private_api_key' => :'String',
|
|
102
106
|
:'nextdoor_access_token' => :'String',
|
|
103
107
|
:'northbeam_api_key' => :'String',
|
|
108
|
+
:'openai_conversions_api_key' => :'String',
|
|
104
109
|
:'pinterest_token' => :'String',
|
|
105
110
|
:'referralcandy_secret_key' => :'String',
|
|
106
111
|
:'retention_key' => :'String'
|
|
@@ -176,6 +181,10 @@ module UltracartClient
|
|
|
176
181
|
self.northbeam_api_key = attributes[:'northbeam_api_key']
|
|
177
182
|
end
|
|
178
183
|
|
|
184
|
+
if attributes.key?(:'openai_conversions_api_key')
|
|
185
|
+
self.openai_conversions_api_key = attributes[:'openai_conversions_api_key']
|
|
186
|
+
end
|
|
187
|
+
|
|
179
188
|
if attributes.key?(:'pinterest_token')
|
|
180
189
|
self.pinterest_token = attributes[:'pinterest_token']
|
|
181
190
|
end
|
|
@@ -219,6 +228,7 @@ module UltracartClient
|
|
|
219
228
|
klaviyo_private_api_key == o.klaviyo_private_api_key &&
|
|
220
229
|
nextdoor_access_token == o.nextdoor_access_token &&
|
|
221
230
|
northbeam_api_key == o.northbeam_api_key &&
|
|
231
|
+
openai_conversions_api_key == o.openai_conversions_api_key &&
|
|
222
232
|
pinterest_token == o.pinterest_token &&
|
|
223
233
|
referralcandy_secret_key == o.referralcandy_secret_key &&
|
|
224
234
|
retention_key == o.retention_key
|
|
@@ -233,7 +243,7 @@ module UltracartClient
|
|
|
233
243
|
# Calculates hash code according to all attributes.
|
|
234
244
|
# @return [Integer] Hash code
|
|
235
245
|
def hash
|
|
236
|
-
[attentive_private_api_key, awin_conversion_api_key, axon_conversion_api_key, converge_webhook_token, customerio_write_key, facebook_server_side_access_token, ga4_api_secret, hyros_api_key, kissmetrics_api_key, klaviyo_private_api_key, nextdoor_access_token, northbeam_api_key, pinterest_token, referralcandy_secret_key, retention_key].hash
|
|
246
|
+
[attentive_private_api_key, awin_conversion_api_key, axon_conversion_api_key, converge_webhook_token, customerio_write_key, facebook_server_side_access_token, ga4_api_secret, hyros_api_key, kissmetrics_api_key, klaviyo_private_api_key, nextdoor_access_token, northbeam_api_key, openai_conversions_api_key, pinterest_token, referralcandy_secret_key, retention_key].hash
|
|
237
247
|
end
|
|
238
248
|
|
|
239
249
|
# Builds the object from hash
|
|
@@ -24,6 +24,9 @@ module UltracartClient
|
|
|
24
24
|
# How this token authenticated - Oauth2, Simple Key, Public/Private Key or Browser Key.
|
|
25
25
|
attr_accessor :authentication_type
|
|
26
26
|
|
|
27
|
+
# True when this token may change item data. Needs can_write, and the UltraCart user behind the token must hold Edit Items. A token with no user is judged on its scopes alone.
|
|
28
|
+
attr_accessor :can_edit_items
|
|
29
|
+
|
|
27
30
|
# True when this token may write a target that is currently live - an active upsell offer, an email on a delivering flow, the active theme, the storefront root. Never infer this; it is the difference between a draft edit and a shopper visible change.
|
|
28
31
|
attr_accessor :can_publish
|
|
29
32
|
|
|
@@ -33,6 +36,9 @@ module UltracartClient
|
|
|
33
36
|
# True when this token may read. Do not infer this from the requested scope name.
|
|
34
37
|
attr_accessor :can_read
|
|
35
38
|
|
|
39
|
+
# True when this token may read item data - the item, its pricing, pre-order and related items. Needs can_read, and the UltraCart user behind the token must hold View Items or Edit Items. A token with no user is judged on its scopes alone.
|
|
40
|
+
attr_accessor :can_read_items
|
|
41
|
+
|
|
36
42
|
# True when this token may write. Writing a target that is not currently live needs only this.
|
|
37
43
|
attr_accessor :can_write
|
|
38
44
|
|
|
@@ -63,9 +69,11 @@ module UltracartClient
|
|
|
63
69
|
:'acting_as_user' => :'acting_as_user',
|
|
64
70
|
:'application_name' => :'application_name',
|
|
65
71
|
:'authentication_type' => :'authentication_type',
|
|
72
|
+
:'can_edit_items' => :'can_edit_items',
|
|
66
73
|
:'can_publish' => :'can_publish',
|
|
67
74
|
:'can_publish_public' => :'can_publish_public',
|
|
68
75
|
:'can_read' => :'can_read',
|
|
76
|
+
:'can_read_items' => :'can_read_items',
|
|
69
77
|
:'can_write' => :'can_write',
|
|
70
78
|
:'device_scope' => :'device_scope',
|
|
71
79
|
:'login' => :'login',
|
|
@@ -88,9 +96,11 @@ module UltracartClient
|
|
|
88
96
|
:'acting_as_user' => :'Boolean',
|
|
89
97
|
:'application_name' => :'String',
|
|
90
98
|
:'authentication_type' => :'String',
|
|
99
|
+
:'can_edit_items' => :'Boolean',
|
|
91
100
|
:'can_publish' => :'Boolean',
|
|
92
101
|
:'can_publish_public' => :'Boolean',
|
|
93
102
|
:'can_read' => :'Boolean',
|
|
103
|
+
:'can_read_items' => :'Boolean',
|
|
94
104
|
:'can_write' => :'Boolean',
|
|
95
105
|
:'device_scope' => :'String',
|
|
96
106
|
:'login' => :'String',
|
|
@@ -135,6 +145,10 @@ module UltracartClient
|
|
|
135
145
|
self.authentication_type = attributes[:'authentication_type']
|
|
136
146
|
end
|
|
137
147
|
|
|
148
|
+
if attributes.key?(:'can_edit_items')
|
|
149
|
+
self.can_edit_items = attributes[:'can_edit_items']
|
|
150
|
+
end
|
|
151
|
+
|
|
138
152
|
if attributes.key?(:'can_publish')
|
|
139
153
|
self.can_publish = attributes[:'can_publish']
|
|
140
154
|
end
|
|
@@ -147,6 +161,10 @@ module UltracartClient
|
|
|
147
161
|
self.can_read = attributes[:'can_read']
|
|
148
162
|
end
|
|
149
163
|
|
|
164
|
+
if attributes.key?(:'can_read_items')
|
|
165
|
+
self.can_read_items = attributes[:'can_read_items']
|
|
166
|
+
end
|
|
167
|
+
|
|
150
168
|
if attributes.key?(:'can_write')
|
|
151
169
|
self.can_write = attributes[:'can_write']
|
|
152
170
|
end
|
|
@@ -205,9 +223,11 @@ module UltracartClient
|
|
|
205
223
|
acting_as_user == o.acting_as_user &&
|
|
206
224
|
application_name == o.application_name &&
|
|
207
225
|
authentication_type == o.authentication_type &&
|
|
226
|
+
can_edit_items == o.can_edit_items &&
|
|
208
227
|
can_publish == o.can_publish &&
|
|
209
228
|
can_publish_public == o.can_publish_public &&
|
|
210
229
|
can_read == o.can_read &&
|
|
230
|
+
can_read_items == o.can_read_items &&
|
|
211
231
|
can_write == o.can_write &&
|
|
212
232
|
device_scope == o.device_scope &&
|
|
213
233
|
login == o.login &&
|
|
@@ -227,7 +247,7 @@ module UltracartClient
|
|
|
227
247
|
# Calculates hash code according to all attributes.
|
|
228
248
|
# @return [Integer] Hash code
|
|
229
249
|
def hash
|
|
230
|
-
[acting_as_user, application_name, authentication_type, can_publish, can_publish_public, can_read, can_write, device_scope, login, merchant_id, scopes, storefronts, storefronts_withheld, user_name].hash
|
|
250
|
+
[acting_as_user, application_name, authentication_type, can_edit_items, can_publish, can_publish_public, can_read, can_read_items, can_write, device_scope, login, merchant_id, scopes, storefronts, storefronts_withheld, user_name].hash
|
|
231
251
|
end
|
|
232
252
|
|
|
233
253
|
# Builds the object from hash
|
|
@@ -30,6 +30,9 @@ module UltracartClient
|
|
|
30
30
|
# Send test orders through to TaxJar. The default is to not transmit test orders to TaxJar.
|
|
31
31
|
attr_accessor :send_test_orders
|
|
32
32
|
|
|
33
|
+
# Only calculate tax for states within your nexus. Requires send_outside_nexus to be true. When true, orders outside your nexus are still transmitted to TaxJar for nexus tracking, but no tax calculation is requested for them, reducing API calls.
|
|
34
|
+
attr_accessor :skip_calculation_outside_nexus
|
|
35
|
+
|
|
33
36
|
# Do not send channel partner orders to TaxJar. Set this to true if your channel partner reports tax on their own.
|
|
34
37
|
attr_accessor :skip_channel_orders
|
|
35
38
|
|
|
@@ -44,6 +47,7 @@ module UltracartClient
|
|
|
44
47
|
:'estimate_only' => :'estimate_only',
|
|
45
48
|
:'send_outside_nexus' => :'send_outside_nexus',
|
|
46
49
|
:'send_test_orders' => :'send_test_orders',
|
|
50
|
+
:'skip_calculation_outside_nexus' => :'skip_calculation_outside_nexus',
|
|
47
51
|
:'skip_channel_orders' => :'skip_channel_orders',
|
|
48
52
|
:'use_distribution_center_from' => :'use_distribution_center_from'
|
|
49
53
|
}
|
|
@@ -62,6 +66,7 @@ module UltracartClient
|
|
|
62
66
|
:'estimate_only' => :'Boolean',
|
|
63
67
|
:'send_outside_nexus' => :'Boolean',
|
|
64
68
|
:'send_test_orders' => :'Boolean',
|
|
69
|
+
:'skip_calculation_outside_nexus' => :'Boolean',
|
|
65
70
|
:'skip_channel_orders' => :'Boolean',
|
|
66
71
|
:'use_distribution_center_from' => :'Boolean'
|
|
67
72
|
}
|
|
@@ -108,6 +113,10 @@ module UltracartClient
|
|
|
108
113
|
self.send_test_orders = attributes[:'send_test_orders']
|
|
109
114
|
end
|
|
110
115
|
|
|
116
|
+
if attributes.key?(:'skip_calculation_outside_nexus')
|
|
117
|
+
self.skip_calculation_outside_nexus = attributes[:'skip_calculation_outside_nexus']
|
|
118
|
+
end
|
|
119
|
+
|
|
111
120
|
if attributes.key?(:'skip_channel_orders')
|
|
112
121
|
self.skip_channel_orders = attributes[:'skip_channel_orders']
|
|
113
122
|
end
|
|
@@ -140,6 +149,7 @@ module UltracartClient
|
|
|
140
149
|
estimate_only == o.estimate_only &&
|
|
141
150
|
send_outside_nexus == o.send_outside_nexus &&
|
|
142
151
|
send_test_orders == o.send_test_orders &&
|
|
152
|
+
skip_calculation_outside_nexus == o.skip_calculation_outside_nexus &&
|
|
143
153
|
skip_channel_orders == o.skip_channel_orders &&
|
|
144
154
|
use_distribution_center_from == o.use_distribution_center_from
|
|
145
155
|
end
|
|
@@ -153,7 +163,7 @@ module UltracartClient
|
|
|
153
163
|
# Calculates hash code according to all attributes.
|
|
154
164
|
# @return [Integer] Hash code
|
|
155
165
|
def hash
|
|
156
|
-
[active, api_key, estimate_only, send_outside_nexus, send_test_orders, skip_channel_orders, use_distribution_center_from].hash
|
|
166
|
+
[active, api_key, estimate_only, send_outside_nexus, send_test_orders, skip_calculation_outside_nexus, skip_channel_orders, use_distribution_center_from].hash
|
|
157
167
|
end
|
|
158
168
|
|
|
159
169
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -1144,6 +1144,13 @@ require 'ultracart_api/models/sfvb_item_content_request'
|
|
|
1144
1144
|
require 'ultracart_api/models/sfvb_item_multimedia'
|
|
1145
1145
|
require 'ultracart_api/models/sfvb_item_multimedia_description_request'
|
|
1146
1146
|
require 'ultracart_api/models/sfvb_item_multimedia_request'
|
|
1147
|
+
require 'ultracart_api/models/sfvb_item_preorder'
|
|
1148
|
+
require 'ultracart_api/models/sfvb_item_preorder_change'
|
|
1149
|
+
require 'ultracart_api/models/sfvb_item_preorder_child_row'
|
|
1150
|
+
require 'ultracart_api/models/sfvb_item_preorder_children_request'
|
|
1151
|
+
require 'ultracart_api/models/sfvb_item_preorder_list_response'
|
|
1152
|
+
require 'ultracart_api/models/sfvb_item_preorder_option'
|
|
1153
|
+
require 'ultracart_api/models/sfvb_item_preorder_request'
|
|
1147
1154
|
require 'ultracart_api/models/sfvb_item_pricing'
|
|
1148
1155
|
require 'ultracart_api/models/sfvb_item_pricing_request'
|
|
1149
1156
|
require 'ultracart_api/models/sfvb_item_related'
|