Class: TripletexRubyClient::Project
- Inherits:
-
Object
- Object
- TripletexRubyClient::Project
- Defined in:
- lib/tripletex_ruby_client/models/project.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#access_type ⇒ Object
READ/WRITE access on project.
-
#attention ⇒ Object
Customer in attention of person.
-
#changes ⇒ Object
Returns the value of attribute changes.
-
#contact ⇒ Object
Customer contact person.
-
#contribution_margin_percent ⇒ Object
Returns the value of attribute contribution_margin_percent.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#customer ⇒ Object
The project’s customer.
-
#delivery_address ⇒ Object
Returns the value of attribute delivery_address.
-
#department ⇒ Object
Returns the value of attribute department.
-
#description ⇒ Object
Returns the value of attribute description.
-
#discount_percentage ⇒ Object
Project discount percentage.
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#display_name_format ⇒ Object
Defines project name presentation in overviews.
-
#end_date ⇒ Object
Returns the value of attribute end_date.
-
#external_accounts_number ⇒ Object
Returns the value of attribute external_accounts_number.
-
#fixedprice ⇒ Object
Fixed price amount, in the project’s currency.
-
#for_participants_only ⇒ Object
Set to true if only project participants can register information on the project.
-
#general_project_activities_per_project_only ⇒ Object
Set to true if a general project activity must be linked to project to allow time tracking.
-
#hierarchy_name_and_number ⇒ Object
Returns the value of attribute hierarchy_name_and_number.
-
#id ⇒ Object
Returns the value of attribute id.
-
#ignore_company_product_discount_agreement ⇒ Object
Returns the value of attribute ignore_company_product_discount_agreement.
-
#invoice_comment ⇒ Object
Comment for project invoices.
-
#invoice_due_date ⇒ Object
invoice due date.
-
#invoice_receiver_email ⇒ Object
receiver email.
-
#invoicing_plan ⇒ Object
Invoicing plans tied to the project.
-
#is_closed ⇒ Object
Returns the value of attribute is_closed.
-
#is_fixed_price ⇒ Object
Project is fixed price if set to true, hourly rate if set to false.
-
#is_internal ⇒ Object
Returns the value of attribute is_internal.
-
#is_offer ⇒ Object
Returns the value of attribute is_offer.
-
#is_price_ceiling ⇒ Object
Set to true if an hourly rate project has a price ceiling.
-
#is_ready_for_invoicing ⇒ Object
Returns the value of attribute is_ready_for_invoicing.
-
#main_project ⇒ Object
Returns the value of attribute main_project.
-
#mark_up_fees_earned ⇒ Object
Set mark-up (%) for fees earned.
-
#mark_up_order_lines ⇒ Object
Set mark-up (%) for order lines.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#number_of_project_participants ⇒ Object
Returns the value of attribute number_of_project_participants.
-
#number_of_sub_projects ⇒ Object
Returns the value of attribute number_of_sub_projects.
-
#order_lines ⇒ Object
Order lines tied to the order.
-
#participants ⇒ Object
Link to individual project participants.
-
#preliminary_invoice ⇒ Object
Returns the value of attribute preliminary_invoice.
-
#price_ceiling_amount ⇒ Object
Price ceiling amount, in the project’s currency.
-
#project_activities ⇒ Object
Project Activities.
-
#project_category ⇒ Object
Returns the value of attribute project_category.
-
#project_hourly_rates ⇒ Object
Project Rate Types tied to the project.
-
#project_manager ⇒ Object
Returns the value of attribute project_manager.
-
#reference ⇒ Object
Returns the value of attribute reference.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
-
#url ⇒ Object
Returns the value of attribute url.
-
#use_product_net_price ⇒ Object
Returns the value of attribute use_product_net_price.
-
#vat_type ⇒ Object
The default vat type for this project.
-
#version ⇒ Object
Returns the value of attribute version.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Project
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Project
Initializes the object
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 282 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'id') self.id = attributes[:'id'] end if attributes.has_key?(:'version') self.version = attributes[:'version'] end if attributes.has_key?(:'changes') if (value = attributes[:'changes']).is_a?(Array) self.changes = value end end if attributes.has_key?(:'url') self.url = attributes[:'url'] end if attributes.has_key?(:'name') self.name = attributes[:'name'] end if attributes.has_key?(:'number') self.number = attributes[:'number'] end if attributes.has_key?(:'displayName') self.display_name = attributes[:'displayName'] end if attributes.has_key?(:'description') self.description = attributes[:'description'] end if attributes.has_key?(:'projectManager') self.project_manager = attributes[:'projectManager'] end if attributes.has_key?(:'department') self.department = attributes[:'department'] end if attributes.has_key?(:'mainProject') self.main_project = attributes[:'mainProject'] end if attributes.has_key?(:'startDate') self.start_date = attributes[:'startDate'] end if attributes.has_key?(:'endDate') self.end_date = attributes[:'endDate'] end if attributes.has_key?(:'customer') self.customer = attributes[:'customer'] end if attributes.has_key?(:'isClosed') self.is_closed = attributes[:'isClosed'] end if attributes.has_key?(:'isReadyForInvoicing') self.is_ready_for_invoicing = attributes[:'isReadyForInvoicing'] end if attributes.has_key?(:'isInternal') self.is_internal = attributes[:'isInternal'] end if attributes.has_key?(:'isOffer') self.is_offer = attributes[:'isOffer'] end if attributes.has_key?(:'isFixedPrice') self.is_fixed_price = attributes[:'isFixedPrice'] end if attributes.has_key?(:'projectCategory') self.project_category = attributes[:'projectCategory'] end if attributes.has_key?(:'deliveryAddress') self.delivery_address = attributes[:'deliveryAddress'] end if attributes.has_key?(:'displayNameFormat') self.display_name_format = attributes[:'displayNameFormat'] end if attributes.has_key?(:'reference') self.reference = attributes[:'reference'] end if attributes.has_key?(:'externalAccountsNumber') self.external_accounts_number = attributes[:'externalAccountsNumber'] end if attributes.has_key?(:'discountPercentage') self.discount_percentage = attributes[:'discountPercentage'] end if attributes.has_key?(:'vatType') self.vat_type = attributes[:'vatType'] end if attributes.has_key?(:'fixedprice') self.fixedprice = attributes[:'fixedprice'] end if attributes.has_key?(:'contributionMarginPercent') self.contribution_margin_percent = attributes[:'contributionMarginPercent'] end if attributes.has_key?(:'numberOfSubProjects') self.number_of_sub_projects = attributes[:'numberOfSubProjects'] end if attributes.has_key?(:'numberOfProjectParticipants') self.number_of_project_participants = attributes[:'numberOfProjectParticipants'] end if attributes.has_key?(:'orderLines') if (value = attributes[:'orderLines']).is_a?(Array) self.order_lines = value end end if attributes.has_key?(:'currency') self.currency = attributes[:'currency'] end if attributes.has_key?(:'markUpOrderLines') self.mark_up_order_lines = attributes[:'markUpOrderLines'] end if attributes.has_key?(:'markUpFeesEarned') self.mark_up_fees_earned = attributes[:'markUpFeesEarned'] end if attributes.has_key?(:'isPriceCeiling') self.is_price_ceiling = attributes[:'isPriceCeiling'] end if attributes.has_key?(:'priceCeilingAmount') self.price_ceiling_amount = attributes[:'priceCeilingAmount'] end if attributes.has_key?(:'projectHourlyRates') if (value = attributes[:'projectHourlyRates']).is_a?(Array) self.project_hourly_rates = value end end if attributes.has_key?(:'forParticipantsOnly') self.for_participants_only = attributes[:'forParticipantsOnly'] end if attributes.has_key?(:'participants') if (value = attributes[:'participants']).is_a?(Array) self.participants = value end end if attributes.has_key?(:'contact') self.contact = attributes[:'contact'] end if attributes.has_key?(:'attention') self.attention = attributes[:'attention'] end if attributes.has_key?(:'invoiceComment') self.invoice_comment = attributes[:'invoiceComment'] end if attributes.has_key?(:'invoicingPlan') if (value = attributes[:'invoicingPlan']).is_a?(Array) self.invoicing_plan = value end end if attributes.has_key?(:'preliminaryInvoice') self.preliminary_invoice = attributes[:'preliminaryInvoice'] end if attributes.has_key?(:'generalProjectActivitiesPerProjectOnly') self.general_project_activities_per_project_only = attributes[:'generalProjectActivitiesPerProjectOnly'] end if attributes.has_key?(:'projectActivities') if (value = attributes[:'projectActivities']).is_a?(Array) self.project_activities = value end end if attributes.has_key?(:'hierarchyNameAndNumber') self.hierarchy_name_and_number = attributes[:'hierarchyNameAndNumber'] end if attributes.has_key?(:'invoiceDueDate') self.invoice_due_date = attributes[:'invoiceDueDate'] end if attributes.has_key?(:'invoiceReceiverEmail') self.invoice_receiver_email = attributes[:'invoiceReceiverEmail'] end if attributes.has_key?(:'accessType') self.access_type = attributes[:'accessType'] end if attributes.has_key?(:'useProductNetPrice') self.use_product_net_price = attributes[:'useProductNetPrice'] end if attributes.has_key?(:'ignoreCompanyProductDiscountAgreement') self.ignore_company_product_discount_agreement = attributes[:'ignoreCompanyProductDiscountAgreement'] end end |
Instance Attribute Details
#access_type ⇒ Object
READ/WRITE access on project
136 137 138 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 136 def access_type @access_type end |
#attention ⇒ Object
Customer in attention of person
111 112 113 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 111 def attention @attention end |
#changes ⇒ Object
Returns the value of attribute changes.
19 20 21 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 19 def changes @changes end |
#contact ⇒ Object
Customer contact person.
108 109 110 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 108 def contact @contact end |
#contribution_margin_percent ⇒ Object
Returns the value of attribute contribution_margin_percent.
75 76 77 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 75 def contribution_margin_percent @contribution_margin_percent end |
#currency ⇒ Object
Returns the value of attribute currency.
84 85 86 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 84 def currency @currency end |
#customer ⇒ Object
The project’s customer
42 43 44 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 42 def customer @customer end |
#delivery_address ⇒ Object
Returns the value of attribute delivery_address.
57 58 59 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 57 def delivery_address @delivery_address end |
#department ⇒ Object
Returns the value of attribute department.
33 34 35 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 33 def department @department end |
#description ⇒ Object
Returns the value of attribute description.
29 30 31 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 29 def description @description end |
#discount_percentage ⇒ Object
Project discount percentage.
67 68 69 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 67 def discount_percentage @discount_percentage end |
#display_name ⇒ Object
Returns the value of attribute display_name.
27 28 29 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 27 def display_name @display_name end |
#display_name_format ⇒ Object
Defines project name presentation in overviews.
60 61 62 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 60 def display_name_format @display_name_format end |
#end_date ⇒ Object
Returns the value of attribute end_date.
39 40 41 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 39 def end_date @end_date end |
#external_accounts_number ⇒ Object
Returns the value of attribute external_accounts_number.
64 65 66 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 64 def external_accounts_number @external_accounts_number end |
#fixedprice ⇒ Object
Fixed price amount, in the project’s currency.
73 74 75 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 73 def fixedprice @fixedprice end |
#for_participants_only ⇒ Object
Set to true if only project participants can register information on the project
102 103 104 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 102 def for_participants_only @for_participants_only end |
#general_project_activities_per_project_only ⇒ Object
Set to true if a general project activity must be linked to project to allow time tracking.
122 123 124 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 122 def general_project_activities_per_project_only @general_project_activities_per_project_only end |
#hierarchy_name_and_number ⇒ Object
Returns the value of attribute hierarchy_name_and_number.
127 128 129 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 127 def hierarchy_name_and_number @hierarchy_name_and_number end |
#id ⇒ Object
Returns the value of attribute id.
15 16 17 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 15 def id @id end |
#ignore_company_product_discount_agreement ⇒ Object
Returns the value of attribute ignore_company_product_discount_agreement.
140 141 142 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 140 def ignore_company_product_discount_agreement @ignore_company_product_discount_agreement end |
#invoice_comment ⇒ Object
Comment for project invoices
114 115 116 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 114 def invoice_comment @invoice_comment end |
#invoice_due_date ⇒ Object
invoice due date
130 131 132 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 130 def invoice_due_date @invoice_due_date end |
#invoice_receiver_email ⇒ Object
receiver email
133 134 135 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 133 def invoice_receiver_email @invoice_receiver_email end |
#invoicing_plan ⇒ Object
Invoicing plans tied to the project
117 118 119 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 117 def invoicing_plan @invoicing_plan end |
#is_closed ⇒ Object
Returns the value of attribute is_closed.
44 45 46 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 44 def is_closed @is_closed end |
#is_fixed_price ⇒ Object
Project is fixed price if set to true, hourly rate if set to false.
53 54 55 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 53 def is_fixed_price @is_fixed_price end |
#is_internal ⇒ Object
Returns the value of attribute is_internal.
48 49 50 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 48 def is_internal @is_internal end |
#is_offer ⇒ Object
Returns the value of attribute is_offer.
50 51 52 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 50 def is_offer @is_offer end |
#is_price_ceiling ⇒ Object
Set to true if an hourly rate project has a price ceiling.
93 94 95 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 93 def is_price_ceiling @is_price_ceiling end |
#is_ready_for_invoicing ⇒ Object
Returns the value of attribute is_ready_for_invoicing.
46 47 48 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 46 def is_ready_for_invoicing @is_ready_for_invoicing end |
#main_project ⇒ Object
Returns the value of attribute main_project.
35 36 37 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 35 def main_project @main_project end |
#mark_up_fees_earned ⇒ Object
Set mark-up (%) for fees earned.
90 91 92 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 90 def mark_up_fees_earned @mark_up_fees_earned end |
#mark_up_order_lines ⇒ Object
Set mark-up (%) for order lines.
87 88 89 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 87 def mark_up_order_lines @mark_up_order_lines end |
#name ⇒ Object
Returns the value of attribute name.
23 24 25 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 23 def name @name end |
#number ⇒ Object
Returns the value of attribute number.
25 26 27 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 25 def number @number end |
#number_of_project_participants ⇒ Object
Returns the value of attribute number_of_project_participants.
79 80 81 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 79 def number_of_project_participants @number_of_project_participants end |
#number_of_sub_projects ⇒ Object
Returns the value of attribute number_of_sub_projects.
77 78 79 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 77 def number_of_sub_projects @number_of_sub_projects end |
#order_lines ⇒ Object
Order lines tied to the order
82 83 84 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 82 def order_lines @order_lines end |
#participants ⇒ Object
Link to individual project participants.
105 106 107 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 105 def participants @participants end |
#preliminary_invoice ⇒ Object
Returns the value of attribute preliminary_invoice.
119 120 121 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 119 def preliminary_invoice @preliminary_invoice end |
#price_ceiling_amount ⇒ Object
Price ceiling amount, in the project’s currency.
96 97 98 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 96 def price_ceiling_amount @price_ceiling_amount end |
#project_activities ⇒ Object
Project Activities
125 126 127 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 125 def project_activities @project_activities end |
#project_category ⇒ Object
Returns the value of attribute project_category.
55 56 57 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 55 def project_category @project_category end |
#project_hourly_rates ⇒ Object
Project Rate Types tied to the project.
99 100 101 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 99 def project_hourly_rates @project_hourly_rates end |
#project_manager ⇒ Object
Returns the value of attribute project_manager.
31 32 33 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 31 def project_manager @project_manager end |
#reference ⇒ Object
Returns the value of attribute reference.
62 63 64 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 62 def reference @reference end |
#start_date ⇒ Object
Returns the value of attribute start_date.
37 38 39 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 37 def start_date @start_date end |
#url ⇒ Object
Returns the value of attribute url.
21 22 23 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 21 def url @url end |
#use_product_net_price ⇒ Object
Returns the value of attribute use_product_net_price.
138 139 140 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 138 def use_product_net_price @use_product_net_price end |
#vat_type ⇒ Object
The default vat type for this project.
70 71 72 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 70 def vat_type @vat_type end |
#version ⇒ Object
Returns the value of attribute version.
17 18 19 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 17 def version @version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 165 def self.attribute_map { :'id' => :'id', :'version' => :'version', :'changes' => :'changes', :'url' => :'url', :'name' => :'name', :'number' => :'number', :'display_name' => :'displayName', :'description' => :'description', :'project_manager' => :'projectManager', :'department' => :'department', :'main_project' => :'mainProject', :'start_date' => :'startDate', :'end_date' => :'endDate', :'customer' => :'customer', :'is_closed' => :'isClosed', :'is_ready_for_invoicing' => :'isReadyForInvoicing', :'is_internal' => :'isInternal', :'is_offer' => :'isOffer', :'is_fixed_price' => :'isFixedPrice', :'project_category' => :'projectCategory', :'delivery_address' => :'deliveryAddress', :'display_name_format' => :'displayNameFormat', :'reference' => :'reference', :'external_accounts_number' => :'externalAccountsNumber', :'discount_percentage' => :'discountPercentage', :'vat_type' => :'vatType', :'fixedprice' => :'fixedprice', :'contribution_margin_percent' => :'contributionMarginPercent', :'number_of_sub_projects' => :'numberOfSubProjects', :'number_of_project_participants' => :'numberOfProjectParticipants', :'order_lines' => :'orderLines', :'currency' => :'currency', :'mark_up_order_lines' => :'markUpOrderLines', :'mark_up_fees_earned' => :'markUpFeesEarned', :'is_price_ceiling' => :'isPriceCeiling', :'price_ceiling_amount' => :'priceCeilingAmount', :'project_hourly_rates' => :'projectHourlyRates', :'for_participants_only' => :'forParticipantsOnly', :'participants' => :'participants', :'contact' => :'contact', :'attention' => :'attention', :'invoice_comment' => :'invoiceComment', :'invoicing_plan' => :'invoicingPlan', :'preliminary_invoice' => :'preliminaryInvoice', :'general_project_activities_per_project_only' => :'generalProjectActivitiesPerProjectOnly', :'project_activities' => :'projectActivities', :'hierarchy_name_and_number' => :'hierarchyNameAndNumber', :'invoice_due_date' => :'invoiceDueDate', :'invoice_receiver_email' => :'invoiceReceiverEmail', :'access_type' => :'accessType', :'use_product_net_price' => :'useProductNetPrice', :'ignore_company_product_discount_agreement' => :'ignoreCompanyProductDiscountAgreement' } end |
.swagger_types ⇒ Object
Attribute type mapping.
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 223 def self.swagger_types { :'id' => :'Integer', :'version' => :'Integer', :'changes' => :'Array<Change>', :'url' => :'String', :'name' => :'String', :'number' => :'String', :'display_name' => :'String', :'description' => :'String', :'project_manager' => :'Employee', :'department' => :'Department', :'main_project' => :'Project', :'start_date' => :'String', :'end_date' => :'String', :'customer' => :'Customer', :'is_closed' => :'BOOLEAN', :'is_ready_for_invoicing' => :'BOOLEAN', :'is_internal' => :'BOOLEAN', :'is_offer' => :'BOOLEAN', :'is_fixed_price' => :'BOOLEAN', :'project_category' => :'ProjectCategory', :'delivery_address' => :'DeliveryAddress', :'display_name_format' => :'String', :'reference' => :'String', :'external_accounts_number' => :'String', :'discount_percentage' => :'Float', :'vat_type' => :'VatType', :'fixedprice' => :'Float', :'contribution_margin_percent' => :'Float', :'number_of_sub_projects' => :'Integer', :'number_of_project_participants' => :'Integer', :'order_lines' => :'Array<ProjectOrderLine>', :'currency' => :'Currency', :'mark_up_order_lines' => :'Float', :'mark_up_fees_earned' => :'Float', :'is_price_ceiling' => :'BOOLEAN', :'price_ceiling_amount' => :'Float', :'project_hourly_rates' => :'Array<ProjectHourlyRate>', :'for_participants_only' => :'BOOLEAN', :'participants' => :'Array<ProjectParticipant>', :'contact' => :'Contact', :'attention' => :'Contact', :'invoice_comment' => :'String', :'invoicing_plan' => :'Array<Invoice>', :'preliminary_invoice' => :'Invoice', :'general_project_activities_per_project_only' => :'BOOLEAN', :'project_activities' => :'Array<ProjectActivity>', :'hierarchy_name_and_number' => :'String', :'invoice_due_date' => :'Integer', :'invoice_receiver_email' => :'String', :'access_type' => :'String', :'use_product_net_price' => :'BOOLEAN', :'ignore_company_product_discount_agreement' => :'BOOLEAN' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 647 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && version == o.version && changes == o.changes && url == o.url && name == o.name && number == o.number && display_name == o.display_name && description == o.description && project_manager == o.project_manager && department == o.department && main_project == o.main_project && start_date == o.start_date && end_date == o.end_date && customer == o.customer && is_closed == o.is_closed && is_ready_for_invoicing == o.is_ready_for_invoicing && is_internal == o.is_internal && is_offer == o.is_offer && is_fixed_price == o.is_fixed_price && project_category == o.project_category && delivery_address == o.delivery_address && display_name_format == o.display_name_format && reference == o.reference && external_accounts_number == o.external_accounts_number && discount_percentage == o.discount_percentage && vat_type == o.vat_type && fixedprice == o.fixedprice && contribution_margin_percent == o.contribution_margin_percent && number_of_sub_projects == o.number_of_sub_projects && number_of_project_participants == o.number_of_project_participants && order_lines == o.order_lines && currency == o.currency && mark_up_order_lines == o.mark_up_order_lines && mark_up_fees_earned == o.mark_up_fees_earned && is_price_ceiling == o.is_price_ceiling && price_ceiling_amount == o.price_ceiling_amount && project_hourly_rates == o.project_hourly_rates && for_participants_only == o.for_participants_only && participants == o.participants && contact == o.contact && attention == o.attention && invoice_comment == o.invoice_comment && invoicing_plan == o.invoicing_plan && preliminary_invoice == o.preliminary_invoice && general_project_activities_per_project_only == o.general_project_activities_per_project_only && project_activities == o.project_activities && hierarchy_name_and_number == o.hierarchy_name_and_number && invoice_due_date == o.invoice_due_date && invoice_receiver_email == o.invoice_receiver_email && access_type == o.access_type && use_product_net_price == o.use_product_net_price && ignore_company_product_discount_agreement == o.ignore_company_product_discount_agreement end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 740 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = TripletexRubyClient.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
806 807 808 809 810 811 812 813 814 815 816 817 818 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 806 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 719 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
706 707 708 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 706 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
712 713 714 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 712 def hash [id, version, changes, url, name, number, display_name, description, project_manager, department, main_project, start_date, end_date, customer, is_closed, is_ready_for_invoicing, is_internal, is_offer, is_fixed_price, project_category, delivery_address, display_name_format, reference, external_accounts_number, discount_percentage, vat_type, fixedprice, contribution_margin_percent, number_of_sub_projects, number_of_project_participants, order_lines, currency, mark_up_order_lines, mark_up_fees_earned, is_price_ceiling, price_ceiling_amount, project_hourly_rates, for_participants_only, participants, contact, attention, invoice_comment, invoicing_plan, preliminary_invoice, general_project_activities_per_project_only, project_activities, hierarchy_name_and_number, invoice_due_date, invoice_receiver_email, access_type, use_product_net_price, ignore_company_product_discount_agreement].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 511 def list_invalid_properties invalid_properties = Array.new if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end if @name.to_s.length > 255 invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.') end if !@number.nil? && @number.to_s.length > 100 invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 100.') end if @project_manager.nil? invalid_properties.push('invalid value for "project_manager", project_manager cannot be nil.') end if @start_date.nil? invalid_properties.push('invalid value for "start_date", start_date cannot be nil.') end if @is_internal.nil? invalid_properties.push('invalid value for "is_internal", is_internal cannot be nil.') end if !@reference.nil? && @reference.to_s.length > 255 invalid_properties.push('invalid value for "reference", the character length must be smaller than or equal to 255.') end if !@external_accounts_number.nil? && @external_accounts_number.to_s.length > 100 invalid_properties.push('invalid value for "external_accounts_number", the character length must be smaller than or equal to 100.') end if !@invoice_receiver_email.nil? && @invoice_receiver_email.to_s.length > 254 invalid_properties.push('invalid value for "invoice_receiver_email", the character length must be smaller than or equal to 254.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
786 787 788 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 786 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
792 793 794 795 796 797 798 799 800 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 792 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
780 781 782 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 780 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 |
# File 'lib/tripletex_ruby_client/models/project.rb', line 554 def valid? return false if @name.nil? return false if @name.to_s.length > 255 return false if !@number.nil? && @number.to_s.length > 100 return false if @project_manager.nil? return false if @start_date.nil? return false if @is_internal.nil? display_name_format_validator = EnumAttributeValidator.new('String', ['NAME_STANDARD', 'NAME_INCL_CUSTOMER_NAME', 'NAME_INCL_PARENT_NAME', 'NAME_INCL_PARENT_NUMBER', 'NAME_INCL_PARENT_NAME_AND_NUMBER']) return false unless display_name_format_validator.valid?(@display_name_format) return false if !@reference.nil? && @reference.to_s.length > 255 return false if !@external_accounts_number.nil? && @external_accounts_number.to_s.length > 100 return false if !@invoice_receiver_email.nil? && @invoice_receiver_email.to_s.length > 254 access_type_validator = EnumAttributeValidator.new('String', ['NONE', 'READ', 'WRITE']) return false unless access_type_validator.valid?(@access_type) true end |