ultracart_api 4.0.151 → 4.0.153
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 +8 -4
- data/docs/ItemPricingTierLimit.md +2 -0
- data/docs/OrderPaymentCreditCard.md +3 -1
- data/docs/OrderPaymentCreditCardDualVaulted.md +22 -0
- data/docs/OrderPaymentCreditCardDualVaultedProperty.md +20 -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 +239 -0
- data/lib/ultracart_api/models/order_payment_credit_card_dual_vaulted_property.rb +228 -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: 74f0b59f6e236d45f16c4b8b1b1d52bf3b0ed5400866606d8159f3a53baee5be
|
4
|
+
data.tar.gz: 4715fa0c177324f966aa5d3fe3996e16d03b2828aa9a33ccb116844dc6611c99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfc1f07907c13b8b8d62a53d05584d2ba2fedb919030f2dea72fc112958b15a31900779cdbc5d815d3367ffdfaa922dff8077ea37c53a10044d2eca76e627491
|
7
|
+
data.tar.gz: 8e19f5664dcdb3744e3bf064af0448cda24a995c88b37c902d4d7351411b185cbca72d68c4af96e00b271f1b37147d08901e1f1eb37d6d39f44f55918c847dd2
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version: 4.0.
|
10
|
+
- Package version: 4.0.153
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
|
13
13
|
|
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./ultracart_api-4.0.
|
27
|
+
gem install ./ultracart_api-4.0.153.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./ultracart_api-4.0.
|
30
|
+
(for development, run `gem install --dev ./ultracart_api-4.0.153.gem` to install the development dependencies)
|
31
31
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
33
33
|
|
34
34
|
Finally add this to the Gemfile:
|
35
35
|
|
36
|
-
gem 'ultracart_api', '~> 4.0.
|
36
|
+
gem 'ultracart_api', '~> 4.0.153'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -1094,6 +1094,8 @@ Class | Method | HTTP request | Description
|
|
1094
1094
|
- [UltracartClient::OrderPayment](docs/OrderPayment.md)
|
1095
1095
|
- [UltracartClient::OrderPaymentCheck](docs/OrderPaymentCheck.md)
|
1096
1096
|
- [UltracartClient::OrderPaymentCreditCard](docs/OrderPaymentCreditCard.md)
|
1097
|
+
- [UltracartClient::OrderPaymentCreditCardDualVaulted](docs/OrderPaymentCreditCardDualVaulted.md)
|
1098
|
+
- [UltracartClient::OrderPaymentCreditCardDualVaultedProperty](docs/OrderPaymentCreditCardDualVaultedProperty.md)
|
1097
1099
|
- [UltracartClient::OrderPaymentECheck](docs/OrderPaymentECheck.md)
|
1098
1100
|
- [UltracartClient::OrderPaymentInsurance](docs/OrderPaymentInsurance.md)
|
1099
1101
|
- [UltracartClient::OrderPaymentPurchaseOrder](docs/OrderPaymentPurchaseOrder.md)
|
@@ -1353,6 +1355,8 @@ Not every change is committed to every SDK.
|
|
1353
1355
|
|
1354
1356
|
| Version | Date | Comments |
|
1355
1357
|
| --: | :-: | --- |
|
1358
|
+
| 4.0.153 | 04/28/2023 | item - pricing tier level flag for exempt from min item count |
|
1359
|
+
| 4.0.152 | 04/27/2023 | order - expose dual vaulted identifiers |
|
1356
1360
|
| 4.0.151 | 04/24/2023 | internal development - data warehouse |
|
1357
1361
|
| 4.0.150 | 04/21/2023 | internal development - data warehouse |
|
1358
1362
|
| 4.0.149 | 04/19/2023 | internal development - data warehouse |
|
@@ -5,6 +5,7 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **cumulative_order_limit** | **Integer** | Cumulative order limit | [optional] |
|
8
|
+
| **exempt_from_minimum_item_count** | **Boolean** | Exempt from Minimum Item Count | [optional] |
|
8
9
|
| **individual_order_limit** | **Integer** | Individual order limit | [optional] |
|
9
10
|
| **multiple_quantity** | **Integer** | Multiple quantity | [optional] |
|
10
11
|
|
@@ -15,6 +16,7 @@ require 'ultracart_api'
|
|
15
16
|
|
16
17
|
instance = UltracartClient::ItemPricingTierLimit.new(
|
17
18
|
cumulative_order_limit: null,
|
19
|
+
exempt_from_minimum_item_count: null,
|
18
20
|
individual_order_limit: null,
|
19
21
|
multiple_quantity: null
|
20
22
|
)
|
@@ -15,6 +15,7 @@
|
|
15
15
|
| **card_number_truncated** | **Boolean** | True if the card has been truncated | [optional] |
|
16
16
|
| **card_type** | **String** | Card type | [optional] |
|
17
17
|
| **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] |
|
18
|
+
| **dual_vaulted** | [**OrderPaymentCreditCardDualVaulted**](OrderPaymentCreditCardDualVaulted.md) | | [optional] |
|
18
19
|
|
19
20
|
## Example
|
20
21
|
|
@@ -32,7 +33,8 @@ instance = UltracartClient::OrderPaymentCreditCard.new(
|
|
32
33
|
card_number_token: null,
|
33
34
|
card_number_truncated: null,
|
34
35
|
card_type: null,
|
35
|
-
card_verification_number_token: null
|
36
|
+
card_verification_number_token: null,
|
37
|
+
dual_vaulted: null
|
36
38
|
)
|
37
39
|
```
|
38
40
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# UltracartClient::OrderPaymentCreditCardDualVaulted
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **gateway_name** | **String** | | [optional] |
|
8
|
+
| **properties** | [**Array<OrderPaymentCreditCardDualVaultedProperty>**](OrderPaymentCreditCardDualVaultedProperty.md) | | [optional] |
|
9
|
+
| **rotating_transaction_gateway_code** | **String** | | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'ultracart_api'
|
15
|
+
|
16
|
+
instance = UltracartClient::OrderPaymentCreditCardDualVaulted.new(
|
17
|
+
gateway_name: null,
|
18
|
+
properties: null,
|
19
|
+
rotating_transaction_gateway_code: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# UltracartClient::OrderPaymentCreditCardDualVaultedProperty
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | | [optional] |
|
8
|
+
| **value** | **String** | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'ultracart_api'
|
14
|
+
|
15
|
+
instance = UltracartClient::OrderPaymentCreditCardDualVaultedProperty.new(
|
16
|
+
name: null,
|
17
|
+
value: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -18,6 +18,9 @@ module UltracartClient
|
|
18
18
|
# Cumulative order limit
|
19
19
|
attr_accessor :cumulative_order_limit
|
20
20
|
|
21
|
+
# Exempt from Minimum Item Count
|
22
|
+
attr_accessor :exempt_from_minimum_item_count
|
23
|
+
|
21
24
|
# Individual order limit
|
22
25
|
attr_accessor :individual_order_limit
|
23
26
|
|
@@ -28,6 +31,7 @@ module UltracartClient
|
|
28
31
|
def self.attribute_map
|
29
32
|
{
|
30
33
|
:'cumulative_order_limit' => :'cumulative_order_limit',
|
34
|
+
:'exempt_from_minimum_item_count' => :'exempt_from_minimum_item_count',
|
31
35
|
:'individual_order_limit' => :'individual_order_limit',
|
32
36
|
:'multiple_quantity' => :'multiple_quantity'
|
33
37
|
}
|
@@ -42,6 +46,7 @@ module UltracartClient
|
|
42
46
|
def self.openapi_types
|
43
47
|
{
|
44
48
|
:'cumulative_order_limit' => :'Integer',
|
49
|
+
:'exempt_from_minimum_item_count' => :'Boolean',
|
45
50
|
:'individual_order_limit' => :'Integer',
|
46
51
|
:'multiple_quantity' => :'Integer'
|
47
52
|
}
|
@@ -72,6 +77,10 @@ module UltracartClient
|
|
72
77
|
self.cumulative_order_limit = attributes[:'cumulative_order_limit']
|
73
78
|
end
|
74
79
|
|
80
|
+
if attributes.key?(:'exempt_from_minimum_item_count')
|
81
|
+
self.exempt_from_minimum_item_count = attributes[:'exempt_from_minimum_item_count']
|
82
|
+
end
|
83
|
+
|
75
84
|
if attributes.key?(:'individual_order_limit')
|
76
85
|
self.individual_order_limit = attributes[:'individual_order_limit']
|
77
86
|
end
|
@@ -100,6 +109,7 @@ module UltracartClient
|
|
100
109
|
return true if self.equal?(o)
|
101
110
|
self.class == o.class &&
|
102
111
|
cumulative_order_limit == o.cumulative_order_limit &&
|
112
|
+
exempt_from_minimum_item_count == o.exempt_from_minimum_item_count &&
|
103
113
|
individual_order_limit == o.individual_order_limit &&
|
104
114
|
multiple_quantity == o.multiple_quantity
|
105
115
|
end
|
@@ -113,7 +123,7 @@ module UltracartClient
|
|
113
123
|
# Calculates hash code according to all attributes.
|
114
124
|
# @return [Integer] Hash code
|
115
125
|
def hash
|
116
|
-
[cumulative_order_limit, individual_order_limit, multiple_quantity].hash
|
126
|
+
[cumulative_order_limit, exempt_from_minimum_item_count, individual_order_limit, multiple_quantity].hash
|
117
127
|
end
|
118
128
|
|
119
129
|
# Builds the object from hash
|
@@ -48,6 +48,8 @@ module UltracartClient
|
|
48
48
|
# Card verification number token from hosted fields, only for import/insert of new orders, completely ignored for updates, and always null/empty for queries
|
49
49
|
attr_accessor :card_verification_number_token
|
50
50
|
|
51
|
+
attr_accessor :dual_vaulted
|
52
|
+
|
51
53
|
class EnumAttributeValidator
|
52
54
|
attr_reader :datatype
|
53
55
|
attr_reader :allowable_values
|
@@ -83,7 +85,8 @@ module UltracartClient
|
|
83
85
|
:'card_number_token' => :'card_number_token',
|
84
86
|
:'card_number_truncated' => :'card_number_truncated',
|
85
87
|
:'card_type' => :'card_type',
|
86
|
-
:'card_verification_number_token' => :'card_verification_number_token'
|
88
|
+
:'card_verification_number_token' => :'card_verification_number_token',
|
89
|
+
:'dual_vaulted' => :'dual_vaulted'
|
87
90
|
}
|
88
91
|
end
|
89
92
|
|
@@ -105,7 +108,8 @@ module UltracartClient
|
|
105
108
|
:'card_number_token' => :'String',
|
106
109
|
:'card_number_truncated' => :'Boolean',
|
107
110
|
:'card_type' => :'String',
|
108
|
-
:'card_verification_number_token' => :'String'
|
111
|
+
:'card_verification_number_token' => :'String',
|
112
|
+
:'dual_vaulted' => :'OrderPaymentCreditCardDualVaulted'
|
109
113
|
}
|
110
114
|
end
|
111
115
|
|
@@ -173,6 +177,10 @@ module UltracartClient
|
|
173
177
|
if attributes.key?(:'card_verification_number_token')
|
174
178
|
self.card_verification_number_token = attributes[:'card_verification_number_token']
|
175
179
|
end
|
180
|
+
|
181
|
+
if attributes.key?(:'dual_vaulted')
|
182
|
+
self.dual_vaulted = attributes[:'dual_vaulted']
|
183
|
+
end
|
176
184
|
end
|
177
185
|
|
178
186
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -215,7 +223,8 @@ module UltracartClient
|
|
215
223
|
card_number_token == o.card_number_token &&
|
216
224
|
card_number_truncated == o.card_number_truncated &&
|
217
225
|
card_type == o.card_type &&
|
218
|
-
card_verification_number_token == o.card_verification_number_token
|
226
|
+
card_verification_number_token == o.card_verification_number_token &&
|
227
|
+
dual_vaulted == o.dual_vaulted
|
219
228
|
end
|
220
229
|
|
221
230
|
# @see the `==` method
|
@@ -227,7 +236,7 @@ module UltracartClient
|
|
227
236
|
# Calculates hash code according to all attributes.
|
228
237
|
# @return [Integer] Hash code
|
229
238
|
def hash
|
230
|
-
[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
|
239
|
+
[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
|
231
240
|
end
|
232
241
|
|
233
242
|
# Builds the object from hash
|
@@ -0,0 +1,239 @@
|
|
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 OrderPaymentCreditCardDualVaulted
|
18
|
+
attr_accessor :gateway_name
|
19
|
+
|
20
|
+
attr_accessor :properties
|
21
|
+
|
22
|
+
attr_accessor :rotating_transaction_gateway_code
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'gateway_name' => :'gateway_name',
|
28
|
+
:'properties' => :'properties',
|
29
|
+
:'rotating_transaction_gateway_code' => :'rotating_transaction_gateway_code'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
attribute_map.values
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.openapi_types
|
40
|
+
{
|
41
|
+
:'gateway_name' => :'String',
|
42
|
+
:'properties' => :'Array<OrderPaymentCreditCardDualVaultedProperty>',
|
43
|
+
:'rotating_transaction_gateway_code' => :'String'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# List of attributes with nullable: true
|
48
|
+
def self.openapi_nullable
|
49
|
+
Set.new([
|
50
|
+
])
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
55
|
+
def initialize(attributes = {})
|
56
|
+
if (!attributes.is_a?(Hash))
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderPaymentCreditCardDualVaulted` initialize method"
|
58
|
+
end
|
59
|
+
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OrderPaymentCreditCardDualVaulted`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
64
|
+
end
|
65
|
+
h[k.to_sym] = v
|
66
|
+
}
|
67
|
+
|
68
|
+
if attributes.key?(:'gateway_name')
|
69
|
+
self.gateway_name = attributes[:'gateway_name']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'properties')
|
73
|
+
if (value = attributes[:'properties']).is_a?(Array)
|
74
|
+
self.properties = value
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'rotating_transaction_gateway_code')
|
79
|
+
self.rotating_transaction_gateway_code = attributes[:'rotating_transaction_gateway_code']
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
84
|
+
# @return Array for valid properties with the reasons
|
85
|
+
def list_invalid_properties
|
86
|
+
invalid_properties = Array.new
|
87
|
+
invalid_properties
|
88
|
+
end
|
89
|
+
|
90
|
+
# Check to see if the all the properties in the model are valid
|
91
|
+
# @return true if the model is valid
|
92
|
+
def valid?
|
93
|
+
true
|
94
|
+
end
|
95
|
+
|
96
|
+
# Checks equality by comparing each attribute.
|
97
|
+
# @param [Object] Object to be compared
|
98
|
+
def ==(o)
|
99
|
+
return true if self.equal?(o)
|
100
|
+
self.class == o.class &&
|
101
|
+
gateway_name == o.gateway_name &&
|
102
|
+
properties == o.properties &&
|
103
|
+
rotating_transaction_gateway_code == o.rotating_transaction_gateway_code
|
104
|
+
end
|
105
|
+
|
106
|
+
# @see the `==` method
|
107
|
+
# @param [Object] Object to be compared
|
108
|
+
def eql?(o)
|
109
|
+
self == o
|
110
|
+
end
|
111
|
+
|
112
|
+
# Calculates hash code according to all attributes.
|
113
|
+
# @return [Integer] Hash code
|
114
|
+
def hash
|
115
|
+
[gateway_name, properties, rotating_transaction_gateway_code].hash
|
116
|
+
end
|
117
|
+
|
118
|
+
# Builds the object from hash
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
+
# @return [Object] Returns the model itself
|
121
|
+
def self.build_from_hash(attributes)
|
122
|
+
new.build_from_hash(attributes)
|
123
|
+
end
|
124
|
+
|
125
|
+
# Builds the object from hash
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
127
|
+
# @return [Object] Returns the model itself
|
128
|
+
def build_from_hash(attributes)
|
129
|
+
return nil unless attributes.is_a?(Hash)
|
130
|
+
attributes = attributes.transform_keys(&:to_sym)
|
131
|
+
self.class.openapi_types.each_pair do |key, type|
|
132
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
133
|
+
self.send("#{key}=", nil)
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
135
|
+
# check to ensure the input is an array given that the attribute
|
136
|
+
# is documented as an array but the input is not
|
137
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
138
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
139
|
+
end
|
140
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
141
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
self
|
146
|
+
end
|
147
|
+
|
148
|
+
# Deserializes the data based on type
|
149
|
+
# @param string type Data type
|
150
|
+
# @param string value Value to be deserialized
|
151
|
+
# @return [Object] Deserialized data
|
152
|
+
def _deserialize(type, value)
|
153
|
+
case type.to_sym
|
154
|
+
when :Time
|
155
|
+
Time.parse(value)
|
156
|
+
when :Date
|
157
|
+
Date.parse(value)
|
158
|
+
when :String
|
159
|
+
value.to_s
|
160
|
+
when :Integer
|
161
|
+
value.to_i
|
162
|
+
when :Float
|
163
|
+
value.to_f
|
164
|
+
when :Boolean
|
165
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
166
|
+
true
|
167
|
+
else
|
168
|
+
false
|
169
|
+
end
|
170
|
+
when :Object
|
171
|
+
# generic object (usually a Hash), return directly
|
172
|
+
value
|
173
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
174
|
+
inner_type = Regexp.last_match[:inner_type]
|
175
|
+
value.map { |v| _deserialize(inner_type, v) }
|
176
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
177
|
+
k_type = Regexp.last_match[:k_type]
|
178
|
+
v_type = Regexp.last_match[:v_type]
|
179
|
+
{}.tap do |hash|
|
180
|
+
value.each do |k, v|
|
181
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
else # model
|
185
|
+
# models (e.g. Pet) or oneOf
|
186
|
+
klass = UltracartClient.const_get(type)
|
187
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
# Returns the string representation of the object
|
192
|
+
# @return [String] String presentation of the object
|
193
|
+
def to_s
|
194
|
+
to_hash.to_s
|
195
|
+
end
|
196
|
+
|
197
|
+
# to_body is an alias to to_hash (backward compatibility)
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
199
|
+
def to_body
|
200
|
+
to_hash
|
201
|
+
end
|
202
|
+
|
203
|
+
# Returns the object in the form of hash
|
204
|
+
# @return [Hash] Returns the object in the form of hash
|
205
|
+
def to_hash
|
206
|
+
hash = {}
|
207
|
+
self.class.attribute_map.each_pair do |attr, param|
|
208
|
+
value = self.send(attr)
|
209
|
+
if value.nil?
|
210
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
211
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
212
|
+
end
|
213
|
+
|
214
|
+
hash[param] = _to_hash(value)
|
215
|
+
end
|
216
|
+
hash
|
217
|
+
end
|
218
|
+
|
219
|
+
# Outputs non-array value in the form of hash
|
220
|
+
# For object, use to_hash. Otherwise, just return the value
|
221
|
+
# @param [Object] value Any valid value
|
222
|
+
# @return [Hash] Returns the value in the form of hash
|
223
|
+
def _to_hash(value)
|
224
|
+
if value.is_a?(Array)
|
225
|
+
value.compact.map { |v| _to_hash(v) }
|
226
|
+
elsif value.is_a?(Hash)
|
227
|
+
{}.tap do |hash|
|
228
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
229
|
+
end
|
230
|
+
elsif value.respond_to? :to_hash
|
231
|
+
value.to_hash
|
232
|
+
else
|
233
|
+
value
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
end
|
238
|
+
|
239
|
+
end
|
@@ -0,0 +1,228 @@
|
|
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 OrderPaymentCreditCardDualVaultedProperty
|
18
|
+
attr_accessor :name
|
19
|
+
|
20
|
+
attr_accessor :value
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'name' => :'name',
|
26
|
+
:'value' => :'value'
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# Returns all the JSON keys this model knows about
|
31
|
+
def self.acceptable_attributes
|
32
|
+
attribute_map.values
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
def self.openapi_types
|
37
|
+
{
|
38
|
+
:'name' => :'String',
|
39
|
+
:'value' => :'String'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# List of attributes with nullable: true
|
44
|
+
def self.openapi_nullable
|
45
|
+
Set.new([
|
46
|
+
])
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
if (!attributes.is_a?(Hash))
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderPaymentCreditCardDualVaultedProperty` initialize method"
|
54
|
+
end
|
55
|
+
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OrderPaymentCreditCardDualVaultedProperty`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
|
+
end
|
61
|
+
h[k.to_sym] = v
|
62
|
+
}
|
63
|
+
|
64
|
+
if attributes.key?(:'name')
|
65
|
+
self.name = attributes[:'name']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes.key?(:'value')
|
69
|
+
self.value = attributes[:'value']
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
74
|
+
# @return Array for valid properties with the reasons
|
75
|
+
def list_invalid_properties
|
76
|
+
invalid_properties = Array.new
|
77
|
+
invalid_properties
|
78
|
+
end
|
79
|
+
|
80
|
+
# Check to see if the all the properties in the model are valid
|
81
|
+
# @return true if the model is valid
|
82
|
+
def valid?
|
83
|
+
true
|
84
|
+
end
|
85
|
+
|
86
|
+
# Checks equality by comparing each attribute.
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def ==(o)
|
89
|
+
return true if self.equal?(o)
|
90
|
+
self.class == o.class &&
|
91
|
+
name == o.name &&
|
92
|
+
value == o.value
|
93
|
+
end
|
94
|
+
|
95
|
+
# @see the `==` method
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def eql?(o)
|
98
|
+
self == o
|
99
|
+
end
|
100
|
+
|
101
|
+
# Calculates hash code according to all attributes.
|
102
|
+
# @return [Integer] Hash code
|
103
|
+
def hash
|
104
|
+
[name, value].hash
|
105
|
+
end
|
106
|
+
|
107
|
+
# Builds the object from hash
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
+
# @return [Object] Returns the model itself
|
110
|
+
def self.build_from_hash(attributes)
|
111
|
+
new.build_from_hash(attributes)
|
112
|
+
end
|
113
|
+
|
114
|
+
# Builds the object from hash
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
# @return [Object] Returns the model itself
|
117
|
+
def build_from_hash(attributes)
|
118
|
+
return nil unless attributes.is_a?(Hash)
|
119
|
+
attributes = attributes.transform_keys(&:to_sym)
|
120
|
+
self.class.openapi_types.each_pair do |key, type|
|
121
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
122
|
+
self.send("#{key}=", nil)
|
123
|
+
elsif type =~ /\AArray<(.*)>/i
|
124
|
+
# check to ensure the input is an array given that the attribute
|
125
|
+
# is documented as an array but the input is not
|
126
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
127
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
128
|
+
end
|
129
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
130
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
self
|
135
|
+
end
|
136
|
+
|
137
|
+
# Deserializes the data based on type
|
138
|
+
# @param string type Data type
|
139
|
+
# @param string value Value to be deserialized
|
140
|
+
# @return [Object] Deserialized data
|
141
|
+
def _deserialize(type, value)
|
142
|
+
case type.to_sym
|
143
|
+
when :Time
|
144
|
+
Time.parse(value)
|
145
|
+
when :Date
|
146
|
+
Date.parse(value)
|
147
|
+
when :String
|
148
|
+
value.to_s
|
149
|
+
when :Integer
|
150
|
+
value.to_i
|
151
|
+
when :Float
|
152
|
+
value.to_f
|
153
|
+
when :Boolean
|
154
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
155
|
+
true
|
156
|
+
else
|
157
|
+
false
|
158
|
+
end
|
159
|
+
when :Object
|
160
|
+
# generic object (usually a Hash), return directly
|
161
|
+
value
|
162
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
163
|
+
inner_type = Regexp.last_match[:inner_type]
|
164
|
+
value.map { |v| _deserialize(inner_type, v) }
|
165
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
166
|
+
k_type = Regexp.last_match[:k_type]
|
167
|
+
v_type = Regexp.last_match[:v_type]
|
168
|
+
{}.tap do |hash|
|
169
|
+
value.each do |k, v|
|
170
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
171
|
+
end
|
172
|
+
end
|
173
|
+
else # model
|
174
|
+
# models (e.g. Pet) or oneOf
|
175
|
+
klass = UltracartClient.const_get(type)
|
176
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
# Returns the string representation of the object
|
181
|
+
# @return [String] String presentation of the object
|
182
|
+
def to_s
|
183
|
+
to_hash.to_s
|
184
|
+
end
|
185
|
+
|
186
|
+
# to_body is an alias to to_hash (backward compatibility)
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
188
|
+
def to_body
|
189
|
+
to_hash
|
190
|
+
end
|
191
|
+
|
192
|
+
# Returns the object in the form of hash
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
194
|
+
def to_hash
|
195
|
+
hash = {}
|
196
|
+
self.class.attribute_map.each_pair do |attr, param|
|
197
|
+
value = self.send(attr)
|
198
|
+
if value.nil?
|
199
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
200
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
201
|
+
end
|
202
|
+
|
203
|
+
hash[param] = _to_hash(value)
|
204
|
+
end
|
205
|
+
hash
|
206
|
+
end
|
207
|
+
|
208
|
+
# Outputs non-array value in the form of hash
|
209
|
+
# For object, use to_hash. Otherwise, just return the value
|
210
|
+
# @param [Object] value Any valid value
|
211
|
+
# @return [Hash] Returns the value in the form of hash
|
212
|
+
def _to_hash(value)
|
213
|
+
if value.is_a?(Array)
|
214
|
+
value.compact.map { |v| _to_hash(v) }
|
215
|
+
elsif value.is_a?(Hash)
|
216
|
+
{}.tap do |hash|
|
217
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
218
|
+
end
|
219
|
+
elsif value.respond_to? :to_hash
|
220
|
+
value.to_hash
|
221
|
+
else
|
222
|
+
value
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -601,6 +601,8 @@ require 'ultracart_api/models/order_packing_slip_response'
|
|
601
601
|
require 'ultracart_api/models/order_payment'
|
602
602
|
require 'ultracart_api/models/order_payment_check'
|
603
603
|
require 'ultracart_api/models/order_payment_credit_card'
|
604
|
+
require 'ultracart_api/models/order_payment_credit_card_dual_vaulted'
|
605
|
+
require 'ultracart_api/models/order_payment_credit_card_dual_vaulted_property'
|
604
606
|
require 'ultracart_api/models/order_payment_e_check'
|
605
607
|
require 'ultracart_api/models/order_payment_insurance'
|
606
608
|
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: 4.0.
|
4
|
+
version: 4.0.153
|
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
|
@@ -660,6 +660,8 @@ files:
|
|
660
660
|
- docs/OrderPayment.md
|
661
661
|
- docs/OrderPaymentCheck.md
|
662
662
|
- docs/OrderPaymentCreditCard.md
|
663
|
+
- docs/OrderPaymentCreditCardDualVaulted.md
|
664
|
+
- docs/OrderPaymentCreditCardDualVaultedProperty.md
|
663
665
|
- docs/OrderPaymentECheck.md
|
664
666
|
- docs/OrderPaymentInsurance.md
|
665
667
|
- docs/OrderPaymentPurchaseOrder.md
|
@@ -1460,6 +1462,8 @@ files:
|
|
1460
1462
|
- lib/ultracart_api/models/order_payment.rb
|
1461
1463
|
- lib/ultracart_api/models/order_payment_check.rb
|
1462
1464
|
- lib/ultracart_api/models/order_payment_credit_card.rb
|
1465
|
+
- lib/ultracart_api/models/order_payment_credit_card_dual_vaulted.rb
|
1466
|
+
- lib/ultracart_api/models/order_payment_credit_card_dual_vaulted_property.rb
|
1463
1467
|
- lib/ultracart_api/models/order_payment_e_check.rb
|
1464
1468
|
- lib/ultracart_api/models/order_payment_insurance.rb
|
1465
1469
|
- lib/ultracart_api/models/order_payment_purchase_order.rb
|