lago-ruby-client 0.41.0.pre.beta → 0.42.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: 2d8ccee9b5d5b546c3f3767de3302d289f36fcc7b24b8bd675354a2bfcb11085
4
- data.tar.gz: d85d5769dd5066e09a5e843611f44bf715a94675fefb422411508e73879dccc1
3
+ metadata.gz: 9c74ed77303be8ec35b3c733ba128cb238122a688df86246550a5395a1e59f0d
4
+ data.tar.gz: 23953066533a3d163692fe938f88358bacdd42fb1a67b0a9149c72d78fdc5ff5
5
5
  SHA512:
6
- metadata.gz: 0f44bf8202addef8f3388e0a76192d7a0f4e1bac6b0c59812ad7bf52be66207dc5f43a954cdff63d0447d45d417d0fa3da11e1e9fd998533a166722fa0d4d702
7
- data.tar.gz: 8f1704781da4667851ab36fd6f9f76602fbcacd9c54f62ee6b5388fb3d15c05e2d849c75f32f1e76efc32dbcd994d02888558d0e5ee8f6a7c45a7717616b24ec
6
+ metadata.gz: 8a2e897c9b87db9666e4572dc459758ff4dc844c8a1835468b1a126841726f652eb67e6a4d8fc6229375c4b49b7d059bbc05c4e9e74afc200130bab6b39946af
7
+ data.tar.gz: 3ec3a01afa6a4cd97945974923f8d4b8bdf6f8bdd878c696c615d7bace7b42d9f98b878895ae6947c40ec6bb06b198053571a7aaaed4864ea1eed715f4edf5d5
@@ -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
@@ -47,6 +47,7 @@ module Lago
47
47
  url: params[:url],
48
48
  zipcode: params[:zipcode],
49
49
  currency: params[:currency],
50
+ tax_codes: params[:tax_codes],
50
51
  timezone: params[:timezone],
51
52
  }
52
53
 
@@ -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.0-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.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-07-28 00:00:00.000000000 Z
11
+ date: 2023-08-07 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