ultracart_api 3.10.134 → 3.10.136
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/docs/ItemPricingTierLimit.md +1 -0
- data/docs/OrderPaymentCreditCard.md +1 -0
- data/docs/OrderPaymentCreditCardDualVaulted.md +10 -0
- data/docs/OrderPaymentCreditCardDualVaultedProperty.md +9 -0
- data/lib/ultracart_api/models/item_pricing_tier_limit.rb +11 -1
- data/lib/ultracart_api/models/order_payment_credit_card.rb +13 -4
- data/lib/ultracart_api/models/order_payment_credit_card_dual_vaulted.rb +204 -0
- data/lib/ultracart_api/models/order_payment_credit_card_dual_vaulted_property.rb +193 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +2 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4f62ee16df0cb8145b9ee22f25d355ccf010f13203af122e008636c66ce3fbf
|
4
|
+
data.tar.gz: 24c929112a6f1792825226b76d5a401f96d43afc0d43c601df8987bb04726af4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de1a7f6b1555093965c2a02ed2408226e981af4268a15027d8cd91917ad33faeb34bc65f148c2e3e6a7711cf1f0f2efd66d7d681eb13117c48ee3c488eb1823b
|
7
|
+
data.tar.gz: 6e76bb911b53159c5b314353f9ecf299deaaa984c1a53702423bbd674b5c2ce69c7e85c41f02011f4518ef0629eefabcd783ab5e4da4baf0abfc52020b7e59c6
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version: 3.10.
|
10
|
+
- Package version: 3.10.136
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
|
13
13
|
|
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./ultracart_api-3.10.
|
27
|
+
gem install ./ultracart_api-3.10.136.gem
|
28
28
|
```
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.10.
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.10.136.gem` to install the development dependencies)
|
30
30
|
|
31
31
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
32
|
|
33
33
|
Finally add this to the Gemfile:
|
34
34
|
|
35
|
-
gem 'ultracart_api', '~> 3.10.
|
35
|
+
gem 'ultracart_api', '~> 3.10.136'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -1089,6 +1089,8 @@ Class | Method | HTTP request | Description
|
|
1089
1089
|
- [UltracartClient::OrderPayment](docs/OrderPayment.md)
|
1090
1090
|
- [UltracartClient::OrderPaymentCheck](docs/OrderPaymentCheck.md)
|
1091
1091
|
- [UltracartClient::OrderPaymentCreditCard](docs/OrderPaymentCreditCard.md)
|
1092
|
+
- [UltracartClient::OrderPaymentCreditCardDualVaulted](docs/OrderPaymentCreditCardDualVaulted.md)
|
1093
|
+
- [UltracartClient::OrderPaymentCreditCardDualVaultedProperty](docs/OrderPaymentCreditCardDualVaultedProperty.md)
|
1092
1094
|
- [UltracartClient::OrderPaymentECheck](docs/OrderPaymentECheck.md)
|
1093
1095
|
- [UltracartClient::OrderPaymentInsurance](docs/OrderPaymentInsurance.md)
|
1094
1096
|
- [UltracartClient::OrderPaymentPurchaseOrder](docs/OrderPaymentPurchaseOrder.md)
|
@@ -1345,6 +1347,8 @@ Not every change is committed to every SDK.
|
|
1345
1347
|
|
1346
1348
|
| Version | Date | Comments |
|
1347
1349
|
| --: | :-: | --- |
|
1350
|
+
| 3.10.136 | 04/28/2023 | item - pricing tier level flag for exempt from min item count |
|
1351
|
+
| 3.10.135 | 04/27/2023 | order - expose dual vaulted identifiers |
|
1348
1352
|
| 3.10.134 | 04/24/2023 | internal development - data warehouse |
|
1349
1353
|
| 3.10.133 | 04/21/2023 | internal development - data warehouse |
|
1350
1354
|
| 3.10.132 | 04/19/2023 | internal development - data warehouse |
|
@@ -4,6 +4,7 @@
|
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**cumulative_order_limit** | **Integer** | Cumulative order limit | [optional]
|
7
|
+
**exempt_from_minimum_item_count** | **BOOLEAN** | Exempt from Minimum Item Count | [optional]
|
7
8
|
**individual_order_limit** | **Integer** | Individual order limit | [optional]
|
8
9
|
**multiple_quantity** | **Integer** | Multiple quantity | [optional]
|
9
10
|
|
@@ -14,5 +14,6 @@ Name | Type | Description | Notes
|
|
14
14
|
**card_number_truncated** | **BOOLEAN** | True if the card has been truncated | [optional]
|
15
15
|
**card_type** | **String** | Card type | [optional]
|
16
16
|
**card_verification_number_token** | **String** | Card verification number token from hosted fields, only for import/insert of new orders, completely ignored for updates, and always null/empty for queries | [optional]
|
17
|
+
**dual_vaulted** | [**OrderPaymentCreditCardDualVaulted**](OrderPaymentCreditCardDualVaulted.md) | | [optional]
|
17
18
|
|
18
19
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# UltracartClient::OrderPaymentCreditCardDualVaulted
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**gateway_name** | **String** | | [optional]
|
7
|
+
**properties** | [**Array<OrderPaymentCreditCardDualVaultedProperty>**](OrderPaymentCreditCardDualVaultedProperty.md) | | [optional]
|
8
|
+
**rotating_transaction_gateway_code** | **String** | | [optional]
|
9
|
+
|
10
|
+
|
@@ -17,6 +17,9 @@ module UltracartClient
|
|
17
17
|
# Cumulative order limit
|
18
18
|
attr_accessor :cumulative_order_limit
|
19
19
|
|
20
|
+
# Exempt from Minimum Item Count
|
21
|
+
attr_accessor :exempt_from_minimum_item_count
|
22
|
+
|
20
23
|
# Individual order limit
|
21
24
|
attr_accessor :individual_order_limit
|
22
25
|
|
@@ -27,6 +30,7 @@ module UltracartClient
|
|
27
30
|
def self.attribute_map
|
28
31
|
{
|
29
32
|
:'cumulative_order_limit' => :'cumulative_order_limit',
|
33
|
+
:'exempt_from_minimum_item_count' => :'exempt_from_minimum_item_count',
|
30
34
|
:'individual_order_limit' => :'individual_order_limit',
|
31
35
|
:'multiple_quantity' => :'multiple_quantity'
|
32
36
|
}
|
@@ -36,6 +40,7 @@ module UltracartClient
|
|
36
40
|
def self.swagger_types
|
37
41
|
{
|
38
42
|
:'cumulative_order_limit' => :'Integer',
|
43
|
+
:'exempt_from_minimum_item_count' => :'BOOLEAN',
|
39
44
|
:'individual_order_limit' => :'Integer',
|
40
45
|
:'multiple_quantity' => :'Integer'
|
41
46
|
}
|
@@ -53,6 +58,10 @@ module UltracartClient
|
|
53
58
|
self.cumulative_order_limit = attributes[:'cumulative_order_limit']
|
54
59
|
end
|
55
60
|
|
61
|
+
if attributes.has_key?(:'exempt_from_minimum_item_count')
|
62
|
+
self.exempt_from_minimum_item_count = attributes[:'exempt_from_minimum_item_count']
|
63
|
+
end
|
64
|
+
|
56
65
|
if attributes.has_key?(:'individual_order_limit')
|
57
66
|
self.individual_order_limit = attributes[:'individual_order_limit']
|
58
67
|
end
|
@@ -81,6 +90,7 @@ module UltracartClient
|
|
81
90
|
return true if self.equal?(o)
|
82
91
|
self.class == o.class &&
|
83
92
|
cumulative_order_limit == o.cumulative_order_limit &&
|
93
|
+
exempt_from_minimum_item_count == o.exempt_from_minimum_item_count &&
|
84
94
|
individual_order_limit == o.individual_order_limit &&
|
85
95
|
multiple_quantity == o.multiple_quantity
|
86
96
|
end
|
@@ -94,7 +104,7 @@ module UltracartClient
|
|
94
104
|
# Calculates hash code according to all attributes.
|
95
105
|
# @return [Fixnum] Hash code
|
96
106
|
def hash
|
97
|
-
[cumulative_order_limit, individual_order_limit, multiple_quantity].hash
|
107
|
+
[cumulative_order_limit, exempt_from_minimum_item_count, individual_order_limit, multiple_quantity].hash
|
98
108
|
end
|
99
109
|
|
100
110
|
# Builds the object from hash
|
@@ -47,6 +47,8 @@ module UltracartClient
|
|
47
47
|
# Card verification number token from hosted fields, only for import/insert of new orders, completely ignored for updates, and always null/empty for queries
|
48
48
|
attr_accessor :card_verification_number_token
|
49
49
|
|
50
|
+
attr_accessor :dual_vaulted
|
51
|
+
|
50
52
|
class EnumAttributeValidator
|
51
53
|
attr_reader :datatype
|
52
54
|
attr_reader :allowable_values
|
@@ -82,7 +84,8 @@ module UltracartClient
|
|
82
84
|
:'card_number_token' => :'card_number_token',
|
83
85
|
:'card_number_truncated' => :'card_number_truncated',
|
84
86
|
:'card_type' => :'card_type',
|
85
|
-
:'card_verification_number_token' => :'card_verification_number_token'
|
87
|
+
:'card_verification_number_token' => :'card_verification_number_token',
|
88
|
+
:'dual_vaulted' => :'dual_vaulted'
|
86
89
|
}
|
87
90
|
end
|
88
91
|
|
@@ -99,7 +102,8 @@ module UltracartClient
|
|
99
102
|
:'card_number_token' => :'String',
|
100
103
|
:'card_number_truncated' => :'BOOLEAN',
|
101
104
|
:'card_type' => :'String',
|
102
|
-
:'card_verification_number_token' => :'String'
|
105
|
+
:'card_verification_number_token' => :'String',
|
106
|
+
:'dual_vaulted' => :'OrderPaymentCreditCardDualVaulted'
|
103
107
|
}
|
104
108
|
end
|
105
109
|
|
@@ -154,6 +158,10 @@ module UltracartClient
|
|
154
158
|
if attributes.has_key?(:'card_verification_number_token')
|
155
159
|
self.card_verification_number_token = attributes[:'card_verification_number_token']
|
156
160
|
end
|
161
|
+
|
162
|
+
if attributes.has_key?(:'dual_vaulted')
|
163
|
+
self.dual_vaulted = attributes[:'dual_vaulted']
|
164
|
+
end
|
157
165
|
end
|
158
166
|
|
159
167
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -196,7 +204,8 @@ module UltracartClient
|
|
196
204
|
card_number_token == o.card_number_token &&
|
197
205
|
card_number_truncated == o.card_number_truncated &&
|
198
206
|
card_type == o.card_type &&
|
199
|
-
card_verification_number_token == o.card_verification_number_token
|
207
|
+
card_verification_number_token == o.card_verification_number_token &&
|
208
|
+
dual_vaulted == o.dual_vaulted
|
200
209
|
end
|
201
210
|
|
202
211
|
# @see the `==` method
|
@@ -208,7 +217,7 @@ module UltracartClient
|
|
208
217
|
# Calculates hash code according to all attributes.
|
209
218
|
# @return [Fixnum] Hash code
|
210
219
|
def hash
|
211
|
-
[card_auth_ticket, card_authorization_amount, card_authorization_dts, card_authorization_reference_number, card_expiration_month, card_expiration_year, card_number, card_number_token, card_number_truncated, card_type, card_verification_number_token].hash
|
220
|
+
[card_auth_ticket, card_authorization_amount, card_authorization_dts, card_authorization_reference_number, card_expiration_month, card_expiration_year, card_number, card_number_token, card_number_truncated, card_type, card_verification_number_token, dual_vaulted].hash
|
212
221
|
end
|
213
222
|
|
214
223
|
# Builds the object from hash
|
@@ -0,0 +1,204 @@
|
|
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 OrderPaymentCreditCardDualVaulted
|
17
|
+
attr_accessor :gateway_name
|
18
|
+
|
19
|
+
attr_accessor :properties
|
20
|
+
|
21
|
+
attr_accessor :rotating_transaction_gateway_code
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'gateway_name' => :'gateway_name',
|
27
|
+
:'properties' => :'properties',
|
28
|
+
:'rotating_transaction_gateway_code' => :'rotating_transaction_gateway_code'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.swagger_types
|
34
|
+
{
|
35
|
+
:'gateway_name' => :'String',
|
36
|
+
:'properties' => :'Array<OrderPaymentCreditCardDualVaultedProperty>',
|
37
|
+
:'rotating_transaction_gateway_code' => :'String'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Initializes the object
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
43
|
+
def initialize(attributes = {})
|
44
|
+
return unless attributes.is_a?(Hash)
|
45
|
+
|
46
|
+
# convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
48
|
+
|
49
|
+
if attributes.has_key?(:'gateway_name')
|
50
|
+
self.gateway_name = attributes[:'gateway_name']
|
51
|
+
end
|
52
|
+
|
53
|
+
if attributes.has_key?(:'properties')
|
54
|
+
if (value = attributes[:'properties']).is_a?(Array)
|
55
|
+
self.properties = value
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
if attributes.has_key?(:'rotating_transaction_gateway_code')
|
60
|
+
self.rotating_transaction_gateway_code = attributes[:'rotating_transaction_gateway_code']
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
65
|
+
# @return Array for valid properties with the reasons
|
66
|
+
def list_invalid_properties
|
67
|
+
invalid_properties = Array.new
|
68
|
+
invalid_properties
|
69
|
+
end
|
70
|
+
|
71
|
+
# Check to see if the all the properties in the model are valid
|
72
|
+
# @return true if the model is valid
|
73
|
+
def valid?
|
74
|
+
true
|
75
|
+
end
|
76
|
+
|
77
|
+
# Checks equality by comparing each attribute.
|
78
|
+
# @param [Object] Object to be compared
|
79
|
+
def ==(o)
|
80
|
+
return true if self.equal?(o)
|
81
|
+
self.class == o.class &&
|
82
|
+
gateway_name == o.gateway_name &&
|
83
|
+
properties == o.properties &&
|
84
|
+
rotating_transaction_gateway_code == o.rotating_transaction_gateway_code
|
85
|
+
end
|
86
|
+
|
87
|
+
# @see the `==` method
|
88
|
+
# @param [Object] Object to be compared
|
89
|
+
def eql?(o)
|
90
|
+
self == o
|
91
|
+
end
|
92
|
+
|
93
|
+
# Calculates hash code according to all attributes.
|
94
|
+
# @return [Fixnum] Hash code
|
95
|
+
def hash
|
96
|
+
[gateway_name, properties, rotating_transaction_gateway_code].hash
|
97
|
+
end
|
98
|
+
|
99
|
+
# Builds the object from hash
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
101
|
+
# @return [Object] Returns the model itself
|
102
|
+
def build_from_hash(attributes)
|
103
|
+
return nil unless attributes.is_a?(Hash)
|
104
|
+
self.class.swagger_types.each_pair do |key, type|
|
105
|
+
if type =~ /\AArray<(.*)>/i
|
106
|
+
# check to ensure the input is an array given that the attribute
|
107
|
+
# is documented as an array but the input is not
|
108
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
109
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
110
|
+
end
|
111
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
112
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
113
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
114
|
+
end
|
115
|
+
|
116
|
+
self
|
117
|
+
end
|
118
|
+
|
119
|
+
# Deserializes the data based on type
|
120
|
+
# @param string type Data type
|
121
|
+
# @param string value Value to be deserialized
|
122
|
+
# @return [Object] Deserialized data
|
123
|
+
def _deserialize(type, value)
|
124
|
+
case type.to_sym
|
125
|
+
when :DateTime
|
126
|
+
DateTime.parse(value)
|
127
|
+
when :Date
|
128
|
+
Date.parse(value)
|
129
|
+
when :String
|
130
|
+
value.to_s
|
131
|
+
when :Integer
|
132
|
+
value.to_i
|
133
|
+
when :Float
|
134
|
+
value.to_f
|
135
|
+
when :BOOLEAN
|
136
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
137
|
+
true
|
138
|
+
else
|
139
|
+
false
|
140
|
+
end
|
141
|
+
when :Object
|
142
|
+
# generic object (usually a Hash), return directly
|
143
|
+
value
|
144
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
145
|
+
inner_type = Regexp.last_match[:inner_type]
|
146
|
+
value.map { |v| _deserialize(inner_type, v) }
|
147
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
148
|
+
k_type = Regexp.last_match[:k_type]
|
149
|
+
v_type = Regexp.last_match[:v_type]
|
150
|
+
{}.tap do |hash|
|
151
|
+
value.each do |k, v|
|
152
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
else # model
|
156
|
+
temp_model = UltracartClient.const_get(type).new
|
157
|
+
temp_model.build_from_hash(value)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
# Returns the string representation of the object
|
162
|
+
# @return [String] String presentation of the object
|
163
|
+
def to_s
|
164
|
+
to_hash.to_s
|
165
|
+
end
|
166
|
+
|
167
|
+
# to_body is an alias to to_hash (backward compatibility)
|
168
|
+
# @return [Hash] Returns the object in the form of hash
|
169
|
+
def to_body
|
170
|
+
to_hash
|
171
|
+
end
|
172
|
+
|
173
|
+
# Returns the object in the form of hash
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
175
|
+
def to_hash
|
176
|
+
hash = {}
|
177
|
+
self.class.attribute_map.each_pair do |attr, param|
|
178
|
+
value = self.send(attr)
|
179
|
+
next if value.nil?
|
180
|
+
hash[param] = _to_hash(value)
|
181
|
+
end
|
182
|
+
hash
|
183
|
+
end
|
184
|
+
|
185
|
+
# Outputs non-array value in the form of hash
|
186
|
+
# For object, use to_hash. Otherwise, just return the value
|
187
|
+
# @param [Object] value Any valid value
|
188
|
+
# @return [Hash] Returns the value in the form of hash
|
189
|
+
def _to_hash(value)
|
190
|
+
if value.is_a?(Array)
|
191
|
+
value.compact.map { |v| _to_hash(v) }
|
192
|
+
elsif value.is_a?(Hash)
|
193
|
+
{}.tap do |hash|
|
194
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
195
|
+
end
|
196
|
+
elsif value.respond_to? :to_hash
|
197
|
+
value.to_hash
|
198
|
+
else
|
199
|
+
value
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
end
|
204
|
+
end
|
@@ -0,0 +1,193 @@
|
|
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 OrderPaymentCreditCardDualVaultedProperty
|
17
|
+
attr_accessor :name
|
18
|
+
|
19
|
+
attr_accessor :value
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'name' => :'name',
|
25
|
+
:'value' => :'value'
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
# Attribute type mapping.
|
30
|
+
def self.swagger_types
|
31
|
+
{
|
32
|
+
:'name' => :'String',
|
33
|
+
:'value' => :'String'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Initializes the object
|
38
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
39
|
+
def initialize(attributes = {})
|
40
|
+
return unless attributes.is_a?(Hash)
|
41
|
+
|
42
|
+
# convert string to symbol for hash key
|
43
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
44
|
+
|
45
|
+
if attributes.has_key?(:'name')
|
46
|
+
self.name = attributes[:'name']
|
47
|
+
end
|
48
|
+
|
49
|
+
if attributes.has_key?(:'value')
|
50
|
+
self.value = attributes[:'value']
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
55
|
+
# @return Array for valid properties with the reasons
|
56
|
+
def list_invalid_properties
|
57
|
+
invalid_properties = Array.new
|
58
|
+
invalid_properties
|
59
|
+
end
|
60
|
+
|
61
|
+
# Check to see if the all the properties in the model are valid
|
62
|
+
# @return true if the model is valid
|
63
|
+
def valid?
|
64
|
+
true
|
65
|
+
end
|
66
|
+
|
67
|
+
# Checks equality by comparing each attribute.
|
68
|
+
# @param [Object] Object to be compared
|
69
|
+
def ==(o)
|
70
|
+
return true if self.equal?(o)
|
71
|
+
self.class == o.class &&
|
72
|
+
name == o.name &&
|
73
|
+
value == o.value
|
74
|
+
end
|
75
|
+
|
76
|
+
# @see the `==` method
|
77
|
+
# @param [Object] Object to be compared
|
78
|
+
def eql?(o)
|
79
|
+
self == o
|
80
|
+
end
|
81
|
+
|
82
|
+
# Calculates hash code according to all attributes.
|
83
|
+
# @return [Fixnum] Hash code
|
84
|
+
def hash
|
85
|
+
[name, value].hash
|
86
|
+
end
|
87
|
+
|
88
|
+
# Builds the object from hash
|
89
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
90
|
+
# @return [Object] Returns the model itself
|
91
|
+
def build_from_hash(attributes)
|
92
|
+
return nil unless attributes.is_a?(Hash)
|
93
|
+
self.class.swagger_types.each_pair do |key, type|
|
94
|
+
if type =~ /\AArray<(.*)>/i
|
95
|
+
# check to ensure the input is an array given that the attribute
|
96
|
+
# is documented as an array but the input is not
|
97
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
98
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
99
|
+
end
|
100
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
101
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
102
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
103
|
+
end
|
104
|
+
|
105
|
+
self
|
106
|
+
end
|
107
|
+
|
108
|
+
# Deserializes the data based on type
|
109
|
+
# @param string type Data type
|
110
|
+
# @param string value Value to be deserialized
|
111
|
+
# @return [Object] Deserialized data
|
112
|
+
def _deserialize(type, value)
|
113
|
+
case type.to_sym
|
114
|
+
when :DateTime
|
115
|
+
DateTime.parse(value)
|
116
|
+
when :Date
|
117
|
+
Date.parse(value)
|
118
|
+
when :String
|
119
|
+
value.to_s
|
120
|
+
when :Integer
|
121
|
+
value.to_i
|
122
|
+
when :Float
|
123
|
+
value.to_f
|
124
|
+
when :BOOLEAN
|
125
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
126
|
+
true
|
127
|
+
else
|
128
|
+
false
|
129
|
+
end
|
130
|
+
when :Object
|
131
|
+
# generic object (usually a Hash), return directly
|
132
|
+
value
|
133
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
134
|
+
inner_type = Regexp.last_match[:inner_type]
|
135
|
+
value.map { |v| _deserialize(inner_type, v) }
|
136
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
137
|
+
k_type = Regexp.last_match[:k_type]
|
138
|
+
v_type = Regexp.last_match[:v_type]
|
139
|
+
{}.tap do |hash|
|
140
|
+
value.each do |k, v|
|
141
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
else # model
|
145
|
+
temp_model = UltracartClient.const_get(type).new
|
146
|
+
temp_model.build_from_hash(value)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
# Returns the string representation of the object
|
151
|
+
# @return [String] String presentation of the object
|
152
|
+
def to_s
|
153
|
+
to_hash.to_s
|
154
|
+
end
|
155
|
+
|
156
|
+
# to_body is an alias to to_hash (backward compatibility)
|
157
|
+
# @return [Hash] Returns the object in the form of hash
|
158
|
+
def to_body
|
159
|
+
to_hash
|
160
|
+
end
|
161
|
+
|
162
|
+
# Returns the object in the form of hash
|
163
|
+
# @return [Hash] Returns the object in the form of hash
|
164
|
+
def to_hash
|
165
|
+
hash = {}
|
166
|
+
self.class.attribute_map.each_pair do |attr, param|
|
167
|
+
value = self.send(attr)
|
168
|
+
next if value.nil?
|
169
|
+
hash[param] = _to_hash(value)
|
170
|
+
end
|
171
|
+
hash
|
172
|
+
end
|
173
|
+
|
174
|
+
# Outputs non-array value in the form of hash
|
175
|
+
# For object, use to_hash. Otherwise, just return the value
|
176
|
+
# @param [Object] value Any valid value
|
177
|
+
# @return [Hash] Returns the value in the form of hash
|
178
|
+
def _to_hash(value)
|
179
|
+
if value.is_a?(Array)
|
180
|
+
value.compact.map { |v| _to_hash(v) }
|
181
|
+
elsif value.is_a?(Hash)
|
182
|
+
{}.tap do |hash|
|
183
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
184
|
+
end
|
185
|
+
elsif value.respond_to? :to_hash
|
186
|
+
value.to_hash
|
187
|
+
else
|
188
|
+
value
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
end
|
193
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -602,6 +602,8 @@ require 'ultracart_api/models/order_packing_slip_response'
|
|
602
602
|
require 'ultracart_api/models/order_payment'
|
603
603
|
require 'ultracart_api/models/order_payment_check'
|
604
604
|
require 'ultracart_api/models/order_payment_credit_card'
|
605
|
+
require 'ultracart_api/models/order_payment_credit_card_dual_vaulted'
|
606
|
+
require 'ultracart_api/models/order_payment_credit_card_dual_vaulted_property'
|
605
607
|
require 'ultracart_api/models/order_payment_e_check'
|
606
608
|
require 'ultracart_api/models/order_payment_insurance'
|
607
609
|
require 'ultracart_api/models/order_payment_purchase_order'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultracart_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.10.
|
4
|
+
version: 3.10.136
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -821,6 +821,8 @@ files:
|
|
821
821
|
- docs/OrderPayment.md
|
822
822
|
- docs/OrderPaymentCheck.md
|
823
823
|
- docs/OrderPaymentCreditCard.md
|
824
|
+
- docs/OrderPaymentCreditCardDualVaulted.md
|
825
|
+
- docs/OrderPaymentCreditCardDualVaultedProperty.md
|
824
826
|
- docs/OrderPaymentECheck.md
|
825
827
|
- docs/OrderPaymentInsurance.md
|
826
828
|
- docs/OrderPaymentPurchaseOrder.md
|
@@ -1622,6 +1624,8 @@ files:
|
|
1622
1624
|
- lib/ultracart_api/models/order_payment.rb
|
1623
1625
|
- lib/ultracart_api/models/order_payment_check.rb
|
1624
1626
|
- lib/ultracart_api/models/order_payment_credit_card.rb
|
1627
|
+
- lib/ultracart_api/models/order_payment_credit_card_dual_vaulted.rb
|
1628
|
+
- lib/ultracart_api/models/order_payment_credit_card_dual_vaulted_property.rb
|
1625
1629
|
- lib/ultracart_api/models/order_payment_e_check.rb
|
1626
1630
|
- lib/ultracart_api/models/order_payment_insurance.rb
|
1627
1631
|
- lib/ultracart_api/models/order_payment_purchase_order.rb
|