Class: Google::Apis::ContentV2_1::OrdersCustomBatchRequestEntryRefundItemItem
- Inherits:
-
Object
- Object
- Google::Apis::ContentV2_1::OrdersCustomBatchRequestEntryRefundItemItem
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/content_v2_1/classes.rb,
lib/google/apis/content_v2_1/representations.rb,
lib/google/apis/content_v2_1/representations.rb
Instance Attribute Summary collapse
-
#amount ⇒ Google::Apis::ContentV2_1::MonetaryAmount
The total amount that is refunded.
-
#full_refund ⇒ Boolean
(also: #full_refund?)
If true, the full item will be refunded.
-
#line_item_id ⇒ String
The ID of the line item.
-
#product_id ⇒ String
The ID of the product.
-
#quantity ⇒ Fixnum
The number of products that are refunded.
Instance Method Summary collapse
-
#initialize(**args) ⇒ OrdersCustomBatchRequestEntryRefundItemItem
constructor
A new instance of OrdersCustomBatchRequestEntryRefundItemItem.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ OrdersCustomBatchRequestEntryRefundItemItem
Returns a new instance of OrdersCustomBatchRequestEntryRefundItemItem.
7683 7684 7685 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 7683 def initialize(**args) update!(**args) end |
Instance Attribute Details
#amount ⇒ Google::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
7658 7659 7660 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 7658 def amount @amount end |
#full_refund ⇒ Boolean 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
7664 7665 7666 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 7664 def full_refund @full_refund end |
#line_item_id ⇒ String
The ID of the line item. Either lineItemId or productId is required.
Corresponds to the JSON property lineItemId
7670 7671 7672 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 7670 def line_item_id @line_item_id end |
#product_id ⇒ String
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
7676 7677 7678 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 7676 def product_id @product_id end |
#quantity ⇒ Fixnum
The number of products that are refunded.
Corresponds to the JSON property quantity
7681 7682 7683 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 7681 def quantity @quantity end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
7688 7689 7690 7691 7692 7693 7694 |
# File 'lib/google/apis/content_v2_1/classes.rb', line 7688 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 |