The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Net::API::Stripe::Order::DeliveryEstimate - A Stripe Order Delivery Estimate Object

SYNOPSIS

    my $delivery = $stripe->order->delivery_estimate({
        date => '2020-04-12',
        earlest => '2020-04-06',
        latest => '2020^04-30',
        type => 'range',
    });

VERSION

    0.1

DESCRIPTION

The estimated delivery date for the given shipping method. Can be either a specific date or a range.

This is instantiated by method delivery_estimate in module Net::API::Stripe::Order::ShippingMethod

CONSTRUCTOR

new( %ARG )

Creates a new Net::API::Stripe::Order::DeliveryEstimate object. It may also take an hash like arguments, that also are method of the same name.

METHODS

date string

If type is "exact", date will be the expected delivery date in the format YYYY-MM-DD.

When set, this returns a DateTime object.

earliest string

If type is "range", earliest will be be the earliest delivery date in the format YYYY-MM-DD.

When set, this returns a DateTime object.

latest string

If type is "range", latest will be the latest delivery date in the format YYYY-MM-DD.

When set, this returns a DateTime object.

type string

The type of estimate. Must be either "range" or "exact".

API SAMPLE

        {
          "id": "or_fake123456789",
          "object": "order",
          "amount": 1500,
          "amount_returned": null,
          "application": null,
          "application_fee": null,
          "charge": null,
          "created": 1571480453,
          "currency": "jpy",
          "customer": null,
          "email": null,
          "items": [
                {
                  "object": "order_item",
                  "amount": 1500,
                  "currency": "jpy",
                  "description": "T-shirt",
                  "parent": "sk_fake123456789",
                  "quantity": null,
                  "type": "sku"
                }
          ],
          "livemode": false,
          "metadata": {},
          "returns": {
                "object": "list",
                "data": [],
                "has_more": false,
                "url": "/v1/order_returns?order=or_fake123456789"
          },
          "selected_shipping_method": null,
          "shipping": {
                "address": {
                  "city": "Anytown",
                  "country": "US",
                  "line1": "1234 Main street",
                  "line2": null,
                  "postal_code": "123456",
                  "state": null
                },
                "carrier": null,
                "name": "Jenny Rosen",
                "phone": null,
                "tracking_number": null
          },
          "shipping_methods": null,
          "status": "created",
          "status_transitions": {
                "canceled": null,
                "fulfiled": null,
                "paid": null,
                "returned": null
          },
          "updated": 1571480453
        }

HISTORY

v0.1

Initial version

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Stripe API documentation:

https://stripe.com/docs/api/orders/object

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.