paddle 2.6.0 → 2.7.0

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: 30077dce563178db3e9407b4ef168bb1a24aabb324370a00ea37730eb926dbe6
4
+ data.tar.gz: 5ae2b0845d75b6fdcc001aadcf204c879d7596c13ab544f34d42192d5984cb04
5
5
  SHA512:
6
- metadata.gz: ffcc395ce5bb7de1ba92ace950bbeab8abb537609df89ea1c635e574f7519a519549b85570cda7226b6db52a5a85d69d7ad59c8a51bed1c59e187cd12b72d485
7
- data.tar.gz: c5b224ba8bdbe5e60db6a28880ec1580c8c08cda5c230338f499a876e8792bf5862be6a75ae31b70fc93b4402508be98febbbef51c8e0117beeff5eaded62b37
6
+ metadata.gz: 2f4ed6ef5a1be40bb0c447c22b6ebe27f8527c9b69f0d7ca2ea6f17fd52470d8581f6b6039d7f245a66a936219bce1e4b97a97556042da95c9d2d57930169fdf
7
+ data.tar.gz: 8eafdbd49ed16fe04f0f815e99889578f0e6045115ede50c3b17aaf21203110a5f9349b8e8aeeced3e4b8145e443ca481bf6c11c810e9e055bab771ed1c58e10
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paddle (2.6.0)
4
+ paddle (2.7.0)
5
5
  faraday (~> 2.11.0)
6
6
  ostruct (~> 0.6.0)
7
7
 
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.0"
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"
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.0
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-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -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.16
134
135
  signing_key:
135
136
  specification_version: 4
136
137
  summary: Ruby library for the Paddle Billing & Classic APIs