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
44
45
46
47
48
49
50
51
# 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)
    @amount_paid_past_thirty_days = params.dig(:amount_paid_past_thirty_days)
    @advance_pay_last30 = params.dig(:advance_pay_last30)
    @advance_pay_past_thirty_days = params.dig(:advance_pay_past_thirty_days)
    @advance_pay_outstanding = params.dig(:advance_pay_outstanding)
    @amount_billed_last30 = params.dig(:amount_billed_last30)
    @amount_billed_past_thirty_days = params.dig(:amount_billed_past_thirty_days)
    @amount_billed_outstanding_last30 = params.dig(:amount_billed_outstanding_last30)
    @amount_billed_outstanding_past_thirty_days = params.dig(:amount_billed_outstanding_past_thirty_days)
    @amount_billed_outstanding = params.dig(:amount_billed_outstanding)
    @bill_count_last30 = params.dig(:bill_count_last30)
    @bill_count_past_thirty_days = params.dig(:bill_count_past_thirty_days)
    @paid_bill_count_last30 = params.dig(:paid_bill_count_last30)
    @paid_bill_count_past_thirty_days = params.dig(:paid_bill_count_past_thirty_days)
    @open_bill_count = params.dig(:open_bill_count)
    @paid_bill_count = params.dig(:paid_bill_count)
    @total_bill_count = params.dig(:total_bill_count)
    @dpo = params.dig(:dpo)
    @modified = params.dig(:modified)
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



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

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



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

def advance_pay_outstanding
  @advance_pay_outstanding
end

#advance_pay_past_thirty_daysDouble

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



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

def advance_pay_past_thirty_days
  @advance_pay_past_thirty_days
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



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

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



115
116
117
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 115

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



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

def amount_billed_outstanding_last30
  @amount_billed_outstanding_last30
end

#amount_billed_outstanding_past_thirty_daysDouble

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



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

def amount_billed_outstanding_past_thirty_days
  @amount_billed_outstanding_past_thirty_days
end

#amount_billed_past_thirty_daysDouble

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



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

def amount_billed_past_thirty_days
  @amount_billed_past_thirty_days
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



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

def amount_paid_last30
  @amount_paid_last30
end

#amount_paid_past_thirty_daysDouble

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



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

def amount_paid_past_thirty_days
  @amount_paid_past_thirty_days
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



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

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



119
120
121
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 119

def bill_count_last30
  @bill_count_last30
end

#bill_count_past_thirty_daysInt32

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



123
124
125
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 123

def bill_count_past_thirty_days
  @bill_count_past_thirty_days
end

#dpoDouble

Returns The days payabale outstanding.

Returns:

  • (Double)

    The days payabale outstanding.



147
148
149
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 147

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



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

def group_key
  @group_key
end

#modifiedDate-time

Returns The modified date of the Vendor.

Returns:

  • (Date-time)

    The modified date of the Vendor



151
152
153
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 151

def modified
  @modified
end

#open_bill_countInt32

Returns The number of open bills with this Vendor.

Returns:

  • (Int32)

    The number of open bills with this Vendor



135
136
137
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 135

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



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

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



127
128
129
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 127

def paid_bill_count_last30
  @paid_bill_count_last30
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



131
132
133
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 131

def paid_bill_count_past_thirty_days
  @paid_bill_count_past_thirty_days
end

#primary_contact_idUuid

Returns This Vendor’s primary contact id.

Returns:

  • (Uuid)

    This Vendor’s primary contact id



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

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



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

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.



143
144
145
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 143

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



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

def vendor_id
  @vendor_id
end

#vendor_nameString

Returns The name of this Vendor.

Returns:

  • (String)

    The name of this Vendor



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

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



155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 155

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,
        'amountPaidPastThirtyDays' => @amount_paid_past_thirty_days,
        'advancePayLast30' => @advance_pay_last30,
        'advancePayPastThirtyDays' => @advance_pay_past_thirty_days,
        'advancePayOutstanding' => @advance_pay_outstanding,
        'amountBilledLast30' => @amount_billed_last30,
        'amountBilledPastThirtyDays' => @amount_billed_past_thirty_days,
        'amountBilledOutstandingLast30' => @amount_billed_outstanding_last30,
        'amountBilledOutstandingPastThirtyDays' => @amount_billed_outstanding_past_thirty_days,
        'amountBilledOutstanding' => @amount_billed_outstanding,
        'billCountLast30' => @bill_count_last30,
        'billCountPastThirtyDays' => @bill_count_past_thirty_days,
        'paidBillCountLast30' => @paid_bill_count_last30,
        'paidBillCountPastThirtyDays' => @paid_bill_count_past_thirty_days,
        'openBillCount' => @open_bill_count,
        'paidBillCount' => @paid_bill_count,
        'totalBillCount' => @total_bill_count,
        'dpo' => @dpo,
        'modified' => @modified,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



187
188
189
# File 'lib/lockstep_sdk/models/vendor_summary_model.rb', line 187

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