stripe 4.15.0 → 4.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/lib/stripe.rb +1 -0
- data/lib/stripe/tax_rate.rb +11 -0
- data/lib/stripe/util.rb +1 -0
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/tax_rate_test.rb +43 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0934383f23cd5a8cf8c5b7f3ff4250a6921aac0e318c0444fc882430a2421e42'
|
4
|
+
data.tar.gz: f9f84de78f36c63215df15859cdbb46fab395fd34548eabee1d47431f71c4017
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc3cc8d160145bfe10b7b36f1d9e7210f061d0778b637784c3efac214699332abfaf2411f35e05807fc4f4e433ae2354301fe0335581fa9793b9280b4ae01af7
|
7
|
+
data.tar.gz: 3983a67fb632d6388aea881a68999604a25ffeac73e55ebe88b477956d61ef43a85f9510c42926fc07dc9e7817e601d73cdc7760d155328d3340d815a23af5e5
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 4.16.0 - 2019-04-24
|
4
|
+
* [#760](https://github.com/stripe/stripe-ruby/pull/760) Add support for the `TaxRate` resource and APIs
|
5
|
+
|
3
6
|
## 4.15.0 - 2019-04-22
|
4
7
|
* [#762](https://github.com/stripe/stripe-ruby/pull/762) Add support for the `TaxId` resource and APIs
|
5
8
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.
|
1
|
+
4.16.0
|
data/lib/stripe.rb
CHANGED
@@ -98,6 +98,7 @@ require "stripe/subscription_item"
|
|
98
98
|
require "stripe/subscription_schedule"
|
99
99
|
require "stripe/subscription_schedule_revision"
|
100
100
|
require "stripe/tax_id"
|
101
|
+
require "stripe/tax_rate"
|
101
102
|
require "stripe/terminal/connection_token"
|
102
103
|
require "stripe/terminal/location"
|
103
104
|
require "stripe/terminal/reader"
|
data/lib/stripe/util.rb
CHANGED
@@ -108,6 +108,7 @@ module Stripe
|
|
108
108
|
SubscriptionSchedule::OBJECT_NAME => SubscriptionSchedule,
|
109
109
|
SubscriptionScheduleRevision::OBJECT_NAME => SubscriptionScheduleRevision,
|
110
110
|
TaxId::OBJECT_NAME => TaxId,
|
111
|
+
TaxRate::OBJECT_NAME => TaxRate,
|
111
112
|
Terminal::ConnectionToken::OBJECT_NAME => Terminal::ConnectionToken,
|
112
113
|
Terminal::Location::OBJECT_NAME => Terminal::Location,
|
113
114
|
Terminal::Reader::OBJECT_NAME => Terminal::Reader,
|
data/lib/stripe/version.rb
CHANGED
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require ::File.expand_path("../../test_helper", __FILE__)
|
4
|
+
|
5
|
+
module Stripe
|
6
|
+
class TaxRateTest < Test::Unit::TestCase
|
7
|
+
should "be listable" do
|
8
|
+
tax_rates = Stripe::TaxRate.list
|
9
|
+
assert_requested :get, "#{Stripe.api_base}/v1/tax_rates"
|
10
|
+
assert tax_rates.data.is_a?(Array)
|
11
|
+
assert tax_rates.first.is_a?(Stripe::TaxRate)
|
12
|
+
end
|
13
|
+
|
14
|
+
should "be retrievable" do
|
15
|
+
tax_rate = Stripe::TaxRate.retrieve("txr_123")
|
16
|
+
assert_requested :get, "#{Stripe.api_base}/v1/tax_rates/txr_123"
|
17
|
+
assert tax_rate.is_a?(Stripe::TaxRate)
|
18
|
+
end
|
19
|
+
|
20
|
+
should "be creatable" do
|
21
|
+
tax_rate = Stripe::TaxRate.create(
|
22
|
+
display_name: "name",
|
23
|
+
inclusive: false,
|
24
|
+
percentage: 10.15
|
25
|
+
)
|
26
|
+
assert_requested :post, "#{Stripe.api_base}/v1/tax_rates"
|
27
|
+
assert tax_rate.is_a?(Stripe::TaxRate)
|
28
|
+
end
|
29
|
+
|
30
|
+
should "be saveable" do
|
31
|
+
tax_rate = Stripe::TaxRate.retrieve("txr_123")
|
32
|
+
tax_rate.metadata["key"] = "value"
|
33
|
+
tax_rate.save
|
34
|
+
assert_requested :post, "#{Stripe.api_base}/v1/tax_rates/#{tax_rate.id}"
|
35
|
+
end
|
36
|
+
|
37
|
+
should "be updateable" do
|
38
|
+
tax_rate = Stripe::TaxRate.update("txr_123", metadata: { key: "value" })
|
39
|
+
assert_requested :post, "#{Stripe.api_base}/v1/tax_rates/txr_123"
|
40
|
+
assert tax_rate.is_a?(Stripe::TaxRate)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
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: 4.
|
4
|
+
version: 4.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -139,6 +139,7 @@ files:
|
|
139
139
|
- lib/stripe/subscription_schedule.rb
|
140
140
|
- lib/stripe/subscription_schedule_revision.rb
|
141
141
|
- lib/stripe/tax_id.rb
|
142
|
+
- lib/stripe/tax_rate.rb
|
142
143
|
- lib/stripe/terminal/connection_token.rb
|
143
144
|
- lib/stripe/terminal/location.rb
|
144
145
|
- lib/stripe/terminal/reader.rb
|
@@ -219,6 +220,7 @@ files:
|
|
219
220
|
- test/stripe/subscription_schedule_test.rb
|
220
221
|
- test/stripe/subscription_test.rb
|
221
222
|
- test/stripe/tax_id_test.rb
|
223
|
+
- test/stripe/tax_rate_test.rb
|
222
224
|
- test/stripe/terminal/connection_token_test.rb
|
223
225
|
- test/stripe/terminal/location_test.rb
|
224
226
|
- test/stripe/terminal/reader_test.rb
|
@@ -324,6 +326,7 @@ test_files:
|
|
324
326
|
- test/stripe/subscription_schedule_test.rb
|
325
327
|
- test/stripe/subscription_test.rb
|
326
328
|
- test/stripe/tax_id_test.rb
|
329
|
+
- test/stripe/tax_rate_test.rb
|
327
330
|
- test/stripe/terminal/connection_token_test.rb
|
328
331
|
- test/stripe/terminal/location_test.rb
|
329
332
|
- test/stripe/terminal/reader_test.rb
|