Class: ActiveMerchant::Billing::PaymentMethodDetails
- Inherits:
-
Object
- Object
- ActiveMerchant::Billing::PaymentMethodDetails
- Defined in:
- lib/active_merchant/billing/gateways/blue_snap.rb
Instance Attribute Summary collapse
-
#payment_method ⇒ Object
readonly
Returns the value of attribute payment_method.
-
#payment_method_type ⇒ Object
readonly
Returns the value of attribute payment_method_type.
-
#vaulted_shopper_id ⇒ Object
readonly
Returns the value of attribute vaulted_shopper_id.
Instance Method Summary collapse
- #alt_transaction? ⇒ Boolean
- #check? ⇒ Boolean
-
#initialize(payment_method = nil) ⇒ PaymentMethodDetails
constructor
A new instance of PaymentMethodDetails.
- #resource_url ⇒ Object
- #root_element ⇒ Object
Constructor Details
#initialize(payment_method = nil) ⇒ PaymentMethodDetails
Returns a new instance of PaymentMethodDetails.
513 514 515 516 517 |
# File 'lib/active_merchant/billing/gateways/blue_snap.rb', line 513 def initialize(payment_method = nil) @payment_method = payment_method @payment_method_type = nil parse(payment_method) end |
Instance Attribute Details
#payment_method ⇒ Object (readonly)
Returns the value of attribute payment_method.
511 512 513 |
# File 'lib/active_merchant/billing/gateways/blue_snap.rb', line 511 def payment_method @payment_method end |
#payment_method_type ⇒ Object (readonly)
Returns the value of attribute payment_method_type.
511 512 513 |
# File 'lib/active_merchant/billing/gateways/blue_snap.rb', line 511 def payment_method_type @payment_method_type end |
#vaulted_shopper_id ⇒ Object (readonly)
Returns the value of attribute vaulted_shopper_id.
511 512 513 |
# File 'lib/active_merchant/billing/gateways/blue_snap.rb', line 511 def vaulted_shopper_id @vaulted_shopper_id end |
Instance Method Details
#alt_transaction? ⇒ Boolean
523 524 525 |
# File 'lib/active_merchant/billing/gateways/blue_snap.rb', line 523 def alt_transaction? check? end |
#check? ⇒ Boolean
519 520 521 |
# File 'lib/active_merchant/billing/gateways/blue_snap.rb', line 519 def check? @payment_method.is_a?(Check) || @payment_method_type == 'check' end |
#resource_url ⇒ Object
531 532 533 |
# File 'lib/active_merchant/billing/gateways/blue_snap.rb', line 531 def resource_url alt_transaction? ? 'alt-transactions' : 'transactions' end |
#root_element ⇒ Object
527 528 529 |
# File 'lib/active_merchant/billing/gateways/blue_snap.rb', line 527 def root_element alt_transaction? ? 'alt-transaction' : 'card-transaction' end |