Class: TripletexRubyClient::Order
- Inherits:
-
Object
- Object
- TripletexRubyClient::Order
- Defined in:
- lib/tripletex_ruby_client/models/order.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#attachment ⇒ Object
- BETA
-
Attachments belonging to this order.
-
#attn ⇒ Object
Returns the value of attribute attn.
-
#can_create_backorder ⇒ Object
Returns the value of attribute can_create_backorder.
-
#changes ⇒ Object
Returns the value of attribute changes.
-
#contact ⇒ Object
Returns the value of attribute contact.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#customer ⇒ Object
Returns the value of attribute customer.
-
#delivery_address ⇒ Object
Delivery address of this order.
-
#delivery_comment ⇒ Object
Returns the value of attribute delivery_comment.
-
#delivery_date ⇒ Object
Returns the value of attribute delivery_date.
-
#department ⇒ Object
Returns the value of attribute department.
-
#id ⇒ Object
Returns the value of attribute id.
-
#invoice_comment ⇒ Object
Comment to be displayed in the invoice based on this order.
-
#invoice_on_account_vat_high ⇒ Object
Is the on account(a konto) amounts including vat.
-
#invoices_due_in ⇒ Object
Number of days/months in which invoices created from this order is due.
-
#invoices_due_in_type ⇒ Object
Set the time unit of invoicesDueIn.
-
#is_closed ⇒ Object
Denotes if this order is closed.
-
#is_prioritize_amounts_including_vat ⇒ Object
Returns the value of attribute is_prioritize_amounts_including_vat.
-
#is_show_open_posts_on_invoices ⇒ Object
Show account statement - open posts on invoices created from this order.
-
#is_subscription ⇒ Object
If true, the order is a subscription, which enables periodical invoicing of order lines.
-
#is_subscription_auto_invoicing ⇒ Object
Automatic invoicing.
-
#number ⇒ Object
Returns the value of attribute number.
-
#order_date ⇒ Object
Returns the value of attribute order_date.
-
#order_line_sorting ⇒ Object
Returns the value of attribute order_line_sorting.
-
#order_lines ⇒ Object
Order lines tied to the order.
-
#our_contact ⇒ Object
If the contact is not an employee.
-
#our_contact_employee ⇒ Object
If the contact is an employee.
-
#overdue_notice_email ⇒ Object
Returns the value of attribute overdue_notice_email.
-
#preliminary_invoice ⇒ Object
- BETA
-
Preliminary invoice if order is not charged.
-
#project ⇒ Object
Returns the value of attribute project.
-
#receiver_email ⇒ Object
Returns the value of attribute receiver_email.
-
#reference ⇒ Object
Returns the value of attribute reference.
-
#send_method_description ⇒ Object
Description of how this invoice will be sent.
-
#subscription_duration ⇒ Object
Number of months/years the subscription shall run.
-
#subscription_duration_type ⇒ Object
The time unit of subscriptionDuration.
-
#subscription_invoicing_time ⇒ Object
Number of days/months invoicing in advance/in arrears.
-
#subscription_invoicing_time_in_advance_or_arrears ⇒ Object
Invoicing in advance/in arrears.
-
#subscription_invoicing_time_type ⇒ Object
The time unit of subscriptionInvoicingTime.
-
#subscription_periods_on_invoice ⇒ Object
Number of periods on each invoice.
-
#subscription_periods_on_invoice_type ⇒ Object
The time unit of subscriptionPeriodsOnInvoice.
-
#total_invoiced_on_account_amount_absolute_currency ⇒ Object
Amount paid on account(a konto).
-
#url ⇒ Object
Returns the value of attribute url.
-
#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 = {}) ⇒ Order
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 = {}) ⇒ Order
Initializes the object
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 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 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 248 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?(:'customer') self.customer = attributes[:'customer'] end if attributes.has_key?(:'contact') self.contact = attributes[:'contact'] end if attributes.has_key?(:'attn') self.attn = attributes[:'attn'] end if attributes.has_key?(:'receiverEmail') self.receiver_email = attributes[:'receiverEmail'] end if attributes.has_key?(:'overdueNoticeEmail') self.overdue_notice_email = attributes[:'overdueNoticeEmail'] end if attributes.has_key?(:'number') self.number = attributes[:'number'] end if attributes.has_key?(:'reference') self.reference = attributes[:'reference'] end if attributes.has_key?(:'ourContact') self.our_contact = attributes[:'ourContact'] end if attributes.has_key?(:'ourContactEmployee') self.our_contact_employee = attributes[:'ourContactEmployee'] end if attributes.has_key?(:'department') self.department = attributes[:'department'] end if attributes.has_key?(:'orderDate') self.order_date = attributes[:'orderDate'] end if attributes.has_key?(:'project') self.project = attributes[:'project'] end if attributes.has_key?(:'invoiceComment') self.invoice_comment = attributes[:'invoiceComment'] end if attributes.has_key?(:'currency') self.currency = attributes[:'currency'] end if attributes.has_key?(:'invoicesDueIn') self.invoices_due_in = attributes[:'invoicesDueIn'] end if attributes.has_key?(:'invoicesDueInType') self.invoices_due_in_type = attributes[:'invoicesDueInType'] end if attributes.has_key?(:'isShowOpenPostsOnInvoices') self.is_show_open_posts_on_invoices = attributes[:'isShowOpenPostsOnInvoices'] end if attributes.has_key?(:'isClosed') self.is_closed = attributes[:'isClosed'] end if attributes.has_key?(:'deliveryDate') self.delivery_date = attributes[:'deliveryDate'] end if attributes.has_key?(:'deliveryAddress') self.delivery_address = attributes[:'deliveryAddress'] end if attributes.has_key?(:'deliveryComment') self.delivery_comment = attributes[:'deliveryComment'] end if attributes.has_key?(:'isPrioritizeAmountsIncludingVat') self.is_prioritize_amounts_including_vat = attributes[:'isPrioritizeAmountsIncludingVat'] end if attributes.has_key?(:'orderLineSorting') self.order_line_sorting = attributes[:'orderLineSorting'] end if attributes.has_key?(:'orderLines') if (value = attributes[:'orderLines']).is_a?(Array) self.order_lines = value end end if attributes.has_key?(:'isSubscription') self.is_subscription = attributes[:'isSubscription'] end if attributes.has_key?(:'subscriptionDuration') self.subscription_duration = attributes[:'subscriptionDuration'] end if attributes.has_key?(:'subscriptionDurationType') self.subscription_duration_type = attributes[:'subscriptionDurationType'] end if attributes.has_key?(:'subscriptionPeriodsOnInvoice') self.subscription_periods_on_invoice = attributes[:'subscriptionPeriodsOnInvoice'] end if attributes.has_key?(:'subscriptionPeriodsOnInvoiceType') self.subscription_periods_on_invoice_type = attributes[:'subscriptionPeriodsOnInvoiceType'] end if attributes.has_key?(:'subscriptionInvoicingTimeInAdvanceOrArrears') self.subscription_invoicing_time_in_advance_or_arrears = attributes[:'subscriptionInvoicingTimeInAdvanceOrArrears'] end if attributes.has_key?(:'subscriptionInvoicingTime') self.subscription_invoicing_time = attributes[:'subscriptionInvoicingTime'] end if attributes.has_key?(:'subscriptionInvoicingTimeType') self.subscription_invoicing_time_type = attributes[:'subscriptionInvoicingTimeType'] end if attributes.has_key?(:'isSubscriptionAutoInvoicing') self.is_subscription_auto_invoicing = attributes[:'isSubscriptionAutoInvoicing'] end if attributes.has_key?(:'preliminaryInvoice') self.preliminary_invoice = attributes[:'preliminaryInvoice'] end if attributes.has_key?(:'attachment') if (value = attributes[:'attachment']).is_a?(Array) self. = value end end if attributes.has_key?(:'sendMethodDescription') self.send_method_description = attributes[:'sendMethodDescription'] end if attributes.has_key?(:'canCreateBackorder') self.can_create_backorder = attributes[:'canCreateBackorder'] end if attributes.has_key?(:'invoiceOnAccountVatHigh') self.invoice_on_account_vat_high = attributes[:'invoiceOnAccountVatHigh'] end if attributes.has_key?(:'totalInvoicedOnAccountAmountAbsoluteCurrency') self.total_invoiced_on_account_amount_absolute_currency = attributes[:'totalInvoicedOnAccountAmountAbsoluteCurrency'] end end |
Instance Attribute Details
#attachment ⇒ Object
- BETA
-
Attachments belonging to this order
113 114 115 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 113 def @attachment end |
#attn ⇒ Object
Returns the value of attribute attn.
29 30 31 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 29 def attn @attn end |
#can_create_backorder ⇒ Object
Returns the value of attribute can_create_backorder.
118 119 120 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 118 def can_create_backorder @can_create_backorder end |
#changes ⇒ Object
Returns the value of attribute changes.
21 22 23 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 21 def changes @changes end |
#contact ⇒ Object
Returns the value of attribute contact.
27 28 29 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 27 def contact @contact end |
#currency ⇒ Object
Returns the value of attribute currency.
54 55 56 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 54 def currency @currency end |
#customer ⇒ Object
Returns the value of attribute customer.
25 26 27 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 25 def customer @customer end |
#delivery_address ⇒ Object
Delivery address of this order. This can be a new or existing address (useful to know, especially if the delivery is to a private person: if ‘deliveryAddress.name’ is set, we ignore the state of ‘customer.id’)
71 72 73 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 71 def delivery_address @delivery_address end |
#delivery_comment ⇒ Object
Returns the value of attribute delivery_comment.
73 74 75 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 73 def delivery_comment @delivery_comment end |
#delivery_date ⇒ Object
Returns the value of attribute delivery_date.
68 69 70 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 68 def delivery_date @delivery_date end |
#department ⇒ Object
Returns the value of attribute department.
45 46 47 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 45 def department @department end |
#id ⇒ Object
Returns the value of attribute id.
17 18 19 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 17 def id @id end |
#invoice_comment ⇒ Object
Comment to be displayed in the invoice based on this order. Can be also found in Invoice.invoiceComment on Invoice objects.
52 53 54 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 52 def invoice_comment @invoice_comment end |
#invoice_on_account_vat_high ⇒ Object
Is the on account(a konto) amounts including vat
121 122 123 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 121 def invoice_on_account_vat_high @invoice_on_account_vat_high end |
#invoices_due_in ⇒ Object
Number of days/months in which invoices created from this order is due
57 58 59 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 57 def invoices_due_in @invoices_due_in end |
#invoices_due_in_type ⇒ Object
Set the time unit of invoicesDueIn. The special case RECURRING_DAY_OF_MONTH enables the due date to be fixed to a specific day of the month, in this case the fixed due date will automatically be set as standard on all invoices created from this order. Note that when RECURRING_DAY_OF_MONTH is set, the due date will be set to the last day of month if "31" is set in invoicesDueIn.
60 61 62 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 60 def invoices_due_in_type @invoices_due_in_type end |
#is_closed ⇒ Object
Denotes if this order is closed. A closed order can no longer be invoiced unless it is opened again.
66 67 68 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 66 def is_closed @is_closed end |
#is_prioritize_amounts_including_vat ⇒ Object
Returns the value of attribute is_prioritize_amounts_including_vat.
75 76 77 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 75 def is_prioritize_amounts_including_vat @is_prioritize_amounts_including_vat end |
#is_show_open_posts_on_invoices ⇒ Object
Show account statement - open posts on invoices created from this order
63 64 65 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 63 def is_show_open_posts_on_invoices @is_show_open_posts_on_invoices end |
#is_subscription ⇒ Object
If true, the order is a subscription, which enables periodical invoicing of order lines. First, create an order with isSubscription=true, then approve it for subscription invoicing with the :approveSubscriptionInvoice method.
83 84 85 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 83 def is_subscription @is_subscription end |
#is_subscription_auto_invoicing ⇒ Object
Automatic invoicing. Starts when the subscription is approved
107 108 109 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 107 def is_subscription_auto_invoicing @is_subscription_auto_invoicing end |
#number ⇒ Object
Returns the value of attribute number.
35 36 37 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 35 def number @number end |
#order_date ⇒ Object
Returns the value of attribute order_date.
47 48 49 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 47 def order_date @order_date end |
#order_line_sorting ⇒ Object
Returns the value of attribute order_line_sorting.
77 78 79 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 77 def order_line_sorting @order_line_sorting end |
#order_lines ⇒ Object
Order lines tied to the order. New OrderLines may be embedded here, in some endpoints.
80 81 82 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 80 def order_lines @order_lines end |
#our_contact ⇒ Object
If the contact is not an employee
40 41 42 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 40 def our_contact @our_contact end |
#our_contact_employee ⇒ Object
If the contact is an employee
43 44 45 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 43 def our_contact_employee @our_contact_employee end |
#overdue_notice_email ⇒ Object
Returns the value of attribute overdue_notice_email.
33 34 35 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 33 def overdue_notice_email @overdue_notice_email end |
#preliminary_invoice ⇒ Object
- BETA
-
Preliminary invoice if order is not charged
110 111 112 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 110 def preliminary_invoice @preliminary_invoice end |
#project ⇒ Object
Returns the value of attribute project.
49 50 51 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 49 def project @project end |
#receiver_email ⇒ Object
Returns the value of attribute receiver_email.
31 32 33 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 31 def receiver_email @receiver_email end |
#reference ⇒ Object
Returns the value of attribute reference.
37 38 39 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 37 def reference @reference end |
#send_method_description ⇒ Object
Description of how this invoice will be sent
116 117 118 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 116 def send_method_description @send_method_description end |
#subscription_duration ⇒ Object
Number of months/years the subscription shall run
86 87 88 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 86 def subscription_duration @subscription_duration end |
#subscription_duration_type ⇒ Object
The time unit of subscriptionDuration
89 90 91 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 89 def subscription_duration_type @subscription_duration_type end |
#subscription_invoicing_time ⇒ Object
Number of days/months invoicing in advance/in arrears
101 102 103 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 101 def subscription_invoicing_time @subscription_invoicing_time end |
#subscription_invoicing_time_in_advance_or_arrears ⇒ Object
Invoicing in advance/in arrears
98 99 100 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 98 def subscription_invoicing_time_in_advance_or_arrears @subscription_invoicing_time_in_advance_or_arrears end |
#subscription_invoicing_time_type ⇒ Object
The time unit of subscriptionInvoicingTime
104 105 106 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 104 def subscription_invoicing_time_type @subscription_invoicing_time_type end |
#subscription_periods_on_invoice ⇒ Object
Number of periods on each invoice
92 93 94 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 92 def subscription_periods_on_invoice @subscription_periods_on_invoice end |
#subscription_periods_on_invoice_type ⇒ Object
The time unit of subscriptionPeriodsOnInvoice
95 96 97 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 95 def subscription_periods_on_invoice_type @subscription_periods_on_invoice_type end |
#total_invoiced_on_account_amount_absolute_currency ⇒ Object
Amount paid on account(a konto)
124 125 126 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 124 def total_invoiced_on_account_amount_absolute_currency @total_invoiced_on_account_amount_absolute_currency end |
#url ⇒ Object
Returns the value of attribute url.
23 24 25 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 23 def url @url end |
#version ⇒ Object
Returns the value of attribute version.
19 20 21 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 19 def version @version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 149 def self.attribute_map { :'id' => :'id', :'version' => :'version', :'changes' => :'changes', :'url' => :'url', :'customer' => :'customer', :'contact' => :'contact', :'attn' => :'attn', :'receiver_email' => :'receiverEmail', :'overdue_notice_email' => :'overdueNoticeEmail', :'number' => :'number', :'reference' => :'reference', :'our_contact' => :'ourContact', :'our_contact_employee' => :'ourContactEmployee', :'department' => :'department', :'order_date' => :'orderDate', :'project' => :'project', :'invoice_comment' => :'invoiceComment', :'currency' => :'currency', :'invoices_due_in' => :'invoicesDueIn', :'invoices_due_in_type' => :'invoicesDueInType', :'is_show_open_posts_on_invoices' => :'isShowOpenPostsOnInvoices', :'is_closed' => :'isClosed', :'delivery_date' => :'deliveryDate', :'delivery_address' => :'deliveryAddress', :'delivery_comment' => :'deliveryComment', :'is_prioritize_amounts_including_vat' => :'isPrioritizeAmountsIncludingVat', :'order_line_sorting' => :'orderLineSorting', :'order_lines' => :'orderLines', :'is_subscription' => :'isSubscription', :'subscription_duration' => :'subscriptionDuration', :'subscription_duration_type' => :'subscriptionDurationType', :'subscription_periods_on_invoice' => :'subscriptionPeriodsOnInvoice', :'subscription_periods_on_invoice_type' => :'subscriptionPeriodsOnInvoiceType', :'subscription_invoicing_time_in_advance_or_arrears' => :'subscriptionInvoicingTimeInAdvanceOrArrears', :'subscription_invoicing_time' => :'subscriptionInvoicingTime', :'subscription_invoicing_time_type' => :'subscriptionInvoicingTimeType', :'is_subscription_auto_invoicing' => :'isSubscriptionAutoInvoicing', :'preliminary_invoice' => :'preliminaryInvoice', :'attachment' => :'attachment', :'send_method_description' => :'sendMethodDescription', :'can_create_backorder' => :'canCreateBackorder', :'invoice_on_account_vat_high' => :'invoiceOnAccountVatHigh', :'total_invoiced_on_account_amount_absolute_currency' => :'totalInvoicedOnAccountAmountAbsoluteCurrency' } end |
.swagger_types ⇒ Object
Attribute type mapping.
198 199 200 201 202 203 204 205 206 207 208 209 210 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 242 243 244 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 198 def self.swagger_types { :'id' => :'Integer', :'version' => :'Integer', :'changes' => :'Array<Change>', :'url' => :'String', :'customer' => :'Customer', :'contact' => :'Contact', :'attn' => :'Contact', :'receiver_email' => :'String', :'overdue_notice_email' => :'String', :'number' => :'String', :'reference' => :'String', :'our_contact' => :'Contact', :'our_contact_employee' => :'Employee', :'department' => :'Department', :'order_date' => :'String', :'project' => :'Project', :'invoice_comment' => :'String', :'currency' => :'Currency', :'invoices_due_in' => :'Integer', :'invoices_due_in_type' => :'String', :'is_show_open_posts_on_invoices' => :'BOOLEAN', :'is_closed' => :'BOOLEAN', :'delivery_date' => :'String', :'delivery_address' => :'DeliveryAddress', :'delivery_comment' => :'String', :'is_prioritize_amounts_including_vat' => :'BOOLEAN', :'order_line_sorting' => :'String', :'order_lines' => :'Array<OrderLine>', :'is_subscription' => :'BOOLEAN', :'subscription_duration' => :'Integer', :'subscription_duration_type' => :'String', :'subscription_periods_on_invoice' => :'Integer', :'subscription_periods_on_invoice_type' => :'String', :'subscription_invoicing_time_in_advance_or_arrears' => :'String', :'subscription_invoicing_time' => :'Integer', :'subscription_invoicing_time_type' => :'String', :'is_subscription_auto_invoicing' => :'BOOLEAN', :'preliminary_invoice' => :'Invoice', :'attachment' => :'Array<Document>', :'send_method_description' => :'String', :'can_create_backorder' => :'BOOLEAN', :'invoice_on_account_vat_high' => :'BOOLEAN', :'total_invoiced_on_account_amount_absolute_currency' => :'Float' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 703 704 705 706 707 708 709 710 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 664 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && version == o.version && changes == o.changes && url == o.url && customer == o.customer && contact == o.contact && attn == o.attn && receiver_email == o.receiver_email && overdue_notice_email == o.overdue_notice_email && number == o.number && reference == o.reference && our_contact == o.our_contact && our_contact_employee == o.our_contact_employee && department == o.department && order_date == o.order_date && project == o.project && invoice_comment == o.invoice_comment && currency == o.currency && invoices_due_in == o.invoices_due_in && invoices_due_in_type == o.invoices_due_in_type && is_show_open_posts_on_invoices == o.is_show_open_posts_on_invoices && is_closed == o.is_closed && delivery_date == o.delivery_date && delivery_address == o.delivery_address && delivery_comment == o.delivery_comment && is_prioritize_amounts_including_vat == o.is_prioritize_amounts_including_vat && order_line_sorting == o.order_line_sorting && order_lines == o.order_lines && is_subscription == o.is_subscription && subscription_duration == o.subscription_duration && subscription_duration_type == o.subscription_duration_type && subscription_periods_on_invoice == o.subscription_periods_on_invoice && subscription_periods_on_invoice_type == o.subscription_periods_on_invoice_type && subscription_invoicing_time_in_advance_or_arrears == o.subscription_invoicing_time_in_advance_or_arrears && subscription_invoicing_time == o.subscription_invoicing_time && subscription_invoicing_time_type == o.subscription_invoicing_time_type && is_subscription_auto_invoicing == o.is_subscription_auto_invoicing && preliminary_invoice == o.preliminary_invoice && == o. && send_method_description == o.send_method_description && can_create_backorder == o.can_create_backorder && invoice_on_account_vat_high == o.invoice_on_account_vat_high && total_invoiced_on_account_amount_absolute_currency == o.total_invoiced_on_account_amount_absolute_currency end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 777 778 779 780 781 782 783 784 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 748 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
814 815 816 817 818 819 820 821 822 823 824 825 826 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 814 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
727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 727 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
714 715 716 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 714 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
720 721 722 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 720 def hash [id, version, changes, url, customer, contact, attn, receiver_email, overdue_notice_email, number, reference, our_contact, our_contact_employee, department, order_date, project, invoice_comment, currency, invoices_due_in, invoices_due_in_type, is_show_open_posts_on_invoices, is_closed, delivery_date, delivery_address, delivery_comment, is_prioritize_amounts_including_vat, order_line_sorting, order_lines, is_subscription, subscription_duration, subscription_duration_type, subscription_periods_on_invoice, subscription_periods_on_invoice_type, subscription_invoicing_time_in_advance_or_arrears, subscription_invoicing_time, subscription_invoicing_time_type, is_subscription_auto_invoicing, preliminary_invoice, , send_method_description, can_create_backorder, invoice_on_account_vat_high, total_invoiced_on_account_amount_absolute_currency].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 435 def list_invalid_properties invalid_properties = Array.new if @customer.nil? invalid_properties.push('invalid value for "customer", customer cannot be nil.') end if !@receiver_email.nil? && @receiver_email.to_s.length > 254 invalid_properties.push('invalid value for "receiver_email", the character length must be smaller than or equal to 254.') end if !@overdue_notice_email.nil? && @overdue_notice_email.to_s.length > 254 invalid_properties.push('invalid value for "overdue_notice_email", the character length must be smaller than or equal to 254.') 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 !@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 @order_date.nil? invalid_properties.push('invalid value for "order_date", order_date cannot be nil.') end if !@invoices_due_in.nil? && @invoices_due_in > 10000 invalid_properties.push('invalid value for "invoices_due_in", must be smaller than or equal to 10000.') end if !@invoices_due_in.nil? && @invoices_due_in < 0 invalid_properties.push('invalid value for "invoices_due_in", must be greater than or equal to 0.') end if @delivery_date.nil? invalid_properties.push('invalid value for "delivery_date", delivery_date cannot be nil.') end if !@subscription_duration.nil? && @subscription_duration < 0 invalid_properties.push('invalid value for "subscription_duration", must be greater than or equal to 0.') end if !@subscription_periods_on_invoice.nil? && @subscription_periods_on_invoice < 0 invalid_properties.push('invalid value for "subscription_periods_on_invoice", must be greater than or equal to 0.') end if !@subscription_invoicing_time.nil? && @subscription_invoicing_time < 0 invalid_properties.push('invalid value for "subscription_invoicing_time", must be greater than or equal to 0.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
794 795 796 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 794 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
800 801 802 803 804 805 806 807 808 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 800 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
788 789 790 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 788 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
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 |
# File 'lib/tripletex_ruby_client/models/order.rb', line 490 def valid? return false if @customer.nil? return false if !@receiver_email.nil? && @receiver_email.to_s.length > 254 return false if !@overdue_notice_email.nil? && @overdue_notice_email.to_s.length > 254 return false if !@number.nil? && @number.to_s.length > 100 return false if !@reference.nil? && @reference.to_s.length > 255 return false if @order_date.nil? return false if !@invoices_due_in.nil? && @invoices_due_in > 10000 return false if !@invoices_due_in.nil? && @invoices_due_in < 0 invoices_due_in_type_validator = EnumAttributeValidator.new('String', ['DAYS', 'MONTHS', 'RECURRING_DAY_OF_MONTH']) return false unless invoices_due_in_type_validator.valid?(@invoices_due_in_type) return false if @delivery_date.nil? order_line_sorting_validator = EnumAttributeValidator.new('String', ['ID', 'PRODUCT', 'CUSTOM']) return false unless order_line_sorting_validator.valid?(@order_line_sorting) return false if !@subscription_duration.nil? && @subscription_duration < 0 subscription_duration_type_validator = EnumAttributeValidator.new('String', ['MONTHS', 'YEAR']) return false unless subscription_duration_type_validator.valid?(@subscription_duration_type) return false if !@subscription_periods_on_invoice.nil? && @subscription_periods_on_invoice < 0 subscription_periods_on_invoice_type_validator = EnumAttributeValidator.new('String', ['MONTHS']) return false unless subscription_periods_on_invoice_type_validator.valid?(@subscription_periods_on_invoice_type) subscription_invoicing_time_in_advance_or_arrears_validator = EnumAttributeValidator.new('String', ['ADVANCE', 'ARREARS']) return false unless subscription_invoicing_time_in_advance_or_arrears_validator.valid?(@subscription_invoicing_time_in_advance_or_arrears) return false if !@subscription_invoicing_time.nil? && @subscription_invoicing_time < 0 subscription_invoicing_time_type_validator = EnumAttributeValidator.new('String', ['DAYS', 'MONTHS']) return false unless subscription_invoicing_time_type_validator.valid?(@subscription_invoicing_time_type) true end |