blockchyp 2.3.7 → 2.4.0

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 (44) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +118 -113
  3. data/lib/blockchyp.rb +1 -1
  4. data/lib/blockchyp/version.rb +1 -1
  5. data/lib/blockchyp_client.rb +50 -60
  6. data/test/batch_history_test.rb +11 -11
  7. data/test/boolean_prompt_test.rb +12 -12
  8. data/test/capture_signature_test.rb +9 -9
  9. data/test/gateway_timeout_test.rb +10 -10
  10. data/test/get_customer_test.rb +13 -13
  11. data/test/heartbeat_test.rb +10 -10
  12. data/test/merchant_profile_test.rb +7 -7
  13. data/test/new_transaction_display_test.rb +20 -20
  14. data/test/pan_charge_test.rb +22 -22
  15. data/test/pan_enroll_test.rb +20 -20
  16. data/test/pan_preauth_test.rb +21 -21
  17. data/test/search_customer_test.rb +13 -13
  18. data/test/send_payment_link_test.rb +26 -26
  19. data/test/simple_batch_close_test.rb +11 -11
  20. data/test/simple_capture_test.rb +12 -12
  21. data/test/simple_gift_activate_test.rb +11 -11
  22. data/test/simple_message_test.rb +9 -9
  23. data/test/simple_ping_test.rb +8 -8
  24. data/test/simple_refund_test.rb +13 -13
  25. data/test/simple_reversal_test.rb +13 -13
  26. data/test/simple_void_test.rb +13 -13
  27. data/test/terminal_charge_test.rb +20 -20
  28. data/test/terminal_clear_test.rb +8 -8
  29. data/test/terminal_ebt_balance_test.rb +10 -10
  30. data/test/terminal_ebt_charge_test.rb +22 -22
  31. data/test/terminal_enroll_test.rb +19 -19
  32. data/test/terminal_gift_card_balance_test.rb +9 -9
  33. data/test/terminal_keyed_charge_test.rb +21 -21
  34. data/test/terminal_manual_ebt_charge_test.rb +23 -23
  35. data/test/terminal_preauth_test.rb +20 -20
  36. data/test/terminal_status_test.rb +8 -8
  37. data/test/terminal_timeout_test.rb +9 -9
  38. data/test/terms_and_conditions_test.rb +13 -13
  39. data/test/test_helper.rb +7 -6
  40. data/test/text_prompt_test.rb +10 -10
  41. data/test/transaction_history_test.rb +11 -11
  42. data/test/update_customer_test.rb +12 -12
  43. data/test/update_transaction_display_test.rb +20 -20
  44. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84600e7a021f154105d836a1de1e8b91d61b938b29bfc56d61301ca6c03abff6
4
- data.tar.gz: ba8d5e4fffb814af4171aae03ad55f204ee9abd0d9d8fbc49681b91bd71aba39
3
+ metadata.gz: 49dc32372aabccb3d15971f69deb80b427934ddc9c810fa5e9132c6856b12b90
4
+ data.tar.gz: 21ad4be26072a746a7db7494ae60c624f0aab00f17dd6c49e60a3a442578251e
5
5
  SHA512:
6
- metadata.gz: d3d544fecac3fe221cb8a3afa65d7a835999385c48782be5e6cbd7c62821781b52b4b6c3bb5c63a373096ae083be2f451f70e8fef0f7670ae4bef19d621dd989
7
- data.tar.gz: 9c5b14f4bf92c016da7ea7d901d5fabd8afb5f668449ab92fb6813e1979caf849bff0d37368c893f801b83f534c014a7eda9c4b7e8c115a270b7deab2303da63
6
+ metadata.gz: b9871571c1d25f338af7a5419ef5c369ab41428d373fa7fabed9d5e94aafea9e5cefa06350bcc65c20d13bcbedd8ef0fe25682c8f1a58e58b70ec6763ff938a8
7
+ data.tar.gz: b899f32df715af449cd2a00e8d1c3f0e2d88118259a7d27ccd3708f792da3f04e23dcefd8da27f9a85c6b142e84a2c92a75cdb0e4bd5547cb42374a298499d56
data/README.md CHANGED
@@ -104,7 +104,7 @@ blockchyp = BlockChyp::BlockChyp.new(
104
104
 
105
105
  # Set request parameters
106
106
  request = {
107
- "terminalName": 'Test Terminal'
107
+ terminalName: 'Test Terminal'
108
108
  }
109
109
 
110
110
  response = blockchyp.ping(request)
@@ -166,9 +166,9 @@ blockchyp = BlockChyp::BlockChyp.new(
166
166
 
167
167
  # Set request parameters
168
168
  request = {
169
- "test": true,
170
- "terminalName": 'Test Terminal',
171
- "amount": '55.00'
169
+ test: true,
170
+ terminalName: 'Test Terminal',
171
+ amount: '55.00'
172
172
  }
173
173
 
174
174
  response = blockchyp.charge(request)
@@ -230,9 +230,9 @@ blockchyp = BlockChyp::BlockChyp.new(
230
230
 
231
231
  # Set request parameters
232
232
  request = {
233
- "test": true,
234
- "terminalName": 'Test Terminal',
235
- "amount": '27.00'
233
+ test: true,
234
+ terminalName: 'Test Terminal',
235
+ amount: '27.00'
236
236
  }
237
237
 
238
238
  response = blockchyp.preauth(request)
@@ -270,8 +270,8 @@ blockchyp = BlockChyp::BlockChyp.new(
270
270
 
271
271
  # Set request parameters
272
272
  request = {
273
- "test": true,
274
- "transactionId": '<PREAUTH TRANSACTION ID>'
273
+ test: true,
274
+ transactionId: '<PREAUTH TRANSACTION ID>'
275
275
  }
276
276
 
277
277
  response = blockchyp.capture(request)
@@ -346,10 +346,10 @@ blockchyp = BlockChyp::BlockChyp.new(
346
346
 
347
347
  # Set request parameters
348
348
  request = {
349
- "transactionId": '<PREVIOUS TRANSACTION ID>',
349
+ transactionId: '<PREVIOUS TRANSACTION ID>',
350
350
 
351
351
  # Optional amount for partial refunds.
352
- "amount": '5.00'
352
+ amount: '5.00'
353
353
  }
354
354
 
355
355
  response = blockchyp.refund(request)
@@ -394,8 +394,8 @@ blockchyp = BlockChyp::BlockChyp.new(
394
394
 
395
395
  # Set request parameters
396
396
  request = {
397
- "test": true,
398
- "terminalName": 'Test Terminal'
397
+ test: true,
398
+ terminalName: 'Test Terminal'
399
399
  }
400
400
 
401
401
  response = blockchyp.enroll(request)
@@ -431,8 +431,8 @@ blockchyp = BlockChyp::BlockChyp.new(
431
431
 
432
432
  # Set request parameters
433
433
  request = {
434
- "test": true,
435
- "transactionId": '<PREVIOUS TRANSACTION ID>'
434
+ test: true,
435
+ transactionId: '<PREVIOUS TRANSACTION ID>'
436
436
  }
437
437
 
438
438
  response = blockchyp.void(request)
@@ -479,7 +479,7 @@ blockchyp = BlockChyp::BlockChyp.new(
479
479
 
480
480
  # Set request parameters
481
481
  request = {
482
- "transactionRef": '<LAST TRANSACTION REF>'
482
+ transactionRef: '<LAST TRANSACTION REF>'
483
483
  }
484
484
 
485
485
  response = blockchyp.reverse(request)
@@ -559,9 +559,9 @@ blockchyp = BlockChyp::BlockChyp.new(
559
559
 
560
560
  # Set request parameters
561
561
  request = {
562
- "test": true,
563
- "terminalName": 'Test Terminal',
564
- "amount": '50.00'
562
+ test: true,
563
+ terminalName: 'Test Terminal',
564
+ amount: '50.00'
565
565
  }
566
566
 
567
567
  response = blockchyp.giftActivate(request)
@@ -617,9 +617,9 @@ blockchyp = BlockChyp::BlockChyp.new(
617
617
 
618
618
  # Set request parameters
619
619
  request = {
620
- "test": true,
621
- "terminalName": 'Test Terminal',
622
- "cardType": CardType::EBT
620
+ test: true,
621
+ terminalName: 'Test Terminal',
622
+ cardType: CardType::EBT
623
623
  }
624
624
 
625
625
  response = blockchyp.balance(request)
@@ -656,7 +656,7 @@ blockchyp = BlockChyp::BlockChyp.new(
656
656
 
657
657
  # Set request parameters
658
658
  request = {
659
- "test": true
659
+ test: true
660
660
  }
661
661
 
662
662
  response = blockchyp.closeBatch(request)
@@ -717,6 +717,11 @@ a safeguard to prevent real emails from going out when you may not expect it.
717
717
  If you want BlockChyp to send the email for you, just add the `autoSend` flag with
718
718
  all requests.
719
719
 
720
+ **Tokenization**
721
+
722
+ Add the `enroll` flag to a send link request to enroll the payment method
723
+ in the token vault.
724
+
720
725
  **Cashier Facing Card Entry**
721
726
 
722
727
  BlockChyp can be used to generate internal/cashier facing card entry pages as well. This is
@@ -768,29 +773,29 @@ blockchyp = BlockChyp::BlockChyp.new(
768
773
 
769
774
  # Set request parameters
770
775
  request = {
771
- "amount": '199.99',
772
- "description": 'Widget',
773
- "subject": 'Widget invoice',
774
- "transaction": {
775
- "subtotal": '195.00',
776
- "tax": '4.99',
777
- "total": '199.99',
778
- "items": [
776
+ amount: '199.99',
777
+ description: 'Widget',
778
+ subject: 'Widget invoice',
779
+ transaction: {
780
+ subtotal: '195.00',
781
+ tax: '4.99',
782
+ total: '199.99',
783
+ items: [
779
784
  {
780
- "description": 'Widget',
781
- "price": '195.00',
782
- "quantity": 1
785
+ description: 'Widget',
786
+ price: '195.00',
787
+ quantity: 1
783
788
  }
784
789
  ]
785
790
  },
786
- "autoSend": true,
787
- "customer": {
788
- "customerRef": 'Customer reference string',
789
- "firstName": 'FirstName',
790
- "lastName": 'LastName',
791
- "companyName": 'Company Name',
792
- "emailAddress": 'support@blockchyp.com',
793
- "smsNumber": '(123) 123-1231'
791
+ autoSend: true,
792
+ customer: {
793
+ customerRef: 'Customer reference string',
794
+ firstName: 'FirstName',
795
+ lastName: 'LastName',
796
+ companyName: 'Company Name',
797
+ emailAddress: 'support@blockchyp.com',
798
+ smsNumber: '(123) 123-1231'
794
799
  }
795
800
  }
796
801
 
@@ -828,7 +833,7 @@ blockchyp = BlockChyp::BlockChyp.new(
828
833
 
829
834
  # Set request parameters
830
835
  request = {
831
- "transactionId": 'ID of transaction to retrieve'
836
+ transactionId: 'ID of transaction to retrieve'
832
837
  }
833
838
 
834
839
  response = blockchyp.transactionStatus(request)
@@ -862,8 +867,8 @@ blockchyp = BlockChyp::BlockChyp.new(
862
867
 
863
868
  # Set request parameters
864
869
  request = {
865
- "test": true,
866
- "terminalName": 'Test Terminal'
870
+ test: true,
871
+ terminalName: 'Test Terminal'
867
872
  }
868
873
 
869
874
  response = blockchyp.clear(request)
@@ -904,7 +909,7 @@ blockchyp = BlockChyp::BlockChyp.new(
904
909
 
905
910
  # Set request parameters
906
911
  request = {
907
- "terminalName": 'Test Terminal'
912
+ terminalName: 'Test Terminal'
908
913
  }
909
914
 
910
915
  response = blockchyp.terminalStatus(request)
@@ -972,27 +977,27 @@ blockchyp = BlockChyp::BlockChyp.new(
972
977
 
973
978
  # Set request parameters
974
979
  request = {
975
- "test": true,
976
- "terminalName": 'Test Terminal',
980
+ test: true,
981
+ terminalName: 'Test Terminal',
977
982
 
978
983
  # Alias for a Terms and Conditions template configured in the BlockChyp
979
984
  # dashboard.
980
- "tcAlias": 'hippa',
985
+ tcAlias: 'hippa',
981
986
 
982
987
  # Name of the contract or document if not using an alias.
983
- "tcName": 'HIPPA Disclosure',
988
+ tcName: 'HIPPA Disclosure',
984
989
 
985
990
  # Full text of the contract or disclosure if not using an alias.
986
- "tcContent": 'Full contract text',
991
+ tcContent: 'Full contract text',
987
992
 
988
993
  # File format for the signature image.
989
- "sigFormat": SignatureFormat::PNG,
994
+ sigFormat: SignatureFormat::PNG,
990
995
 
991
996
  # Width of the signature image in pixels.
992
- "sigWidth": 200,
997
+ sigWidth: 200,
993
998
 
994
999
  # Whether or not a signature is required. Defaults to true.
995
- "sigRequired": true
1000
+ sigRequired: true
996
1001
  }
997
1002
 
998
1003
  response = blockchyp.termsAndConditions(request)
@@ -1041,13 +1046,13 @@ blockchyp = BlockChyp::BlockChyp.new(
1041
1046
 
1042
1047
  # Set request parameters
1043
1048
  request = {
1044
- "terminalName": 'Test Terminal',
1049
+ terminalName: 'Test Terminal',
1045
1050
 
1046
1051
  # File format for the signature image.
1047
- "sigFormat": SignatureFormat::PNG,
1052
+ sigFormat: SignatureFormat::PNG,
1048
1053
 
1049
1054
  # Width of the signature image in pixels.
1050
- "sigWidth": 200
1055
+ sigWidth: 200
1051
1056
  }
1052
1057
 
1053
1058
  response = blockchyp.captureSignature(request)
@@ -1097,22 +1102,22 @@ blockchyp = BlockChyp::BlockChyp.new(
1097
1102
 
1098
1103
  # Set request parameters
1099
1104
  request = {
1100
- "test": true,
1101
- "terminalName": 'Test Terminal',
1102
- "transaction": {
1103
- "subtotal": '60.00',
1104
- "tax": '5.00',
1105
- "total": '65.00',
1106
- "items": [
1105
+ test: true,
1106
+ terminalName: 'Test Terminal',
1107
+ transaction: {
1108
+ subtotal: '60.00',
1109
+ tax: '5.00',
1110
+ total: '65.00',
1111
+ items: [
1107
1112
  {
1108
- "description": 'Leki Trekking Poles',
1109
- "price": '35.00',
1110
- "quantity": 2,
1111
- "extended": '70.00',
1112
- "discounts": [
1113
+ description: 'Leki Trekking Poles',
1114
+ price: '35.00',
1115
+ quantity: 2,
1116
+ extended: '70.00',
1117
+ discounts: [
1113
1118
  {
1114
- "description": 'memberDiscount',
1115
- "amount": '10.00'
1119
+ description: 'memberDiscount',
1120
+ amount: '10.00'
1116
1121
  }
1117
1122
  ]
1118
1123
  }
@@ -1175,22 +1180,22 @@ blockchyp = BlockChyp::BlockChyp.new(
1175
1180
 
1176
1181
  # Set request parameters
1177
1182
  request = {
1178
- "test": true,
1179
- "terminalName": 'Test Terminal',
1180
- "transaction": {
1181
- "subtotal": '60.00',
1182
- "tax": '5.00',
1183
- "total": '65.00',
1184
- "items": [
1183
+ test: true,
1184
+ terminalName: 'Test Terminal',
1185
+ transaction: {
1186
+ subtotal: '60.00',
1187
+ tax: '5.00',
1188
+ total: '65.00',
1189
+ items: [
1185
1190
  {
1186
- "description": 'Leki Trekking Poles',
1187
- "price": '35.00',
1188
- "quantity": 2,
1189
- "extended": '70.00',
1190
- "discounts": [
1191
+ description: 'Leki Trekking Poles',
1192
+ price: '35.00',
1193
+ quantity: 2,
1194
+ extended: '70.00',
1195
+ discounts: [
1191
1196
  {
1192
- "description": 'memberDiscount',
1193
- "amount": '10.00'
1197
+ description: 'memberDiscount',
1198
+ amount: '10.00'
1194
1199
  }
1195
1200
  ]
1196
1201
  }
@@ -1229,9 +1234,9 @@ blockchyp = BlockChyp::BlockChyp.new(
1229
1234
 
1230
1235
  # Set request parameters
1231
1236
  request = {
1232
- "test": true,
1233
- "terminalName": 'Test Terminal',
1234
- "message": 'Thank you for your business.'
1237
+ test: true,
1238
+ terminalName: 'Test Terminal',
1239
+ message: 'Thank you for your business.'
1235
1240
  }
1236
1241
 
1237
1242
  response = blockchyp.message(request)
@@ -1274,11 +1279,11 @@ blockchyp = BlockChyp::BlockChyp.new(
1274
1279
 
1275
1280
  # Set request parameters
1276
1281
  request = {
1277
- "test": true,
1278
- "terminalName": 'Test Terminal',
1279
- "prompt": 'Would you like to become a member?',
1280
- "yesCaption": 'Yes',
1281
- "noCaption": 'No'
1282
+ test: true,
1283
+ terminalName: 'Test Terminal',
1284
+ prompt: 'Would you like to become a member?',
1285
+ yesCaption: 'Yes',
1286
+ noCaption: 'No'
1282
1287
  }
1283
1288
 
1284
1289
  response = blockchyp.booleanPrompt(request)
@@ -1330,12 +1335,12 @@ blockchyp = BlockChyp::BlockChyp.new(
1330
1335
 
1331
1336
  # Set request parameters
1332
1337
  request = {
1333
- "test": true,
1334
- "terminalName": 'Test Terminal',
1338
+ test: true,
1339
+ terminalName: 'Test Terminal',
1335
1340
 
1336
1341
  # Type of prompt. Can be 'email', 'phone', 'customer-number', or
1337
1342
  # 'rewards-number'.
1338
- "promptType": PromptType::EMAIL
1343
+ promptType: PromptType::EMAIL
1339
1344
  }
1340
1345
 
1341
1346
  response = blockchyp.textPrompt(request)
@@ -1389,14 +1394,14 @@ blockchyp = BlockChyp::BlockChyp.new(
1389
1394
 
1390
1395
  # Set request parameters
1391
1396
  request = {
1392
- "customer": {
1393
- "id": 'ID of the customer to update',
1394
- "customerRef": 'Customer reference string',
1395
- "firstName": 'FirstName',
1396
- "lastName": 'LastName',
1397
- "companyName": 'Company Name',
1398
- "emailAddress": 'support@blockchyp.com',
1399
- "smsNumber": '(123) 123-1231'
1397
+ customer: {
1398
+ id: 'ID of the customer to update',
1399
+ customerRef: 'Customer reference string',
1400
+ firstName: 'FirstName',
1401
+ lastName: 'LastName',
1402
+ companyName: 'Company Name',
1403
+ emailAddress: 'support@blockchyp.com',
1404
+ smsNumber: '(123) 123-1231'
1400
1405
  }
1401
1406
  }
1402
1407
 
@@ -1432,7 +1437,7 @@ blockchyp = BlockChyp::BlockChyp.new(
1432
1437
 
1433
1438
  # Set request parameters
1434
1439
  request = {
1435
- "customerId": 'ID of the customer to retrieve'
1440
+ customerId: 'ID of the customer to retrieve'
1436
1441
  }
1437
1442
 
1438
1443
  response = blockchyp.customer(request)
@@ -1467,7 +1472,7 @@ blockchyp = BlockChyp::BlockChyp.new(
1467
1472
 
1468
1473
  # Set request parameters
1469
1474
  request = {
1470
- "query": '(123) 123-1234'
1475
+ query: '(123) 123-1234'
1471
1476
  }
1472
1477
 
1473
1478
  response = blockchyp.customerSearch(request)
@@ -1503,9 +1508,9 @@ blockchyp = BlockChyp::BlockChyp.new(
1503
1508
 
1504
1509
  # Set request parameters
1505
1510
  request = {
1506
- "amount": '100.00',
1507
- "cashDiscount": true,
1508
- "surcharge": true
1511
+ amount: '100.00',
1512
+ cashDiscount: true,
1513
+ surcharge: true
1509
1514
  }
1510
1515
 
1511
1516
  response = blockchyp.cashDiscount(request)
@@ -1557,8 +1562,8 @@ blockchyp = BlockChyp::BlockChyp.new(
1557
1562
 
1558
1563
  # Set request parameters
1559
1564
  request = {
1560
- "maxResults": 250,
1561
- "startIndex": 1
1565
+ maxResults: 250,
1566
+ startIndex: 1
1562
1567
  }
1563
1568
 
1564
1569
  response = blockchyp.batchHistory(request)
@@ -1596,7 +1601,7 @@ blockchyp = BlockChyp::BlockChyp.new(
1596
1601
 
1597
1602
  # Set request parameters
1598
1603
  request = {
1599
- "batchId": 'BATCHID'
1604
+ batchId: 'BATCHID'
1600
1605
  }
1601
1606
 
1602
1607
  response = blockchyp.batchDetails(request)
@@ -1664,7 +1669,7 @@ blockchyp = BlockChyp::BlockChyp.new(
1664
1669
 
1665
1670
  # Set request parameters
1666
1671
  request = {
1667
- "maxResults": 10
1672
+ maxResults: 10
1668
1673
  }
1669
1674
 
1670
1675
  response = blockchyp.transactionHistory(request)