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.
Files changed (132) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +21 -11
  3. data/lib/wallee-ruby-sdk/models/abstract_debt_collection_case_update.rb +270 -0
  4. data/lib/wallee-ruby-sdk/models/abstract_payment_link_update.rb +302 -0
  5. data/lib/wallee-ruby-sdk/models/abstract_subscription_affiliate_update.rb +230 -0
  6. data/lib/wallee-ruby-sdk/models/abstract_transaction_pending.rb +14 -4
  7. data/lib/wallee-ruby-sdk/models/criteria_operator.rb +1 -0
  8. data/lib/wallee-ruby-sdk/models/debt_collection_case.rb +502 -0
  9. data/lib/wallee-ruby-sdk/models/debt_collection_case_create.rb +310 -0
  10. data/lib/wallee-ruby-sdk/models/debt_collection_case_document.rb +300 -0
  11. data/lib/wallee-ruby-sdk/models/debt_collection_case_source.rb +232 -0
  12. data/lib/wallee-ruby-sdk/models/debt_collection_case_state.rb +48 -0
  13. data/lib/wallee-ruby-sdk/models/debt_collection_case_update.rb +300 -0
  14. data/lib/wallee-ruby-sdk/models/debt_collection_environment.rb +43 -0
  15. data/lib/wallee-ruby-sdk/models/debt_collection_receipt.rb +288 -0
  16. data/lib/wallee-ruby-sdk/models/debt_collection_receipt_source.rb +222 -0
  17. data/lib/wallee-ruby-sdk/models/debt_collector.rb +222 -0
  18. data/lib/wallee-ruby-sdk/models/debt_collector_condition.rb +258 -0
  19. data/lib/wallee-ruby-sdk/models/debt_collector_condition_type.rb +222 -0
  20. data/lib/wallee-ruby-sdk/models/debt_collector_configuration.rb +302 -0
  21. data/lib/wallee-ruby-sdk/models/document_template_type.rb +1 -11
  22. data/lib/wallee-ruby-sdk/models/entity_export_request.rb +215 -0
  23. data/lib/wallee-ruby-sdk/models/entity_query.rb +1 -1
  24. data/lib/wallee-ruby-sdk/models/entity_query_order_by.rb +10 -0
  25. data/lib/wallee-ruby-sdk/models/environment.rb +43 -0
  26. data/lib/wallee-ruby-sdk/models/metric_usage.rb +232 -0
  27. data/lib/wallee-ruby-sdk/models/payment_connector.rb +23 -1
  28. data/lib/wallee-ruby-sdk/models/payment_contract.rb +338 -0
  29. data/lib/wallee-ruby-sdk/models/payment_contract_state.rb +46 -0
  30. data/lib/wallee-ruby-sdk/models/payment_contract_type.rb +232 -0
  31. data/lib/wallee-ruby-sdk/models/payment_link.rb +382 -0
  32. data/lib/wallee-ruby-sdk/models/payment_link_active.rb +342 -0
  33. data/lib/wallee-ruby-sdk/models/payment_link_create.rb +337 -0
  34. data/lib/wallee-ruby-sdk/models/payment_link_protection_mode.rb +43 -0
  35. data/lib/wallee-ruby-sdk/models/payment_link_update.rb +332 -0
  36. data/lib/wallee-ruby-sdk/models/payment_method.rb +13 -1
  37. data/lib/wallee-ruby-sdk/models/payment_processor_configuration.rb +11 -1
  38. data/lib/wallee-ruby-sdk/models/refund.rb +11 -1
  39. data/lib/wallee-ruby-sdk/models/rest_address_format.rb +234 -0
  40. data/lib/wallee-ruby-sdk/models/rest_address_format_field.rb +51 -0
  41. data/lib/wallee-ruby-sdk/models/rest_country.rb +11 -1
  42. data/lib/wallee-ruby-sdk/models/subscription.rb +11 -1
  43. data/lib/wallee-ruby-sdk/models/subscription_affiliate.rb +290 -0
  44. data/lib/wallee-ruby-sdk/models/subscription_affiliate_create.rb +255 -0
  45. data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleted.rb +290 -0
  46. data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleting.rb +290 -0
  47. data/lib/wallee-ruby-sdk/models/subscription_affiliate_inactive.rb +260 -0
  48. data/lib/wallee-ruby-sdk/models/subscription_affiliate_update.rb +260 -0
  49. data/lib/wallee-ruby-sdk/models/subscription_change_request.rb +2 -2
  50. data/lib/wallee-ruby-sdk/models/subscription_create_request.rb +2 -2
  51. data/lib/wallee-ruby-sdk/models/subscription_pending.rb +11 -1
  52. data/lib/wallee-ruby-sdk/models/tokenizationn_mode.rb +44 -0
  53. data/lib/wallee-ruby-sdk/models/transaction.rb +63 -3
  54. data/lib/wallee-ruby-sdk/models/transaction_create.rb +41 -1
  55. data/lib/wallee-ruby-sdk/models/transaction_environment_selection_strategy.rb +43 -0
  56. data/lib/wallee-ruby-sdk/models/transaction_invoice.rb +11 -1
  57. data/lib/wallee-ruby-sdk/models/transaction_pending.rb +11 -1
  58. data/lib/wallee-ruby-sdk/models/unencrypted_card_data.rb +228 -0
  59. data/lib/wallee-ruby-sdk/models/unencrypted_card_data_create.rb +233 -0
  60. data/lib/wallee-ruby-sdk/models/webhook_listener_entity.rb +1 -11
  61. data/lib/wallee-ruby-sdk/services/account_service_api.rb +2 -2
  62. data/lib/wallee-ruby-sdk/services/application_user_service_api.rb +2 -2
  63. data/lib/wallee-ruby-sdk/services/card_processing_service_api.rb +176 -0
  64. data/lib/wallee-ruby-sdk/services/charge_attempt_service_api.rb +2 -2
  65. data/lib/wallee-ruby-sdk/services/charge_flow_level_service_api.rb +4 -4
  66. data/lib/wallee-ruby-sdk/services/charge_flow_service_api.rb +6 -6
  67. data/lib/wallee-ruby-sdk/services/condition_type_service_api.rb +4 -4
  68. data/lib/wallee-ruby-sdk/services/country_service_api.rb +2 -2
  69. data/lib/wallee-ruby-sdk/services/country_state_service_api.rb +4 -4
  70. data/lib/wallee-ruby-sdk/services/currency_service_api.rb +2 -2
  71. data/lib/wallee-ruby-sdk/services/debt_collection_case_service_api.rb +800 -0
  72. data/lib/wallee-ruby-sdk/services/debt_collector_configuration_service_api.rb +217 -0
  73. data/lib/wallee-ruby-sdk/services/debt_collector_service_api.rb +143 -0
  74. data/lib/wallee-ruby-sdk/services/delivery_indication_service_api.rb +6 -6
  75. data/lib/wallee-ruby-sdk/services/document_template_service_api.rb +2 -2
  76. data/lib/wallee-ruby-sdk/services/document_template_type_service_api.rb +4 -4
  77. data/lib/wallee-ruby-sdk/services/human_user_service_api.rb +59 -2
  78. data/lib/wallee-ruby-sdk/services/installment_payment_service_api.rb +4 -4
  79. data/lib/wallee-ruby-sdk/services/installment_payment_slice_service_api.rb +2 -2
  80. data/lib/wallee-ruby-sdk/services/installment_plan_calculation_service_api.rb +2 -2
  81. data/lib/wallee-ruby-sdk/services/installment_plan_configuration_service_api.rb +2 -2
  82. data/lib/wallee-ruby-sdk/services/installment_plan_slice_configuration_service_api.rb +2 -2
  83. data/lib/wallee-ruby-sdk/services/label_description_group_service_api.rb +4 -4
  84. data/lib/wallee-ruby-sdk/services/label_description_service_api.rb +4 -4
  85. data/lib/wallee-ruby-sdk/services/language_service_api.rb +2 -2
  86. data/lib/wallee-ruby-sdk/services/legal_organization_form_service_api.rb +201 -0
  87. data/lib/wallee-ruby-sdk/services/manual_task_service_api.rb +2 -2
  88. data/lib/wallee-ruby-sdk/services/mertic_usage_service_api.rb +100 -0
  89. data/lib/wallee-ruby-sdk/services/payment_connector_configuration_service_api.rb +2 -2
  90. data/lib/wallee-ruby-sdk/services/payment_connector_service_api.rb +4 -4
  91. data/lib/wallee-ruby-sdk/services/payment_link_service_api.rb +402 -0
  92. data/lib/wallee-ruby-sdk/services/payment_method_configuration_service_api.rb +2 -2
  93. data/lib/wallee-ruby-sdk/services/payment_method_service_api.rb +4 -4
  94. data/lib/wallee-ruby-sdk/services/payment_processor_configuration_service_api.rb +2 -2
  95. data/lib/wallee-ruby-sdk/services/payment_processor_service_api.rb +4 -4
  96. data/lib/wallee-ruby-sdk/services/permission_service_api.rb +4 -4
  97. data/lib/wallee-ruby-sdk/services/refund_service_api.rb +10 -10
  98. data/lib/wallee-ruby-sdk/services/space_service_api.rb +2 -2
  99. data/lib/wallee-ruby-sdk/services/static_value_service_api.rb +4 -4
  100. data/lib/wallee-ruby-sdk/services/subscriber_service_api.rb +2 -2
  101. data/lib/wallee-ruby-sdk/services/subscription_affiliate_service_api.rb +402 -0
  102. data/lib/wallee-ruby-sdk/services/subscription_charge_service_api.rb +4 -4
  103. data/lib/wallee-ruby-sdk/services/subscription_ledger_entry_service_api.rb +2 -2
  104. data/lib/wallee-ruby-sdk/services/subscription_metric_service_api.rb +2 -2
  105. data/lib/wallee-ruby-sdk/services/subscription_metric_usage_service_api.rb +2 -2
  106. data/lib/wallee-ruby-sdk/services/subscription_period_bill_service_api.rb +2 -2
  107. data/lib/wallee-ruby-sdk/services/subscription_product_component_group_service_api.rb +2 -2
  108. data/lib/wallee-ruby-sdk/services/subscription_product_component_service_api.rb +2 -2
  109. data/lib/wallee-ruby-sdk/services/subscription_product_fee_tier_service_api.rb +2 -2
  110. data/lib/wallee-ruby-sdk/services/subscription_product_metered_fee_service_api.rb +2 -2
  111. data/lib/wallee-ruby-sdk/services/subscription_product_period_fee_service_api.rb +2 -2
  112. data/lib/wallee-ruby-sdk/services/subscription_product_retirement_service_api.rb +2 -2
  113. data/lib/wallee-ruby-sdk/services/subscription_product_service_api.rb +2 -2
  114. data/lib/wallee-ruby-sdk/services/subscription_product_setup_fee_service_api.rb +2 -2
  115. data/lib/wallee-ruby-sdk/services/subscription_product_version_retirement_service_api.rb +2 -2
  116. data/lib/wallee-ruby-sdk/services/subscription_product_version_service_api.rb +2 -2
  117. data/lib/wallee-ruby-sdk/services/subscription_service_api.rb +12 -12
  118. data/lib/wallee-ruby-sdk/services/subscription_suspension_service_api.rb +2 -2
  119. data/lib/wallee-ruby-sdk/services/subscription_version_service_api.rb +2 -2
  120. data/lib/wallee-ruby-sdk/services/token_service_api.rb +2 -2
  121. data/lib/wallee-ruby-sdk/services/token_version_service_api.rb +4 -4
  122. data/lib/wallee-ruby-sdk/services/transaction_completion_service_api.rb +6 -6
  123. data/lib/wallee-ruby-sdk/services/transaction_invoice_service_api.rb +6 -6
  124. data/lib/wallee-ruby-sdk/services/transaction_service_api.rb +143 -18
  125. data/lib/wallee-ruby-sdk/services/transaction_void_service_api.rb +6 -6
  126. data/lib/wallee-ruby-sdk/services/user_account_role_service_api.rb +6 -6
  127. data/lib/wallee-ruby-sdk/services/user_space_role_service_api.rb +9 -9
  128. data/lib/wallee-ruby-sdk/services/webhook_listener_service_api.rb +2 -2
  129. data/lib/wallee-ruby-sdk/services/webhook_url_service_api.rb +2 -2
  130. data/lib/wallee-ruby-sdk/version.rb +1 -1
  131. data/lib/wallee-ruby-sdk.rb +47 -0
  132. metadata +50 -3
@@ -0,0 +1,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 TransactionEnvironmentSelectionStrategy
26
+
27
+ FORCE_TEST_ENVIRONMENT = "FORCE_TEST_ENVIRONMENT".freeze
28
+ USE_CONFIGURATION = "USE_CONFIGURATION".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 = TransactionEnvironmentSelectionStrategy.constants.select{|c| c.to_s == value}
36
+ raise "Invalid ENUM value #{value} for class #TransactionEnvironmentSelectionStrategy" if consantValues.empty?
37
+
38
+ value
39
+
40
+ end
41
+ end
42
+
43
+ end
@@ -48,6 +48,9 @@ module Wallee
48
48
  # The date on which the invoice should be paid on.
49
49
  attr_accessor :due_on
50
50
 
51
+ #
52
+ attr_accessor :environment
53
+
51
54
  #
52
55
  attr_accessor :external_id
53
56
 
@@ -93,6 +96,7 @@ module Wallee
93
96
  :'created_on' => :'createdOn',
94
97
  :'derecognized_on' => :'derecognizedOn',
95
98
  :'due_on' => :'dueOn',
99
+ :'environment' => :'environment',
96
100
  :'external_id' => :'externalId',
97
101
  :'language' => :'language',
98
102
  :'line_items' => :'lineItems',
@@ -118,6 +122,7 @@ module Wallee
118
122
  :'created_on' => :'DateTime',
119
123
  :'derecognized_on' => :'DateTime',
120
124
  :'due_on' => :'DateTime',
125
+ :'environment' => :'Environment',
121
126
  :'external_id' => :'String',
122
127
  :'language' => :'String',
123
128
  :'line_items' => :'Array<LineItem>',
@@ -172,6 +177,10 @@ module Wallee
172
177
  self.due_on = attributes[:'dueOn']
173
178
  end
174
179
 
180
+ if attributes.has_key?(:'environment')
181
+ self.environment = attributes[:'environment']
182
+ end
183
+
175
184
  if attributes.has_key?(:'externalId')
176
185
  self.external_id = attributes[:'externalId']
177
186
  end
@@ -246,6 +255,7 @@ module Wallee
246
255
  created_on == o.created_on &&
247
256
  derecognized_on == o.derecognized_on &&
248
257
  due_on == o.due_on &&
258
+ environment == o.environment &&
249
259
  external_id == o.external_id &&
250
260
  language == o.language &&
251
261
  line_items == o.line_items &&
@@ -268,7 +278,7 @@ module Wallee
268
278
  # Calculates hash code according to all attributes.
269
279
  # @return [Fixnum] Hash code
270
280
  def hash
271
- [id, linked_space_id, linked_transaction, amount, completion, created_on, derecognized_on, due_on, external_id, language, line_items, merchant_reference, outstanding_amount, paid_on, planned_purge_date, space_view_id, state, tax_amount, version].hash
281
+ [id, linked_space_id, linked_transaction, amount, completion, created_on, derecognized_on, due_on, environment, external_id, language, line_items, merchant_reference, outstanding_amount, paid_on, planned_purge_date, space_view_id, state, tax_amount, version].hash
272
282
  end
273
283
 
274
284
  # Builds the object from hash
@@ -75,6 +75,9 @@ module Wallee
75
75
  #
76
76
  attr_accessor :token
77
77
 
78
+ # The tokenization mode controls if and how a token is automatically applied to the transaction. When a token is directly assigned to the transaction the mode will have no effect at all. Obmitting the mode will disable the automatic application of a token.
79
+ attr_accessor :tokenization_mode
80
+
78
81
  # The ID is the primary key of the entity. The ID identifies the entity uniquely.
79
82
  attr_accessor :id
80
83
 
@@ -102,6 +105,7 @@ module Wallee
102
105
  :'success_url' => :'successUrl',
103
106
  :'time_zone' => :'timeZone',
104
107
  :'token' => :'token',
108
+ :'tokenization_mode' => :'tokenizationMode',
105
109
  :'id' => :'id',
106
110
  :'version' => :'version'
107
111
  }
@@ -127,6 +131,7 @@ module Wallee
127
131
  :'success_url' => :'String',
128
132
  :'time_zone' => :'String',
129
133
  :'token' => :'Integer',
134
+ :'tokenization_mode' => :'TokenizationnMode',
130
135
  :'id' => :'Integer',
131
136
  :'version' => :'Integer'
132
137
  }
@@ -216,6 +221,10 @@ module Wallee
216
221
  self.token = attributes[:'token']
217
222
  end
218
223
 
224
+ if attributes.has_key?(:'tokenizationMode')
225
+ self.tokenization_mode = attributes[:'tokenizationMode']
226
+ end
227
+
219
228
  if attributes.has_key?(:'id')
220
229
  self.id = attributes[:'id']
221
230
  end
@@ -271,6 +280,7 @@ module Wallee
271
280
  success_url == o.success_url &&
272
281
  time_zone == o.time_zone &&
273
282
  token == o.token &&
283
+ tokenization_mode == o.tokenization_mode &&
274
284
  id == o.id &&
275
285
  version == o.version
276
286
  end
@@ -284,7 +294,7 @@ module Wallee
284
294
  # Calculates hash code according to all attributes.
285
295
  # @return [Fixnum] Hash code
286
296
  def hash
287
- [allowed_payment_method_brands, allowed_payment_method_configurations, billing_address, currency, customer_email_address, customer_id, failed_url, invoice_merchant_reference, language, line_items, merchant_reference, meta_data, shipping_address, shipping_method, success_url, time_zone, token, id, version].hash
297
+ [allowed_payment_method_brands, allowed_payment_method_configurations, billing_address, currency, customer_email_address, customer_id, failed_url, invoice_merchant_reference, language, line_items, merchant_reference, meta_data, shipping_address, shipping_method, success_url, time_zone, token, tokenization_mode, id, version].hash
288
298
  end
289
299
 
290
300
  # Builds the object from hash
@@ -0,0 +1,228 @@
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
+ # This model holds the card data in plain.
26
+ class UnencryptedCardData
27
+ # The card holder name is the name printed onto the card. It identifies the person who owns the card.
28
+ attr_accessor :card_holder_name
29
+
30
+ # The card verification code (CVC) is a 3 to 4 digit code typically printed on the back of the card. It helps to ensure that the card holder is authorizing the transaction. For card not-present transactions this field is optional.
31
+ attr_accessor :card_verification_code
32
+
33
+ # The card expiry date indicates when the card expires. The format is the format yyyy-mm where yyyy is the year (e.g. 2019) and the mm is the month (e.g. 09).
34
+ attr_accessor :expiry_date
35
+
36
+ # The primary account number (PAN) identifies the card. The number is numeric and typically printed on the front of the card.
37
+ attr_accessor :primary_account_number
38
+
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'card_holder_name' => :'cardHolderName',
44
+ :'card_verification_code' => :'cardVerificationCode',
45
+ :'expiry_date' => :'expiryDate',
46
+ :'primary_account_number' => :'primaryAccountNumber'
47
+ }
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.swagger_types
52
+ {
53
+ :'card_holder_name' => :'String',
54
+ :'card_verification_code' => :'String',
55
+ :'expiry_date' => :'String',
56
+ :'primary_account_number' => :'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?(:'cardHolderName')
69
+ self.card_holder_name = attributes[:'cardHolderName']
70
+ end
71
+
72
+ if attributes.has_key?(:'cardVerificationCode')
73
+ self.card_verification_code = attributes[:'cardVerificationCode']
74
+ end
75
+
76
+ if attributes.has_key?(:'expiryDate')
77
+ self.expiry_date = attributes[:'expiryDate']
78
+ end
79
+
80
+ if attributes.has_key?(:'primaryAccountNumber')
81
+ self.primary_account_number = attributes[:'primaryAccountNumber']
82
+ end
83
+
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properies with the reasons
88
+ def list_invalid_properties
89
+ invalid_properties = Array.new
90
+ return invalid_properties
91
+ end
92
+
93
+ # Check to see if the all the properties in the model are valid
94
+ # @return true if the model is valid
95
+ def valid?
96
+ return true
97
+ end
98
+
99
+ # Checks equality by comparing each attribute.
100
+ # @param [Object] Object to be compared
101
+ def ==(o)
102
+ return true if self.equal?(o)
103
+ self.class == o.class &&
104
+ card_holder_name == o.card_holder_name &&
105
+ card_verification_code == o.card_verification_code &&
106
+ expiry_date == o.expiry_date &&
107
+ primary_account_number == o.primary_account_number
108
+ end
109
+
110
+ # @see the `==` method
111
+ # @param [Object] Object to be compared
112
+ def eql?(o)
113
+ self == o
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Fixnum] Hash code
118
+ def hash
119
+ [card_holder_name, card_verification_code, expiry_date, primary_account_number].hash
120
+ end
121
+
122
+ # Builds the object from hash
123
+ # @param [Hash] attributes Model attributes in the form of hash
124
+ # @return [Object] Returns the model itself
125
+ def build_from_hash(attributes)
126
+ return nil unless attributes.is_a?(Hash)
127
+ self.class.swagger_types.each_pair do |key, type|
128
+ if type =~ /\AArray<(.*)>/i
129
+ # check to ensure the input is an array given that the the attribute
130
+ # is documented as an array but the input is not
131
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
132
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
133
+ end
134
+ elsif !attributes[self.class.attribute_map[key]].nil?
135
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
136
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
137
+ end
138
+
139
+ self
140
+ end
141
+
142
+ # Deserializes the data based on type
143
+ # @param string type Data type
144
+ # @param string value Value to be deserialized
145
+ # @return [Object] Deserialized data
146
+ def _deserialize(type, value)
147
+ case type.to_sym
148
+ when :DateTime
149
+ DateTime.parse(value)
150
+ when :Date
151
+ Date.parse(value)
152
+ when :String
153
+ value.to_s
154
+ when :Integer
155
+ value.to_i
156
+ when :Float
157
+ value.to_f
158
+ when :BOOLEAN
159
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
160
+ true
161
+ else
162
+ false
163
+ end
164
+ when :Object
165
+ # generic object (usually a Hash), return directly
166
+ value
167
+ when /\AArray<(?<inner_type>.+)>\z/
168
+ inner_type = Regexp.last_match[:inner_type]
169
+ value.map { |v| _deserialize(inner_type, v) }
170
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
171
+ k_type = Regexp.last_match[:k_type]
172
+ v_type = Regexp.last_match[:v_type]
173
+ {}.tap do |hash|
174
+ value.each do |k, v|
175
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
176
+ end
177
+ end
178
+ else # model
179
+ temp_model = Wallee.const_get(type).new
180
+ temp_model.build_from_hash(value)
181
+ end
182
+ end
183
+
184
+ # Returns the string representation of the object
185
+ # @return [String] String presentation of the object
186
+ def to_s
187
+ to_hash.to_s
188
+ end
189
+
190
+ # to_body is an alias to to_hash (backward compatibility)
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_body
193
+ to_hash
194
+ end
195
+
196
+ # Returns the object in the form of hash
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_hash
199
+ hash = {}
200
+ self.class.attribute_map.each_pair do |attr, param|
201
+ value = self.send(attr)
202
+ next if value.nil?
203
+ hash[param] = _to_hash(value)
204
+ end
205
+ hash
206
+ end
207
+
208
+ # Outputs non-array value in the form of hash
209
+ # For object, use to_hash. Otherwise, just return the value
210
+ # @param [Object] value Any valid value
211
+ # @return [Hash] Returns the value in the form of hash
212
+ def _to_hash(value)
213
+ if value.is_a?(Array)
214
+ value.compact.map{ |v| _to_hash(v) }
215
+ elsif value.is_a?(Hash)
216
+ {}.tap do |hash|
217
+ value.each { |k, v| hash[k] = _to_hash(v) }
218
+ end
219
+ elsif value.respond_to? :to_hash
220
+ value.to_hash
221
+ else
222
+ value
223
+ end
224
+ end
225
+
226
+ end
227
+
228
+ end
@@ -0,0 +1,233 @@
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
+ # This model holds the card data in plain.
26
+ class UnencryptedCardDataCreate
27
+ # The card holder name is the name printed onto the card. It identifies the person who owns the card.
28
+ attr_accessor :card_holder_name
29
+
30
+ # The card verification code (CVC) is a 3 to 4 digit code typically printed on the back of the card. It helps to ensure that the card holder is authorizing the transaction. For card not-present transactions this field is optional.
31
+ attr_accessor :card_verification_code
32
+
33
+ # The card expiry date indicates when the card expires. The format is the format yyyy-mm where yyyy is the year (e.g. 2019) and the mm is the month (e.g. 09).
34
+ attr_accessor :expiry_date
35
+
36
+ # The primary account number (PAN) identifies the card. The number is numeric and typically printed on the front of the card.
37
+ attr_accessor :primary_account_number
38
+
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'card_holder_name' => :'cardHolderName',
44
+ :'card_verification_code' => :'cardVerificationCode',
45
+ :'expiry_date' => :'expiryDate',
46
+ :'primary_account_number' => :'primaryAccountNumber'
47
+ }
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.swagger_types
52
+ {
53
+ :'card_holder_name' => :'String',
54
+ :'card_verification_code' => :'String',
55
+ :'expiry_date' => :'String',
56
+ :'primary_account_number' => :'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?(:'cardHolderName')
69
+ self.card_holder_name = attributes[:'cardHolderName']
70
+ end
71
+
72
+ if attributes.has_key?(:'cardVerificationCode')
73
+ self.card_verification_code = attributes[:'cardVerificationCode']
74
+ end
75
+
76
+ if attributes.has_key?(:'expiryDate')
77
+ self.expiry_date = attributes[:'expiryDate']
78
+ end
79
+
80
+ if attributes.has_key?(:'primaryAccountNumber')
81
+ self.primary_account_number = attributes[:'primaryAccountNumber']
82
+ end
83
+
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properies with the reasons
88
+ def list_invalid_properties
89
+ invalid_properties = Array.new
90
+ if @primary_account_number.nil?
91
+ invalid_properties.push("invalid value for 'primary_account_number', primary_account_number cannot be nil.")
92
+ end
93
+
94
+ return invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ return false if @primary_account_number.nil?
101
+ return true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ card_holder_name == o.card_holder_name &&
110
+ card_verification_code == o.card_verification_code &&
111
+ expiry_date == o.expiry_date &&
112
+ primary_account_number == o.primary_account_number
113
+ end
114
+
115
+ # @see the `==` method
116
+ # @param [Object] Object to be compared
117
+ def eql?(o)
118
+ self == o
119
+ end
120
+
121
+ # Calculates hash code according to all attributes.
122
+ # @return [Fixnum] Hash code
123
+ def hash
124
+ [card_holder_name, card_verification_code, expiry_date, primary_account_number].hash
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ self.class.swagger_types.each_pair do |key, type|
133
+ if type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
137
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
138
+ end
139
+ elsif !attributes[self.class.attribute_map[key]].nil?
140
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
142
+ end
143
+
144
+ self
145
+ end
146
+
147
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def _deserialize(type, value)
152
+ case type.to_sym
153
+ when :DateTime
154
+ DateTime.parse(value)
155
+ when :Date
156
+ Date.parse(value)
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :BOOLEAN
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else # model
184
+ temp_model = Wallee.const_get(type).new
185
+ temp_model.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ next if value.nil?
208
+ hash[param] = _to_hash(value)
209
+ end
210
+ hash
211
+ end
212
+
213
+ # Outputs non-array value in the form of hash
214
+ # For object, use to_hash. Otherwise, just return the value
215
+ # @param [Object] value Any valid value
216
+ # @return [Hash] Returns the value in the form of hash
217
+ def _to_hash(value)
218
+ if value.is_a?(Array)
219
+ value.compact.map{ |v| _to_hash(v) }
220
+ elsif value.is_a?(Hash)
221
+ {}.tap do |hash|
222
+ value.each { |k, v| hash[k] = _to_hash(v) }
223
+ end
224
+ elsif value.respond_to? :to_hash
225
+ value.to_hash
226
+ else
227
+ value
228
+ end
229
+ end
230
+
231
+ end
232
+
233
+ end
@@ -24,9 +24,6 @@ require 'date'
24
24
  module Wallee
25
25
  #
26
26
  class WebhookListenerEntity
27
- #
28
- attr_accessor :display_name
29
-
30
27
  # The ID is the primary key of the entity. The ID identifies the entity uniquely.
31
28
  attr_accessor :id
32
29
 
@@ -40,7 +37,6 @@ module Wallee
40
37
  # Attribute mapping from ruby-style variable name to JSON key.
41
38
  def self.attribute_map
42
39
  {
43
- :'display_name' => :'displayName',
44
40
  :'id' => :'id',
45
41
  :'name' => :'name',
46
42
  :'technical_name' => :'technicalName'
@@ -50,7 +46,6 @@ module Wallee
50
46
  # Attribute type mapping.
51
47
  def self.swagger_types
52
48
  {
53
- :'display_name' => :'String',
54
49
  :'id' => :'Integer',
55
50
  :'name' => :'Hash<String, String>',
56
51
  :'technical_name' => :'String'
@@ -65,10 +60,6 @@ module Wallee
65
60
  # convert string to symbol for hash key
66
61
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
67
62
 
68
- if attributes.has_key?(:'displayName')
69
- self.display_name = attributes[:'displayName']
70
- end
71
-
72
63
  if attributes.has_key?(:'id')
73
64
  self.id = attributes[:'id']
74
65
  end
@@ -103,7 +94,6 @@ module Wallee
103
94
  def ==(o)
104
95
  return true if self.equal?(o)
105
96
  self.class == o.class &&
106
- display_name == o.display_name &&
107
97
  id == o.id &&
108
98
  name == o.name &&
109
99
  technical_name == o.technical_name
@@ -118,7 +108,7 @@ module Wallee
118
108
  # Calculates hash code according to all attributes.
119
109
  # @return [Fixnum] Hash code
120
110
  def hash
121
- [display_name, id, name, technical_name].hash
111
+ [id, name, technical_name].hash
122
112
  end
123
113
 
124
114
  # Builds the object from hash
@@ -229,11 +229,11 @@ module Wallee
229
229
  header_params = {}
230
230
 
231
231
  # HTTP header 'Accept' (if needed)
232
- local_header_accept = ['*/*']
232
+ local_header_accept = ['application/json;charset=utf-8']
233
233
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
234
234
 
235
235
  # HTTP header 'Content-Type'
236
- local_header_content_type = ['application/json;charset=utf-8']
236
+ local_header_content_type = ['*/*']
237
237
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
238
238
 
239
239
  # form parameters
@@ -229,11 +229,11 @@ module Wallee
229
229
  header_params = {}
230
230
 
231
231
  # HTTP header 'Accept' (if needed)
232
- local_header_accept = ['*/*']
232
+ local_header_accept = ['application/json;charset=utf-8']
233
233
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
234
234
 
235
235
  # HTTP header 'Content-Type'
236
- local_header_content_type = ['application/json;charset=utf-8']
236
+ local_header_content_type = ['*/*']
237
237
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
238
238
 
239
239
  # form parameters