wallee-ruby-sdk 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +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,302 @@
|
|
|
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 configuration defines the behavior of the collection process for a particular collector.
|
|
26
|
+
class DebtCollectorConfiguration
|
|
27
|
+
# The collector handles the debt collection case based on the settings of this configuration.
|
|
28
|
+
attr_accessor :collector
|
|
29
|
+
|
|
30
|
+
# The conditions applied to the collector configuration restricts the application of this configuration onto a particular debt collection case.
|
|
31
|
+
attr_accessor :conditions
|
|
32
|
+
|
|
33
|
+
# The collector configuration is only enabled for the selected space views. In case the set is empty the collector configuration is enabled for all space views.
|
|
34
|
+
attr_accessor :enabled_space_views
|
|
35
|
+
|
|
36
|
+
# The ID is the primary key of the entity. The ID identifies the entity uniquely.
|
|
37
|
+
attr_accessor :id
|
|
38
|
+
|
|
39
|
+
# The linked space id holds the ID of the space to which the entity belongs to.
|
|
40
|
+
attr_accessor :linked_space_id
|
|
41
|
+
|
|
42
|
+
# The collector configuration name is used internally to identify a specific collector configuration. For example the name is used within search fields and hence it should be distinct and descriptive.
|
|
43
|
+
attr_accessor :name
|
|
44
|
+
|
|
45
|
+
# The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed.
|
|
46
|
+
attr_accessor :planned_purge_date
|
|
47
|
+
|
|
48
|
+
# The priority defines the order in which the collector configuration is tried to be applied onto a debt collection case. The higher the value the less likely the configuration is applied on a case.
|
|
49
|
+
attr_accessor :priority
|
|
50
|
+
|
|
51
|
+
# When the review is skipped there will be no review for cases which use this configuration.
|
|
52
|
+
attr_accessor :skip_review_enabled
|
|
53
|
+
|
|
54
|
+
#
|
|
55
|
+
attr_accessor :state
|
|
56
|
+
|
|
57
|
+
# The version number indicates the version of the entity. The version is incremented whenever the entity is changed.
|
|
58
|
+
attr_accessor :version
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
62
|
+
def self.attribute_map
|
|
63
|
+
{
|
|
64
|
+
:'collector' => :'collector',
|
|
65
|
+
:'conditions' => :'conditions',
|
|
66
|
+
:'enabled_space_views' => :'enabledSpaceViews',
|
|
67
|
+
:'id' => :'id',
|
|
68
|
+
:'linked_space_id' => :'linkedSpaceId',
|
|
69
|
+
:'name' => :'name',
|
|
70
|
+
:'planned_purge_date' => :'plannedPurgeDate',
|
|
71
|
+
:'priority' => :'priority',
|
|
72
|
+
:'skip_review_enabled' => :'skipReviewEnabled',
|
|
73
|
+
:'state' => :'state',
|
|
74
|
+
:'version' => :'version'
|
|
75
|
+
}
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Attribute type mapping.
|
|
79
|
+
def self.swagger_types
|
|
80
|
+
{
|
|
81
|
+
:'collector' => :'Integer',
|
|
82
|
+
:'conditions' => :'Array<Integer>',
|
|
83
|
+
:'enabled_space_views' => :'Array<Integer>',
|
|
84
|
+
:'id' => :'Integer',
|
|
85
|
+
:'linked_space_id' => :'Integer',
|
|
86
|
+
:'name' => :'String',
|
|
87
|
+
:'planned_purge_date' => :'DateTime',
|
|
88
|
+
:'priority' => :'Integer',
|
|
89
|
+
:'skip_review_enabled' => :'BOOLEAN',
|
|
90
|
+
:'state' => :'CreationEntityState',
|
|
91
|
+
:'version' => :'Integer'
|
|
92
|
+
}
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Initializes the object
|
|
96
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
97
|
+
def initialize(attributes = {})
|
|
98
|
+
return unless attributes.is_a?(Hash)
|
|
99
|
+
|
|
100
|
+
# convert string to symbol for hash key
|
|
101
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
102
|
+
|
|
103
|
+
if attributes.has_key?(:'collector')
|
|
104
|
+
self.collector = attributes[:'collector']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.has_key?(:'conditions')
|
|
108
|
+
if (value = attributes[:'conditions']).is_a?(Array)
|
|
109
|
+
self.conditions = value
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.has_key?(:'enabledSpaceViews')
|
|
114
|
+
if (value = attributes[:'enabledSpaceViews']).is_a?(Array)
|
|
115
|
+
self.enabled_space_views = value
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.has_key?(:'id')
|
|
120
|
+
self.id = attributes[:'id']
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.has_key?(:'linkedSpaceId')
|
|
124
|
+
self.linked_space_id = attributes[:'linkedSpaceId']
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.has_key?(:'name')
|
|
128
|
+
self.name = attributes[:'name']
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.has_key?(:'plannedPurgeDate')
|
|
132
|
+
self.planned_purge_date = attributes[:'plannedPurgeDate']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.has_key?(:'priority')
|
|
136
|
+
self.priority = attributes[:'priority']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.has_key?(:'skipReviewEnabled')
|
|
140
|
+
self.skip_review_enabled = attributes[:'skipReviewEnabled']
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.has_key?(:'state')
|
|
144
|
+
self.state = attributes[:'state']
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.has_key?(:'version')
|
|
148
|
+
self.version = attributes[:'version']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
154
|
+
# @return Array for valid properies with the reasons
|
|
155
|
+
def list_invalid_properties
|
|
156
|
+
invalid_properties = Array.new
|
|
157
|
+
return invalid_properties
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Check to see if the all the properties in the model are valid
|
|
161
|
+
# @return true if the model is valid
|
|
162
|
+
def valid?
|
|
163
|
+
return true
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Checks equality by comparing each attribute.
|
|
167
|
+
# @param [Object] Object to be compared
|
|
168
|
+
def ==(o)
|
|
169
|
+
return true if self.equal?(o)
|
|
170
|
+
self.class == o.class &&
|
|
171
|
+
collector == o.collector &&
|
|
172
|
+
conditions == o.conditions &&
|
|
173
|
+
enabled_space_views == o.enabled_space_views &&
|
|
174
|
+
id == o.id &&
|
|
175
|
+
linked_space_id == o.linked_space_id &&
|
|
176
|
+
name == o.name &&
|
|
177
|
+
planned_purge_date == o.planned_purge_date &&
|
|
178
|
+
priority == o.priority &&
|
|
179
|
+
skip_review_enabled == o.skip_review_enabled &&
|
|
180
|
+
state == o.state &&
|
|
181
|
+
version == o.version
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# @see the `==` method
|
|
185
|
+
# @param [Object] Object to be compared
|
|
186
|
+
def eql?(o)
|
|
187
|
+
self == o
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Calculates hash code according to all attributes.
|
|
191
|
+
# @return [Fixnum] Hash code
|
|
192
|
+
def hash
|
|
193
|
+
[collector, conditions, enabled_space_views, id, linked_space_id, name, planned_purge_date, priority, skip_review_enabled, state, version].hash
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Builds the object from hash
|
|
197
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
198
|
+
# @return [Object] Returns the model itself
|
|
199
|
+
def build_from_hash(attributes)
|
|
200
|
+
return nil unless attributes.is_a?(Hash)
|
|
201
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
202
|
+
if type =~ /\AArray<(.*)>/i
|
|
203
|
+
# check to ensure the input is an array given that the the attribute
|
|
204
|
+
# is documented as an array but the input is not
|
|
205
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
206
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
207
|
+
end
|
|
208
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
209
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
210
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
self
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Deserializes the data based on type
|
|
217
|
+
# @param string type Data type
|
|
218
|
+
# @param string value Value to be deserialized
|
|
219
|
+
# @return [Object] Deserialized data
|
|
220
|
+
def _deserialize(type, value)
|
|
221
|
+
case type.to_sym
|
|
222
|
+
when :DateTime
|
|
223
|
+
DateTime.parse(value)
|
|
224
|
+
when :Date
|
|
225
|
+
Date.parse(value)
|
|
226
|
+
when :String
|
|
227
|
+
value.to_s
|
|
228
|
+
when :Integer
|
|
229
|
+
value.to_i
|
|
230
|
+
when :Float
|
|
231
|
+
value.to_f
|
|
232
|
+
when :BOOLEAN
|
|
233
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
234
|
+
true
|
|
235
|
+
else
|
|
236
|
+
false
|
|
237
|
+
end
|
|
238
|
+
when :Object
|
|
239
|
+
# generic object (usually a Hash), return directly
|
|
240
|
+
value
|
|
241
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
242
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
243
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
244
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
245
|
+
k_type = Regexp.last_match[:k_type]
|
|
246
|
+
v_type = Regexp.last_match[:v_type]
|
|
247
|
+
{}.tap do |hash|
|
|
248
|
+
value.each do |k, v|
|
|
249
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
else # model
|
|
253
|
+
temp_model = Wallee.const_get(type).new
|
|
254
|
+
temp_model.build_from_hash(value)
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Returns the string representation of the object
|
|
259
|
+
# @return [String] String presentation of the object
|
|
260
|
+
def to_s
|
|
261
|
+
to_hash.to_s
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
265
|
+
# @return [Hash] Returns the object in the form of hash
|
|
266
|
+
def to_body
|
|
267
|
+
to_hash
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# Returns the object in the form of hash
|
|
271
|
+
# @return [Hash] Returns the object in the form of hash
|
|
272
|
+
def to_hash
|
|
273
|
+
hash = {}
|
|
274
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
275
|
+
value = self.send(attr)
|
|
276
|
+
next if value.nil?
|
|
277
|
+
hash[param] = _to_hash(value)
|
|
278
|
+
end
|
|
279
|
+
hash
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
# Outputs non-array value in the form of hash
|
|
283
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
284
|
+
# @param [Object] value Any valid value
|
|
285
|
+
# @return [Hash] Returns the value in the form of hash
|
|
286
|
+
def _to_hash(value)
|
|
287
|
+
if value.is_a?(Array)
|
|
288
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
289
|
+
elsif value.is_a?(Hash)
|
|
290
|
+
{}.tap do |hash|
|
|
291
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
292
|
+
end
|
|
293
|
+
elsif value.respond_to? :to_hash
|
|
294
|
+
value.to_hash
|
|
295
|
+
else
|
|
296
|
+
value
|
|
297
|
+
end
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
end
|
|
@@ -33,9 +33,6 @@ module Wallee
|
|
|
33
33
|
# The ID is the primary key of the entity. The ID identifies the entity uniquely.
|
|
34
34
|
attr_accessor :id
|
|
35
35
|
|
|
36
|
-
#
|
|
37
|
-
attr_accessor :template_resource
|
|
38
|
-
|
|
39
36
|
#
|
|
40
37
|
attr_accessor :title
|
|
41
38
|
|
|
@@ -46,7 +43,6 @@ module Wallee
|
|
|
46
43
|
:'description' => :'description',
|
|
47
44
|
:'feature' => :'feature',
|
|
48
45
|
:'id' => :'id',
|
|
49
|
-
:'template_resource' => :'templateResource',
|
|
50
46
|
:'title' => :'title'
|
|
51
47
|
}
|
|
52
48
|
end
|
|
@@ -57,7 +53,6 @@ module Wallee
|
|
|
57
53
|
:'description' => :'Hash<String, String>',
|
|
58
54
|
:'feature' => :'Integer',
|
|
59
55
|
:'id' => :'Integer',
|
|
60
|
-
:'template_resource' => :'String',
|
|
61
56
|
:'title' => :'Hash<String, String>'
|
|
62
57
|
}
|
|
63
58
|
end
|
|
@@ -84,10 +79,6 @@ module Wallee
|
|
|
84
79
|
self.id = attributes[:'id']
|
|
85
80
|
end
|
|
86
81
|
|
|
87
|
-
if attributes.has_key?(:'templateResource')
|
|
88
|
-
self.template_resource = attributes[:'templateResource']
|
|
89
|
-
end
|
|
90
|
-
|
|
91
82
|
if attributes.has_key?(:'title')
|
|
92
83
|
if (value = attributes[:'title']).is_a?(Array)
|
|
93
84
|
self.title = value
|
|
@@ -117,7 +108,6 @@ module Wallee
|
|
|
117
108
|
description == o.description &&
|
|
118
109
|
feature == o.feature &&
|
|
119
110
|
id == o.id &&
|
|
120
|
-
template_resource == o.template_resource &&
|
|
121
111
|
title == o.title
|
|
122
112
|
end
|
|
123
113
|
|
|
@@ -130,7 +120,7 @@ module Wallee
|
|
|
130
120
|
# Calculates hash code according to all attributes.
|
|
131
121
|
# @return [Fixnum] Hash code
|
|
132
122
|
def hash
|
|
133
|
-
[description, feature, id,
|
|
123
|
+
[description, feature, id, title].hash
|
|
134
124
|
end
|
|
135
125
|
|
|
136
126
|
# Builds the object from hash
|
|
@@ -0,0 +1,215 @@
|
|
|
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 entity property export request contains the information required to create an export of a list of entities.
|
|
26
|
+
class EntityExportRequest
|
|
27
|
+
# The properties is a list of property paths which should be exported.
|
|
28
|
+
attr_accessor :properties
|
|
29
|
+
|
|
30
|
+
# The query limits the returned entries. The query allows to restrict the entries to return and it allows to control the order of them.
|
|
31
|
+
attr_accessor :query
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'properties' => :'properties',
|
|
38
|
+
:'query' => :'query'
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.swagger_types
|
|
44
|
+
{
|
|
45
|
+
:'properties' => :'Array<String>',
|
|
46
|
+
:'query' => :'EntityQuery'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
return unless attributes.is_a?(Hash)
|
|
54
|
+
|
|
55
|
+
# convert string to symbol for hash key
|
|
56
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
57
|
+
|
|
58
|
+
if attributes.has_key?(:'properties')
|
|
59
|
+
if (value = attributes[:'properties']).is_a?(Array)
|
|
60
|
+
self.properties = value
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
if attributes.has_key?(:'query')
|
|
65
|
+
self.query = attributes[:'query']
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
71
|
+
# @return Array for valid properies with the reasons
|
|
72
|
+
def list_invalid_properties
|
|
73
|
+
invalid_properties = Array.new
|
|
74
|
+
if @properties.nil?
|
|
75
|
+
invalid_properties.push("invalid value for 'properties', properties cannot be nil.")
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
return invalid_properties
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Check to see if the all the properties in the model are valid
|
|
82
|
+
# @return true if the model is valid
|
|
83
|
+
def valid?
|
|
84
|
+
return false if @properties.nil?
|
|
85
|
+
return true
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Checks equality by comparing each attribute.
|
|
89
|
+
# @param [Object] Object to be compared
|
|
90
|
+
def ==(o)
|
|
91
|
+
return true if self.equal?(o)
|
|
92
|
+
self.class == o.class &&
|
|
93
|
+
properties == o.properties &&
|
|
94
|
+
query == o.query
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# @see the `==` method
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def eql?(o)
|
|
100
|
+
self == o
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Calculates hash code according to all attributes.
|
|
104
|
+
# @return [Fixnum] Hash code
|
|
105
|
+
def hash
|
|
106
|
+
[properties, query].hash
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Builds the object from hash
|
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
111
|
+
# @return [Object] Returns the model itself
|
|
112
|
+
def build_from_hash(attributes)
|
|
113
|
+
return nil unless attributes.is_a?(Hash)
|
|
114
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
115
|
+
if type =~ /\AArray<(.*)>/i
|
|
116
|
+
# check to ensure the input is an array given that the the attribute
|
|
117
|
+
# is documented as an array but the input is not
|
|
118
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
119
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
120
|
+
end
|
|
121
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
122
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
123
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
self
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Deserializes the data based on type
|
|
130
|
+
# @param string type Data type
|
|
131
|
+
# @param string value Value to be deserialized
|
|
132
|
+
# @return [Object] Deserialized data
|
|
133
|
+
def _deserialize(type, value)
|
|
134
|
+
case type.to_sym
|
|
135
|
+
when :DateTime
|
|
136
|
+
DateTime.parse(value)
|
|
137
|
+
when :Date
|
|
138
|
+
Date.parse(value)
|
|
139
|
+
when :String
|
|
140
|
+
value.to_s
|
|
141
|
+
when :Integer
|
|
142
|
+
value.to_i
|
|
143
|
+
when :Float
|
|
144
|
+
value.to_f
|
|
145
|
+
when :BOOLEAN
|
|
146
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
147
|
+
true
|
|
148
|
+
else
|
|
149
|
+
false
|
|
150
|
+
end
|
|
151
|
+
when :Object
|
|
152
|
+
# generic object (usually a Hash), return directly
|
|
153
|
+
value
|
|
154
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
155
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
156
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
157
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
158
|
+
k_type = Regexp.last_match[:k_type]
|
|
159
|
+
v_type = Regexp.last_match[:v_type]
|
|
160
|
+
{}.tap do |hash|
|
|
161
|
+
value.each do |k, v|
|
|
162
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
else # model
|
|
166
|
+
temp_model = Wallee.const_get(type).new
|
|
167
|
+
temp_model.build_from_hash(value)
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Returns the string representation of the object
|
|
172
|
+
# @return [String] String presentation of the object
|
|
173
|
+
def to_s
|
|
174
|
+
to_hash.to_s
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
|
179
|
+
def to_body
|
|
180
|
+
to_hash
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Returns the object in the form of hash
|
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
|
185
|
+
def to_hash
|
|
186
|
+
hash = {}
|
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
188
|
+
value = self.send(attr)
|
|
189
|
+
next if value.nil?
|
|
190
|
+
hash[param] = _to_hash(value)
|
|
191
|
+
end
|
|
192
|
+
hash
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Outputs non-array value in the form of hash
|
|
196
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
197
|
+
# @param [Object] value Any valid value
|
|
198
|
+
# @return [Hash] Returns the value in the form of hash
|
|
199
|
+
def _to_hash(value)
|
|
200
|
+
if value.is_a?(Array)
|
|
201
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
202
|
+
elsif value.is_a?(Hash)
|
|
203
|
+
{}.tap do |hash|
|
|
204
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
205
|
+
end
|
|
206
|
+
elsif value.respond_to? :to_hash
|
|
207
|
+
value.to_hash
|
|
208
|
+
else
|
|
209
|
+
value
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
end
|
|
@@ -30,7 +30,7 @@ module Wallee
|
|
|
30
30
|
# The language is applied to the ordering of the entities returned. Some entity fields are language dependent and hence the language is required to order them.
|
|
31
31
|
attr_accessor :language
|
|
32
32
|
|
|
33
|
-
# The number of entities defines how many entities should be returned. There is a maximum of
|
|
33
|
+
# The number of entities defines how many entities should be returned. There is a maximum of 100 entities.
|
|
34
34
|
attr_accessor :number_of_entities
|
|
35
35
|
|
|
36
36
|
# The order bys allows to define the ordering of the entities returned by the search.
|
|
@@ -69,12 +69,22 @@ module Wallee
|
|
|
69
69
|
# @return Array for valid properies with the reasons
|
|
70
70
|
def list_invalid_properties
|
|
71
71
|
invalid_properties = Array.new
|
|
72
|
+
if @field_name.nil?
|
|
73
|
+
invalid_properties.push("invalid value for 'field_name', field_name cannot be nil.")
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if @sorting.nil?
|
|
77
|
+
invalid_properties.push("invalid value for 'sorting', sorting cannot be nil.")
|
|
78
|
+
end
|
|
79
|
+
|
|
72
80
|
return invalid_properties
|
|
73
81
|
end
|
|
74
82
|
|
|
75
83
|
# Check to see if the all the properties in the model are valid
|
|
76
84
|
# @return true if the model is valid
|
|
77
85
|
def valid?
|
|
86
|
+
return false if @field_name.nil?
|
|
87
|
+
return false if @sorting.nil?
|
|
78
88
|
return true
|
|
79
89
|
end
|
|
80
90
|
|
|
@@ -0,0 +1,43 @@
|
|
|
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 Environment
|
|
26
|
+
|
|
27
|
+
LIVE = "LIVE".freeze
|
|
28
|
+
PREVIEW = "PREVIEW".freeze
|
|
29
|
+
|
|
30
|
+
# Builds the object from hash
|
|
31
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
32
|
+
# @return [Object] Returns the model itself
|
|
33
|
+
def build_from_hash(value)
|
|
34
|
+
|
|
35
|
+
consantValues = Environment.constants.select{|c| c.to_s == value}
|
|
36
|
+
raise "Invalid ENUM value #{value} for class #Environment" if consantValues.empty?
|
|
37
|
+
|
|
38
|
+
value
|
|
39
|
+
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
end
|