lago-ruby-client 0.44.0.pre.beta → 0.48.0.pre.beta

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: 95a1a07bc5000d5bffdbdbd334f10195e5f53886b679c40493e3b7e720c3fe99
4
- data.tar.gz: 2f31b2fa61b3a30ecccb913d45cfd84f1704d1421985d24231273f8fa4c10b11
3
+ metadata.gz: b827eefb8b303238ec2a42e5cc5d485530d63671c3afe9e6af5c6a5aabb45859
4
+ data.tar.gz: 8aca6b61ce1ae31df5df9146ccf6a5ecf5397e2be62da93bc45ca1f6b84bf45b
5
5
  SHA512:
6
- metadata.gz: 2ace09b589e8e0c09b7c9502fbaa760274a709e4ddf05971029c48a38f109fc3aa9e60c7126b50a699653db3279c7467f97b3ac50e0b5e8d1454003132400e20
7
- data.tar.gz: 72e6fde0bea4a15599c6c619a0f2ea793228dabc58d150c5c4b2fe374d3890f5620471966bbb9ee23795f0f4575368071f411c62fb030181906ce9738e468185
6
+ metadata.gz: 5f7a685eb3ebe1c763e394afc74e254fe4a8af9a9c7d043a887d4556a22b27bd655ecd5e3c443441805744aa461d3382ab1caaa5887d3d0ed03a1f5d96b93b80
7
+ data.tar.gz: e7622705cca16d224615da1b3665d85dfb614e9c6742d21d657bdc3ff8cc9aa4bccaf64f544a34b1926e1d1bf6dbdbf58b90cc8d0f2dc205ffe3dde0e4d5673a
@@ -47,10 +47,6 @@ module Lago
47
47
  Lago::Api::Resources::AppliedCoupon.new(self)
48
48
  end
49
49
 
50
- def applied_add_ons
51
- Lago::Api::Resources::AppliedAddOn.new(self)
52
- end
53
-
54
50
  def billable_metrics
55
51
  Lago::Api::Resources::BillableMetric.new(self)
56
52
  end
@@ -20,6 +20,7 @@ module Lago
20
20
  description: params[:description],
21
21
  recurring: params[:recurring],
22
22
  aggregation_type: params[:aggregation_type],
23
+ weighted_interval: params[:weighted_interval],
23
24
  field_name: params[:field_name],
24
25
  group: params[:group],
25
26
  }.compact,
@@ -26,6 +26,7 @@ module Lago
26
26
  frequency_duration: params[:frequency_duration],
27
27
  expiration: params[:expiration],
28
28
  expiration_at: params[:expiration_at],
29
+ terminated_at: params[:terminated_at],
29
30
  }.compact
30
31
 
31
32
  whitelist_limitations(params[:applies_to]).tap do |limitations|
@@ -36,7 +36,7 @@ module Lago
36
36
  def whitelist_charges(charges)
37
37
  processed_charges = []
38
38
 
39
- charges.each do |c|
39
+ charges&.each do |c|
40
40
  result = (c || {}).slice(
41
41
  :id,
42
42
  :billable_metric_id,
@@ -21,6 +21,7 @@ module Lago
21
21
  external_id: params[:external_id],
22
22
  billing_time: params[:billing_time],
23
23
  subscription_at: params[:subscription_at],
24
+ ending_at: params[:ending_at],
24
25
  subscription_date: params[:subscription_date], # Deprecated
25
26
  }.compact
26
27
  }
data/lib/lago/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lago
4
- VERSION = '0.44.0-beta'
4
+ VERSION = '0.48.0-beta'
5
5
  end
@@ -13,7 +13,6 @@ require 'lago/api/http_error'
13
13
 
14
14
  require 'lago/api/resources/base'
15
15
  require 'lago/api/resources/add_on'
16
- require 'lago/api/resources/applied_add_on'
17
16
  require 'lago/api/resources/applied_coupon'
18
17
  require 'lago/api/resources/billable_metric'
19
18
  require 'lago/api/resources/coupon'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lago-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.44.0.pre.beta
4
+ version: 0.48.0.pre.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lovro Colic
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-14 00:00:00.000000000 Z
11
+ date: 2023-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -134,7 +134,6 @@ files:
134
134
  - lib/lago/api/connection.rb
135
135
  - lib/lago/api/http_error.rb
136
136
  - lib/lago/api/resources/add_on.rb
137
- - lib/lago/api/resources/applied_add_on.rb
138
137
  - lib/lago/api/resources/applied_coupon.rb
139
138
  - lib/lago/api/resources/base.rb
140
139
  - lib/lago/api/resources/billable_metric.rb
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Lago
4
- module Api
5
- module Resources
6
- class AppliedAddOn < Base
7
- def api_resource
8
- 'applied_add_ons'
9
- end
10
-
11
- def root_name
12
- 'applied_add_on'
13
- end
14
-
15
- def whitelist_params(params)
16
- {
17
- root_name => {
18
- external_customer_id: params[:external_customer_id],
19
- add_on_code: params[:add_on_code],
20
- amount_cents: params[:amount_cents],
21
- amount_currency: params[:amount_currency]
22
- }.compact
23
- }
24
- end
25
- end
26
- end
27
- end
28
- end