Class: Minfraud::Components::Shipping

Inherits:
Addressable show all
Includes:
Enum
Defined in:
lib/minfraud/components/shipping.rb

Overview

Shipping corresponds to the shipping object of a minFraud request.

Instance Attribute Summary collapse

Attributes inherited from Addressable

#address, #address_2, #city, #company, #country, #first_name, #last_name, #phone_country_code, #phone_number, #postal, #region

Instance Method Summary collapse

Methods included from Enum

included

Methods inherited from Base

#to_json

Constructor Details

#initialize(params = {}) ⇒ Shipping

Returns a new instance of Shipping.

Parameters:

  • params (Hash) (defaults to: {})

    Hash of parameters. Each key/value should correspond to one of the available attributes.



21
22
23
24
# File 'lib/minfraud/components/shipping.rb', line 21

def initialize(params = {})
  self.delivery_speed = params[:delivery_speed]
  super
end

Instance Attribute Details

#delivery_speedSymbol?

The shipping delivery speed for the order. Must be one of :same_day, :overnight, :expedited, or :standard.

Returns:

  • (Symbol, nil)


17
# File 'lib/minfraud/components/shipping.rb', line 17

enum_accessor :delivery_speed, %i[same_day overnight expedited standard]