Class: Minfraud::Components::Order

Inherits:
Base
  • Object
show all
Defined in:
lib/minfraud/components/order.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#to_json

Constructor Details

#initialize(params = {}) ⇒ Minfraud::Components::Order

Creates Minfraud::Components::Order instance

Parameters:

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

    hash of parameters



40
41
42
43
44
45
46
47
48
# File 'lib/minfraud/components/order.rb', line 40

def initialize (params = {})
  @has_gift_message = params[:has_gift_message]
  @affiliate_id     = params[:affiliate_id]
  @subaffiliate_id  = params[:subaffiliate_id]
  @currency         = params[:currency]
  @discount_code    = params[:discount_cide]
  @referrer_uri     = params[:referrer_uri]
  @is_gift          = params[:is_gift]
end

Instance Attribute Details

#:has_gift_message(: has_gift_message) ⇒ Boolean

Returns Whether the purchaser included a gift message.

Returns:

  • (Boolean)

    Whether the purchaser included a gift message



35
# File 'lib/minfraud/components/order.rb', line 35

attr_accessor :has_gift_message

#:is_gift(: is_gift) ⇒ Boolean

Returns Whether order was marked as a gift by the purchaser.

Returns:

  • (Boolean)

    Whether order was marked as a gift by the purchaser



31
# File 'lib/minfraud/components/order.rb', line 31

attr_accessor :is_gift

#:referrer_uri(: referrer_uri) ⇒ String

Returns The URI of the referring site for this order.

Returns:

  • (String)

    The URI of the referring site for this order



27
# File 'lib/minfraud/components/order.rb', line 27

attr_accessor :referrer_uri

#affiliate_idString

Returns The ID of the affiliate where the order is coming from.

Returns:

  • (String)

    The ID of the affiliate where the order is coming from



19
20
21
# File 'lib/minfraud/components/order.rb', line 19

def affiliate_id
  @affiliate_id
end

#amountDecimal

Returns The total order amount for the transaction.

Returns:

  • (Decimal)

    The total order amount for the transaction



6
7
8
# File 'lib/minfraud/components/order.rb', line 6

def amount
  @amount
end

#currencyString

Returns The ISO 4217 currency code for the currency used in the transaction.

Returns:

  • (String)

    The ISO 4217 currency code for the currency used in the transaction



10
11
12
# File 'lib/minfraud/components/order.rb', line 10

def currency
  @currency
end

#discount_codeString

please separate them with a comma.

Returns:

  • (String)

    The discount code applied to the transaction. If multiple discount codes are used,



15
16
17
# File 'lib/minfraud/components/order.rb', line 15

def discount_code
  @discount_code
end

#has_gift_messageBoolean

Returns Whether the purchaser included a gift message.

Returns:

  • (Boolean)

    Whether the purchaser included a gift message



35
36
37
# File 'lib/minfraud/components/order.rb', line 35

def has_gift_message
  @has_gift_message
end

#is_giftBoolean

Returns Whether order was marked as a gift by the purchaser.

Returns:

  • (Boolean)

    Whether order was marked as a gift by the purchaser



31
32
33
# File 'lib/minfraud/components/order.rb', line 31

def is_gift
  @is_gift
end

#referrer_uriString

Returns The URI of the referring site for this order.

Returns:

  • (String)

    The URI of the referring site for this order



27
28
29
# File 'lib/minfraud/components/order.rb', line 27

def referrer_uri
  @referrer_uri
end

#subaffiliate_idString

Returns The ID of the sub-affiliate where the order is coming from.

Returns:

  • (String)

    The ID of the sub-affiliate where the order is coming from



23
24
25
# File 'lib/minfraud/components/order.rb', line 23

def subaffiliate_id
  @subaffiliate_id
end