Class: NimbleshopAuthorizedotnet::Processor

Inherits:
Processor::Base
  • Object
show all
Defined in:
lib/nimbleshop_authorizedotnet/processor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Processor

Returns a new instance of Processor.



6
7
8
9
10
11
12
13
14
# File 'lib/nimbleshop_authorizedotnet/processor.rb', line 6

def initialize(options)
  options.symbolize_keys!
  options.assert_valid_keys :order, :payment_method

  @errors = []
  @order = options.fetch :order
  @payment_method = options.fetch :payment_method
  @gateway = ::NimbleshopAuthorizedotnet::Gateway.instance payment_method
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



4
5
6
# File 'lib/nimbleshop_authorizedotnet/processor.rb', line 4

def errors
  @errors
end

#gatewayObject (readonly)

Returns the value of attribute gateway.



4
5
6
# File 'lib/nimbleshop_authorizedotnet/processor.rb', line 4

def gateway
  @gateway
end

#orderObject (readonly)

Returns the value of attribute order.



4
5
6
# File 'lib/nimbleshop_authorizedotnet/processor.rb', line 4

def order
  @order
end

#payment_methodObject (readonly)

Returns the value of attribute payment_method.



4
5
6
# File 'lib/nimbleshop_authorizedotnet/processor.rb', line 4

def payment_method
  @payment_method
end