forest_liana 5.4.1 → 5.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e6b91f8b65d70c711aa9f0f20e5efaf8ee6eddc7324b09629cab67ddbc7534b
4
- data.tar.gz: c21d927739263c46975a51e67bbbe51c00affcb82db53ea5895bd18f107dc864
3
+ metadata.gz: f0f16b6b5334c088bb009afb4442903784602d0f20ff854faf425a20d88721cf
4
+ data.tar.gz: 1a5152210b474568ca52428da05083a764c46c20054a45fa37c2441af4b9c9dd
5
5
  SHA512:
6
- metadata.gz: e160240b6a18c405861906143eb1fc121eb97317f0ee3a826ba07b7f93509a43ed906d03a91dccc978f3fa5432702b7d13d47afaa3e4109a46afb732bc3a4659
7
- data.tar.gz: 3470dbf5dab1b67904d00eb183f63b70a511f158427fcedc8d2b63aad6080ce38dda979859eb5f5a5fd28cfbb97b3e7e4c132c776bd4c5cb1efb34b4d60674e4
6
+ metadata.gz: de9f8be54aea5e876bf6a9bb84d6fa983be90f071ae7d354f5fa8bffc692d1214fca19a4619c20853e6e13637149aea33d1f17348e4a3961024b16a0faadcf90
7
+ data.tar.gz: 228e81af969e6d018589e6a285e3e5dfc860ada3a96a9df796a506c85258127bf9ac39de000c93e938cfc595dd19b72e495d7b7370fc32bd43a5e2a9b5465bdb
@@ -3,20 +3,20 @@ module ForestLiana
3
3
  include JSONAPI::Serializer
4
4
 
5
5
  attribute :amount_due
6
+ attribute :amount_paid
7
+ attribute :amount_remaining
8
+ attribute :application_fee_amount
6
9
  attribute :attempt_count
7
10
  attribute :attempted
8
- attribute :closed
9
11
  attribute :currency
10
- attribute :date
11
- attribute :forgiven
12
+ attribute :due_date
12
13
  attribute :paid
13
14
  attribute :period_end
14
15
  attribute :period_start
16
+ attribute :status
15
17
  attribute :subtotal
16
18
  attribute :total
17
- attribute :application_fee
18
19
  attribute :tax
19
- attribute :tax_percent
20
20
 
21
21
  has_one :customer
22
22
 
@@ -11,7 +11,7 @@ module ForestLiana
11
11
  query = {}
12
12
  @record = ::Stripe::Invoice.retrieve(@params[:invoice_id])
13
13
 
14
- @record.date = Time.at(@record.date).to_datetime
14
+ @record.due_date = Time.at(@record.due_date).to_datetime unless @record.due_date.nil?
15
15
  @record.period_start = Time.at(@record.period_start).to_datetime
16
16
  @record.period_end = Time.at(@record.period_end).to_datetime
17
17
  @record.subtotal /= 100.00
@@ -32,7 +32,7 @@ module ForestLiana
32
32
  end
33
33
 
34
34
  @records = @invoices.data.map do |d|
35
- d.date = Time.at(d.date).to_datetime
35
+ d.date = Time.at(d.created).to_datetime
36
36
  d.period_start = Time.at(d.period_start).to_datetime
37
37
  d.period_end = Time.at(d.period_end).to_datetime
38
38
  d.subtotal /= 100.00
@@ -12,7 +12,7 @@ module ForestLiana
12
12
  customer = resource[field]
13
13
 
14
14
  @record = ::Stripe::Customer
15
- .retrieve(customer)
15
+ .retrieve({ id: customer, expand: ['sources'] })
16
16
  .sources.retrieve(@params[:objectId])
17
17
 
18
18
  query = {}
@@ -32,7 +32,7 @@ module ForestLiana
32
32
 
33
33
  def fetch_bank_accounts(customer, params)
34
34
  begin
35
- @cards = ::Stripe::Customer.retrieve(customer).sources.list(params)
35
+ @cards = ::Stripe::Customer.retrieve({ id: customer, expand: ['sources'] }).sources.list(params)
36
36
  if @cards.blank?
37
37
  @records = []
38
38
  return
@@ -430,19 +430,19 @@ module ForestLiana
430
430
  fields: [
431
431
  { field: :id, type: 'String', is_filterable: false },
432
432
  { field: :amount_due, type: 'Number', is_filterable: false },
433
+ { field: :amount_paid, type: 'Number', is_filterable: false },
434
+ { field: :amount_remaining, type: 'Number', is_filterable: false },
435
+ { field: :application_fee_amount, type: 'Number', is_filterable: false },
433
436
  { field: :attempt_count, type: 'Number', is_filterable: false },
434
437
  { field: :attempted, type: 'Boolean', is_filterable: false },
435
- { field: :closed, type: 'Boolean', is_filterable: false },
436
438
  { field: :currency, type: 'String', is_filterable: false },
437
- { field: :date, type: 'Date', is_filterable: false },
438
- { field: :forgiven, type: 'Boolean', is_filterable: false },
439
+ { field: :due_date, type: 'Date', is_filterable: false },
439
440
  { field: :period_start, type: 'Date', is_filterable: false },
440
441
  { field: :period_end, type: 'Date', is_filterable: false },
442
+ { field: :status, type: 'String', enums: ['draft', 'open', 'paid', 'uncollectible', 'void'], is_filterable: false },
441
443
  { field: :subtotal, type: 'Number', is_filterable: false },
442
444
  { field: :total, type: 'Number', is_filterable: false },
443
- { field: :application_fee, type: 'Number', is_filterable: false },
444
445
  { field: :tax, type: 'Number', is_filterable: false },
445
- { field: :tax_percent, type: 'Number', is_filterable: false },
446
446
  {
447
447
  field: :customer,
448
448
  type: 'String',
@@ -1,3 +1,3 @@
1
1
  module ForestLiana
2
- VERSION = "5.4.1"
2
+ VERSION = "5.4.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_liana
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.1
4
+ version: 5.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Munda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-21 00:00:00.000000000 Z
11
+ date: 2021-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails