Class: AdaptivePay::Recipient

Inherits:
Object
  • Object
show all
Defined in:
lib/adaptive_pay/recipient.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Recipient

Returns a new instance of Recipient.



6
7
8
9
10
# File 'lib/adaptive_pay/recipient.rb', line 6

def initialize(options={})
  options.each do |k, v|
    send "#{k}=", v
  end
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



4
5
6
# File 'lib/adaptive_pay/recipient.rb', line 4

def amount
  @amount
end

#emailObject

Returns the value of attribute email.



4
5
6
# File 'lib/adaptive_pay/recipient.rb', line 4

def email
  @email
end

#primaryObject

Returns the value of attribute primary.



4
5
6
# File 'lib/adaptive_pay/recipient.rb', line 4

def primary
  @primary
end

Instance Method Details

#primary?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/adaptive_pay/recipient.rb', line 12

def primary?
  !!@primary
end