wallee-ruby-sdk 2.2.3 → 3.0.5
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 +4 -4
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/lib/wallee-ruby-sdk.rb +63 -8
- data/lib/wallee-ruby-sdk/api/bank_account_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/charge_bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/currency_bank_account_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/external_transfer_bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/internal_transfer_bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/payment_terminal_till_service_api.rb +170 -0
- data/lib/wallee-ruby-sdk/api/refund_bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/refund_recovery_bank_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/shopify_subscriber_service_api.rb +62 -0
- data/lib/wallee-ruby-sdk/api/shopify_subscription_service_api.rb +124 -0
- data/lib/wallee-ruby-sdk/api/shopify_transaction_service_api.rb +213 -0
- data/lib/wallee-ruby-sdk/api/subscriber_service_api.rb +3 -3
- data/lib/wallee-ruby-sdk/api/subscription_service_api.rb +67 -0
- data/lib/wallee-ruby-sdk/api/token_service_api.rb +189 -0
- data/lib/wallee-ruby-sdk/api/transaction_terminal_service_api.rb +21 -32
- data/lib/wallee-ruby-sdk/api/web_app_service_api.rb +200 -0
- data/lib/wallee-ruby-sdk/api_client.rb +7 -4
- data/lib/wallee-ruby-sdk/configuration.rb +2 -2
- data/lib/wallee-ruby-sdk/models/abstract_account_update.rb +11 -1
- data/lib/wallee-ruby-sdk/models/abstract_payment_link_update.rb +15 -15
- data/lib/wallee-ruby-sdk/models/{abstract_shopify_subscription_product_active.rb → abstract_shopify_subscription_product_update.rb} +2 -12
- data/lib/wallee-ruby-sdk/models/abstract_space_update.rb +11 -1
- data/lib/wallee-ruby-sdk/models/abstract_subscription_product_active.rb +11 -1
- data/lib/wallee-ruby-sdk/models/abstract_transaction_pending.rb +59 -1
- data/lib/wallee-ruby-sdk/models/abstract_webhook_url_update.rb +24 -0
- data/lib/wallee-ruby-sdk/models/account.rb +31 -1
- data/lib/wallee-ruby-sdk/models/account_create.rb +11 -1
- data/lib/wallee-ruby-sdk/models/account_update.rb +11 -1
- data/lib/wallee-ruby-sdk/models/authenticated_card_data.rb +221 -0
- data/lib/wallee-ruby-sdk/models/{unencrypted_card_data.rb → authenticated_card_data_create.rb} +86 -12
- data/lib/wallee-ruby-sdk/models/bank_account.rb +291 -0
- data/lib/wallee-ruby-sdk/models/bank_account_environment.rb +35 -0
- data/lib/wallee-ruby-sdk/models/bank_account_state.rb +37 -0
- data/lib/wallee-ruby-sdk/models/bank_account_type.rb +227 -0
- data/lib/wallee-ruby-sdk/models/bank_transaction.rb +387 -0
- data/lib/wallee-ruby-sdk/models/bank_transaction_flow_direction.rb +35 -0
- data/lib/wallee-ruby-sdk/models/bank_transaction_source.rb +215 -0
- data/lib/wallee-ruby-sdk/models/bank_transaction_state.rb +35 -0
- data/lib/wallee-ruby-sdk/models/bank_transaction_type.rb +215 -0
- data/lib/wallee-ruby-sdk/models/card_authentication_response.rb +38 -0
- data/lib/wallee-ruby-sdk/models/card_authentication_version.rb +35 -0
- data/lib/wallee-ruby-sdk/models/card_cryptogram.rb +201 -0
- data/lib/wallee-ruby-sdk/models/card_cryptogram_create.rb +211 -0
- data/lib/wallee-ruby-sdk/models/card_cryptogram_type.rb +34 -0
- data/lib/wallee-ruby-sdk/models/cardholder_authentication.rb +231 -0
- data/lib/wallee-ruby-sdk/models/cardholder_authentication_create.rb +241 -0
- data/lib/wallee-ruby-sdk/models/charge_attempt.rb +11 -1
- data/lib/wallee-ruby-sdk/models/charge_bank_transaction.rb +291 -0
- data/lib/wallee-ruby-sdk/models/currency_bank_account.rb +241 -0
- data/lib/wallee-ruby-sdk/models/debt_collection_case.rb +1 -1
- data/lib/wallee-ruby-sdk/models/debt_collection_case_create.rb +1 -1
- data/lib/wallee-ruby-sdk/models/external_transfer_bank_transaction.rb +251 -0
- data/lib/wallee-ruby-sdk/models/internal_transfer_bank_transaction.rb +231 -0
- data/lib/wallee-ruby-sdk/models/payment_adjustment.rb +231 -0
- data/lib/wallee-ruby-sdk/models/payment_adjustment_type.rb +215 -0
- data/lib/wallee-ruby-sdk/models/payment_connector_configuration.rb +13 -1
- data/lib/wallee-ruby-sdk/models/payment_contract.rb +1 -25
- data/lib/wallee-ruby-sdk/models/payment_link.rb +16 -40
- data/lib/wallee-ruby-sdk/models/payment_link_active.rb +15 -15
- data/lib/wallee-ruby-sdk/models/payment_link_address_handling_mode.rb +36 -0
- data/lib/wallee-ruby-sdk/models/payment_link_create.rb +16 -44
- data/lib/wallee-ruby-sdk/models/payment_link_update.rb +15 -15
- data/lib/wallee-ruby-sdk/models/payment_terminal.rb +11 -1
- data/lib/wallee-ruby-sdk/models/payment_terminal_address.rb +0 -60
- data/lib/wallee-ruby-sdk/models/payment_terminal_configuration_version.rb +11 -1
- data/lib/wallee-ruby-sdk/models/payment_terminal_location.rb +2 -22
- data/lib/wallee-ruby-sdk/models/payment_terminal_receipt_type.rb +215 -0
- data/lib/wallee-ruby-sdk/models/permission.rb +14 -4
- data/lib/wallee-ruby-sdk/models/recurring_indicator.rb +37 -0
- data/lib/wallee-ruby-sdk/models/refund_bank_transaction.rb +281 -0
- data/lib/wallee-ruby-sdk/models/refund_recovery_bank_transaction.rb +293 -0
- data/lib/wallee-ruby-sdk/models/rendered_terminal_receipt.rb +26 -6
- data/lib/wallee-ruby-sdk/models/role.rb +1 -1
- data/lib/wallee-ruby-sdk/models/role_state.rb +37 -0
- data/lib/wallee-ruby-sdk/models/sales_channel.rb +34 -4
- data/lib/wallee-ruby-sdk/models/shopify_additional_line_item_data.rb +35 -0
- data/lib/wallee-ruby-sdk/models/shopify_integration.rb +73 -31
- data/lib/wallee-ruby-sdk/models/shopify_integration_payment_app_version.rb +34 -0
- data/lib/wallee-ruby-sdk/models/{shopify_integration_app_version.rb → shopify_integration_subscription_app_version.rb} +3 -3
- data/lib/wallee-ruby-sdk/models/shopify_subscriber.rb +1 -1
- data/lib/wallee-ruby-sdk/models/shopify_subscriber_active.rb +241 -0
- data/lib/wallee-ruby-sdk/models/shopify_subscriber_creation.rb +216 -0
- data/lib/wallee-ruby-sdk/models/shopify_subscription.rb +61 -7
- data/lib/wallee-ruby-sdk/models/shopify_subscription_address.rb +0 -60
- data/lib/wallee-ruby-sdk/models/{payment_terminal_contact_address.rb → shopify_subscription_address_create.rb} +152 -2
- data/lib/wallee-ruby-sdk/models/shopify_subscription_creation_request.rb +363 -0
- data/lib/wallee-ruby-sdk/models/shopify_subscription_model_billing_configuration.rb +271 -0
- data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_item.rb → shopify_subscription_model_item.rb} +2 -2
- data/lib/wallee-ruby-sdk/models/{shopify_subscription_edit_model_tax_line.rb → shopify_subscription_model_tax_line.rb} +1 -1
- data/lib/wallee-ruby-sdk/models/shopify_subscription_product_create.rb +9 -14
- data/lib/wallee-ruby-sdk/models/{shopify_subscription_product_active.rb → shopify_subscription_product_update.rb} +2 -12
- data/lib/wallee-ruby-sdk/models/shopify_subscription_update_addresses_request.rb +211 -0
- data/lib/wallee-ruby-sdk/models/shopify_subscription_update_request.rb +11 -81
- data/lib/wallee-ruby-sdk/models/shopify_subscription_version.rb +11 -1
- data/lib/wallee-ruby-sdk/models/space.rb +31 -1
- data/lib/wallee-ruby-sdk/models/space_create.rb +11 -1
- data/lib/wallee-ruby-sdk/models/space_update.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscriber.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscriber_create.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscription.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription_affiliate.rb +1 -25
- data/lib/wallee-ruby-sdk/models/subscription_affiliate_create.rb +1 -29
- data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleted.rb +1 -25
- data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleting.rb +1 -25
- data/lib/wallee-ruby-sdk/models/subscription_charge.rb +49 -1
- data/lib/wallee-ruby-sdk/models/subscription_charge_create.rb +49 -1
- data/lib/wallee-ruby-sdk/models/subscription_create_request.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscription_ledger_entry.rb +12 -2
- data/lib/wallee-ruby-sdk/models/subscription_ledger_entry_create.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscription_product.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_active.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_component.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_component_update.rb +1 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_create.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_version.rb +11 -1
- data/lib/wallee-ruby-sdk/models/subscription_product_version_pending.rb +14 -4
- data/lib/wallee-ruby-sdk/models/subscription_update_request.rb +206 -0
- data/lib/wallee-ruby-sdk/models/tax_calculation.rb +35 -0
- data/lib/wallee-ruby-sdk/models/terminal_receipt_fetch_request.rb +221 -0
- data/lib/wallee-ruby-sdk/models/terminal_receipt_format.rb +35 -0
- data/lib/wallee-ruby-sdk/models/token.rb +1 -25
- data/lib/wallee-ruby-sdk/models/token_create.rb +1 -29
- data/lib/wallee-ruby-sdk/models/tokenized_card_data.rb +211 -0
- data/lib/wallee-ruby-sdk/models/{unencrypted_card_data_create.rb → tokenized_card_data_create.rb} +60 -5
- data/lib/wallee-ruby-sdk/models/transaction.rb +132 -4
- data/lib/wallee-ruby-sdk/models/transaction_completion.rb +26 -1
- data/lib/wallee-ruby-sdk/models/transaction_completion_behavior.rb +36 -0
- data/lib/wallee-ruby-sdk/models/transaction_completion_request.rb +26 -1
- data/lib/wallee-ruby-sdk/models/transaction_create.rb +59 -1
- data/lib/wallee-ruby-sdk/models/transaction_pending.rb +59 -1
- data/lib/wallee-ruby-sdk/models/web_app_confirmation_request.rb +206 -0
- data/lib/wallee-ruby-sdk/models/web_app_confirmation_response.rb +231 -0
- data/lib/wallee-ruby-sdk/models/webhook_url.rb +35 -1
- data/lib/wallee-ruby-sdk/models/webhook_url_create.rb +24 -0
- data/lib/wallee-ruby-sdk/models/webhook_url_update.rb +24 -0
- data/lib/wallee-ruby-sdk/version.rb +1 -1
- data/test/condition_type_service_test.rb +22 -0
- data/wallee-ruby-sdk.gemspec +3 -2
- metadata +93 -17
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
The wallee API allows an easy interaction with the wallee web service.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
=end
|
|
17
|
+
|
|
18
|
+
require 'date'
|
|
19
|
+
|
|
20
|
+
module Wallee
|
|
21
|
+
# The confirmation response provides the details about the installation of the web app.
|
|
22
|
+
class WebAppConfirmationResponse
|
|
23
|
+
# The access code grants permissions to the web service API according to the OAuth standard.
|
|
24
|
+
attr_accessor :access_token
|
|
25
|
+
|
|
26
|
+
# The scope contains the permissions granted to the web app within the space.
|
|
27
|
+
attr_accessor :scope
|
|
28
|
+
|
|
29
|
+
# This is the space into which the web app is installed into.
|
|
30
|
+
attr_accessor :space
|
|
31
|
+
|
|
32
|
+
# The state contains the state parameter content provided when initiating the app installation.
|
|
33
|
+
attr_accessor :state
|
|
34
|
+
|
|
35
|
+
# The token type indicates the type of the access token. The type determines the authentication mechanism to use for accessing the web service API.
|
|
36
|
+
attr_accessor :token_type
|
|
37
|
+
|
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
39
|
+
def self.attribute_map
|
|
40
|
+
{
|
|
41
|
+
:'access_token' => :'access_token',
|
|
42
|
+
:'scope' => :'scope',
|
|
43
|
+
:'space' => :'space',
|
|
44
|
+
:'state' => :'state',
|
|
45
|
+
:'token_type' => :'token_type'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.swagger_types
|
|
51
|
+
{
|
|
52
|
+
:'access_token' => :'String',
|
|
53
|
+
:'scope' => :'String',
|
|
54
|
+
:'space' => :'Space',
|
|
55
|
+
:'state' => :'String',
|
|
56
|
+
:'token_type' => :'String'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Initializes the object
|
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
62
|
+
def initialize(attributes = {})
|
|
63
|
+
return unless attributes.is_a?(Hash)
|
|
64
|
+
|
|
65
|
+
# convert string to symbol for hash key
|
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
67
|
+
|
|
68
|
+
if attributes.has_key?(:'access_token')
|
|
69
|
+
self.access_token = attributes[:'access_token']
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.has_key?(:'scope')
|
|
73
|
+
self.scope = attributes[:'scope']
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.has_key?(:'space')
|
|
77
|
+
self.space = attributes[:'space']
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if attributes.has_key?(:'state')
|
|
81
|
+
self.state = attributes[:'state']
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.has_key?(:'token_type')
|
|
85
|
+
self.token_type = attributes[:'token_type']
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
90
|
+
# @return Array for valid properties with the reasons
|
|
91
|
+
def list_invalid_properties
|
|
92
|
+
invalid_properties = Array.new
|
|
93
|
+
invalid_properties
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Check to see if the all the properties in the model are valid
|
|
97
|
+
# @return true if the model is valid
|
|
98
|
+
def valid?
|
|
99
|
+
true
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Checks equality by comparing each attribute.
|
|
103
|
+
# @param [Object] Object to be compared
|
|
104
|
+
def ==(o)
|
|
105
|
+
return true if self.equal?(o)
|
|
106
|
+
self.class == o.class &&
|
|
107
|
+
access_token == o.access_token &&
|
|
108
|
+
scope == o.scope &&
|
|
109
|
+
space == o.space &&
|
|
110
|
+
state == o.state &&
|
|
111
|
+
token_type == o.token_type
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# @see the `==` method
|
|
115
|
+
# @param [Object] Object to be compared
|
|
116
|
+
def eql?(o)
|
|
117
|
+
self == o
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Calculates hash code according to all attributes.
|
|
121
|
+
# @return [Fixnum] Hash code
|
|
122
|
+
def hash
|
|
123
|
+
[access_token, scope, space, state, token_type].hash
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Builds the object from hash
|
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
128
|
+
# @return [Object] Returns the model itself
|
|
129
|
+
def build_from_hash(attributes)
|
|
130
|
+
return nil unless attributes.is_a?(Hash)
|
|
131
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
132
|
+
if type =~ /\AArray<(.*)>/i
|
|
133
|
+
# check to ensure the input is an array given that the attribute
|
|
134
|
+
# is documented as an array but the input is not
|
|
135
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
136
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
137
|
+
end
|
|
138
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
139
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
140
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
self
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Deserializes the data based on type
|
|
147
|
+
# @param string type Data type
|
|
148
|
+
# @param string value Value to be deserialized
|
|
149
|
+
# @return [Object] Deserialized data
|
|
150
|
+
def _deserialize(type, value)
|
|
151
|
+
case type.to_sym
|
|
152
|
+
when :DateTime
|
|
153
|
+
DateTime.parse(value)
|
|
154
|
+
when :Date
|
|
155
|
+
Date.parse(value)
|
|
156
|
+
when :String
|
|
157
|
+
value.to_s
|
|
158
|
+
when :Integer
|
|
159
|
+
value.to_i
|
|
160
|
+
when :Float
|
|
161
|
+
value.to_f
|
|
162
|
+
when :BOOLEAN
|
|
163
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
164
|
+
true
|
|
165
|
+
else
|
|
166
|
+
false
|
|
167
|
+
end
|
|
168
|
+
when :Object
|
|
169
|
+
# generic object (usually a Hash), return directly
|
|
170
|
+
value
|
|
171
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
172
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
173
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
174
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
175
|
+
k_type = Regexp.last_match[:k_type]
|
|
176
|
+
v_type = Regexp.last_match[:v_type]
|
|
177
|
+
{}.tap do |hash|
|
|
178
|
+
value.each do |k, v|
|
|
179
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
else # model
|
|
183
|
+
temp_model = Wallee.const_get(type).new
|
|
184
|
+
temp_model.build_from_hash(value)
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Returns the string representation of the object
|
|
189
|
+
# @return [String] String presentation of the object
|
|
190
|
+
def to_s
|
|
191
|
+
to_hash.to_s
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
|
196
|
+
def to_body
|
|
197
|
+
to_hash
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Returns the object in the form of hash
|
|
201
|
+
# @return [Hash] Returns the object in the form of hash
|
|
202
|
+
def to_hash
|
|
203
|
+
hash = {}
|
|
204
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
205
|
+
value = self.send(attr)
|
|
206
|
+
next if value.nil?
|
|
207
|
+
hash[param] = _to_hash(value)
|
|
208
|
+
end
|
|
209
|
+
hash
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Outputs non-array value in the form of hash
|
|
213
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
214
|
+
# @param [Object] value Any valid value
|
|
215
|
+
# @return [Hash] Returns the value in the form of hash
|
|
216
|
+
def _to_hash(value)
|
|
217
|
+
if value.is_a?(Array)
|
|
218
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
219
|
+
elsif value.is_a?(Hash)
|
|
220
|
+
{}.tap do |hash|
|
|
221
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
222
|
+
end
|
|
223
|
+
elsif value.respond_to? :to_hash
|
|
224
|
+
value.to_hash
|
|
225
|
+
else
|
|
226
|
+
value
|
|
227
|
+
end
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
end
|
|
231
|
+
end
|
|
@@ -20,6 +20,9 @@ require 'date'
|
|
|
20
20
|
module Wallee
|
|
21
21
|
#
|
|
22
22
|
class WebhookUrl
|
|
23
|
+
# The webhook URL is managed by the application and cannot be changed via the user interface.
|
|
24
|
+
attr_accessor :application_managed
|
|
25
|
+
|
|
23
26
|
# The ID is the primary key of the entity. The ID identifies the entity uniquely.
|
|
24
27
|
attr_accessor :id
|
|
25
28
|
|
|
@@ -44,6 +47,7 @@ module Wallee
|
|
|
44
47
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
45
48
|
def self.attribute_map
|
|
46
49
|
{
|
|
50
|
+
:'application_managed' => :'applicationManaged',
|
|
47
51
|
:'id' => :'id',
|
|
48
52
|
:'linked_space_id' => :'linkedSpaceId',
|
|
49
53
|
:'name' => :'name',
|
|
@@ -57,6 +61,7 @@ module Wallee
|
|
|
57
61
|
# Attribute type mapping.
|
|
58
62
|
def self.swagger_types
|
|
59
63
|
{
|
|
64
|
+
:'application_managed' => :'BOOLEAN',
|
|
60
65
|
:'id' => :'Integer',
|
|
61
66
|
:'linked_space_id' => :'Integer',
|
|
62
67
|
:'name' => :'String',
|
|
@@ -75,6 +80,10 @@ module Wallee
|
|
|
75
80
|
# convert string to symbol for hash key
|
|
76
81
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
77
82
|
|
|
83
|
+
if attributes.has_key?(:'applicationManaged')
|
|
84
|
+
self.application_managed = attributes[:'applicationManaged']
|
|
85
|
+
end
|
|
86
|
+
|
|
78
87
|
if attributes.has_key?(:'id')
|
|
79
88
|
self.id = attributes[:'id']
|
|
80
89
|
end
|
|
@@ -112,6 +121,14 @@ module Wallee
|
|
|
112
121
|
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 50.')
|
|
113
122
|
end
|
|
114
123
|
|
|
124
|
+
if !@url.nil? && @url.to_s.length > 500
|
|
125
|
+
invalid_properties.push('invalid value for "url", the character length must be smaller than or equal to 500.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if !@url.nil? && @url.to_s.length < 9
|
|
129
|
+
invalid_properties.push('invalid value for "url", the character length must be great than or equal to 9.')
|
|
130
|
+
end
|
|
131
|
+
|
|
115
132
|
invalid_properties
|
|
116
133
|
end
|
|
117
134
|
|
|
@@ -119,6 +136,8 @@ module Wallee
|
|
|
119
136
|
# @return true if the model is valid
|
|
120
137
|
def valid?
|
|
121
138
|
return false if !@name.nil? && @name.to_s.length > 50
|
|
139
|
+
return false if !@url.nil? && @url.to_s.length > 500
|
|
140
|
+
return false if !@url.nil? && @url.to_s.length < 9
|
|
122
141
|
true
|
|
123
142
|
end
|
|
124
143
|
|
|
@@ -132,11 +151,26 @@ module Wallee
|
|
|
132
151
|
@name = name
|
|
133
152
|
end
|
|
134
153
|
|
|
154
|
+
# Custom attribute writer method with validation
|
|
155
|
+
# @param [Object] url Value to be assigned
|
|
156
|
+
def url=(url)
|
|
157
|
+
if !url.nil? && url.to_s.length > 500
|
|
158
|
+
fail ArgumentError, 'invalid value for "url", the character length must be smaller than or equal to 500.'
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if !url.nil? && url.to_s.length < 9
|
|
162
|
+
fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 9.'
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
@url = url
|
|
166
|
+
end
|
|
167
|
+
|
|
135
168
|
# Checks equality by comparing each attribute.
|
|
136
169
|
# @param [Object] Object to be compared
|
|
137
170
|
def ==(o)
|
|
138
171
|
return true if self.equal?(o)
|
|
139
172
|
self.class == o.class &&
|
|
173
|
+
application_managed == o.application_managed &&
|
|
140
174
|
id == o.id &&
|
|
141
175
|
linked_space_id == o.linked_space_id &&
|
|
142
176
|
name == o.name &&
|
|
@@ -155,7 +189,7 @@ module Wallee
|
|
|
155
189
|
# Calculates hash code according to all attributes.
|
|
156
190
|
# @return [Fixnum] Hash code
|
|
157
191
|
def hash
|
|
158
|
-
[id, linked_space_id, name, planned_purge_date, state, url, version].hash
|
|
192
|
+
[application_managed, id, linked_space_id, name, planned_purge_date, state, url, version].hash
|
|
159
193
|
end
|
|
160
194
|
|
|
161
195
|
# Builds the object from hash
|
|
@@ -76,6 +76,14 @@ module Wallee
|
|
|
76
76
|
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 50.')
|
|
77
77
|
end
|
|
78
78
|
|
|
79
|
+
if !@url.nil? && @url.to_s.length > 500
|
|
80
|
+
invalid_properties.push('invalid value for "url", the character length must be smaller than or equal to 500.')
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if !@url.nil? && @url.to_s.length < 9
|
|
84
|
+
invalid_properties.push('invalid value for "url", the character length must be great than or equal to 9.')
|
|
85
|
+
end
|
|
86
|
+
|
|
79
87
|
invalid_properties
|
|
80
88
|
end
|
|
81
89
|
|
|
@@ -83,6 +91,8 @@ module Wallee
|
|
|
83
91
|
# @return true if the model is valid
|
|
84
92
|
def valid?
|
|
85
93
|
return false if !@name.nil? && @name.to_s.length > 50
|
|
94
|
+
return false if !@url.nil? && @url.to_s.length > 500
|
|
95
|
+
return false if !@url.nil? && @url.to_s.length < 9
|
|
86
96
|
true
|
|
87
97
|
end
|
|
88
98
|
|
|
@@ -96,6 +106,20 @@ module Wallee
|
|
|
96
106
|
@name = name
|
|
97
107
|
end
|
|
98
108
|
|
|
109
|
+
# Custom attribute writer method with validation
|
|
110
|
+
# @param [Object] url Value to be assigned
|
|
111
|
+
def url=(url)
|
|
112
|
+
if !url.nil? && url.to_s.length > 500
|
|
113
|
+
fail ArgumentError, 'invalid value for "url", the character length must be smaller than or equal to 500.'
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if !url.nil? && url.to_s.length < 9
|
|
117
|
+
fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 9.'
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
@url = url
|
|
121
|
+
end
|
|
122
|
+
|
|
99
123
|
# Checks equality by comparing each attribute.
|
|
100
124
|
# @param [Object] Object to be compared
|
|
101
125
|
def ==(o)
|
|
@@ -94,6 +94,14 @@ module Wallee
|
|
|
94
94
|
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 50.')
|
|
95
95
|
end
|
|
96
96
|
|
|
97
|
+
if !@url.nil? && @url.to_s.length > 500
|
|
98
|
+
invalid_properties.push('invalid value for "url", the character length must be smaller than or equal to 500.')
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if !@url.nil? && @url.to_s.length < 9
|
|
102
|
+
invalid_properties.push('invalid value for "url", the character length must be great than or equal to 9.')
|
|
103
|
+
end
|
|
104
|
+
|
|
97
105
|
if @id.nil?
|
|
98
106
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
99
107
|
end
|
|
@@ -109,6 +117,8 @@ module Wallee
|
|
|
109
117
|
# @return true if the model is valid
|
|
110
118
|
def valid?
|
|
111
119
|
return false if !@name.nil? && @name.to_s.length > 50
|
|
120
|
+
return false if !@url.nil? && @url.to_s.length > 500
|
|
121
|
+
return false if !@url.nil? && @url.to_s.length < 9
|
|
112
122
|
return false if @id.nil?
|
|
113
123
|
return false if @version.nil?
|
|
114
124
|
true
|
|
@@ -124,6 +134,20 @@ module Wallee
|
|
|
124
134
|
@name = name
|
|
125
135
|
end
|
|
126
136
|
|
|
137
|
+
# Custom attribute writer method with validation
|
|
138
|
+
# @param [Object] url Value to be assigned
|
|
139
|
+
def url=(url)
|
|
140
|
+
if !url.nil? && url.to_s.length > 500
|
|
141
|
+
fail ArgumentError, 'invalid value for "url", the character length must be smaller than or equal to 500.'
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if !url.nil? && url.to_s.length < 9
|
|
145
|
+
fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 9.'
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
@url = url
|
|
149
|
+
end
|
|
150
|
+
|
|
127
151
|
# Checks equality by comparing each attribute.
|
|
128
152
|
# @param [Object] Object to be compared
|
|
129
153
|
def ==(o)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
require 'test/unit'
|
|
2
|
+
require 'wallee-ruby-sdk'
|
|
3
|
+
|
|
4
|
+
class TestConditionTypeAll < Test::Unit::TestCase
|
|
5
|
+
|
|
6
|
+
def test_condition_type_all
|
|
7
|
+
|
|
8
|
+
app_user_id = 512
|
|
9
|
+
app_user_key = "FKrO76r5VwJtBrqZawBspljbBNOxp5veKQQkOnZxucQ="
|
|
10
|
+
|
|
11
|
+
Wallee.configure do |config|
|
|
12
|
+
config.user_id = app_user_id
|
|
13
|
+
config.authentication_key = app_user_key
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
condition_type_service = Wallee::ConditionTypeService.new
|
|
17
|
+
|
|
18
|
+
condition_types, status_code = condition_type_service.all_with_http_info()
|
|
19
|
+
assert_equal(200, status_code)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
end
|
data/wallee-ruby-sdk.gemspec
CHANGED
|
@@ -24,8 +24,8 @@ Gem::Specification.new do |s|
|
|
|
24
24
|
s.name = "wallee-ruby-sdk"
|
|
25
25
|
s.version = Wallee::VERSION
|
|
26
26
|
s.platform = Gem::Platform::RUBY
|
|
27
|
-
s.authors = ["
|
|
28
|
-
s.email = ["info@
|
|
27
|
+
s.authors = ["wallee AG"]
|
|
28
|
+
s.email = ["info@wallee.com"]
|
|
29
29
|
s.homepage = "https://app-wallee.com/"
|
|
30
30
|
s.summary = "A ruby wrapper around the wallee API."
|
|
31
31
|
s.description = "The wallee SDK allows an easy interaction with the wallee web service."
|
|
@@ -34,6 +34,7 @@ Gem::Specification.new do |s|
|
|
|
34
34
|
|
|
35
35
|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
|
36
36
|
s.add_runtime_dependency 'json', '~> 2.3', '>= 2.3.0'
|
|
37
|
+
s.add_runtime_dependency 'addressable', '~> 2.3', '>= 2.3.0'
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
|