Class: FriendlyShipping::Services::ShipEngine::LabelCustomsOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/friendly_shipping/services/ship_engine/label_customs_options.rb

Overview

Options for obtaining international shipment labels with customs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(contents: "merchandise", non_delivery: "return_to_sender") ⇒ LabelCustomsOptions

Returns a new instance of LabelCustomsOptions.

Parameters:

  • contents (String) (defaults to: "merchandise")

    the contents of the shipment. Valid values are: gift, merchandise, returned_goods, documents, sample

  • non_delivery (String) (defaults to: "return_to_sender")

    indicates what should be done if the shipment cannot be delivered. Valid values are: treat_as_abandoned, return_to_sender



18
19
20
21
22
23
24
# File 'lib/friendly_shipping/services/ship_engine/label_customs_options.rb', line 18

def initialize(
  contents: "merchandise",
  non_delivery: "return_to_sender"
)
  @contents = contents
  @non_delivery = non_delivery
end

Instance Attribute Details

#contentsString (readonly)

Returns the contents of the shipment.

Returns:

  • (String)

    the contents of the shipment



9
10
11
# File 'lib/friendly_shipping/services/ship_engine/label_customs_options.rb', line 9

def contents
  @contents
end

#non_deliveryString (readonly)

Returns indicates what should be done if the shipment cannot be delivered.

Returns:

  • (String)

    indicates what should be done if the shipment cannot be delivered



12
13
14
# File 'lib/friendly_shipping/services/ship_engine/label_customs_options.rb', line 12

def non_delivery
  @non_delivery
end