Class: Google::Apis::ContentV2_1::MerchantOrderReturnItem

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

Returns a new instance of MerchantOrderReturnItem.



3882
3883
3884
# File 'generated/google/apis/content_v2_1/classes.rb', line 3882

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

Instance Attribute Details

#customer_return_reasonGoogle::Apis::ContentV2_1::CustomerReturnReason

The reason that the customer chooses to return an item. Corresponds to the JSON property customerReturnReason



3821
3822
3823
# File 'generated/google/apis/content_v2_1/classes.rb', line 3821

def customer_return_reason
  @customer_return_reason
end

#item_idString

Product level item ID. If the returned items are of the same product, they will have the same ID. Corresponds to the JSON property itemId

Returns:

  • (String)


3827
3828
3829
# File 'generated/google/apis/content_v2_1/classes.rb', line 3827

def item_id
  @item_id
end

#merchant_rejection_reasonGoogle::Apis::ContentV2_1::MerchantRejectionReason

The reason that the merchant chose to reject an item return. Corresponds to the JSON property merchantRejectionReason



3832
3833
3834
# File 'generated/google/apis/content_v2_1/classes.rb', line 3832

def merchant_rejection_reason
  @merchant_rejection_reason
end

#merchant_return_reasonGoogle::Apis::ContentV2_1::RefundReason

The reason that merchant chooses to accept a return item. Corresponds to the JSON property merchantReturnReason



3837
3838
3839
# File 'generated/google/apis/content_v2_1/classes.rb', line 3837

def merchant_return_reason
  @merchant_return_reason
end

#productGoogle::Apis::ContentV2_1::OrderLineItemProduct

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



3842
3843
3844
# File 'generated/google/apis/content_v2_1/classes.rb', line 3842

def product
  @product
end

#refundable_amountGoogle::Apis::ContentV2_1::MonetaryAmount

Maximum amount that can be refunded for this return item. Corresponds to the JSON property refundableAmount



3847
3848
3849
# File 'generated/google/apis/content_v2_1/classes.rb', line 3847

def refundable_amount
  @refundable_amount
end

#return_item_idString

Unit level ID for the return item. Different units of the same product will have different IDs. Corresponds to the JSON property returnItemId

Returns:

  • (String)


3853
3854
3855
# File 'generated/google/apis/content_v2_1/classes.rb', line 3853

def return_item_id
  @return_item_id
end

#return_shipment_idsArray<String>

IDs of the return shipments that this return item belongs to. Corresponds to the JSON property returnShipmentIds

Returns:

  • (Array<String>)


3858
3859
3860
# File 'generated/google/apis/content_v2_1/classes.rb', line 3858

def return_shipment_ids
  @return_shipment_ids
end

#shipment_group_idString

ID of the original shipment group. Provided for shipments with invoice support. Corresponds to the JSON property shipmentGroupId

Returns:

  • (String)


3863
3864
3865
# File 'generated/google/apis/content_v2_1/classes.rb', line 3863

def shipment_group_id
  @shipment_group_id
end

#shipment_unit_idString

ID of the shipment unit assigned by the merchant. Provided for shipments with invoice support. Corresponds to the JSON property shipmentUnitId

Returns:

  • (String)


3869
3870
3871
# File 'generated/google/apis/content_v2_1/classes.rb', line 3869

def shipment_unit_id
  @shipment_unit_id
end

#stateString

State of the item. Acceptable values are:

  • "canceled"
  • "new"
  • "received"
  • "refunded"
  • "rejected" Corresponds to the JSON property state

Returns:

  • (String)


3880
3881
3882
# File 'generated/google/apis/content_v2_1/classes.rb', line 3880

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
# File 'generated/google/apis/content_v2_1/classes.rb', line 3887

def update!(**args)
  @customer_return_reason = args[:customer_return_reason] if args.key?(:customer_return_reason)
  @item_id = args[:item_id] if args.key?(:item_id)
  @merchant_rejection_reason = args[:merchant_rejection_reason] if args.key?(:merchant_rejection_reason)
  @merchant_return_reason = args[:merchant_return_reason] if args.key?(:merchant_return_reason)
  @product = args[:product] if args.key?(:product)
  @refundable_amount = args[:refundable_amount] if args.key?(:refundable_amount)
  @return_item_id = args[:return_item_id] if args.key?(:return_item_id)
  @return_shipment_ids = args[:return_shipment_ids] if args.key?(:return_shipment_ids)
  @shipment_group_id = args[:shipment_group_id] if args.key?(:shipment_group_id)
  @shipment_unit_id = args[:shipment_unit_id] if args.key?(:shipment_unit_id)
  @state = args[:state] if args.key?(:state)
end