Class: ActiveMerchant::Billing::PaymentMethodDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/active_merchant/billing/gateways/blue_snap.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payment_method = nil) ⇒ PaymentMethodDetails

Returns a new instance of PaymentMethodDetails.



467
468
469
470
471
# File 'lib/active_merchant/billing/gateways/blue_snap.rb', line 467

def initialize(payment_method = nil)
  @payment_method = payment_method
  @payment_method_type = nil
  parse(payment_method)
end

Instance Attribute Details

#payment_methodObject (readonly)

Returns the value of attribute payment_method.



465
466
467
# File 'lib/active_merchant/billing/gateways/blue_snap.rb', line 465

def payment_method
  @payment_method
end

#payment_method_typeObject (readonly)

Returns the value of attribute payment_method_type.



465
466
467
# File 'lib/active_merchant/billing/gateways/blue_snap.rb', line 465

def payment_method_type
  @payment_method_type
end

#vaulted_shopper_idObject (readonly)

Returns the value of attribute vaulted_shopper_id.



465
466
467
# File 'lib/active_merchant/billing/gateways/blue_snap.rb', line 465

def vaulted_shopper_id
  @vaulted_shopper_id
end

Instance Method Details

#alt_transaction?Boolean

Returns:

  • (Boolean)


477
478
479
# File 'lib/active_merchant/billing/gateways/blue_snap.rb', line 477

def alt_transaction?
  check?
end

#check?Boolean

Returns:

  • (Boolean)


473
474
475
# File 'lib/active_merchant/billing/gateways/blue_snap.rb', line 473

def check?
  @payment_method.is_a?(Check) || @payment_method_type == 'check'
end

#resource_urlObject



485
486
487
# File 'lib/active_merchant/billing/gateways/blue_snap.rb', line 485

def resource_url
  alt_transaction? ? 'alt-transactions' : 'transactions'
end

#root_elementObject



481
482
483
# File 'lib/active_merchant/billing/gateways/blue_snap.rb', line 481

def root_element
  alt_transaction? ? 'alt-transaction' : 'card-transaction'
end