blockchyp 1.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. checksums.yaml +7 -0
  2. data/Makefile +78 -0
  3. data/README.md +4023 -0
  4. data/Rakefile +39 -0
  5. data/lib/blockchyp/version.rb +5 -0
  6. data/lib/blockchyp.rb +478 -0
  7. data/lib/blockchyp_client.rb +416 -0
  8. data/lib/crypto_utils.rb +25 -0
  9. data/test/activate_terminal_test.rb +45 -0
  10. data/test/add_test_merchant_test.rb +56 -0
  11. data/test/batch_history_test.rb +54 -0
  12. data/test/boolean_prompt_test.rb +49 -0
  13. data/test/cancel_payment_link_test.rb +72 -0
  14. data/test/capture_signature_test.rb +46 -0
  15. data/test/deactivate_terminal_test.rb +42 -0
  16. data/test/delete_branding_asset_test.rb +50 -0
  17. data/test/delete_customer_test.rb +55 -0
  18. data/test/delete_media_asset_test.rb +53 -0
  19. data/test/delete_queued_transaction_test.rb +56 -0
  20. data/test/delete_slide_show_test.rb +50 -0
  21. data/test/delete_survey_question_test.rb +51 -0
  22. data/test/delete_test_merchant_test.rb +59 -0
  23. data/test/delete_token_test.rb +55 -0
  24. data/test/empty_branding_asset_test.rb +44 -0
  25. data/test/empty_slide_show_test.rb +45 -0
  26. data/test/gateway_timeout_test.rb +49 -0
  27. data/test/get_customer_test.rb +55 -0
  28. data/test/get_merchants_test.rb +52 -0
  29. data/test/heartbeat_test.rb +27 -0
  30. data/test/invite_merchant_user_test.rb +45 -0
  31. data/test/link_token_test.rb +56 -0
  32. data/test/list_queued_transactions_test.rb +55 -0
  33. data/test/list_terminals_test.rb +42 -0
  34. data/test/media_asset_test.rb +57 -0
  35. data/test/media_test.rb +42 -0
  36. data/test/media_upload_test.rb +52 -0
  37. data/test/merchant_platforms_test.rb +59 -0
  38. data/test/merchant_profile_test.rb +43 -0
  39. data/test/merchant_users_test.rb +42 -0
  40. data/test/new_transaction_display_test.rb +64 -0
  41. data/test/pan_charge_test.rb +61 -0
  42. data/test/pan_enroll_test.rb +62 -0
  43. data/test/pan_preauth_test.rb +60 -0
  44. data/test/partial_refund_test.rb +58 -0
  45. data/test/payment_link_status_test.rb +72 -0
  46. data/test/resend_payment_link_test.rb +49 -0
  47. data/test/search_customer_test.rb +55 -0
  48. data/test/send_payment_link_test.rb +67 -0
  49. data/test/simple_batch_close_test.rb +54 -0
  50. data/test/simple_capture_test.rb +55 -0
  51. data/test/simple_gift_activate_test.rb +48 -0
  52. data/test/simple_locate_test.rb +44 -0
  53. data/test/simple_message_test.rb +46 -0
  54. data/test/simple_ping_test.rb +45 -0
  55. data/test/simple_refund_test.rb +57 -0
  56. data/test/simple_reversal_test.rb +56 -0
  57. data/test/simple_void_test.rb +56 -0
  58. data/test/slide_show_test.rb +51 -0
  59. data/test/slide_shows_test.rb +49 -0
  60. data/test/survey_question_test.rb +48 -0
  61. data/test/survey_questions_test.rb +50 -0
  62. data/test/survey_results_test.rb +48 -0
  63. data/test/tc_delete_template_test.rb +51 -0
  64. data/test/tc_entry_test.rb +56 -0
  65. data/test/tc_log_test.rb +42 -0
  66. data/test/tc_template_test.rb +53 -0
  67. data/test/tc_template_update_test.rb +48 -0
  68. data/test/tc_templates_test.rb +42 -0
  69. data/test/terminal_branding_test.rb +42 -0
  70. data/test/terminal_charge_test.rb +57 -0
  71. data/test/terminal_clear_test.rb +45 -0
  72. data/test/terminal_ebt_balance_test.rb +47 -0
  73. data/test/terminal_ebt_charge_test.rb +59 -0
  74. data/test/terminal_enroll_test.rb +56 -0
  75. data/test/terminal_gift_card_balance_test.rb +46 -0
  76. data/test/terminal_keyed_charge_test.rb +58 -0
  77. data/test/terminal_manual_ebt_charge_test.rb +60 -0
  78. data/test/terminal_preauth_test.rb +57 -0
  79. data/test/terminal_queued_transaction_test.rb +51 -0
  80. data/test/terminal_status_test.rb +45 -0
  81. data/test/terminal_timeout_test.rb +46 -0
  82. data/test/terms_and_conditions_test.rb +50 -0
  83. data/test/test_helper.rb +64 -0
  84. data/test/testdata/aviato.png +0 -0
  85. data/test/text_prompt_test.rb +47 -0
  86. data/test/token_metadata_test.rb +55 -0
  87. data/test/transaction_history_test.rb +54 -0
  88. data/test/unlink_token_test.rb +56 -0
  89. data/test/update_branding_asset_test.rb +62 -0
  90. data/test/update_customer_test.rb +49 -0
  91. data/test/update_merchant_platforms_test.rb +61 -0
  92. data/test/update_merchant_test.rb +60 -0
  93. data/test/update_slide_show_test.rb +60 -0
  94. data/test/update_survey_question_test.rb +47 -0
  95. data/test/update_transaction_display_test.rb +64 -0
  96. data/test/upload_status_test.rb +53 -0
  97. metadata +138 -0
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2019-2023 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 UpdateCustomerTest < TestCase
13
+ def test_update_customer
14
+
15
+ puts "Running test_update_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
+ 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
+
43
+ response = blockchyp.update_customer(request)
44
+ assert_not_nil(response)
45
+ # response assertions
46
+ assert(response[:success])
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2019-2023 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 UpdateMerchantPlatformsTest < TestCase
13
+ def test_update_merchant_platforms
14
+
15
+ puts "Running test_update_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
+ platformCode: 'SIM',
52
+ notes: 'platform simulator'
53
+ }
54
+
55
+ response = blockchyp.update_merchant_platforms(request)
56
+ assert_not_nil(response)
57
+ # response assertions
58
+ assert(response[:success])
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2019-2023 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 UpdateMerchantTest < TestCase
13
+ def test_update_merchant
14
+
15
+ puts "Running test_update_merchant..."
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
+ request = {
43
+ test: true,
44
+ dbaName: 'Test Merchant',
45
+ companyName: 'Test Merchant',
46
+ billingAddress: {
47
+ address1: '1060 West Addison',
48
+ city: 'Chicago',
49
+ stateOrProvince: 'IL',
50
+ postalCode: '60613'
51
+ }
52
+ }
53
+
54
+ response = blockchyp.update_merchant(request)
55
+ assert_not_nil(response)
56
+ # response assertions
57
+ assert(response[:success])
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2019-2023 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 UpdateSlideShowTest < TestCase
13
+ def test_update_slide_show
14
+
15
+ puts "Running test_update_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
+ 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
+ name: 'Test Slide Show',
45
+ delay: 5,
46
+ slides: [
47
+ {
48
+ mediaId: response[:id]
49
+ }
50
+ ]
51
+ }
52
+
53
+ response = blockchyp.update_slide_show(request)
54
+ assert_not_nil(response)
55
+ # response assertions
56
+ assert(response[:success])
57
+ assert_equal('Test Slide Show', response[:name])
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2019-2023 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 UpdateSurveyQuestionTest < TestCase
13
+ def test_update_survey_question
14
+
15
+ puts "Running test_update_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
+ request = {
34
+ ordinal: 1,
35
+ questionText: 'Would you shop here again?',
36
+ questionType: 'yes_no'
37
+ }
38
+
39
+ response = blockchyp.update_survey_question(request)
40
+ assert_not_nil(response)
41
+ # response assertions
42
+ assert(response[:success])
43
+ assert_equal('Would you shop here again?', response[:questionText])
44
+ assert_equal('yes_no', response[:questionType])
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2019-2023 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 UpdateTransactionDisplayTest < TestCase
13
+ def test_update_transaction_display
14
+
15
+ puts "Running test_update_transaction_display..."
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, 'update_transaction_display_test', config[:defaultTerminalName])
29
+
30
+
31
+
32
+
33
+ # Set request parameters
34
+ request = {
35
+ test: true,
36
+ terminalName: config[:defaultTerminalName],
37
+ transaction: {
38
+ subtotal: '35.00',
39
+ tax: '5.00',
40
+ total: '70.00',
41
+ items: [
42
+ {
43
+ description: 'Leki Trekking Poles',
44
+ price: '35.00',
45
+ quantity: 2,
46
+ extended: '70.00',
47
+ discounts: [
48
+ {
49
+ description: 'memberDiscount',
50
+ amount: '10.00'
51
+ }
52
+ ]
53
+ }
54
+ ]
55
+ }
56
+ }
57
+
58
+ response = blockchyp.update_transaction_display(request)
59
+ assert_not_nil(response)
60
+ # response assertions
61
+ assert(response[:success])
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2019-2023 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 UploadStatusTest < TestCase
13
+ def test_upload_status
14
+
15
+ puts "Running test_upload_status..."
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
+ uploadId: setup_request[:uploadId]
45
+ }
46
+
47
+ response = blockchyp.upload_status(request)
48
+ assert_not_nil(response)
49
+ # response assertions
50
+ assert(response[:success])
51
+ end
52
+ end
53
+ end
metadata ADDED
@@ -0,0 +1,138 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: blockchyp
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.16.1
5
+ platform: ruby
6
+ authors:
7
+ - BlockChyp
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-08-18 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - Makefile
20
+ - README.md
21
+ - Rakefile
22
+ - lib/blockchyp.rb
23
+ - lib/blockchyp/version.rb
24
+ - lib/blockchyp_client.rb
25
+ - lib/crypto_utils.rb
26
+ - test/activate_terminal_test.rb
27
+ - test/add_test_merchant_test.rb
28
+ - test/batch_history_test.rb
29
+ - test/boolean_prompt_test.rb
30
+ - test/cancel_payment_link_test.rb
31
+ - test/capture_signature_test.rb
32
+ - test/deactivate_terminal_test.rb
33
+ - test/delete_branding_asset_test.rb
34
+ - test/delete_customer_test.rb
35
+ - test/delete_media_asset_test.rb
36
+ - test/delete_queued_transaction_test.rb
37
+ - test/delete_slide_show_test.rb
38
+ - test/delete_survey_question_test.rb
39
+ - test/delete_test_merchant_test.rb
40
+ - test/delete_token_test.rb
41
+ - test/empty_branding_asset_test.rb
42
+ - test/empty_slide_show_test.rb
43
+ - test/gateway_timeout_test.rb
44
+ - test/get_customer_test.rb
45
+ - test/get_merchants_test.rb
46
+ - test/heartbeat_test.rb
47
+ - test/invite_merchant_user_test.rb
48
+ - test/link_token_test.rb
49
+ - test/list_queued_transactions_test.rb
50
+ - test/list_terminals_test.rb
51
+ - test/media_asset_test.rb
52
+ - test/media_test.rb
53
+ - test/media_upload_test.rb
54
+ - test/merchant_platforms_test.rb
55
+ - test/merchant_profile_test.rb
56
+ - test/merchant_users_test.rb
57
+ - test/new_transaction_display_test.rb
58
+ - test/pan_charge_test.rb
59
+ - test/pan_enroll_test.rb
60
+ - test/pan_preauth_test.rb
61
+ - test/partial_refund_test.rb
62
+ - test/payment_link_status_test.rb
63
+ - test/resend_payment_link_test.rb
64
+ - test/search_customer_test.rb
65
+ - test/send_payment_link_test.rb
66
+ - test/simple_batch_close_test.rb
67
+ - test/simple_capture_test.rb
68
+ - test/simple_gift_activate_test.rb
69
+ - test/simple_locate_test.rb
70
+ - test/simple_message_test.rb
71
+ - test/simple_ping_test.rb
72
+ - test/simple_refund_test.rb
73
+ - test/simple_reversal_test.rb
74
+ - test/simple_void_test.rb
75
+ - test/slide_show_test.rb
76
+ - test/slide_shows_test.rb
77
+ - test/survey_question_test.rb
78
+ - test/survey_questions_test.rb
79
+ - test/survey_results_test.rb
80
+ - test/tc_delete_template_test.rb
81
+ - test/tc_entry_test.rb
82
+ - test/tc_log_test.rb
83
+ - test/tc_template_test.rb
84
+ - test/tc_template_update_test.rb
85
+ - test/tc_templates_test.rb
86
+ - test/terminal_branding_test.rb
87
+ - test/terminal_charge_test.rb
88
+ - test/terminal_clear_test.rb
89
+ - test/terminal_ebt_balance_test.rb
90
+ - test/terminal_ebt_charge_test.rb
91
+ - test/terminal_enroll_test.rb
92
+ - test/terminal_gift_card_balance_test.rb
93
+ - test/terminal_keyed_charge_test.rb
94
+ - test/terminal_manual_ebt_charge_test.rb
95
+ - test/terminal_preauth_test.rb
96
+ - test/terminal_queued_transaction_test.rb
97
+ - test/terminal_status_test.rb
98
+ - test/terminal_timeout_test.rb
99
+ - test/terms_and_conditions_test.rb
100
+ - test/test_helper.rb
101
+ - test/testdata/aviato.png
102
+ - test/text_prompt_test.rb
103
+ - test/token_metadata_test.rb
104
+ - test/transaction_history_test.rb
105
+ - test/unlink_token_test.rb
106
+ - test/update_branding_asset_test.rb
107
+ - test/update_customer_test.rb
108
+ - test/update_merchant_platforms_test.rb
109
+ - test/update_merchant_test.rb
110
+ - test/update_slide_show_test.rb
111
+ - test/update_survey_question_test.rb
112
+ - test/update_transaction_display_test.rb
113
+ - test/upload_status_test.rb
114
+ homepage: https://github.com/blockchyp/blockchyp-ruby
115
+ licenses:
116
+ - MIT
117
+ metadata:
118
+ github_repo: ssh://github.com/blockchyp/blockchyp-ruby.git
119
+ post_install_message:
120
+ rdoc_options: []
121
+ require_paths:
122
+ - lib
123
+ required_ruby_version: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ">="
126
+ - !ruby/object:Gem::Version
127
+ version: 2.3.0
128
+ required_rubygems_version: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ requirements: []
134
+ rubygems_version: 3.0.3.1
135
+ signing_key:
136
+ specification_version: 4
137
+ summary: BlockChyp Ruby SDK
138
+ test_files: []