wallee-ruby-sdk 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +21 -11
- data/lib/wallee-ruby-sdk/models/abstract_debt_collection_case_update.rb +270 -0
- data/lib/wallee-ruby-sdk/models/abstract_payment_link_update.rb +302 -0
- data/lib/wallee-ruby-sdk/models/abstract_subscription_affiliate_update.rb +230 -0
- data/lib/wallee-ruby-sdk/models/abstract_transaction_pending.rb +14 -4
- data/lib/wallee-ruby-sdk/models/criteria_operator.rb +1 -0
- data/lib/wallee-ruby-sdk/models/debt_collection_case.rb +502 -0
- data/lib/wallee-ruby-sdk/models/debt_collection_case_create.rb +310 -0
- data/lib/wallee-ruby-sdk/models/debt_collection_case_document.rb +300 -0
- data/lib/wallee-ruby-sdk/models/debt_collection_case_source.rb +232 -0
- data/lib/wallee-ruby-sdk/models/debt_collection_case_state.rb +48 -0
- data/lib/wallee-ruby-sdk/models/debt_collection_case_update.rb +300 -0
- data/lib/wallee-ruby-sdk/models/debt_collection_environment.rb +43 -0
- data/lib/wallee-ruby-sdk/models/debt_collection_receipt.rb +288 -0
- data/lib/wallee-ruby-sdk/models/debt_collection_receipt_source.rb +222 -0
- data/lib/wallee-ruby-sdk/models/debt_collector.rb +222 -0
- data/lib/wallee-ruby-sdk/models/debt_collector_condition.rb +258 -0
- data/lib/wallee-ruby-sdk/models/debt_collector_condition_type.rb +222 -0
- data/lib/wallee-ruby-sdk/models/debt_collector_configuration.rb +302 -0
- data/lib/wallee-ruby-sdk/models/document_template_type.rb +1 -11
- data/lib/wallee-ruby-sdk/models/entity_export_request.rb +215 -0
- data/lib/wallee-ruby-sdk/models/entity_query.rb +1 -1
- data/lib/wallee-ruby-sdk/models/entity_query_order_by.rb +10 -0
- data/lib/wallee-ruby-sdk/models/environment.rb +43 -0
- data/lib/wallee-ruby-sdk/models/metric_usage.rb +232 -0
- data/lib/wallee-ruby-sdk/models/payment_connector.rb +23 -1
- data/lib/wallee-ruby-sdk/models/payment_contract.rb +338 -0
- data/lib/wallee-ruby-sdk/models/payment_contract_state.rb +46 -0
- data/lib/wallee-ruby-sdk/models/payment_contract_type.rb +232 -0
- data/lib/wallee-ruby-sdk/models/payment_link.rb +382 -0
- data/lib/wallee-ruby-sdk/models/payment_link_active.rb +342 -0
- data/lib/wallee-ruby-sdk/models/payment_link_create.rb +337 -0
- data/lib/wallee-ruby-sdk/models/payment_link_protection_mode.rb +43 -0
- data/lib/wallee-ruby-sdk/models/payment_link_update.rb +332 -0
- data/lib/wallee-ruby-sdk/models/payment_method.rb +13 -1
- data/lib/wallee-ruby-sdk/models/payment_processor_configuration.rb +11 -1
- data/lib/wallee-ruby-sdk/models/refund.rb +11 -1
- data/lib/wallee-ruby-sdk/models/rest_address_format.rb +234 -0
- data/lib/wallee-ruby-sdk/models/rest_address_format_field.rb +51 -0
- data/lib/wallee-ruby-sdk/models/rest_country.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription_affiliate.rb +290 -0
- data/lib/wallee-ruby-sdk/models/subscription_affiliate_create.rb +255 -0
- data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleted.rb +290 -0
- data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleting.rb +290 -0
- data/lib/wallee-ruby-sdk/models/subscription_affiliate_inactive.rb +260 -0
- data/lib/wallee-ruby-sdk/models/subscription_affiliate_update.rb +260 -0
- data/lib/wallee-ruby-sdk/models/subscription_change_request.rb +2 -2
- data/lib/wallee-ruby-sdk/models/subscription_create_request.rb +2 -2
- data/lib/wallee-ruby-sdk/models/subscription_pending.rb +11 -1
- data/lib/wallee-ruby-sdk/models/tokenizationn_mode.rb +44 -0
- data/lib/wallee-ruby-sdk/models/transaction.rb +63 -3
- data/lib/wallee-ruby-sdk/models/transaction_create.rb +41 -1
- data/lib/wallee-ruby-sdk/models/transaction_environment_selection_strategy.rb +43 -0
- data/lib/wallee-ruby-sdk/models/transaction_invoice.rb +11 -1
- data/lib/wallee-ruby-sdk/models/transaction_pending.rb +11 -1
- data/lib/wallee-ruby-sdk/models/unencrypted_card_data.rb +228 -0
- data/lib/wallee-ruby-sdk/models/unencrypted_card_data_create.rb +233 -0
- data/lib/wallee-ruby-sdk/models/webhook_listener_entity.rb +1 -11
- data/lib/wallee-ruby-sdk/services/account_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/application_user_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/card_processing_service_api.rb +176 -0
- data/lib/wallee-ruby-sdk/services/charge_attempt_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/charge_flow_level_service_api.rb +4 -4
- data/lib/wallee-ruby-sdk/services/charge_flow_service_api.rb +6 -6
- data/lib/wallee-ruby-sdk/services/condition_type_service_api.rb +4 -4
- data/lib/wallee-ruby-sdk/services/country_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/country_state_service_api.rb +4 -4
- data/lib/wallee-ruby-sdk/services/currency_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/debt_collection_case_service_api.rb +800 -0
- data/lib/wallee-ruby-sdk/services/debt_collector_configuration_service_api.rb +217 -0
- data/lib/wallee-ruby-sdk/services/debt_collector_service_api.rb +143 -0
- data/lib/wallee-ruby-sdk/services/delivery_indication_service_api.rb +6 -6
- data/lib/wallee-ruby-sdk/services/document_template_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/document_template_type_service_api.rb +4 -4
- data/lib/wallee-ruby-sdk/services/human_user_service_api.rb +59 -2
- data/lib/wallee-ruby-sdk/services/installment_payment_service_api.rb +4 -4
- data/lib/wallee-ruby-sdk/services/installment_payment_slice_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/installment_plan_calculation_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/installment_plan_configuration_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/installment_plan_slice_configuration_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/label_description_group_service_api.rb +4 -4
- data/lib/wallee-ruby-sdk/services/label_description_service_api.rb +4 -4
- data/lib/wallee-ruby-sdk/services/language_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/legal_organization_form_service_api.rb +201 -0
- data/lib/wallee-ruby-sdk/services/manual_task_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/mertic_usage_service_api.rb +100 -0
- data/lib/wallee-ruby-sdk/services/payment_connector_configuration_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/payment_connector_service_api.rb +4 -4
- data/lib/wallee-ruby-sdk/services/payment_link_service_api.rb +402 -0
- data/lib/wallee-ruby-sdk/services/payment_method_configuration_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/payment_method_service_api.rb +4 -4
- data/lib/wallee-ruby-sdk/services/payment_processor_configuration_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/payment_processor_service_api.rb +4 -4
- data/lib/wallee-ruby-sdk/services/permission_service_api.rb +4 -4
- data/lib/wallee-ruby-sdk/services/refund_service_api.rb +10 -10
- data/lib/wallee-ruby-sdk/services/space_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/static_value_service_api.rb +4 -4
- data/lib/wallee-ruby-sdk/services/subscriber_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/subscription_affiliate_service_api.rb +402 -0
- data/lib/wallee-ruby-sdk/services/subscription_charge_service_api.rb +4 -4
- data/lib/wallee-ruby-sdk/services/subscription_ledger_entry_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/subscription_metric_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/subscription_metric_usage_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/subscription_period_bill_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/subscription_product_component_group_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/subscription_product_component_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/subscription_product_fee_tier_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/subscription_product_metered_fee_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/subscription_product_period_fee_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/subscription_product_retirement_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/subscription_product_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/subscription_product_setup_fee_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/subscription_product_version_retirement_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/subscription_product_version_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/subscription_service_api.rb +12 -12
- data/lib/wallee-ruby-sdk/services/subscription_suspension_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/subscription_version_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/token_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/token_version_service_api.rb +4 -4
- data/lib/wallee-ruby-sdk/services/transaction_completion_service_api.rb +6 -6
- data/lib/wallee-ruby-sdk/services/transaction_invoice_service_api.rb +6 -6
- data/lib/wallee-ruby-sdk/services/transaction_service_api.rb +143 -18
- data/lib/wallee-ruby-sdk/services/transaction_void_service_api.rb +6 -6
- data/lib/wallee-ruby-sdk/services/user_account_role_service_api.rb +6 -6
- data/lib/wallee-ruby-sdk/services/user_space_role_service_api.rb +9 -9
- data/lib/wallee-ruby-sdk/services/webhook_listener_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/services/webhook_url_service_api.rb +2 -2
- data/lib/wallee-ruby-sdk/version.rb +1 -1
- data/lib/wallee-ruby-sdk.rb +47 -0
- metadata +50 -3
@@ -0,0 +1,232 @@
|
|
1
|
+
=begin
|
2
|
+
Wallee API: 1.0.0
|
3
|
+
|
4
|
+
The wallee API allows an easy interaction with the wallee web service.
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
you may not use this file except in compliance with the License.
|
10
|
+
You may obtain a copy of the License at
|
11
|
+
|
12
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
|
14
|
+
Unless required by applicable law or agreed to in writing, software
|
15
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
See the License for the specific language governing permissions and
|
18
|
+
limitations under the License.
|
19
|
+
|
20
|
+
=end
|
21
|
+
|
22
|
+
require 'date'
|
23
|
+
|
24
|
+
module Wallee
|
25
|
+
# The metric usage provides details about the consumption of a particular metric.
|
26
|
+
class MetricUsage
|
27
|
+
# The consumed units provide the value of how much has been consumed of the particular metric.
|
28
|
+
attr_accessor :consumed_units
|
29
|
+
|
30
|
+
# The metric description describes the metric.
|
31
|
+
attr_accessor :metric_description
|
32
|
+
|
33
|
+
# The metric ID identifies the metric for consumed units.
|
34
|
+
attr_accessor :metric_id
|
35
|
+
|
36
|
+
# The metric name defines the name of the consumed units.
|
37
|
+
attr_accessor :metric_name
|
38
|
+
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'consumed_units' => :'consumedUnits',
|
44
|
+
:'metric_description' => :'metricDescription',
|
45
|
+
:'metric_id' => :'metricId',
|
46
|
+
:'metric_name' => :'metricName'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Attribute type mapping.
|
51
|
+
def self.swagger_types
|
52
|
+
{
|
53
|
+
:'consumed_units' => :'Float',
|
54
|
+
:'metric_description' => :'Hash<String, String>',
|
55
|
+
:'metric_id' => :'Integer',
|
56
|
+
:'metric_name' => :'Hash<String, String>'
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# Initializes the object
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
62
|
+
def initialize(attributes = {})
|
63
|
+
return unless attributes.is_a?(Hash)
|
64
|
+
|
65
|
+
# convert string to symbol for hash key
|
66
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
67
|
+
|
68
|
+
if attributes.has_key?(:'consumedUnits')
|
69
|
+
self.consumed_units = attributes[:'consumedUnits']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.has_key?(:'metricDescription')
|
73
|
+
if (value = attributes[:'metricDescription']).is_a?(Array)
|
74
|
+
self.metric_description = value
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.has_key?(:'metricId')
|
79
|
+
self.metric_id = attributes[:'metricId']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.has_key?(:'metricName')
|
83
|
+
if (value = attributes[:'metricName']).is_a?(Array)
|
84
|
+
self.metric_name = value
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
|
90
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
91
|
+
# @return Array for valid properies with the reasons
|
92
|
+
def list_invalid_properties
|
93
|
+
invalid_properties = Array.new
|
94
|
+
return invalid_properties
|
95
|
+
end
|
96
|
+
|
97
|
+
# Check to see if the all the properties in the model are valid
|
98
|
+
# @return true if the model is valid
|
99
|
+
def valid?
|
100
|
+
return true
|
101
|
+
end
|
102
|
+
|
103
|
+
# Checks equality by comparing each attribute.
|
104
|
+
# @param [Object] Object to be compared
|
105
|
+
def ==(o)
|
106
|
+
return true if self.equal?(o)
|
107
|
+
self.class == o.class &&
|
108
|
+
consumed_units == o.consumed_units &&
|
109
|
+
metric_description == o.metric_description &&
|
110
|
+
metric_id == o.metric_id &&
|
111
|
+
metric_name == o.metric_name
|
112
|
+
end
|
113
|
+
|
114
|
+
# @see the `==` method
|
115
|
+
# @param [Object] Object to be compared
|
116
|
+
def eql?(o)
|
117
|
+
self == o
|
118
|
+
end
|
119
|
+
|
120
|
+
# Calculates hash code according to all attributes.
|
121
|
+
# @return [Fixnum] Hash code
|
122
|
+
def hash
|
123
|
+
[consumed_units, metric_description, metric_id, metric_name].hash
|
124
|
+
end
|
125
|
+
|
126
|
+
# Builds the object from hash
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
128
|
+
# @return [Object] Returns the model itself
|
129
|
+
def build_from_hash(attributes)
|
130
|
+
return nil unless attributes.is_a?(Hash)
|
131
|
+
self.class.swagger_types.each_pair do |key, type|
|
132
|
+
if type =~ /\AArray<(.*)>/i
|
133
|
+
# check to ensure the input is an array given that the the attribute
|
134
|
+
# is documented as an array but the input is not
|
135
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
136
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
137
|
+
end
|
138
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
139
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
140
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
141
|
+
end
|
142
|
+
|
143
|
+
self
|
144
|
+
end
|
145
|
+
|
146
|
+
# Deserializes the data based on type
|
147
|
+
# @param string type Data type
|
148
|
+
# @param string value Value to be deserialized
|
149
|
+
# @return [Object] Deserialized data
|
150
|
+
def _deserialize(type, value)
|
151
|
+
case type.to_sym
|
152
|
+
when :DateTime
|
153
|
+
DateTime.parse(value)
|
154
|
+
when :Date
|
155
|
+
Date.parse(value)
|
156
|
+
when :String
|
157
|
+
value.to_s
|
158
|
+
when :Integer
|
159
|
+
value.to_i
|
160
|
+
when :Float
|
161
|
+
value.to_f
|
162
|
+
when :BOOLEAN
|
163
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
164
|
+
true
|
165
|
+
else
|
166
|
+
false
|
167
|
+
end
|
168
|
+
when :Object
|
169
|
+
# generic object (usually a Hash), return directly
|
170
|
+
value
|
171
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
172
|
+
inner_type = Regexp.last_match[:inner_type]
|
173
|
+
value.map { |v| _deserialize(inner_type, v) }
|
174
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
175
|
+
k_type = Regexp.last_match[:k_type]
|
176
|
+
v_type = Regexp.last_match[:v_type]
|
177
|
+
{}.tap do |hash|
|
178
|
+
value.each do |k, v|
|
179
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
180
|
+
end
|
181
|
+
end
|
182
|
+
else # model
|
183
|
+
temp_model = Wallee.const_get(type).new
|
184
|
+
temp_model.build_from_hash(value)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
# Returns the string representation of the object
|
189
|
+
# @return [String] String presentation of the object
|
190
|
+
def to_s
|
191
|
+
to_hash.to_s
|
192
|
+
end
|
193
|
+
|
194
|
+
# to_body is an alias to to_hash (backward compatibility)
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
196
|
+
def to_body
|
197
|
+
to_hash
|
198
|
+
end
|
199
|
+
|
200
|
+
# Returns the object in the form of hash
|
201
|
+
# @return [Hash] Returns the object in the form of hash
|
202
|
+
def to_hash
|
203
|
+
hash = {}
|
204
|
+
self.class.attribute_map.each_pair do |attr, param|
|
205
|
+
value = self.send(attr)
|
206
|
+
next if value.nil?
|
207
|
+
hash[param] = _to_hash(value)
|
208
|
+
end
|
209
|
+
hash
|
210
|
+
end
|
211
|
+
|
212
|
+
# Outputs non-array value in the form of hash
|
213
|
+
# For object, use to_hash. Otherwise, just return the value
|
214
|
+
# @param [Object] value Any valid value
|
215
|
+
# @return [Hash] Returns the value in the form of hash
|
216
|
+
def _to_hash(value)
|
217
|
+
if value.is_a?(Array)
|
218
|
+
value.compact.map{ |v| _to_hash(v) }
|
219
|
+
elsif value.is_a?(Hash)
|
220
|
+
{}.tap do |hash|
|
221
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
222
|
+
end
|
223
|
+
elsif value.respond_to? :to_hash
|
224
|
+
value.to_hash
|
225
|
+
else
|
226
|
+
value
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
end
|
231
|
+
|
232
|
+
end
|
@@ -27,6 +27,12 @@ module Wallee
|
|
27
27
|
#
|
28
28
|
attr_accessor :data_collection_type
|
29
29
|
|
30
|
+
#
|
31
|
+
attr_accessor :deprecated
|
32
|
+
|
33
|
+
#
|
34
|
+
attr_accessor :deprecation_reason
|
35
|
+
|
30
36
|
#
|
31
37
|
attr_accessor :description
|
32
38
|
|
@@ -62,6 +68,8 @@ module Wallee
|
|
62
68
|
def self.attribute_map
|
63
69
|
{
|
64
70
|
:'data_collection_type' => :'dataCollectionType',
|
71
|
+
:'deprecated' => :'deprecated',
|
72
|
+
:'deprecation_reason' => :'deprecationReason',
|
65
73
|
:'description' => :'description',
|
66
74
|
:'feature' => :'feature',
|
67
75
|
:'id' => :'id',
|
@@ -79,6 +87,8 @@ module Wallee
|
|
79
87
|
def self.swagger_types
|
80
88
|
{
|
81
89
|
:'data_collection_type' => :'DataCollectionType',
|
90
|
+
:'deprecated' => :'BOOLEAN',
|
91
|
+
:'deprecation_reason' => :'Hash<String, String>',
|
82
92
|
:'description' => :'Hash<String, String>',
|
83
93
|
:'feature' => :'Feature',
|
84
94
|
:'id' => :'Integer',
|
@@ -104,6 +114,16 @@ module Wallee
|
|
104
114
|
self.data_collection_type = attributes[:'dataCollectionType']
|
105
115
|
end
|
106
116
|
|
117
|
+
if attributes.has_key?(:'deprecated')
|
118
|
+
self.deprecated = attributes[:'deprecated']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.has_key?(:'deprecationReason')
|
122
|
+
if (value = attributes[:'deprecationReason']).is_a?(Array)
|
123
|
+
self.deprecation_reason = value
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
107
127
|
if attributes.has_key?(:'description')
|
108
128
|
if (value = attributes[:'description']).is_a?(Array)
|
109
129
|
self.description = value
|
@@ -173,6 +193,8 @@ module Wallee
|
|
173
193
|
return true if self.equal?(o)
|
174
194
|
self.class == o.class &&
|
175
195
|
data_collection_type == o.data_collection_type &&
|
196
|
+
deprecated == o.deprecated &&
|
197
|
+
deprecation_reason == o.deprecation_reason &&
|
176
198
|
description == o.description &&
|
177
199
|
feature == o.feature &&
|
178
200
|
id == o.id &&
|
@@ -194,7 +216,7 @@ module Wallee
|
|
194
216
|
# Calculates hash code according to all attributes.
|
195
217
|
# @return [Fixnum] Hash code
|
196
218
|
def hash
|
197
|
-
[data_collection_type, description, feature, id, name, payment_method, payment_method_brand, primary_risk_taker, processor, supported_customers_presences, supported_features].hash
|
219
|
+
[data_collection_type, deprecated, deprecation_reason, description, feature, id, name, payment_method, payment_method_brand, primary_risk_taker, processor, supported_customers_presences, supported_features].hash
|
198
220
|
end
|
199
221
|
|
200
222
|
# Builds the object from hash
|
@@ -0,0 +1,338 @@
|
|
1
|
+
=begin
|
2
|
+
Wallee API: 1.0.0
|
3
|
+
|
4
|
+
The wallee API allows an easy interaction with the wallee web service.
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
you may not use this file except in compliance with the License.
|
10
|
+
You may obtain a copy of the License at
|
11
|
+
|
12
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
|
14
|
+
Unless required by applicable law or agreed to in writing, software
|
15
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
See the License for the specific language governing permissions and
|
18
|
+
limitations under the License.
|
19
|
+
|
20
|
+
=end
|
21
|
+
|
22
|
+
require 'date'
|
23
|
+
|
24
|
+
module Wallee
|
25
|
+
#
|
26
|
+
class PaymentContract
|
27
|
+
#
|
28
|
+
attr_accessor :account
|
29
|
+
|
30
|
+
#
|
31
|
+
attr_accessor :activated_on
|
32
|
+
|
33
|
+
#
|
34
|
+
attr_accessor :contract_identifier
|
35
|
+
|
36
|
+
#
|
37
|
+
attr_accessor :contract_type
|
38
|
+
|
39
|
+
#
|
40
|
+
attr_accessor :created_by
|
41
|
+
|
42
|
+
# The created on date indicates the date on which the entity was stored into the database.
|
43
|
+
attr_accessor :created_on
|
44
|
+
|
45
|
+
# The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity.
|
46
|
+
attr_accessor :external_id
|
47
|
+
|
48
|
+
# The ID is the primary key of the entity. The ID identifies the entity uniquely.
|
49
|
+
attr_accessor :id
|
50
|
+
|
51
|
+
#
|
52
|
+
attr_accessor :rejected_on
|
53
|
+
|
54
|
+
#
|
55
|
+
attr_accessor :rejection_reason
|
56
|
+
|
57
|
+
#
|
58
|
+
attr_accessor :start_terminating_on
|
59
|
+
|
60
|
+
#
|
61
|
+
attr_accessor :state
|
62
|
+
|
63
|
+
#
|
64
|
+
attr_accessor :terminated_by
|
65
|
+
|
66
|
+
#
|
67
|
+
attr_accessor :terminated_on
|
68
|
+
|
69
|
+
# The version number indicates the version of the entity. The version is incremented whenever the entity is changed.
|
70
|
+
attr_accessor :version
|
71
|
+
|
72
|
+
|
73
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
74
|
+
def self.attribute_map
|
75
|
+
{
|
76
|
+
:'account' => :'account',
|
77
|
+
:'activated_on' => :'activatedOn',
|
78
|
+
:'contract_identifier' => :'contractIdentifier',
|
79
|
+
:'contract_type' => :'contractType',
|
80
|
+
:'created_by' => :'createdBy',
|
81
|
+
:'created_on' => :'createdOn',
|
82
|
+
:'external_id' => :'externalId',
|
83
|
+
:'id' => :'id',
|
84
|
+
:'rejected_on' => :'rejectedOn',
|
85
|
+
:'rejection_reason' => :'rejectionReason',
|
86
|
+
:'start_terminating_on' => :'startTerminatingOn',
|
87
|
+
:'state' => :'state',
|
88
|
+
:'terminated_by' => :'terminatedBy',
|
89
|
+
:'terminated_on' => :'terminatedOn',
|
90
|
+
:'version' => :'version'
|
91
|
+
}
|
92
|
+
end
|
93
|
+
|
94
|
+
# Attribute type mapping.
|
95
|
+
def self.swagger_types
|
96
|
+
{
|
97
|
+
:'account' => :'Account',
|
98
|
+
:'activated_on' => :'DateTime',
|
99
|
+
:'contract_identifier' => :'String',
|
100
|
+
:'contract_type' => :'PaymentContractType',
|
101
|
+
:'created_by' => :'User',
|
102
|
+
:'created_on' => :'DateTime',
|
103
|
+
:'external_id' => :'String',
|
104
|
+
:'id' => :'Integer',
|
105
|
+
:'rejected_on' => :'DateTime',
|
106
|
+
:'rejection_reason' => :'FailureReason',
|
107
|
+
:'start_terminating_on' => :'DateTime',
|
108
|
+
:'state' => :'PaymentContractState',
|
109
|
+
:'terminated_by' => :'User',
|
110
|
+
:'terminated_on' => :'DateTime',
|
111
|
+
:'version' => :'Integer'
|
112
|
+
}
|
113
|
+
end
|
114
|
+
|
115
|
+
# Initializes the object
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
117
|
+
def initialize(attributes = {})
|
118
|
+
return unless attributes.is_a?(Hash)
|
119
|
+
|
120
|
+
# convert string to symbol for hash key
|
121
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
122
|
+
|
123
|
+
if attributes.has_key?(:'account')
|
124
|
+
self.account = attributes[:'account']
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.has_key?(:'activatedOn')
|
128
|
+
self.activated_on = attributes[:'activatedOn']
|
129
|
+
end
|
130
|
+
|
131
|
+
if attributes.has_key?(:'contractIdentifier')
|
132
|
+
self.contract_identifier = attributes[:'contractIdentifier']
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.has_key?(:'contractType')
|
136
|
+
self.contract_type = attributes[:'contractType']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.has_key?(:'createdBy')
|
140
|
+
self.created_by = attributes[:'createdBy']
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.has_key?(:'createdOn')
|
144
|
+
self.created_on = attributes[:'createdOn']
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.has_key?(:'externalId')
|
148
|
+
self.external_id = attributes[:'externalId']
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.has_key?(:'id')
|
152
|
+
self.id = attributes[:'id']
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.has_key?(:'rejectedOn')
|
156
|
+
self.rejected_on = attributes[:'rejectedOn']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.has_key?(:'rejectionReason')
|
160
|
+
self.rejection_reason = attributes[:'rejectionReason']
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.has_key?(:'startTerminatingOn')
|
164
|
+
self.start_terminating_on = attributes[:'startTerminatingOn']
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.has_key?(:'state')
|
168
|
+
self.state = attributes[:'state']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.has_key?(:'terminatedBy')
|
172
|
+
self.terminated_by = attributes[:'terminatedBy']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.has_key?(:'terminatedOn')
|
176
|
+
self.terminated_on = attributes[:'terminatedOn']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.has_key?(:'version')
|
180
|
+
self.version = attributes[:'version']
|
181
|
+
end
|
182
|
+
|
183
|
+
end
|
184
|
+
|
185
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
186
|
+
# @return Array for valid properies with the reasons
|
187
|
+
def list_invalid_properties
|
188
|
+
invalid_properties = Array.new
|
189
|
+
return invalid_properties
|
190
|
+
end
|
191
|
+
|
192
|
+
# Check to see if the all the properties in the model are valid
|
193
|
+
# @return true if the model is valid
|
194
|
+
def valid?
|
195
|
+
return true
|
196
|
+
end
|
197
|
+
|
198
|
+
# Checks equality by comparing each attribute.
|
199
|
+
# @param [Object] Object to be compared
|
200
|
+
def ==(o)
|
201
|
+
return true if self.equal?(o)
|
202
|
+
self.class == o.class &&
|
203
|
+
account == o.account &&
|
204
|
+
activated_on == o.activated_on &&
|
205
|
+
contract_identifier == o.contract_identifier &&
|
206
|
+
contract_type == o.contract_type &&
|
207
|
+
created_by == o.created_by &&
|
208
|
+
created_on == o.created_on &&
|
209
|
+
external_id == o.external_id &&
|
210
|
+
id == o.id &&
|
211
|
+
rejected_on == o.rejected_on &&
|
212
|
+
rejection_reason == o.rejection_reason &&
|
213
|
+
start_terminating_on == o.start_terminating_on &&
|
214
|
+
state == o.state &&
|
215
|
+
terminated_by == o.terminated_by &&
|
216
|
+
terminated_on == o.terminated_on &&
|
217
|
+
version == o.version
|
218
|
+
end
|
219
|
+
|
220
|
+
# @see the `==` method
|
221
|
+
# @param [Object] Object to be compared
|
222
|
+
def eql?(o)
|
223
|
+
self == o
|
224
|
+
end
|
225
|
+
|
226
|
+
# Calculates hash code according to all attributes.
|
227
|
+
# @return [Fixnum] Hash code
|
228
|
+
def hash
|
229
|
+
[account, activated_on, contract_identifier, contract_type, created_by, created_on, external_id, id, rejected_on, rejection_reason, start_terminating_on, state, terminated_by, terminated_on, version].hash
|
230
|
+
end
|
231
|
+
|
232
|
+
# Builds the object from hash
|
233
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
234
|
+
# @return [Object] Returns the model itself
|
235
|
+
def build_from_hash(attributes)
|
236
|
+
return nil unless attributes.is_a?(Hash)
|
237
|
+
self.class.swagger_types.each_pair do |key, type|
|
238
|
+
if type =~ /\AArray<(.*)>/i
|
239
|
+
# check to ensure the input is an array given that the the attribute
|
240
|
+
# is documented as an array but the input is not
|
241
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
242
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
243
|
+
end
|
244
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
245
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
246
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
247
|
+
end
|
248
|
+
|
249
|
+
self
|
250
|
+
end
|
251
|
+
|
252
|
+
# Deserializes the data based on type
|
253
|
+
# @param string type Data type
|
254
|
+
# @param string value Value to be deserialized
|
255
|
+
# @return [Object] Deserialized data
|
256
|
+
def _deserialize(type, value)
|
257
|
+
case type.to_sym
|
258
|
+
when :DateTime
|
259
|
+
DateTime.parse(value)
|
260
|
+
when :Date
|
261
|
+
Date.parse(value)
|
262
|
+
when :String
|
263
|
+
value.to_s
|
264
|
+
when :Integer
|
265
|
+
value.to_i
|
266
|
+
when :Float
|
267
|
+
value.to_f
|
268
|
+
when :BOOLEAN
|
269
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
270
|
+
true
|
271
|
+
else
|
272
|
+
false
|
273
|
+
end
|
274
|
+
when :Object
|
275
|
+
# generic object (usually a Hash), return directly
|
276
|
+
value
|
277
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
278
|
+
inner_type = Regexp.last_match[:inner_type]
|
279
|
+
value.map { |v| _deserialize(inner_type, v) }
|
280
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
281
|
+
k_type = Regexp.last_match[:k_type]
|
282
|
+
v_type = Regexp.last_match[:v_type]
|
283
|
+
{}.tap do |hash|
|
284
|
+
value.each do |k, v|
|
285
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
286
|
+
end
|
287
|
+
end
|
288
|
+
else # model
|
289
|
+
temp_model = Wallee.const_get(type).new
|
290
|
+
temp_model.build_from_hash(value)
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
# Returns the string representation of the object
|
295
|
+
# @return [String] String presentation of the object
|
296
|
+
def to_s
|
297
|
+
to_hash.to_s
|
298
|
+
end
|
299
|
+
|
300
|
+
# to_body is an alias to to_hash (backward compatibility)
|
301
|
+
# @return [Hash] Returns the object in the form of hash
|
302
|
+
def to_body
|
303
|
+
to_hash
|
304
|
+
end
|
305
|
+
|
306
|
+
# Returns the object in the form of hash
|
307
|
+
# @return [Hash] Returns the object in the form of hash
|
308
|
+
def to_hash
|
309
|
+
hash = {}
|
310
|
+
self.class.attribute_map.each_pair do |attr, param|
|
311
|
+
value = self.send(attr)
|
312
|
+
next if value.nil?
|
313
|
+
hash[param] = _to_hash(value)
|
314
|
+
end
|
315
|
+
hash
|
316
|
+
end
|
317
|
+
|
318
|
+
# Outputs non-array value in the form of hash
|
319
|
+
# For object, use to_hash. Otherwise, just return the value
|
320
|
+
# @param [Object] value Any valid value
|
321
|
+
# @return [Hash] Returns the value in the form of hash
|
322
|
+
def _to_hash(value)
|
323
|
+
if value.is_a?(Array)
|
324
|
+
value.compact.map{ |v| _to_hash(v) }
|
325
|
+
elsif value.is_a?(Hash)
|
326
|
+
{}.tap do |hash|
|
327
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
328
|
+
end
|
329
|
+
elsif value.respond_to? :to_hash
|
330
|
+
value.to_hash
|
331
|
+
else
|
332
|
+
value
|
333
|
+
end
|
334
|
+
end
|
335
|
+
|
336
|
+
end
|
337
|
+
|
338
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
=begin
|
2
|
+
Wallee API: 1.0.0
|
3
|
+
|
4
|
+
The wallee API allows an easy interaction with the wallee web service.
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
you may not use this file except in compliance with the License.
|
10
|
+
You may obtain a copy of the License at
|
11
|
+
|
12
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
|
14
|
+
Unless required by applicable law or agreed to in writing, software
|
15
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
See the License for the specific language governing permissions and
|
18
|
+
limitations under the License.
|
19
|
+
|
20
|
+
=end
|
21
|
+
|
22
|
+
require 'date'
|
23
|
+
|
24
|
+
module Wallee
|
25
|
+
class PaymentContractState
|
26
|
+
|
27
|
+
PENDING = "PENDING".freeze
|
28
|
+
ACTIVE = "ACTIVE".freeze
|
29
|
+
TERMINATING = "TERMINATING".freeze
|
30
|
+
TERMINATED = "TERMINATED".freeze
|
31
|
+
REJECTED = "REJECTED".freeze
|
32
|
+
|
33
|
+
# Builds the object from hash
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
35
|
+
# @return [Object] Returns the model itself
|
36
|
+
def build_from_hash(value)
|
37
|
+
|
38
|
+
consantValues = PaymentContractState.constants.select{|c| c.to_s == value}
|
39
|
+
raise "Invalid ENUM value #{value} for class #PaymentContractState" if consantValues.empty?
|
40
|
+
|
41
|
+
value
|
42
|
+
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|