Class: LockstepSdk::CompanyDetailsModel
- Inherits:
-
Object
- Object
- LockstepSdk::CompanyDetailsModel
- Defined in:
- lib/lockstep_sdk/models/company_details_model.rb
Overview
Contains company details data
Instance Attribute Summary collapse
-
#address1 ⇒ String
Company address info.
-
#address2 ⇒ String
Company address info.
-
#address3 ⇒ String
Company address info.
-
#amount_past_due ⇒ Double
Company total past due amount in the group’s base currency.
-
#city ⇒ String
Company address info.
-
#contact_email ⇒ String
Company primary contact email address.
-
#contact_id ⇒ Uuid
Company primary contact id.
-
#contact_name ⇒ String
Company primary contact name.
-
#country ⇒ String
Company address country.
-
#customer_id ⇒ Uuid
The unique ID of this company.
-
#email ⇒ String
Company email address.
-
#fax_number ⇒ String
Company fax number.
-
#group_base_currency_code ⇒ String
The group’s base currency code.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#name ⇒ String
The unique ID of this company.
-
#outstanding_amount ⇒ Double
Company total outstanding invoice amount in the group’s base currency.
-
#outstanding_invoices ⇒ Int32
Company number of outstanding invoices.
-
#payments ⇒ CompanyDetailsPaymentModel
Company payments collected.
-
#phone_number ⇒ String
Company phone number.
-
#postal_code ⇒ String
Company address info.
-
#state ⇒ String
Company address info.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ CompanyDetailsModel
constructor
Initialize the CompanyDetailsModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ CompanyDetailsModel
Initialize the CompanyDetailsModel 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 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 25 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) @group_base_currency_code = params.dig(:group_base_currency_code) @outstanding_amount = params.dig(:outstanding_amount) @amount_past_due = params.dig(:amount_past_due) @payments = params.dig(:payments) end |
Instance Attribute Details
#address1 ⇒ String
63 64 65 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 63 def address1 @address1 end |
#address2 ⇒ String
67 68 69 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 67 def address2 @address2 end |
#address3 ⇒ String
71 72 73 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 71 def address3 @address3 end |
#amount_past_due ⇒ Double
127 128 129 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 127 def amount_past_due @amount_past_due end |
#city ⇒ String
75 76 77 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 75 def city @city end |
#contact_email ⇒ String
111 112 113 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 111 def contact_email @contact_email end |
#contact_id ⇒ Uuid
103 104 105 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 103 def contact_id @contact_id end |
#contact_name ⇒ String
107 108 109 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 107 def contact_name @contact_name end |
#country ⇒ String
87 88 89 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 87 def country @country end |
#customer_id ⇒ Uuid
55 56 57 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 55 def customer_id @customer_id end |
#email ⇒ String
99 100 101 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 99 def email @email end |
#fax_number ⇒ String
95 96 97 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 95 def fax_number @fax_number end |
#group_base_currency_code ⇒ String
119 120 121 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 119 def group_base_currency_code @group_base_currency_code end |
#group_key ⇒ Uuid
51 52 53 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 51 def group_key @group_key end |
#name ⇒ String
59 60 61 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 59 def name @name end |
#outstanding_amount ⇒ Double
123 124 125 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 123 def outstanding_amount @outstanding_amount end |
#outstanding_invoices ⇒ Int32
115 116 117 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 115 def outstanding_invoices @outstanding_invoices end |
#payments ⇒ CompanyDetailsPaymentModel
131 132 133 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 131 def payments @payments end |
#phone_number ⇒ String
91 92 93 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 91 def phone_number @phone_number end |
#postal_code ⇒ String
83 84 85 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 83 def postal_code @postal_code end |
#state ⇒ String
79 80 81 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 79 def state @state end |
Instance Method Details
#as_json(options = {}) ⇒ object
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 135 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, 'groupBaseCurrencyCode' => @group_base_currency_code, 'outstandingAmount' => @outstanding_amount, 'amountPastDue' => @amount_past_due, 'payments' => @payments, } end |
#to_json(*options) ⇒ String
163 164 165 |
# File 'lib/lockstep_sdk/models/company_details_model.rb', line 163 def to_json(*) "[#{as_json(*).to_json(*)}]" end |