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,234 @@
|
|
|
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 RestAddressFormat
|
|
27
|
+
# The example post codes allow the user to understand what we expect here.
|
|
28
|
+
attr_accessor :post_code_examples
|
|
29
|
+
|
|
30
|
+
# The post code regex is a regular expression which can validates the input of the post code.
|
|
31
|
+
attr_accessor :post_code_regex
|
|
32
|
+
|
|
33
|
+
# The required fields indicate what fields are required within an address to comply with the address format.
|
|
34
|
+
attr_accessor :required_fields
|
|
35
|
+
|
|
36
|
+
# The used fields indicate what fields are used within this address format.
|
|
37
|
+
attr_accessor :used_fields
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
41
|
+
def self.attribute_map
|
|
42
|
+
{
|
|
43
|
+
:'post_code_examples' => :'postCodeExamples',
|
|
44
|
+
:'post_code_regex' => :'postCodeRegex',
|
|
45
|
+
:'required_fields' => :'requiredFields',
|
|
46
|
+
:'used_fields' => :'usedFields'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute type mapping.
|
|
51
|
+
def self.swagger_types
|
|
52
|
+
{
|
|
53
|
+
:'post_code_examples' => :'Array<String>',
|
|
54
|
+
:'post_code_regex' => :'String',
|
|
55
|
+
:'required_fields' => :'Array<RestAddressFormatField>',
|
|
56
|
+
:'used_fields' => :'Array<RestAddressFormatField>'
|
|
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?(:'postCodeExamples')
|
|
69
|
+
if (value = attributes[:'postCodeExamples']).is_a?(Array)
|
|
70
|
+
self.post_code_examples = value
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.has_key?(:'postCodeRegex')
|
|
75
|
+
self.post_code_regex = attributes[:'postCodeRegex']
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.has_key?(:'requiredFields')
|
|
79
|
+
if (value = attributes[:'requiredFields']).is_a?(Array)
|
|
80
|
+
self.required_fields = value
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.has_key?(:'usedFields')
|
|
85
|
+
if (value = attributes[:'usedFields']).is_a?(Array)
|
|
86
|
+
self.used_fields = value
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
93
|
+
# @return Array for valid properies with the reasons
|
|
94
|
+
def list_invalid_properties
|
|
95
|
+
invalid_properties = Array.new
|
|
96
|
+
return invalid_properties
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Check to see if the all the properties in the model are valid
|
|
100
|
+
# @return true if the model is valid
|
|
101
|
+
def valid?
|
|
102
|
+
return true
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Checks equality by comparing each attribute.
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def ==(o)
|
|
108
|
+
return true if self.equal?(o)
|
|
109
|
+
self.class == o.class &&
|
|
110
|
+
post_code_examples == o.post_code_examples &&
|
|
111
|
+
post_code_regex == o.post_code_regex &&
|
|
112
|
+
required_fields == o.required_fields &&
|
|
113
|
+
used_fields == o.used_fields
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# @see the `==` method
|
|
117
|
+
# @param [Object] Object to be compared
|
|
118
|
+
def eql?(o)
|
|
119
|
+
self == o
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Calculates hash code according to all attributes.
|
|
123
|
+
# @return [Fixnum] Hash code
|
|
124
|
+
def hash
|
|
125
|
+
[post_code_examples, post_code_regex, required_fields, used_fields].hash
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Builds the object from hash
|
|
129
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
130
|
+
# @return [Object] Returns the model itself
|
|
131
|
+
def build_from_hash(attributes)
|
|
132
|
+
return nil unless attributes.is_a?(Hash)
|
|
133
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
134
|
+
if type =~ /\AArray<(.*)>/i
|
|
135
|
+
# check to ensure the input is an array given that the the attribute
|
|
136
|
+
# is documented as an array but the input is not
|
|
137
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
138
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
139
|
+
end
|
|
140
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
141
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
142
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
self
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Deserializes the data based on type
|
|
149
|
+
# @param string type Data type
|
|
150
|
+
# @param string value Value to be deserialized
|
|
151
|
+
# @return [Object] Deserialized data
|
|
152
|
+
def _deserialize(type, value)
|
|
153
|
+
case type.to_sym
|
|
154
|
+
when :DateTime
|
|
155
|
+
DateTime.parse(value)
|
|
156
|
+
when :Date
|
|
157
|
+
Date.parse(value)
|
|
158
|
+
when :String
|
|
159
|
+
value.to_s
|
|
160
|
+
when :Integer
|
|
161
|
+
value.to_i
|
|
162
|
+
when :Float
|
|
163
|
+
value.to_f
|
|
164
|
+
when :BOOLEAN
|
|
165
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
166
|
+
true
|
|
167
|
+
else
|
|
168
|
+
false
|
|
169
|
+
end
|
|
170
|
+
when :Object
|
|
171
|
+
# generic object (usually a Hash), return directly
|
|
172
|
+
value
|
|
173
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
174
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
175
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
176
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
177
|
+
k_type = Regexp.last_match[:k_type]
|
|
178
|
+
v_type = Regexp.last_match[:v_type]
|
|
179
|
+
{}.tap do |hash|
|
|
180
|
+
value.each do |k, v|
|
|
181
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
else # model
|
|
185
|
+
temp_model = Wallee.const_get(type).new
|
|
186
|
+
temp_model.build_from_hash(value)
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Returns the string representation of the object
|
|
191
|
+
# @return [String] String presentation of the object
|
|
192
|
+
def to_s
|
|
193
|
+
to_hash.to_s
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
197
|
+
# @return [Hash] Returns the object in the form of hash
|
|
198
|
+
def to_body
|
|
199
|
+
to_hash
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Returns the object in the form of hash
|
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
|
204
|
+
def to_hash
|
|
205
|
+
hash = {}
|
|
206
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
207
|
+
value = self.send(attr)
|
|
208
|
+
next if value.nil?
|
|
209
|
+
hash[param] = _to_hash(value)
|
|
210
|
+
end
|
|
211
|
+
hash
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Outputs non-array value in the form of hash
|
|
215
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
216
|
+
# @param [Object] value Any valid value
|
|
217
|
+
# @return [Hash] Returns the value in the form of hash
|
|
218
|
+
def _to_hash(value)
|
|
219
|
+
if value.is_a?(Array)
|
|
220
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
221
|
+
elsif value.is_a?(Hash)
|
|
222
|
+
{}.tap do |hash|
|
|
223
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
224
|
+
end
|
|
225
|
+
elsif value.respond_to? :to_hash
|
|
226
|
+
value.to_hash
|
|
227
|
+
else
|
|
228
|
+
value
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
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 RestAddressFormatField
|
|
26
|
+
|
|
27
|
+
GIVEN_NAME = "GIVEN_NAME".freeze
|
|
28
|
+
FAMILY_NAME = "FAMILY_NAME".freeze
|
|
29
|
+
ORGANIZATION_NAME = "ORGANIZATION_NAME".freeze
|
|
30
|
+
STREET = "STREET".freeze
|
|
31
|
+
DEPENDENT_LOCALITY = "DEPENDENT_LOCALITY".freeze
|
|
32
|
+
CITY = "CITY".freeze
|
|
33
|
+
POSTAL_STATE = "POSTAL_STATE".freeze
|
|
34
|
+
POST_CODE = "POST_CODE".freeze
|
|
35
|
+
SORTING_CODE = "SORTING_CODE".freeze
|
|
36
|
+
COUNTRY = "COUNTRY".freeze
|
|
37
|
+
|
|
38
|
+
# Builds the object from hash
|
|
39
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
40
|
+
# @return [Object] Returns the model itself
|
|
41
|
+
def build_from_hash(value)
|
|
42
|
+
|
|
43
|
+
consantValues = RestAddressFormatField.constants.select{|c| c.to_s == value}
|
|
44
|
+
raise "Invalid ENUM value #{value} for class #RestAddressFormatField" if consantValues.empty?
|
|
45
|
+
|
|
46
|
+
value
|
|
47
|
+
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
end
|
|
@@ -30,6 +30,9 @@ module Wallee
|
|
|
30
30
|
# The ISO code 3 letter identifies the country by three chars as defined in ISO 3166-1 (e.g. CHE, USA, GBR).
|
|
31
31
|
attr_accessor :iso_code3_letter
|
|
32
32
|
|
|
33
|
+
# The address format of the country indicates how an address has to look like for the country.
|
|
34
|
+
attr_accessor :address_format
|
|
35
|
+
|
|
33
36
|
# The name labels the country by a name in English.
|
|
34
37
|
attr_accessor :name
|
|
35
38
|
|
|
@@ -45,6 +48,7 @@ module Wallee
|
|
|
45
48
|
{
|
|
46
49
|
:'iso_code2_letter' => :'ISOCode2Letter',
|
|
47
50
|
:'iso_code3_letter' => :'ISOCode3Letter',
|
|
51
|
+
:'address_format' => :'addressFormat',
|
|
48
52
|
:'name' => :'name',
|
|
49
53
|
:'numeric_code' => :'numericCode',
|
|
50
54
|
:'state_codes' => :'stateCodes'
|
|
@@ -56,6 +60,7 @@ module Wallee
|
|
|
56
60
|
{
|
|
57
61
|
:'iso_code2_letter' => :'String',
|
|
58
62
|
:'iso_code3_letter' => :'String',
|
|
63
|
+
:'address_format' => :'RestAddressFormat',
|
|
59
64
|
:'name' => :'String',
|
|
60
65
|
:'numeric_code' => :'String',
|
|
61
66
|
:'state_codes' => :'Array<String>'
|
|
@@ -78,6 +83,10 @@ module Wallee
|
|
|
78
83
|
self.iso_code3_letter = attributes[:'ISOCode3Letter']
|
|
79
84
|
end
|
|
80
85
|
|
|
86
|
+
if attributes.has_key?(:'addressFormat')
|
|
87
|
+
self.address_format = attributes[:'addressFormat']
|
|
88
|
+
end
|
|
89
|
+
|
|
81
90
|
if attributes.has_key?(:'name')
|
|
82
91
|
self.name = attributes[:'name']
|
|
83
92
|
end
|
|
@@ -114,6 +123,7 @@ module Wallee
|
|
|
114
123
|
self.class == o.class &&
|
|
115
124
|
iso_code2_letter == o.iso_code2_letter &&
|
|
116
125
|
iso_code3_letter == o.iso_code3_letter &&
|
|
126
|
+
address_format == o.address_format &&
|
|
117
127
|
name == o.name &&
|
|
118
128
|
numeric_code == o.numeric_code &&
|
|
119
129
|
state_codes == o.state_codes
|
|
@@ -128,7 +138,7 @@ module Wallee
|
|
|
128
138
|
# Calculates hash code according to all attributes.
|
|
129
139
|
# @return [Fixnum] Hash code
|
|
130
140
|
def hash
|
|
131
|
-
[iso_code2_letter, iso_code3_letter, name, numeric_code, state_codes].hash
|
|
141
|
+
[iso_code2_letter, iso_code3_letter, address_format, name, numeric_code, state_codes].hash
|
|
132
142
|
end
|
|
133
143
|
|
|
134
144
|
# Builds the object from hash
|
|
@@ -24,6 +24,9 @@ require 'date'
|
|
|
24
24
|
module Wallee
|
|
25
25
|
#
|
|
26
26
|
class Subscription
|
|
27
|
+
#
|
|
28
|
+
attr_accessor :affiliate
|
|
29
|
+
|
|
27
30
|
#
|
|
28
31
|
attr_accessor :created_on
|
|
29
32
|
|
|
@@ -73,6 +76,7 @@ module Wallee
|
|
|
73
76
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
74
77
|
def self.attribute_map
|
|
75
78
|
{
|
|
79
|
+
:'affiliate' => :'affiliate',
|
|
76
80
|
:'created_on' => :'createdOn',
|
|
77
81
|
:'description' => :'description',
|
|
78
82
|
:'id' => :'id',
|
|
@@ -94,6 +98,7 @@ module Wallee
|
|
|
94
98
|
# Attribute type mapping.
|
|
95
99
|
def self.swagger_types
|
|
96
100
|
{
|
|
101
|
+
:'affiliate' => :'SubscriptionAffiliate',
|
|
97
102
|
:'created_on' => :'DateTime',
|
|
98
103
|
:'description' => :'String',
|
|
99
104
|
:'id' => :'Integer',
|
|
@@ -120,6 +125,10 @@ module Wallee
|
|
|
120
125
|
# convert string to symbol for hash key
|
|
121
126
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
122
127
|
|
|
128
|
+
if attributes.has_key?(:'affiliate')
|
|
129
|
+
self.affiliate = attributes[:'affiliate']
|
|
130
|
+
end
|
|
131
|
+
|
|
123
132
|
if attributes.has_key?(:'createdOn')
|
|
124
133
|
self.created_on = attributes[:'createdOn']
|
|
125
134
|
end
|
|
@@ -200,6 +209,7 @@ module Wallee
|
|
|
200
209
|
def ==(o)
|
|
201
210
|
return true if self.equal?(o)
|
|
202
211
|
self.class == o.class &&
|
|
212
|
+
affiliate == o.affiliate &&
|
|
203
213
|
created_on == o.created_on &&
|
|
204
214
|
description == o.description &&
|
|
205
215
|
id == o.id &&
|
|
@@ -226,7 +236,7 @@ module Wallee
|
|
|
226
236
|
# Calculates hash code according to all attributes.
|
|
227
237
|
# @return [Fixnum] Hash code
|
|
228
238
|
def hash
|
|
229
|
-
[created_on, description, id, initialized_on, language, linked_space_id, planned_purge_date, planned_termination_date, reference, state, subscriber, terminated_on, terminating_on, token, version].hash
|
|
239
|
+
[affiliate, created_on, description, id, initialized_on, language, linked_space_id, planned_purge_date, planned_termination_date, reference, state, subscriber, terminated_on, terminating_on, token, version].hash
|
|
230
240
|
end
|
|
231
241
|
|
|
232
242
|
# Builds the object from hash
|
|
@@ -0,0 +1,290 @@
|
|
|
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 SubscriptionAffiliate
|
|
27
|
+
# 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.
|
|
28
|
+
attr_accessor :external_id
|
|
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 :language
|
|
35
|
+
|
|
36
|
+
# The linked space id holds the ID of the space to which the entity belongs to.
|
|
37
|
+
attr_accessor :linked_space_id
|
|
38
|
+
|
|
39
|
+
# Meta data allow to store additional data along the object.
|
|
40
|
+
attr_accessor :meta_data
|
|
41
|
+
|
|
42
|
+
#
|
|
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
|
+
#
|
|
49
|
+
attr_accessor :reference
|
|
50
|
+
|
|
51
|
+
#
|
|
52
|
+
attr_accessor :state
|
|
53
|
+
|
|
54
|
+
# The version number indicates the version of the entity. The version is incremented whenever the entity is changed.
|
|
55
|
+
attr_accessor :version
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
59
|
+
def self.attribute_map
|
|
60
|
+
{
|
|
61
|
+
:'external_id' => :'externalId',
|
|
62
|
+
:'id' => :'id',
|
|
63
|
+
:'language' => :'language',
|
|
64
|
+
:'linked_space_id' => :'linkedSpaceId',
|
|
65
|
+
:'meta_data' => :'metaData',
|
|
66
|
+
:'name' => :'name',
|
|
67
|
+
:'planned_purge_date' => :'plannedPurgeDate',
|
|
68
|
+
:'reference' => :'reference',
|
|
69
|
+
:'state' => :'state',
|
|
70
|
+
:'version' => :'version'
|
|
71
|
+
}
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Attribute type mapping.
|
|
75
|
+
def self.swagger_types
|
|
76
|
+
{
|
|
77
|
+
:'external_id' => :'String',
|
|
78
|
+
:'id' => :'Integer',
|
|
79
|
+
:'language' => :'String',
|
|
80
|
+
:'linked_space_id' => :'Integer',
|
|
81
|
+
:'meta_data' => :'Hash<String, String>',
|
|
82
|
+
:'name' => :'String',
|
|
83
|
+
:'planned_purge_date' => :'DateTime',
|
|
84
|
+
:'reference' => :'String',
|
|
85
|
+
:'state' => :'CreationEntityState',
|
|
86
|
+
:'version' => :'Integer'
|
|
87
|
+
}
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Initializes the object
|
|
91
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
92
|
+
def initialize(attributes = {})
|
|
93
|
+
return unless attributes.is_a?(Hash)
|
|
94
|
+
|
|
95
|
+
# convert string to symbol for hash key
|
|
96
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
97
|
+
|
|
98
|
+
if attributes.has_key?(:'externalId')
|
|
99
|
+
self.external_id = attributes[:'externalId']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.has_key?(:'id')
|
|
103
|
+
self.id = attributes[:'id']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.has_key?(:'language')
|
|
107
|
+
self.language = attributes[:'language']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.has_key?(:'linkedSpaceId')
|
|
111
|
+
self.linked_space_id = attributes[:'linkedSpaceId']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.has_key?(:'metaData')
|
|
115
|
+
if (value = attributes[:'metaData']).is_a?(Array)
|
|
116
|
+
self.meta_data = value
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.has_key?(:'name')
|
|
121
|
+
self.name = attributes[:'name']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.has_key?(:'plannedPurgeDate')
|
|
125
|
+
self.planned_purge_date = attributes[:'plannedPurgeDate']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.has_key?(:'reference')
|
|
129
|
+
self.reference = attributes[:'reference']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.has_key?(:'state')
|
|
133
|
+
self.state = attributes[:'state']
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.has_key?(:'version')
|
|
137
|
+
self.version = attributes[:'version']
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
143
|
+
# @return Array for valid properies with the reasons
|
|
144
|
+
def list_invalid_properties
|
|
145
|
+
invalid_properties = Array.new
|
|
146
|
+
return invalid_properties
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Check to see if the all the properties in the model are valid
|
|
150
|
+
# @return true if the model is valid
|
|
151
|
+
def valid?
|
|
152
|
+
return true
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Checks equality by comparing each attribute.
|
|
156
|
+
# @param [Object] Object to be compared
|
|
157
|
+
def ==(o)
|
|
158
|
+
return true if self.equal?(o)
|
|
159
|
+
self.class == o.class &&
|
|
160
|
+
external_id == o.external_id &&
|
|
161
|
+
id == o.id &&
|
|
162
|
+
language == o.language &&
|
|
163
|
+
linked_space_id == o.linked_space_id &&
|
|
164
|
+
meta_data == o.meta_data &&
|
|
165
|
+
name == o.name &&
|
|
166
|
+
planned_purge_date == o.planned_purge_date &&
|
|
167
|
+
reference == o.reference &&
|
|
168
|
+
state == o.state &&
|
|
169
|
+
version == o.version
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# @see the `==` method
|
|
173
|
+
# @param [Object] Object to be compared
|
|
174
|
+
def eql?(o)
|
|
175
|
+
self == o
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Calculates hash code according to all attributes.
|
|
179
|
+
# @return [Fixnum] Hash code
|
|
180
|
+
def hash
|
|
181
|
+
[external_id, id, language, linked_space_id, meta_data, name, planned_purge_date, reference, state, version].hash
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Builds the object from hash
|
|
185
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
186
|
+
# @return [Object] Returns the model itself
|
|
187
|
+
def build_from_hash(attributes)
|
|
188
|
+
return nil unless attributes.is_a?(Hash)
|
|
189
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
190
|
+
if type =~ /\AArray<(.*)>/i
|
|
191
|
+
# check to ensure the input is an array given that the the attribute
|
|
192
|
+
# is documented as an array but the input is not
|
|
193
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
194
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
195
|
+
end
|
|
196
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
197
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
198
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
self
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Deserializes the data based on type
|
|
205
|
+
# @param string type Data type
|
|
206
|
+
# @param string value Value to be deserialized
|
|
207
|
+
# @return [Object] Deserialized data
|
|
208
|
+
def _deserialize(type, value)
|
|
209
|
+
case type.to_sym
|
|
210
|
+
when :DateTime
|
|
211
|
+
DateTime.parse(value)
|
|
212
|
+
when :Date
|
|
213
|
+
Date.parse(value)
|
|
214
|
+
when :String
|
|
215
|
+
value.to_s
|
|
216
|
+
when :Integer
|
|
217
|
+
value.to_i
|
|
218
|
+
when :Float
|
|
219
|
+
value.to_f
|
|
220
|
+
when :BOOLEAN
|
|
221
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
222
|
+
true
|
|
223
|
+
else
|
|
224
|
+
false
|
|
225
|
+
end
|
|
226
|
+
when :Object
|
|
227
|
+
# generic object (usually a Hash), return directly
|
|
228
|
+
value
|
|
229
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
230
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
231
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
232
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
233
|
+
k_type = Regexp.last_match[:k_type]
|
|
234
|
+
v_type = Regexp.last_match[:v_type]
|
|
235
|
+
{}.tap do |hash|
|
|
236
|
+
value.each do |k, v|
|
|
237
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
else # model
|
|
241
|
+
temp_model = Wallee.const_get(type).new
|
|
242
|
+
temp_model.build_from_hash(value)
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Returns the string representation of the object
|
|
247
|
+
# @return [String] String presentation of the object
|
|
248
|
+
def to_s
|
|
249
|
+
to_hash.to_s
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
253
|
+
# @return [Hash] Returns the object in the form of hash
|
|
254
|
+
def to_body
|
|
255
|
+
to_hash
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# Returns the object in the form of hash
|
|
259
|
+
# @return [Hash] Returns the object in the form of hash
|
|
260
|
+
def to_hash
|
|
261
|
+
hash = {}
|
|
262
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
263
|
+
value = self.send(attr)
|
|
264
|
+
next if value.nil?
|
|
265
|
+
hash[param] = _to_hash(value)
|
|
266
|
+
end
|
|
267
|
+
hash
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# Outputs non-array value in the form of hash
|
|
271
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
272
|
+
# @param [Object] value Any valid value
|
|
273
|
+
# @return [Hash] Returns the value in the form of hash
|
|
274
|
+
def _to_hash(value)
|
|
275
|
+
if value.is_a?(Array)
|
|
276
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
277
|
+
elsif value.is_a?(Hash)
|
|
278
|
+
{}.tap do |hash|
|
|
279
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
280
|
+
end
|
|
281
|
+
elsif value.respond_to? :to_hash
|
|
282
|
+
value.to_hash
|
|
283
|
+
else
|
|
284
|
+
value
|
|
285
|
+
end
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
end
|