paddle 2.6.0 → 2.7.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: 607f60ab0594b5db91351073eeb83eec476bd3c2ddcf4cf52ff9815f83c13991
4
- data.tar.gz: e7b3ba70a236938302823fa40828229cbe60c6c1c88bcb1cee0b40a06c5a32c0
3
+ metadata.gz: d34df63b33ad8a971eabe70779c7ff47f025a8ab2ef5d96dcea24838c6835419
4
+ data.tar.gz: fc46cb72067fc2c22a9c8c011d3dc341329e36edaf089b80fce2e048ccba47d6
5
5
  SHA512:
6
- metadata.gz: ffcc395ce5bb7de1ba92ace950bbeab8abb537609df89ea1c635e574f7519a519549b85570cda7226b6db52a5a85d69d7ad59c8a51bed1c59e187cd12b72d485
7
- data.tar.gz: c5b224ba8bdbe5e60db6a28880ec1580c8c08cda5c230338f499a876e8792bf5862be6a75ae31b70fc93b4402508be98febbbef51c8e0117beeff5eaded62b37
6
+ metadata.gz: c02dfdef5f72c98767c66bbf841981a31edbc762febc19aa691230a19961d80565dfd40a61ef6b7e26c8d124f1a38c33bc48f94de789ae00b188eff10ea301fa
7
+ data.tar.gz: a045b9fb22b89645c8b3d3fb6ed4eb7bf3e33d6547b719d521ee977aef9de12bce773ac679c683f6b20a8f0320fb0e71c87f049992210774fca3b59aa85e0d04
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paddle (2.6.0)
5
- faraday (~> 2.11.0)
4
+ paddle (2.7.1)
5
+ faraday (~> 2.11)
6
6
  ostruct (~> 0.6.0)
7
7
 
8
8
  GEM
@@ -26,18 +26,19 @@ GEM
26
26
  connection_pool (2.4.1)
27
27
  dotenv (3.1.2)
28
28
  drb (2.2.1)
29
- faraday (2.11.0)
30
- faraday-net_http (>= 2.0, < 3.4)
29
+ faraday (2.12.2)
30
+ faraday-net_http (>= 2.0, < 3.5)
31
+ json
31
32
  logger
32
- faraday-net_http (3.3.0)
33
- net-http
33
+ faraday-net_http (3.4.0)
34
+ net-http (>= 0.5.0)
34
35
  i18n (1.14.5)
35
36
  concurrent-ruby (~> 1.0)
36
37
  json (2.7.2)
37
38
  language_server-protocol (3.17.0.3)
38
- logger (1.6.1)
39
+ logger (1.6.4)
39
40
  minitest (5.25.1)
40
- net-http (0.4.1)
41
+ net-http (0.6.0)
41
42
  uri
42
43
  ostruct (0.6.0)
43
44
  parallel (1.26.3)
@@ -82,7 +83,7 @@ GEM
82
83
  tzinfo (2.0.6)
83
84
  concurrent-ruby (~> 1.0)
84
85
  unicode-display_width (2.5.0)
85
- uri (0.13.1)
86
+ uri (1.0.2)
86
87
  vcr (6.3.1)
87
88
  base64
88
89
 
data/README.md CHANGED
@@ -336,6 +336,16 @@ Paddle::Subscription.cancel(id: "sub_abc123", effective_from: "immediately")
336
336
  Paddle::Subscription.activate(id: "sub_abc123")
337
337
  ```
338
338
 
339
+ ### Customer Portal Sessions
340
+
341
+ ```ruby
342
+ # Create a Customer Portal Session
343
+ # https://developer.paddle.com/api-reference/customer-portals/create-customer-portal-session
344
+ Paddle::PortalSession.create customer: "ctm_abc123"
345
+ Paddle::PortalSession.create customer: "ctm_abc123", subscription_ids: ["sub_abc123"]
346
+ ```
347
+
348
+
339
349
  ### Adjustments
340
350
 
341
351
  ```ruby
@@ -0,0 +1,10 @@
1
+ module Paddle
2
+ class PortalSession < Object
3
+ class << self
4
+ def create(customer:, **params)
5
+ response = Client.post_request("customers/#{customer}/portal-sessions", body: params)
6
+ PortalSession.new(response.body["data"])
7
+ end
8
+ end
9
+ end
10
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Paddle
4
- VERSION = "2.6.0"
4
+ VERSION = "2.7.1"
5
5
  end
data/lib/paddle.rb CHANGED
@@ -47,6 +47,7 @@ module Paddle
47
47
  autoload :Simulation, "paddle/models/simulation"
48
48
  autoload :SimulationRun, "paddle/models/simulation_run"
49
49
  autoload :SimulationRunEvent, "paddle/models/simulation_run_event"
50
+ autoload :PortalSession, "paddle/models/portal_session"
50
51
 
51
52
  autoload :NotificationLog, "paddle/models/notification_log"
52
53
  autoload :CreditBalance, "paddle/models/credit_balance"
data/paddle.gemspec CHANGED
@@ -26,6 +26,6 @@ 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", "~> 2.11.0"
29
+ spec.add_dependency "faraday", "~> 2.11"
30
30
  spec.add_dependency "ostruct", "~> 0.6.0"
31
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paddle
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dean Perry
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-18 00:00:00.000000000 Z
11
+ date: 2024-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.11.0
19
+ version: '2.11'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.11.0
26
+ version: '2.11'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ostruct
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -97,6 +97,7 @@ files:
97
97
  - lib/paddle/models/notification.rb
98
98
  - lib/paddle/models/notification_log.rb
99
99
  - lib/paddle/models/notification_setting.rb
100
+ - lib/paddle/models/portal_session.rb
100
101
  - lib/paddle/models/price.rb
101
102
  - lib/paddle/models/pricing_preview.rb
102
103
  - lib/paddle/models/product.rb
@@ -130,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
131
  - !ruby/object:Gem::Version
131
132
  version: '0'
132
133
  requirements: []
133
- rubygems_version: 3.5.11
134
+ rubygems_version: 3.5.22
134
135
  signing_key:
135
136
  specification_version: 4
136
137
  summary: Ruby library for the Paddle Billing & Classic APIs