blockchyp 2.9.3 → 2.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Makefile +8 -1
- data/README.md +2605 -477
- data/lib/blockchyp/version.rb +1 -1
- data/lib/blockchyp.rb +242 -3
- data/lib/blockchyp_client.rb +80 -0
- data/test/activate_terminal_test.rb +45 -0
- data/test/add_test_merchant_test.rb +56 -0
- data/test/batch_history_test.rb +10 -6
- data/test/boolean_prompt_test.rb +12 -6
- data/test/cancel_payment_link_test.rb +72 -0
- data/test/capture_signature_test.rb +12 -6
- data/test/deactivate_terminal_test.rb +42 -0
- data/test/delete_branding_asset_test.rb +50 -0
- data/test/delete_customer_test.rb +55 -0
- data/test/delete_media_asset_test.rb +53 -0
- data/test/delete_queued_transaction_test.rb +56 -0
- data/test/delete_slide_show_test.rb +50 -0
- data/test/delete_survey_question_test.rb +51 -0
- data/test/delete_test_merchant_test.rb +59 -0
- data/test/delete_token_test.rb +55 -0
- data/test/empty_branding_asset_test.rb +44 -0
- data/test/empty_slide_show_test.rb +45 -0
- data/test/gateway_timeout_test.rb +11 -4
- data/test/get_customer_test.rb +10 -6
- data/test/get_merchants_test.rb +52 -0
- data/test/invite_merchant_user_test.rb +45 -0
- data/test/link_token_test.rb +56 -0
- data/test/list_queued_transactions_test.rb +55 -0
- data/test/list_terminals_test.rb +42 -0
- data/test/media_asset_test.rb +57 -0
- data/test/media_test.rb +42 -0
- data/test/media_upload_test.rb +52 -0
- data/test/merchant_platforms_test.rb +59 -0
- data/test/merchant_profile_test.rb +10 -5
- data/test/merchant_users_test.rb +42 -0
- data/test/new_transaction_display_test.rb +12 -6
- data/test/pan_charge_test.rb +11 -5
- data/test/pan_enroll_test.rb +17 -6
- data/test/pan_preauth_test.rb +11 -5
- data/test/partial_refund_test.rb +11 -6
- data/test/search_customer_test.rb +10 -6
- data/test/send_payment_link_test.rb +11 -6
- data/test/simple_batch_close_test.rb +10 -6
- data/test/simple_capture_test.rb +10 -6
- data/test/simple_gift_activate_test.rb +12 -6
- data/test/simple_locate_test.rb +44 -0
- data/test/simple_message_test.rb +12 -6
- data/test/simple_ping_test.rb +12 -6
- data/test/simple_refund_test.rb +11 -6
- data/test/simple_reversal_test.rb +10 -6
- data/test/simple_void_test.rb +10 -6
- data/test/slide_show_test.rb +51 -0
- data/test/slide_shows_test.rb +49 -0
- data/test/survey_question_test.rb +48 -0
- data/test/survey_questions_test.rb +50 -0
- data/test/survey_results_test.rb +48 -0
- data/test/tc_delete_template_test.rb +51 -0
- data/test/tc_entry_test.rb +56 -0
- data/test/tc_log_test.rb +42 -0
- data/test/tc_template_test.rb +53 -0
- data/test/tc_template_update_test.rb +48 -0
- data/test/tc_templates_test.rb +42 -0
- data/test/terminal_branding_test.rb +42 -0
- data/test/terminal_charge_test.rb +12 -6
- data/test/terminal_clear_test.rb +12 -6
- data/test/terminal_ebt_balance_test.rb +12 -6
- data/test/terminal_ebt_charge_test.rb +12 -6
- data/test/terminal_enroll_test.rb +12 -6
- data/test/terminal_gift_card_balance_test.rb +12 -6
- data/test/terminal_keyed_charge_test.rb +12 -6
- data/test/terminal_manual_ebt_charge_test.rb +12 -6
- data/test/terminal_preauth_test.rb +12 -6
- data/test/terminal_queued_transaction_test.rb +51 -0
- data/test/terminal_status_test.rb +12 -6
- data/test/terminal_timeout_test.rb +12 -5
- data/test/terms_and_conditions_test.rb +12 -6
- data/test/test_helper.rb +2 -4
- data/test/testdata/aviato.png +0 -0
- data/test/text_prompt_test.rb +12 -6
- data/test/token_metadata_test.rb +55 -0
- data/test/transaction_history_test.rb +10 -6
- data/test/unlink_token_test.rb +56 -0
- data/test/update_branding_asset_test.rb +62 -0
- data/test/update_customer_test.rb +10 -5
- data/test/update_merchant_platforms_test.rb +61 -0
- data/test/update_merchant_test.rb +60 -0
- data/test/update_slide_show_test.rb +60 -0
- data/test/update_survey_question_test.rb +47 -0
- data/test/update_transaction_display_test.rb +12 -6
- data/test/upload_status_test.rb +53 -0
- metadata +49 -2
data/test/simple_void_test.rb
CHANGED
@@ -1,16 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019 BlockChyp, Inc. All rights reserved. Use of this code is
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
|
-
# This file was generated automatically
|
7
|
-
# every time the code is regenerated.
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
8
|
|
9
9
|
require ::File.expand_path('test_helper', __dir__)
|
10
10
|
|
11
11
|
module BlockChyp
|
12
12
|
class SimpleVoidTest < TestCase
|
13
13
|
def test_simple_void
|
14
|
+
|
15
|
+
puts "Running test_simple_void..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,8 +23,11 @@ module BlockChyp
|
|
20
23
|
)
|
21
24
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
25
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
|
29
|
+
|
23
30
|
|
24
|
-
test_delay(blockchyp, 'simple_void_test')
|
25
31
|
|
26
32
|
# Set request parameters
|
27
33
|
setup_request = {
|
@@ -32,7 +38,6 @@ module BlockChyp
|
|
32
38
|
test: true,
|
33
39
|
transactionRef: uuid
|
34
40
|
}
|
35
|
-
|
36
41
|
response = blockchyp.charge(setup_request)
|
37
42
|
|
38
43
|
# Set request parameters
|
@@ -42,7 +47,6 @@ module BlockChyp
|
|
42
47
|
}
|
43
48
|
|
44
49
|
response = blockchyp.void(request)
|
45
|
-
|
46
50
|
assert_not_nil(response)
|
47
51
|
# response assertions
|
48
52
|
assert(response[:success])
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
|
+
# governed by a license that can be found in the LICENSE file.
|
5
|
+
#
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
|
+
|
9
|
+
require ::File.expand_path('test_helper', __dir__)
|
10
|
+
|
11
|
+
module BlockChyp
|
12
|
+
class SlideShowTest < TestCase
|
13
|
+
def test_slide_show
|
14
|
+
|
15
|
+
puts "Running test_slide_show..."
|
16
|
+
|
17
|
+
config = load_test_config
|
18
|
+
|
19
|
+
blockchyp = BlockChyp.new(
|
20
|
+
config[:apiKey],
|
21
|
+
config[:bearerToken],
|
22
|
+
config[:signingKey]
|
23
|
+
)
|
24
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
25
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
setup_request = {
|
34
|
+
name: 'Test Slide Show',
|
35
|
+
delay: 5
|
36
|
+
}
|
37
|
+
response = blockchyp.update_slide_show(setup_request)
|
38
|
+
|
39
|
+
# Set request parameters
|
40
|
+
request = {
|
41
|
+
slideShowId: response[:id]
|
42
|
+
}
|
43
|
+
|
44
|
+
response = blockchyp.slide_show(request)
|
45
|
+
assert_not_nil(response)
|
46
|
+
# response assertions
|
47
|
+
assert(response[:success])
|
48
|
+
assert_equal('Test Slide Show', response[:name])
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
|
+
# governed by a license that can be found in the LICENSE file.
|
5
|
+
#
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
|
+
|
9
|
+
require ::File.expand_path('test_helper', __dir__)
|
10
|
+
|
11
|
+
module BlockChyp
|
12
|
+
class SlideShowsTest < TestCase
|
13
|
+
def test_slide_shows
|
14
|
+
|
15
|
+
puts "Running test_slide_shows..."
|
16
|
+
|
17
|
+
config = load_test_config
|
18
|
+
|
19
|
+
blockchyp = BlockChyp.new(
|
20
|
+
config[:apiKey],
|
21
|
+
config[:bearerToken],
|
22
|
+
config[:signingKey]
|
23
|
+
)
|
24
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
25
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
setup_request = {
|
34
|
+
name: 'Test Slide Show',
|
35
|
+
delay: 5
|
36
|
+
}
|
37
|
+
response = blockchyp.update_slide_show(setup_request)
|
38
|
+
|
39
|
+
# Set request parameters
|
40
|
+
request = {
|
41
|
+
}
|
42
|
+
|
43
|
+
response = blockchyp.slide_shows(request)
|
44
|
+
assert_not_nil(response)
|
45
|
+
# response assertions
|
46
|
+
assert(response[:success])
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
|
+
# governed by a license that can be found in the LICENSE file.
|
5
|
+
#
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
|
+
|
9
|
+
require ::File.expand_path('test_helper', __dir__)
|
10
|
+
|
11
|
+
module BlockChyp
|
12
|
+
class SurveyQuestionTest < TestCase
|
13
|
+
def test_survey_question
|
14
|
+
|
15
|
+
puts "Running test_survey_question..."
|
16
|
+
|
17
|
+
config = load_test_config
|
18
|
+
|
19
|
+
blockchyp = BlockChyp.new(
|
20
|
+
config[:apiKey],
|
21
|
+
config[:bearerToken],
|
22
|
+
config[:signingKey]
|
23
|
+
)
|
24
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
25
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
setup_request = {
|
34
|
+
}
|
35
|
+
response = blockchyp.survey_questions(setup_request)
|
36
|
+
|
37
|
+
# Set request parameters
|
38
|
+
request = {
|
39
|
+
questionId: response[:results][0][:id]
|
40
|
+
}
|
41
|
+
|
42
|
+
response = blockchyp.survey_question(request)
|
43
|
+
assert_not_nil(response)
|
44
|
+
# response assertions
|
45
|
+
assert(response[:success])
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
|
+
# governed by a license that can be found in the LICENSE file.
|
5
|
+
#
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
|
+
|
9
|
+
require ::File.expand_path('test_helper', __dir__)
|
10
|
+
|
11
|
+
module BlockChyp
|
12
|
+
class SurveyQuestionsTest < TestCase
|
13
|
+
def test_survey_questions
|
14
|
+
|
15
|
+
puts "Running test_survey_questions..."
|
16
|
+
|
17
|
+
config = load_test_config
|
18
|
+
|
19
|
+
blockchyp = BlockChyp.new(
|
20
|
+
config[:apiKey],
|
21
|
+
config[:bearerToken],
|
22
|
+
config[:signingKey]
|
23
|
+
)
|
24
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
25
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
setup_request = {
|
34
|
+
ordinal: 1,
|
35
|
+
questionText: 'Would you shop here again?',
|
36
|
+
questionType: 'yes_no'
|
37
|
+
}
|
38
|
+
response = blockchyp.update_survey_question(setup_request)
|
39
|
+
|
40
|
+
# Set request parameters
|
41
|
+
request = {
|
42
|
+
}
|
43
|
+
|
44
|
+
response = blockchyp.survey_questions(request)
|
45
|
+
assert_not_nil(response)
|
46
|
+
# response assertions
|
47
|
+
assert(response[:success])
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
|
+
# governed by a license that can be found in the LICENSE file.
|
5
|
+
#
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
|
+
|
9
|
+
require ::File.expand_path('test_helper', __dir__)
|
10
|
+
|
11
|
+
module BlockChyp
|
12
|
+
class SurveyResultsTest < TestCase
|
13
|
+
def test_survey_results
|
14
|
+
|
15
|
+
puts "Running test_survey_results..."
|
16
|
+
|
17
|
+
config = load_test_config
|
18
|
+
|
19
|
+
blockchyp = BlockChyp.new(
|
20
|
+
config[:apiKey],
|
21
|
+
config[:bearerToken],
|
22
|
+
config[:signingKey]
|
23
|
+
)
|
24
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
25
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
setup_request = {
|
34
|
+
}
|
35
|
+
response = blockchyp.survey_questions(setup_request)
|
36
|
+
|
37
|
+
# Set request parameters
|
38
|
+
request = {
|
39
|
+
questionId: response[:results][0][:id]
|
40
|
+
}
|
41
|
+
|
42
|
+
response = blockchyp.survey_results(request)
|
43
|
+
assert_not_nil(response)
|
44
|
+
# response assertions
|
45
|
+
assert(response[:success])
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
|
+
# governed by a license that can be found in the LICENSE file.
|
5
|
+
#
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
|
+
|
9
|
+
require ::File.expand_path('test_helper', __dir__)
|
10
|
+
|
11
|
+
module BlockChyp
|
12
|
+
class TCDeleteTemplateTest < TestCase
|
13
|
+
def test_tc_delete_template
|
14
|
+
|
15
|
+
puts "Running test_tc_delete_template..."
|
16
|
+
|
17
|
+
config = load_test_config
|
18
|
+
|
19
|
+
blockchyp = BlockChyp.new(
|
20
|
+
config[:apiKey],
|
21
|
+
config[:bearerToken],
|
22
|
+
config[:signingKey]
|
23
|
+
)
|
24
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
25
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
setup_request = {
|
34
|
+
alias: uuid,
|
35
|
+
name: 'HIPPA Disclosure',
|
36
|
+
content: 'Lorem ipsum dolor sit amet.'
|
37
|
+
}
|
38
|
+
response = blockchyp.tc_update_template(setup_request)
|
39
|
+
|
40
|
+
# Set request parameters
|
41
|
+
request = {
|
42
|
+
templateId: response[:id]
|
43
|
+
}
|
44
|
+
|
45
|
+
response = blockchyp.tc_delete_template(request)
|
46
|
+
assert_not_nil(response)
|
47
|
+
# response assertions
|
48
|
+
assert(response[:success])
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
|
+
# governed by a license that can be found in the LICENSE file.
|
5
|
+
#
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
|
+
|
9
|
+
require ::File.expand_path('test_helper', __dir__)
|
10
|
+
|
11
|
+
module BlockChyp
|
12
|
+
class TCEntryTest < TestCase
|
13
|
+
def test_tc_entry
|
14
|
+
|
15
|
+
puts "Running test_tc_entry..."
|
16
|
+
|
17
|
+
config = load_test_config
|
18
|
+
|
19
|
+
blockchyp = BlockChyp.new(
|
20
|
+
config[:apiKey],
|
21
|
+
config[:bearerToken],
|
22
|
+
config[:signingKey]
|
23
|
+
)
|
24
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
25
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
setup_request = {
|
34
|
+
}
|
35
|
+
response = blockchyp.tc_log(setup_request)
|
36
|
+
|
37
|
+
# Set request parameters
|
38
|
+
request = {
|
39
|
+
logEntryId: response[:results][0][:id]
|
40
|
+
}
|
41
|
+
|
42
|
+
response = blockchyp.tc_entry(request)
|
43
|
+
assert_not_nil(response)
|
44
|
+
# response assertions
|
45
|
+
assert(response[:success])
|
46
|
+
assert(!response[:id].empty?)
|
47
|
+
assert(!response[:terminalId].empty?)
|
48
|
+
assert(!response[:terminalName].empty?)
|
49
|
+
assert(!response[:timestamp].empty?)
|
50
|
+
assert(!response[:name].empty?)
|
51
|
+
assert(!response[:content].empty?)
|
52
|
+
assert(response[:hasSignature])
|
53
|
+
assert(!response[:signature].empty?)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
data/test/tc_log_test.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
|
+
# governed by a license that can be found in the LICENSE file.
|
5
|
+
#
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
|
+
|
9
|
+
require ::File.expand_path('test_helper', __dir__)
|
10
|
+
|
11
|
+
module BlockChyp
|
12
|
+
class TCLogTest < TestCase
|
13
|
+
def test_tc_log
|
14
|
+
|
15
|
+
puts "Running test_tc_log..."
|
16
|
+
|
17
|
+
config = load_test_config
|
18
|
+
|
19
|
+
blockchyp = BlockChyp.new(
|
20
|
+
config[:apiKey],
|
21
|
+
config[:bearerToken],
|
22
|
+
config[:signingKey]
|
23
|
+
)
|
24
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
25
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
request = {
|
34
|
+
}
|
35
|
+
|
36
|
+
response = blockchyp.tc_log(request)
|
37
|
+
assert_not_nil(response)
|
38
|
+
# response assertions
|
39
|
+
assert(response[:success])
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
|
+
# governed by a license that can be found in the LICENSE file.
|
5
|
+
#
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
|
+
|
9
|
+
require ::File.expand_path('test_helper', __dir__)
|
10
|
+
|
11
|
+
module BlockChyp
|
12
|
+
class TCTemplateTest < TestCase
|
13
|
+
def test_tc_template
|
14
|
+
|
15
|
+
puts "Running test_tc_template..."
|
16
|
+
|
17
|
+
config = load_test_config
|
18
|
+
|
19
|
+
blockchyp = BlockChyp.new(
|
20
|
+
config[:apiKey],
|
21
|
+
config[:bearerToken],
|
22
|
+
config[:signingKey]
|
23
|
+
)
|
24
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
25
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
setup_request = {
|
34
|
+
alias: uuid,
|
35
|
+
name: 'HIPPA Disclosure',
|
36
|
+
content: 'Lorem ipsum dolor sit amet.'
|
37
|
+
}
|
38
|
+
response = blockchyp.tc_update_template(setup_request)
|
39
|
+
|
40
|
+
# Set request parameters
|
41
|
+
request = {
|
42
|
+
templateId: response[:id]
|
43
|
+
}
|
44
|
+
|
45
|
+
response = blockchyp.tc_template(request)
|
46
|
+
assert_not_nil(response)
|
47
|
+
# response assertions
|
48
|
+
assert(response[:success])
|
49
|
+
assert_equal('HIPPA Disclosure', response[:name])
|
50
|
+
assert_equal('Lorem ipsum dolor sit amet.', response[:content])
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
|
+
# governed by a license that can be found in the LICENSE file.
|
5
|
+
#
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
|
+
|
9
|
+
require ::File.expand_path('test_helper', __dir__)
|
10
|
+
|
11
|
+
module BlockChyp
|
12
|
+
class TCTemplateUpdateTest < TestCase
|
13
|
+
def test_tc_template_update
|
14
|
+
|
15
|
+
puts "Running test_tc_template_update..."
|
16
|
+
|
17
|
+
config = load_test_config
|
18
|
+
|
19
|
+
blockchyp = BlockChyp.new(
|
20
|
+
config[:apiKey],
|
21
|
+
config[:bearerToken],
|
22
|
+
config[:signingKey]
|
23
|
+
)
|
24
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
25
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
request = {
|
34
|
+
alias: uuid,
|
35
|
+
name: 'HIPPA Disclosure',
|
36
|
+
content: 'Lorem ipsum dolor sit amet.'
|
37
|
+
}
|
38
|
+
|
39
|
+
response = blockchyp.tc_update_template(request)
|
40
|
+
assert_not_nil(response)
|
41
|
+
# response assertions
|
42
|
+
assert(response[:success])
|
43
|
+
assert(!response[:alias].empty?)
|
44
|
+
assert_equal('HIPPA Disclosure', response[:name])
|
45
|
+
assert_equal('Lorem ipsum dolor sit amet.', response[:content])
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
|
+
# governed by a license that can be found in the LICENSE file.
|
5
|
+
#
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
|
+
|
9
|
+
require ::File.expand_path('test_helper', __dir__)
|
10
|
+
|
11
|
+
module BlockChyp
|
12
|
+
class TCTemplatesTest < TestCase
|
13
|
+
def test_tc_templates
|
14
|
+
|
15
|
+
puts "Running test_tc_templates..."
|
16
|
+
|
17
|
+
config = load_test_config
|
18
|
+
|
19
|
+
blockchyp = BlockChyp.new(
|
20
|
+
config[:apiKey],
|
21
|
+
config[:bearerToken],
|
22
|
+
config[:signingKey]
|
23
|
+
)
|
24
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
25
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
request = {
|
34
|
+
}
|
35
|
+
|
36
|
+
response = blockchyp.tc_templates(request)
|
37
|
+
assert_not_nil(response)
|
38
|
+
# response assertions
|
39
|
+
assert(response[:success])
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
|
+
# governed by a license that can be found in the LICENSE file.
|
5
|
+
#
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
|
+
|
9
|
+
require ::File.expand_path('test_helper', __dir__)
|
10
|
+
|
11
|
+
module BlockChyp
|
12
|
+
class TerminalBrandingTest < TestCase
|
13
|
+
def test_terminal_branding
|
14
|
+
|
15
|
+
puts "Running test_terminal_branding..."
|
16
|
+
|
17
|
+
config = load_test_config
|
18
|
+
|
19
|
+
blockchyp = BlockChyp.new(
|
20
|
+
config[:apiKey],
|
21
|
+
config[:bearerToken],
|
22
|
+
config[:signingKey]
|
23
|
+
)
|
24
|
+
blockchyp.gateway_host = config[:gatewayHost]
|
25
|
+
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# Set request parameters
|
33
|
+
request = {
|
34
|
+
}
|
35
|
+
|
36
|
+
response = blockchyp.terminal_branding(request)
|
37
|
+
assert_not_nil(response)
|
38
|
+
# response assertions
|
39
|
+
assert(response[:success])
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -1,16 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019 BlockChyp, Inc. All rights reserved. Use of this code is
|
3
|
+
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
4
|
# governed by a license that can be found in the LICENSE file.
|
5
5
|
#
|
6
|
-
# This file was generated automatically
|
7
|
-
# every time the code is regenerated.
|
6
|
+
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
+
# Changes to this file will be lost every time the code is regenerated.
|
8
8
|
|
9
9
|
require ::File.expand_path('test_helper', __dir__)
|
10
10
|
|
11
11
|
module BlockChyp
|
12
12
|
class TerminalChargeTest < TestCase
|
13
13
|
def test_terminal_charge
|
14
|
+
|
15
|
+
puts "Running test_terminal_charge..."
|
16
|
+
|
14
17
|
config = load_test_config
|
15
18
|
|
16
19
|
blockchyp = BlockChyp.new(
|
@@ -20,18 +23,21 @@ module BlockChyp
|
|
20
23
|
)
|
21
24
|
blockchyp.gateway_host = config[:gatewayHost]
|
22
25
|
blockchyp.test_gateway_host = config[:testGatewayHost]
|
26
|
+
blockchyp.dashboard_host = config[:dashboardHost]
|
27
|
+
|
28
|
+
test_delay(blockchyp, 'terminal_charge_test', config[:defaultTerminalName])
|
29
|
+
|
30
|
+
|
23
31
|
|
24
|
-
test_delay(blockchyp, 'terminal_charge_test')
|
25
32
|
|
26
33
|
# Set request parameters
|
27
34
|
request = {
|
28
|
-
terminalName:
|
35
|
+
terminalName: config[:defaultTerminalName],
|
29
36
|
amount: '25.15',
|
30
37
|
test: true
|
31
38
|
}
|
32
39
|
|
33
40
|
response = blockchyp.charge(request)
|
34
|
-
|
35
41
|
assert_not_nil(response)
|
36
42
|
# response assertions
|
37
43
|
assert(response[:success])
|