blockchyp 2.2.2 → 2.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +236 -244
  3. data/lib/blockchyp/version.rb +1 -1
  4. data/test/boolean_prompt_test.rb +8 -8
  5. data/test/capture_signature_test.rb +6 -6
  6. data/test/gateway_timeout_test.rb +8 -8
  7. data/test/get_customer_test.rb +51 -0
  8. data/test/new_transaction_display_test.rb +24 -44
  9. data/test/pan_charge_test.rb +7 -7
  10. data/test/pan_enroll_test.rb +5 -5
  11. data/test/pan_preauth_test.rb +6 -6
  12. data/test/search_customer_test.rb +51 -0
  13. data/test/send_payment_link_test.rb +62 -0
  14. data/test/simple_batch_close_test.rb +13 -11
  15. data/test/simple_capture_test.rb +13 -11
  16. data/test/simple_gift_activate_test.rb +6 -6
  17. data/test/simple_message_test.rb +6 -6
  18. data/test/simple_ping_test.rb +5 -5
  19. data/test/simple_refund_test.rb +14 -12
  20. data/test/simple_reversal_test.rb +14 -12
  21. data/test/simple_void_test.rb +14 -12
  22. data/test/terminal_charge_test.rb +6 -6
  23. data/test/terminal_clear_test.rb +5 -5
  24. data/test/terminal_ebt_balance_test.rb +6 -6
  25. data/test/terminal_ebt_charge_test.rb +7 -7
  26. data/test/terminal_enroll_test.rb +5 -5
  27. data/test/terminal_gift_card_balance_test.rb +5 -5
  28. data/test/terminal_keyed_charge_test.rb +7 -7
  29. data/test/terminal_manual_ebt_charge_test.rb +8 -8
  30. data/test/terminal_preauth_test.rb +6 -6
  31. data/test/terminal_status_test.rb +4 -4
  32. data/test/terminal_timeout_test.rb +7 -7
  33. data/test/terms_and_conditions_test.rb +10 -10
  34. data/test/text_prompt_test.rb +6 -6
  35. data/test/update_customer_test.rb +44 -0
  36. data/test/update_transaction_display_test.rb +24 -44
  37. metadata +6 -2
@@ -23,9 +23,10 @@ module BlockChyp
23
23
 
24
24
  test_delay(blockchyp, 'terminal_status_test')
25
25
 
26
- # setup request object
27
- request = {}
28
- request['terminalName'] = 'Test Terminal'
26
+ # Set request parameters
27
+ request = {
28
+ "terminalName": 'Test Terminal'
29
+ }
29
30
 
30
31
  response = blockchyp.terminal_status(request)
31
32
 
@@ -34,6 +35,5 @@ module BlockChyp
34
35
  assert(response['success'])
35
36
  assert(response['idle'])
36
37
  end
37
-
38
38
  end
39
39
  end
@@ -23,17 +23,17 @@ module BlockChyp
23
23
 
24
24
  test_delay(blockchyp, 'terminal_timeout_test')
25
25
 
26
- # setup request object
27
- request = {}
28
- request['timeout'] = 1
29
- request['terminalName'] = 'Test Terminal'
30
- request['amount'] = '25.15'
31
- request['test'] = true
26
+ # Set request parameters
27
+ request = {
28
+ "timeout": 1,
29
+ "terminalName": 'Test Terminal',
30
+ "amount": '25.15',
31
+ "test": true
32
+ }
32
33
 
33
34
  assert_raise Net::ReadTimeout do
34
35
  blockchyp.charge(request)
35
36
  end
36
37
  end
37
-
38
38
  end
39
39
  end
@@ -23,15 +23,16 @@ module BlockChyp
23
23
 
24
24
  test_delay(blockchyp, 'terms_and_conditions_test')
25
25
 
26
- # setup request object
27
- request = {}
28
- request['test'] = true
29
- request['terminalName'] = 'Test Terminal'
30
- request['tcName'] = 'HIPPA Disclosure'
31
- request['tcContent'] = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ullamcorper id urna quis pulvinar. Pellentesque vestibulum justo ac nulla consectetur tristique. Suspendisse arcu arcu, viverra vel luctus non, dapibus vitae augue. Aenean ac volutpat purus. Curabitur in lacus nisi. Nam vel sagittis eros. Curabitur faucibus ut nisl in pulvinar. Nunc egestas, orci ut porttitor tempus, ante mauris pellentesque ex, nec feugiat purus arcu ac metus. Cras sodales ornare lobortis. Aenean lacinia ultricies purus quis pharetra. Cras vestibulum nulla et magna eleifend eleifend. Nunc nibh dolor, malesuada ut suscipit vitae, bibendum quis dolor. Phasellus ultricies ex vitae dolor malesuada, vel dignissim neque accumsan.'
32
- request['sigFormat'] = SignatureFormat::PNG
33
- request['sigWidth'] = 200
34
- request['sigRequired'] = true
26
+ # Set request parameters
27
+ request = {
28
+ "test": true,
29
+ "terminalName": 'Test Terminal',
30
+ "tcName": 'HIPPA Disclosure',
31
+ "tcContent": 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ullamcorper id urna quis pulvinar. Pellentesque vestibulum justo ac nulla consectetur tristique. Suspendisse arcu arcu, viverra vel luctus non, dapibus vitae augue. Aenean ac volutpat purus. Curabitur in lacus nisi. Nam vel sagittis eros. Curabitur faucibus ut nisl in pulvinar. Nunc egestas, orci ut porttitor tempus, ante mauris pellentesque ex, nec feugiat purus arcu ac metus. Cras sodales ornare lobortis. Aenean lacinia ultricies purus quis pharetra. Cras vestibulum nulla et magna eleifend eleifend. Nunc nibh dolor, malesuada ut suscipit vitae, bibendum quis dolor. Phasellus ultricies ex vitae dolor malesuada, vel dignissim neque accumsan.',
32
+ "sigFormat": SignatureFormat::PNG,
33
+ "sigWidth": 200,
34
+ "sigRequired": true
35
+ }
35
36
 
36
37
  response = blockchyp.terms_and_conditions(request)
37
38
 
@@ -39,6 +40,5 @@ module BlockChyp
39
40
  # response assertions
40
41
  assert(response['success'])
41
42
  end
42
-
43
43
  end
44
44
  end
@@ -23,11 +23,12 @@ module BlockChyp
23
23
 
24
24
  test_delay(blockchyp, 'text_prompt_test')
25
25
 
26
- # setup request object
27
- request = {}
28
- request['test'] = true
29
- request['terminalName'] = 'Test Terminal'
30
- request['promptType'] = PromptType::EMAIL
26
+ # Set request parameters
27
+ request = {
28
+ "test": true,
29
+ "terminalName": 'Test Terminal',
30
+ "promptType": PromptType::EMAIL
31
+ }
31
32
 
32
33
  response = blockchyp.text_prompt(request)
33
34
 
@@ -36,6 +37,5 @@ module BlockChyp
36
37
  assert(response['success'])
37
38
  assert(!response['response'].empty?)
38
39
  end
39
-
40
40
  end
41
41
  end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2019 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. Changes to this file will be lost
7
+ # 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
+ config = load_test_config
15
+
16
+ blockchyp = BlockChyp.new(
17
+ config['apiKey'],
18
+ config['bearerToken'],
19
+ config['signingKey']
20
+ )
21
+ blockchyp.gateway_host = config['gatewayHost']
22
+ blockchyp.test_gateway_host = config['testGatewayHost']
23
+
24
+ test_delay(blockchyp, 'update_customer_test')
25
+
26
+ # Set request parameters
27
+ request = {
28
+ "customer": {
29
+ "firstName": 'Test',
30
+ "lastName": 'Customer',
31
+ "companyName": 'Test Company',
32
+ "emailAddress": 'support@blockchyp.com',
33
+ "smsNumber": '(123) 123-1234'
34
+ }
35
+ }
36
+
37
+ response = blockchyp.update_customer(request)
38
+
39
+ assert_not_nil(response)
40
+ # response assertions
41
+ assert(response['success'])
42
+ end
43
+ end
44
+ end
@@ -23,11 +23,30 @@ module BlockChyp
23
23
 
24
24
  test_delay(blockchyp, 'update_transaction_display_test')
25
25
 
26
- # setup request object
27
- request = {}
28
- request['test'] = true
29
- request['terminalName'] = 'Test Terminal'
30
- request['transaction'] = new_transaction_display_transaction
26
+ # Set request parameters
27
+ request = {
28
+ "test": true,
29
+ "terminalName": 'Test Terminal',
30
+ "transaction": {
31
+ "subtotal": '35.00',
32
+ "tax": '5.00',
33
+ "total": '70.00',
34
+ "items": [
35
+ {
36
+ "description": 'Leki Trekking Poles',
37
+ "price": '35.00',
38
+ "quantity": 2,
39
+ "extended": '70.00',
40
+ "discounts": [
41
+ {
42
+ "description": 'memberDiscount',
43
+ "amount": '10.00'
44
+ }
45
+ ]
46
+ }
47
+ ]
48
+ }
49
+ }
31
50
 
32
51
  response = blockchyp.update_transaction_display(request)
33
52
 
@@ -35,44 +54,5 @@ module BlockChyp
35
54
  # response assertions
36
55
  assert(response['success'])
37
56
  end
38
-
39
- def new_transaction_display_transaction
40
- val = {}
41
- val['subtotal'] = '35.00'
42
- val['tax'] = '5.00'
43
- val['total'] = '70.00'
44
- val['items'] = new_transaction_display_items
45
- val
46
- end
47
-
48
- def new_transaction_display_items
49
- val = []
50
- val.push(new_transaction_display_item_2)
51
- val
52
- end
53
-
54
- def new_transaction_display_item_2
55
- val = {}
56
- val['description'] = 'Leki Trekking Poles'
57
- val['price'] = '35.00'
58
- val['quantity'] = 2
59
- val['extended'] = '70.00'
60
- val['discounts'] = new_transaction_display_discounts
61
- val
62
- end
63
-
64
- def new_transaction_display_discounts
65
- val = []
66
- val.push(new_transaction_display_discount_2)
67
- val
68
- end
69
-
70
- def new_transaction_display_discount_2
71
- val = {}
72
- val['description'] = 'memberDiscount'
73
- val['amount'] = '10.00'
74
- val
75
- end
76
-
77
57
  end
78
58
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blockchyp
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - BlockChyp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-30 00:00:00.000000000 Z
11
+ date: 2020-04-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -26,11 +26,14 @@ files:
26
26
  - test/boolean_prompt_test.rb
27
27
  - test/capture_signature_test.rb
28
28
  - test/gateway_timeout_test.rb
29
+ - test/get_customer_test.rb
29
30
  - test/heartbeat_test.rb
30
31
  - test/new_transaction_display_test.rb
31
32
  - test/pan_charge_test.rb
32
33
  - test/pan_enroll_test.rb
33
34
  - test/pan_preauth_test.rb
35
+ - test/search_customer_test.rb
36
+ - test/send_payment_link_test.rb
34
37
  - test/simple_batch_close_test.rb
35
38
  - test/simple_capture_test.rb
36
39
  - test/simple_gift_activate_test.rb
@@ -53,6 +56,7 @@ files:
53
56
  - test/terms_and_conditions_test.rb
54
57
  - test/test_helper.rb
55
58
  - test/text_prompt_test.rb
59
+ - test/update_customer_test.rb
56
60
  - test/update_transaction_display_test.rb
57
61
  homepage: https://github.com/blockchyp/blockchyp-ruby
58
62
  licenses: