paddle 2.9 → 2.10
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +9 -9
- data/README.md +19 -5
- data/lib/paddle/classic/client.rb +1 -1
- data/lib/paddle/client.rb +1 -1
- data/lib/paddle/configuration.rb +2 -0
- data/lib/paddle/version.rb +1 -1
- data/paddle.gemspec +2 -2
- metadata +13 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3f3431e22b7e150074661673bb00d2f3517068bda4edb32fc934f3a564b50211
|
|
4
|
+
data.tar.gz: 3a05a630a0c24690ec4c9203115af40ca92bbb3cd1eb498e61507b13151659fa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e5f300962a282b491c414a50fd8b73698e504ad22e2873827102951f8b50a632d2524e497cc182773a04d69183b8974646664f71de27775cce9abd1a9693ddcc
|
|
7
|
+
data.tar.gz: 40b5fb6bc07be70da8f3d8b976155233d284f5627954571737818b1a929ad67976354ed02954cf0e3fb5a8d60cfb3b92dd0f81a4491402f822324eb1b82c619b
|
data/Gemfile.lock
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
paddle (2.
|
|
4
|
+
paddle (2.10)
|
|
5
5
|
cgi
|
|
6
|
-
faraday (
|
|
6
|
+
faraday (>= 2.14.2, < 3)
|
|
7
7
|
ostruct (~> 0.6.0)
|
|
8
8
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
activesupport (8.1.
|
|
12
|
+
activesupport (8.1.3)
|
|
13
13
|
base64
|
|
14
14
|
bigdecimal
|
|
15
15
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
@@ -24,21 +24,21 @@ GEM
|
|
|
24
24
|
uri (>= 0.13.1)
|
|
25
25
|
ast (2.4.3)
|
|
26
26
|
base64 (0.3.0)
|
|
27
|
-
bigdecimal (
|
|
27
|
+
bigdecimal (4.1.2)
|
|
28
28
|
cgi (0.5.1)
|
|
29
|
-
concurrent-ruby (1.3.
|
|
29
|
+
concurrent-ruby (1.3.6)
|
|
30
30
|
connection_pool (3.0.2)
|
|
31
31
|
dotenv (3.2.0)
|
|
32
32
|
drb (2.2.3)
|
|
33
|
-
faraday (2.14.
|
|
33
|
+
faraday (2.14.2)
|
|
34
34
|
faraday-net_http (>= 2.0, < 3.5)
|
|
35
35
|
json
|
|
36
36
|
logger
|
|
37
37
|
faraday-net_http (3.4.2)
|
|
38
38
|
net-http (~> 0.5)
|
|
39
|
-
i18n (1.14.
|
|
39
|
+
i18n (1.14.8)
|
|
40
40
|
concurrent-ruby (~> 1.0)
|
|
41
|
-
json (2.
|
|
41
|
+
json (2.19.7)
|
|
42
42
|
language_server-protocol (3.17.0.5)
|
|
43
43
|
lint_roller (1.1.0)
|
|
44
44
|
logger (1.7.0)
|
|
@@ -52,7 +52,7 @@ GEM
|
|
|
52
52
|
racc
|
|
53
53
|
prism (1.6.0)
|
|
54
54
|
racc (1.8.1)
|
|
55
|
-
rack (3.2.
|
|
55
|
+
rack (3.2.6)
|
|
56
56
|
rainbow (3.1.1)
|
|
57
57
|
rake (13.3.1)
|
|
58
58
|
regexp_parser (2.11.3)
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ The easiest and most complete Ruby library for the Paddle APIs, both Classic and
|
|
|
7
7
|
Add this line to your application's Gemfile:
|
|
8
8
|
|
|
9
9
|
```ruby
|
|
10
|
-
gem "paddle", "~> 2.
|
|
10
|
+
gem "paddle", "~> 2.10"
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Billing API
|
|
@@ -33,6 +33,21 @@ Paddle.configure do |config|
|
|
|
33
33
|
end
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
### Connection Options
|
|
37
|
+
|
|
38
|
+
You can pass [options](https://lostisland.github.io/faraday/#/customization/connection-options) to the underlying [Faraday](https://lostisland.github.io/faraday/) connection using `connection_options`. This is useful for setting timeouts, proxies, or SSL configuration:
|
|
39
|
+
|
|
40
|
+
```ruby
|
|
41
|
+
Paddle.configure do |config|
|
|
42
|
+
config.environment = :sandbox
|
|
43
|
+
config.api_key = ENV["PADDLE_API_KEY"]
|
|
44
|
+
|
|
45
|
+
config.connection_options = {
|
|
46
|
+
request: { timeout: 10, open_timeout: 5 }
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
```
|
|
50
|
+
|
|
36
51
|
### Resources
|
|
37
52
|
|
|
38
53
|
The gem maps as closely as we can to the Paddle API so you can easily convert API examples to gem code.
|
|
@@ -84,6 +99,7 @@ When API requests fail, the gem provides detailed error information to help you
|
|
|
84
99
|
#### Error Structure
|
|
85
100
|
|
|
86
101
|
All errors inherit from `Paddle::ErrorGenerator` and include:
|
|
102
|
+
|
|
87
103
|
- HTTP status code
|
|
88
104
|
- Error code from Paddle
|
|
89
105
|
- Detailed error message
|
|
@@ -432,7 +448,6 @@ Paddle::PortalSession.create customer: "ctm_abc123"
|
|
|
432
448
|
Paddle::PortalSession.create customer: "ctm_abc123", subscription_ids: ["sub_abc123"]
|
|
433
449
|
```
|
|
434
450
|
|
|
435
|
-
|
|
436
451
|
### Adjustments
|
|
437
452
|
|
|
438
453
|
```ruby
|
|
@@ -582,7 +597,7 @@ Paddle::Report.create(
|
|
|
582
597
|
|
|
583
598
|
### Webhook Simulation Types
|
|
584
599
|
|
|
585
|
-
Retrieves a list of Simulation Types - https://developer.paddle.com/api-reference/simulation-types/overview
|
|
600
|
+
Retrieves a list of Simulation Types - <https://developer.paddle.com/api-reference/simulation-types/overview>
|
|
586
601
|
|
|
587
602
|
```ruby
|
|
588
603
|
Paddle::SimulationType.list
|
|
@@ -647,7 +662,6 @@ Paddle::ClientToken.retrieve id: "ctkn_abc123"
|
|
|
647
662
|
Paddle::ClientToken.update id: "ctkn_abc123", status: "revoked"
|
|
648
663
|
```
|
|
649
664
|
|
|
650
|
-
|
|
651
665
|
## Classic API
|
|
652
666
|
|
|
653
667
|
For accessing the Paddle Classic API
|
|
@@ -705,7 +719,7 @@ or [here for sandbox](https://sandbox-vendors.paddle.com/authentication)
|
|
|
705
719
|
|
|
706
720
|
## Contributing
|
|
707
721
|
|
|
708
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/deanpcmad/paddle
|
|
722
|
+
Bug reports and pull requests are welcome on GitHub at <https://github.com/deanpcmad/paddle>.
|
|
709
723
|
|
|
710
724
|
## License
|
|
711
725
|
|
data/lib/paddle/client.rb
CHANGED
|
@@ -26,7 +26,7 @@ module Paddle
|
|
|
26
26
|
private
|
|
27
27
|
|
|
28
28
|
def create_connection
|
|
29
|
-
Faraday.new(Paddle.config.url) do |conn|
|
|
29
|
+
Faraday.new(Paddle.config.url, Paddle.config.connection_options) do |conn|
|
|
30
30
|
conn.request :authorization, :Bearer, Paddle.config.api_key
|
|
31
31
|
conn.headers = default_headers
|
|
32
32
|
conn.request :json
|
data/lib/paddle/configuration.rb
CHANGED
data/lib/paddle/version.rb
CHANGED
data/paddle.gemspec
CHANGED
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
|
|
11
11
|
spec.summary = "Ruby library for the Paddle Billing & Classic APIs"
|
|
12
12
|
spec.homepage = "https://github.com/deanpcmad/paddle"
|
|
13
|
-
spec.required_ruby_version = ">= 2.
|
|
13
|
+
spec.required_ruby_version = ">= 3.2.0"
|
|
14
14
|
|
|
15
15
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
16
16
|
spec.metadata["source_code_uri"] = "https://github.com/deanpcmad/paddle"
|
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
|
26
26
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
27
27
|
spec.require_paths = [ "lib" ]
|
|
28
28
|
|
|
29
|
-
spec.add_dependency "faraday", "
|
|
29
|
+
spec.add_dependency "faraday", ">= 2.14.2", "< 3"
|
|
30
30
|
spec.add_dependency "ostruct", "~> 0.6.0"
|
|
31
31
|
spec.add_dependency "cgi"
|
|
32
32
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: paddle
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '2.
|
|
4
|
+
version: '2.10'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dean Perry
|
|
@@ -13,16 +13,22 @@ dependencies:
|
|
|
13
13
|
name: faraday
|
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
|
15
15
|
requirements:
|
|
16
|
-
- - "
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: 2.14.2
|
|
19
|
+
- - "<"
|
|
17
20
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '
|
|
21
|
+
version: '3'
|
|
19
22
|
type: :runtime
|
|
20
23
|
prerelease: false
|
|
21
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
25
|
requirements:
|
|
23
|
-
- - "
|
|
26
|
+
- - ">="
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
version: 2.14.2
|
|
29
|
+
- - "<"
|
|
24
30
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: '
|
|
31
|
+
version: '3'
|
|
26
32
|
- !ruby/object:Gem::Dependency
|
|
27
33
|
name: ostruct
|
|
28
34
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -140,14 +146,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
140
146
|
requirements:
|
|
141
147
|
- - ">="
|
|
142
148
|
- !ruby/object:Gem::Version
|
|
143
|
-
version: 2.
|
|
149
|
+
version: 3.2.0
|
|
144
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
151
|
requirements:
|
|
146
152
|
- - ">="
|
|
147
153
|
- !ruby/object:Gem::Version
|
|
148
154
|
version: '0'
|
|
149
155
|
requirements: []
|
|
150
|
-
rubygems_version: 4.0.
|
|
156
|
+
rubygems_version: 4.0.10
|
|
151
157
|
specification_version: 4
|
|
152
158
|
summary: Ruby library for the Paddle Billing & Classic APIs
|
|
153
159
|
test_files: []
|