stripe 1.54.0 → 1.55.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +4 -0
- data/VERSION +1 -1
- data/lib/stripe.rb +1 -0
- data/lib/stripe/apple_pay_domain.rb +12 -0
- data/lib/stripe/util.rb +1 -0
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/apple_pay_domain_test.rb +34 -0
- data/test/test_data.rb +21 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acc0d005430ccecaa1ee91d83f1fa12878953539
|
4
|
+
data.tar.gz: 8e0a9f98e8931de91bda3da3f3bb6e506772c7e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ebb54c179ef98c86a461fcd98d354faf8ffaae89e94e910fc372f12f7657ba1213dca4d035e7448a8a5231ca5836ce8d94d59a220c7aeb71b9aa2199b6b4833
|
7
|
+
data.tar.gz: 8076a031bf92dd1daba197cd4f8a8557ae1c2a1d326f4d2b7541a24ce09e323091527c0b5fb60b45757e066c022a70ca38882c7dfc3203d41658fc5813863265
|
data/History.txt
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.55.0
|
data/lib/stripe.rb
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
module Stripe
|
2
|
+
# Domains registered for Apple Pay on the Web
|
3
|
+
class ApplePayDomain < APIResource
|
4
|
+
extend Stripe::APIOperations::Create
|
5
|
+
include Stripe::APIOperations::Delete
|
6
|
+
extend Stripe::APIOperations::List
|
7
|
+
|
8
|
+
def self.resource_url
|
9
|
+
'/v1/apple_pay/domains'
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
data/lib/stripe/util.rb
CHANGED
data/lib/stripe/version.rb
CHANGED
@@ -0,0 +1,34 @@
|
|
1
|
+
require File.expand_path('../../test_helper', __FILE__)
|
2
|
+
|
3
|
+
module Stripe
|
4
|
+
class ApplePayDomainTest < Test::Unit::TestCase
|
5
|
+
should "create should return a new Apple Pay domain" do
|
6
|
+
@mock.expects(:post).once
|
7
|
+
.with('https://api.stripe.com/v1/apple_pay/domains', nil, '')
|
8
|
+
.returns(make_response(make_apple_pay_domain))
|
9
|
+
d = Stripe::ApplePayDomain.create
|
10
|
+
assert_equal "apwc_test_domain", d.id
|
11
|
+
end
|
12
|
+
|
13
|
+
should "domains should be deletable" do
|
14
|
+
@mock.expects(:get).once
|
15
|
+
.with('https://api.stripe.com/v1/apple_pay/domains/apwc_test_domain', nil, nil)
|
16
|
+
.returns(make_response(make_apple_pay_domain))
|
17
|
+
@mock.expects(:delete).once.returns(make_response(make_apple_pay_domain(:deleted => true)))
|
18
|
+
domain = Stripe::ApplePayDomain.retrieve('apwc_test_domain')
|
19
|
+
domain.delete
|
20
|
+
assert domain.deleted
|
21
|
+
end
|
22
|
+
|
23
|
+
should "domains should be listable" do
|
24
|
+
@mock.expects(:get).once.with('https://api.stripe.com/v1/apple_pay/domains', nil, nil)
|
25
|
+
.returns(make_response(make_apple_pay_domain_array))
|
26
|
+
domains = Stripe::ApplePayDomain.list
|
27
|
+
assert domains.data.kind_of?(Array)
|
28
|
+
assert_equal 3, domains.data.length
|
29
|
+
domains.each do |domain|
|
30
|
+
assert domain.kind_of?(Stripe::ApplePayDomain)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/test/test_data.rb
CHANGED
@@ -848,5 +848,26 @@ module Stripe
|
|
848
848
|
:status => 'succeeded',
|
849
849
|
}.merge(params)
|
850
850
|
end
|
851
|
+
|
852
|
+
def make_apple_pay_domain(params={})
|
853
|
+
{
|
854
|
+
:id => "apwc_test_domain",
|
855
|
+
:object => "apple_pay_domain",
|
856
|
+
:domain_name => "test.com",
|
857
|
+
:livemode => false
|
858
|
+
}.merge(params)
|
859
|
+
end
|
860
|
+
|
861
|
+
def make_apple_pay_domain_array
|
862
|
+
{
|
863
|
+
:object => "list",
|
864
|
+
:resource_url => "/v1/apple_pay/domains",
|
865
|
+
:data => [
|
866
|
+
make_apple_pay_domain,
|
867
|
+
make_apple_pay_domain,
|
868
|
+
make_apple_pay_domain
|
869
|
+
]
|
870
|
+
}
|
871
|
+
end
|
851
872
|
end
|
852
873
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.55.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -58,6 +58,7 @@ files:
|
|
58
58
|
- lib/stripe/api_operations/request.rb
|
59
59
|
- lib/stripe/api_operations/save.rb
|
60
60
|
- lib/stripe/api_resource.rb
|
61
|
+
- lib/stripe/apple_pay_domain.rb
|
61
62
|
- lib/stripe/application_fee.rb
|
62
63
|
- lib/stripe/application_fee_refund.rb
|
63
64
|
- lib/stripe/balance.rb
|
@@ -105,6 +106,7 @@ files:
|
|
105
106
|
- test/stripe/alipay_account_test.rb
|
106
107
|
- test/stripe/api_operations_test.rb
|
107
108
|
- test/stripe/api_resource_test.rb
|
109
|
+
- test/stripe/apple_pay_domain_test.rb
|
108
110
|
- test/stripe/application_fee_refund_test.rb
|
109
111
|
- test/stripe/application_fee_test.rb
|
110
112
|
- test/stripe/balance_test.rb
|
@@ -170,6 +172,7 @@ test_files:
|
|
170
172
|
- test/stripe/alipay_account_test.rb
|
171
173
|
- test/stripe/api_operations_test.rb
|
172
174
|
- test/stripe/api_resource_test.rb
|
175
|
+
- test/stripe/apple_pay_domain_test.rb
|
173
176
|
- test/stripe/application_fee_refund_test.rb
|
174
177
|
- test/stripe/application_fee_test.rb
|
175
178
|
- test/stripe/balance_test.rb
|