NAME

Net::API::Stripe::Order::Return - A Stripe Order Return Object

SYNOPSIS

my $return = $stripe->return({
    amount => 2000,
    currency => 'jpy',
    items => [ $item_object1, $item_object2 ],
    order => $order_object,
    refund => undef,
});

See documentation in Net::API::Stripe for example to make api calls to Stripe to create those objects.

VERSION

v0.100.0

DESCRIPTION

A return represents the full or partial return of a number of order items (https://stripe.com/docs/api/order_returns#order_items). Returns always belong to an order, and may optionally contain a refund.

CONSTRUCTOR

new( %ARG )

Creates a new Net::API::Stripe::Order::Return object.

METHODS

id string

Unique identifier for the object.

object string, value is "order_return"

String representing the object’s type. Objects of the same type share the same value.

amount integer

A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the returned line item.

created timestamp

Time at which the object was created. Measured in seconds since the Unix epoch.

currency currency

Three-letter ISO currency code, in lowercase. Must be a supported currency.

items array of hashes

The items included in this order return.

This is an array of Net::API::Stripe::Order::Item objects.

livemode boolean

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

order string (expandable)

The order that this return includes items from.

When expanded, this is a Net::API::Stripe::Order object.

refund string (expandable)

The ID of the refund issued for this return.

When expanded, this is a Net::API::Stripe::Refund object.

API SAMPLE

{
  "id": "orret_fake123456789",
  "object": "order_return",
  "amount": 1500,
  "created": 1571480456,
  "currency": "jpy",
  "items": [
    {
      "object": "order_item",
      "amount": 1500,
      "currency": "jpy",
      "description": "Provider, Inc investor yearly membership",
      "parent": "sk_fake123456789",
      "quantity": null,
      "type": "sku"
    }
  ],
  "livemode": false,
  "order": "or_fake123456789",
  "refund": "re_fake123456789"
}

HISTORY

v0.1

Initial version

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Stripe API documentation:

https://stripe.com/docs/api/order_returns

COPYRIGHT & LICENSE

Copyright (c) 2019-2020 DEGUEST Pte. Ltd.

You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.