Class: LockstepSdk::VendorSummaryModel

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

Overview

Contains summarized data for a vendor

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ VendorSummaryModel

Initialize the VendorSummaryModel using the provided prototype



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

def initialize(params = {})
    @group_key = params.dig(:group_key)
    @vendor_id = params.dig(:vendor_id)
    @vendor_name = params.dig(:vendor_name)
    @app_enrollment_id = params.dig(:app_enrollment_id)
    @primary_contact_name = params.dig(:primary_contact_name)
    @primary_contact_id = params.dig(:primary_contact_id)
    @amount_paid_last30 = params.dig(:amount_paid_last30)
    @advance_pay_last30 = params.dig(:advance_pay_last30)
    @advance_pay_outstanding = params.dig(:advance_pay_outstanding)
    @amount_billed_last30 = params.dig(:amount_billed_last30)
    @amount_billed_outstanding_last30 = params.dig(:amount_billed_outstanding_last30)
    @amount_billed_outstanding = params.dig(:amount_billed_outstanding)
    @bill_count_last30 = params.dig(:bill_count_last30)
    @paid_bill_count_last30 = params.dig(:paid_bill_count_last30)
    @open_bill_count = params.dig(:open_bill_count)
    @paid_bill_count = params.dig(:paid_bill_count)
    @total_bill_count = params.dig(:total_bill_count)
end

Instance Attribute Details

#advance_pay_last30Double

Returns The outstanding advance pay balance on payments in the last 30 days.

Returns:

  • (Double)

    The outstanding advance pay balance on payments in the last 30 days



75
76
77
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 75

def advance_pay_last30
  @advance_pay_last30
end

#advance_pay_outstandingDouble

Returns The outstanding advance pay balance with this Vendor.

Returns:

  • (Double)

    The outstanding advance pay balance with this Vendor



79
80
81
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 79

def advance_pay_outstanding
  @advance_pay_outstanding
end

#amount_billed_last30Double

Returns The amount billed from this Vendor in the last 30 days.

Returns:

  • (Double)

    The amount billed from this Vendor in the last 30 days



83
84
85
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 83

def amount_billed_last30
  @amount_billed_last30
end

#amount_billed_outstandingDouble

Returns The outstanding balance with this Vendor.

Returns:

  • (Double)

    The outstanding balance with this Vendor



91
92
93
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 91

def amount_billed_outstanding
  @amount_billed_outstanding
end

#amount_billed_outstanding_last30Double

Returns The outstanding balance with this Vendor for bills in the last 30 days.

Returns:

  • (Double)

    The outstanding balance with this Vendor for bills in the last 30 days



87
88
89
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 87

def amount_billed_outstanding_last30
  @amount_billed_outstanding_last30
end

#amount_paid_last30Double

Returns The amount paid to this Vendor in the last 30 days.

Returns:

  • (Double)

    The amount paid to this Vendor in the last 30 days



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

def amount_paid_last30
  @amount_paid_last30
end

#app_enrollment_idUuid

Returns The app enrollment ID this Vendor is associated with.

Returns:

  • (Uuid)

    The app enrollment ID this Vendor is associated with



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

def app_enrollment_id
  @app_enrollment_id
end

#bill_count_last30Int32

Returns The number of bills received from this Vendor in the last 30 days.

Returns:

  • (Int32)

    The number of bills received from this Vendor in the last 30 days



95
96
97
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 95

def bill_count_last30
  @bill_count_last30
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).



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

def group_key
  @group_key
end

#open_bill_countInt32

Returns The number of open bills with this Vendor.

Returns:

  • (Int32)

    The number of open bills with this Vendor



103
104
105
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 103

def open_bill_count
  @open_bill_count
end

Returns The number of bills paid to this Vendor.

Returns:

  • (Int32)

    The number of bills paid to this Vendor



107
108
109
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 107

def paid_bill_count
  @paid_bill_count
end

Returns The number of bills from this Vendor that were paid in full in the last 30 days.

Returns:

  • (Int32)

    The number of bills from this Vendor that were paid in full in the last 30 days



99
100
101
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 99

def paid_bill_count_last30
  @paid_bill_count_last30
end

#primary_contact_idUuid

Returns This Vendor’s primary contact id.

Returns:

  • (Uuid)

    This Vendor’s primary contact id



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

def primary_contact_id
  @primary_contact_id
end

#primary_contact_nameString

Returns The name of this Vendor’s primary contact.

Returns:

  • (String)

    The name of this Vendor’s primary contact



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

def primary_contact_name
  @primary_contact_name
end

#total_bill_countInt32

Returns The total count of open and closed bills.

Returns:

  • (Int32)

    The total count of open and closed bills.



111
112
113
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 111

def total_bill_count
  @total_bill_count
end

#vendor_idUuid

Returns The unique ID of this Vendor.

Returns:

  • (Uuid)

    The unique ID of this Vendor



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

def vendor_id
  @vendor_id
end

#vendor_nameString

Returns The name of this Vendor.

Returns:

  • (String)

    The name of this Vendor



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

def vendor_name
  @vendor_name
end

Instance Method Details

#as_json(options = {}) ⇒ object

Returns This object as a JSON key-value structure.

Returns:

  • (object)

    This object as a JSON key-value structure



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 115

def as_json(options={})
    {
        'groupKey' => @group_key,
        'vendorId' => @vendor_id,
        'vendorName' => @vendor_name,
        'appEnrollmentId' => @app_enrollment_id,
        'primaryContactName' => @primary_contact_name,
        'primaryContactId' => @primary_contact_id,
        'amountPaidLast30' => @amount_paid_last30,
        'advancePayLast30' => @advance_pay_last30,
        'advancePayOutstanding' => @advance_pay_outstanding,
        'amountBilledLast30' => @amount_billed_last30,
        'amountBilledOutstandingLast30' => @amount_billed_outstanding_last30,
        'amountBilledOutstanding' => @amount_billed_outstanding,
        'billCountLast30' => @bill_count_last30,
        'paidBillCountLast30' => @paid_bill_count_last30,
        'openBillCount' => @open_bill_count,
        'paidBillCount' => @paid_bill_count,
        'totalBillCount' => @total_bill_count,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



139
140
141
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 139

def to_json(*options)
    "[#{as_json(*options).to_json(*options)}]"
end