Class: Google::Apis::ContentV2sandbox::OrderLineItem

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/content_v2sandbox/classes.rb,
generated/google/apis/content_v2sandbox/representations.rb,
generated/google/apis/content_v2sandbox/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ OrderLineItem

Returns a new instance of OrderLineItem



474
475
476
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 474

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#cancellationsArray<Google::Apis::ContentV2sandbox::OrderCancellation>

Cancellations of the line item. Corresponds to the JSON property cancellations



405
406
407
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 405

def cancellations
  @cancellations
end

#idString

The id of the line item. Corresponds to the JSON property id

Returns:

  • (String)


410
411
412
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 410

def id
  @id
end

#priceGoogle::Apis::ContentV2sandbox::Price

Total price for the line item. For example, if two items for $10 are purchased, the total price will be $20. Corresponds to the JSON property price



416
417
418
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 416

def price
  @price
end

#productGoogle::Apis::ContentV2sandbox::OrderLineItemProduct

Product data from the time of the order placement. Corresponds to the JSON property product



421
422
423
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 421

def product
  @product
end

#quantity_canceledFixnum

Number of items canceled. Corresponds to the JSON property quantityCanceled

Returns:

  • (Fixnum)


426
427
428
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 426

def quantity_canceled
  @quantity_canceled
end

#quantity_deliveredFixnum

Number of items delivered. Corresponds to the JSON property quantityDelivered

Returns:

  • (Fixnum)


431
432
433
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 431

def quantity_delivered
  @quantity_delivered
end

#quantity_orderedFixnum

Number of items ordered. Corresponds to the JSON property quantityOrdered

Returns:

  • (Fixnum)


436
437
438
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 436

def quantity_ordered
  @quantity_ordered
end

#quantity_pendingFixnum

Number of items pending. Corresponds to the JSON property quantityPending

Returns:

  • (Fixnum)


441
442
443
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 441

def quantity_pending
  @quantity_pending
end

#quantity_returnedFixnum

Number of items returned. Corresponds to the JSON property quantityReturned

Returns:

  • (Fixnum)


446
447
448
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 446

def quantity_returned
  @quantity_returned
end

#quantity_shippedFixnum

Number of items shipped. Corresponds to the JSON property quantityShipped

Returns:

  • (Fixnum)


451
452
453
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 451

def quantity_shipped
  @quantity_shipped
end

#return_infoGoogle::Apis::ContentV2sandbox::OrderLineItemReturnInfo

Details of the return policy for the line item. Corresponds to the JSON property returnInfo



456
457
458
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 456

def return_info
  @return_info
end

#returnsArray<Google::Apis::ContentV2sandbox::OrderReturn>

Returns of the line item. Corresponds to the JSON property returns



461
462
463
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 461

def returns
  @returns
end

#shipping_detailsGoogle::Apis::ContentV2sandbox::OrderLineItemShippingDetails

Details of the requested shipping for the line item. Corresponds to the JSON property shippingDetails



466
467
468
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 466

def shipping_details
  @shipping_details
end

#taxGoogle::Apis::ContentV2sandbox::Price

Total tax amount for the line item. For example, if two items are purchased, and each have a cost tax of $2, the total tax amount will be $4. Corresponds to the JSON property tax



472
473
474
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 472

def tax
  @tax
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
# File 'generated/google/apis/content_v2sandbox/classes.rb', line 479

def update!(**args)
  @cancellations = args[:cancellations] if args.key?(:cancellations)
  @id = args[:id] if args.key?(:id)
  @price = args[:price] if args.key?(:price)
  @product = args[:product] if args.key?(:product)
  @quantity_canceled = args[:quantity_canceled] if args.key?(:quantity_canceled)
  @quantity_delivered = args[:quantity_delivered] if args.key?(:quantity_delivered)
  @quantity_ordered = args[:quantity_ordered] if args.key?(:quantity_ordered)
  @quantity_pending = args[:quantity_pending] if args.key?(:quantity_pending)
  @quantity_returned = args[:quantity_returned] if args.key?(:quantity_returned)
  @quantity_shipped = args[:quantity_shipped] if args.key?(:quantity_shipped)
  @return_info = args[:return_info] if args.key?(:return_info)
  @returns = args[:returns] if args.key?(:returns)
  @shipping_details = args[:shipping_details] if args.key?(:shipping_details)
  @tax = args[:tax] if args.key?(:tax)
end