blockchyp 2.19.0 → 2.20.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1ceaeac160aebac1400a60f940b7127680c0e6ee4be91c90fcbadbbaf94062e
4
- data.tar.gz: d4d18670b1acb71f333571129fa074c0c80c717b46a0819ad77db0b8afe04756
3
+ metadata.gz: 36092c3724e15a799bd6818501835b3341dbab60be85a2197e32a66aae92bad5
4
+ data.tar.gz: 3e6f99e973a25da54e2b37cb6c04125848a79dac68267c29172cbd728fc78a5d
5
5
  SHA512:
6
- metadata.gz: 8798686d3b0f23f7d7374b6721fdc1e095e00a5ce633397e8535553be607916966bf3a507a412486c27a3ca7bc9349e0171f5f45a0e656febd72e9e1e2ff68c6
7
- data.tar.gz: 2c3fc65f7062be068e4308480c85eccb29e755be1ca0d0625e87047ab5b8763a4855e7392196ddf5c4a4cf6edcd393825639addcf57f4e3091bbd836b427b5ff
6
+ metadata.gz: efa1ee361c3da27538772284e2e151dc775febf44fff29b62a60ecb3586b292d59670dd7da1eb09faee44b2b9950c37a146df8e3e2087a2e1f70c91f2d116b10
7
+ data.tar.gz: 742ccc940a4138d6306f1f034535b9975fb99def600d52795eb626b261fe928ae1d46676f5f654b51c2666103079b513b65239aca5648b8e807d4f5435ab6835
data/README.md CHANGED
@@ -396,6 +396,61 @@ response = blockchyp.void(request)
396
396
  puts "Response: #{response.inspect}"
397
397
 
398
398
 
399
+ ```
400
+
401
+ #### Card Metadata
402
+
403
+
404
+
405
+ * **API Credential Types:** Merchant
406
+ * **Required Role:** Payment API Access
407
+
408
+ This API allows you to retrieve card metadata.
409
+
410
+ Card metadata requests can use a payment terminal to retrieve metadata or
411
+ use a previously enrolled payment token.
412
+
413
+ **Terminal Transactions**
414
+
415
+ For terminal transactions, make sure you pass in the terminal name using the `terminalName` property.
416
+
417
+ **Token Transactions**
418
+
419
+ If you have a payment token, omit the `terminalName` property and pass in the token with the `token`
420
+ property instead.
421
+
422
+ **Card Numbers and Mag Stripes**
423
+
424
+ You can also pass in PANs and Mag Stripes, but you probably shouldn't, as this will
425
+ put you in PCI scope and the most common vector for POS breaches is keylogging.
426
+ If you use terminals for manual card entry, you'll bypass any keyloggers that
427
+ might be maliciously running on the point-of-sale system.
428
+
429
+
430
+
431
+
432
+ ```ruby
433
+ # frozen_string_literal: true
434
+
435
+ require 'blockchyp'
436
+
437
+ blockchyp = BlockChyp::BlockChyp.new(
438
+ ENV['BC_API_KEY'],
439
+ ENV['BC_BEARER_TOKEN'],
440
+ ENV['BC_SIGNING_KEY']
441
+ )
442
+
443
+ # Set request parameters
444
+ request = {
445
+ test: true,
446
+ terminalName: 'Test Terminal'
447
+ }
448
+
449
+ response = blockchyp.cardMetadata(request)
450
+
451
+ puts "Response: #{response.inspect}"
452
+
453
+
399
454
  ```
400
455
 
401
456
  #### Time Out Reversal
@@ -4279,6 +4334,7 @@ blockchyp = BlockChyp::BlockChyp.new(
4279
4334
 
4280
4335
  # Set request parameters
4281
4336
  request = {
4337
+ merchantId: '<MERCHANT ID>'
4282
4338
  }
4283
4339
 
4284
4340
  response = blockchyp.merchantCredentialGeneration(request)
@@ -4288,6 +4344,53 @@ puts "Response: #{response.inspect}"
4288
4344
 
4289
4345
  ```
4290
4346
 
4347
+ #### Submit Application
4348
+
4349
+
4350
+
4351
+ * **API Credential Types:** Partner
4352
+ * **Required Role:** INVITE MERCHANT
4353
+
4354
+ This is a partner level API that can be used to submit applications to add new merchant accounts. The application requires a significant amount of detailed information about the merchant and their business. Rather than providing an exhaustive list of required fields, we recommend submitting as much information as possible in your initial request.
4355
+
4356
+ If any required fields are missing or if there are any validation errors, the API will return specific error messages indicating which fields need to be addressed. Simply review these validation errors, fill in the missing information or correct any errors, and resubmit the application.
4357
+
4358
+ Key areas of information include:
4359
+ - Business details (name, type, tax information)
4360
+ - Contact information
4361
+ - Address information (physical and mailing)
4362
+ - Owner details
4363
+ - Bank account information
4364
+ - Transaction volume estimates
4365
+ - Operational settings (timezone, batch close time, etc.)
4366
+
4367
+ **Note:** Some fields may be conditionally required based on the values of other fields. The validation process will guide you through ensuring all necessary information is provided.
4368
+
4369
+
4370
+
4371
+
4372
+ ```ruby
4373
+ # frozen_string_literal: true
4374
+
4375
+ require 'blockchyp'
4376
+
4377
+ blockchyp = BlockChyp::BlockChyp.new(
4378
+ ENV['BC_API_KEY'],
4379
+ ENV['BC_BEARER_TOKEN'],
4380
+ ENV['BC_SIGNING_KEY']
4381
+ )
4382
+
4383
+ # Set request parameters
4384
+ request = {
4385
+ }
4386
+
4387
+ response = blockchyp.submitApplication(request)
4388
+
4389
+ puts "Response: #{response.inspect}"
4390
+
4391
+
4392
+ ```
4393
+
4291
4394
 
4292
4395
 
4293
4396
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BlockChyp
4
- VERSION = '2.19.0'
4
+ VERSION = '2.20.1'
5
5
  end
data/lib/blockchyp.rb CHANGED
@@ -98,6 +98,11 @@ module BlockChyp
98
98
  route_terminal_request('POST', '/api/enroll', '/api/enroll', request)
99
99
  end
100
100
 
101
+ # Retrieves card metadata.
102
+ def card_metadata(request)
103
+ route_terminal_request('POST', '/api/card-metadata', '/api/card-metadata', request)
104
+ end
105
+
101
106
  # Activates or recharges a gift card.
102
107
  def gift_activate(request)
103
108
  route_terminal_request('POST', '/api/gift-activate', '/api/gift-activate', request)
@@ -331,6 +336,11 @@ module BlockChyp
331
336
  dashboard_request('POST', '/api/generate-merchant-creds', request)
332
337
  end
333
338
 
339
+ # Submits and application to add a new merchant account.
340
+ def submit_application(request)
341
+ dashboard_request('POST', '/api/submit-application', request)
342
+ end
343
+
334
344
  # Adds a test merchant account.
335
345
  def get_merchants(request)
336
346
  dashboard_request('POST', '/api/get-merchants', request)
@@ -0,0 +1,139 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2019-2024 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 SubmitApplicationTest < TestCase
13
+ def test_submit_application
14
+
15
+ puts "Running test_submit_application..."
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
+ inviteCode: 'asdf',
45
+ dbaName: 'BlockChyp',
46
+ corporateName: 'BlockChyp Inc.',
47
+ webSite: 'https://www.blockchyp.com',
48
+ taxIdNumber: '123456789',
49
+ entityType: 'CORPORATION',
50
+ stateOfIncorporation: 'UT',
51
+ merchantType: 'RETAIL',
52
+ businessDescription: 'Payment processing solutions',
53
+ yearsInBusiness: '5',
54
+ businessPhoneNumber: '5555551234',
55
+ physicalAddress: {
56
+ address1: '355 S 520 W',
57
+ city: 'Lindon',
58
+ stateOrProvince: 'UT',
59
+ postalCode: '84042',
60
+ countryCode: 'US'
61
+ },
62
+ mailingAddress: {
63
+ address1: '355 S 520 W',
64
+ city: 'Lindon',
65
+ stateOrProvince: 'UT',
66
+ postalCode: '84042',
67
+ countryCode: 'US'
68
+ },
69
+ contactFirstName: 'John',
70
+ contactLastName: 'Doe',
71
+ contactPhoneNumber: '5555555678',
72
+ contactEmail: 'john.doe@example.com',
73
+ contactTitle: 'CEO',
74
+ contactTaxIdNumber: '987654321',
75
+ contactDOB: '1980-01-01',
76
+ contactDlNumber: 'D1234567',
77
+ contactDlStateOrProvince: 'NY',
78
+ contactDlExpiration: '2025-12-31',
79
+ contactHomeAddress: {
80
+ address1: '355 S 520 W',
81
+ city: 'Lindon',
82
+ stateOrProvince: 'UT',
83
+ postalCode: '84042',
84
+ countryCode: 'US'
85
+ },
86
+ contactRole: 'OWNER',
87
+ owners: [
88
+ {
89
+ firstName: 'John',
90
+ lastName: 'Doe',
91
+ jobTitle: 'CEO',
92
+ taxIdNumber: '876543210',
93
+ phoneNumber: '5555559876',
94
+ dob: '1981-02-02',
95
+ ownership: '50',
96
+ email: 'john.doe@example.com',
97
+ dlNumber: 'D7654321',
98
+ dlStateOrProvince: 'UT',
99
+ dlExpiration: '2024-12-31',
100
+ address: {
101
+ address1: '355 S 520 W',
102
+ city: 'Lindon',
103
+ stateOrProvince: 'UT',
104
+ postalCode: '84042',
105
+ countryCode: 'US'
106
+ }
107
+ }
108
+ ],
109
+ manualAccount: {
110
+ name: 'Business Checking',
111
+ bank: 'Test Bank',
112
+ accountHolderName: 'BlockChyp Inc.',
113
+ routingNumber: '124001545',
114
+ accountNumber: '987654321'
115
+ },
116
+ averageTransaction: '100.00',
117
+ highTransaction: '1000.00',
118
+ averageMonth: '10000.00',
119
+ highMonth: '20000.00',
120
+ refundPolicy: '30_DAYS',
121
+ refundDays: '30',
122
+ timeZone: 'America/Denver',
123
+ batchCloseTime: '23:59',
124
+ multipleLocations: 'false',
125
+ ebtRequested: 'false',
126
+ ecommerce: 'true',
127
+ cardPresentPercentage: '70',
128
+ phoneOrderPercentage: '10',
129
+ ecomPercentage: '20',
130
+ signerName: 'John Doe'
131
+ }
132
+
133
+ response = blockchyp.submit_application(request)
134
+ assert_not_nil(response)
135
+ # response assertions
136
+ assert(response[:success])
137
+ end
138
+ end
139
+ 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.19.0
4
+ version: 2.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - BlockChyp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-16 00:00:00.000000000 Z
11
+ date: 2024-11-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -83,6 +83,7 @@ files:
83
83
  - test/simple_void_test.rb
84
84
  - test/slide_show_test.rb
85
85
  - test/slide_shows_test.rb
86
+ - test/submit_application_test.rb
86
87
  - test/survey_question_test.rb
87
88
  - test/survey_questions_test.rb
88
89
  - test/survey_results_test.rb