Class: LockstepSdk::CustomerDetailsModel
- Inherits:
-
Object
- Object
- LockstepSdk::CustomerDetailsModel
- Defined in:
- lib/lockstep_sdk/models/customer_details_model.rb
Overview
Contains customer details data
Instance Attribute Summary collapse
-
#address1 ⇒ String
Customer address info.
-
#address2 ⇒ String
Customer address info.
-
#address3 ⇒ String
Customer address info.
-
#amount_past_due ⇒ Double
Customer total past due amount.
-
#city ⇒ String
Customer address info.
-
#contact_email ⇒ String
Customer primary contact email address.
-
#contact_id ⇒ Uuid
Customer primary contact id.
-
#contact_name ⇒ String
Customer primary contact name.
-
#country ⇒ String
Customer address country.
-
#customer_id ⇒ Uuid
The unique ID of this customer.
-
#email ⇒ String
Customer AR email address.
-
#fax_number ⇒ String
Customer fax number.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#name ⇒ String
The unique ID of this customer.
-
#outstanding_amount ⇒ Double
Customer total outstanding invoice amount.
-
#outstanding_invoices ⇒ Int32
Customer number of outstanding invoices.
-
#payments ⇒ CustomerDetailsPaymentModel
Customer payments collected.
-
#phone_number ⇒ String
Customer phone number.
-
#postal_code ⇒ String
Customer address info.
-
#state ⇒ String
Customer address info.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ CustomerDetailsModel
constructor
Initialize the CustomerDetailsModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ CustomerDetailsModel
Initialize the CustomerDetailsModel using the provided prototype
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 27 def initialize(params = {}) @group_key = params.dig(:group_key) @customer_id = params.dig(:customer_id) @name = params.dig(:name) @address1 = params.dig(:address1) @address2 = params.dig(:address2) @address3 = params.dig(:address3) @city = params.dig(:city) @state = params.dig(:state) @postal_code = params.dig(:postal_code) @country = params.dig(:country) @phone_number = params.dig(:phone_number) @fax_number = params.dig(:fax_number) @email = params.dig(:email) @contact_id = params.dig(:contact_id) @contact_name = params.dig(:contact_name) @contact_email = params.dig(:contact_email) @outstanding_invoices = params.dig(:outstanding_invoices) @outstanding_amount = params.dig(:outstanding_amount) @amount_past_due = params.dig(:amount_past_due) @payments = params.dig(:payments) end |
Instance Attribute Details
#address1 ⇒ String
Returns Customer address info.
64 65 66 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 64 def address1 @address1 end |
#address2 ⇒ String
Returns Customer address info.
68 69 70 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 68 def address2 @address2 end |
#address3 ⇒ String
Returns Customer address info.
72 73 74 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 72 def address3 @address3 end |
#amount_past_due ⇒ Double
Returns Customer total past due amount.
124 125 126 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 124 def amount_past_due @amount_past_due end |
#city ⇒ String
Returns Customer address info.
76 77 78 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 76 def city @city end |
#contact_email ⇒ String
Returns Customer primary contact email address.
112 113 114 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 112 def contact_email @contact_email end |
#contact_id ⇒ Uuid
Returns Customer primary contact id.
104 105 106 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 104 def contact_id @contact_id end |
#contact_name ⇒ String
Returns Customer primary contact name.
108 109 110 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 108 def contact_name @contact_name end |
#country ⇒ String
Returns Customer address country.
88 89 90 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 88 def country @country end |
#customer_id ⇒ Uuid
Returns The unique ID of this customer.
56 57 58 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 56 def customer_id @customer_id end |
#email ⇒ String
Returns Customer AR email address.
100 101 102 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 100 def email @email end |
#fax_number ⇒ String
Returns Customer fax number.
96 97 98 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 96 def fax_number @fax_number end |
#group_key ⇒ Uuid
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).
52 53 54 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 52 def group_key @group_key end |
#name ⇒ String
Returns The unique ID of this customer.
60 61 62 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 60 def name @name end |
#outstanding_amount ⇒ Double
Returns Customer total outstanding invoice amount.
120 121 122 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 120 def outstanding_amount @outstanding_amount end |
#outstanding_invoices ⇒ Int32
Returns Customer number of outstanding invoices.
116 117 118 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 116 def outstanding_invoices @outstanding_invoices end |
#payments ⇒ CustomerDetailsPaymentModel
Returns Customer payments collected.
128 129 130 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 128 def payments @payments end |
#phone_number ⇒ String
Returns Customer phone number.
92 93 94 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 92 def phone_number @phone_number end |
#postal_code ⇒ String
Returns Customer address info.
84 85 86 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 84 def postal_code @postal_code end |
#state ⇒ String
Returns Customer address info.
80 81 82 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 80 def state @state end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 132 def as_json(={}) { 'groupKey' => @group_key, 'customerId' => @customer_id, 'name' => @name, 'address1' => @address1, 'address2' => @address2, 'address3' => @address3, 'city' => @city, 'state' => @state, 'postalCode' => @postal_code, 'country' => @country, 'phoneNumber' => @phone_number, 'faxNumber' => @fax_number, 'email' => @email, 'contactId' => @contact_id, 'contactName' => @contact_name, 'contactEmail' => @contact_email, 'outstandingInvoices' => @outstanding_invoices, 'outstandingAmount' => @outstanding_amount, 'amountPastDue' => @amount_past_due, 'payments' => @payments, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
159 160 161 |
# File 'lib/lockstep_sdk/models/customer_details_model.rb', line 159 def to_json(*) "[#{as_json(*).to_json(*)}]" end |