ultracart_api 4.0.111.rc → 4.0.113.rc
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 +16 -4
- data/docs/ChannelPartnerApi.md +438 -0
- data/docs/ChannelPartnerShipToPreference.md +28 -0
- data/docs/ChannelPartnerShipToPreferenceResponse.md +26 -0
- data/docs/ChannelPartnerShipToPreferencesResponse.md +26 -0
- data/docs/ChannelPartnersResponse.md +26 -0
- data/docs/PointOfSaleLocation.md +2 -0
- data/lib/ultracart_api/api/channel_partner_api.rb +418 -0
- data/lib/ultracart_api/models/channel_partner_ship_to_preference.rb +272 -0
- data/lib/ultracart_api/models/channel_partner_ship_to_preference_response.rb +256 -0
- data/lib/ultracart_api/models/channel_partner_ship_to_preferences_response.rb +259 -0
- data/lib/ultracart_api/models/channel_partners_response.rb +259 -0
- data/lib/ultracart_api/models/order_payment.rb +2 -2
- data/lib/ultracart_api/models/point_of_sale_location.rb +26 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +4 -0
- metadata +10 -2
@@ -0,0 +1,259 @@
|
|
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 ChannelPartnerShipToPreferencesResponse
|
18
|
+
attr_accessor :error
|
19
|
+
|
20
|
+
attr_accessor :metadata
|
21
|
+
|
22
|
+
# ship_to_preferences
|
23
|
+
attr_accessor :ship_to_preferences
|
24
|
+
|
25
|
+
# Indicates if API call was successful
|
26
|
+
attr_accessor :success
|
27
|
+
|
28
|
+
attr_accessor :warning
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
def self.attribute_map
|
32
|
+
{
|
33
|
+
:'error' => :'error',
|
34
|
+
:'metadata' => :'metadata',
|
35
|
+
:'ship_to_preferences' => :'shipToPreferences',
|
36
|
+
:'success' => :'success',
|
37
|
+
:'warning' => :'warning'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Returns all the JSON keys this model knows about
|
42
|
+
def self.acceptable_attributes
|
43
|
+
attribute_map.values
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute type mapping.
|
47
|
+
def self.openapi_types
|
48
|
+
{
|
49
|
+
:'error' => :'Error',
|
50
|
+
:'metadata' => :'ResponseMetadata',
|
51
|
+
:'ship_to_preferences' => :'Array<ChannelPartnerShipToPreference>',
|
52
|
+
:'success' => :'Boolean',
|
53
|
+
:'warning' => :'Warning'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# List of attributes with nullable: true
|
58
|
+
def self.openapi_nullable
|
59
|
+
Set.new([
|
60
|
+
])
|
61
|
+
end
|
62
|
+
|
63
|
+
# Initializes the object
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
65
|
+
def initialize(attributes = {})
|
66
|
+
if (!attributes.is_a?(Hash))
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ChannelPartnerShipToPreferencesResponse` initialize method"
|
68
|
+
end
|
69
|
+
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
72
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ChannelPartnerShipToPreferencesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
74
|
+
end
|
75
|
+
h[k.to_sym] = v
|
76
|
+
}
|
77
|
+
|
78
|
+
if attributes.key?(:'error')
|
79
|
+
self.error = attributes[:'error']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.key?(:'metadata')
|
83
|
+
self.metadata = attributes[:'metadata']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.key?(:'ship_to_preferences')
|
87
|
+
if (value = attributes[:'ship_to_preferences']).is_a?(Array)
|
88
|
+
self.ship_to_preferences = value
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.key?(:'success')
|
93
|
+
self.success = attributes[:'success']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.key?(:'warning')
|
97
|
+
self.warning = attributes[:'warning']
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
102
|
+
# @return Array for valid properties with the reasons
|
103
|
+
def list_invalid_properties
|
104
|
+
invalid_properties = Array.new
|
105
|
+
invalid_properties
|
106
|
+
end
|
107
|
+
|
108
|
+
# Check to see if the all the properties in the model are valid
|
109
|
+
# @return true if the model is valid
|
110
|
+
def valid?
|
111
|
+
true
|
112
|
+
end
|
113
|
+
|
114
|
+
# Checks equality by comparing each attribute.
|
115
|
+
# @param [Object] Object to be compared
|
116
|
+
def ==(o)
|
117
|
+
return true if self.equal?(o)
|
118
|
+
self.class == o.class &&
|
119
|
+
error == o.error &&
|
120
|
+
metadata == o.metadata &&
|
121
|
+
ship_to_preferences == o.ship_to_preferences &&
|
122
|
+
success == o.success &&
|
123
|
+
warning == o.warning
|
124
|
+
end
|
125
|
+
|
126
|
+
# @see the `==` method
|
127
|
+
# @param [Object] Object to be compared
|
128
|
+
def eql?(o)
|
129
|
+
self == o
|
130
|
+
end
|
131
|
+
|
132
|
+
# Calculates hash code according to all attributes.
|
133
|
+
# @return [Integer] Hash code
|
134
|
+
def hash
|
135
|
+
[error, metadata, ship_to_preferences, success, warning].hash
|
136
|
+
end
|
137
|
+
|
138
|
+
# Builds the object from hash
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
140
|
+
# @return [Object] Returns the model itself
|
141
|
+
def self.build_from_hash(attributes)
|
142
|
+
new.build_from_hash(attributes)
|
143
|
+
end
|
144
|
+
|
145
|
+
# Builds the object from hash
|
146
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
147
|
+
# @return [Object] Returns the model itself
|
148
|
+
def build_from_hash(attributes)
|
149
|
+
return nil unless attributes.is_a?(Hash)
|
150
|
+
attributes = attributes.transform_keys(&:to_sym)
|
151
|
+
self.class.openapi_types.each_pair do |key, type|
|
152
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
153
|
+
self.send("#{key}=", nil)
|
154
|
+
elsif type =~ /\AArray<(.*)>/i
|
155
|
+
# check to ensure the input is an array given that the attribute
|
156
|
+
# is documented as an array but the input is not
|
157
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
158
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
159
|
+
end
|
160
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
161
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
self
|
166
|
+
end
|
167
|
+
|
168
|
+
# Deserializes the data based on type
|
169
|
+
# @param string type Data type
|
170
|
+
# @param string value Value to be deserialized
|
171
|
+
# @return [Object] Deserialized data
|
172
|
+
def _deserialize(type, value)
|
173
|
+
case type.to_sym
|
174
|
+
when :Time
|
175
|
+
Time.parse(value)
|
176
|
+
when :Date
|
177
|
+
Date.parse(value)
|
178
|
+
when :String
|
179
|
+
value.to_s
|
180
|
+
when :Integer
|
181
|
+
value.to_i
|
182
|
+
when :Float
|
183
|
+
value.to_f
|
184
|
+
when :Boolean
|
185
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
186
|
+
true
|
187
|
+
else
|
188
|
+
false
|
189
|
+
end
|
190
|
+
when :Object
|
191
|
+
# generic object (usually a Hash), return directly
|
192
|
+
value
|
193
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
194
|
+
inner_type = Regexp.last_match[:inner_type]
|
195
|
+
value.map { |v| _deserialize(inner_type, v) }
|
196
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
197
|
+
k_type = Regexp.last_match[:k_type]
|
198
|
+
v_type = Regexp.last_match[:v_type]
|
199
|
+
{}.tap do |hash|
|
200
|
+
value.each do |k, v|
|
201
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
else # model
|
205
|
+
# models (e.g. Pet) or oneOf
|
206
|
+
klass = UltracartClient.const_get(type)
|
207
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
# Returns the string representation of the object
|
212
|
+
# @return [String] String presentation of the object
|
213
|
+
def to_s
|
214
|
+
to_hash.to_s
|
215
|
+
end
|
216
|
+
|
217
|
+
# to_body is an alias to to_hash (backward compatibility)
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
219
|
+
def to_body
|
220
|
+
to_hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Returns the object in the form of hash
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
225
|
+
def to_hash
|
226
|
+
hash = {}
|
227
|
+
self.class.attribute_map.each_pair do |attr, param|
|
228
|
+
value = self.send(attr)
|
229
|
+
if value.nil?
|
230
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
231
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
232
|
+
end
|
233
|
+
|
234
|
+
hash[param] = _to_hash(value)
|
235
|
+
end
|
236
|
+
hash
|
237
|
+
end
|
238
|
+
|
239
|
+
# Outputs non-array value in the form of hash
|
240
|
+
# For object, use to_hash. Otherwise, just return the value
|
241
|
+
# @param [Object] value Any valid value
|
242
|
+
# @return [Hash] Returns the value in the form of hash
|
243
|
+
def _to_hash(value)
|
244
|
+
if value.is_a?(Array)
|
245
|
+
value.compact.map { |v| _to_hash(v) }
|
246
|
+
elsif value.is_a?(Hash)
|
247
|
+
{}.tap do |hash|
|
248
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
249
|
+
end
|
250
|
+
elsif value.respond_to? :to_hash
|
251
|
+
value.to_hash
|
252
|
+
else
|
253
|
+
value
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
end
|
258
|
+
|
259
|
+
end
|
@@ -0,0 +1,259 @@
|
|
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 ChannelPartnersResponse
|
18
|
+
# channel_partners
|
19
|
+
attr_accessor :channel_partners
|
20
|
+
|
21
|
+
attr_accessor :error
|
22
|
+
|
23
|
+
attr_accessor :metadata
|
24
|
+
|
25
|
+
# Indicates if API call was successful
|
26
|
+
attr_accessor :success
|
27
|
+
|
28
|
+
attr_accessor :warning
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
def self.attribute_map
|
32
|
+
{
|
33
|
+
:'channel_partners' => :'channelPartners',
|
34
|
+
:'error' => :'error',
|
35
|
+
:'metadata' => :'metadata',
|
36
|
+
:'success' => :'success',
|
37
|
+
:'warning' => :'warning'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Returns all the JSON keys this model knows about
|
42
|
+
def self.acceptable_attributes
|
43
|
+
attribute_map.values
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute type mapping.
|
47
|
+
def self.openapi_types
|
48
|
+
{
|
49
|
+
:'channel_partners' => :'Array<ChannelPartner>',
|
50
|
+
:'error' => :'Error',
|
51
|
+
:'metadata' => :'ResponseMetadata',
|
52
|
+
:'success' => :'Boolean',
|
53
|
+
:'warning' => :'Warning'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# List of attributes with nullable: true
|
58
|
+
def self.openapi_nullable
|
59
|
+
Set.new([
|
60
|
+
])
|
61
|
+
end
|
62
|
+
|
63
|
+
# Initializes the object
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
65
|
+
def initialize(attributes = {})
|
66
|
+
if (!attributes.is_a?(Hash))
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ChannelPartnersResponse` initialize method"
|
68
|
+
end
|
69
|
+
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
72
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ChannelPartnersResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
74
|
+
end
|
75
|
+
h[k.to_sym] = v
|
76
|
+
}
|
77
|
+
|
78
|
+
if attributes.key?(:'channel_partners')
|
79
|
+
if (value = attributes[:'channel_partners']).is_a?(Array)
|
80
|
+
self.channel_partners = value
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'error')
|
85
|
+
self.error = attributes[:'error']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'metadata')
|
89
|
+
self.metadata = attributes[:'metadata']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.key?(:'success')
|
93
|
+
self.success = attributes[:'success']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.key?(:'warning')
|
97
|
+
self.warning = attributes[:'warning']
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
102
|
+
# @return Array for valid properties with the reasons
|
103
|
+
def list_invalid_properties
|
104
|
+
invalid_properties = Array.new
|
105
|
+
invalid_properties
|
106
|
+
end
|
107
|
+
|
108
|
+
# Check to see if the all the properties in the model are valid
|
109
|
+
# @return true if the model is valid
|
110
|
+
def valid?
|
111
|
+
true
|
112
|
+
end
|
113
|
+
|
114
|
+
# Checks equality by comparing each attribute.
|
115
|
+
# @param [Object] Object to be compared
|
116
|
+
def ==(o)
|
117
|
+
return true if self.equal?(o)
|
118
|
+
self.class == o.class &&
|
119
|
+
channel_partners == o.channel_partners &&
|
120
|
+
error == o.error &&
|
121
|
+
metadata == o.metadata &&
|
122
|
+
success == o.success &&
|
123
|
+
warning == o.warning
|
124
|
+
end
|
125
|
+
|
126
|
+
# @see the `==` method
|
127
|
+
# @param [Object] Object to be compared
|
128
|
+
def eql?(o)
|
129
|
+
self == o
|
130
|
+
end
|
131
|
+
|
132
|
+
# Calculates hash code according to all attributes.
|
133
|
+
# @return [Integer] Hash code
|
134
|
+
def hash
|
135
|
+
[channel_partners, error, metadata, success, warning].hash
|
136
|
+
end
|
137
|
+
|
138
|
+
# Builds the object from hash
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
140
|
+
# @return [Object] Returns the model itself
|
141
|
+
def self.build_from_hash(attributes)
|
142
|
+
new.build_from_hash(attributes)
|
143
|
+
end
|
144
|
+
|
145
|
+
# Builds the object from hash
|
146
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
147
|
+
# @return [Object] Returns the model itself
|
148
|
+
def build_from_hash(attributes)
|
149
|
+
return nil unless attributes.is_a?(Hash)
|
150
|
+
attributes = attributes.transform_keys(&:to_sym)
|
151
|
+
self.class.openapi_types.each_pair do |key, type|
|
152
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
153
|
+
self.send("#{key}=", nil)
|
154
|
+
elsif type =~ /\AArray<(.*)>/i
|
155
|
+
# check to ensure the input is an array given that the attribute
|
156
|
+
# is documented as an array but the input is not
|
157
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
158
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
159
|
+
end
|
160
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
161
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
self
|
166
|
+
end
|
167
|
+
|
168
|
+
# Deserializes the data based on type
|
169
|
+
# @param string type Data type
|
170
|
+
# @param string value Value to be deserialized
|
171
|
+
# @return [Object] Deserialized data
|
172
|
+
def _deserialize(type, value)
|
173
|
+
case type.to_sym
|
174
|
+
when :Time
|
175
|
+
Time.parse(value)
|
176
|
+
when :Date
|
177
|
+
Date.parse(value)
|
178
|
+
when :String
|
179
|
+
value.to_s
|
180
|
+
when :Integer
|
181
|
+
value.to_i
|
182
|
+
when :Float
|
183
|
+
value.to_f
|
184
|
+
when :Boolean
|
185
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
186
|
+
true
|
187
|
+
else
|
188
|
+
false
|
189
|
+
end
|
190
|
+
when :Object
|
191
|
+
# generic object (usually a Hash), return directly
|
192
|
+
value
|
193
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
194
|
+
inner_type = Regexp.last_match[:inner_type]
|
195
|
+
value.map { |v| _deserialize(inner_type, v) }
|
196
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
197
|
+
k_type = Regexp.last_match[:k_type]
|
198
|
+
v_type = Regexp.last_match[:v_type]
|
199
|
+
{}.tap do |hash|
|
200
|
+
value.each do |k, v|
|
201
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
else # model
|
205
|
+
# models (e.g. Pet) or oneOf
|
206
|
+
klass = UltracartClient.const_get(type)
|
207
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
# Returns the string representation of the object
|
212
|
+
# @return [String] String presentation of the object
|
213
|
+
def to_s
|
214
|
+
to_hash.to_s
|
215
|
+
end
|
216
|
+
|
217
|
+
# to_body is an alias to to_hash (backward compatibility)
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
219
|
+
def to_body
|
220
|
+
to_hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Returns the object in the form of hash
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
225
|
+
def to_hash
|
226
|
+
hash = {}
|
227
|
+
self.class.attribute_map.each_pair do |attr, param|
|
228
|
+
value = self.send(attr)
|
229
|
+
if value.nil?
|
230
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
231
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
232
|
+
end
|
233
|
+
|
234
|
+
hash[param] = _to_hash(value)
|
235
|
+
end
|
236
|
+
hash
|
237
|
+
end
|
238
|
+
|
239
|
+
# Outputs non-array value in the form of hash
|
240
|
+
# For object, use to_hash. Otherwise, just return the value
|
241
|
+
# @param [Object] value Any valid value
|
242
|
+
# @return [Hash] Returns the value in the form of hash
|
243
|
+
def _to_hash(value)
|
244
|
+
if value.is_a?(Array)
|
245
|
+
value.compact.map { |v| _to_hash(v) }
|
246
|
+
elsif value.is_a?(Hash)
|
247
|
+
{}.tap do |hash|
|
248
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
249
|
+
end
|
250
|
+
elsif value.respond_to? :to_hash
|
251
|
+
value.to_hash
|
252
|
+
else
|
253
|
+
value
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
end
|
258
|
+
|
259
|
+
end
|
@@ -244,7 +244,7 @@ module UltracartClient
|
|
244
244
|
# Check to see if the all the properties in the model are valid
|
245
245
|
# @return true if the model is valid
|
246
246
|
def valid?
|
247
|
-
payment_method_validator = EnumAttributeValidator.new('String', ["Affirm", "Amazon", "Amazon SC", "Cash", "Check", "COD", "Credit Card", "eBay", "eCheck", "Google Shopping", "Insurance", "LoanHero", "Money Order", "PayPal", "Purchase Order", "Quote Request", "Unknown", "Wire Transfer", "Walmart"])
|
247
|
+
payment_method_validator = EnumAttributeValidator.new('String', ["Affirm", "Amazon", "Amazon SC", "Cash", "Check", "COD", "Credit Card", "eBay", "eCheck", "Google Shopping", "Insurance", "LoanHero", "Money Order", "PayPal", "Purchase Order", "Quote Request", "Unknown", "Wire Transfer", "Walmart", "Shop.com"])
|
248
248
|
return false unless payment_method_validator.valid?(@payment_method)
|
249
249
|
payment_status_validator = EnumAttributeValidator.new('String', ["Unprocessed", "Authorized", "Capture Failed", "Processed", "Declined", "Voided", "Refunded", "Skipped"])
|
250
250
|
return false unless payment_status_validator.valid?(@payment_status)
|
@@ -254,7 +254,7 @@ module UltracartClient
|
|
254
254
|
# Custom attribute writer method checking allowed values (enum).
|
255
255
|
# @param [Object] payment_method Object to be assigned
|
256
256
|
def payment_method=(payment_method)
|
257
|
-
validator = EnumAttributeValidator.new('String', ["Affirm", "Amazon", "Amazon SC", "Cash", "Check", "COD", "Credit Card", "eBay", "eCheck", "Google Shopping", "Insurance", "LoanHero", "Money Order", "PayPal", "Purchase Order", "Quote Request", "Unknown", "Wire Transfer", "Walmart"])
|
257
|
+
validator = EnumAttributeValidator.new('String', ["Affirm", "Amazon", "Amazon SC", "Cash", "Check", "COD", "Credit Card", "eBay", "eCheck", "Google Shopping", "Insurance", "LoanHero", "Money Order", "PayPal", "Purchase Order", "Quote Request", "Unknown", "Wire Transfer", "Walmart", "Shop.com"])
|
258
258
|
unless validator.valid?(payment_method)
|
259
259
|
fail ArgumentError, "invalid value for \"payment_method\", must be one of #{validator.allowable_values}."
|
260
260
|
end
|
@@ -30,6 +30,9 @@ module UltracartClient
|
|
30
30
|
# The distribution center code where inventory is reduced from for this sale.
|
31
31
|
attr_accessor :distribution_center_code
|
32
32
|
|
33
|
+
# External Id useful for syncing with a remote filesystem, this may be an MD5 hash or whatever suits your needs.
|
34
|
+
attr_accessor :external_id
|
35
|
+
|
33
36
|
# Merchant ID that owns this location
|
34
37
|
attr_accessor :merchant_id
|
35
38
|
|
@@ -50,6 +53,7 @@ module UltracartClient
|
|
50
53
|
:'city' => :'city',
|
51
54
|
:'country' => :'country',
|
52
55
|
:'distribution_center_code' => :'distribution_center_code',
|
56
|
+
:'external_id' => :'external_id',
|
53
57
|
:'merchant_id' => :'merchant_id',
|
54
58
|
:'pos_location_oid' => :'pos_location_oid',
|
55
59
|
:'postal_code' => :'postal_code',
|
@@ -70,6 +74,7 @@ module UltracartClient
|
|
70
74
|
:'city' => :'String',
|
71
75
|
:'country' => :'String',
|
72
76
|
:'distribution_center_code' => :'String',
|
77
|
+
:'external_id' => :'String',
|
73
78
|
:'merchant_id' => :'String',
|
74
79
|
:'pos_location_oid' => :'Integer',
|
75
80
|
:'postal_code' => :'String',
|
@@ -118,6 +123,10 @@ module UltracartClient
|
|
118
123
|
self.distribution_center_code = attributes[:'distribution_center_code']
|
119
124
|
end
|
120
125
|
|
126
|
+
if attributes.key?(:'external_id')
|
127
|
+
self.external_id = attributes[:'external_id']
|
128
|
+
end
|
129
|
+
|
121
130
|
if attributes.key?(:'merchant_id')
|
122
131
|
self.merchant_id = attributes[:'merchant_id']
|
123
132
|
end
|
@@ -139,15 +148,30 @@ module UltracartClient
|
|
139
148
|
# @return Array for valid properties with the reasons
|
140
149
|
def list_invalid_properties
|
141
150
|
invalid_properties = Array.new
|
151
|
+
if !@external_id.nil? && @external_id.to_s.length > 100
|
152
|
+
invalid_properties.push('invalid value for "external_id", the character length must be smaller than or equal to 100.')
|
153
|
+
end
|
154
|
+
|
142
155
|
invalid_properties
|
143
156
|
end
|
144
157
|
|
145
158
|
# Check to see if the all the properties in the model are valid
|
146
159
|
# @return true if the model is valid
|
147
160
|
def valid?
|
161
|
+
return false if !@external_id.nil? && @external_id.to_s.length > 100
|
148
162
|
true
|
149
163
|
end
|
150
164
|
|
165
|
+
# Custom attribute writer method with validation
|
166
|
+
# @param [Object] external_id Value to be assigned
|
167
|
+
def external_id=(external_id)
|
168
|
+
if !external_id.nil? && external_id.to_s.length > 100
|
169
|
+
fail ArgumentError, 'invalid value for "external_id", the character length must be smaller than or equal to 100.'
|
170
|
+
end
|
171
|
+
|
172
|
+
@external_id = external_id
|
173
|
+
end
|
174
|
+
|
151
175
|
# Checks equality by comparing each attribute.
|
152
176
|
# @param [Object] Object to be compared
|
153
177
|
def ==(o)
|
@@ -158,6 +182,7 @@ module UltracartClient
|
|
158
182
|
city == o.city &&
|
159
183
|
country == o.country &&
|
160
184
|
distribution_center_code == o.distribution_center_code &&
|
185
|
+
external_id == o.external_id &&
|
161
186
|
merchant_id == o.merchant_id &&
|
162
187
|
pos_location_oid == o.pos_location_oid &&
|
163
188
|
postal_code == o.postal_code &&
|
@@ -173,7 +198,7 @@ module UltracartClient
|
|
173
198
|
# Calculates hash code according to all attributes.
|
174
199
|
# @return [Integer] Hash code
|
175
200
|
def hash
|
176
|
-
[adddress2, address1, city, country, distribution_center_code, merchant_id, pos_location_oid, postal_code, state_province].hash
|
201
|
+
[adddress2, address1, city, country, distribution_center_code, external_id, merchant_id, pos_location_oid, postal_code, state_province].hash
|
177
202
|
end
|
178
203
|
|
179
204
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
@@ -124,7 +124,11 @@ require 'ultracart_api/models/channel_partner_order_item'
|
|
124
124
|
require 'ultracart_api/models/channel_partner_order_item_option'
|
125
125
|
require 'ultracart_api/models/channel_partner_order_transaction'
|
126
126
|
require 'ultracart_api/models/channel_partner_order_transaction_detail'
|
127
|
+
require 'ultracart_api/models/channel_partner_ship_to_preference'
|
128
|
+
require 'ultracart_api/models/channel_partner_ship_to_preference_response'
|
129
|
+
require 'ultracart_api/models/channel_partner_ship_to_preferences_response'
|
127
130
|
require 'ultracart_api/models/channel_partner_shipping_estimate'
|
131
|
+
require 'ultracart_api/models/channel_partners_response'
|
128
132
|
require 'ultracart_api/models/chargeback_dispute'
|
129
133
|
require 'ultracart_api/models/chargeback_dispute_response'
|
130
134
|
require 'ultracart_api/models/chargeback_disputes_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: 4.0.
|
4
|
+
version: 4.0.113.rc
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -171,7 +171,11 @@ files:
|
|
171
171
|
- docs/ChannelPartnerOrderItemOption.md
|
172
172
|
- docs/ChannelPartnerOrderTransaction.md
|
173
173
|
- docs/ChannelPartnerOrderTransactionDetail.md
|
174
|
+
- docs/ChannelPartnerShipToPreference.md
|
175
|
+
- docs/ChannelPartnerShipToPreferenceResponse.md
|
176
|
+
- docs/ChannelPartnerShipToPreferencesResponse.md
|
174
177
|
- docs/ChannelPartnerShippingEstimate.md
|
178
|
+
- docs/ChannelPartnersResponse.md
|
175
179
|
- docs/ChargebackApi.md
|
176
180
|
- docs/ChargebackDispute.md
|
177
181
|
- docs/ChargebackDisputeResponse.md
|
@@ -932,7 +936,11 @@ files:
|
|
932
936
|
- lib/ultracart_api/models/channel_partner_order_item_option.rb
|
933
937
|
- lib/ultracart_api/models/channel_partner_order_transaction.rb
|
934
938
|
- lib/ultracart_api/models/channel_partner_order_transaction_detail.rb
|
939
|
+
- lib/ultracart_api/models/channel_partner_ship_to_preference.rb
|
940
|
+
- lib/ultracart_api/models/channel_partner_ship_to_preference_response.rb
|
941
|
+
- lib/ultracart_api/models/channel_partner_ship_to_preferences_response.rb
|
935
942
|
- lib/ultracart_api/models/channel_partner_shipping_estimate.rb
|
943
|
+
- lib/ultracart_api/models/channel_partners_response.rb
|
936
944
|
- lib/ultracart_api/models/chargeback_dispute.rb
|
937
945
|
- lib/ultracart_api/models/chargeback_dispute_response.rb
|
938
946
|
- lib/ultracart_api/models/chargeback_disputes_response.rb
|