Class: LockstepSdk::CustomerSummaryModel

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/models/customer_summary_model.rb

Overview

Contains summarized data for a customer

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ CustomerSummaryModel

Initialize the CustomerSummaryModel using the provided prototype



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/lockstep_sdk/models/customer_summary_model.rb', line 24

def initialize(params = {})
    @group_key = params.dig(:group_key)
    @company_id = params.dig(:company_id)
    @company_name = params.dig(:company_name)
    @primary_contact = params.dig(:primary_contact)
    @outstanding_invoices = params.dig(:outstanding_invoices)
    @total_invoices_open = params.dig(:total_invoices_open)
    @total_invoices_past_due = params.dig(:total_invoices_past_due)
    @closed_invoices = params.dig(:closed_invoices)
    @amount_collected = params.dig(:amount_collected)
    @outstanding_amount = params.dig(:outstanding_amount)
    @amount_past_due = params.dig(:amount_past_due)
    @unapplied_payments = params.dig(:unapplied_payments)
    @percent_of_total_ar = params.dig(:percent_of_total_ar)
    @dso = params.dig(:dso)
    @newest_activity = params.dig(:newest_activity)
end

Instance Attribute Details

#amount_collectedDouble

Returns The total from collected payments.

Returns:

  • (Double)

    The total from collected payments.



59
60
61
# File 'lib/lockstep_sdk/models/customer_summary_model.rb', line 59

def amount_collected
  @amount_collected
end

#amount_past_dueDouble

Returns The total amount past due for this customer.

Returns:

  • (Double)

    The total amount past due for this customer.



63
64
65
# File 'lib/lockstep_sdk/models/customer_summary_model.rb', line 63

def amount_past_due
  @amount_past_due
end

#closed_invoicesInt32

Returns The number of closed invoices for this customer.

Returns:

  • (Int32)

    The number of closed invoices for this customer.



57
58
59
# File 'lib/lockstep_sdk/models/customer_summary_model.rb', line 57

def closed_invoices
  @closed_invoices
end

#company_idUuid

Returns The unique ID of this company.

Returns:

  • (Uuid)

    The unique ID of this company.



45
46
47
# File 'lib/lockstep_sdk/models/customer_summary_model.rb', line 45

def company_id
  @company_id
end

#company_nameString

Returns The name of the company.

Returns:

  • (String)

    The name of the company.



47
48
49
# File 'lib/lockstep_sdk/models/customer_summary_model.rb', line 47

def company_name
  @company_name
end

#dsoDouble

Returns Daily sales outstanding value for this Customer.

Returns:

  • (Double)

    Daily sales outstanding value for this Customer.



69
70
71
# File 'lib/lockstep_sdk/models/customer_summary_model.rb', line 69

def dso
  @dso
end

#group_keyUuid

Returns The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).

Returns:

  • (Uuid)

    The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).



43
44
45
# File 'lib/lockstep_sdk/models/customer_summary_model.rb', line 43

def group_key
  @group_key
end

#newest_activityDate

Returns The date stamp for the newest Activity on this Customer.

Returns:

  • (Date)

    The date stamp for the newest Activity on this Customer.



71
72
73
# File 'lib/lockstep_sdk/models/customer_summary_model.rb', line 71

def newest_activity
  @newest_activity
end

#outstanding_amountDouble

Returns The total balance of outstanding invoices.

Returns:

  • (Double)

    The total balance of outstanding invoices.



61
62
63
# File 'lib/lockstep_sdk/models/customer_summary_model.rb', line 61

def outstanding_amount
  @outstanding_amount
end

#outstanding_invoicesInt32

Returns The number of outstanding invoices for this customer.

Returns:

  • (Int32)

    The number of outstanding invoices for this customer.



51
52
53
# File 'lib/lockstep_sdk/models/customer_summary_model.rb', line 51

def outstanding_invoices
  @outstanding_invoices
end

#percent_of_total_arDouble

Returns Portion of Total AR for this Customer that is Past due. (TotalPastDue / Total AR).

Returns:

  • (Double)

    Portion of Total AR for this Customer that is Past due. (TotalPastDue / Total AR).



67
68
69
# File 'lib/lockstep_sdk/models/customer_summary_model.rb', line 67

def percent_of_total_ar
  @percent_of_total_ar
end

#primary_contactString

Returns The name of the primary contact.

Returns:

  • (String)

    The name of the primary contact.



49
50
51
# File 'lib/lockstep_sdk/models/customer_summary_model.rb', line 49

def primary_contact
  @primary_contact
end

#total_invoices_openInt32

Returns The number of open invoices.

Returns:

  • (Int32)

    The number of open invoices.



53
54
55
# File 'lib/lockstep_sdk/models/customer_summary_model.rb', line 53

def total_invoices_open
  @total_invoices_open
end

#total_invoices_past_dueInt32

Returns The number of past due invoices.

Returns:

  • (Int32)

    The number of past due invoices.



55
56
57
# File 'lib/lockstep_sdk/models/customer_summary_model.rb', line 55

def total_invoices_past_due
  @total_invoices_past_due
end

#unapplied_paymentsDouble

Returns The total value of unapplied Payments for this Customer.

Returns:

  • (Double)

    The total value of unapplied Payments for this Customer.



65
66
67
# File 'lib/lockstep_sdk/models/customer_summary_model.rb', line 65

def unapplied_payments
  @unapplied_payments
end