lago-ruby-client 1.5.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: cb9e6df6b3150b01446371960b078261389491047139f2f122eb785a5b1c7628
4
- data.tar.gz: 8090827a83b5ff151aba6bf4861b83530b0985f9a7b7d6659ea10d5e53d104ec
3
+ metadata.gz: f973fe617bed4806811f92a62a21cfb3d695726f2d73e2a69ae1ee1dac2a9758
4
+ data.tar.gz: 596685fab05c14e0e2886987fd8180408812f3b4ca0bdea7c69f7b521b6d45db
5
5
  SHA512:
6
- metadata.gz: 7508a8145ae1026e8a6620ba6c921e4ff2e0e770cd97aa2267bf10e99d1d0153a9204c67827e94bd62b84fb673d9f1cfd32ef1c5041912a58d87d54ee82c0947
7
- data.tar.gz: 26910df98892fd533dc7e00cea69bd06be37972316a4477bae630ba0ae24198e478a13b4c1be6f4e19f11301e6d48b312f56f48824fbd668a61f3278dc12f9de
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
 
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.5.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.5.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-06-04 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