blockchyp 1.24.14 → 2.0.0.pre.alpha7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Makefile +1 -41
- data/README.md +441 -3551
- data/lib/blockchyp/version.rb +1 -1
- data/lib/blockchyp.rb +41 -366
- data/lib/blockchyp_client.rb +125 -207
- data/test/boolean_prompt_test.rb +18 -32
- data/test/heartbeat_test.rb +10 -10
- data/test/new_transaction_display_test.rb +50 -44
- data/test/pan_charge_test.rb +27 -44
- data/test/pan_enroll_test.rb +25 -45
- data/test/pan_preauth_test.rb +26 -43
- data/test/simple_batch_close_test.rb +23 -37
- data/test/simple_capture_test.rb +21 -38
- data/test/simple_gift_activate_test.rb +15 -30
- data/test/simple_message_test.rb +15 -29
- data/test/simple_ping_test.rb +14 -28
- data/test/simple_refund_test.rb +22 -40
- data/test/simple_reversal_test.rb +22 -39
- data/test/simple_void_test.rb +22 -39
- data/test/terminal_charge_test.rb +25 -40
- data/test/terminal_clear_test.rb +14 -28
- data/test/terminal_ebt_balance_test.rb +16 -30
- data/test/terminal_ebt_charge_test.rb +27 -42
- data/test/terminal_enroll_test.rb +24 -39
- data/test/terminal_gift_card_balance_test.rb +15 -29
- data/test/terminal_keyed_charge_test.rb +26 -41
- data/test/terminal_manual_ebt_charge_test.rb +28 -43
- data/test/terminal_preauth_test.rb +25 -40
- data/test/terms_and_conditions_test.rb +19 -33
- data/test/test_helper.rb +10 -9
- data/test/text_prompt_test.rb +15 -29
- data/test/update_transaction_display_test.rb +50 -44
- metadata +5 -64
- data/test/activate_terminal_test.rb +0 -45
- data/test/add_test_merchant_test.rb +0 -56
- data/test/batch_history_test.rb +0 -54
- data/test/cancel_payment_link_test.rb +0 -72
- data/test/capture_signature_test.rb +0 -46
- data/test/deactivate_terminal_test.rb +0 -42
- data/test/delete_branding_asset_test.rb +0 -50
- data/test/delete_customer_test.rb +0 -55
- data/test/delete_media_asset_test.rb +0 -53
- data/test/delete_queued_transaction_test.rb +0 -56
- data/test/delete_slide_show_test.rb +0 -50
- data/test/delete_survey_question_test.rb +0 -51
- data/test/delete_test_merchant_test.rb +0 -59
- data/test/delete_token_test.rb +0 -55
- data/test/empty_branding_asset_test.rb +0 -44
- data/test/empty_slide_show_test.rb +0 -45
- data/test/gateway_timeout_test.rb +0 -49
- data/test/get_customer_test.rb +0 -55
- data/test/get_merchants_test.rb +0 -52
- data/test/invite_merchant_user_test.rb +0 -45
- data/test/link_token_test.rb +0 -56
- data/test/list_queued_transactions_test.rb +0 -55
- data/test/list_terminals_test.rb +0 -42
- data/test/media_asset_test.rb +0 -57
- data/test/media_test.rb +0 -42
- data/test/media_upload_test.rb +0 -52
- data/test/merchant_platforms_test.rb +0 -59
- data/test/merchant_profile_test.rb +0 -43
- data/test/merchant_users_test.rb +0 -42
- data/test/partial_refund_test.rb +0 -58
- data/test/search_customer_test.rb +0 -55
- data/test/send_payment_link_test.rb +0 -67
- data/test/simple_locate_test.rb +0 -44
- data/test/slide_show_test.rb +0 -51
- data/test/slide_shows_test.rb +0 -49
- data/test/survey_question_test.rb +0 -48
- data/test/survey_questions_test.rb +0 -50
- data/test/survey_results_test.rb +0 -48
- data/test/tc_delete_template_test.rb +0 -51
- data/test/tc_entry_test.rb +0 -56
- data/test/tc_log_test.rb +0 -42
- data/test/tc_template_test.rb +0 -53
- data/test/tc_template_update_test.rb +0 -48
- data/test/tc_templates_test.rb +0 -42
- data/test/terminal_branding_test.rb +0 -42
- data/test/terminal_queued_transaction_test.rb +0 -51
- data/test/terminal_status_test.rb +0 -45
- data/test/terminal_timeout_test.rb +0 -46
- data/test/testdata/aviato.png +0 -0
- data/test/token_metadata_test.rb +0 -55
- data/test/transaction_history_test.rb +0 -54
- data/test/unlink_token_test.rb +0 -56
- data/test/update_branding_asset_test.rb +0 -62
- data/test/update_customer_test.rb +0 -49
- data/test/update_merchant_platforms_test.rb +0 -61
- data/test/update_merchant_test.rb +0 -60
- data/test/update_slide_show_test.rb +0 -60
- data/test/update_survey_question_test.rb +0 -47
- data/test/upload_status_test.rb +0 -53
data/test/media_asset_test.rb
DELETED
@@ -1,57 +0,0 @@
|
|
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 MediaAssetTest < TestCase
|
13
|
-
def test_media_asset
|
14
|
-
|
15
|
-
puts "Running test_media_asset..."
|
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
|
-
fileName: 'aviato.png',
|
35
|
-
fileSize: 18843,
|
36
|
-
uploadId: uuid
|
37
|
-
}
|
38
|
-
file = File.open("test/testdata/aviato.png")
|
39
|
-
content = file.read
|
40
|
-
response = blockchyp.upload_media(setup_request, content)
|
41
|
-
|
42
|
-
# Set request parameters
|
43
|
-
request = {
|
44
|
-
mediaId: response[:id]
|
45
|
-
}
|
46
|
-
|
47
|
-
response = blockchyp.media_asset(request)
|
48
|
-
assert_not_nil(response)
|
49
|
-
# response assertions
|
50
|
-
assert(response[:success])
|
51
|
-
assert(!response[:id].empty?)
|
52
|
-
assert_equal('aviato.png', response[:originalFile])
|
53
|
-
assert(!response[:fileUrl].empty?)
|
54
|
-
assert(!response[:thumbnailUrl].empty?)
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
data/test/media_test.rb
DELETED
@@ -1,42 +0,0 @@
|
|
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 MediaTest < TestCase
|
13
|
-
def test_media
|
14
|
-
|
15
|
-
puts "Running test_media..."
|
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.media(request)
|
37
|
-
assert_not_nil(response)
|
38
|
-
# response assertions
|
39
|
-
assert(response[:success])
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
data/test/media_upload_test.rb
DELETED
@@ -1,52 +0,0 @@
|
|
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 MediaUploadTest < TestCase
|
13
|
-
def test_media_upload
|
14
|
-
|
15
|
-
puts "Running test_media_upload..."
|
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
|
-
fileName: 'aviato.png',
|
35
|
-
fileSize: 18843,
|
36
|
-
uploadId: uuid
|
37
|
-
}
|
38
|
-
|
39
|
-
|
40
|
-
file = File.open("test/testdata/aviato.png")
|
41
|
-
content = file.read
|
42
|
-
response = blockchyp.upload_media(request, content)
|
43
|
-
assert_not_nil(response)
|
44
|
-
# response assertions
|
45
|
-
assert(response[:success])
|
46
|
-
assert(!response[:id].empty?)
|
47
|
-
assert_equal('aviato.png', response[:originalFile])
|
48
|
-
assert(!response[:fileUrl].empty?)
|
49
|
-
assert(!response[:thumbnailUrl].empty?)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
@@ -1,59 +0,0 @@
|
|
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 MerchantPlatformsTest < TestCase
|
13
|
-
def test_merchant_platforms
|
14
|
-
|
15
|
-
puts "Running test_merchant_platforms..."
|
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
|
-
profile = config[:profiles][:partner]
|
30
|
-
blockchyp = BlockChyp.new(
|
31
|
-
profile[:apiKey],
|
32
|
-
profile[:bearerToken],
|
33
|
-
profile[:signingKey]
|
34
|
-
)
|
35
|
-
blockchyp.gateway_host = config[:gatewayHost]
|
36
|
-
blockchyp.test_gateway_host = config[:testGatewayHost]
|
37
|
-
blockchyp.dashboard_host = config[:dashboardHost]
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
# Set request parameters
|
42
|
-
setup_request = {
|
43
|
-
dbaName: 'Test Merchant',
|
44
|
-
companyName: 'Test Merchant'
|
45
|
-
}
|
46
|
-
response = blockchyp.add_test_merchant(setup_request)
|
47
|
-
|
48
|
-
# Set request parameters
|
49
|
-
request = {
|
50
|
-
merchantId: response[:merchantId]
|
51
|
-
}
|
52
|
-
|
53
|
-
response = blockchyp.merchant_platforms(request)
|
54
|
-
assert_not_nil(response)
|
55
|
-
# response assertions
|
56
|
-
assert(response[:success])
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
@@ -1,43 +0,0 @@
|
|
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 MerchantProfileTest < TestCase
|
13
|
-
def test_merchant_profile
|
14
|
-
|
15
|
-
puts "Running test_merchant_profile..."
|
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
|
-
test: true
|
35
|
-
}
|
36
|
-
|
37
|
-
response = blockchyp.merchant_profile(request)
|
38
|
-
assert_not_nil(response)
|
39
|
-
# response assertions
|
40
|
-
assert(response[:success])
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
data/test/merchant_users_test.rb
DELETED
@@ -1,42 +0,0 @@
|
|
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 MerchantUsersTest < TestCase
|
13
|
-
def test_merchant_users
|
14
|
-
|
15
|
-
puts "Running test_merchant_users..."
|
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.merchant_users(request)
|
37
|
-
assert_not_nil(response)
|
38
|
-
# response assertions
|
39
|
-
assert(response[:success])
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
data/test/partial_refund_test.rb
DELETED
@@ -1,58 +0,0 @@
|
|
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 PartialRefundTest < TestCase
|
13
|
-
def test_partial_refund
|
14
|
-
|
15
|
-
puts "Running test_partial_refund..."
|
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
|
-
test_delay(blockchyp, 'partial_refund_test', config[:defaultTerminalName])
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
# Set request parameters
|
34
|
-
setup_request = {
|
35
|
-
pan: '4111111111111111',
|
36
|
-
expMonth: '12',
|
37
|
-
expYear: '2025',
|
38
|
-
amount: '25.55',
|
39
|
-
test: true,
|
40
|
-
transactionRef: uuid
|
41
|
-
}
|
42
|
-
response = blockchyp.charge(setup_request)
|
43
|
-
|
44
|
-
# Set request parameters
|
45
|
-
request = {
|
46
|
-
transactionId: response[:transactionId],
|
47
|
-
amount: '5.00',
|
48
|
-
test: true
|
49
|
-
}
|
50
|
-
|
51
|
-
response = blockchyp.refund(request)
|
52
|
-
assert_not_nil(response)
|
53
|
-
# response assertions
|
54
|
-
assert(response[:success])
|
55
|
-
assert(response[:approved])
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
@@ -1,55 +0,0 @@
|
|
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 SearchCustomerTest < TestCase
|
13
|
-
def test_search_customer
|
14
|
-
|
15
|
-
puts "Running test_search_customer..."
|
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
|
-
customer: {
|
35
|
-
firstName: 'Test',
|
36
|
-
lastName: 'Customer',
|
37
|
-
companyName: 'Test Company',
|
38
|
-
emailAddress: 'support@blockchyp.com',
|
39
|
-
smsNumber: '(123) 123-1234'
|
40
|
-
}
|
41
|
-
}
|
42
|
-
response = blockchyp.update_customer(setup_request)
|
43
|
-
|
44
|
-
# Set request parameters
|
45
|
-
request = {
|
46
|
-
query: '123123'
|
47
|
-
}
|
48
|
-
|
49
|
-
response = blockchyp.customer_search(request)
|
50
|
-
assert_not_nil(response)
|
51
|
-
# response assertions
|
52
|
-
assert(response[:success])
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
@@ -1,67 +0,0 @@
|
|
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 SendPaymentLinkTest < TestCase
|
13
|
-
def test_send_payment_link
|
14
|
-
|
15
|
-
puts "Running test_send_payment_link..."
|
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
|
-
amount: '199.99',
|
35
|
-
description: 'Widget',
|
36
|
-
subject: 'Widget invoice',
|
37
|
-
transaction: {
|
38
|
-
subtotal: '195.00',
|
39
|
-
tax: '4.99',
|
40
|
-
total: '199.99',
|
41
|
-
items: [
|
42
|
-
{
|
43
|
-
description: 'Widget',
|
44
|
-
price: '195.00',
|
45
|
-
quantity: 1
|
46
|
-
}
|
47
|
-
]
|
48
|
-
},
|
49
|
-
autoSend: true,
|
50
|
-
customer: {
|
51
|
-
customerRef: 'Customer reference string',
|
52
|
-
firstName: 'FirstName',
|
53
|
-
lastName: 'LastName',
|
54
|
-
companyName: 'Company Name',
|
55
|
-
emailAddress: 'notifications@blockchypteam.m8r.co',
|
56
|
-
smsNumber: '(123) 123-1231'
|
57
|
-
}
|
58
|
-
}
|
59
|
-
|
60
|
-
response = blockchyp.send_payment_link(request)
|
61
|
-
assert_not_nil(response)
|
62
|
-
# response assertions
|
63
|
-
assert(response[:success])
|
64
|
-
assert(!response[:url].empty?)
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
data/test/simple_locate_test.rb
DELETED
@@ -1,44 +0,0 @@
|
|
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 SimpleLocateTest < TestCase
|
13
|
-
def test_simple_locate
|
14
|
-
|
15
|
-
puts "Running test_simple_locate..."
|
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
|
-
test: true,
|
35
|
-
terminalName: config[:defaultTerminalName]
|
36
|
-
}
|
37
|
-
|
38
|
-
response = blockchyp.locate(request)
|
39
|
-
assert_not_nil(response)
|
40
|
-
# response assertions
|
41
|
-
assert(response[:success])
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
data/test/slide_show_test.rb
DELETED
@@ -1,51 +0,0 @@
|
|
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
|
data/test/slide_shows_test.rb
DELETED
@@ -1,49 +0,0 @@
|
|
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
|
@@ -1,48 +0,0 @@
|
|
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
|