Class: Google::Apis::ContentV2_1::OrdersCustomBatchRequestEntryRefundItemItem

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

Constructor Details

#initialize(**args) ⇒ OrdersCustomBatchRequestEntryRefundItemItem

Returns a new instance of OrdersCustomBatchRequestEntryRefundItemItem.



7247
7248
7249
# File 'generated/google/apis/content_v2_1/classes.rb', line 7247

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

Instance Attribute Details

#amountGoogle::Apis::ContentV2_1::MonetaryAmount

The total amount that is refunded. (e.g. refunding $5 each for 2 products should be done by setting quantity to 2 and amount to 10$) In case of multiple refunds, this should be the amount you currently want to refund to the customer. Corresponds to the JSON property amount



7222
7223
7224
# File 'generated/google/apis/content_v2_1/classes.rb', line 7222

def amount
  @amount
end

#full_refundBoolean Also known as: full_refund?

If true, the full item will be refunded. If this is true, amount should not be provided and will be ignored. Corresponds to the JSON property fullRefund

Returns:

  • (Boolean)


7228
7229
7230
# File 'generated/google/apis/content_v2_1/classes.rb', line 7228

def full_refund
  @full_refund
end

#line_item_idString

The ID of the line item. Either lineItemId or productId is required. Corresponds to the JSON property lineItemId

Returns:

  • (String)


7234
7235
7236
# File 'generated/google/apis/content_v2_1/classes.rb', line 7234

def line_item_id
  @line_item_id
end

#product_idString

The ID of the product. This is the REST ID used in the products service. Either lineItemId or productId is required. Corresponds to the JSON property productId

Returns:

  • (String)


7240
7241
7242
# File 'generated/google/apis/content_v2_1/classes.rb', line 7240

def product_id
  @product_id
end

#quantityFixnum

The number of products that are refunded. Corresponds to the JSON property quantity

Returns:

  • (Fixnum)


7245
7246
7247
# File 'generated/google/apis/content_v2_1/classes.rb', line 7245

def quantity
  @quantity
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7252
7253
7254
7255
7256
7257
7258
# File 'generated/google/apis/content_v2_1/classes.rb', line 7252

def update!(**args)
  @amount = args[:amount] if args.key?(:amount)
  @full_refund = args[:full_refund] if args.key?(:full_refund)
  @line_item_id = args[:line_item_id] if args.key?(:line_item_id)
  @product_id = args[:product_id] if args.key?(:product_id)
  @quantity = args[:quantity] if args.key?(:quantity)
end