lago-ruby-client 1.3.0 → 1.6.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: db9100b72418369e5619896f01ef8075881047bdc18dcf664f1deaabff1febcb
4
- data.tar.gz: b96aa70520b76aa5fea75894e1e72e357c385eca7b0bdc526193d5bc998d59d5
3
+ metadata.gz: f973fe617bed4806811f92a62a21cfb3d695726f2d73e2a69ae1ee1dac2a9758
4
+ data.tar.gz: 596685fab05c14e0e2886987fd8180408812f3b4ca0bdea7c69f7b521b6d45db
5
5
  SHA512:
6
- metadata.gz: '08ffbe2eb2aec60f3f6c00d9af57d5340c39e0c88eee12dba5065b76d3a0636ab295ede1597a24fe9a013b57105855e15e729701e14def665c9ee2d570b52a9c'
7
- data.tar.gz: dea0ad70155fbec7437f8c1b7c8313cf5f0bacc6381cf0887a6d3e384610941e99a75bde27e62ddc1a8e0e43e5ebabf16239ed481d0ae90f797f7205c83ebcd0
6
+ metadata.gz: c76af0008afb6b25aa1c6bcd8f2a3d89287aa46d326954888d5d7d979da1e6f38458ce60204a00a933bc5c173a71881135ca4c148fd1795a7f2f8def434c7f7f
7
+ data.tar.gz: 81a9260248f2bf7ed4903cbdb05a324ba4f43753afa9378c41f27298a0644bbb5a6769987167af2263ac930154bdfaf972c68207898c57e4581d6dc35696df4c
@@ -78,6 +78,9 @@ module Lago
78
78
  result_hash[:billing_configuration] = config unless config.empty?
79
79
  end
80
80
 
81
+ integration_customers = whitelist_integration_customers(params[:integration_customers])
82
+ result_hash[:integration_customers] = integration_customers unless integration_customers.empty?
83
+
81
84
  metadata = whitelist_metadata(params[:metadata])
82
85
  result_hash[:metadata] = metadata unless metadata.empty?
83
86
 
@@ -97,6 +100,19 @@ module Lago
97
100
  )
98
101
  end
99
102
 
103
+ def whitelist_integration_customers(integration_customers)
104
+ processed_integration_customers = []
105
+
106
+ (integration_customers || []).each do |m|
107
+ result = (m || {})
108
+ .slice(:id, :external_customer_id, :integration_type, :integration_code, :subsidiary_id, :sync_with_provider)
109
+
110
+ processed_integration_customers << result unless result.empty?
111
+ end
112
+
113
+ processed_integration_customers
114
+ end
115
+
100
116
  def whitelist_metadata(metadata)
101
117
  processed_metadata = []
102
118
 
@@ -40,6 +40,9 @@ module Lago
40
40
  :threshold_credits,
41
41
  :trigger,
42
42
  :interval,
43
+ :method,
44
+ :started_at,
45
+ :target_ongoing_balance,
43
46
  )
44
47
 
45
48
  processed_rules << result unless result.empty?
data/lib/lago/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lago
4
- VERSION = '1.3.0'
4
+ VERSION = '1.6.0'
5
5
  end
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: 1.3.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lovro Colic
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-16 00:00:00.000000000 Z
11
+ date: 2024-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt