ultracart_api 3.3.1 → 3.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +63 -4
- data/docs/ConfigurationApi.md +756 -0
- data/docs/DelayAutoOrdersResponse.md +12 -0
- data/docs/IntegrationLogApi.md +51 -0
- data/docs/IntegrationLogSummary.md +16 -0
- data/docs/IntegrationLogSummaryQueryRequest.md +9 -0
- data/docs/IntegrationLogSummaryQueryResponse.md +12 -0
- data/docs/PaymentsConfiguration.md +23 -0
- data/docs/PaymentsConfigurationAffirm.md +15 -0
- data/docs/PaymentsConfigurationAmazon.md +15 -0
- data/docs/PaymentsConfigurationCOD.md +13 -0
- data/docs/PaymentsConfigurationCash.md +9 -0
- data/docs/PaymentsConfigurationCheck.md +25 -0
- data/docs/PaymentsConfigurationCreditCard.md +16 -0
- data/docs/PaymentsConfigurationLoanHero.md +12 -0
- data/docs/PaymentsConfigurationPayPal.md +36 -0
- data/docs/PaymentsConfigurationPurchaseOrder.md +11 -0
- data/docs/PaymentsConfigurationQuoteRequest.md +10 -0
- data/docs/PaymentsConfigurationResponse.md +12 -0
- data/docs/PaymentsConfigurationRestrictions.md +19 -0
- data/docs/PaymentsConfigurationSezzle.md +15 -0
- data/docs/PaymentsConfigurationWePay.md +35 -0
- data/docs/PaymentsConfigurationWireTransfer.md +18 -0
- data/docs/PaymentsThemeTransactionType.md +10 -0
- data/docs/PaymentsWepayEnroll.md +22 -0
- data/docs/RotatingTransactionGateway.md +50 -0
- data/docs/RotatingTransactionGatewayResponse.md +12 -0
- data/docs/RotatingTransactionGatewaysResponse.md +12 -0
- data/docs/RtgCurrency.md +10 -0
- data/docs/RtgDayOfMonthRestriction.md +9 -0
- data/docs/RtgDayOfWeekRestriction.md +10 -0
- data/docs/RtgSummaryGateway.md +24 -0
- data/docs/RtgSummaryResponse.md +14 -0
- data/docs/RtgThemeRestriction.md +10 -0
- data/docs/SingleSignOnAuthorizeResponse.md +9 -0
- data/docs/SingleSignOnTokenResponse.md +10 -0
- data/docs/SsoApi.md +4 -4
- data/docs/StripeConnectResponse.md +12 -0
- data/docs/TransactionGateway.md +71 -0
- data/docs/TransactionGatewaysRequest.md +10 -0
- data/docs/TransactionGatewaysResponse.md +12 -0
- data/lib/ultracart_api.rb +38 -0
- data/lib/ultracart_api/api/configuration_api.rb +843 -0
- data/lib/ultracart_api/api/integration_log_api.rb +55 -0
- data/lib/ultracart_api/api/sso_api.rb +6 -6
- data/lib/ultracart_api/models/delay_auto_orders_response.rb +221 -0
- data/lib/ultracart_api/models/integration_log_summary.rb +256 -0
- data/lib/ultracart_api/models/integration_log_summary_query_request.rb +195 -0
- data/lib/ultracart_api/models/integration_log_summary_query_response.rb +223 -0
- data/lib/ultracart_api/models/payments_configuration.rb +319 -0
- data/lib/ultracart_api/models/payments_configuration_affirm.rb +247 -0
- data/lib/ultracart_api/models/payments_configuration_amazon.rb +247 -0
- data/lib/ultracart_api/models/payments_configuration_cash.rb +193 -0
- data/lib/ultracart_api/models/payments_configuration_check.rb +337 -0
- data/lib/ultracart_api/models/payments_configuration_cod.rb +229 -0
- data/lib/ultracart_api/models/payments_configuration_credit_card.rb +256 -0
- data/lib/ultracart_api/models/payments_configuration_loan_hero.rb +220 -0
- data/lib/ultracart_api/models/payments_configuration_pay_pal.rb +436 -0
- data/lib/ultracart_api/models/payments_configuration_purchase_order.rb +211 -0
- data/lib/ultracart_api/models/payments_configuration_quote_request.rb +202 -0
- data/lib/ultracart_api/models/payments_configuration_response.rb +221 -0
- data/lib/ultracart_api/models/payments_configuration_restrictions.rb +283 -0
- data/lib/ultracart_api/models/payments_configuration_sezzle.rb +247 -0
- data/lib/ultracart_api/models/payments_configuration_we_pay.rb +427 -0
- data/lib/ultracart_api/models/payments_configuration_wire_transfer.rb +274 -0
- data/lib/ultracart_api/models/payments_theme_transaction_type.rb +239 -0
- data/lib/ultracart_api/models/payments_wepay_enroll.rb +310 -0
- data/lib/ultracart_api/models/rotating_transaction_gateway.rb +665 -0
- data/lib/ultracart_api/models/rotating_transaction_gateway_response.rb +221 -0
- data/lib/ultracart_api/models/rotating_transaction_gateways_response.rb +223 -0
- data/lib/ultracart_api/models/rtg_currency.rb +205 -0
- data/lib/ultracart_api/models/rtg_day_of_month_restriction.rb +195 -0
- data/lib/ultracart_api/models/rtg_day_of_week_restriction.rb +205 -0
- data/lib/ultracart_api/models/rtg_summary_gateway.rb +329 -0
- data/lib/ultracart_api/models/rtg_summary_response.rb +240 -0
- data/lib/ultracart_api/models/rtg_theme_restriction.rb +239 -0
- data/lib/ultracart_api/models/single_sign_on_authorize_response.rb +195 -0
- data/lib/ultracart_api/models/single_sign_on_token_response.rb +205 -0
- data/lib/ultracart_api/models/stripe_connect_response.rb +221 -0
- data/lib/ultracart_api/models/transaction_gateway.rb +823 -0
- data/lib/ultracart_api/models/transaction_gateways_request.rb +242 -0
- data/lib/ultracart_api/models/transaction_gateways_response.rb +223 -0
- data/lib/ultracart_api/version.rb +1 -1
- metadata +78 -2
@@ -0,0 +1,195 @@
|
|
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 RtgDayOfMonthRestriction
|
17
|
+
# The day of the month. 1 equals the first day of the month, 31 is the last possible value.
|
18
|
+
attr_accessor :day_of_month
|
19
|
+
|
20
|
+
# True if this rotating gateway is allowed to operate on this day of month. If no days are selected, all days are allowed.
|
21
|
+
attr_accessor :selected
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'day_of_month' => :'day_of_month',
|
27
|
+
:'selected' => :'selected'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.swagger_types
|
33
|
+
{
|
34
|
+
:'day_of_month' => :'Integer',
|
35
|
+
:'selected' => :'BOOLEAN'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
return unless attributes.is_a?(Hash)
|
43
|
+
|
44
|
+
# convert string to symbol for hash key
|
45
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
46
|
+
|
47
|
+
if attributes.has_key?(:'day_of_month')
|
48
|
+
self.day_of_month = attributes[:'day_of_month']
|
49
|
+
end
|
50
|
+
|
51
|
+
if attributes.has_key?(:'selected')
|
52
|
+
self.selected = attributes[:'selected']
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
57
|
+
# @return Array for valid properties with the reasons
|
58
|
+
def list_invalid_properties
|
59
|
+
invalid_properties = Array.new
|
60
|
+
invalid_properties
|
61
|
+
end
|
62
|
+
|
63
|
+
# Check to see if the all the properties in the model are valid
|
64
|
+
# @return true if the model is valid
|
65
|
+
def valid?
|
66
|
+
true
|
67
|
+
end
|
68
|
+
|
69
|
+
# Checks equality by comparing each attribute.
|
70
|
+
# @param [Object] Object to be compared
|
71
|
+
def ==(o)
|
72
|
+
return true if self.equal?(o)
|
73
|
+
self.class == o.class &&
|
74
|
+
day_of_month == o.day_of_month &&
|
75
|
+
selected == o.selected
|
76
|
+
end
|
77
|
+
|
78
|
+
# @see the `==` method
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def eql?(o)
|
81
|
+
self == o
|
82
|
+
end
|
83
|
+
|
84
|
+
# Calculates hash code according to all attributes.
|
85
|
+
# @return [Fixnum] Hash code
|
86
|
+
def hash
|
87
|
+
[day_of_month, selected].hash
|
88
|
+
end
|
89
|
+
|
90
|
+
# Builds the object from hash
|
91
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
92
|
+
# @return [Object] Returns the model itself
|
93
|
+
def build_from_hash(attributes)
|
94
|
+
return nil unless attributes.is_a?(Hash)
|
95
|
+
self.class.swagger_types.each_pair do |key, type|
|
96
|
+
if type =~ /\AArray<(.*)>/i
|
97
|
+
# check to ensure the input is an array given that the attribute
|
98
|
+
# is documented as an array but the input is not
|
99
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
100
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
101
|
+
end
|
102
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
103
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
104
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
105
|
+
end
|
106
|
+
|
107
|
+
self
|
108
|
+
end
|
109
|
+
|
110
|
+
# Deserializes the data based on type
|
111
|
+
# @param string type Data type
|
112
|
+
# @param string value Value to be deserialized
|
113
|
+
# @return [Object] Deserialized data
|
114
|
+
def _deserialize(type, value)
|
115
|
+
case type.to_sym
|
116
|
+
when :DateTime
|
117
|
+
DateTime.parse(value)
|
118
|
+
when :Date
|
119
|
+
Date.parse(value)
|
120
|
+
when :String
|
121
|
+
value.to_s
|
122
|
+
when :Integer
|
123
|
+
value.to_i
|
124
|
+
when :Float
|
125
|
+
value.to_f
|
126
|
+
when :BOOLEAN
|
127
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
128
|
+
true
|
129
|
+
else
|
130
|
+
false
|
131
|
+
end
|
132
|
+
when :Object
|
133
|
+
# generic object (usually a Hash), return directly
|
134
|
+
value
|
135
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
136
|
+
inner_type = Regexp.last_match[:inner_type]
|
137
|
+
value.map { |v| _deserialize(inner_type, v) }
|
138
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
139
|
+
k_type = Regexp.last_match[:k_type]
|
140
|
+
v_type = Regexp.last_match[:v_type]
|
141
|
+
{}.tap do |hash|
|
142
|
+
value.each do |k, v|
|
143
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
else # model
|
147
|
+
temp_model = UltracartClient.const_get(type).new
|
148
|
+
temp_model.build_from_hash(value)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# Returns the string representation of the object
|
153
|
+
# @return [String] String presentation of the object
|
154
|
+
def to_s
|
155
|
+
to_hash.to_s
|
156
|
+
end
|
157
|
+
|
158
|
+
# to_body is an alias to to_hash (backward compatibility)
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
160
|
+
def to_body
|
161
|
+
to_hash
|
162
|
+
end
|
163
|
+
|
164
|
+
# Returns the object in the form of hash
|
165
|
+
# @return [Hash] Returns the object in the form of hash
|
166
|
+
def to_hash
|
167
|
+
hash = {}
|
168
|
+
self.class.attribute_map.each_pair do |attr, param|
|
169
|
+
value = self.send(attr)
|
170
|
+
next if value.nil?
|
171
|
+
hash[param] = _to_hash(value)
|
172
|
+
end
|
173
|
+
hash
|
174
|
+
end
|
175
|
+
|
176
|
+
# Outputs non-array value in the form of hash
|
177
|
+
# For object, use to_hash. Otherwise, just return the value
|
178
|
+
# @param [Object] value Any valid value
|
179
|
+
# @return [Hash] Returns the value in the form of hash
|
180
|
+
def _to_hash(value)
|
181
|
+
if value.is_a?(Array)
|
182
|
+
value.compact.map { |v| _to_hash(v) }
|
183
|
+
elsif value.is_a?(Hash)
|
184
|
+
{}.tap do |hash|
|
185
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
186
|
+
end
|
187
|
+
elsif value.respond_to? :to_hash
|
188
|
+
value.to_hash
|
189
|
+
else
|
190
|
+
value
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
end
|
195
|
+
end
|
@@ -0,0 +1,205 @@
|
|
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 RtgDayOfWeekRestriction
|
17
|
+
# Human readable day of week abbreviation
|
18
|
+
attr_accessor :abbreviation
|
19
|
+
|
20
|
+
# 1=Sun,2=Mon,3=Tue,4=Wed,5=Thu,6=Fri,7=Sat
|
21
|
+
attr_accessor :day_of_week
|
22
|
+
|
23
|
+
# True if this rotating gateway is allowed to operate on this day of week. If no days are selected, all days are allowed.
|
24
|
+
attr_accessor :selected
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'abbreviation' => :'abbreviation',
|
30
|
+
:'day_of_week' => :'day_of_week',
|
31
|
+
:'selected' => :'selected'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
def self.swagger_types
|
37
|
+
{
|
38
|
+
:'abbreviation' => :'String',
|
39
|
+
:'day_of_week' => :'Integer',
|
40
|
+
:'selected' => :'BOOLEAN'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Initializes the object
|
45
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
46
|
+
def initialize(attributes = {})
|
47
|
+
return unless attributes.is_a?(Hash)
|
48
|
+
|
49
|
+
# convert string to symbol for hash key
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
51
|
+
|
52
|
+
if attributes.has_key?(:'abbreviation')
|
53
|
+
self.abbreviation = attributes[:'abbreviation']
|
54
|
+
end
|
55
|
+
|
56
|
+
if attributes.has_key?(:'day_of_week')
|
57
|
+
self.day_of_week = attributes[:'day_of_week']
|
58
|
+
end
|
59
|
+
|
60
|
+
if attributes.has_key?(:'selected')
|
61
|
+
self.selected = attributes[:'selected']
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
69
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
true
|
76
|
+
end
|
77
|
+
|
78
|
+
# Checks equality by comparing each attribute.
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def ==(o)
|
81
|
+
return true if self.equal?(o)
|
82
|
+
self.class == o.class &&
|
83
|
+
abbreviation == o.abbreviation &&
|
84
|
+
day_of_week == o.day_of_week &&
|
85
|
+
selected == o.selected
|
86
|
+
end
|
87
|
+
|
88
|
+
# @see the `==` method
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def eql?(o)
|
91
|
+
self == o
|
92
|
+
end
|
93
|
+
|
94
|
+
# Calculates hash code according to all attributes.
|
95
|
+
# @return [Fixnum] Hash code
|
96
|
+
def hash
|
97
|
+
[abbreviation, day_of_week, selected].hash
|
98
|
+
end
|
99
|
+
|
100
|
+
# Builds the object from hash
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
102
|
+
# @return [Object] Returns the model itself
|
103
|
+
def build_from_hash(attributes)
|
104
|
+
return nil unless attributes.is_a?(Hash)
|
105
|
+
self.class.swagger_types.each_pair do |key, type|
|
106
|
+
if type =~ /\AArray<(.*)>/i
|
107
|
+
# check to ensure the input is an array given that the attribute
|
108
|
+
# is documented as an array but the input is not
|
109
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
110
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
111
|
+
end
|
112
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
113
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
114
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
115
|
+
end
|
116
|
+
|
117
|
+
self
|
118
|
+
end
|
119
|
+
|
120
|
+
# Deserializes the data based on type
|
121
|
+
# @param string type Data type
|
122
|
+
# @param string value Value to be deserialized
|
123
|
+
# @return [Object] Deserialized data
|
124
|
+
def _deserialize(type, value)
|
125
|
+
case type.to_sym
|
126
|
+
when :DateTime
|
127
|
+
DateTime.parse(value)
|
128
|
+
when :Date
|
129
|
+
Date.parse(value)
|
130
|
+
when :String
|
131
|
+
value.to_s
|
132
|
+
when :Integer
|
133
|
+
value.to_i
|
134
|
+
when :Float
|
135
|
+
value.to_f
|
136
|
+
when :BOOLEAN
|
137
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
138
|
+
true
|
139
|
+
else
|
140
|
+
false
|
141
|
+
end
|
142
|
+
when :Object
|
143
|
+
# generic object (usually a Hash), return directly
|
144
|
+
value
|
145
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
146
|
+
inner_type = Regexp.last_match[:inner_type]
|
147
|
+
value.map { |v| _deserialize(inner_type, v) }
|
148
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
149
|
+
k_type = Regexp.last_match[:k_type]
|
150
|
+
v_type = Regexp.last_match[:v_type]
|
151
|
+
{}.tap do |hash|
|
152
|
+
value.each do |k, v|
|
153
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
else # model
|
157
|
+
temp_model = UltracartClient.const_get(type).new
|
158
|
+
temp_model.build_from_hash(value)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
# Returns the string representation of the object
|
163
|
+
# @return [String] String presentation of the object
|
164
|
+
def to_s
|
165
|
+
to_hash.to_s
|
166
|
+
end
|
167
|
+
|
168
|
+
# to_body is an alias to to_hash (backward compatibility)
|
169
|
+
# @return [Hash] Returns the object in the form of hash
|
170
|
+
def to_body
|
171
|
+
to_hash
|
172
|
+
end
|
173
|
+
|
174
|
+
# Returns the object in the form of hash
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
176
|
+
def to_hash
|
177
|
+
hash = {}
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
179
|
+
value = self.send(attr)
|
180
|
+
next if value.nil?
|
181
|
+
hash[param] = _to_hash(value)
|
182
|
+
end
|
183
|
+
hash
|
184
|
+
end
|
185
|
+
|
186
|
+
# Outputs non-array value in the form of hash
|
187
|
+
# For object, use to_hash. Otherwise, just return the value
|
188
|
+
# @param [Object] value Any valid value
|
189
|
+
# @return [Hash] Returns the value in the form of hash
|
190
|
+
def _to_hash(value)
|
191
|
+
if value.is_a?(Array)
|
192
|
+
value.compact.map { |v| _to_hash(v) }
|
193
|
+
elsif value.is_a?(Hash)
|
194
|
+
{}.tap do |hash|
|
195
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
196
|
+
end
|
197
|
+
elsif value.respond_to? :to_hash
|
198
|
+
value.to_hash
|
199
|
+
else
|
200
|
+
value
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
end
|
205
|
+
end
|
@@ -0,0 +1,329 @@
|
|
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 RtgSummaryGateway
|
17
|
+
attr_accessor :cascade_code
|
18
|
+
|
19
|
+
attr_accessor :code
|
20
|
+
|
21
|
+
attr_accessor :delay_auto_orders
|
22
|
+
|
23
|
+
attr_accessor :name
|
24
|
+
|
25
|
+
attr_accessor :reserve_percentage
|
26
|
+
|
27
|
+
# An optional date specifying the date up to which your gateway has released all reserve funds. This aids in profitability reporting.
|
28
|
+
attr_accessor :reserves_released_through
|
29
|
+
|
30
|
+
attr_accessor :rotating_transaction_gateway_oid
|
31
|
+
|
32
|
+
attr_accessor :show_ultracart_payments_verification
|
33
|
+
|
34
|
+
attr_accessor :show_ultracart_payments_verified
|
35
|
+
|
36
|
+
attr_accessor :status
|
37
|
+
|
38
|
+
attr_accessor :supports_auth
|
39
|
+
|
40
|
+
attr_accessor :supports_refund
|
41
|
+
|
42
|
+
attr_accessor :third_party
|
43
|
+
|
44
|
+
attr_accessor :traffic_percentage
|
45
|
+
|
46
|
+
attr_accessor :warning
|
47
|
+
|
48
|
+
attr_accessor :wepay_account_update_uri
|
49
|
+
|
50
|
+
attr_accessor :wepay_console_hostname
|
51
|
+
|
52
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
53
|
+
def self.attribute_map
|
54
|
+
{
|
55
|
+
:'cascade_code' => :'cascade_code',
|
56
|
+
:'code' => :'code',
|
57
|
+
:'delay_auto_orders' => :'delay_auto_orders',
|
58
|
+
:'name' => :'name',
|
59
|
+
:'reserve_percentage' => :'reserve_percentage',
|
60
|
+
:'reserves_released_through' => :'reserves_released_through',
|
61
|
+
:'rotating_transaction_gateway_oid' => :'rotating_transaction_gateway_oid',
|
62
|
+
:'show_ultracart_payments_verification' => :'show_ultracart_payments_verification',
|
63
|
+
:'show_ultracart_payments_verified' => :'show_ultracart_payments_verified',
|
64
|
+
:'status' => :'status',
|
65
|
+
:'supports_auth' => :'supports_auth',
|
66
|
+
:'supports_refund' => :'supports_refund',
|
67
|
+
:'third_party' => :'third_party',
|
68
|
+
:'traffic_percentage' => :'traffic_percentage',
|
69
|
+
:'warning' => :'warning',
|
70
|
+
:'wepay_account_update_uri' => :'wepay_account_update_uri',
|
71
|
+
:'wepay_console_hostname' => :'wepay_console_hostname'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# Attribute type mapping.
|
76
|
+
def self.swagger_types
|
77
|
+
{
|
78
|
+
:'cascade_code' => :'String',
|
79
|
+
:'code' => :'String',
|
80
|
+
:'delay_auto_orders' => :'String',
|
81
|
+
:'name' => :'String',
|
82
|
+
:'reserve_percentage' => :'Float',
|
83
|
+
:'reserves_released_through' => :'String',
|
84
|
+
:'rotating_transaction_gateway_oid' => :'Integer',
|
85
|
+
:'show_ultracart_payments_verification' => :'BOOLEAN',
|
86
|
+
:'show_ultracart_payments_verified' => :'BOOLEAN',
|
87
|
+
:'status' => :'String',
|
88
|
+
:'supports_auth' => :'String',
|
89
|
+
:'supports_refund' => :'String',
|
90
|
+
:'third_party' => :'String',
|
91
|
+
:'traffic_percentage' => :'Float',
|
92
|
+
:'warning' => :'String',
|
93
|
+
:'wepay_account_update_uri' => :'String',
|
94
|
+
:'wepay_console_hostname' => :'String'
|
95
|
+
}
|
96
|
+
end
|
97
|
+
|
98
|
+
# Initializes the object
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
100
|
+
def initialize(attributes = {})
|
101
|
+
return unless attributes.is_a?(Hash)
|
102
|
+
|
103
|
+
# convert string to symbol for hash key
|
104
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
105
|
+
|
106
|
+
if attributes.has_key?(:'cascade_code')
|
107
|
+
self.cascade_code = attributes[:'cascade_code']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.has_key?(:'code')
|
111
|
+
self.code = attributes[:'code']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.has_key?(:'delay_auto_orders')
|
115
|
+
self.delay_auto_orders = attributes[:'delay_auto_orders']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.has_key?(:'name')
|
119
|
+
self.name = attributes[:'name']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.has_key?(:'reserve_percentage')
|
123
|
+
self.reserve_percentage = attributes[:'reserve_percentage']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.has_key?(:'reserves_released_through')
|
127
|
+
self.reserves_released_through = attributes[:'reserves_released_through']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes.has_key?(:'rotating_transaction_gateway_oid')
|
131
|
+
self.rotating_transaction_gateway_oid = attributes[:'rotating_transaction_gateway_oid']
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes.has_key?(:'show_ultracart_payments_verification')
|
135
|
+
self.show_ultracart_payments_verification = attributes[:'show_ultracart_payments_verification']
|
136
|
+
end
|
137
|
+
|
138
|
+
if attributes.has_key?(:'show_ultracart_payments_verified')
|
139
|
+
self.show_ultracart_payments_verified = attributes[:'show_ultracart_payments_verified']
|
140
|
+
end
|
141
|
+
|
142
|
+
if attributes.has_key?(:'status')
|
143
|
+
self.status = attributes[:'status']
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes.has_key?(:'supports_auth')
|
147
|
+
self.supports_auth = attributes[:'supports_auth']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes.has_key?(:'supports_refund')
|
151
|
+
self.supports_refund = attributes[:'supports_refund']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.has_key?(:'third_party')
|
155
|
+
self.third_party = attributes[:'third_party']
|
156
|
+
end
|
157
|
+
|
158
|
+
if attributes.has_key?(:'traffic_percentage')
|
159
|
+
self.traffic_percentage = attributes[:'traffic_percentage']
|
160
|
+
end
|
161
|
+
|
162
|
+
if attributes.has_key?(:'warning')
|
163
|
+
self.warning = attributes[:'warning']
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes.has_key?(:'wepay_account_update_uri')
|
167
|
+
self.wepay_account_update_uri = attributes[:'wepay_account_update_uri']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes.has_key?(:'wepay_console_hostname')
|
171
|
+
self.wepay_console_hostname = attributes[:'wepay_console_hostname']
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
176
|
+
# @return Array for valid properties with the reasons
|
177
|
+
def list_invalid_properties
|
178
|
+
invalid_properties = Array.new
|
179
|
+
invalid_properties
|
180
|
+
end
|
181
|
+
|
182
|
+
# Check to see if the all the properties in the model are valid
|
183
|
+
# @return true if the model is valid
|
184
|
+
def valid?
|
185
|
+
true
|
186
|
+
end
|
187
|
+
|
188
|
+
# Checks equality by comparing each attribute.
|
189
|
+
# @param [Object] Object to be compared
|
190
|
+
def ==(o)
|
191
|
+
return true if self.equal?(o)
|
192
|
+
self.class == o.class &&
|
193
|
+
cascade_code == o.cascade_code &&
|
194
|
+
code == o.code &&
|
195
|
+
delay_auto_orders == o.delay_auto_orders &&
|
196
|
+
name == o.name &&
|
197
|
+
reserve_percentage == o.reserve_percentage &&
|
198
|
+
reserves_released_through == o.reserves_released_through &&
|
199
|
+
rotating_transaction_gateway_oid == o.rotating_transaction_gateway_oid &&
|
200
|
+
show_ultracart_payments_verification == o.show_ultracart_payments_verification &&
|
201
|
+
show_ultracart_payments_verified == o.show_ultracart_payments_verified &&
|
202
|
+
status == o.status &&
|
203
|
+
supports_auth == o.supports_auth &&
|
204
|
+
supports_refund == o.supports_refund &&
|
205
|
+
third_party == o.third_party &&
|
206
|
+
traffic_percentage == o.traffic_percentage &&
|
207
|
+
warning == o.warning &&
|
208
|
+
wepay_account_update_uri == o.wepay_account_update_uri &&
|
209
|
+
wepay_console_hostname == o.wepay_console_hostname
|
210
|
+
end
|
211
|
+
|
212
|
+
# @see the `==` method
|
213
|
+
# @param [Object] Object to be compared
|
214
|
+
def eql?(o)
|
215
|
+
self == o
|
216
|
+
end
|
217
|
+
|
218
|
+
# Calculates hash code according to all attributes.
|
219
|
+
# @return [Fixnum] Hash code
|
220
|
+
def hash
|
221
|
+
[cascade_code, code, delay_auto_orders, name, reserve_percentage, reserves_released_through, rotating_transaction_gateway_oid, show_ultracart_payments_verification, show_ultracart_payments_verified, status, supports_auth, supports_refund, third_party, traffic_percentage, warning, wepay_account_update_uri, wepay_console_hostname].hash
|
222
|
+
end
|
223
|
+
|
224
|
+
# Builds the object from hash
|
225
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
226
|
+
# @return [Object] Returns the model itself
|
227
|
+
def build_from_hash(attributes)
|
228
|
+
return nil unless attributes.is_a?(Hash)
|
229
|
+
self.class.swagger_types.each_pair do |key, type|
|
230
|
+
if type =~ /\AArray<(.*)>/i
|
231
|
+
# check to ensure the input is an array given that the attribute
|
232
|
+
# is documented as an array but the input is not
|
233
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
234
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
235
|
+
end
|
236
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
237
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
238
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
239
|
+
end
|
240
|
+
|
241
|
+
self
|
242
|
+
end
|
243
|
+
|
244
|
+
# Deserializes the data based on type
|
245
|
+
# @param string type Data type
|
246
|
+
# @param string value Value to be deserialized
|
247
|
+
# @return [Object] Deserialized data
|
248
|
+
def _deserialize(type, value)
|
249
|
+
case type.to_sym
|
250
|
+
when :DateTime
|
251
|
+
DateTime.parse(value)
|
252
|
+
when :Date
|
253
|
+
Date.parse(value)
|
254
|
+
when :String
|
255
|
+
value.to_s
|
256
|
+
when :Integer
|
257
|
+
value.to_i
|
258
|
+
when :Float
|
259
|
+
value.to_f
|
260
|
+
when :BOOLEAN
|
261
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
262
|
+
true
|
263
|
+
else
|
264
|
+
false
|
265
|
+
end
|
266
|
+
when :Object
|
267
|
+
# generic object (usually a Hash), return directly
|
268
|
+
value
|
269
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
270
|
+
inner_type = Regexp.last_match[:inner_type]
|
271
|
+
value.map { |v| _deserialize(inner_type, v) }
|
272
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
273
|
+
k_type = Regexp.last_match[:k_type]
|
274
|
+
v_type = Regexp.last_match[:v_type]
|
275
|
+
{}.tap do |hash|
|
276
|
+
value.each do |k, v|
|
277
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
278
|
+
end
|
279
|
+
end
|
280
|
+
else # model
|
281
|
+
temp_model = UltracartClient.const_get(type).new
|
282
|
+
temp_model.build_from_hash(value)
|
283
|
+
end
|
284
|
+
end
|
285
|
+
|
286
|
+
# Returns the string representation of the object
|
287
|
+
# @return [String] String presentation of the object
|
288
|
+
def to_s
|
289
|
+
to_hash.to_s
|
290
|
+
end
|
291
|
+
|
292
|
+
# to_body is an alias to to_hash (backward compatibility)
|
293
|
+
# @return [Hash] Returns the object in the form of hash
|
294
|
+
def to_body
|
295
|
+
to_hash
|
296
|
+
end
|
297
|
+
|
298
|
+
# Returns the object in the form of hash
|
299
|
+
# @return [Hash] Returns the object in the form of hash
|
300
|
+
def to_hash
|
301
|
+
hash = {}
|
302
|
+
self.class.attribute_map.each_pair do |attr, param|
|
303
|
+
value = self.send(attr)
|
304
|
+
next if value.nil?
|
305
|
+
hash[param] = _to_hash(value)
|
306
|
+
end
|
307
|
+
hash
|
308
|
+
end
|
309
|
+
|
310
|
+
# Outputs non-array value in the form of hash
|
311
|
+
# For object, use to_hash. Otherwise, just return the value
|
312
|
+
# @param [Object] value Any valid value
|
313
|
+
# @return [Hash] Returns the value in the form of hash
|
314
|
+
def _to_hash(value)
|
315
|
+
if value.is_a?(Array)
|
316
|
+
value.compact.map { |v| _to_hash(v) }
|
317
|
+
elsif value.is_a?(Hash)
|
318
|
+
{}.tap do |hash|
|
319
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
320
|
+
end
|
321
|
+
elsif value.respond_to? :to_hash
|
322
|
+
value.to_hash
|
323
|
+
else
|
324
|
+
value
|
325
|
+
end
|
326
|
+
end
|
327
|
+
|
328
|
+
end
|
329
|
+
end
|