billingrails 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a5b67a14d5de893e9a3ee00b839d59c99661274987a60d80daf906962ad45a6
4
- data.tar.gz: 698cd398f19a126ba47bc1f045d36baf17d8e60968c4cbd6c0cdd35f82605115
3
+ metadata.gz: 4f0eda2df91ec2654e98f944817eb5325bf9c597685c27f7f20f56433075f454
4
+ data.tar.gz: e2d82ca82c7ec47bd6118fa35d74725b36ea5cc431e4c1a948fa2621edd46b2b
5
5
  SHA512:
6
- metadata.gz: d60ec418d12ada5c355e3fc1e5a121f38458ab9ba5ca727cfb333a215f6e5b98267c7fdc53eb9180fb71cfee600411611349b4975108c1c47e2cd2692ea0ebf9
7
- data.tar.gz: 5ec2da2339853212f4ca5ffc504fe6b7d3861344a196cb79ebc682da86ca3a2c4cf5342da3797b6f9874bcc30a900d0fa110485cfaaff690fa1704352f06b326
6
+ metadata.gz: 77ac91beb1982d7f043deb7a483f34e2ee8b6eccb0e8323d42c84615fba60c683e7b285877da18be3c720d159f4d9abf15116ff7034f049aef40a6d21b660b66
7
+ data.tar.gz: 1284de3a16a9ff9b09f135fe0569846dbe3431efa4f556132eb73c1b003ca34c5ae643ddd1c1b1f0efbda5262acb2e4eadbaf66af4b21c0cf471825521b83e26
@@ -37,7 +37,7 @@ module Billingrails
37
37
  @products = Resources::Products.new(self)
38
38
  @fees = Resources::Fees.new(self)
39
39
  @prices = Resources::Prices.new(self)
40
- @offerings = Resources::Offerings.new(self)
40
+ @plans = Resources::Plans.new(self)
41
41
  @events = Resources::Events.new(self)
42
42
  @meters = Resources::Meters.new(self)
43
43
 
@@ -69,7 +69,7 @@ module Billingrails
69
69
 
70
70
  # Archive a fee
71
71
  #
72
- # Archives a fee, making it inactive for new subscriptions.
72
+ # Archives a fee.
73
73
  #
74
74
  # @param id [String] Resource ID
75
75
  # @return [Hash] Response data
@@ -80,7 +80,7 @@ module Billingrails
80
80
 
81
81
  # Unarchive a fee
82
82
  #
83
- # Restores an archived fee to active status.
83
+ # Restores an archived fee.
84
84
  #
85
85
  # @param id [String] Resource ID
86
86
  # @return [Hash] Response data
@@ -4,100 +4,100 @@
4
4
 
5
5
  module Billingrails
6
6
  module Resources
7
- # Offerings resource
8
- class Offerings
7
+ # Plans resource
8
+ class Plans
9
9
  # @param client [Client] The API client
10
10
  def initialize(client)
11
11
  @client = client
12
12
  end
13
13
 
14
- # List offerings
14
+ # List plans
15
15
  #
16
- # Retrieves a list of offerings.
16
+ # Retrieves a list of plans.
17
17
  #
18
18
  # @param params [Hash, nil] Query parameters
19
19
  # @return [Hash] Response data
20
20
  def list(params: nil)
21
- path = "/offerings"
21
+ path = "/plans"
22
22
  @client.request(:get, path, params: params)
23
23
  end
24
24
 
25
- # Create an offering
25
+ # Create a plan
26
26
  #
27
- # Creates an offering with optional items (products/fees and prices).
27
+ # Creates a plan.
28
28
  #
29
29
  # @param data [Hash] Request body
30
30
  # @return [Hash] Response data
31
31
  def create(data)
32
- path = "/offerings"
32
+ path = "/plans"
33
33
  @client.request(:post, path, body: data)
34
34
  end
35
35
 
36
- # Retrieve an offering
36
+ # Retrieve a plan
37
37
  #
38
- # Retrieves an offering by ID.
38
+ # Retrieves a plan by ID.
39
39
  #
40
40
  # @param id [String] Resource ID
41
41
  # @param params [Hash, nil] Query parameters
42
42
  # @return [Hash] Response data
43
43
  def retrieve(id, params: nil)
44
- path = "/offerings/#{id}"
44
+ path = "/plans/#{id}"
45
45
  @client.request(:get, path, params: params)
46
46
  end
47
47
 
48
- # Update an offering
48
+ # Update a plan
49
49
  #
50
- # Updates an offering (name, description, trial_period_days, items). Fails if the offering is used by any subscription.
50
+ # Updates a plan.
51
51
  #
52
52
  # @param id [String] Resource ID
53
53
  # @param data [Hash] Request body
54
54
  # @return [Hash] Response data
55
55
  def update(id, data)
56
- path = "/offerings/#{id}"
56
+ path = "/plans/#{id}"
57
57
  @client.request(:put, path, body: data)
58
58
  end
59
59
 
60
- # Delete an offering
60
+ # Delete a plan
61
61
  #
62
- # Soft-deletes an offering. Fails if the offering is used by any subscription.
62
+ # Deletes a plan.
63
63
  #
64
64
  # @param id [String] Resource ID
65
65
  # @return [Hash] Response data
66
66
  def delete(id)
67
- path = "/offerings/#{id}"
67
+ path = "/plans/#{id}"
68
68
  @client.request(:delete, path)
69
69
  end
70
70
 
71
- # Archive an offering
71
+ # Archive a plan
72
72
  #
73
- # Archives an offering. Fails if the offering is used by any subscription.
73
+ # Archives a plan.
74
74
  #
75
75
  # @param id [String] Resource ID
76
76
  # @return [Hash] Response data
77
77
  def archive(id)
78
- path = "/offerings/#{id}/archive"
78
+ path = "/plans/#{id}/archive"
79
79
  @client.request(:post, path)
80
80
  end
81
81
 
82
- # Unarchive an offering
82
+ # Unarchive a plan
83
83
  #
84
- # Restores an archived offering to active status.
84
+ # Restores an archived plan.
85
85
  #
86
86
  # @param id [String] Resource ID
87
87
  # @return [Hash] Response data
88
88
  def unarchive(id)
89
- path = "/offerings/#{id}/unarchive"
89
+ path = "/plans/#{id}/unarchive"
90
90
  @client.request(:post, path)
91
91
  end
92
92
 
93
- # Duplicate an offering
93
+ # Duplicate a plan
94
94
  #
95
- # Creates a new offering with the same attributes and items. The new offering's origin_id is set to the source offering.
95
+ # Creates a new plan with the same attributes and items. The new plan's origin_id is set to the source plan.
96
96
  #
97
97
  # @param id [String] Resource ID
98
98
  # @return [Hash] Response data
99
99
  def duplicate(id)
100
- path = "/offerings/#{id}/duplicate"
100
+ path = "/plans/#{id}/duplicate"
101
101
  @client.request(:post, path)
102
102
  end
103
103
 
@@ -59,7 +59,7 @@ module Billingrails
59
59
 
60
60
  # Archive a price
61
61
  #
62
- # Archives a price, making it inactive for new subscriptions.
62
+ # Archives a price.
63
63
  #
64
64
  # @param id [String] Resource ID
65
65
  # @return [Hash] Response data
@@ -70,7 +70,7 @@ module Billingrails
70
70
 
71
71
  # Unarchive a price
72
72
  #
73
- # Restores an archived price to active status.
73
+ # Restores an archived price.
74
74
  #
75
75
  # @param id [String] Resource ID
76
76
  # @return [Hash] Response data
@@ -59,7 +59,7 @@ module Billingrails
59
59
 
60
60
  # Archive a product
61
61
  #
62
- # Archives a product, making it inactive for new subscriptions.
62
+ # Archives a product.
63
63
  #
64
64
  # @param id [String] Resource ID
65
65
  # @return [Hash] Response data
@@ -70,7 +70,7 @@ module Billingrails
70
70
 
71
71
  # Unarchive a product
72
72
  #
73
- # Restores an archived product to active status.
73
+ # Restores an archived product.
74
74
  #
75
75
  # @param id [String] Resource ID
76
76
  # @return [Hash] Response data
@@ -70,7 +70,7 @@ module Billingrails
70
70
 
71
71
  # Archive a tax rate
72
72
  #
73
- # Archives a tax rate. Sets status to archived.
73
+ # Archives a tax rate.
74
74
  #
75
75
  # @param id [String] Resource ID
76
76
  # @return [Hash] Response data
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Billingrails
4
- VERSION = '0.1.5'
4
+ VERSION = '0.1.6'
5
5
  end
data/lib/billingrails.rb CHANGED
@@ -10,7 +10,7 @@ require_relative 'billingrails/resources/accounts'
10
10
  require_relative 'billingrails/resources/checkout_sessions'
11
11
  require_relative 'billingrails/resources/events'
12
12
  require_relative 'billingrails/resources/fees'
13
- require_relative 'billingrails/resources/offerings'
13
+ require_relative 'billingrails/resources/plans'
14
14
  require_relative 'billingrails/resources/meters'
15
15
  require_relative 'billingrails/resources/products'
16
16
  require_relative 'billingrails/resources/subscriptions'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: billingrails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Billingrails
@@ -87,9 +87,9 @@ files:
87
87
  - lib/billingrails/resources/fees.rb
88
88
  - lib/billingrails/resources/invoices.rb
89
89
  - lib/billingrails/resources/meters.rb
90
- - lib/billingrails/resources/offerings.rb
91
90
  - lib/billingrails/resources/payment_links.rb
92
91
  - lib/billingrails/resources/payments.rb
92
+ - lib/billingrails/resources/plans.rb
93
93
  - lib/billingrails/resources/prices.rb
94
94
  - lib/billingrails/resources/products.rb
95
95
  - lib/billingrails/resources/subscriptions.rb