treezor_client 1.11.0 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +20 -20
  3. data/README.md +2 -1
  4. data/docs/Body11.md +9 -0
  5. data/docs/CardApi.md +0 -53
  6. data/docs/CardDigitalization.md +1 -1
  7. data/docs/CardReserveApi.md +4 -10
  8. data/docs/CardtransactionApi.md +1 -1
  9. data/docs/InlineResponse20010Cardtransactions.md +1 -0
  10. data/docs/InlineResponse20016.md +1 -1
  11. data/docs/InlineResponse2009Cardtransactions.md +1 -0
  12. data/docs/MerchantIdRestrictionGroupsApi.md +67 -0
  13. data/docs/UserApi.md +6 -6
  14. data/docs/WalletApi.md +1 -5
  15. data/lib/treezor_client.rb +1 -0
  16. data/lib/treezor_client/api/card_api.rb +0 -48
  17. data/lib/treezor_client/api/card_reserve_api.rb +6 -20
  18. data/lib/treezor_client/api/cardtransaction_api.rb +2 -2
  19. data/lib/treezor_client/api/merchant_id_restriction_groups_api.rb +68 -0
  20. data/lib/treezor_client/api/user_api.rb +6 -6
  21. data/lib/treezor_client/api/wallet_api.rb +2 -8
  22. data/lib/treezor_client/models/body_11.rb +230 -0
  23. data/lib/treezor_client/models/card_digitalization.rb +1 -1
  24. data/lib/treezor_client/models/inline_response_200_10_cardtransactions.rb +10 -1
  25. data/lib/treezor_client/models/inline_response_200_16.rb +8 -8
  26. data/lib/treezor_client/models/inline_response_200_9_cardtransactions.rb +10 -1
  27. data/lib/treezor_client/models/payin.rb +2 -2
  28. data/lib/treezor_client/version.rb +1 -1
  29. data/original_treezor_api_spec.yaml +111 -78
  30. data/pkg/treezor_client-1.0.0.gem +0 -0
  31. data/pkg/treezor_client-1.1.0.gem +0 -0
  32. data/pkg/treezor_client-1.2.0.gem +0 -0
  33. data/pkg/treezor_client-1.3.0.gem +0 -0
  34. data/pkg/treezor_client-1.4.0.gem +0 -0
  35. data/spec/models/body_11_spec.rb +51 -0
  36. data/treezor_api_spec.yaml +99 -73
  37. metadata +11 -3
  38. data/pkg/treezor_client-1.10.0.gem +0 -0
@@ -24,6 +24,7 @@ require 'treezor_client/models/beneficiary'
24
24
  require 'treezor_client/models/body'
25
25
  require 'treezor_client/models/body_1'
26
26
  require 'treezor_client/models/body_10'
27
+ require 'treezor_client/models/body_11'
27
28
  require 'treezor_client/models/body_2'
28
29
  require 'treezor_client/models/body_3'
29
30
  require 'treezor_client/models/body_4'
@@ -544,54 +544,6 @@ module TreezorClient
544
544
  end
545
545
  return data, status_code, headers
546
546
  end
547
- # deactivate a card
548
- # @param id Card's id.
549
- # @param [Hash] opts the optional parameters
550
- # @return [InlineResponse2005]
551
- def cards_id_delete(id, opts = {})
552
- data, _status_code, _headers = cards_id_delete_with_http_info(id, opts)
553
- data
554
- end
555
-
556
- # deactivate a card
557
- # @param id Card's id.
558
- # @param [Hash] opts the optional parameters
559
- # @return [Array<(InlineResponse2005, Fixnum, Hash)>] InlineResponse2005 data, response status code and response headers
560
- def cards_id_delete_with_http_info(id, opts = {})
561
- if @api_client.config.debugging
562
- @api_client.config.logger.debug 'Calling API: CardApi.cards_id_delete ...'
563
- end
564
- # verify the required parameter 'id' is set
565
- if @api_client.config.client_side_validation && id.nil?
566
- fail ArgumentError, "Missing the required parameter 'id' when calling CardApi.cards_id_delete"
567
- end
568
- # resource path
569
- local_var_path = '/cards/{id}'.sub('{' + 'id' + '}', id.to_s)
570
-
571
- # query parameters
572
- query_params = {}
573
-
574
- # header parameters
575
- header_params = {}
576
-
577
- # form parameters
578
- form_params = {}
579
-
580
- # http body (model)
581
- post_body = nil
582
- auth_names = ['api_key']
583
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
584
- :header_params => header_params,
585
- :query_params => query_params,
586
- :form_params => form_params,
587
- :body => post_body,
588
- :auth_names => auth_names,
589
- :return_type => 'InlineResponse2005')
590
- if @api_client.config.debugging
591
- @api_client.config.logger.debug "API called: CardApi#cards_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
592
- end
593
- return data, status_code, headers
594
- end
595
547
  # get a card
596
548
  # @param id Card&#39;s id.
597
549
  # @param [Hash] opts the optional parameters
@@ -21,7 +21,6 @@ module TreezorClient
21
21
  end
22
22
  # add an amount to the reserved amount of a card
23
23
  # add an amount to the reserved amount of a card
24
- # @param id the cardId of the reserved amount you want to pick up
25
24
  # @param [Hash] opts the optional parameters
26
25
  # @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](https://agent.treezor.com/security-authentication).
27
26
  # @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](https://www.treezor.com/basics).
@@ -29,14 +28,13 @@ module TreezorClient
29
28
  # @option opts [String] :access_user_ip Access user&#39;s ip is used for user&#39;s action restriction. More info [here](https://www.treezor.com/basics).
30
29
  # @option opts [Body2] :body
31
30
  # @return [Float]
32
- def card_reserve_add_to(id, opts = {})
33
- data, _status_code, _headers = card_reserve_add_to_with_http_info(id, opts)
31
+ def card_reserve_add_to(opts = {})
32
+ data, _status_code, _headers = card_reserve_add_to_with_http_info(opts)
34
33
  data
35
34
  end
36
35
 
37
36
  # add an amount to the reserved amount of a card
38
37
  # add an amount to the reserved amount of a card
39
- # @param id the cardId of the reserved amount you want to pick up
40
38
  # @param [Hash] opts the optional parameters
41
39
  # @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](https://agent.treezor.com/security-authentication).
42
40
  # @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](https://www.treezor.com/basics).
@@ -44,20 +42,15 @@ module TreezorClient
44
42
  # @option opts [String] :access_user_ip Access user&#39;s ip is used for user&#39;s action restriction. More info [here](https://www.treezor.com/basics).
45
43
  # @option opts [Body2] :body
46
44
  # @return [Array<(Float, Fixnum, Hash)>] Float data, response status code and response headers
47
- def card_reserve_add_to_with_http_info(id, opts = {})
45
+ def card_reserve_add_to_with_http_info(opts = {})
48
46
  if @api_client.config.debugging
49
47
  @api_client.config.logger.debug 'Calling API: CardReserveApi.card_reserve_add_to ...'
50
48
  end
51
- # verify the required parameter 'id' is set
52
- if @api_client.config.client_side_validation && id.nil?
53
- fail ArgumentError, "Missing the required parameter 'id' when calling CardReserveApi.card_reserve_add_to"
54
- end
55
49
  # resource path
56
50
  local_var_path = '/cardReserves/AddTo'
57
51
 
58
52
  # query parameters
59
53
  query_params = {}
60
- query_params[:'id'] = id
61
54
  query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil?
62
55
  query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil?
63
56
  query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil?
@@ -90,7 +83,6 @@ module TreezorClient
90
83
  end
91
84
  # check reserved amount
92
85
  # Check if an amount can be substract to the reserved amount
93
- # @param id the cardId of the reserved amount you want to pick up
94
86
  # @param [Hash] opts the optional parameters
95
87
  # @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](https://agent.treezor.com/security-authentication).
96
88
  # @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](https://www.treezor.com/basics).
@@ -98,14 +90,13 @@ module TreezorClient
98
90
  # @option opts [String] :access_user_ip Access user&#39;s ip is used for user&#39;s action restriction. More info [here](https://www.treezor.com/basics).
99
91
  # @option opts [Body3] :body
100
92
  # @return [BOOLEAN]
101
- def card_reserve_check(id, opts = {})
102
- data, _status_code, _headers = card_reserve_check_with_http_info(id, opts)
93
+ def card_reserve_check(opts = {})
94
+ data, _status_code, _headers = card_reserve_check_with_http_info(opts)
103
95
  data
104
96
  end
105
97
 
106
98
  # check reserved amount
107
99
  # Check if an amount can be substract to the reserved amount
108
- # @param id the cardId of the reserved amount you want to pick up
109
100
  # @param [Hash] opts the optional parameters
110
101
  # @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](https://agent.treezor.com/security-authentication).
111
102
  # @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](https://www.treezor.com/basics).
@@ -113,20 +104,15 @@ module TreezorClient
113
104
  # @option opts [String] :access_user_ip Access user&#39;s ip is used for user&#39;s action restriction. More info [here](https://www.treezor.com/basics).
114
105
  # @option opts [Body3] :body
115
106
  # @return [Array<(BOOLEAN, Fixnum, Hash)>] BOOLEAN data, response status code and response headers
116
- def card_reserve_check_with_http_info(id, opts = {})
107
+ def card_reserve_check_with_http_info(opts = {})
117
108
  if @api_client.config.debugging
118
109
  @api_client.config.logger.debug 'Calling API: CardReserveApi.card_reserve_check ...'
119
110
  end
120
- # verify the required parameter 'id' is set
121
- if @api_client.config.client_side_validation && id.nil?
122
- fail ArgumentError, "Missing the required parameter 'id' when calling CardReserveApi.card_reserve_check"
123
- end
124
111
  # resource path
125
112
  local_var_path = '/cardReserves/Check'
126
113
 
127
114
  # query parameters
128
115
  query_params = {}
129
- query_params[:'id'] = id
130
116
  query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil?
131
117
  query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil?
132
118
  query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil?
@@ -74,7 +74,7 @@ module TreezorClient
74
74
  return data, status_code, headers
75
75
  end
76
76
  # search for card transactions
77
- # Search for documents.
77
+ # Search for documents. The request must contain at least one of those inputs - cardId, paymentId, publicToken, walletId
78
78
  # @param [Hash] opts the optional parameters
79
79
  # @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](https://agent.treezor.com/security-authentication).
80
80
  # @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](https://agent.treezor.com/basics).
@@ -96,7 +96,7 @@ module TreezorClient
96
96
  end
97
97
 
98
98
  # search for card transactions
99
- # Search for documents.
99
+ # Search for documents. The request must contain at least one of those inputs - cardId, paymentId, publicToken, walletId
100
100
  # @param [Hash] opts the optional parameters
101
101
  # @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](https://agent.treezor.com/security-authentication).
102
102
  # @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](https://agent.treezor.com/basics).
@@ -211,6 +211,74 @@ module TreezorClient
211
211
  end
212
212
  return data, status_code, headers
213
213
  end
214
+ # edit the merchant ID list for a restriction group
215
+ # Edit the merchant ID list for a restriction group in the system.
216
+ # @param id Merchant ID restriction group&#39;s id.
217
+ # @param [Hash] opts the optional parameters
218
+ # @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](https://agent.treezor.com/security-authentication).
219
+ # @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](https://agent.treezor.com/basics).
220
+ # @option opts [Integer] :access_user_id Access user&#39;s id is used for user&#39;s action restriction. More info [here](https://agent.treezor.com/basics).
221
+ # @option opts [String] :access_user_ip Access user&#39;s ip is used for user&#39;s action restriction. More info [here](https://agent.treezor.com/basics).
222
+ # @option opts [Body11] :body
223
+ # @return [InlineResponse20016]
224
+ def merchant_id_restriction_groups_id_delta_update_put(id, opts = {})
225
+ data, _status_code, _headers = merchant_id_restriction_groups_id_delta_update_put_with_http_info(id, opts)
226
+ data
227
+ end
228
+
229
+ # edit the merchant ID list for a restriction group
230
+ # Edit the merchant ID list for a restriction group in the system.
231
+ # @param id Merchant ID restriction group&#39;s id.
232
+ # @param [Hash] opts the optional parameters
233
+ # @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](https://agent.treezor.com/security-authentication).
234
+ # @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](https://agent.treezor.com/basics).
235
+ # @option opts [Integer] :access_user_id Access user&#39;s id is used for user&#39;s action restriction. More info [here](https://agent.treezor.com/basics).
236
+ # @option opts [String] :access_user_ip Access user&#39;s ip is used for user&#39;s action restriction. More info [here](https://agent.treezor.com/basics).
237
+ # @option opts [Body11] :body
238
+ # @return [Array<(InlineResponse20016, Fixnum, Hash)>] InlineResponse20016 data, response status code and response headers
239
+ def merchant_id_restriction_groups_id_delta_update_put_with_http_info(id, opts = {})
240
+ if @api_client.config.debugging
241
+ @api_client.config.logger.debug 'Calling API: MerchantIdRestrictionGroupsApi.merchant_id_restriction_groups_id_delta_update_put ...'
242
+ end
243
+ # verify the required parameter 'id' is set
244
+ if @api_client.config.client_side_validation && id.nil?
245
+ fail ArgumentError, "Missing the required parameter 'id' when calling MerchantIdRestrictionGroupsApi.merchant_id_restriction_groups_id_delta_update_put"
246
+ end
247
+ # resource path
248
+ local_var_path = '/merchantIdRestrictionGroups/{id}/DeltaUpdate/'.sub('{' + 'id' + '}', id.to_s)
249
+
250
+ # query parameters
251
+ query_params = {}
252
+ query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil?
253
+ query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil?
254
+ query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil?
255
+ query_params[:'accessUserIp'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil?
256
+
257
+ # header parameters
258
+ header_params = {}
259
+ # HTTP header 'Accept' (if needed)
260
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
261
+ # HTTP header 'Content-Type'
262
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
263
+
264
+ # form parameters
265
+ form_params = {}
266
+
267
+ # http body (model)
268
+ post_body = @api_client.object_to_http_body(opts[:'body'])
269
+ auth_names = ['api_key']
270
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
271
+ :header_params => header_params,
272
+ :query_params => query_params,
273
+ :form_params => form_params,
274
+ :body => post_body,
275
+ :auth_names => auth_names,
276
+ :return_type => 'InlineResponse20016')
277
+ if @api_client.config.debugging
278
+ @api_client.config.logger.debug "API called: MerchantIdRestrictionGroupsApi#merchant_id_restriction_groups_id_delta_update_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
279
+ end
280
+ return data, status_code, headers
281
+ end
214
282
  # create a merchantIdRestrictionGroup
215
283
  # Create a new merchant ID restriction group in the system.
216
284
  # @param [Hash] opts the optional parameters
@@ -321,7 +321,7 @@ module TreezorClient
321
321
  # @option opts [String] :language User&#39;s prefered language (ISO 639-1)
322
322
  # @option opts [String] :tax_number User&#39;s tax identification number. If the taxResidence is not set to FR, the field is mandatory.
323
323
  # @option opts [String] :tax_residence User&#39;s tax residence country code (2 char code following ISO 3166 norm).
324
- # @option opts [String] :position User&#39;s position.
324
+ # @option opts [String] :position User&#39;s position (deprecated, you must use the parameter occupation).
325
325
  # @option opts [String] :personal_assets User&#39;s personal assets range expressed in k€.
326
326
  # @return [InlineResponse20026]
327
327
  def put_user(id, opts = {})
@@ -375,7 +375,7 @@ module TreezorClient
375
375
  # @option opts [String] :language User&#39;s prefered language (ISO 639-1)
376
376
  # @option opts [String] :tax_number User&#39;s tax identification number. If the taxResidence is not set to FR, the field is mandatory.
377
377
  # @option opts [String] :tax_residence User&#39;s tax residence country code (2 char code following ISO 3166 norm).
378
- # @option opts [String] :position User&#39;s position.
378
+ # @option opts [String] :position User&#39;s position (deprecated, you must use the parameter occupation).
379
379
  # @option opts [String] :personal_assets User&#39;s personal assets range expressed in k€.
380
380
  # @return [Array<(InlineResponse20026, Fixnum, Hash)>] InlineResponse20026 data, response status code and response headers
381
381
  def put_user_with_http_info(id, opts = {})
@@ -494,7 +494,7 @@ module TreezorClient
494
494
  # @option opts [String] :parent_type Type of bound between parent and current user : * shareholder * employee * leader (deprecated you must use the controllingPersonType and employeeType parameters)
495
495
  # @option opts [Integer] :controlling_person_type Type of relationship : | Value | Type | | --- | --- | | 1 | Shareholder | | 2 | Other_relationship | | 3 | Director | | 4 | None (default) |
496
496
  # @option opts [Integer] :employee_type Type of user&#39;s role : | Value | Type | | --- | --- | | 1 | Leader | | 2 | Employee | | 3 | None (default)|
497
- # @option opts [Integer] :entity_type Type of user&#39;s entity type | Value | Type | | --- | --- | | 1 | Reporting Financial Institution | | 2 | Non-Reporting Financial Institution | | 3 | Active Non-Financial Entity - Governmental entities, Int. organizations | | 4 | Active Non-Financial Entity - Other | | 5 | Passive Non-Financial Entity - Investment entity that is not Participating Jurisdiction FI |
497
+ # @option opts [Integer] :entity_type Type of user&#39;s entity type : | Value | Type | | --- | --- | | 1 | Reporting Financial Institution | | 2 | Non-Reporting Financial Institution | | 3 | Active Non-Financial Entity - Governmental entities, Int. organizations | | 4 | Active Non-Financial Entity - Other | | 5 | Passive Non-Financial Entity - Investment entity that is not Participating Jurisdiction FI |
498
498
  # @option opts [String] :title User&#39;s title. Possible values: * M * MME * MLLE
499
499
  # @option opts [String] :firstname User&#39;s first name
500
500
  # @option opts [String] :lastname User&#39;s last name
@@ -528,7 +528,7 @@ module TreezorClient
528
528
  # @option opts [String] :language User&#39;s prefered language (ISO 639-1)
529
529
  # @option opts [String] :tax_number User&#39;s tax identification number. If the taxResidence is set to another country than France, the field is mandatory. (deprecated, you must use the TaxResidence endpoint)
530
530
  # @option opts [String] :tax_residence User&#39;s tax residence country code (2 char code following ISO 3166 norm). (deprecated, you must use the TaxResidence endpoint)
531
- # @option opts [String] :position User&#39;s position.
531
+ # @option opts [String] :position User&#39;s position (deprecated, you must use the parameter occupation).
532
532
  # @option opts [String] :personal_assets User&#39;s personal assets range exprimed in K€.
533
533
  # @return [InlineResponse20026]
534
534
  def put_users(specified_us_person, email, opts = {})
@@ -551,7 +551,7 @@ module TreezorClient
551
551
  # @option opts [String] :parent_type Type of bound between parent and current user : * shareholder * employee * leader (deprecated you must use the controllingPersonType and employeeType parameters)
552
552
  # @option opts [Integer] :controlling_person_type Type of relationship : | Value | Type | | --- | --- | | 1 | Shareholder | | 2 | Other_relationship | | 3 | Director | | 4 | None (default) |
553
553
  # @option opts [Integer] :employee_type Type of user&#39;s role : | Value | Type | | --- | --- | | 1 | Leader | | 2 | Employee | | 3 | None (default)|
554
- # @option opts [Integer] :entity_type Type of user&#39;s entity type | Value | Type | | --- | --- | | 1 | Reporting Financial Institution | | 2 | Non-Reporting Financial Institution | | 3 | Active Non-Financial Entity - Governmental entities, Int. organizations | | 4 | Active Non-Financial Entity - Other | | 5 | Passive Non-Financial Entity - Investment entity that is not Participating Jurisdiction FI |
554
+ # @option opts [Integer] :entity_type Type of user&#39;s entity type : | Value | Type | | --- | --- | | 1 | Reporting Financial Institution | | 2 | Non-Reporting Financial Institution | | 3 | Active Non-Financial Entity - Governmental entities, Int. organizations | | 4 | Active Non-Financial Entity - Other | | 5 | Passive Non-Financial Entity - Investment entity that is not Participating Jurisdiction FI |
555
555
  # @option opts [String] :title User&#39;s title. Possible values: * M * MME * MLLE
556
556
  # @option opts [String] :firstname User&#39;s first name
557
557
  # @option opts [String] :lastname User&#39;s last name
@@ -585,7 +585,7 @@ module TreezorClient
585
585
  # @option opts [String] :language User&#39;s prefered language (ISO 639-1)
586
586
  # @option opts [String] :tax_number User&#39;s tax identification number. If the taxResidence is set to another country than France, the field is mandatory. (deprecated, you must use the TaxResidence endpoint)
587
587
  # @option opts [String] :tax_residence User&#39;s tax residence country code (2 char code following ISO 3166 norm). (deprecated, you must use the TaxResidence endpoint)
588
- # @option opts [String] :position User&#39;s position.
588
+ # @option opts [String] :position User&#39;s position (deprecated, you must use the parameter occupation).
589
589
  # @option opts [String] :personal_assets User&#39;s personal assets range exprimed in K€.
590
590
  # @return [Array<(InlineResponse20026, Fixnum, Hash)>] InlineResponse20026 data, response status code and response headers
591
591
  def put_users_with_http_info(specified_us_person, email, opts = {})
@@ -159,7 +159,7 @@ module TreezorClient
159
159
  return data, status_code, headers
160
160
  end
161
161
  # search wallets
162
- # Get wallets from the system that match the search criteria.
162
+ # Get wallets from the system that match the search criteria. The request must contains at least one of those inputs :walletId eventAlias, userId, walletTypeId, walletTag
163
163
  # @param [Hash] opts the optional parameters
164
164
  # @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](https://agent.treezor.com/security-authentication).
165
165
  # @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](https://agent.treezor.com/basics).
@@ -171,13 +171,11 @@ module TreezorClient
171
171
  # @option opts [Integer] :parent_user_id Parent user id of the wallet owner
172
172
  # @option opts [String] :wallet_tag Custom data.
173
173
  # @option opts [Integer] :wallet_type_id Wallet type id. The following values are defined: | Id | Description | |----|----| | 9 | Electronic Money Wallet | | 10 | Payment Account Wallet | | 13 | Mirror Wallet | | 14 | Electronic Money Card (Internal only) |
174
- # @option opts [String] :event_name Event name that will be used as wallet name. For example, in a wedding list: Wedding of X and Y
175
174
  # @option opts [String] :event_alias Short url wallet name. It&#39;s automatically generated by the system, but it could be modified and customised by the user. For example: www.domain.com/wallet&#x3D;mywedding
176
175
  # @option opts [DateTime] :event_payin_start_date Wallet activation date. The date from which you can deposit money on the wallet. Format : YYYY-MM-DD HH:MM:SS
177
176
  # @option opts [DateTime] :event_payin_end_date Deadline to money deposit on the wallet. Format : YYYY-MM-DD HH:MM:SS
178
177
  # @option opts [Integer] :tariff_id Wallet pricing id.
179
178
  # @option opts [Integer] :payin_count Number of payin done on the wallet.
180
- # @option opts [String] :solde Wallet current balance.
181
179
  # @option opts [Integer] :page_number Pagination page number. More info [here](https://agent.treezor.com/lists).
182
180
  # @option opts [Integer] :page_count The number of items per page. More info [here](https://agent.treezor.com/lists).
183
181
  # @option opts [String] :sort_by The transaction element you want to sort the list with. Default value : _createdDate_. More info [here](https://agent.treezor.com/lists).
@@ -193,7 +191,7 @@ module TreezorClient
193
191
  end
194
192
 
195
193
  # search wallets
196
- # Get wallets from the system that match the search criteria.
194
+ # Get wallets from the system that match the search criteria. The request must contains at least one of those inputs :walletId eventAlias, userId, walletTypeId, walletTag
197
195
  # @param [Hash] opts the optional parameters
198
196
  # @option opts [String] :access_signature Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](https://agent.treezor.com/security-authentication).
199
197
  # @option opts [String] :access_tag Access tag is used for idem potency query. More info [here](https://agent.treezor.com/basics).
@@ -205,13 +203,11 @@ module TreezorClient
205
203
  # @option opts [Integer] :parent_user_id Parent user id of the wallet owner
206
204
  # @option opts [String] :wallet_tag Custom data.
207
205
  # @option opts [Integer] :wallet_type_id Wallet type id. The following values are defined: | Id | Description | |----|----| | 9 | Electronic Money Wallet | | 10 | Payment Account Wallet | | 13 | Mirror Wallet | | 14 | Electronic Money Card (Internal only) |
208
- # @option opts [String] :event_name Event name that will be used as wallet name. For example, in a wedding list: Wedding of X and Y
209
206
  # @option opts [String] :event_alias Short url wallet name. It&#39;s automatically generated by the system, but it could be modified and customised by the user. For example: www.domain.com/wallet&#x3D;mywedding
210
207
  # @option opts [DateTime] :event_payin_start_date Wallet activation date. The date from which you can deposit money on the wallet. Format : YYYY-MM-DD HH:MM:SS
211
208
  # @option opts [DateTime] :event_payin_end_date Deadline to money deposit on the wallet. Format : YYYY-MM-DD HH:MM:SS
212
209
  # @option opts [Integer] :tariff_id Wallet pricing id.
213
210
  # @option opts [Integer] :payin_count Number of payin done on the wallet.
214
- # @option opts [String] :solde Wallet current balance.
215
211
  # @option opts [Integer] :page_number Pagination page number. More info [here](https://agent.treezor.com/lists).
216
212
  # @option opts [Integer] :page_count The number of items per page. More info [here](https://agent.treezor.com/lists).
217
213
  # @option opts [String] :sort_by The transaction element you want to sort the list with. Default value : _createdDate_. More info [here](https://agent.treezor.com/lists).
@@ -240,13 +236,11 @@ module TreezorClient
240
236
  query_params[:'parentUserId'] = opts[:'parent_user_id'] if !opts[:'parent_user_id'].nil?
241
237
  query_params[:'walletTag'] = opts[:'wallet_tag'] if !opts[:'wallet_tag'].nil?
242
238
  query_params[:'walletTypeId'] = opts[:'wallet_type_id'] if !opts[:'wallet_type_id'].nil?
243
- query_params[:'eventName'] = opts[:'event_name'] if !opts[:'event_name'].nil?
244
239
  query_params[:'eventAlias'] = opts[:'event_alias'] if !opts[:'event_alias'].nil?
245
240
  query_params[:'eventPayinStartDate'] = opts[:'event_payin_start_date'] if !opts[:'event_payin_start_date'].nil?
246
241
  query_params[:'eventPayinEndDate'] = opts[:'event_payin_end_date'] if !opts[:'event_payin_end_date'].nil?
247
242
  query_params[:'tariffId'] = opts[:'tariff_id'] if !opts[:'tariff_id'].nil?
248
243
  query_params[:'payinCount'] = opts[:'payin_count'] if !opts[:'payin_count'].nil?
249
- query_params[:'solde'] = opts[:'solde'] if !opts[:'solde'].nil?
250
244
  query_params[:'pageNumber'] = opts[:'page_number'] if !opts[:'page_number'].nil?
251
245
  query_params[:'pageCount'] = opts[:'page_count'] if !opts[:'page_count'].nil?
252
246
  query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
@@ -0,0 +1,230 @@
1
+ =begin
2
+ #Treezor
3
+
4
+ #Treezor API. more info [here](https://www.treezor.com).
5
+
6
+ OpenAPI spec version: 0.1.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module TreezorClient
16
+ class Body11
17
+ # Array of merchant ID
18
+ attr_accessor :merchants
19
+
20
+ # Action to do with merchants id list
21
+ attr_accessor :merchants_operation
22
+
23
+ class EnumAttributeValidator
24
+ attr_reader :datatype
25
+ attr_reader :allowable_values
26
+
27
+ def initialize(datatype, allowable_values)
28
+ @allowable_values = allowable_values.map do |value|
29
+ case datatype.to_s
30
+ when /Integer/i
31
+ value.to_i
32
+ when /Float/i
33
+ value.to_f
34
+ else
35
+ value
36
+ end
37
+ end
38
+ end
39
+
40
+ def valid?(value)
41
+ !value || allowable_values.include?(value)
42
+ end
43
+ end
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'merchants' => :'merchants',
49
+ :'merchants_operation' => :'merchantsOperation'
50
+ }
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.swagger_types
55
+ {
56
+ :'merchants' => :'Array<String>',
57
+ :'merchants_operation' => :'String'
58
+ }
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ return unless attributes.is_a?(Hash)
65
+
66
+ # convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
68
+
69
+ if attributes.has_key?(:'merchants')
70
+ if (value = attributes[:'merchants']).is_a?(Array)
71
+ self.merchants = value
72
+ end
73
+ end
74
+
75
+ if attributes.has_key?(:'merchantsOperation')
76
+ self.merchants_operation = attributes[:'merchantsOperation']
77
+ end
78
+ end
79
+
80
+ # Show invalid properties with the reasons. Usually used together with valid?
81
+ # @return Array for valid properties with the reasons
82
+ def list_invalid_properties
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ merchants_operation_validator = EnumAttributeValidator.new('String', ['add', 'remove'])
91
+ return false unless merchants_operation_validator.valid?(@merchants_operation)
92
+ true
93
+ end
94
+
95
+ # Custom attribute writer method checking allowed values (enum).
96
+ # @param [Object] merchants_operation Object to be assigned
97
+ def merchants_operation=(merchants_operation)
98
+ validator = EnumAttributeValidator.new('String', ['add', 'remove'])
99
+ unless validator.valid?(merchants_operation)
100
+ fail ArgumentError, 'invalid value for "merchants_operation", must be one of #{validator.allowable_values}.'
101
+ end
102
+ @merchants_operation = merchants_operation
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
+ merchants == o.merchants &&
111
+ merchants_operation == o.merchants_operation
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
+ [merchants, merchants_operation].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 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 = TreezorClient.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
+ end
230
+ end