Class: ActiveMerchant::Billing::PaymentechOrbital::Request::NewOrder

Inherits:
Base
  • Object
show all
Defined in:
lib/active_merchant/billing/paymentech_orbital/request/new_order.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#gateway, #options

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#address, #full_street_address, #headers, #to_a, #to_xml

Constructor Details

#initialize(message_type, money, credit_card, options) ⇒ NewOrder

Returns a new instance of NewOrder.



8
9
10
11
12
13
# File 'lib/active_merchant/billing/paymentech_orbital/request/new_order.rb', line 8

def initialize(message_type, money, credit_card, options)
  @message_type = message_type
  @money = money
  @credit_card = credit_card
  super(options)
end

Instance Attribute Details

#credit_cardObject (readonly)

Returns the value of attribute credit_card.



6
7
8
# File 'lib/active_merchant/billing/paymentech_orbital/request/new_order.rb', line 6

def credit_card
  @credit_card
end

#message_typeObject (readonly)

Returns the value of attribute message_type.



6
7
8
# File 'lib/active_merchant/billing/paymentech_orbital/request/new_order.rb', line 6

def message_type
  @message_type
end

#moneyObject (readonly)

Returns the value of attribute money.



6
7
8
# File 'lib/active_merchant/billing/paymentech_orbital/request/new_order.rb', line 6

def money
  @money
end

Class Method Details

.message_mapObject



27
28
29
30
31
# File 'lib/active_merchant/billing/paymentech_orbital/request/new_order.rb', line 27

def self.message_map
  { "A"  => "Auth",
    "AC" => "Auth/Capture",
    "R"  => "Refund" }
end

Instance Method Details

#recurring?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/active_merchant/billing/paymentech_orbital/request/new_order.rb', line 33

def recurring?
  industry_type == "RC"
end

#request_typeObject



21
# File 'lib/active_merchant/billing/paymentech_orbital/request/new_order.rb', line 21

def request_type; "NewOrder"; end

#to_sObject



23
24
25
# File 'lib/active_merchant/billing/paymentech_orbital/request/new_order.rb', line 23

def to_s
  "#{self.class.message_map[@message_type]}: Credit Card (#{credit_card.type if credit_card})"
end