fat_zebra 3.2.7 → 3.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fat_zebra.gemspec +4 -1
- data/lib/fat_zebra/utilities/apple_pay/domain.rb +30 -6
- data/lib/fat_zebra/version.rb +1 -1
- data/spec/cassettes/FatZebra_Utilities_ApplePay_Domain/_list/fetches_the_merchant_domains.yml +86 -0
- data/spec/lib/fat_zebra/utilities/apple_pay/domain_spec.rb +21 -0
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d35cdb587442ac63eba5fcfcfdf92adf55d64f4d360d91a73f400dfc500f992a
|
4
|
+
data.tar.gz: d8f3d7faee1356cbf23a9eed40b20fb250a6d5e209afc370a65ce2c844b91a74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2c1badd7e421ab6fddaa0abd78c3fb66c41667781145b90f9b6dfa74876712d1226bde761c49d16e1cdde3236a243cf0d31390efab41273af62610fb209dcd2
|
7
|
+
data.tar.gz: b6d5f84a7d987bdd4f9964cda260e02a38df5a93a7c16012f1fa0079c7435cda21d1673aa5c4417713d24c6aa0ac2a0393fbd5061ea018ac1911d175b2e941e2
|
data/fat_zebra.gemspec
CHANGED
@@ -10,10 +10,13 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.version = FatZebra::VERSION
|
11
11
|
s.authors = ['Fat Zebra']
|
12
12
|
s.email = ['support@fatzebra.com']
|
13
|
-
s.homepage = ''
|
13
|
+
s.homepage = 'https://github.com/fatzebra/Ruby-Library'
|
14
14
|
s.summary = 'Fat Zebra payments gem - integrate your ruby app with Fat Zebra'
|
15
15
|
s.description = 'Provides integration with the Fat Zebra internet payment gateway (www.fatzebra.com), including purchase, refund, auth, capture and recurring billing functionality.'
|
16
16
|
|
17
|
+
s.metadata['homepage_uri'] = s.homepage
|
18
|
+
s.metadata['source_code_uri'] = s.homepage
|
19
|
+
|
17
20
|
s.files = `git ls-files`.split("\n")
|
18
21
|
s.test_files = `git ls-files -- {spec}/*`.split("\n")
|
19
22
|
s.require_paths = %w[lib]
|
@@ -9,30 +9,54 @@ module FatZebra
|
|
9
9
|
|
10
10
|
class << self
|
11
11
|
|
12
|
+
##
|
13
|
+
# List Apple Pay (web) domains
|
14
|
+
#
|
15
|
+
# @param [Hash] options for the request, and configurations (Optional)
|
16
|
+
#
|
17
|
+
# @return [FatZebra::Utilities::ApplePay::Domains] response
|
18
|
+
def list(options = {})
|
19
|
+
params = {}
|
20
|
+
response = request(:get, ENDPOINT_URL, params, options)
|
21
|
+
initialize_from(response)
|
22
|
+
end
|
23
|
+
|
12
24
|
##
|
13
25
|
# Register an Apple Pay (web) domain
|
14
26
|
#
|
27
|
+
# @param [String] domain
|
28
|
+
# @param [Hash] params
|
29
|
+
# @param [Hash] options for the request, and configurations (Optional)
|
30
|
+
#
|
15
31
|
# @return [FatZebra::Utilities::ApplePay::Domains] response
|
16
|
-
def register!(domain, params = {})
|
17
|
-
response = request(:post, path(domain), params)
|
32
|
+
def register!(domain, params = {}, options = {})
|
33
|
+
response = request(:post, path(domain), params, options)
|
18
34
|
initialize_from(response)
|
19
35
|
end
|
20
36
|
|
21
37
|
##
|
22
38
|
# Check registration status of an Apple Pay (web) domain
|
23
39
|
#
|
40
|
+
# @param [String] domain
|
41
|
+
# @param [Hash] options for the request, and configurations (Optional)
|
42
|
+
#
|
24
43
|
# @return [FatZebra::Utilities::ApplePay::Domains] response
|
25
|
-
def find!(domain)
|
26
|
-
|
44
|
+
def find!(domain, options = {})
|
45
|
+
params = {}
|
46
|
+
response = request(:get, path(domain), params, options)
|
27
47
|
initialize_from(response)
|
28
48
|
end
|
29
49
|
|
30
50
|
##
|
31
51
|
# Delete an Apple Pay (web) domain
|
32
52
|
#
|
53
|
+
# @param [String] domain
|
54
|
+
# @param [Hash] options for the request, and configurations (Optional)
|
55
|
+
#
|
33
56
|
# @return [FatZebra::Utilities::ApplePay::Domains] response
|
34
|
-
def delete!(domain)
|
35
|
-
|
57
|
+
def delete!(domain, options = {})
|
58
|
+
params = {}
|
59
|
+
response = request(:delete, path(domain), params, options)
|
36
60
|
initialize_from(response)
|
37
61
|
end
|
38
62
|
|
data/lib/fat_zebra/version.rb
CHANGED
@@ -0,0 +1,86 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/utilities/apple_pay/domains?test=true
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ""
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Host:
|
17
|
+
- gateway.sandbox.fatzebra.com.au
|
18
|
+
Authorization:
|
19
|
+
- Basic VEVTVDpURVNU
|
20
|
+
Content-Type:
|
21
|
+
- application/json
|
22
|
+
response:
|
23
|
+
status:
|
24
|
+
code: 200
|
25
|
+
message: OK
|
26
|
+
headers:
|
27
|
+
Date:
|
28
|
+
- Wed, 27 Mar 2024 05:15:56 GMT
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Transfer-Encoding:
|
32
|
+
- chunked
|
33
|
+
Connection:
|
34
|
+
- keep-alive
|
35
|
+
Status:
|
36
|
+
- 200 OK
|
37
|
+
Cache-Control:
|
38
|
+
- no-store
|
39
|
+
Vary:
|
40
|
+
- Accept
|
41
|
+
Pragma:
|
42
|
+
- no-cache
|
43
|
+
X-Request-Id:
|
44
|
+
- 2cbc832327aa693a5e85b23b
|
45
|
+
X-Runtime:
|
46
|
+
- "0.062169"
|
47
|
+
X-Backend:
|
48
|
+
- gateway
|
49
|
+
Strict-Transport-Security:
|
50
|
+
- max-age=31536000; includeSubDomains
|
51
|
+
Content-Security-Policy-Report-Only:
|
52
|
+
- "child-src 'self' blob: *.cardinalcommerce.com fatzebra.statuspage.io; connect-src
|
53
|
+
'self' *.mastercard.com *.forter.com *.pmnts-staging.io *.rollbar.com *.nr-data.net
|
54
|
+
*.cardinalcommerce.com fatzebra.statuspage.io *.googleapis.com *.google-analytics.com;
|
55
|
+
default-src 'self' 'unsafe-eval' 'unsafe-inline' *.forter.com *.nr-data.net
|
56
|
+
blob: *.pmnts-sandbox.io *.rollbar.com fatzebra.statuspage.io *.iovation.com
|
57
|
+
data: *.googleapis.com *.gstatic.com *.newrelic.com *.bootstrapcdn.com www.google.com
|
58
|
+
pay.google.com *.google-analytics.com *.gravatar.com; font-src 'self' cdnjs.cloudflare.com
|
59
|
+
data: *.gstatic.com *.bootstrapcdn.com *.aexp-static.com; form-action 'self'
|
60
|
+
*.cardinalcommerce.com; frame-ancestors 'self'; frame-src 'self' fatzebra.statuspage.io
|
61
|
+
*.americanexpress.com www.google.com pay.google.com *.masterpass.com *.visa.com
|
62
|
+
*.mastercard.com; img-src 'self' *.visa.com data: *.googleapis.com *.gstatic.com
|
63
|
+
masterpass.com *.masterpass.com *.americanexpress.com *.google-analytics.com
|
64
|
+
*.gravatar.com; script-src 'self' 'unsafe-eval' 'unsafe-inline' *.forter.com
|
65
|
+
*.nr-data.net *.pmnts-sandbox.io *.pmnts-staging.io *.rollbar.com fatzebra.statuspage.io
|
66
|
+
cdnjs.cloudflare.com *.iovation.com *.jquery.com *.newrelic.com *.googleapis.com
|
67
|
+
*.cardinalcommerce.com *.bootstrapcdn.com wasm-eval *.google-analytics.com
|
68
|
+
*.googletagmanager.com; script-src-attr 'unsafe-inline'; script-src-elem
|
69
|
+
'self' 'unsafe-inline' *.forter.com *.nr-data.net *.pmnts-sandbox.io *.rollbar.com
|
70
|
+
fatzebra.statuspage.io *.iovation.com *.jquery.com cdnjs.cloudflare.com *.pmnts-staging.io
|
71
|
+
*.aexp-static.com *.newrelic.com *.googleapis.com *.americanexpress.com www.google.com
|
72
|
+
pay.google.com *.visa.com *.masterpass.com *.mastercard.com *.google-analytics.com
|
73
|
+
*.gstatic.com *.bootstrapcdn.com; style-src 'self' 'unsafe-eval' 'unsafe-inline'
|
74
|
+
*.bootstrapcdn.com *.googleapis.com; style-src-attr 'unsafe-inline'; style-src-elem
|
75
|
+
'unsafe-inline' 'self' *.googleapis.com cdnjs.cloudflare.com *.bootstrapcdn.com;
|
76
|
+
worker-src blob:; report-uri https://fatzebra.report-uri.com/r/d/csp/wizard"
|
77
|
+
Nel:
|
78
|
+
- '{"report_to":"default","max_age":31536000,"include_subdomains":true}'
|
79
|
+
Report-To:
|
80
|
+
- '{"group":"default","max_age":31536000,"endpoints":[{"url":"https://fatzebra.report-uri.com/a/d/g"}],"include_subdomains":true}'
|
81
|
+
body:
|
82
|
+
encoding: UTF-8
|
83
|
+
string: '{"successful":true,"response":[{"domain":"example.com","status":"Active"},{"domain":"example2.com","status":"Active"}],"errors":[],"test":true}'
|
84
|
+
http_version:
|
85
|
+
recorded_at: Wed, 27 Mar 2024 05:15:56 GMT
|
86
|
+
recorded_with: VCR 3.0.3
|
@@ -2,6 +2,27 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe FatZebra::Utilities::ApplePay::Domain do
|
4
4
|
|
5
|
+
describe '.list', :vcr do
|
6
|
+
subject(:list) { FatZebra::Utilities::ApplePay::Domain.list }
|
7
|
+
|
8
|
+
it "fetches the merchant domains" do
|
9
|
+
expect(list).to be_accepted
|
10
|
+
expect(list.data.length).to eq(2)
|
11
|
+
expect(list.data.first.raw).to eq(
|
12
|
+
{
|
13
|
+
"domain" => "example.com",
|
14
|
+
"status" => "Active"
|
15
|
+
}
|
16
|
+
)
|
17
|
+
expect(list.data.last.raw).to eq(
|
18
|
+
{
|
19
|
+
"domain" => "example2.com",
|
20
|
+
"status" => "Active"
|
21
|
+
}
|
22
|
+
)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
5
26
|
describe '.register!', :vcr do
|
6
27
|
subject(:create) { FatZebra::Utilities::ApplePay::Domain.register!(domain, valid_payload) }
|
7
28
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fat_zebra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fat Zebra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|
@@ -333,6 +333,7 @@ files:
|
|
333
333
|
- spec/cassettes/FatZebra_Refund/_void/1_4_4.yml
|
334
334
|
- spec/cassettes/FatZebra_Utilities_ApplePay_Domain/_delete_/deletes_the_domain.yml
|
335
335
|
- spec/cassettes/FatZebra_Utilities_ApplePay_Domain/_find_/fetches_the_domain.yml
|
336
|
+
- spec/cassettes/FatZebra_Utilities_ApplePay_Domain/_list/fetches_the_merchant_domains.yml
|
336
337
|
- spec/cassettes/FatZebra_Utilities_ApplePay_Domain/_register_/creates_the_domain.yml
|
337
338
|
- spec/cassettes/FatZebra_WebHook/_create/1_1_1.yml
|
338
339
|
- spec/cassettes/FatZebra_WebHook/_create/1_1_2.yml
|
@@ -370,9 +371,11 @@ files:
|
|
370
371
|
- spec/spec_helper.rb
|
371
372
|
- spec/support/payloads.rb
|
372
373
|
- vendor/cacert.pem
|
373
|
-
homepage:
|
374
|
+
homepage: https://github.com/fatzebra/Ruby-Library
|
374
375
|
licenses: []
|
375
|
-
metadata:
|
376
|
+
metadata:
|
377
|
+
homepage_uri: https://github.com/fatzebra/Ruby-Library
|
378
|
+
source_code_uri: https://github.com/fatzebra/Ruby-Library
|
376
379
|
post_install_message:
|
377
380
|
rdoc_options: []
|
378
381
|
require_paths:
|