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.
Files changed (132) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +21 -11
  3. data/lib/wallee-ruby-sdk/models/abstract_debt_collection_case_update.rb +270 -0
  4. data/lib/wallee-ruby-sdk/models/abstract_payment_link_update.rb +302 -0
  5. data/lib/wallee-ruby-sdk/models/abstract_subscription_affiliate_update.rb +230 -0
  6. data/lib/wallee-ruby-sdk/models/abstract_transaction_pending.rb +14 -4
  7. data/lib/wallee-ruby-sdk/models/criteria_operator.rb +1 -0
  8. data/lib/wallee-ruby-sdk/models/debt_collection_case.rb +502 -0
  9. data/lib/wallee-ruby-sdk/models/debt_collection_case_create.rb +310 -0
  10. data/lib/wallee-ruby-sdk/models/debt_collection_case_document.rb +300 -0
  11. data/lib/wallee-ruby-sdk/models/debt_collection_case_source.rb +232 -0
  12. data/lib/wallee-ruby-sdk/models/debt_collection_case_state.rb +48 -0
  13. data/lib/wallee-ruby-sdk/models/debt_collection_case_update.rb +300 -0
  14. data/lib/wallee-ruby-sdk/models/debt_collection_environment.rb +43 -0
  15. data/lib/wallee-ruby-sdk/models/debt_collection_receipt.rb +288 -0
  16. data/lib/wallee-ruby-sdk/models/debt_collection_receipt_source.rb +222 -0
  17. data/lib/wallee-ruby-sdk/models/debt_collector.rb +222 -0
  18. data/lib/wallee-ruby-sdk/models/debt_collector_condition.rb +258 -0
  19. data/lib/wallee-ruby-sdk/models/debt_collector_condition_type.rb +222 -0
  20. data/lib/wallee-ruby-sdk/models/debt_collector_configuration.rb +302 -0
  21. data/lib/wallee-ruby-sdk/models/document_template_type.rb +1 -11
  22. data/lib/wallee-ruby-sdk/models/entity_export_request.rb +215 -0
  23. data/lib/wallee-ruby-sdk/models/entity_query.rb +1 -1
  24. data/lib/wallee-ruby-sdk/models/entity_query_order_by.rb +10 -0
  25. data/lib/wallee-ruby-sdk/models/environment.rb +43 -0
  26. data/lib/wallee-ruby-sdk/models/metric_usage.rb +232 -0
  27. data/lib/wallee-ruby-sdk/models/payment_connector.rb +23 -1
  28. data/lib/wallee-ruby-sdk/models/payment_contract.rb +338 -0
  29. data/lib/wallee-ruby-sdk/models/payment_contract_state.rb +46 -0
  30. data/lib/wallee-ruby-sdk/models/payment_contract_type.rb +232 -0
  31. data/lib/wallee-ruby-sdk/models/payment_link.rb +382 -0
  32. data/lib/wallee-ruby-sdk/models/payment_link_active.rb +342 -0
  33. data/lib/wallee-ruby-sdk/models/payment_link_create.rb +337 -0
  34. data/lib/wallee-ruby-sdk/models/payment_link_protection_mode.rb +43 -0
  35. data/lib/wallee-ruby-sdk/models/payment_link_update.rb +332 -0
  36. data/lib/wallee-ruby-sdk/models/payment_method.rb +13 -1
  37. data/lib/wallee-ruby-sdk/models/payment_processor_configuration.rb +11 -1
  38. data/lib/wallee-ruby-sdk/models/refund.rb +11 -1
  39. data/lib/wallee-ruby-sdk/models/rest_address_format.rb +234 -0
  40. data/lib/wallee-ruby-sdk/models/rest_address_format_field.rb +51 -0
  41. data/lib/wallee-ruby-sdk/models/rest_country.rb +11 -1
  42. data/lib/wallee-ruby-sdk/models/subscription.rb +11 -1
  43. data/lib/wallee-ruby-sdk/models/subscription_affiliate.rb +290 -0
  44. data/lib/wallee-ruby-sdk/models/subscription_affiliate_create.rb +255 -0
  45. data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleted.rb +290 -0
  46. data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleting.rb +290 -0
  47. data/lib/wallee-ruby-sdk/models/subscription_affiliate_inactive.rb +260 -0
  48. data/lib/wallee-ruby-sdk/models/subscription_affiliate_update.rb +260 -0
  49. data/lib/wallee-ruby-sdk/models/subscription_change_request.rb +2 -2
  50. data/lib/wallee-ruby-sdk/models/subscription_create_request.rb +2 -2
  51. data/lib/wallee-ruby-sdk/models/subscription_pending.rb +11 -1
  52. data/lib/wallee-ruby-sdk/models/tokenizationn_mode.rb +44 -0
  53. data/lib/wallee-ruby-sdk/models/transaction.rb +63 -3
  54. data/lib/wallee-ruby-sdk/models/transaction_create.rb +41 -1
  55. data/lib/wallee-ruby-sdk/models/transaction_environment_selection_strategy.rb +43 -0
  56. data/lib/wallee-ruby-sdk/models/transaction_invoice.rb +11 -1
  57. data/lib/wallee-ruby-sdk/models/transaction_pending.rb +11 -1
  58. data/lib/wallee-ruby-sdk/models/unencrypted_card_data.rb +228 -0
  59. data/lib/wallee-ruby-sdk/models/unencrypted_card_data_create.rb +233 -0
  60. data/lib/wallee-ruby-sdk/models/webhook_listener_entity.rb +1 -11
  61. data/lib/wallee-ruby-sdk/services/account_service_api.rb +2 -2
  62. data/lib/wallee-ruby-sdk/services/application_user_service_api.rb +2 -2
  63. data/lib/wallee-ruby-sdk/services/card_processing_service_api.rb +176 -0
  64. data/lib/wallee-ruby-sdk/services/charge_attempt_service_api.rb +2 -2
  65. data/lib/wallee-ruby-sdk/services/charge_flow_level_service_api.rb +4 -4
  66. data/lib/wallee-ruby-sdk/services/charge_flow_service_api.rb +6 -6
  67. data/lib/wallee-ruby-sdk/services/condition_type_service_api.rb +4 -4
  68. data/lib/wallee-ruby-sdk/services/country_service_api.rb +2 -2
  69. data/lib/wallee-ruby-sdk/services/country_state_service_api.rb +4 -4
  70. data/lib/wallee-ruby-sdk/services/currency_service_api.rb +2 -2
  71. data/lib/wallee-ruby-sdk/services/debt_collection_case_service_api.rb +800 -0
  72. data/lib/wallee-ruby-sdk/services/debt_collector_configuration_service_api.rb +217 -0
  73. data/lib/wallee-ruby-sdk/services/debt_collector_service_api.rb +143 -0
  74. data/lib/wallee-ruby-sdk/services/delivery_indication_service_api.rb +6 -6
  75. data/lib/wallee-ruby-sdk/services/document_template_service_api.rb +2 -2
  76. data/lib/wallee-ruby-sdk/services/document_template_type_service_api.rb +4 -4
  77. data/lib/wallee-ruby-sdk/services/human_user_service_api.rb +59 -2
  78. data/lib/wallee-ruby-sdk/services/installment_payment_service_api.rb +4 -4
  79. data/lib/wallee-ruby-sdk/services/installment_payment_slice_service_api.rb +2 -2
  80. data/lib/wallee-ruby-sdk/services/installment_plan_calculation_service_api.rb +2 -2
  81. data/lib/wallee-ruby-sdk/services/installment_plan_configuration_service_api.rb +2 -2
  82. data/lib/wallee-ruby-sdk/services/installment_plan_slice_configuration_service_api.rb +2 -2
  83. data/lib/wallee-ruby-sdk/services/label_description_group_service_api.rb +4 -4
  84. data/lib/wallee-ruby-sdk/services/label_description_service_api.rb +4 -4
  85. data/lib/wallee-ruby-sdk/services/language_service_api.rb +2 -2
  86. data/lib/wallee-ruby-sdk/services/legal_organization_form_service_api.rb +201 -0
  87. data/lib/wallee-ruby-sdk/services/manual_task_service_api.rb +2 -2
  88. data/lib/wallee-ruby-sdk/services/mertic_usage_service_api.rb +100 -0
  89. data/lib/wallee-ruby-sdk/services/payment_connector_configuration_service_api.rb +2 -2
  90. data/lib/wallee-ruby-sdk/services/payment_connector_service_api.rb +4 -4
  91. data/lib/wallee-ruby-sdk/services/payment_link_service_api.rb +402 -0
  92. data/lib/wallee-ruby-sdk/services/payment_method_configuration_service_api.rb +2 -2
  93. data/lib/wallee-ruby-sdk/services/payment_method_service_api.rb +4 -4
  94. data/lib/wallee-ruby-sdk/services/payment_processor_configuration_service_api.rb +2 -2
  95. data/lib/wallee-ruby-sdk/services/payment_processor_service_api.rb +4 -4
  96. data/lib/wallee-ruby-sdk/services/permission_service_api.rb +4 -4
  97. data/lib/wallee-ruby-sdk/services/refund_service_api.rb +10 -10
  98. data/lib/wallee-ruby-sdk/services/space_service_api.rb +2 -2
  99. data/lib/wallee-ruby-sdk/services/static_value_service_api.rb +4 -4
  100. data/lib/wallee-ruby-sdk/services/subscriber_service_api.rb +2 -2
  101. data/lib/wallee-ruby-sdk/services/subscription_affiliate_service_api.rb +402 -0
  102. data/lib/wallee-ruby-sdk/services/subscription_charge_service_api.rb +4 -4
  103. data/lib/wallee-ruby-sdk/services/subscription_ledger_entry_service_api.rb +2 -2
  104. data/lib/wallee-ruby-sdk/services/subscription_metric_service_api.rb +2 -2
  105. data/lib/wallee-ruby-sdk/services/subscription_metric_usage_service_api.rb +2 -2
  106. data/lib/wallee-ruby-sdk/services/subscription_period_bill_service_api.rb +2 -2
  107. data/lib/wallee-ruby-sdk/services/subscription_product_component_group_service_api.rb +2 -2
  108. data/lib/wallee-ruby-sdk/services/subscription_product_component_service_api.rb +2 -2
  109. data/lib/wallee-ruby-sdk/services/subscription_product_fee_tier_service_api.rb +2 -2
  110. data/lib/wallee-ruby-sdk/services/subscription_product_metered_fee_service_api.rb +2 -2
  111. data/lib/wallee-ruby-sdk/services/subscription_product_period_fee_service_api.rb +2 -2
  112. data/lib/wallee-ruby-sdk/services/subscription_product_retirement_service_api.rb +2 -2
  113. data/lib/wallee-ruby-sdk/services/subscription_product_service_api.rb +2 -2
  114. data/lib/wallee-ruby-sdk/services/subscription_product_setup_fee_service_api.rb +2 -2
  115. data/lib/wallee-ruby-sdk/services/subscription_product_version_retirement_service_api.rb +2 -2
  116. data/lib/wallee-ruby-sdk/services/subscription_product_version_service_api.rb +2 -2
  117. data/lib/wallee-ruby-sdk/services/subscription_service_api.rb +12 -12
  118. data/lib/wallee-ruby-sdk/services/subscription_suspension_service_api.rb +2 -2
  119. data/lib/wallee-ruby-sdk/services/subscription_version_service_api.rb +2 -2
  120. data/lib/wallee-ruby-sdk/services/token_service_api.rb +2 -2
  121. data/lib/wallee-ruby-sdk/services/token_version_service_api.rb +4 -4
  122. data/lib/wallee-ruby-sdk/services/transaction_completion_service_api.rb +6 -6
  123. data/lib/wallee-ruby-sdk/services/transaction_invoice_service_api.rb +6 -6
  124. data/lib/wallee-ruby-sdk/services/transaction_service_api.rb +143 -18
  125. data/lib/wallee-ruby-sdk/services/transaction_void_service_api.rb +6 -6
  126. data/lib/wallee-ruby-sdk/services/user_account_role_service_api.rb +6 -6
  127. data/lib/wallee-ruby-sdk/services/user_space_role_service_api.rb +9 -9
  128. data/lib/wallee-ruby-sdk/services/webhook_listener_service_api.rb +2 -2
  129. data/lib/wallee-ruby-sdk/services/webhook_url_service_api.rb +2 -2
  130. data/lib/wallee-ruby-sdk/version.rb +1 -1
  131. data/lib/wallee-ruby-sdk.rb +47 -0
  132. metadata +50 -3
@@ -0,0 +1,222 @@
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 debt collector connects to an external service to process the debt collection case and as such directs the debt collection process.
26
+ class DebtCollector
27
+ #
28
+ attr_accessor :description
29
+
30
+ # The ID is the primary key of the entity. The ID identifies the entity uniquely.
31
+ attr_accessor :id
32
+
33
+ #
34
+ attr_accessor :name
35
+
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'description' => :'description',
41
+ :'id' => :'id',
42
+ :'name' => :'name'
43
+ }
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.swagger_types
48
+ {
49
+ :'description' => :'Hash<String, String>',
50
+ :'id' => :'Integer',
51
+ :'name' => :'Hash<String, String>'
52
+ }
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ return unless attributes.is_a?(Hash)
59
+
60
+ # convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
62
+
63
+ if attributes.has_key?(:'description')
64
+ if (value = attributes[:'description']).is_a?(Array)
65
+ self.description = value
66
+ end
67
+ end
68
+
69
+ if attributes.has_key?(:'id')
70
+ self.id = attributes[:'id']
71
+ end
72
+
73
+ if attributes.has_key?(:'name')
74
+ if (value = attributes[:'name']).is_a?(Array)
75
+ self.name = value
76
+ end
77
+ end
78
+
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properies with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ return invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ return true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ description == o.description &&
100
+ id == o.id &&
101
+ name == o.name
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Fixnum] Hash code
112
+ def hash
113
+ [description, id, name].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ self.class.swagger_types.each_pair do |key, type|
122
+ if type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the the attribute
124
+ # is documented as an array but the input is not
125
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
126
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
127
+ end
128
+ elsif !attributes[self.class.attribute_map[key]].nil?
129
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :DateTime
143
+ DateTime.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :String
147
+ value.to_s
148
+ when :Integer
149
+ value.to_i
150
+ when :Float
151
+ value.to_f
152
+ when :BOOLEAN
153
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
+ true
155
+ else
156
+ false
157
+ end
158
+ when :Object
159
+ # generic object (usually a Hash), return directly
160
+ value
161
+ when /\AArray<(?<inner_type>.+)>\z/
162
+ inner_type = Regexp.last_match[:inner_type]
163
+ value.map { |v| _deserialize(inner_type, v) }
164
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
+ k_type = Regexp.last_match[:k_type]
166
+ v_type = Regexp.last_match[:v_type]
167
+ {}.tap do |hash|
168
+ value.each do |k, v|
169
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
+ end
171
+ end
172
+ else # model
173
+ temp_model = Wallee.const_get(type).new
174
+ temp_model.build_from_hash(value)
175
+ end
176
+ end
177
+
178
+ # Returns the string representation of the object
179
+ # @return [String] String presentation of the object
180
+ def to_s
181
+ to_hash.to_s
182
+ end
183
+
184
+ # to_body is an alias to to_hash (backward compatibility)
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_body
187
+ to_hash
188
+ end
189
+
190
+ # Returns the object in the form of hash
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_hash
193
+ hash = {}
194
+ self.class.attribute_map.each_pair do |attr, param|
195
+ value = self.send(attr)
196
+ next if value.nil?
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ # Outputs non-array value in the form of hash
203
+ # For object, use to_hash. Otherwise, just return the value
204
+ # @param [Object] value Any valid value
205
+ # @return [Hash] Returns the value in the form of hash
206
+ def _to_hash(value)
207
+ if value.is_a?(Array)
208
+ value.compact.map{ |v| _to_hash(v) }
209
+ elsif value.is_a?(Hash)
210
+ {}.tap do |hash|
211
+ value.each { |k, v| hash[k] = _to_hash(v) }
212
+ end
213
+ elsif value.respond_to? :to_hash
214
+ value.to_hash
215
+ else
216
+ value
217
+ end
218
+ end
219
+
220
+ end
221
+
222
+ end
@@ -0,0 +1,258 @@
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
+ # A condition controls under which circumstances a collector configuration is applied to a debt collection case.
26
+ class DebtCollectorCondition
27
+ # The ID is the primary key of the entity. The ID identifies the entity uniquely.
28
+ attr_accessor :id
29
+
30
+ # The linked space id holds the ID of the space to which the entity belongs to.
31
+ attr_accessor :linked_space_id
32
+
33
+ # The condition name is used internally to identify the condition. For example the name is used within search fields and hence it should be distinct and descriptive.
34
+ attr_accessor :name
35
+
36
+ # The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed.
37
+ attr_accessor :planned_purge_date
38
+
39
+ #
40
+ attr_accessor :state
41
+
42
+ # The condition type determines the condition realization.
43
+ attr_accessor :type
44
+
45
+ # The version number indicates the version of the entity. The version is incremented whenever the entity is changed.
46
+ attr_accessor :version
47
+
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'id' => :'id',
53
+ :'linked_space_id' => :'linkedSpaceId',
54
+ :'name' => :'name',
55
+ :'planned_purge_date' => :'plannedPurgeDate',
56
+ :'state' => :'state',
57
+ :'type' => :'type',
58
+ :'version' => :'version'
59
+ }
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.swagger_types
64
+ {
65
+ :'id' => :'Integer',
66
+ :'linked_space_id' => :'Integer',
67
+ :'name' => :'String',
68
+ :'planned_purge_date' => :'DateTime',
69
+ :'state' => :'CreationEntityState',
70
+ :'type' => :'Integer',
71
+ :'version' => :'Integer'
72
+ }
73
+ end
74
+
75
+ # Initializes the object
76
+ # @param [Hash] attributes Model attributes in the form of hash
77
+ def initialize(attributes = {})
78
+ return unless attributes.is_a?(Hash)
79
+
80
+ # convert string to symbol for hash key
81
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
82
+
83
+ if attributes.has_key?(:'id')
84
+ self.id = attributes[:'id']
85
+ end
86
+
87
+ if attributes.has_key?(:'linkedSpaceId')
88
+ self.linked_space_id = attributes[:'linkedSpaceId']
89
+ end
90
+
91
+ if attributes.has_key?(:'name')
92
+ self.name = attributes[:'name']
93
+ end
94
+
95
+ if attributes.has_key?(:'plannedPurgeDate')
96
+ self.planned_purge_date = attributes[:'plannedPurgeDate']
97
+ end
98
+
99
+ if attributes.has_key?(:'state')
100
+ self.state = attributes[:'state']
101
+ end
102
+
103
+ if attributes.has_key?(:'type')
104
+ self.type = attributes[:'type']
105
+ end
106
+
107
+ if attributes.has_key?(:'version')
108
+ self.version = attributes[:'version']
109
+ end
110
+
111
+ end
112
+
113
+ # Show invalid properties with the reasons. Usually used together with valid?
114
+ # @return Array for valid properies with the reasons
115
+ def list_invalid_properties
116
+ invalid_properties = Array.new
117
+ return invalid_properties
118
+ end
119
+
120
+ # Check to see if the all the properties in the model are valid
121
+ # @return true if the model is valid
122
+ def valid?
123
+ return true
124
+ end
125
+
126
+ # Checks equality by comparing each attribute.
127
+ # @param [Object] Object to be compared
128
+ def ==(o)
129
+ return true if self.equal?(o)
130
+ self.class == o.class &&
131
+ id == o.id &&
132
+ linked_space_id == o.linked_space_id &&
133
+ name == o.name &&
134
+ planned_purge_date == o.planned_purge_date &&
135
+ state == o.state &&
136
+ type == o.type &&
137
+ version == o.version
138
+ end
139
+
140
+ # @see the `==` method
141
+ # @param [Object] Object to be compared
142
+ def eql?(o)
143
+ self == o
144
+ end
145
+
146
+ # Calculates hash code according to all attributes.
147
+ # @return [Fixnum] Hash code
148
+ def hash
149
+ [id, linked_space_id, name, planned_purge_date, state, type, version].hash
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ self.class.swagger_types.each_pair do |key, type|
158
+ if type =~ /\AArray<(.*)>/i
159
+ # check to ensure the input is an array given that the the attribute
160
+ # is documented as an array but the input is not
161
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
162
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
163
+ end
164
+ elsif !attributes[self.class.attribute_map[key]].nil?
165
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
166
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
167
+ end
168
+
169
+ self
170
+ end
171
+
172
+ # Deserializes the data based on type
173
+ # @param string type Data type
174
+ # @param string value Value to be deserialized
175
+ # @return [Object] Deserialized data
176
+ def _deserialize(type, value)
177
+ case type.to_sym
178
+ when :DateTime
179
+ DateTime.parse(value)
180
+ when :Date
181
+ Date.parse(value)
182
+ when :String
183
+ value.to_s
184
+ when :Integer
185
+ value.to_i
186
+ when :Float
187
+ value.to_f
188
+ when :BOOLEAN
189
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
190
+ true
191
+ else
192
+ false
193
+ end
194
+ when :Object
195
+ # generic object (usually a Hash), return directly
196
+ value
197
+ when /\AArray<(?<inner_type>.+)>\z/
198
+ inner_type = Regexp.last_match[:inner_type]
199
+ value.map { |v| _deserialize(inner_type, v) }
200
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
201
+ k_type = Regexp.last_match[:k_type]
202
+ v_type = Regexp.last_match[:v_type]
203
+ {}.tap do |hash|
204
+ value.each do |k, v|
205
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
206
+ end
207
+ end
208
+ else # model
209
+ temp_model = Wallee.const_get(type).new
210
+ temp_model.build_from_hash(value)
211
+ end
212
+ end
213
+
214
+ # Returns the string representation of the object
215
+ # @return [String] String presentation of the object
216
+ def to_s
217
+ to_hash.to_s
218
+ end
219
+
220
+ # to_body is an alias to to_hash (backward compatibility)
221
+ # @return [Hash] Returns the object in the form of hash
222
+ def to_body
223
+ to_hash
224
+ end
225
+
226
+ # Returns the object in the form of hash
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_hash
229
+ hash = {}
230
+ self.class.attribute_map.each_pair do |attr, param|
231
+ value = self.send(attr)
232
+ next if value.nil?
233
+ hash[param] = _to_hash(value)
234
+ end
235
+ hash
236
+ end
237
+
238
+ # Outputs non-array value in the form of hash
239
+ # For object, use to_hash. Otherwise, just return the value
240
+ # @param [Object] value Any valid value
241
+ # @return [Hash] Returns the value in the form of hash
242
+ def _to_hash(value)
243
+ if value.is_a?(Array)
244
+ value.compact.map{ |v| _to_hash(v) }
245
+ elsif value.is_a?(Hash)
246
+ {}.tap do |hash|
247
+ value.each { |k, v| hash[k] = _to_hash(v) }
248
+ end
249
+ elsif value.respond_to? :to_hash
250
+ value.to_hash
251
+ else
252
+ value
253
+ end
254
+ end
255
+
256
+ end
257
+
258
+ end
@@ -0,0 +1,222 @@
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 debt collection condition type controls how a condition is applied to a case.
26
+ class DebtCollectorConditionType
27
+ #
28
+ attr_accessor :description
29
+
30
+ # The ID is the primary key of the entity. The ID identifies the entity uniquely.
31
+ attr_accessor :id
32
+
33
+ #
34
+ attr_accessor :name
35
+
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'description' => :'description',
41
+ :'id' => :'id',
42
+ :'name' => :'name'
43
+ }
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.swagger_types
48
+ {
49
+ :'description' => :'Hash<String, String>',
50
+ :'id' => :'Integer',
51
+ :'name' => :'Hash<String, String>'
52
+ }
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ return unless attributes.is_a?(Hash)
59
+
60
+ # convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
62
+
63
+ if attributes.has_key?(:'description')
64
+ if (value = attributes[:'description']).is_a?(Array)
65
+ self.description = value
66
+ end
67
+ end
68
+
69
+ if attributes.has_key?(:'id')
70
+ self.id = attributes[:'id']
71
+ end
72
+
73
+ if attributes.has_key?(:'name')
74
+ if (value = attributes[:'name']).is_a?(Array)
75
+ self.name = value
76
+ end
77
+ end
78
+
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properies with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ return invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ return true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ description == o.description &&
100
+ id == o.id &&
101
+ name == o.name
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Fixnum] Hash code
112
+ def hash
113
+ [description, id, name].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ self.class.swagger_types.each_pair do |key, type|
122
+ if type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the the attribute
124
+ # is documented as an array but the input is not
125
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
126
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
127
+ end
128
+ elsif !attributes[self.class.attribute_map[key]].nil?
129
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :DateTime
143
+ DateTime.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :String
147
+ value.to_s
148
+ when :Integer
149
+ value.to_i
150
+ when :Float
151
+ value.to_f
152
+ when :BOOLEAN
153
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
+ true
155
+ else
156
+ false
157
+ end
158
+ when :Object
159
+ # generic object (usually a Hash), return directly
160
+ value
161
+ when /\AArray<(?<inner_type>.+)>\z/
162
+ inner_type = Regexp.last_match[:inner_type]
163
+ value.map { |v| _deserialize(inner_type, v) }
164
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
+ k_type = Regexp.last_match[:k_type]
166
+ v_type = Regexp.last_match[:v_type]
167
+ {}.tap do |hash|
168
+ value.each do |k, v|
169
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
+ end
171
+ end
172
+ else # model
173
+ temp_model = Wallee.const_get(type).new
174
+ temp_model.build_from_hash(value)
175
+ end
176
+ end
177
+
178
+ # Returns the string representation of the object
179
+ # @return [String] String presentation of the object
180
+ def to_s
181
+ to_hash.to_s
182
+ end
183
+
184
+ # to_body is an alias to to_hash (backward compatibility)
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_body
187
+ to_hash
188
+ end
189
+
190
+ # Returns the object in the form of hash
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_hash
193
+ hash = {}
194
+ self.class.attribute_map.each_pair do |attr, param|
195
+ value = self.send(attr)
196
+ next if value.nil?
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ # Outputs non-array value in the form of hash
203
+ # For object, use to_hash. Otherwise, just return the value
204
+ # @param [Object] value Any valid value
205
+ # @return [Hash] Returns the value in the form of hash
206
+ def _to_hash(value)
207
+ if value.is_a?(Array)
208
+ value.compact.map{ |v| _to_hash(v) }
209
+ elsif value.is_a?(Hash)
210
+ {}.tap do |hash|
211
+ value.each { |k, v| hash[k] = _to_hash(v) }
212
+ end
213
+ elsif value.respond_to? :to_hash
214
+ value.to_hash
215
+ else
216
+ value
217
+ end
218
+ end
219
+
220
+ end
221
+
222
+ end