Class: ConnectWise::Project
- Inherits:
-
Object
- Object
- ConnectWise::Project
- Defined in:
- lib/connect_wise/models/project.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#_info ⇒ Object
Returns the value of attribute _info.
-
#actual_end ⇒ Object
Returns the value of attribute actual_end.
-
#actual_hours ⇒ Object
Returns the value of attribute actual_hours.
-
#actual_start ⇒ Object
Returns the value of attribute actual_start.
-
#agreement ⇒ Object
Returns the value of attribute agreement.
-
#bill_expenses ⇒ Object
Required On Updates;.
-
#bill_products ⇒ Object
Required On Updates;.
-
#bill_project_after_closed_flag ⇒ Object
Returns the value of attribute bill_project_after_closed_flag.
-
#bill_time ⇒ Object
Required On Updates;.
-
#bill_to_company ⇒ Object
Returns the value of attribute bill_to_company.
-
#bill_to_contact ⇒ Object
Returns the value of attribute bill_to_contact.
-
#bill_to_site ⇒ Object
Returns the value of attribute bill_to_site.
-
#bill_unapproved_time_and_expense ⇒ Object
Returns the value of attribute bill_unapproved_time_and_expense.
-
#billing_amount ⇒ Object
Returns the value of attribute billing_amount.
-
#billing_attention ⇒ Object
Max length: 50;.
-
#billing_method ⇒ Object
Returns the value of attribute billing_method.
-
#billing_rate_type ⇒ Object
Required On Updates;.
-
#billing_start_date ⇒ Object
Returns the value of attribute billing_start_date.
-
#billing_terms ⇒ Object
Returns the value of attribute billing_terms.
-
#board ⇒ Object
Returns the value of attribute board.
-
#budget_analysis ⇒ Object
Required On Updates;.
-
#budget_flag ⇒ Object
Returns the value of attribute budget_flag.
-
#budget_hours ⇒ Object
Returns the value of attribute budget_hours.
-
#closed_flag ⇒ Object
Returns the value of attribute closed_flag.
-
#company ⇒ Object
Returns the value of attribute company.
-
#company_location ⇒ Object
Returns the value of attribute company_location.
-
#contact ⇒ Object
Returns the value of attribute contact.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#custom_fields ⇒ Object
Returns the value of attribute custom_fields.
-
#customer_po ⇒ Object
Max length: 50;.
-
#department ⇒ Object
Returns the value of attribute department.
-
#description ⇒ Object
Returns the value of attribute description.
-
#do_not_display_in_portal_flag ⇒ Object
Returns the value of attribute do_not_display_in_portal_flag.
-
#downpayment ⇒ Object
Returns the value of attribute downpayment.
-
#estimated_end ⇒ Object
Returns the value of attribute estimated_end.
-
#estimated_expense_cost ⇒ Object
Returns the value of attribute estimated_expense_cost.
-
#estimated_expense_revenue ⇒ Object
Returns the value of attribute estimated_expense_revenue.
-
#estimated_hours ⇒ Object
Returns the value of attribute estimated_hours.
-
#estimated_product_cost ⇒ Object
Returns the value of attribute estimated_product_cost.
-
#estimated_product_revenue ⇒ Object
Returns the value of attribute estimated_product_revenue.
-
#estimated_start ⇒ Object
Returns the value of attribute estimated_start.
-
#estimated_time_cost ⇒ Object
Returns the value of attribute estimated_time_cost.
-
#estimated_time_revenue ⇒ Object
Returns the value of attribute estimated_time_revenue.
-
#expense_approver ⇒ Object
Returns the value of attribute expense_approver.
-
#id ⇒ Object
Returns the value of attribute id.
-
#include_dependencies_flag ⇒ Object
Returns the value of attribute include_dependencies_flag.
-
#include_estimates_flag ⇒ Object
Returns the value of attribute include_estimates_flag.
-
#location ⇒ Object
Returns the value of attribute location.
-
#manager ⇒ Object
Returns the value of attribute manager.
-
#name ⇒ Object
Max length: 100;.
-
#opportunity ⇒ Object
Returns the value of attribute opportunity.
-
#percent_complete ⇒ Object
Returns the value of attribute percent_complete.
-
#project_template_id ⇒ Object
Returns the value of attribute project_template_id.
-
#restrict_down_payment_flag ⇒ Object
Returns the value of attribute restrict_down_payment_flag.
-
#scheduled_end ⇒ Object
Returns the value of attribute scheduled_end.
-
#scheduled_hours ⇒ Object
Returns the value of attribute scheduled_hours.
-
#scheduled_start ⇒ Object
Returns the value of attribute scheduled_start.
-
#ship_to_company ⇒ Object
Returns the value of attribute ship_to_company.
-
#ship_to_contact ⇒ Object
Returns the value of attribute ship_to_contact.
-
#ship_to_site ⇒ Object
Returns the value of attribute ship_to_site.
-
#site ⇒ Object
Returns the value of attribute site.
-
#status ⇒ Object
Returns the value of attribute status.
-
#tax_code ⇒ Object
Returns the value of attribute tax_code.
-
#time_approver ⇒ Object
Returns the value of attribute time_approver.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ 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?(other) ⇒ Boolean
-
#hash ⇒ Integer
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
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 279 280 281 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 |
# File 'lib/connect_wise/models/project.rb', line 245 def initialize(attributes = {}) raise ArgumentError, 'The input argument (attributes) must be a hash in `ConnectWise::Project` initialize method' unless attributes.is_a?(Hash) # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) do |(k, v), h| raise ArgumentError, "`#{k}` is not a valid attribute in `ConnectWise::Project`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect unless self.class.attribute_map.key?(k.to_sym) h[k.to_sym] = v end self.billing_method = attributes[:billing_method] if attributes.key?(:billing_method) self.estimated_end = attributes[:estimated_end] if attributes.key?(:estimated_end) self.estimated_start = attributes[:estimated_start] if attributes.key?(:estimated_start) self.name = attributes[:name] if attributes.key?(:name) self.id = attributes[:id] if attributes.key?(:id) if attributes.key?(:_info) && (value = attributes[:_info]).is_a?(Hash) self._info = value end self.actual_end = attributes[:actual_end] if attributes.key?(:actual_end) self.actual_hours = attributes[:actual_hours] if attributes.key?(:actual_hours) self.actual_start = attributes[:actual_start] if attributes.key?(:actual_start) self.agreement = attributes[:agreement] if attributes.key?(:agreement) self.bill_expenses = attributes[:bill_expenses] if attributes.key?(:bill_expenses) self.billing_amount = attributes[:billing_amount] if attributes.key?(:billing_amount) self.billing_attention = attributes[:billing_attention] if attributes.key?(:billing_attention) self.billing_rate_type = attributes[:billing_rate_type] if attributes.key?(:billing_rate_type) self.billing_terms = attributes[:billing_terms] if attributes.key?(:billing_terms) self.bill_products = attributes[:bill_products] if attributes.key?(:bill_products) self.bill_project_after_closed_flag = attributes[:bill_project_after_closed_flag] if attributes.key?(:bill_project_after_closed_flag) self.bill_time = attributes[:bill_time] if attributes.key?(:bill_time) self.bill_to_company = attributes[:bill_to_company] if attributes.key?(:bill_to_company) self.bill_to_contact = attributes[:bill_to_contact] if attributes.key?(:bill_to_contact) self.bill_to_site = attributes[:bill_to_site] if attributes.key?(:bill_to_site) self.bill_unapproved_time_and_expense = attributes[:bill_unapproved_time_and_expense] if attributes.key?(:bill_unapproved_time_and_expense) self.board = attributes[:board] if attributes.key?(:board) self.budget_analysis = attributes[:budget_analysis] if attributes.key?(:budget_analysis) self.budget_flag = attributes[:budget_flag] if attributes.key?(:budget_flag) self.budget_hours = attributes[:budget_hours] if attributes.key?(:budget_hours) self.company = attributes[:company] if attributes.key?(:company) self.contact = attributes[:contact] if attributes.key?(:contact) self.customer_po = attributes[:customer_po] if attributes.key?(:customer_po) self.description = attributes[:description] if attributes.key?(:description) self.currency = attributes[:currency] if attributes.key?(:currency) self.downpayment = attributes[:downpayment] if attributes.key?(:downpayment) self.percent_complete = attributes[:percent_complete] if attributes.key?(:percent_complete) self.estimated_expense_revenue = attributes[:estimated_expense_revenue] if attributes.key?(:estimated_expense_revenue) self.estimated_hours = attributes[:estimated_hours] if attributes.key?(:estimated_hours) self.estimated_product_revenue = attributes[:estimated_product_revenue] if attributes.key?(:estimated_product_revenue) self.estimated_time_revenue = attributes[:estimated_time_revenue] if attributes.key?(:estimated_time_revenue) self.expense_approver = attributes[:expense_approver] if attributes.key?(:expense_approver) self.include_dependencies_flag = attributes[:include_dependencies_flag] if attributes.key?(:include_dependencies_flag) self.include_estimates_flag = attributes[:include_estimates_flag] if attributes.key?(:include_estimates_flag) self.location = attributes[:location] if attributes.key?(:location) self.department = attributes[:department] if attributes.key?(:department) self.manager = attributes[:manager] if attributes.key?(:manager) self.opportunity = attributes[:opportunity] if attributes.key?(:opportunity) self.project_template_id = attributes[:project_template_id] if attributes.key?(:project_template_id) self.restrict_down_payment_flag = attributes[:restrict_down_payment_flag] if attributes.key?(:restrict_down_payment_flag) self.scheduled_end = attributes[:scheduled_end] if attributes.key?(:scheduled_end) self.scheduled_hours = attributes[:scheduled_hours] if attributes.key?(:scheduled_hours) self.scheduled_start = attributes[:scheduled_start] if attributes.key?(:scheduled_start) self.ship_to_company = attributes[:ship_to_company] if attributes.key?(:ship_to_company) self.ship_to_contact = attributes[:ship_to_contact] if attributes.key?(:ship_to_contact) self.ship_to_site = attributes[:ship_to_site] if attributes.key?(:ship_to_site) self.site = attributes[:site] if attributes.key?(:site) self.status = attributes[:status] if attributes.key?(:status) self.closed_flag = attributes[:closed_flag] if attributes.key?(:closed_flag) self.time_approver = attributes[:time_approver] if attributes.key?(:time_approver) self.type = attributes[:type] if attributes.key?(:type) self.do_not_display_in_portal_flag = attributes[:do_not_display_in_portal_flag] if attributes.key?(:do_not_display_in_portal_flag) self.billing_start_date = attributes[:billing_start_date] if attributes.key?(:billing_start_date) self.estimated_time_cost = attributes[:estimated_time_cost] if attributes.key?(:estimated_time_cost) self.estimated_expense_cost = attributes[:estimated_expense_cost] if attributes.key?(:estimated_expense_cost) self.estimated_product_cost = attributes[:estimated_product_cost] if attributes.key?(:estimated_product_cost) self.tax_code = attributes[:tax_code] if attributes.key?(:tax_code) self.company_location = attributes[:company_location] if attributes.key?(:company_location) return unless attributes.key?(:custom_fields) return unless (value = attributes[:custom_fields]).is_a?(Array) self.custom_fields = value end |
Instance Attribute Details
#_info ⇒ Object
Returns the value of attribute _info.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def _info @_info end |
#actual_end ⇒ Object
Returns the value of attribute actual_end.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def actual_end @actual_end end |
#actual_hours ⇒ Object
Returns the value of attribute actual_hours.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def actual_hours @actual_hours end |
#actual_start ⇒ Object
Returns the value of attribute actual_start.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def actual_start @actual_start end |
#agreement ⇒ Object
Returns the value of attribute agreement.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def agreement @agreement end |
#bill_expenses ⇒ Object
Required On Updates;
22 23 24 |
# File 'lib/connect_wise/models/project.rb', line 22 def bill_expenses @bill_expenses end |
#bill_products ⇒ Object
Required On Updates;
31 32 33 |
# File 'lib/connect_wise/models/project.rb', line 31 def bill_products @bill_products end |
#bill_project_after_closed_flag ⇒ Object
Returns the value of attribute bill_project_after_closed_flag.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def bill_project_after_closed_flag @bill_project_after_closed_flag end |
#bill_time ⇒ Object
Required On Updates;
34 35 36 |
# File 'lib/connect_wise/models/project.rb', line 34 def bill_time @bill_time end |
#bill_to_company ⇒ Object
Returns the value of attribute bill_to_company.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def bill_to_company @bill_to_company end |
#bill_to_contact ⇒ Object
Returns the value of attribute bill_to_contact.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def bill_to_contact @bill_to_contact end |
#bill_to_site ⇒ Object
Returns the value of attribute bill_to_site.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def bill_to_site @bill_to_site end |
#bill_unapproved_time_and_expense ⇒ Object
Returns the value of attribute bill_unapproved_time_and_expense.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def bill_unapproved_time_and_expense @bill_unapproved_time_and_expense end |
#billing_amount ⇒ Object
Returns the value of attribute billing_amount.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def billing_amount @billing_amount end |
#billing_attention ⇒ Object
Max length: 50;
25 26 27 |
# File 'lib/connect_wise/models/project.rb', line 25 def billing_attention @billing_attention end |
#billing_method ⇒ Object
Returns the value of attribute billing_method.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def billing_method @billing_method end |
#billing_rate_type ⇒ Object
Required On Updates;
28 29 30 |
# File 'lib/connect_wise/models/project.rb', line 28 def billing_rate_type @billing_rate_type end |
#billing_start_date ⇒ Object
Returns the value of attribute billing_start_date.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def billing_start_date @billing_start_date end |
#billing_terms ⇒ Object
Returns the value of attribute billing_terms.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def billing_terms @billing_terms end |
#board ⇒ Object
Returns the value of attribute board.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def board @board end |
#budget_analysis ⇒ Object
Required On Updates;
37 38 39 |
# File 'lib/connect_wise/models/project.rb', line 37 def budget_analysis @budget_analysis end |
#budget_flag ⇒ Object
Returns the value of attribute budget_flag.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def budget_flag @budget_flag end |
#budget_hours ⇒ Object
Returns the value of attribute budget_hours.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def budget_hours @budget_hours end |
#closed_flag ⇒ Object
Returns the value of attribute closed_flag.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def closed_flag @closed_flag end |
#company ⇒ Object
Returns the value of attribute company.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def company @company end |
#company_location ⇒ Object
Returns the value of attribute company_location.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def company_location @company_location end |
#contact ⇒ Object
Returns the value of attribute contact.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def contact @contact end |
#currency ⇒ Object
Returns the value of attribute currency.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def currency @currency end |
#custom_fields ⇒ Object
Returns the value of attribute custom_fields.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def custom_fields @custom_fields end |
#customer_po ⇒ Object
Max length: 50;
40 41 42 |
# File 'lib/connect_wise/models/project.rb', line 40 def customer_po @customer_po end |
#department ⇒ Object
Returns the value of attribute department.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def department @department end |
#description ⇒ Object
Returns the value of attribute description.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def description @description end |
#do_not_display_in_portal_flag ⇒ Object
Returns the value of attribute do_not_display_in_portal_flag.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def do_not_display_in_portal_flag @do_not_display_in_portal_flag end |
#downpayment ⇒ Object
Returns the value of attribute downpayment.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def downpayment @downpayment end |
#estimated_end ⇒ Object
Returns the value of attribute estimated_end.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def estimated_end @estimated_end end |
#estimated_expense_cost ⇒ Object
Returns the value of attribute estimated_expense_cost.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def estimated_expense_cost @estimated_expense_cost end |
#estimated_expense_revenue ⇒ Object
Returns the value of attribute estimated_expense_revenue.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def estimated_expense_revenue @estimated_expense_revenue end |
#estimated_hours ⇒ Object
Returns the value of attribute estimated_hours.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def estimated_hours @estimated_hours end |
#estimated_product_cost ⇒ Object
Returns the value of attribute estimated_product_cost.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def estimated_product_cost @estimated_product_cost end |
#estimated_product_revenue ⇒ Object
Returns the value of attribute estimated_product_revenue.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def estimated_product_revenue @estimated_product_revenue end |
#estimated_start ⇒ Object
Returns the value of attribute estimated_start.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def estimated_start @estimated_start end |
#estimated_time_cost ⇒ Object
Returns the value of attribute estimated_time_cost.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def estimated_time_cost @estimated_time_cost end |
#estimated_time_revenue ⇒ Object
Returns the value of attribute estimated_time_revenue.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def estimated_time_revenue @estimated_time_revenue end |
#expense_approver ⇒ Object
Returns the value of attribute expense_approver.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def expense_approver @expense_approver end |
#id ⇒ Object
Returns the value of attribute id.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def id @id end |
#include_dependencies_flag ⇒ Object
Returns the value of attribute include_dependencies_flag.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def include_dependencies_flag @include_dependencies_flag end |
#include_estimates_flag ⇒ Object
Returns the value of attribute include_estimates_flag.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def include_estimates_flag @include_estimates_flag end |
#location ⇒ Object
Returns the value of attribute location.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def location @location end |
#manager ⇒ Object
Returns the value of attribute manager.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def manager @manager end |
#name ⇒ Object
Max length: 100;
19 20 21 |
# File 'lib/connect_wise/models/project.rb', line 19 def name @name end |
#opportunity ⇒ Object
Returns the value of attribute opportunity.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def opportunity @opportunity end |
#percent_complete ⇒ Object
Returns the value of attribute percent_complete.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def percent_complete @percent_complete end |
#project_template_id ⇒ Object
Returns the value of attribute project_template_id.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def project_template_id @project_template_id end |
#restrict_down_payment_flag ⇒ Object
Returns the value of attribute restrict_down_payment_flag.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def restrict_down_payment_flag @restrict_down_payment_flag end |
#scheduled_end ⇒ Object
Returns the value of attribute scheduled_end.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def scheduled_end @scheduled_end end |
#scheduled_hours ⇒ Object
Returns the value of attribute scheduled_hours.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def scheduled_hours @scheduled_hours end |
#scheduled_start ⇒ Object
Returns the value of attribute scheduled_start.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def scheduled_start @scheduled_start end |
#ship_to_company ⇒ Object
Returns the value of attribute ship_to_company.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def ship_to_company @ship_to_company end |
#ship_to_contact ⇒ Object
Returns the value of attribute ship_to_contact.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def ship_to_contact @ship_to_contact end |
#ship_to_site ⇒ Object
Returns the value of attribute ship_to_site.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def ship_to_site @ship_to_site end |
#site ⇒ Object
Returns the value of attribute site.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def site @site end |
#status ⇒ Object
Returns the value of attribute status.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def status @status end |
#tax_code ⇒ Object
Returns the value of attribute tax_code.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def tax_code @tax_code end |
#time_approver ⇒ Object
Returns the value of attribute time_approver.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def time_approver @time_approver end |
#type ⇒ Object
Returns the value of attribute type.
16 17 18 |
# File 'lib/connect_wise/models/project.rb', line 16 def type @type end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
135 136 137 |
# File 'lib/connect_wise/models/project.rb', line 135 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/connect_wise/models/project.rb', line 64 def self.attribute_map { billing_method: :billingMethod, estimated_end: :estimatedEnd, estimated_start: :estimatedStart, name: :name, id: :id, _info: :_info, actual_end: :actualEnd, actual_hours: :actualHours, actual_start: :actualStart, agreement: :agreement, bill_expenses: :billExpenses, billing_amount: :billingAmount, billing_attention: :billingAttention, billing_rate_type: :billingRateType, billing_terms: :billingTerms, bill_products: :billProducts, bill_project_after_closed_flag: :billProjectAfterClosedFlag, bill_time: :billTime, bill_to_company: :billToCompany, bill_to_contact: :billToContact, bill_to_site: :billToSite, bill_unapproved_time_and_expense: :billUnapprovedTimeAndExpense, board: :board, budget_analysis: :budgetAnalysis, budget_flag: :budgetFlag, budget_hours: :budgetHours, company: :company, contact: :contact, customer_po: :customerPO, description: :description, currency: :currency, downpayment: :downpayment, percent_complete: :percentComplete, estimated_expense_revenue: :estimatedExpenseRevenue, estimated_hours: :estimatedHours, estimated_product_revenue: :estimatedProductRevenue, estimated_time_revenue: :estimatedTimeRevenue, expense_approver: :expenseApprover, include_dependencies_flag: :includeDependenciesFlag, include_estimates_flag: :includeEstimatesFlag, location: :location, department: :department, manager: :manager, opportunity: :opportunity, project_template_id: :projectTemplateId, restrict_down_payment_flag: :restrictDownPaymentFlag, scheduled_end: :scheduledEnd, scheduled_hours: :scheduledHours, scheduled_start: :scheduledStart, ship_to_company: :shipToCompany, ship_to_contact: :shipToContact, ship_to_site: :shipToSite, site: :site, status: :status, closed_flag: :closedFlag, time_approver: :timeApprover, type: :type, do_not_display_in_portal_flag: :doNotDisplayInPortalFlag, billing_start_date: :billingStartDate, estimated_time_cost: :estimatedTimeCost, estimated_expense_cost: :estimatedExpenseCost, estimated_product_cost: :estimatedProductCost, tax_code: :taxCode, company_location: :companyLocation, custom_fields: :customFields } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
573 574 575 |
# File 'lib/connect_wise/models/project.rb', line 573 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/connect_wise/models/project.rb', line 211 def self.openapi_nullable Set.new(%i[ billing_method actual_hours bill_expenses billing_amount billing_rate_type bill_products bill_project_after_closed_flag bill_time bill_unapproved_time_and_expense budget_analysis budget_flag budget_hours downpayment percent_complete estimated_expense_revenue estimated_hours estimated_product_revenue estimated_time_revenue include_dependencies_flag include_estimates_flag project_template_id restrict_down_payment_flag scheduled_hours do_not_display_in_portal_flag estimated_time_cost estimated_expense_cost estimated_product_cost ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 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 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 |
# File 'lib/connect_wise/models/project.rb', line 140 def self.openapi_types { billing_method: :String, estimated_end: :Time, estimated_start: :Time, name: :String, id: :Integer, _info: :'Hash<String, String>', actual_end: :Time, actual_hours: :Float, actual_start: :Time, agreement: :AgreementReference, bill_expenses: :String, billing_amount: :Float, billing_attention: :String, billing_rate_type: :String, billing_terms: :BillingTermsReference, bill_products: :String, bill_project_after_closed_flag: :Boolean, bill_time: :String, bill_to_company: :CompanyReference, bill_to_contact: :ContactReference, bill_to_site: :SiteReference, bill_unapproved_time_and_expense: :Boolean, board: :ProjectBoardReference, budget_analysis: :String, budget_flag: :Boolean, budget_hours: :Float, company: :CompanyReference, contact: :ContactReference, customer_po: :String, description: :String, currency: :CurrencyReference, downpayment: :Float, percent_complete: :Float, estimated_expense_revenue: :Float, estimated_hours: :Float, estimated_product_revenue: :Float, estimated_time_revenue: :Float, expense_approver: :MemberReference, include_dependencies_flag: :Boolean, include_estimates_flag: :Boolean, location: :SystemLocationReference, department: :SystemDepartmentReference, manager: :MemberReference, opportunity: :OpportunityReference, project_template_id: :Integer, restrict_down_payment_flag: :Boolean, scheduled_end: :Time, scheduled_hours: :Float, scheduled_start: :Time, ship_to_company: :CompanyReference, ship_to_contact: :ContactReference, ship_to_site: :SiteReference, site: :SiteReference, status: :ProjectStatusReference, closed_flag: :Boolean, time_approver: :MemberReference, type: :ProjectTypeReference, do_not_display_in_portal_flag: :Boolean, billing_start_date: :Time, estimated_time_cost: :Float, estimated_expense_cost: :Float, estimated_product_cost: :Float, tax_code: :TaxCodeReference, company_location: :SystemLocationReference, custom_fields: :'Array<CustomFieldValue>' } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 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 551 552 553 554 555 556 |
# File 'lib/connect_wise/models/project.rb', line 487 def ==(other) return true if equal?(other) self.class == other.class && billing_method == other.billing_method && estimated_end == other.estimated_end && estimated_start == other.estimated_start && name == other.name && id == other.id && _info == other._info && actual_end == other.actual_end && actual_hours == other.actual_hours && actual_start == other.actual_start && agreement == other.agreement && bill_expenses == other.bill_expenses && billing_amount == other.billing_amount && billing_attention == other.billing_attention && billing_rate_type == other.billing_rate_type && billing_terms == other.billing_terms && bill_products == other.bill_products && bill_project_after_closed_flag == other.bill_project_after_closed_flag && bill_time == other.bill_time && bill_to_company == other.bill_to_company && bill_to_contact == other.bill_to_contact && bill_to_site == other.bill_to_site && bill_unapproved_time_and_expense == other.bill_unapproved_time_and_expense && board == other.board && budget_analysis == other.budget_analysis && budget_flag == other.budget_flag && budget_hours == other.budget_hours && company == other.company && contact == other.contact && customer_po == other.customer_po && description == other.description && currency == other.currency && downpayment == other.downpayment && percent_complete == other.percent_complete && estimated_expense_revenue == other.estimated_expense_revenue && estimated_hours == other.estimated_hours && estimated_product_revenue == other.estimated_product_revenue && estimated_time_revenue == other.estimated_time_revenue && expense_approver == other.expense_approver && include_dependencies_flag == other.include_dependencies_flag && include_estimates_flag == other.include_estimates_flag && location == other.location && department == other.department && manager == other.manager && opportunity == other.opportunity && project_template_id == other.project_template_id && restrict_down_payment_flag == other.restrict_down_payment_flag && scheduled_end == other.scheduled_end && scheduled_hours == other.scheduled_hours && scheduled_start == other.scheduled_start && ship_to_company == other.ship_to_company && ship_to_contact == other.ship_to_contact && ship_to_site == other.ship_to_site && site == other.site && status == other.status && closed_flag == other.closed_flag && time_approver == other.time_approver && type == other.type && do_not_display_in_portal_flag == other.do_not_display_in_portal_flag && billing_start_date == other.billing_start_date && estimated_time_cost == other.estimated_time_cost && estimated_expense_cost == other.estimated_expense_cost && estimated_product_cost == other.estimated_product_cost && tax_code == other.tax_code && company_location == other.company_location && custom_fields == other.custom_fields end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 |
# File 'lib/connect_wise/models/project.rb', line 603 def _deserialize(type, value) case type.to_sym when :Time Time.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 # models (e.g. Pet) or oneOf klass = ConnectWise.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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
674 675 676 677 678 679 680 681 682 683 684 685 686 |
# File 'lib/connect_wise/models/project.rb', line 674 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
580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 |
# File 'lib/connect_wise/models/project.rb', line 580 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) send("#{key}=", nil) elsif 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 send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize(::Regexp.last_match(1), v) }) if attributes[self.class.attribute_map[key]].is_a?(Array) elsif !attributes[self.class.attribute_map[key]].nil? send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(other) ⇒ Boolean
560 561 562 |
# File 'lib/connect_wise/models/project.rb', line 560 def eql?(other) self == other end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
566 567 568 |
# File 'lib/connect_wise/models/project.rb', line 566 def hash [billing_method, estimated_end, estimated_start, name, id, _info, actual_end, actual_hours, actual_start, agreement, bill_expenses, billing_amount, billing_attention, billing_rate_type, billing_terms, bill_products, bill_project_after_closed_flag, bill_time, bill_to_company, bill_to_contact, bill_to_site, bill_unapproved_time_and_expense, board, budget_analysis, budget_flag, budget_hours, company, contact, customer_po, description, currency, downpayment, percent_complete, estimated_expense_revenue, estimated_hours, estimated_product_revenue, estimated_time_revenue, expense_approver, include_dependencies_flag, include_estimates_flag, location, department, manager, opportunity, project_template_id, restrict_down_payment_flag, scheduled_end, scheduled_hours, scheduled_start, ship_to_company, ship_to_contact, ship_to_site, site, status, closed_flag, time_approver, type, do_not_display_in_portal_flag, billing_start_date, estimated_time_cost, estimated_expense_cost, estimated_product_cost, tax_code, company_location, custom_fields].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
393 394 395 396 397 398 399 400 401 402 |
# File 'lib/connect_wise/models/project.rb', line 393 def list_invalid_properties invalid_properties = [] invalid_properties.push('invalid value for "estimated_end", estimated_end cannot be nil.') if @estimated_end.nil? invalid_properties.push('invalid value for "estimated_start", estimated_start cannot be nil.') if @estimated_start.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') if @name.nil? invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
650 651 652 |
# File 'lib/connect_wise/models/project.rb', line 650 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
656 657 658 659 660 661 662 663 664 665 666 667 668 |
# File 'lib/connect_wise/models/project.rb', line 656 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
644 645 646 |
# File 'lib/connect_wise/models/project.rb', line 644 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 |
# File 'lib/connect_wise/models/project.rb', line 406 def valid? billing_method_validator = EnumAttributeValidator.new('String', %w[ActualRates FixedFee NotToExceed OverrideRate]) return false unless billing_method_validator.valid?(@billing_method) return false if @estimated_end.nil? return false if @estimated_start.nil? return false if @name.nil? bill_expenses_validator = EnumAttributeValidator.new('String', %w[Billable DoNotBill NoCharge NoDefault]) return false unless bill_expenses_validator.valid?(@bill_expenses) billing_rate_type_validator = EnumAttributeValidator.new('String', %w[StaffMember WorkRole]) return false unless billing_rate_type_validator.valid?(@billing_rate_type) bill_products_validator = EnumAttributeValidator.new('String', %w[Billable DoNotBill NoCharge NoDefault]) return false unless bill_products_validator.valid?(@bill_products) bill_time_validator = EnumAttributeValidator.new('String', %w[Billable DoNotBill NoCharge NoDefault]) return false unless bill_time_validator.valid?(@bill_time) budget_analysis_validator = EnumAttributeValidator.new('String', %w[ActualHours BillableHours]) return false unless budget_analysis_validator.valid?(@budget_analysis) true end |