lago-ruby-client 0.41.0.pre.beta → 0.42.1.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: 2d8ccee9b5d5b546c3f3767de3302d289f36fcc7b24b8bd675354a2bfcb11085
4
- data.tar.gz: d85d5769dd5066e09a5e843611f44bf715a94675fefb422411508e73879dccc1
3
+ metadata.gz: bd62cba382a7cdb1ba7c61099e0de059f26fecd5621fc51b012b1e437196d6a8
4
+ data.tar.gz: 639e49a75a091149046608b05e4a4f9b55500de738eb4f254dd9da58db12e2e2
5
5
  SHA512:
6
- metadata.gz: 0f44bf8202addef8f3388e0a76192d7a0f4e1bac6b0c59812ad7bf52be66207dc5f43a954cdff63d0447d45d417d0fa3da11e1e9fd998533a166722fa0d4d702
7
- data.tar.gz: 8f1704781da4667851ab36fd6f9f76602fbcacd9c54f62ee6b5388fb3d15c05e2d849c75f32f1e76efc32dbcd994d02888558d0e5ee8f6a7c45a7717616b24ec
6
+ metadata.gz: 4ea7d8657cabee11251e2398f2f17501a213c61fe103e964baa487e79ab322f8a627269f99f2bf324907d69c7012442ec98716625772268ab9e3c0f8530b27c6
7
+ data.tar.gz: 848b7dda992d5770ffeafabed2cc357c4828b7bb16f5a02eded413a24bd2b84d041eed98eadc0f804469725f3b2e7368b5ee0327d4fe8c6e41d0c6d16e1d0214
@@ -51,10 +51,6 @@ module Lago
51
51
  Lago::Api::Resources::AppliedAddOn.new(self)
52
52
  end
53
53
 
54
- def applied_taxes
55
- Lago::Api::Resources::AppliedTax.new(self)
56
- end
57
-
58
54
  def billable_metrics
59
55
  Lago::Api::Resources::BillableMetric.new(self)
60
56
  end
@@ -39,6 +39,7 @@ module Lago
39
39
  email: params[:email],
40
40
  legal_name: params[:legal_name],
41
41
  legal_number: params[:legal_number],
42
+ net_payment_term: params[:net_payment_term],
42
43
  tax_identification_number: params[:tax_identification_number],
43
44
  logo_url: params[:logo_url],
44
45
  name: params[:name],
@@ -47,6 +48,7 @@ module Lago
47
48
  url: params[:url],
48
49
  zipcode: params[:zipcode],
49
50
  currency: params[:currency],
51
+ tax_codes: params[:tax_codes],
50
52
  timezone: params[:timezone],
51
53
  }
52
54
 
@@ -68,6 +70,7 @@ module Lago
68
70
  :sync,
69
71
  :sync_with_provider,
70
72
  :document_locale,
73
+ :provider_payment_methods,
71
74
  )
72
75
  end
73
76
 
@@ -52,6 +52,7 @@ module Lago
52
52
  def whitelist_params(params)
53
53
  result = {
54
54
  payment_status: params[:payment_status],
55
+ net_payment_term: params[:net_payment_term],
55
56
  }
56
57
 
57
58
  metadata = whitelist_metadata(params[:metadata])
@@ -76,6 +77,7 @@ module Lago
76
77
  result = {
77
78
  external_customer_id: params[:external_customer_id],
78
79
  currency: params[:currency],
80
+ net_payment_term: params[:net_payment_term],
79
81
  }
80
82
 
81
83
  fees = whitelist_fees(params[:fees])
@@ -25,6 +25,7 @@ module Lago
25
25
  city: params[:city],
26
26
  legal_name: params[:legal_name],
27
27
  legal_number: params[:legal_number],
28
+ net_payment_term: params[:net_payment_term],
28
29
  tax_identification_number: params[:tax_identification_number],
29
30
  timezone: params[:timezone],
30
31
  email_settings: params[:email_settings],
@@ -23,6 +23,7 @@ module Lago
23
23
  trial_period: params[:trial_period],
24
24
  pay_in_advance: params[:pay_in_advance],
25
25
  bill_charges_monthly: params[:bill_charges_monthly],
26
+ tax_codes: params[:tax_codes],
26
27
  }.compact
27
28
 
28
29
  whitelist_charges(params[:charges]).tap do |charges|
@@ -45,6 +46,7 @@ module Lago
45
46
  :min_amount_cents,
46
47
  :properties,
47
48
  :group_properties,
49
+ :tax_codes,
48
50
  )
49
51
 
50
52
  processed_charges << 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 = '0.41.0-beta'
4
+ VERSION = '0.42.1-beta'
5
5
  end
@@ -15,7 +15,6 @@ require 'lago/api/resources/base'
15
15
  require 'lago/api/resources/add_on'
16
16
  require 'lago/api/resources/applied_add_on'
17
17
  require 'lago/api/resources/applied_coupon'
18
- require 'lago/api/resources/applied_tax'
19
18
  require 'lago/api/resources/billable_metric'
20
19
  require 'lago/api/resources/coupon'
21
20
  require 'lago/api/resources/credit_note'
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.41.0.pre.beta
4
+ version: 0.42.1.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-07-28 00:00:00.000000000 Z
11
+ date: 2023-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -136,7 +136,6 @@ files:
136
136
  - lib/lago/api/resources/add_on.rb
137
137
  - lib/lago/api/resources/applied_add_on.rb
138
138
  - lib/lago/api/resources/applied_coupon.rb
139
- - lib/lago/api/resources/applied_tax.rb
140
139
  - lib/lago/api/resources/base.rb
141
140
  - lib/lago/api/resources/billable_metric.rb
142
141
  - lib/lago/api/resources/coupon.rb
@@ -1,40 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Lago
4
- module Api
5
- module Resources
6
- class AppliedTax < Base
7
- def api_resource
8
- 'applied_tax'
9
- end
10
-
11
- def root_name
12
- 'applied_tax'
13
- end
14
-
15
- def create(external_customer_id, params)
16
- path = "/api/v1/customers/#{external_customer_id}/applied_taxes"
17
- payload = whitelist_params(params)
18
- response = connection.post(payload, path)[root_name]
19
-
20
- JSON.parse(response.to_json, object_class: OpenStruct)
21
- end
22
-
23
- def destroy(external_customer_id, tax_code)
24
- path = "/api/v1/customers/#{external_customer_id}/applied_taxes"
25
- response = connection.destroy(path, identifier: tax_code)[root_name]
26
-
27
- JSON.parse(response.to_json, object_class: OpenStruct)
28
- end
29
-
30
- def whitelist_params(params)
31
- {
32
- root_name => {
33
- tax_code: params[:tax_code],
34
- }.compact,
35
- }
36
- end
37
- end
38
- end
39
- end
40
- end