blockchyp 2.2.2 → 2.2.3

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 (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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41ad3c50a66cf3a923d07ca800a0c9f18f82ab69f7fc786f5f63c8fca93a7db1
4
- data.tar.gz: 8819829d31b46c3fd6447822b80b024aa3917bcdd89f64a8788442080970015b
3
+ metadata.gz: 640fb1f472a292a08ea6b5009271a2bda797e2f84c3e92bbdd0bdb5014f0d6ad
4
+ data.tar.gz: 4cc390ff6b200c0ca74cc23fdb218f0c768ca9cecb5d0eb117270589f27b1673
5
5
  SHA512:
6
- metadata.gz: 5aad3c311f15a37195d71fef41ce2acfc64c0133b6476f885a6464035063083ffdcb7b98da8c24a40c2be23af47611a42100731fbc8d1bd3f1fe1b4a58483476
7
- data.tar.gz: bcf530294f7a565a2c970bbe9e43a3c898f908c06d8c9ecfe25021ef52c5e6d7984fddee4633558823d43841dba5b85a6810eaa436b714b80f72790e5cf89df7
6
+ metadata.gz: ab2491272d0419b4e8f111449d8133703448a96d5f79767ea678e4c7b36cfcb00d2bf93bfbf28be8bc9467a2fb17b3ff5b5fd844c1e924f5c22f9b84f5998c4f
7
+ data.tar.gz: 3bf5736d5c9f0727f94974a07b03f7bfef88c4d586e6867ec1ad9629c06cef57e8ec9fbabd24f803919255f7c7f2aa4b028c4a5641592d3c378051183e89e755
data/README.md CHANGED
@@ -25,13 +25,18 @@ to run a basic terminal transaction.
25
25
  ```ruby
26
26
  require 'blockchyp'
27
27
 
28
- blockchyp = BlockChyp.new("SPBXTSDAQVFFX5MGQMUMIRINVI", "7BXBTBUPSL3BP7I6Z2CFU6H3WQ", "bcae3708938cb8004ab1278e6c0fcd68f9d815e1c3c86228d028242b147af58e")
28
+ blockchyp = BlockChyp.new(
29
+ "SPBXTSDAQVFFX5MGQMUMIRINVI",
30
+ "7BXBTBUPSL3BP7I6Z2CFU6H3WQ",
31
+ "bcae3708938cb8004ab1278e6c0fcd68f9d815e1c3c86228d028242b147af58e"
32
+ )
29
33
 
30
- # setup request object
31
- request = Hash.new
32
- request["test"] = true
33
- request["terminalName"] = "Test Terminal"
34
- request["amount"] = "55.00"
34
+ # Set request parameters
35
+ request = {
36
+ "test": true,
37
+ "terminalName": "Test Terminal",
38
+ "amount": "55.00"
39
+ }
35
40
 
36
41
  response = blockchyp.charge(request)
37
42
 
@@ -109,11 +114,12 @@ blockchyp = BlockChyp::BlockChyp.new(
109
114
  ENV['BC_SIGNING_KEY']
110
115
  )
111
116
 
112
- # setup request object
113
- request = {}
114
- request['test'] = true
115
- request['terminalName'] = 'Test Terminal'
116
- request['amount'] = '55.00'
117
+ # Set request parameters
118
+ request = {
119
+ "test": true,
120
+ "terminalName": 'Test Terminal',
121
+ "amount": '55.00'
122
+ }
117
123
 
118
124
  response = blockchyp.charge(request)
119
125
 
@@ -138,11 +144,12 @@ blockchyp = BlockChyp::BlockChyp.new(
138
144
  ENV['BC_SIGNING_KEY']
139
145
  )
140
146
 
141
- # setup request object
142
- request = {}
143
- request['test'] = true
144
- request['terminalName'] = 'Test Terminal'
145
- request['amount'] = '27.00'
147
+ # Set request parameters
148
+ request = {
149
+ "test": true,
150
+ "terminalName": 'Test Terminal',
151
+ "amount": '27.00'
152
+ }
146
153
 
147
154
  response = blockchyp.preauth(request)
148
155
 
@@ -167,9 +174,10 @@ blockchyp = BlockChyp::BlockChyp.new(
167
174
  ENV['BC_SIGNING_KEY']
168
175
  )
169
176
 
170
- # setup request object
171
- request = {}
172
- request['terminalName'] = 'Test Terminal'
177
+ # Set request parameters
178
+ request = {
179
+ "terminalName": 'Test Terminal'
180
+ }
173
181
 
174
182
  response = blockchyp.ping(request)
175
183
 
@@ -194,11 +202,12 @@ blockchyp = BlockChyp::BlockChyp.new(
194
202
  ENV['BC_SIGNING_KEY']
195
203
  )
196
204
 
197
- # setup request object
198
- request = {}
199
- request['test'] = true
200
- request['terminalName'] = 'Test Terminal'
201
- request['cardType'] = CardType::EBT
205
+ # Set request parameters
206
+ request = {
207
+ "test": true,
208
+ "terminalName": 'Test Terminal',
209
+ "cardType": CardType::EBT
210
+ }
202
211
 
203
212
  response = blockchyp.balance(request)
204
213
 
@@ -223,10 +232,11 @@ blockchyp = BlockChyp::BlockChyp.new(
223
232
  ENV['BC_SIGNING_KEY']
224
233
  )
225
234
 
226
- # setup request object
227
- request = {}
228
- request['test'] = true
229
- request['terminalName'] = 'Test Terminal'
235
+ # Set request parameters
236
+ request = {
237
+ "test": true,
238
+ "terminalName": 'Test Terminal'
239
+ }
230
240
 
231
241
  response = blockchyp.clear(request)
232
242
 
@@ -251,16 +261,30 @@ blockchyp = BlockChyp::BlockChyp.new(
251
261
  ENV['BC_SIGNING_KEY']
252
262
  )
253
263
 
254
- # setup request object
255
- request = {}
256
- request['test'] = true
257
- request['terminalName'] = 'Test Terminal'
258
- request['tcAlias'] = 'hippa'
259
- request['tcName'] = 'HIPPA Disclosure'
260
- request['tcContent'] = 'Full contract text'
261
- request['sigFormat'] = SignatureFormat::PNG
262
- request['sigWidth'] = 200
263
- request['sigRequired'] = true
264
+ # Set request parameters
265
+ request = {
266
+ "test": true,
267
+ "terminalName": 'Test Terminal',
268
+
269
+ # Alias for a Terms and Conditions template configured in the BlockChyp
270
+ # dashboard.
271
+ "tcAlias": 'hippa',
272
+
273
+ # Name of the contract or document if not using an alias.
274
+ "tcName": 'HIPPA Disclosure',
275
+
276
+ # Full text of the contract or disclosure if not using an alias.
277
+ "tcContent": 'Full contract text',
278
+
279
+ # File format for the signature image.
280
+ "sigFormat": SignatureFormat::PNG,
281
+
282
+ # Width of the signature image in pixels.
283
+ "sigWidth": 200,
284
+
285
+ # Whether or not a signature is required. Defaults to true.
286
+ "sigRequired": true
287
+ }
264
288
 
265
289
  response = blockchyp.termsAndConditions(request)
266
290
 
@@ -287,53 +311,34 @@ blockchyp = BlockChyp::BlockChyp.new(
287
311
  ENV['BC_SIGNING_KEY']
288
312
  )
289
313
 
290
- # setup request object
291
- request = {}
292
- request['test'] = true
293
- request['terminalName'] = 'Test Terminal'
294
- request['transaction'] = new_transaction_display_transaction
314
+ # Set request parameters
315
+ request = {
316
+ "test": true,
317
+ "terminalName": 'Test Terminal',
318
+ "transaction": {
319
+ "subtotal": '60.00',
320
+ "tax": '5.00',
321
+ "total": '65.00',
322
+ "items": [
323
+ {
324
+ "description": 'Leki Trekking Poles',
325
+ "price": '35.00',
326
+ "quantity": 2,
327
+ "extended": '70.00',
328
+ "discounts": [
329
+ {
330
+ "description": 'memberDiscount',
331
+ "amount": '10.00'
332
+ }
333
+ ]
334
+ }
335
+ ]
336
+ }
337
+ }
295
338
 
296
339
  response = blockchyp.updateTransactionDisplay(request)
297
340
 
298
341
  puts "Response: #{response.inspect}"
299
- def new_transaction_display_transaction
300
- val = {}
301
- val['subtotal'] = '60.00'
302
- val['tax'] = '5.00'
303
- val['total'] = '65.00'
304
- val['items'] = new_transaction_display_items
305
- val
306
- end
307
-
308
- def new_transaction_display_items
309
- val = []
310
- val = val.push(new_transaction_display_item_2)
311
- val
312
- end
313
-
314
- def new_transaction_display_item_2
315
- val = {}
316
- val['description'] = 'Leki Trekking Poles'
317
- val['price'] = '35.00'
318
- val['quantity'] = 2
319
- val['extended'] = '70.00'
320
- val['discounts'] = new_transaction_display_discounts
321
- val
322
- end
323
-
324
- def new_transaction_display_discounts
325
- val = []
326
- val = val.push(new_transaction_display_discount_2)
327
- val
328
- end
329
-
330
- def new_transaction_display_discount_2
331
- val = {}
332
- val['description'] = 'memberDiscount'
333
- val['amount'] = '10.00'
334
- val
335
- end
336
-
337
342
 
338
343
 
339
344
  ```
@@ -354,53 +359,34 @@ blockchyp = BlockChyp::BlockChyp.new(
354
359
  ENV['BC_SIGNING_KEY']
355
360
  )
356
361
 
357
- # setup request object
358
- request = {}
359
- request['test'] = true
360
- request['terminalName'] = 'Test Terminal'
361
- request['transaction'] = new_transaction_display_transaction
362
+ # Set request parameters
363
+ request = {
364
+ "test": true,
365
+ "terminalName": 'Test Terminal',
366
+ "transaction": {
367
+ "subtotal": '60.00',
368
+ "tax": '5.00',
369
+ "total": '65.00',
370
+ "items": [
371
+ {
372
+ "description": 'Leki Trekking Poles',
373
+ "price": '35.00',
374
+ "quantity": 2,
375
+ "extended": '70.00',
376
+ "discounts": [
377
+ {
378
+ "description": 'memberDiscount',
379
+ "amount": '10.00'
380
+ }
381
+ ]
382
+ }
383
+ ]
384
+ }
385
+ }
362
386
 
363
387
  response = blockchyp.newTransactionDisplay(request)
364
388
 
365
389
  puts "Response: #{response.inspect}"
366
- def new_transaction_display_transaction
367
- val = {}
368
- val['subtotal'] = '60.00'
369
- val['tax'] = '5.00'
370
- val['total'] = '65.00'
371
- val['items'] = new_transaction_display_items
372
- val
373
- end
374
-
375
- def new_transaction_display_items
376
- val = []
377
- val = val.push(new_transaction_display_item_2)
378
- val
379
- end
380
-
381
- def new_transaction_display_item_2
382
- val = {}
383
- val['description'] = 'Leki Trekking Poles'
384
- val['price'] = '35.00'
385
- val['quantity'] = 2
386
- val['extended'] = '70.00'
387
- val['discounts'] = new_transaction_display_discounts
388
- val
389
- end
390
-
391
- def new_transaction_display_discounts
392
- val = []
393
- val = val.push(new_transaction_display_discount_2)
394
- val
395
- end
396
-
397
- def new_transaction_display_discount_2
398
- val = {}
399
- val['description'] = 'memberDiscount'
400
- val['amount'] = '10.00'
401
- val
402
- end
403
-
404
390
 
405
391
 
406
392
  ```
@@ -421,11 +407,15 @@ blockchyp = BlockChyp::BlockChyp.new(
421
407
  ENV['BC_SIGNING_KEY']
422
408
  )
423
409
 
424
- # setup request object
425
- request = {}
426
- request['test'] = true
427
- request['terminalName'] = 'Test Terminal'
428
- request['promptType'] = PromptType::EMAIL
410
+ # Set request parameters
411
+ request = {
412
+ "test": true,
413
+ "terminalName": 'Test Terminal',
414
+
415
+ # Type of prompt. Can be 'email', 'phone', 'customer-number', or
416
+ # 'rewards-number'.
417
+ "promptType": PromptType::EMAIL
418
+ }
429
419
 
430
420
  response = blockchyp.textPrompt(request)
431
421
 
@@ -450,13 +440,14 @@ blockchyp = BlockChyp::BlockChyp.new(
450
440
  ENV['BC_SIGNING_KEY']
451
441
  )
452
442
 
453
- # setup request object
454
- request = {}
455
- request['test'] = true
456
- request['terminalName'] = 'Test Terminal'
457
- request['prompt'] = 'Would you like to become a member?'
458
- request['yesCaption'] = 'Yes'
459
- request['noCaption'] = 'No'
443
+ # Set request parameters
444
+ request = {
445
+ "test": true,
446
+ "terminalName": 'Test Terminal',
447
+ "prompt": 'Would you like to become a member?',
448
+ "yesCaption": 'Yes',
449
+ "noCaption": 'No'
450
+ }
460
451
 
461
452
  response = blockchyp.booleanPrompt(request)
462
453
 
@@ -481,11 +472,12 @@ blockchyp = BlockChyp::BlockChyp.new(
481
472
  ENV['BC_SIGNING_KEY']
482
473
  )
483
474
 
484
- # setup request object
485
- request = {}
486
- request['test'] = true
487
- request['terminalName'] = 'Test Terminal'
488
- request['message'] = 'Thank you for your business.'
475
+ # Set request parameters
476
+ request = {
477
+ "test": true,
478
+ "terminalName": 'Test Terminal',
479
+ "message": 'Thank you for your business.'
480
+ }
489
481
 
490
482
  response = blockchyp.message(request)
491
483
 
@@ -510,11 +502,14 @@ blockchyp = BlockChyp::BlockChyp.new(
510
502
  ENV['BC_SIGNING_KEY']
511
503
  )
512
504
 
513
- # setup request object
514
- request = {}
515
- request['terminalName'] = 'Test Terminal'
516
- request['transactionId'] = '<PREVIOUS TRANSACTION ID>'
517
- request['amount'] = '5.00'
505
+ # Set request parameters
506
+ request = {
507
+ "terminalName": 'Test Terminal',
508
+ "transactionId": '<PREVIOUS TRANSACTION ID>',
509
+
510
+ # Optional amount for partial refunds.
511
+ "amount": '5.00'
512
+ }
518
513
 
519
514
  response = blockchyp.refund(request)
520
515
 
@@ -539,10 +534,11 @@ blockchyp = BlockChyp::BlockChyp.new(
539
534
  ENV['BC_SIGNING_KEY']
540
535
  )
541
536
 
542
- # setup request object
543
- request = {}
544
- request['test'] = true
545
- request['terminalName'] = 'Test Terminal'
537
+ # Set request parameters
538
+ request = {
539
+ "test": true,
540
+ "terminalName": 'Test Terminal'
541
+ }
546
542
 
547
543
  response = blockchyp.enroll(request)
548
544
 
@@ -567,11 +563,12 @@ blockchyp = BlockChyp::BlockChyp.new(
567
563
  ENV['BC_SIGNING_KEY']
568
564
  )
569
565
 
570
- # setup request object
571
- request = {}
572
- request['test'] = true
573
- request['terminalName'] = 'Test Terminal'
574
- request['amount'] = '50.00'
566
+ # Set request parameters
567
+ request = {
568
+ "test": true,
569
+ "terminalName": 'Test Terminal',
570
+ "amount": '50.00'
571
+ }
575
572
 
576
573
  response = blockchyp.giftActivate(request)
577
574
 
@@ -604,10 +601,11 @@ blockchyp = BlockChyp::BlockChyp.new(
604
601
  ENV['BC_SIGNING_KEY']
605
602
  )
606
603
 
607
- # setup request object
608
- request = {}
609
- request['terminalName'] = 'Test Terminal'
610
- request['transactionRef'] = '<LAST TRANSACTION REF>'
604
+ # Set request parameters
605
+ request = {
606
+ "terminalName": 'Test Terminal',
607
+ "transactionRef": '<LAST TRANSACTION REF>'
608
+ }
611
609
 
612
610
  response = blockchyp.reverse(request)
613
611
 
@@ -632,10 +630,11 @@ blockchyp = BlockChyp::BlockChyp.new(
632
630
  ENV['BC_SIGNING_KEY']
633
631
  )
634
632
 
635
- # setup request object
636
- request = {}
637
- request['test'] = true
638
- request['transactionId'] = '<PREAUTH TRANSACTION ID>'
633
+ # Set request parameters
634
+ request = {
635
+ "test": true,
636
+ "transactionId": '<PREAUTH TRANSACTION ID>'
637
+ }
639
638
 
640
639
  response = blockchyp.capture(request)
641
640
 
@@ -660,9 +659,10 @@ blockchyp = BlockChyp::BlockChyp.new(
660
659
  ENV['BC_SIGNING_KEY']
661
660
  )
662
661
 
663
- # setup request object
664
- request = {}
665
- request['test'] = true
662
+ # Set request parameters
663
+ request = {
664
+ "test": true
665
+ }
666
666
 
667
667
  response = blockchyp.closeBatch(request)
668
668
 
@@ -687,10 +687,11 @@ blockchyp = BlockChyp::BlockChyp.new(
687
687
  ENV['BC_SIGNING_KEY']
688
688
  )
689
689
 
690
- # setup request object
691
- request = {}
692
- request['test'] = true
693
- request['transactionId'] = '<PREVIOUS TRANSACTION ID>'
690
+ # Set request parameters
691
+ request = {
692
+ "test": true,
693
+ "transactionId": '<PREVIOUS TRANSACTION ID>'
694
+ }
694
695
 
695
696
  response = blockchyp.void(request)
696
697
 
@@ -715,9 +716,10 @@ blockchyp = BlockChyp::BlockChyp.new(
715
716
  ENV['BC_SIGNING_KEY']
716
717
  )
717
718
 
718
- # setup request object
719
- request = {}
720
- request['terminalName'] = 'Test Terminal'
719
+ # Set request parameters
720
+ request = {
721
+ "terminalName": 'Test Terminal'
722
+ }
721
723
 
722
724
  response = blockchyp.terminalStatus(request)
723
725
 
@@ -742,11 +744,16 @@ blockchyp = BlockChyp::BlockChyp.new(
742
744
  ENV['BC_SIGNING_KEY']
743
745
  )
744
746
 
745
- # setup request object
746
- request = {}
747
- request['terminalName'] = 'Test Terminal'
748
- request['sigFormat'] = SignatureFormat::PNG
749
- request['sigWidth'] = 200
747
+ # Set request parameters
748
+ request = {
749
+ "terminalName": 'Test Terminal',
750
+
751
+ # File format for the signature image.
752
+ "sigFormat": SignatureFormat::PNG,
753
+
754
+ # Width of the signature image in pixels.
755
+ "sigWidth": 200
756
+ }
750
757
 
751
758
  response = blockchyp.captureSignature(request)
752
759
 
@@ -771,25 +778,22 @@ blockchyp = BlockChyp::BlockChyp.new(
771
778
  ENV['BC_SIGNING_KEY']
772
779
  )
773
780
 
774
- # setup request object
775
- request = {}
776
- request['customer'] = new_customer
781
+ # Set request parameters
782
+ request = {
783
+ "customer": {
784
+ "id": 'ID of the customer to update',
785
+ "customerRef": 'Customer reference string',
786
+ "firstName": 'FirstName',
787
+ "lastName": 'LastName',
788
+ "companyName": 'Company Name',
789
+ "emailAddress": 'support@blockchyp.com',
790
+ "smsNumber": '(123) 123-1231'
791
+ }
792
+ }
777
793
 
778
794
  response = blockchyp.updateCustomer(request)
779
795
 
780
796
  puts "Response: #{response.inspect}"
781
- def new_customer
782
- val = {}
783
- val['id'] = 'ID of the customer to update'
784
- val['customerRef'] = 'Customer reference string'
785
- val['firstName'] = 'FirstName'
786
- val['lastName'] = 'LastName'
787
- val['companyName'] = 'Company Name'
788
- val['emailAddress'] = 'support@blockchyp.com'
789
- val['smsNumber'] = '(123) 123-1231'
790
- val
791
- end
792
-
793
797
 
794
798
 
795
799
  ```
@@ -810,9 +814,10 @@ blockchyp = BlockChyp::BlockChyp.new(
810
814
  ENV['BC_SIGNING_KEY']
811
815
  )
812
816
 
813
- # setup request object
814
- request = {}
815
- request['customerId'] = 'ID of the customer to retrieve'
817
+ # Set request parameters
818
+ request = {
819
+ "customerId": 'ID of the customer to retrieve'
820
+ }
816
821
 
817
822
  response = blockchyp.customer(request)
818
823
 
@@ -837,9 +842,10 @@ blockchyp = BlockChyp::BlockChyp.new(
837
842
  ENV['BC_SIGNING_KEY']
838
843
  )
839
844
 
840
- # setup request object
841
- request = {}
842
- request['query'] = '(123) 123-1234'
845
+ # Set request parameters
846
+ request = {
847
+ "query": '(123) 123-1234'
848
+ }
843
849
 
844
850
  response = blockchyp.customerSearch(request)
845
851
 
@@ -864,9 +870,10 @@ blockchyp = BlockChyp::BlockChyp.new(
864
870
  ENV['BC_SIGNING_KEY']
865
871
  )
866
872
 
867
- # setup request object
868
- request = {}
869
- request['transactionId'] = 'ID of transaction to retrieve'
873
+ # Set request parameters
874
+ request = {
875
+ "transactionId": 'ID of transaction to retrieve'
876
+ }
870
877
 
871
878
  response = blockchyp.transactionStatus(request)
872
879
 
@@ -891,52 +898,37 @@ blockchyp = BlockChyp::BlockChyp.new(
891
898
  ENV['BC_SIGNING_KEY']
892
899
  )
893
900
 
894
- # setup request object
895
- request = {}
896
- request['amount'] = '199.99'
897
- request['description'] = 'Widget'
898
- request['subject'] = 'Widget invoice'
899
- request['transaction'] = new_transaction_display_transaction
900
- request['autoSend'] = true
901
- request['customer'] = new_customer
901
+ # Set request parameters
902
+ request = {
903
+ "amount": '199.99',
904
+ "description": 'Widget',
905
+ "subject": 'Widget invoice',
906
+ "transaction": {
907
+ "subtotal": '195.00',
908
+ "tax": '4.99',
909
+ "total": '199.99',
910
+ "items": [
911
+ {
912
+ "description": 'Widget',
913
+ "price": '195.00',
914
+ "quantity": 1
915
+ }
916
+ ]
917
+ },
918
+ "autoSend": true,
919
+ "customer": {
920
+ "customerRef": 'Customer reference string',
921
+ "firstName": 'FirstName',
922
+ "lastName": 'LastName',
923
+ "companyName": 'Company Name',
924
+ "emailAddress": 'support@blockchyp.com',
925
+ "smsNumber": '(123) 123-1231'
926
+ }
927
+ }
902
928
 
903
929
  response = blockchyp.sendPaymentLink(request)
904
930
 
905
931
  puts "Response: #{response.inspect}"
906
- def new_transaction_display_transaction
907
- val = {}
908
- val['subtotal'] = '195.00'
909
- val['tax'] = '4.99'
910
- val['total'] = '199.99'
911
- val['items'] = new_transaction_display_items
912
- val
913
- end
914
-
915
- def new_transaction_display_items
916
- val = []
917
- val = val.push(new_transaction_display_item_2)
918
- val
919
- end
920
-
921
- def new_transaction_display_item_2
922
- val = {}
923
- val['description'] = 'Widget'
924
- val['price'] = '195.00'
925
- val['quantity'] = 1
926
- val
927
- end
928
-
929
- def new_customer
930
- val = {}
931
- val['customerRef'] = 'Customer reference string'
932
- val['firstName'] = 'FirstName'
933
- val['lastName'] = 'LastName'
934
- val['companyName'] = 'Company Name'
935
- val['emailAddress'] = 'support@blockchyp.com'
936
- val['smsNumber'] = '(123) 123-1231'
937
- val
938
- end
939
-
940
932
 
941
933
 
942
934
  ```