Class: Wire4ExamplesTest
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- Wire4ExamplesTest
- Defined in:
- lib/wire4_auth/testing.rb
Overview
noinspection RubyTooManyMethodsInspection
Constant Summary collapse
- CLIENT_ID =
"FxUWmqYGZuv8O1qjxstvIyJothMa"- CLIENT_SECRET =
"kjwbkrPVgXsnaUGzthj55dsFhx4a"- USER_KEY =
"[email protected]"- SECRET_KEY =
"0d1e33e94604f01b4e00d2fcb6b48f"- SUBSCRIPTION =
"f1504fea-3a8f-475a-a50a-90d3c40efc59"
Instance Method Summary collapse
-
#test_change_amount_limit_beneficiary ⇒ Object
noinspection RubyInstanceMethodNamingConvention.
- #test_check_web_hook_sign ⇒ Object
- #test_delete_beneficiary ⇒ Object
-
#test_delete_outgoing_pending_SPEI_transaction ⇒ Object
noinspection RubyInstanceMethodNamingConvention.
- #test_delete_pre_subscription ⇒ Object
-
#test_delete_subscription ⇒ Object
noinspection RubyLocalVariableNamingConvention.
- #test_get_depositants ⇒ Object
- #test_get_facturas ⇒ Object
- #test_get_facturas_by_id ⇒ Object
- #test_get_web_hook_by_id ⇒ Object
- #test_get_web_hooks ⇒ Object
-
#test_incoming_SPEI_transactions_report ⇒ Object
noinspection RubyInstanceMethodNamingConvention.
- #test_make_pre_subscription ⇒ Object
- #test_obtain_balance ⇒ Object
- #test_obtain_beneficiaries ⇒ Object
- #test_obtain_beneficiaries_spid ⇒ Object
- #test_obtain_cep ⇒ Object
- #test_obtain_institutions ⇒ Object
- #test_obtain_relationships ⇒ Object
-
#test_obtain_SPID_classifications ⇒ Object
noinspection RubyInstanceMethodNamingConvention.
-
#test_out_comming_spei_request_id_transactions_report_using_get ⇒ Object
noinspection RubyInstanceMethodNamingConvention.
-
#test_outgoing_SPEI_transactions_report ⇒ Object
noinspection RubyInstanceMethodNamingConvention.
-
#test_pre_register_beneficiaries ⇒ Object
noinspection RubyInstanceMethodNamingConvention.
-
#test_pre_register_beneficiaries_SPID ⇒ Object
noinspection RubyInstanceMethodNamingConvention.
- #test_register_depositants ⇒ Object
-
#test_register_outgoing_SPEI_transaction ⇒ Object
noinspection RubyInstanceMethodNamingConvention.
-
#test_register_outgoing_SPID_transaction ⇒ Object
noinspection RubyInstanceMethodNamingConvention.
- #test_register_web_hook ⇒ Object
-
#test_remove_beneficiaries_pending ⇒ Object
noinspection RubyInstanceMethodNamingConvention.
- #test_send_contact ⇒ Object
Instance Method Details
#test_change_amount_limit_beneficiary ⇒ Object
noinspection RubyInstanceMethodNamingConvention
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 |
# File 'lib/wire4_auth/testing.rb', line 389 def test_change_amount_limit_beneficiary omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spei_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spei_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::CuentasDeBeneficiariosSPEIApi.new # build body with info (check references for more info: types, required fields, etc.) subscription = SUBSCRIPTION account = "112680000156896531" body = Wire4Client::AmountRequest.new body.amount_limit = 20000.00 body.currency_code = "MXP" body.previous_amount_limit = 10000.00 begin # Call the API response = api_instance.update_amount_limit_account_using_put_with_http_info(, account, body, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_check_web_hook_sign ⇒ Object
1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 |
# File 'lib/wire4_auth/testing.rb', line 1121 def test_check_web_hook_sign omit('Reason') puts `cd .. && cd .. && find *`.split("\n").uniq.sort.select { |f| !f.empty? } payload = "{ \"responseCode\":0, \n" + \ " \"message\":\"Ya existe este beneficiario de pago a ctas nacionales en el contrato\",\n" + \ " \"statusCode\":\"ERROR\",\n" + \ " \"externalReference\":\"8939TR\"\n" + \ "}" expected_key = "8e63e88434679473bdb28546d7d91537601f4588e801972376d5c5addcb8fd706e6c92421b73151de3c1945ce000a8a" + \ +"5aa1d5cc3cdd73f2769ee9980db420db9" result = Wire4Auth::UtilsCompute.compare_webhook_msg_signatures(payload, "9ie93030?=", expected_key) puts "WebHook signature verification, correct: #{result}" assert result end |
#test_delete_beneficiary ⇒ Object
428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
# File 'lib/wire4_auth/testing.rb', line 428 def test_delete_beneficiary # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spei_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spei_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::CuentasDeBeneficiariosSPEIApi.new # build body with info (check references for more info: types, required fields, etc.) subscription = SUBSCRIPTION account = "112680000156896531" begin # Call the API response = api_instance.delete_account_using_delete_with_http_info(, account, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_delete_outgoing_pending_SPEI_transaction ⇒ Object
noinspection RubyInstanceMethodNamingConvention
873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 |
# File 'lib/wire4_auth/testing.rb', line 873 def test_delete_outgoing_pending_SPEI_transaction omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spei_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spei_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::TransferenciasSPEIApi.new # build body with info (check references for more info: types, required fields, etc.) subscription = SUBSCRIPTION request_id = "8abc184f-c3ac-4abd-9045-a9b4a501f007" begin # Call the API response = api_instance.drop_transactions_pending_using_delete_with_http_info(, request_id, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_delete_pre_subscription ⇒ Object
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/wire4_auth/testing.rb', line 155 def test_delete_pre_subscription omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "general" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app('general') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::SuscripcionesApi.new # build body with info (check references for more info, types, required fields) subscription = "55af515a-43ec-4537-96a4-489d1deef127" begin # Call the API response = api_instance.remove_subscription_pending_status_using_delete_with_http_info(, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_delete_subscription ⇒ Object
noinspection RubyLocalVariableNamingConvention
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/wire4_auth/testing.rb', line 190 def test_delete_subscription omit('Reason') subscription_to_remove_user_key = "[email protected]" subscription_to_remove_user_secret = "8617fa525ca4140b545b66c5adcbb1" # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spei_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(subscription_to_remove_user_key, subscription_to_remove_user_secret, 'spei_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::SuscripcionesApi.new # build body with info (check references for more info, types, required fields) subscription = "5873240b-cf69-456a-ab5a-88f5e79ab4b8" begin # Call the API response = api_instance.remove_enrollment_user_using_delete_with_http_info(, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_get_depositants ⇒ Object
646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'lib/wire4_auth/testing.rb', line 646 def test_get_depositants omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spei_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spei_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::DepositantesApi.new # build body with info (check references for more info: types, required fields, etc.) subscription = SUBSCRIPTION begin # Call the API response = api_instance.get_depositants_using_get(, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_get_facturas ⇒ Object
1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 |
# File 'lib/wire4_auth/testing.rb', line 1053 def test_get_facturas omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX #oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) oauth_wire4 = Wire4Auth::OAuthWire4.new("kIinyEIYWUIF3pflFxhRdKft2_ga", "gca6FwUE_9Dk23UhWoM81pZkNgEa", Wire4Auth::EnvironmentEnum::DEVELOPMENT) begin # Obtain an access token use application flow and scope "general" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app('general') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::FacturasApi.new begin # Call the API response = api_instance.billings_report_using_get(, period: "2019-10") p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_get_facturas_by_id ⇒ Object
1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 |
# File 'lib/wire4_auth/testing.rb', line 1087 def test_get_facturas_by_id omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) #oauth_wire4 = Wire4Auth::OAuthWire4.new("kIinyEIYWUIF3pflFxhRdKft2_ga", # "gca6FwUE_9Dk23UhWoM81pZkNgEa", Wire4Auth::EnvironmentEnum::DEVELOPMENT) begin # Obtain an access token use application flow and scope "general" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app('general') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::FacturasApi.new begin # Call the API response = api_instance.billings_report_by_id_using_get(, "834BA74A-BBBB-43C4-8400-A4528153C2BD") p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_get_web_hook_by_id ⇒ Object
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 |
# File 'lib/wire4_auth/testing.rb', line 1022 def test_get_web_hook_by_id omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "general" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app('general') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::WebhooksApi.new begin # Call the API response = api_instance.get_webhook(, "wh_3fe3e5f4849f4cabb147804fd55c86fc") p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_get_web_hooks ⇒ Object
991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 |
# File 'lib/wire4_auth/testing.rb', line 991 def test_get_web_hooks omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "general" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app('general') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::WebhooksApi.new begin # Call the API response = api_instance.get_webhooks() p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_incoming_SPEI_transactions_report ⇒ Object
noinspection RubyInstanceMethodNamingConvention
720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 |
# File 'lib/wire4_auth/testing.rb', line 720 def test_incoming_SPEI_transactions_report omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spei_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spei_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::TransferenciasSPEIApi.new # build body with info (check references for more info: types, required fields, etc.) subscription = SUBSCRIPTION begin # Call the API response = api_instance.incoming_spei_transactions_report_using_get(, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_make_pre_subscription ⇒ Object
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/wire4_auth/testing.rb', line 119 def test_make_pre_subscription omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "general" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app('general') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::SuscripcionesApi.new # build body with info (check references for more info: types, required fields, etc.) body = Wire4Client::PreEnrollmentData.new body.cancel_return_url = "https://your-app-url.mx/return" body.return_url = "https://your-app-url.mx/cancel" begin # Call the API response = api_instance.pre_enrollment_monex_user_using_post(, body) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_obtain_balance ⇒ Object
493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 |
# File 'lib/wire4_auth/testing.rb', line 493 def test_obtain_balance omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spei_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spei_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::SaldoApi.new # build body with info (check references for more info, types, required fields) subscription = SUBSCRIPTION begin # Call the API response = api_instance.get_balance_using_get(, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_obtain_beneficiaries ⇒ Object
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 |
# File 'lib/wire4_auth/testing.rb', line 351 def test_obtain_beneficiaries omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spei_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spei_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::CuentasDeBeneficiariosSPEIApi.new # build body with info (check references for more info: types, required fields, etc.) subscription = SUBSCRIPTION begin # Call the API # response = api_instance.get_beneficiaries_for_account_using_get(subscription, rfc: "RFCE010980AR3") # response = api_instance.get_beneficiaries_for_account_using_get(subscription, account: "RFCE010980AR3") # response = api_instance.get_beneficiaries_for_account_using_get(subscription, rfc: "RFCE010980AR3, account: "RFCE010980AR3") response = api_instance.get_beneficiaries_for_account_using_get(, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_obtain_beneficiaries_spid ⇒ Object
609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 |
# File 'lib/wire4_auth/testing.rb', line 609 def test_obtain_beneficiaries_spid omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spei_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spid_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::CuentasDeBeneficiariosSPIDApi.new # build body with info (check references for more info: types, required fields, etc.) subscription = SUBSCRIPTION begin # Call the API # response = api_instance.get_beneficiaries_for_account_using_get(subscription, rfc: "RFCE010980AR3") # response = api_instance.get_beneficiaries_for_account_using_get(subscription, account: "RFCE010980AR3") # response = api_instance.get_beneficiaries_for_account_using_get(subscription, rfc: "RFCE010980AR3, account: "RFCE010980AR3") response = api_instance.get_spid_beneficiaries_for_account(, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_obtain_cep ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/wire4_auth/testing.rb', line 77 def test_obtain_cep omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "general" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app('general') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::ComprobanteElectrnicoDePagoCEPApi.new # build body with info (check references for more info: types, required fields, etc.) cep_data = Wire4Client::CepSearchBanxico.new # CepSearchBanxico | Información para buscar un CEP cep_data.amount = 8963.25 cep_data.beneficiary_account = '072680004657656853' cep_data.beneficiary_bank_key = '40072' cep_data.clave_rastreo = '58735618' cep_data.operation_date = '05-12-2018' cep_data.reference = '1122334' cep_data.sender_account = '112680000156896531' cep_data.sender_bank_key = '40112' begin # Call the API response = api_instance.obtain_transaction_cep_using_post(, cep_data) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_obtain_institutions ⇒ Object
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
# File 'lib/wire4_auth/testing.rb', line 462 def test_obtain_institutions omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "general" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app('general') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::InstitucionesApi.new begin # Call the API response = api_instance.get_all_institutions_using_get() p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_obtain_relationships ⇒ Object
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/wire4_auth/testing.rb', line 228 def test_obtain_relationships omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spei_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spei_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::CuentasDeBeneficiariosSPEIApi.new # build body with info (check references for more info, types, required fields) subscription = SUBSCRIPTION begin # Call the API response = api_instance.get_available_relationships_monex_using_get(, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_obtain_SPID_classifications ⇒ Object
noinspection RubyInstanceMethodNamingConvention
528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 |
# File 'lib/wire4_auth/testing.rb', line 528 def test_obtain_SPID_classifications omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spid_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spid_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::TransferenciasSPIDApi.new # build body with info (check references for more info, types, required fields) subscription = SUBSCRIPTION begin # Call the API response = api_instance.get_spid_classifications_using_get(, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_out_comming_spei_request_id_transactions_report_using_get ⇒ Object
noinspection RubyInstanceMethodNamingConvention
790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 |
# File 'lib/wire4_auth/testing.rb', line 790 def test_out_comming_spei_request_id_transactions_report_using_get omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spei_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spei_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::TransferenciasSPEIApi.new # build body with info (check references for more info: types, required fields, etc.) subscription = SUBSCRIPTION request_id = '6a9efe39-a795-4e09-8f7f-197e647a0f8b' begin # Call the API response = api_instance.out_comming_spei_request_id_transactions_report_using_get(, request_id, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling TransferenciasSPEIApi->out_comming_spei_request_id_transactions_report_using_get: #{e}" # Optional manage exception in call API return end end |
#test_outgoing_SPEI_transactions_report ⇒ Object
noinspection RubyInstanceMethodNamingConvention
755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 |
# File 'lib/wire4_auth/testing.rb', line 755 def test_outgoing_SPEI_transactions_report omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spei_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spei_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::TransferenciasSPEIApi.new # build body with info (check references for more info: types, required fields, etc.) subscription = SUBSCRIPTION begin # Call the API response = api_instance.outgoing_spei_transactions_report_using_get(, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_pre_register_beneficiaries ⇒ Object
noinspection RubyInstanceMethodNamingConvention
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/wire4_auth/testing.rb', line 263 def test_pre_register_beneficiaries omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spei_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spei_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::CuentasDeBeneficiariosSPEIApi.new # build body with info (check references for more info: types, required fields, etc.) subscription = SUBSCRIPTION body = Wire4Client::AccountRequest.new body.return_url = "https://your-app-url.mx/return" body.cancel_return_url = "https://your-app-url.mx/cancel" account = Wire4Client::Account.new account.amount_limit = 10000.00 account.beneficiary_account = "112680000156896531" account.email = ["[email protected]"] account.kind_of_relationship = "RECURRENTE" account.numeric_reference_spei = "1234567" account.payment_concept_spei = "concept spei" person = Wire4Client::Person.new person.last_name = "Simpson" person.middle_name = "Jay" person.name = "Bartolomeo" account.person = person account.relationship = "ACREEDOR" account.rfc = "SJBA920125AB1" body.accounts = [account] begin # Call the API response = api_instance.pre_register_accounts_using_post(, body, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_pre_register_beneficiaries_SPID ⇒ Object
noinspection RubyInstanceMethodNamingConvention
563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 |
# File 'lib/wire4_auth/testing.rb', line 563 def test_pre_register_beneficiaries_SPID omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spid_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spid_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::CuentasDeBeneficiariosSPIDApi.new # build body with info (check references for more info: types, required fields, etc.) subscription = SUBSCRIPTION body = Wire4Client::AccountSpid.new body.return_url = "https://your-app-url.mx/return" body.cancel_return_url = "https://your-app-url.mx/cancel" body.amount_limit = 10000.00 body.beneficiary_account = "112680000156896531" body.email = ["[email protected]"] body.institution = Wire4Client::BeneficiaryInstitution.new(name: "BMONEX") body.kind_of_relationship = "RECURRENTE" body.numeric_reference = "1234567" body.payment_concept = "concept spei" body.relationship = "ACREEDOR" body.rfc = "SJBA920125AB1" begin # Call the API response = api_instance.pre_register_accounts_using_post1(, body, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_register_depositants ⇒ Object
680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 |
# File 'lib/wire4_auth/testing.rb', line 680 def test_register_depositants omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spei_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spei_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::DepositantesApi.new # build body with info (check references for more info: types, required fields, etc.) subscription = SUBSCRIPTION body = Wire4Client::DepositantsRegister.new body._alias = "Depositant 0292921" body.currency_code = "MXP" body.email = ["[email protected]"] body.name = "Marge Bouvier" begin # Call the API response = api_instance.register_depositants_using_post(, body, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_register_outgoing_SPEI_transaction ⇒ Object
noinspection RubyInstanceMethodNamingConvention
826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 |
# File 'lib/wire4_auth/testing.rb', line 826 def test_register_outgoing_SPEI_transaction omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spei_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spei_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::TransferenciasSPEIApi.new # build body with info (check references for more info: types, required fields, etc.) subscription = SUBSCRIPTION body = Wire4Client::TransactionsOutgoingRegister.new body.return_url = "https://your-app-url.mx/return" body.cancel_return_url = "https://your-app-url.mx/cancel" transaction = Wire4Client::TransactionOutgoing.new transaction.order_id = "137f14a4-9e12-4a98-bbd1-ab347753e68a" transaction.amount = 1259.69 transaction.beneficiary_account = "112680000156896531" transaction.currency_code = "MXP" transaction.email = ["[email protected]"] transaction.reference = 1234567 transaction.concept = "Transfer out test 1" body.transactions = [transaction] begin # Call the API response = api_instance.register_outgoing_spei_transaction_using_post(, subscription, body) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_register_outgoing_SPID_transaction ⇒ Object
noinspection RubyInstanceMethodNamingConvention
909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 |
# File 'lib/wire4_auth/testing.rb', line 909 def test_register_outgoing_SPID_transaction omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spid_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spid_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::TransferenciasSPIDApi.new # build body with info (check references for more info: types, required fields, etc.) subscription = SUBSCRIPTION body = Wire4Client::TransactionOutgoingSpid.new body.return_url = "https://your-app-url.mx/return" body.cancel_return_url = "https://your-app-url.mx/cancel" body.amount = 1259.69 body.beneficiary_account = "112680000156896531" body.classification_id = "01" body.currency_code = "USD" body.email = ["[email protected]"] body.numeric_reference_spid = 1234567 body.order_id = "77baa78f-be22-4f6a-b79e-60b20a198324" body.payment_concept_spid = "Transfer out test 1" begin # Call the API response = api_instance.register_outgoing_spid_transaction_using_post(, subscription, body) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_register_web_hook ⇒ Object
954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 |
# File 'lib/wire4_auth/testing.rb', line 954 def test_register_web_hook omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "general" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app('general') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::WebhooksApi.new # build body with info (check references for more info: types, required fields, etc.) body = Wire4Client::WebhookRequest.new # CepSearchBanxico | Información para buscar un CEP body.events = %w(ACCOUNT.CREATED TRANSACTION.OUTGOING.RECEIVED ENROLLMENT.CREATED) body.name = "RUBY TEST SDK WEBHOOK-REGISTER" body.url = "https://www.webhook.site/39034a03-8faf-424e-bb4a-7c3fee2bbfd3" begin # Call the API response = api_instance.register_webhook(, body) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_remove_beneficiaries_pending ⇒ Object
noinspection RubyInstanceMethodNamingConvention
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/wire4_auth/testing.rb', line 316 def test_remove_beneficiaries_pending omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "spei_admin" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app_user(USER_KEY, SECRET_KEY, 'spei_admin') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::CuentasDeBeneficiariosSPEIApi.new # build body with info (check references for more info: types, required fields, etc.) subscription = SUBSCRIPTION request_id = "b782a20b-d92c-4fd9-a5cc-33a88e9b0a79" begin # Call the API response = api_instance.remove_beneficiaries_pending_using_delete_with_http_info(, request_id, subscription) p response rescue Wire4Client::ApiError => e puts "Exception when calling the API: #{e}" # Optional manage exception in call API return end end |
#test_send_contact ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/wire4_auth/testing.rb', line 38 def test_send_contact omit('Reason') # Create the authenticator to obtain access token # The token URL and Service URL are defined for this environment enum value. # e.g. for Sandbox environment: Wire4Auth::EnvironmentEnum::SANDBOX oauth_wire4 = Wire4Auth::OAuthWire4.new(CLIENT_ID, CLIENT_SECRET, Wire4Auth::EnvironmentEnum::SANDBOX) begin # Obtain an access token use application flow and scope "general" and add to request oauth_wire4.config_default_api_client = oauth_wire4.obtain_access_token_app('general') rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end # create an instance of the API class api_instance = Wire4Client::ContactoApi.new # build body with info (check references for more info: types, required fields, etc.) body = Wire4Client::ContactRequest.new body.address = "Calle Falsa 123, Col Fantasía" body.company = "Compu Mundo Hiper Mega Red" body.contact_person = "Homer J Simpson" body.email = "[email protected]" body.phone_number = "4422102030" begin # Call the API response = api_instance.send_contact_using_post_with_http_info(, body) p response rescue Wire4Client::ApiError => e puts "Exception to obtain access token #{e}" # Optional manage exception in access token flow return end end |