Class: Google::Apis::ContentV2::TestOrder

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/content_v2/classes.rb,
generated/google/apis/content_v2/representations.rb,
generated/google/apis/content_v2/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) ⇒ TestOrder

Returns a new instance of TestOrder.



6526
6527
6528
# File 'generated/google/apis/content_v2/classes.rb', line 6526

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

Instance Attribute Details

#customerGoogle::Apis::ContentV2::TestOrderCustomer

The details of the customer who placed the order. Corresponds to the JSON property customer



6482
6483
6484
# File 'generated/google/apis/content_v2/classes.rb', line 6482

def customer
  @customer
end

#kindString

Identifies what kind of resource this is. Value: the fixed string "content# testOrder". Corresponds to the JSON property kind

Returns:

  • (String)


6488
6489
6490
# File 'generated/google/apis/content_v2/classes.rb', line 6488

def kind
  @kind
end

#line_itemsArray<Google::Apis::ContentV2::TestOrderLineItem>

Line items that are ordered. At least one line item must be provided. Corresponds to the JSON property lineItems



6493
6494
6495
# File 'generated/google/apis/content_v2/classes.rb', line 6493

def line_items
  @line_items
end

#payment_methodGoogle::Apis::ContentV2::TestOrderPaymentMethod

The details of the payment method. Corresponds to the JSON property paymentMethod



6498
6499
6500
# File 'generated/google/apis/content_v2/classes.rb', line 6498

def payment_method
  @payment_method
end

#predefined_delivery_addressString

Identifier of one of the predefined delivery addresses for the delivery. Corresponds to the JSON property predefinedDeliveryAddress

Returns:

  • (String)


6503
6504
6505
# File 'generated/google/apis/content_v2/classes.rb', line 6503

def predefined_delivery_address
  @predefined_delivery_address
end

#promotionsArray<Google::Apis::ContentV2::OrderPromotion>

The details of the merchant provided promotions applied to the order. More details about the program are here. Corresponds to the JSON property promotions



6509
6510
6511
# File 'generated/google/apis/content_v2/classes.rb', line 6509

def promotions
  @promotions
end

#shipping_costGoogle::Apis::ContentV2::Price

The total cost of shipping for all items. Corresponds to the JSON property shippingCost



6514
6515
6516
# File 'generated/google/apis/content_v2/classes.rb', line 6514

def shipping_cost
  @shipping_cost
end

#shipping_cost_taxGoogle::Apis::ContentV2::Price

The tax for the total shipping cost. Corresponds to the JSON property shippingCostTax



6519
6520
6521
# File 'generated/google/apis/content_v2/classes.rb', line 6519

def shipping_cost_tax
  @shipping_cost_tax
end

#shipping_optionString

The requested shipping option. Corresponds to the JSON property shippingOption

Returns:

  • (String)


6524
6525
6526
# File 'generated/google/apis/content_v2/classes.rb', line 6524

def shipping_option
  @shipping_option
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
# File 'generated/google/apis/content_v2/classes.rb', line 6531

def update!(**args)
  @customer = args[:customer] if args.key?(:customer)
  @kind = args[:kind] if args.key?(:kind)
  @line_items = args[:line_items] if args.key?(:line_items)
  @payment_method = args[:payment_method] if args.key?(:payment_method)
  @predefined_delivery_address = args[:predefined_delivery_address] if args.key?(:predefined_delivery_address)
  @promotions = args[:promotions] if args.key?(:promotions)
  @shipping_cost = args[:shipping_cost] if args.key?(:shipping_cost)
  @shipping_cost_tax = args[:shipping_cost_tax] if args.key?(:shipping_cost_tax)
  @shipping_option = args[:shipping_option] if args.key?(:shipping_option)
end