mx-platform-ruby 0.9.3 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +15 -15
  3. data/docs/MxPlatformApi.md +301 -78
  4. data/docs/PaymentAccountResponse.md +30 -0
  5. data/docs/PaymentAccountResponseBody.md +18 -0
  6. data/docs/PaymentProcessorAuthorizationCodeRequest.md +22 -0
  7. data/docs/PaymentProcessorAuthorizationCodeRequestBody.md +18 -0
  8. data/docs/PaymentProcessorAuthorizationCodeResponse.md +18 -0
  9. data/docs/PaymentProcessorAuthorizationCodeResponseBody.md +18 -0
  10. data/docs/PaymentProcessorTokenResponseBody.md +22 -0
  11. data/lib/mx-platform-ruby/api/mx_platform_api.rb +337 -119
  12. data/lib/mx-platform-ruby/configuration.rb +7 -0
  13. data/lib/mx-platform-ruby/models/payment_account_response.rb +279 -0
  14. data/lib/mx-platform-ruby/models/payment_account_response_body.rb +218 -0
  15. data/lib/mx-platform-ruby/models/payment_processor_authorization_code_request.rb +236 -0
  16. data/lib/mx-platform-ruby/models/payment_processor_authorization_code_request_body.rb +218 -0
  17. data/lib/mx-platform-ruby/models/payment_processor_authorization_code_response.rb +219 -0
  18. data/lib/mx-platform-ruby/models/payment_processor_authorization_code_response_body.rb +218 -0
  19. data/lib/mx-platform-ruby/models/payment_processor_token_response_body.rb +239 -0
  20. data/lib/mx-platform-ruby/version.rb +1 -1
  21. data/lib/mx-platform-ruby.rb +7 -0
  22. data/openapi/config.yml +1 -1
  23. data/spec/api/mx_platform_api_spec.rb +56 -15
  24. data/spec/models/payment_account_response_body_spec.rb +34 -0
  25. data/spec/models/payment_account_response_spec.rb +70 -0
  26. data/spec/models/payment_processor_authorization_code_request_body_spec.rb +34 -0
  27. data/spec/models/payment_processor_authorization_code_request_spec.rb +46 -0
  28. data/spec/models/payment_processor_authorization_code_response_body_spec.rb +34 -0
  29. data/spec/models/payment_processor_authorization_code_response_spec.rb +34 -0
  30. data/spec/models/payment_processor_token_response_body_spec.rb +46 -0
  31. metadata +30 -2
@@ -233,41 +233,41 @@ module MxPlatformRuby
233
233
 
234
234
  # Create managed account
235
235
  # Use this endpoint to create a partner-managed account.
236
- # @param user_guid [String] The unique id for a `user`.
237
236
  # @param member_guid [String] The unique id for a `member`.
237
+ # @param user_guid [String] The unique id for a `user`.
238
238
  # @param managed_account_create_request_body [ManagedAccountCreateRequestBody] Managed account to be created.
239
239
  # @param [Hash] opts the optional parameters
240
240
  # @return [AccountResponseBody]
241
- def create_managed_account(user_guid, member_guid, managed_account_create_request_body, opts = {})
242
- data, _status_code, _headers = create_managed_account_with_http_info(user_guid, member_guid, managed_account_create_request_body, opts)
241
+ def create_managed_account(member_guid, user_guid, managed_account_create_request_body, opts = {})
242
+ data, _status_code, _headers = create_managed_account_with_http_info(member_guid, user_guid, managed_account_create_request_body, opts)
243
243
  data
244
244
  end
245
245
 
246
246
  # Create managed account
247
247
  # Use this endpoint to create a partner-managed account.
248
- # @param user_guid [String] The unique id for a `user`.
249
248
  # @param member_guid [String] The unique id for a `member`.
249
+ # @param user_guid [String] The unique id for a `user`.
250
250
  # @param managed_account_create_request_body [ManagedAccountCreateRequestBody] Managed account to be created.
251
251
  # @param [Hash] opts the optional parameters
252
252
  # @return [Array<(AccountResponseBody, Integer, Hash)>] AccountResponseBody data, response status code and response headers
253
- def create_managed_account_with_http_info(user_guid, member_guid, managed_account_create_request_body, opts = {})
253
+ def create_managed_account_with_http_info(member_guid, user_guid, managed_account_create_request_body, opts = {})
254
254
  if @api_client.config.debugging
255
255
  @api_client.config.logger.debug 'Calling API: MxPlatformApi.create_managed_account ...'
256
256
  end
257
- # verify the required parameter 'user_guid' is set
258
- if @api_client.config.client_side_validation && user_guid.nil?
259
- fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.create_managed_account"
260
- end
261
257
  # verify the required parameter 'member_guid' is set
262
258
  if @api_client.config.client_side_validation && member_guid.nil?
263
259
  fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.create_managed_account"
264
260
  end
261
+ # verify the required parameter 'user_guid' is set
262
+ if @api_client.config.client_side_validation && user_guid.nil?
263
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.create_managed_account"
264
+ end
265
265
  # verify the required parameter 'managed_account_create_request_body' is set
266
266
  if @api_client.config.client_side_validation && managed_account_create_request_body.nil?
267
267
  fail ArgumentError, "Missing the required parameter 'managed_account_create_request_body' when calling MxPlatformApi.create_managed_account"
268
268
  end
269
269
  # resource path
270
- local_var_path = '/users/{user_guid}/managed_members/{member_guid}/accounts'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s))
270
+ local_var_path = '/users/{user_guid}/managed_members/{member_guid}/accounts'.sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
271
271
 
272
272
  # query parameters
273
273
  query_params = opts[:query_params] || {}
@@ -387,41 +387,47 @@ module MxPlatformRuby
387
387
 
388
388
  # Create managed transaction
389
389
  # Use this endpoint to create a new partner-managed `transaction`.
390
- # @param user_guid [String] The unique id for a &#x60;user&#x60;.
390
+ # @param account_guid [String] The unique id for an &#x60;account&#x60;.
391
391
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
392
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
392
393
  # @param managed_transaction_create_request_body [ManagedTransactionCreateRequestBody] Managed transaction to be created.
393
394
  # @param [Hash] opts the optional parameters
394
395
  # @return [TransactionResponseBody]
395
- def create_managed_transaction(user_guid, member_guid, managed_transaction_create_request_body, opts = {})
396
- data, _status_code, _headers = create_managed_transaction_with_http_info(user_guid, member_guid, managed_transaction_create_request_body, opts)
396
+ def create_managed_transaction(account_guid, member_guid, user_guid, managed_transaction_create_request_body, opts = {})
397
+ data, _status_code, _headers = create_managed_transaction_with_http_info(account_guid, member_guid, user_guid, managed_transaction_create_request_body, opts)
397
398
  data
398
399
  end
399
400
 
400
401
  # Create managed transaction
401
402
  # Use this endpoint to create a new partner-managed &#x60;transaction&#x60;.
402
- # @param user_guid [String] The unique id for a &#x60;user&#x60;.
403
+ # @param account_guid [String] The unique id for an &#x60;account&#x60;.
403
404
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
405
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
404
406
  # @param managed_transaction_create_request_body [ManagedTransactionCreateRequestBody] Managed transaction to be created.
405
407
  # @param [Hash] opts the optional parameters
406
408
  # @return [Array<(TransactionResponseBody, Integer, Hash)>] TransactionResponseBody data, response status code and response headers
407
- def create_managed_transaction_with_http_info(user_guid, member_guid, managed_transaction_create_request_body, opts = {})
409
+ def create_managed_transaction_with_http_info(account_guid, member_guid, user_guid, managed_transaction_create_request_body, opts = {})
408
410
  if @api_client.config.debugging
409
411
  @api_client.config.logger.debug 'Calling API: MxPlatformApi.create_managed_transaction ...'
410
412
  end
411
- # verify the required parameter 'user_guid' is set
412
- if @api_client.config.client_side_validation && user_guid.nil?
413
- fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.create_managed_transaction"
413
+ # verify the required parameter 'account_guid' is set
414
+ if @api_client.config.client_side_validation && account_guid.nil?
415
+ fail ArgumentError, "Missing the required parameter 'account_guid' when calling MxPlatformApi.create_managed_transaction"
414
416
  end
415
417
  # verify the required parameter 'member_guid' is set
416
418
  if @api_client.config.client_side_validation && member_guid.nil?
417
419
  fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.create_managed_transaction"
418
420
  end
421
+ # verify the required parameter 'user_guid' is set
422
+ if @api_client.config.client_side_validation && user_guid.nil?
423
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.create_managed_transaction"
424
+ end
419
425
  # verify the required parameter 'managed_transaction_create_request_body' is set
420
426
  if @api_client.config.client_side_validation && managed_transaction_create_request_body.nil?
421
427
  fail ArgumentError, "Missing the required parameter 'managed_transaction_create_request_body' when calling MxPlatformApi.create_managed_transaction"
422
428
  end
423
429
  # resource path
424
- local_var_path = '/users/{user_guid}/managed_members/{member_guid}/transactions'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s))
430
+ local_var_path = '/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}/transactions'.sub('{' + 'account_guid' + '}', CGI.escape(account_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
425
431
 
426
432
  # query parameters
427
433
  query_params = opts[:query_params] || {}
@@ -762,7 +768,7 @@ module MxPlatformRuby
762
768
  end
763
769
 
764
770
  # Create user
765
- # Call this endpoint to create a new user. The MX Platform API will respond with the newly-created user object if successful. This endpoint accepts several parameters - id, metadata, and is_disabled. Disabling a user means that accounts and transactions associated with it will not be updated in the background by MX. It will also restrict access to that users data until they are no longer disabled. Users who are disabled for the entirety of an MX Platform API billing period will not be factored into that months bill.
771
+ # Use this endpoint to create a new user. The API will respond with the newly-created user object if successful. Disabling a user means that accounts and transactions associated with it will not be updated in the background by MX. It will also restrict access to that user’s data until they are no longer disabled.
766
772
  # @param user_create_request_body [UserCreateRequestBody] User object to be created. (None of these parameters are required, but the user object cannot be empty)
767
773
  # @param [Hash] opts the optional parameters
768
774
  # @return [UserResponseBody]
@@ -772,7 +778,7 @@ module MxPlatformRuby
772
778
  end
773
779
 
774
780
  # Create user
775
- # Call this endpoint to create a new user. The MX Platform API will respond with the newly-created user object if successful. This endpoint accepts several parameters - id, metadata, and is_disabled. Disabling a user means that accounts and transactions associated with it will not be updated in the background by MX. It will also restrict access to that users data until they are no longer disabled. Users who are disabled for the entirety of an MX Platform API billing period will not be factored into that months bill.
781
+ # Use this endpoint to create a new user. The API will respond with the newly-created user object if successful. Disabling a user means that accounts and transactions associated with it will not be updated in the background by MX. It will also restrict access to that user’s data until they are no longer disabled.
776
782
  # @param user_create_request_body [UserCreateRequestBody] User object to be created. (None of these parameters are required, but the user object cannot be empty)
777
783
  # @param [Hash] opts the optional parameters
778
784
  # @return [Array<(UserResponseBody, Integer, Hash)>] UserResponseBody data, response status code and response headers
@@ -898,27 +904,31 @@ module MxPlatformRuby
898
904
 
899
905
  # Delete managed account
900
906
  # Use this endpoint to delete a partner-managed account according to its unique GUID. If successful, the API will respond with a status of `204 No Content`.
907
+ # @param account_guid [String] The unique id for an &#x60;account&#x60;.
901
908
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
902
909
  # @param user_guid [String] The unique id for a &#x60;user&#x60;.
903
- # @param account_guid [String] The unique id for an &#x60;account&#x60;.
904
910
  # @param [Hash] opts the optional parameters
905
911
  # @return [nil]
906
- def delete_managed_account(member_guid, user_guid, account_guid, opts = {})
907
- delete_managed_account_with_http_info(member_guid, user_guid, account_guid, opts)
912
+ def delete_managed_account(account_guid, member_guid, user_guid, opts = {})
913
+ delete_managed_account_with_http_info(account_guid, member_guid, user_guid, opts)
908
914
  nil
909
915
  end
910
916
 
911
917
  # Delete managed account
912
918
  # Use this endpoint to delete a partner-managed account according to its unique GUID. If successful, the API will respond with a status of &#x60;204 No Content&#x60;.
919
+ # @param account_guid [String] The unique id for an &#x60;account&#x60;.
913
920
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
914
921
  # @param user_guid [String] The unique id for a &#x60;user&#x60;.
915
- # @param account_guid [String] The unique id for an &#x60;account&#x60;.
916
922
  # @param [Hash] opts the optional parameters
917
923
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
918
- def delete_managed_account_with_http_info(member_guid, user_guid, account_guid, opts = {})
924
+ def delete_managed_account_with_http_info(account_guid, member_guid, user_guid, opts = {})
919
925
  if @api_client.config.debugging
920
926
  @api_client.config.logger.debug 'Calling API: MxPlatformApi.delete_managed_account ...'
921
927
  end
928
+ # verify the required parameter 'account_guid' is set
929
+ if @api_client.config.client_side_validation && account_guid.nil?
930
+ fail ArgumentError, "Missing the required parameter 'account_guid' when calling MxPlatformApi.delete_managed_account"
931
+ end
922
932
  # verify the required parameter 'member_guid' is set
923
933
  if @api_client.config.client_side_validation && member_guid.nil?
924
934
  fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.delete_managed_account"
@@ -927,12 +937,8 @@ module MxPlatformRuby
927
937
  if @api_client.config.client_side_validation && user_guid.nil?
928
938
  fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.delete_managed_account"
929
939
  end
930
- # verify the required parameter 'account_guid' is set
931
- if @api_client.config.client_side_validation && account_guid.nil?
932
- fail ArgumentError, "Missing the required parameter 'account_guid' when calling MxPlatformApi.delete_managed_account"
933
- end
934
940
  # resource path
935
- local_var_path = '/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}'.sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'account_guid' + '}', CGI.escape(account_guid.to_s))
941
+ local_var_path = '/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}'.sub('{' + 'account_guid' + '}', CGI.escape(account_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
936
942
 
937
943
  # query parameters
938
944
  query_params = opts[:query_params] || {}
@@ -1038,41 +1044,47 @@ module MxPlatformRuby
1038
1044
 
1039
1045
  # Delete managed transaction
1040
1046
  # Use this endpoint to delete the specified partner-managed `transaction`. The endpoint will respond with a status of `204 No Content` without a resource.
1047
+ # @param account_guid [String] The unique id for an &#x60;account&#x60;.
1041
1048
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
1042
- # @param user_guid [String] The unique id for a &#x60;user&#x60;.
1043
1049
  # @param transaction_guid [String] The unique id for a &#x60;transaction&#x60;.
1050
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
1044
1051
  # @param [Hash] opts the optional parameters
1045
1052
  # @return [nil]
1046
- def delete_managed_transaction(member_guid, user_guid, transaction_guid, opts = {})
1047
- delete_managed_transaction_with_http_info(member_guid, user_guid, transaction_guid, opts)
1053
+ def delete_managed_transaction(account_guid, member_guid, transaction_guid, user_guid, opts = {})
1054
+ delete_managed_transaction_with_http_info(account_guid, member_guid, transaction_guid, user_guid, opts)
1048
1055
  nil
1049
1056
  end
1050
1057
 
1051
1058
  # Delete managed transaction
1052
1059
  # Use this endpoint to delete the specified partner-managed &#x60;transaction&#x60;. The endpoint will respond with a status of &#x60;204 No Content&#x60; without a resource.
1060
+ # @param account_guid [String] The unique id for an &#x60;account&#x60;.
1053
1061
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
1054
- # @param user_guid [String] The unique id for a &#x60;user&#x60;.
1055
1062
  # @param transaction_guid [String] The unique id for a &#x60;transaction&#x60;.
1063
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
1056
1064
  # @param [Hash] opts the optional parameters
1057
1065
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1058
- def delete_managed_transaction_with_http_info(member_guid, user_guid, transaction_guid, opts = {})
1066
+ def delete_managed_transaction_with_http_info(account_guid, member_guid, transaction_guid, user_guid, opts = {})
1059
1067
  if @api_client.config.debugging
1060
1068
  @api_client.config.logger.debug 'Calling API: MxPlatformApi.delete_managed_transaction ...'
1061
1069
  end
1070
+ # verify the required parameter 'account_guid' is set
1071
+ if @api_client.config.client_side_validation && account_guid.nil?
1072
+ fail ArgumentError, "Missing the required parameter 'account_guid' when calling MxPlatformApi.delete_managed_transaction"
1073
+ end
1062
1074
  # verify the required parameter 'member_guid' is set
1063
1075
  if @api_client.config.client_side_validation && member_guid.nil?
1064
1076
  fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.delete_managed_transaction"
1065
1077
  end
1066
- # verify the required parameter 'user_guid' is set
1067
- if @api_client.config.client_side_validation && user_guid.nil?
1068
- fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.delete_managed_transaction"
1069
- end
1070
1078
  # verify the required parameter 'transaction_guid' is set
1071
1079
  if @api_client.config.client_side_validation && transaction_guid.nil?
1072
1080
  fail ArgumentError, "Missing the required parameter 'transaction_guid' when calling MxPlatformApi.delete_managed_transaction"
1073
1081
  end
1082
+ # verify the required parameter 'user_guid' is set
1083
+ if @api_client.config.client_side_validation && user_guid.nil?
1084
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.delete_managed_transaction"
1085
+ end
1074
1086
  # resource path
1075
- local_var_path = '/users/{user_guid}/managed_members/{member_guid}/transactions/{transaction_guid}'.sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'transaction_guid' + '}', CGI.escape(transaction_guid.to_s))
1087
+ local_var_path = '/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}/transactions/{transaction_guid}'.sub('{' + 'account_guid' + '}', CGI.escape(account_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'transaction_guid' + '}', CGI.escape(transaction_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
1076
1088
 
1077
1089
  # query parameters
1078
1090
  query_params = opts[:query_params] || {}
@@ -2663,39 +2675,39 @@ module MxPlatformRuby
2663
2675
 
2664
2676
  # List managed accounts
2665
2677
  # Use this endpoint to retrieve a list of all the partner-managed accounts associated with the given partner-manage member.
2666
- # @param user_guid [String] The unique id for a &#x60;user&#x60;.
2667
2678
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
2679
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
2668
2680
  # @param [Hash] opts the optional parameters
2669
2681
  # @option opts [Integer] :page Specify current page.
2670
2682
  # @option opts [Integer] :records_per_page Specify records per page.
2671
2683
  # @return [AccountsResponseBody]
2672
- def list_managed_accounts(user_guid, member_guid, opts = {})
2673
- data, _status_code, _headers = list_managed_accounts_with_http_info(user_guid, member_guid, opts)
2684
+ def list_managed_accounts(member_guid, user_guid, opts = {})
2685
+ data, _status_code, _headers = list_managed_accounts_with_http_info(member_guid, user_guid, opts)
2674
2686
  data
2675
2687
  end
2676
2688
 
2677
2689
  # List managed accounts
2678
2690
  # Use this endpoint to retrieve a list of all the partner-managed accounts associated with the given partner-manage member.
2679
- # @param user_guid [String] The unique id for a &#x60;user&#x60;.
2680
2691
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
2692
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
2681
2693
  # @param [Hash] opts the optional parameters
2682
2694
  # @option opts [Integer] :page Specify current page.
2683
2695
  # @option opts [Integer] :records_per_page Specify records per page.
2684
2696
  # @return [Array<(AccountsResponseBody, Integer, Hash)>] AccountsResponseBody data, response status code and response headers
2685
- def list_managed_accounts_with_http_info(user_guid, member_guid, opts = {})
2697
+ def list_managed_accounts_with_http_info(member_guid, user_guid, opts = {})
2686
2698
  if @api_client.config.debugging
2687
2699
  @api_client.config.logger.debug 'Calling API: MxPlatformApi.list_managed_accounts ...'
2688
2700
  end
2689
- # verify the required parameter 'user_guid' is set
2690
- if @api_client.config.client_side_validation && user_guid.nil?
2691
- fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.list_managed_accounts"
2692
- end
2693
2701
  # verify the required parameter 'member_guid' is set
2694
2702
  if @api_client.config.client_side_validation && member_guid.nil?
2695
2703
  fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.list_managed_accounts"
2696
2704
  end
2705
+ # verify the required parameter 'user_guid' is set
2706
+ if @api_client.config.client_side_validation && user_guid.nil?
2707
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.list_managed_accounts"
2708
+ end
2697
2709
  # resource path
2698
- local_var_path = '/users/{user_guid}/managed_members/{member_guid}/accounts'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s))
2710
+ local_var_path = '/users/{user_guid}/managed_members/{member_guid}/accounts'.sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
2699
2711
 
2700
2712
  # query parameters
2701
2713
  query_params = opts[:query_params] || {}
@@ -2870,39 +2882,45 @@ module MxPlatformRuby
2870
2882
 
2871
2883
  # List managed transactions
2872
2884
  # This endpoint returns a list of all the partner-managed transactions associated with the specified `account`, scoped through a `user` and a `member`.
2873
- # @param user_guid [String] The unique id for a &#x60;user&#x60;.
2885
+ # @param account_guid [String] The unique id for an &#x60;account&#x60;.
2874
2886
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
2887
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
2875
2888
  # @param [Hash] opts the optional parameters
2876
2889
  # @option opts [Integer] :page Specify current page.
2877
2890
  # @option opts [Integer] :records_per_page Specify records per page.
2878
2891
  # @return [TransactionsResponseBody]
2879
- def list_managed_transactions(user_guid, member_guid, opts = {})
2880
- data, _status_code, _headers = list_managed_transactions_with_http_info(user_guid, member_guid, opts)
2892
+ def list_managed_transactions(account_guid, member_guid, user_guid, opts = {})
2893
+ data, _status_code, _headers = list_managed_transactions_with_http_info(account_guid, member_guid, user_guid, opts)
2881
2894
  data
2882
2895
  end
2883
2896
 
2884
2897
  # List managed transactions
2885
2898
  # This endpoint returns a list of all the partner-managed transactions associated with the specified &#x60;account&#x60;, scoped through a &#x60;user&#x60; and a &#x60;member&#x60;.
2886
- # @param user_guid [String] The unique id for a &#x60;user&#x60;.
2899
+ # @param account_guid [String] The unique id for an &#x60;account&#x60;.
2887
2900
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
2901
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
2888
2902
  # @param [Hash] opts the optional parameters
2889
2903
  # @option opts [Integer] :page Specify current page.
2890
2904
  # @option opts [Integer] :records_per_page Specify records per page.
2891
2905
  # @return [Array<(TransactionsResponseBody, Integer, Hash)>] TransactionsResponseBody data, response status code and response headers
2892
- def list_managed_transactions_with_http_info(user_guid, member_guid, opts = {})
2906
+ def list_managed_transactions_with_http_info(account_guid, member_guid, user_guid, opts = {})
2893
2907
  if @api_client.config.debugging
2894
2908
  @api_client.config.logger.debug 'Calling API: MxPlatformApi.list_managed_transactions ...'
2895
2909
  end
2896
- # verify the required parameter 'user_guid' is set
2897
- if @api_client.config.client_side_validation && user_guid.nil?
2898
- fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.list_managed_transactions"
2910
+ # verify the required parameter 'account_guid' is set
2911
+ if @api_client.config.client_side_validation && account_guid.nil?
2912
+ fail ArgumentError, "Missing the required parameter 'account_guid' when calling MxPlatformApi.list_managed_transactions"
2899
2913
  end
2900
2914
  # verify the required parameter 'member_guid' is set
2901
2915
  if @api_client.config.client_side_validation && member_guid.nil?
2902
2916
  fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.list_managed_transactions"
2903
2917
  end
2918
+ # verify the required parameter 'user_guid' is set
2919
+ if @api_client.config.client_side_validation && user_guid.nil?
2920
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.list_managed_transactions"
2921
+ end
2904
2922
  # resource path
2905
- local_var_path = '/users/{user_guid}/managed_members/{member_guid}/transactions'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s))
2923
+ local_var_path = '/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}/transactions'.sub('{' + 'account_guid' + '}', CGI.escape(account_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
2906
2924
 
2907
2925
  # query parameters
2908
2926
  query_params = opts[:query_params] || {}
@@ -4292,27 +4310,31 @@ module MxPlatformRuby
4292
4310
 
4293
4311
  # Read managed account
4294
4312
  # Use this endpoint to read the attributes of a partner-managed account according to its unique guid.
4313
+ # @param account_guid [String] The unique id for an &#x60;account&#x60;.
4295
4314
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
4296
4315
  # @param user_guid [String] The unique id for a &#x60;user&#x60;.
4297
- # @param account_guid [String] The unique id for an &#x60;account&#x60;.
4298
4316
  # @param [Hash] opts the optional parameters
4299
4317
  # @return [AccountResponseBody]
4300
- def read_managed_account(member_guid, user_guid, account_guid, opts = {})
4301
- data, _status_code, _headers = read_managed_account_with_http_info(member_guid, user_guid, account_guid, opts)
4318
+ def read_managed_account(account_guid, member_guid, user_guid, opts = {})
4319
+ data, _status_code, _headers = read_managed_account_with_http_info(account_guid, member_guid, user_guid, opts)
4302
4320
  data
4303
4321
  end
4304
4322
 
4305
4323
  # Read managed account
4306
4324
  # Use this endpoint to read the attributes of a partner-managed account according to its unique guid.
4325
+ # @param account_guid [String] The unique id for an &#x60;account&#x60;.
4307
4326
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
4308
4327
  # @param user_guid [String] The unique id for a &#x60;user&#x60;.
4309
- # @param account_guid [String] The unique id for an &#x60;account&#x60;.
4310
4328
  # @param [Hash] opts the optional parameters
4311
4329
  # @return [Array<(AccountResponseBody, Integer, Hash)>] AccountResponseBody data, response status code and response headers
4312
- def read_managed_account_with_http_info(member_guid, user_guid, account_guid, opts = {})
4330
+ def read_managed_account_with_http_info(account_guid, member_guid, user_guid, opts = {})
4313
4331
  if @api_client.config.debugging
4314
4332
  @api_client.config.logger.debug 'Calling API: MxPlatformApi.read_managed_account ...'
4315
4333
  end
4334
+ # verify the required parameter 'account_guid' is set
4335
+ if @api_client.config.client_side_validation && account_guid.nil?
4336
+ fail ArgumentError, "Missing the required parameter 'account_guid' when calling MxPlatformApi.read_managed_account"
4337
+ end
4316
4338
  # verify the required parameter 'member_guid' is set
4317
4339
  if @api_client.config.client_side_validation && member_guid.nil?
4318
4340
  fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.read_managed_account"
@@ -4321,12 +4343,8 @@ module MxPlatformRuby
4321
4343
  if @api_client.config.client_side_validation && user_guid.nil?
4322
4344
  fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.read_managed_account"
4323
4345
  end
4324
- # verify the required parameter 'account_guid' is set
4325
- if @api_client.config.client_side_validation && account_guid.nil?
4326
- fail ArgumentError, "Missing the required parameter 'account_guid' when calling MxPlatformApi.read_managed_account"
4327
- end
4328
4346
  # resource path
4329
- local_var_path = '/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}'.sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'account_guid' + '}', CGI.escape(account_guid.to_s))
4347
+ local_var_path = '/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}'.sub('{' + 'account_guid' + '}', CGI.escape(account_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
4330
4348
 
4331
4349
  # query parameters
4332
4350
  query_params = opts[:query_params] || {}
@@ -4436,41 +4454,47 @@ module MxPlatformRuby
4436
4454
 
4437
4455
  # Read managed transaction
4438
4456
  # Requests to this endpoint will return the attributes of the specified partner-managed `transaction`.
4457
+ # @param account_guid [String] The unique id for an &#x60;account&#x60;.
4439
4458
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
4440
- # @param user_guid [String] The unique id for a &#x60;user&#x60;.
4441
4459
  # @param transaction_guid [String] The unique id for a &#x60;transaction&#x60;.
4460
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
4442
4461
  # @param [Hash] opts the optional parameters
4443
4462
  # @return [TransactionResponseBody]
4444
- def read_managed_transaction(member_guid, user_guid, transaction_guid, opts = {})
4445
- data, _status_code, _headers = read_managed_transaction_with_http_info(member_guid, user_guid, transaction_guid, opts)
4463
+ def read_managed_transaction(account_guid, member_guid, transaction_guid, user_guid, opts = {})
4464
+ data, _status_code, _headers = read_managed_transaction_with_http_info(account_guid, member_guid, transaction_guid, user_guid, opts)
4446
4465
  data
4447
4466
  end
4448
4467
 
4449
4468
  # Read managed transaction
4450
4469
  # Requests to this endpoint will return the attributes of the specified partner-managed &#x60;transaction&#x60;.
4470
+ # @param account_guid [String] The unique id for an &#x60;account&#x60;.
4451
4471
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
4452
- # @param user_guid [String] The unique id for a &#x60;user&#x60;.
4453
4472
  # @param transaction_guid [String] The unique id for a &#x60;transaction&#x60;.
4473
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
4454
4474
  # @param [Hash] opts the optional parameters
4455
4475
  # @return [Array<(TransactionResponseBody, Integer, Hash)>] TransactionResponseBody data, response status code and response headers
4456
- def read_managed_transaction_with_http_info(member_guid, user_guid, transaction_guid, opts = {})
4476
+ def read_managed_transaction_with_http_info(account_guid, member_guid, transaction_guid, user_guid, opts = {})
4457
4477
  if @api_client.config.debugging
4458
4478
  @api_client.config.logger.debug 'Calling API: MxPlatformApi.read_managed_transaction ...'
4459
4479
  end
4480
+ # verify the required parameter 'account_guid' is set
4481
+ if @api_client.config.client_side_validation && account_guid.nil?
4482
+ fail ArgumentError, "Missing the required parameter 'account_guid' when calling MxPlatformApi.read_managed_transaction"
4483
+ end
4460
4484
  # verify the required parameter 'member_guid' is set
4461
4485
  if @api_client.config.client_side_validation && member_guid.nil?
4462
4486
  fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.read_managed_transaction"
4463
4487
  end
4464
- # verify the required parameter 'user_guid' is set
4465
- if @api_client.config.client_side_validation && user_guid.nil?
4466
- fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.read_managed_transaction"
4467
- end
4468
4488
  # verify the required parameter 'transaction_guid' is set
4469
4489
  if @api_client.config.client_side_validation && transaction_guid.nil?
4470
4490
  fail ArgumentError, "Missing the required parameter 'transaction_guid' when calling MxPlatformApi.read_managed_transaction"
4471
4491
  end
4492
+ # verify the required parameter 'user_guid' is set
4493
+ if @api_client.config.client_side_validation && user_guid.nil?
4494
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.read_managed_transaction"
4495
+ end
4472
4496
  # resource path
4473
- local_var_path = '/users/{user_guid}/managed_members/{member_guid}/transactions/{transaction_guid}'.sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'transaction_guid' + '}', CGI.escape(transaction_guid.to_s))
4497
+ local_var_path = '/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}/transactions/{transaction_guid}'.sub('{' + 'account_guid' + '}', CGI.escape(account_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'transaction_guid' + '}', CGI.escape(transaction_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
4474
4498
 
4475
4499
  # query parameters
4476
4500
  query_params = opts[:query_params] || {}
@@ -5267,8 +5291,8 @@ module MxPlatformRuby
5267
5291
  # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5268
5292
  # @param [Hash] opts the optional parameters
5269
5293
  # @option opts [String] :referral_source Must be either &#x60;BROWSER&#x60; or &#x60;APP&#x60; depending on the implementation. Defaults to &#x60;BROWSER&#x60;.
5270
- # @option opts [String] :ui_message_webview_url_scheme A scheme for routing the user back to the application state they were previously in.
5271
5294
  # @option opts [Boolean] :skip_aggregation Setting this parameter to &#x60;true&#x60; will prevent the member from automatically aggregating after being redirected from the authorization page.
5295
+ # @option opts [String] :ui_message_webview_url_scheme A scheme for routing the user back to the application state they were previously in.
5272
5296
  # @return [OAuthWindowResponseBody]
5273
5297
  def request_o_auth_window_uri(member_guid, user_guid, opts = {})
5274
5298
  data, _status_code, _headers = request_o_auth_window_uri_with_http_info(member_guid, user_guid, opts)
@@ -5281,8 +5305,8 @@ module MxPlatformRuby
5281
5305
  # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5282
5306
  # @param [Hash] opts the optional parameters
5283
5307
  # @option opts [String] :referral_source Must be either &#x60;BROWSER&#x60; or &#x60;APP&#x60; depending on the implementation. Defaults to &#x60;BROWSER&#x60;.
5284
- # @option opts [String] :ui_message_webview_url_scheme A scheme for routing the user back to the application state they were previously in.
5285
5308
  # @option opts [Boolean] :skip_aggregation Setting this parameter to &#x60;true&#x60; will prevent the member from automatically aggregating after being redirected from the authorization page.
5309
+ # @option opts [String] :ui_message_webview_url_scheme A scheme for routing the user back to the application state they were previously in.
5286
5310
  # @return [Array<(OAuthWindowResponseBody, Integer, Hash)>] OAuthWindowResponseBody data, response status code and response headers
5287
5311
  def request_o_auth_window_uri_with_http_info(member_guid, user_guid, opts = {})
5288
5312
  if @api_client.config.debugging
@@ -5302,8 +5326,8 @@ module MxPlatformRuby
5302
5326
  # query parameters
5303
5327
  query_params = opts[:query_params] || {}
5304
5328
  query_params[:'referral_source'] = opts[:'referral_source'] if !opts[:'referral_source'].nil?
5305
- query_params[:'ui_message_webview_url_scheme'] = opts[:'ui_message_webview_url_scheme'] if !opts[:'ui_message_webview_url_scheme'].nil?
5306
5329
  query_params[:'skip_aggregation'] = opts[:'skip_aggregation'] if !opts[:'skip_aggregation'].nil?
5330
+ query_params[:'ui_message_webview_url_scheme'] = opts[:'ui_message_webview_url_scheme'] if !opts[:'ui_message_webview_url_scheme'].nil?
5307
5331
 
5308
5332
  # header parameters
5309
5333
  header_params = opts[:header_params] || {}
@@ -5339,6 +5363,194 @@ module MxPlatformRuby
5339
5363
  return data, status_code, headers
5340
5364
  end
5341
5365
 
5366
+ # Request payment account
5367
+ # Use this endpoint to request a payment account.
5368
+ # @param [Hash] opts the optional parameters
5369
+ # @return [PaymentAccountResponseBody]
5370
+ def request_payment_account(opts = {})
5371
+ data, _status_code, _headers = request_payment_account_with_http_info(opts)
5372
+ data
5373
+ end
5374
+
5375
+ # Request payment account
5376
+ # Use this endpoint to request a payment account.
5377
+ # @param [Hash] opts the optional parameters
5378
+ # @return [Array<(PaymentAccountResponseBody, Integer, Hash)>] PaymentAccountResponseBody data, response status code and response headers
5379
+ def request_payment_account_with_http_info(opts = {})
5380
+ if @api_client.config.debugging
5381
+ @api_client.config.logger.debug 'Calling API: MxPlatformApi.request_payment_account ...'
5382
+ end
5383
+ # resource path
5384
+ local_var_path = '/payment_account'
5385
+
5386
+ # query parameters
5387
+ query_params = opts[:query_params] || {}
5388
+
5389
+ # header parameters
5390
+ header_params = opts[:header_params] || {}
5391
+ # HTTP header 'Accept' (if needed)
5392
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json'])
5393
+
5394
+ # form parameters
5395
+ form_params = opts[:form_params] || {}
5396
+
5397
+ # http body (model)
5398
+ post_body = opts[:debug_body]
5399
+
5400
+ # return_type
5401
+ return_type = opts[:debug_return_type] || 'PaymentAccountResponseBody'
5402
+
5403
+ # auth_names
5404
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
5405
+
5406
+ new_options = opts.merge(
5407
+ :operation => :"MxPlatformApi.request_payment_account",
5408
+ :header_params => header_params,
5409
+ :query_params => query_params,
5410
+ :form_params => form_params,
5411
+ :body => post_body,
5412
+ :auth_names => auth_names,
5413
+ :return_type => return_type
5414
+ )
5415
+
5416
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
5417
+ if @api_client.config.debugging
5418
+ @api_client.config.logger.debug "API called: MxPlatformApi#request_payment_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5419
+ end
5420
+ return data, status_code, headers
5421
+ end
5422
+
5423
+ # Request payment processor authorization code
5424
+ # Use this endpoint to request a payment processor authorization code.
5425
+ # @param payment_processor_authorization_code_request_body [PaymentProcessorAuthorizationCodeRequestBody] Payment processor authorization code object containing account_guid, member_guid, and user_guid.
5426
+ # @param [Hash] opts the optional parameters
5427
+ # @return [PaymentProcessorAuthorizationCodeResponseBody]
5428
+ def request_payment_processor_authorization_code(payment_processor_authorization_code_request_body, opts = {})
5429
+ data, _status_code, _headers = request_payment_processor_authorization_code_with_http_info(payment_processor_authorization_code_request_body, opts)
5430
+ data
5431
+ end
5432
+
5433
+ # Request payment processor authorization code
5434
+ # Use this endpoint to request a payment processor authorization code.
5435
+ # @param payment_processor_authorization_code_request_body [PaymentProcessorAuthorizationCodeRequestBody] Payment processor authorization code object containing account_guid, member_guid, and user_guid.
5436
+ # @param [Hash] opts the optional parameters
5437
+ # @return [Array<(PaymentProcessorAuthorizationCodeResponseBody, Integer, Hash)>] PaymentProcessorAuthorizationCodeResponseBody data, response status code and response headers
5438
+ def request_payment_processor_authorization_code_with_http_info(payment_processor_authorization_code_request_body, opts = {})
5439
+ if @api_client.config.debugging
5440
+ @api_client.config.logger.debug 'Calling API: MxPlatformApi.request_payment_processor_authorization_code ...'
5441
+ end
5442
+ # verify the required parameter 'payment_processor_authorization_code_request_body' is set
5443
+ if @api_client.config.client_side_validation && payment_processor_authorization_code_request_body.nil?
5444
+ fail ArgumentError, "Missing the required parameter 'payment_processor_authorization_code_request_body' when calling MxPlatformApi.request_payment_processor_authorization_code"
5445
+ end
5446
+ # resource path
5447
+ local_var_path = '/payment_processor_authorization_code'
5448
+
5449
+ # query parameters
5450
+ query_params = opts[:query_params] || {}
5451
+
5452
+ # header parameters
5453
+ header_params = opts[:header_params] || {}
5454
+ # HTTP header 'Accept' (if needed)
5455
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json'])
5456
+ # HTTP header 'Content-Type'
5457
+ content_type = @api_client.select_header_content_type(['application/json'])
5458
+ if !content_type.nil?
5459
+ header_params['Content-Type'] = content_type
5460
+ end
5461
+
5462
+ # form parameters
5463
+ form_params = opts[:form_params] || {}
5464
+
5465
+ # http body (model)
5466
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(payment_processor_authorization_code_request_body)
5467
+
5468
+ # return_type
5469
+ return_type = opts[:debug_return_type] || 'PaymentProcessorAuthorizationCodeResponseBody'
5470
+
5471
+ # auth_names
5472
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
5473
+
5474
+ new_options = opts.merge(
5475
+ :operation => :"MxPlatformApi.request_payment_processor_authorization_code",
5476
+ :header_params => header_params,
5477
+ :query_params => query_params,
5478
+ :form_params => form_params,
5479
+ :body => post_body,
5480
+ :auth_names => auth_names,
5481
+ :return_type => return_type
5482
+ )
5483
+
5484
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
5485
+ if @api_client.config.debugging
5486
+ @api_client.config.logger.debug "API called: MxPlatformApi#request_payment_processor_authorization_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5487
+ end
5488
+ return data, status_code, headers
5489
+ end
5490
+
5491
+ # Request payment processor token
5492
+ # Use this endpoint to request a payment processor token.
5493
+ # @param [Hash] opts the optional parameters
5494
+ # @option opts [String] :code Code to request processor token.
5495
+ # @option opts [String] :grant_type Specify grant type.
5496
+ # @return [PaymentProcessorTokenResponseBody]
5497
+ def request_payment_processor_token(opts = {})
5498
+ data, _status_code, _headers = request_payment_processor_token_with_http_info(opts)
5499
+ data
5500
+ end
5501
+
5502
+ # Request payment processor token
5503
+ # Use this endpoint to request a payment processor token.
5504
+ # @param [Hash] opts the optional parameters
5505
+ # @option opts [String] :code Code to request processor token.
5506
+ # @option opts [String] :grant_type Specify grant type.
5507
+ # @return [Array<(PaymentProcessorTokenResponseBody, Integer, Hash)>] PaymentProcessorTokenResponseBody data, response status code and response headers
5508
+ def request_payment_processor_token_with_http_info(opts = {})
5509
+ if @api_client.config.debugging
5510
+ @api_client.config.logger.debug 'Calling API: MxPlatformApi.request_payment_processor_token ...'
5511
+ end
5512
+ # resource path
5513
+ local_var_path = '/payment_processor_token'
5514
+
5515
+ # query parameters
5516
+ query_params = opts[:query_params] || {}
5517
+ query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
5518
+ query_params[:'grant_type'] = opts[:'grant_type'] if !opts[:'grant_type'].nil?
5519
+
5520
+ # header parameters
5521
+ header_params = opts[:header_params] || {}
5522
+ # HTTP header 'Accept' (if needed)
5523
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.mx.api.v1+json'])
5524
+
5525
+ # form parameters
5526
+ form_params = opts[:form_params] || {}
5527
+
5528
+ # http body (model)
5529
+ post_body = opts[:debug_body]
5530
+
5531
+ # return_type
5532
+ return_type = opts[:debug_return_type] || 'PaymentProcessorTokenResponseBody'
5533
+
5534
+ # auth_names
5535
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
5536
+
5537
+ new_options = opts.merge(
5538
+ :operation => :"MxPlatformApi.request_payment_processor_token",
5539
+ :header_params => header_params,
5540
+ :query_params => query_params,
5541
+ :form_params => form_params,
5542
+ :body => post_body,
5543
+ :auth_names => auth_names,
5544
+ :return_type => return_type
5545
+ )
5546
+
5547
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
5548
+ if @api_client.config.debugging
5549
+ @api_client.config.logger.debug "API called: MxPlatformApi#request_payment_processor_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5550
+ end
5551
+ return data, status_code, headers
5552
+ end
5553
+
5342
5554
  # Request widget url
5343
5555
  # This endpoint allows partners to get a URL by passing the `widget_type` in the request body, as well as configuring it in several different ways. In the case of Connect, that means setting the `widget_type` to `connect_widget`. Partners may also pass an optional `Accept-Language` header as well as a number of configuration options. Note that this is a `POST` request.
5344
5556
  # @param user_guid [String] The unique id for a &#x60;user&#x60;.
@@ -5498,47 +5710,47 @@ module MxPlatformRuby
5498
5710
 
5499
5711
  # Update account by member
5500
5712
  # This endpoint allows you to update certain attributes of an `account` resource.
5501
- # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5502
- # @param member_guid [String] The unique id for a &#x60;member&#x60;.
5503
5713
  # @param account_guid [String] The unique id for an &#x60;account&#x60;.
5714
+ # @param member_guid [String] The unique id for a &#x60;member&#x60;.
5715
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5504
5716
  # @param account_update_request_body [AccountUpdateRequestBody] Account object to be created with optional parameters (is_hidden)
5505
5717
  # @param [Hash] opts the optional parameters
5506
5718
  # @return [AccountResponseBody]
5507
- def update_account_by_member(user_guid, member_guid, account_guid, account_update_request_body, opts = {})
5508
- data, _status_code, _headers = update_account_by_member_with_http_info(user_guid, member_guid, account_guid, account_update_request_body, opts)
5719
+ def update_account_by_member(account_guid, member_guid, user_guid, account_update_request_body, opts = {})
5720
+ data, _status_code, _headers = update_account_by_member_with_http_info(account_guid, member_guid, user_guid, account_update_request_body, opts)
5509
5721
  data
5510
5722
  end
5511
5723
 
5512
5724
  # Update account by member
5513
5725
  # This endpoint allows you to update certain attributes of an &#x60;account&#x60; resource.
5514
- # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5515
- # @param member_guid [String] The unique id for a &#x60;member&#x60;.
5516
5726
  # @param account_guid [String] The unique id for an &#x60;account&#x60;.
5727
+ # @param member_guid [String] The unique id for a &#x60;member&#x60;.
5728
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5517
5729
  # @param account_update_request_body [AccountUpdateRequestBody] Account object to be created with optional parameters (is_hidden)
5518
5730
  # @param [Hash] opts the optional parameters
5519
5731
  # @return [Array<(AccountResponseBody, Integer, Hash)>] AccountResponseBody data, response status code and response headers
5520
- def update_account_by_member_with_http_info(user_guid, member_guid, account_guid, account_update_request_body, opts = {})
5732
+ def update_account_by_member_with_http_info(account_guid, member_guid, user_guid, account_update_request_body, opts = {})
5521
5733
  if @api_client.config.debugging
5522
5734
  @api_client.config.logger.debug 'Calling API: MxPlatformApi.update_account_by_member ...'
5523
5735
  end
5524
- # verify the required parameter 'user_guid' is set
5525
- if @api_client.config.client_side_validation && user_guid.nil?
5526
- fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.update_account_by_member"
5736
+ # verify the required parameter 'account_guid' is set
5737
+ if @api_client.config.client_side_validation && account_guid.nil?
5738
+ fail ArgumentError, "Missing the required parameter 'account_guid' when calling MxPlatformApi.update_account_by_member"
5527
5739
  end
5528
5740
  # verify the required parameter 'member_guid' is set
5529
5741
  if @api_client.config.client_side_validation && member_guid.nil?
5530
5742
  fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.update_account_by_member"
5531
5743
  end
5532
- # verify the required parameter 'account_guid' is set
5533
- if @api_client.config.client_side_validation && account_guid.nil?
5534
- fail ArgumentError, "Missing the required parameter 'account_guid' when calling MxPlatformApi.update_account_by_member"
5744
+ # verify the required parameter 'user_guid' is set
5745
+ if @api_client.config.client_side_validation && user_guid.nil?
5746
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.update_account_by_member"
5535
5747
  end
5536
5748
  # verify the required parameter 'account_update_request_body' is set
5537
5749
  if @api_client.config.client_side_validation && account_update_request_body.nil?
5538
5750
  fail ArgumentError, "Missing the required parameter 'account_update_request_body' when calling MxPlatformApi.update_account_by_member"
5539
5751
  end
5540
5752
  # resource path
5541
- local_var_path = '/users/{user_guid}/members/{member_guid}/accounts/{account_guid}'.sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'account_guid' + '}', CGI.escape(account_guid.to_s))
5753
+ local_var_path = '/users/{user_guid}/members/{member_guid}/accounts/{account_guid}'.sub('{' + 'account_guid' + '}', CGI.escape(account_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
5542
5754
 
5543
5755
  # query parameters
5544
5756
  query_params = opts[:query_params] || {}
@@ -5664,29 +5876,33 @@ module MxPlatformRuby
5664
5876
 
5665
5877
  # Update managed account
5666
5878
  # Use this endpoint to update the attributes of a partner-managed account according to its unique GUID.
5879
+ # @param account_guid [String] The unique id for an &#x60;account&#x60;.
5667
5880
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
5668
5881
  # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5669
- # @param account_guid [String] The unique id for an &#x60;account&#x60;.
5670
5882
  # @param managed_account_update_request_body [ManagedAccountUpdateRequestBody] Managed account object to be updated (While no single parameter is required, the request body can&#39;t be empty)
5671
5883
  # @param [Hash] opts the optional parameters
5672
5884
  # @return [AccountResponseBody]
5673
- def update_managed_account(member_guid, user_guid, account_guid, managed_account_update_request_body, opts = {})
5674
- data, _status_code, _headers = update_managed_account_with_http_info(member_guid, user_guid, account_guid, managed_account_update_request_body, opts)
5885
+ def update_managed_account(account_guid, member_guid, user_guid, managed_account_update_request_body, opts = {})
5886
+ data, _status_code, _headers = update_managed_account_with_http_info(account_guid, member_guid, user_guid, managed_account_update_request_body, opts)
5675
5887
  data
5676
5888
  end
5677
5889
 
5678
5890
  # Update managed account
5679
5891
  # Use this endpoint to update the attributes of a partner-managed account according to its unique GUID.
5892
+ # @param account_guid [String] The unique id for an &#x60;account&#x60;.
5680
5893
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
5681
5894
  # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5682
- # @param account_guid [String] The unique id for an &#x60;account&#x60;.
5683
5895
  # @param managed_account_update_request_body [ManagedAccountUpdateRequestBody] Managed account object to be updated (While no single parameter is required, the request body can&#39;t be empty)
5684
5896
  # @param [Hash] opts the optional parameters
5685
5897
  # @return [Array<(AccountResponseBody, Integer, Hash)>] AccountResponseBody data, response status code and response headers
5686
- def update_managed_account_with_http_info(member_guid, user_guid, account_guid, managed_account_update_request_body, opts = {})
5898
+ def update_managed_account_with_http_info(account_guid, member_guid, user_guid, managed_account_update_request_body, opts = {})
5687
5899
  if @api_client.config.debugging
5688
5900
  @api_client.config.logger.debug 'Calling API: MxPlatformApi.update_managed_account ...'
5689
5901
  end
5902
+ # verify the required parameter 'account_guid' is set
5903
+ if @api_client.config.client_side_validation && account_guid.nil?
5904
+ fail ArgumentError, "Missing the required parameter 'account_guid' when calling MxPlatformApi.update_managed_account"
5905
+ end
5690
5906
  # verify the required parameter 'member_guid' is set
5691
5907
  if @api_client.config.client_side_validation && member_guid.nil?
5692
5908
  fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.update_managed_account"
@@ -5695,16 +5911,12 @@ module MxPlatformRuby
5695
5911
  if @api_client.config.client_side_validation && user_guid.nil?
5696
5912
  fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.update_managed_account"
5697
5913
  end
5698
- # verify the required parameter 'account_guid' is set
5699
- if @api_client.config.client_side_validation && account_guid.nil?
5700
- fail ArgumentError, "Missing the required parameter 'account_guid' when calling MxPlatformApi.update_managed_account"
5701
- end
5702
5914
  # verify the required parameter 'managed_account_update_request_body' is set
5703
5915
  if @api_client.config.client_side_validation && managed_account_update_request_body.nil?
5704
5916
  fail ArgumentError, "Missing the required parameter 'managed_account_update_request_body' when calling MxPlatformApi.update_managed_account"
5705
5917
  end
5706
5918
  # resource path
5707
- local_var_path = '/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}'.sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'account_guid' + '}', CGI.escape(account_guid.to_s))
5919
+ local_var_path = '/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}'.sub('{' + 'account_guid' + '}', CGI.escape(account_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
5708
5920
 
5709
5921
  # query parameters
5710
5922
  query_params = opts[:query_params] || {}
@@ -5830,47 +6042,53 @@ module MxPlatformRuby
5830
6042
 
5831
6043
  # Update managed transaction
5832
6044
  # Use this endpoint to update the attributes of the specified partner_managed `transaction`.
6045
+ # @param account_guid [String] The unique id for an &#x60;account&#x60;.
5833
6046
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
5834
- # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5835
6047
  # @param transaction_guid [String] The unique id for a &#x60;transaction&#x60;.
6048
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5836
6049
  # @param managed_transaction_update_request_body [ManagedTransactionUpdateRequestBody] Managed transaction object to be updated (While no single parameter is required, the request body can&#39;t be empty)
5837
6050
  # @param [Hash] opts the optional parameters
5838
6051
  # @return [TransactionResponseBody]
5839
- def update_managed_transaction(member_guid, user_guid, transaction_guid, managed_transaction_update_request_body, opts = {})
5840
- data, _status_code, _headers = update_managed_transaction_with_http_info(member_guid, user_guid, transaction_guid, managed_transaction_update_request_body, opts)
6052
+ def update_managed_transaction(account_guid, member_guid, transaction_guid, user_guid, managed_transaction_update_request_body, opts = {})
6053
+ data, _status_code, _headers = update_managed_transaction_with_http_info(account_guid, member_guid, transaction_guid, user_guid, managed_transaction_update_request_body, opts)
5841
6054
  data
5842
6055
  end
5843
6056
 
5844
6057
  # Update managed transaction
5845
6058
  # Use this endpoint to update the attributes of the specified partner_managed &#x60;transaction&#x60;.
6059
+ # @param account_guid [String] The unique id for an &#x60;account&#x60;.
5846
6060
  # @param member_guid [String] The unique id for a &#x60;member&#x60;.
5847
- # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5848
6061
  # @param transaction_guid [String] The unique id for a &#x60;transaction&#x60;.
6062
+ # @param user_guid [String] The unique id for a &#x60;user&#x60;.
5849
6063
  # @param managed_transaction_update_request_body [ManagedTransactionUpdateRequestBody] Managed transaction object to be updated (While no single parameter is required, the request body can&#39;t be empty)
5850
6064
  # @param [Hash] opts the optional parameters
5851
6065
  # @return [Array<(TransactionResponseBody, Integer, Hash)>] TransactionResponseBody data, response status code and response headers
5852
- def update_managed_transaction_with_http_info(member_guid, user_guid, transaction_guid, managed_transaction_update_request_body, opts = {})
6066
+ def update_managed_transaction_with_http_info(account_guid, member_guid, transaction_guid, user_guid, managed_transaction_update_request_body, opts = {})
5853
6067
  if @api_client.config.debugging
5854
6068
  @api_client.config.logger.debug 'Calling API: MxPlatformApi.update_managed_transaction ...'
5855
6069
  end
6070
+ # verify the required parameter 'account_guid' is set
6071
+ if @api_client.config.client_side_validation && account_guid.nil?
6072
+ fail ArgumentError, "Missing the required parameter 'account_guid' when calling MxPlatformApi.update_managed_transaction"
6073
+ end
5856
6074
  # verify the required parameter 'member_guid' is set
5857
6075
  if @api_client.config.client_side_validation && member_guid.nil?
5858
6076
  fail ArgumentError, "Missing the required parameter 'member_guid' when calling MxPlatformApi.update_managed_transaction"
5859
6077
  end
5860
- # verify the required parameter 'user_guid' is set
5861
- if @api_client.config.client_side_validation && user_guid.nil?
5862
- fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.update_managed_transaction"
5863
- end
5864
6078
  # verify the required parameter 'transaction_guid' is set
5865
6079
  if @api_client.config.client_side_validation && transaction_guid.nil?
5866
6080
  fail ArgumentError, "Missing the required parameter 'transaction_guid' when calling MxPlatformApi.update_managed_transaction"
5867
6081
  end
6082
+ # verify the required parameter 'user_guid' is set
6083
+ if @api_client.config.client_side_validation && user_guid.nil?
6084
+ fail ArgumentError, "Missing the required parameter 'user_guid' when calling MxPlatformApi.update_managed_transaction"
6085
+ end
5868
6086
  # verify the required parameter 'managed_transaction_update_request_body' is set
5869
6087
  if @api_client.config.client_side_validation && managed_transaction_update_request_body.nil?
5870
6088
  fail ArgumentError, "Missing the required parameter 'managed_transaction_update_request_body' when calling MxPlatformApi.update_managed_transaction"
5871
6089
  end
5872
6090
  # resource path
5873
- local_var_path = '/users/{user_guid}/managed_members/{member_guid}/transactions/{transaction_guid}'.sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s)).sub('{' + 'transaction_guid' + '}', CGI.escape(transaction_guid.to_s))
6091
+ local_var_path = '/users/{user_guid}/managed_members/{member_guid}/accounts/{account_guid}/transactions/{transaction_guid}'.sub('{' + 'account_guid' + '}', CGI.escape(account_guid.to_s)).sub('{' + 'member_guid' + '}', CGI.escape(member_guid.to_s)).sub('{' + 'transaction_guid' + '}', CGI.escape(transaction_guid.to_s)).sub('{' + 'user_guid' + '}', CGI.escape(user_guid.to_s))
5874
6092
 
5875
6093
  # query parameters
5876
6094
  query_params = opts[:query_params] || {}
@@ -6315,7 +6533,7 @@ module MxPlatformRuby
6315
6533
  end
6316
6534
 
6317
6535
  # Update user
6318
- # Use this endpoint to update the attributes of a specific user. The MX Platform API will respond with the updated user object. Disabling a user means that accounts and transactions associated with it will not be updated in the background by MX. It will also restrict access to that users data until they are no longer disabled. Users who are disabled for the entirety of an MX Platform API billing period will not be factored into that months bill. To disable a user, update it and set the is_disabled parameter to true. Set it to false to re-enable the user.
6536
+ # Use this endpoint to update the attributes of the specified user.
6319
6537
  # @param user_guid [String] The unique id for a &#x60;user&#x60;.
6320
6538
  # @param user_update_request_body [UserUpdateRequestBody] User object to be updated (None of these parameters are required, but the user object cannot be empty.)
6321
6539
  # @param [Hash] opts the optional parameters
@@ -6326,7 +6544,7 @@ module MxPlatformRuby
6326
6544
  end
6327
6545
 
6328
6546
  # Update user
6329
- # Use this endpoint to update the attributes of a specific user. The MX Platform API will respond with the updated user object. Disabling a user means that accounts and transactions associated with it will not be updated in the background by MX. It will also restrict access to that users data until they are no longer disabled. Users who are disabled for the entirety of an MX Platform API billing period will not be factored into that months bill. To disable a user, update it and set the is_disabled parameter to true. Set it to false to re-enable the user.
6547
+ # Use this endpoint to update the attributes of the specified user.
6330
6548
  # @param user_guid [String] The unique id for a &#x60;user&#x60;.
6331
6549
  # @param user_update_request_body [UserUpdateRequestBody] User object to be updated (None of these parameters are required, but the user object cannot be empty.)
6332
6550
  # @param [Hash] opts the optional parameters