Class: BuckarooClient::Service::PayPerEmail
- Inherits:
-
Object
- Object
- BuckarooClient::Service::PayPerEmail
- Defined in:
- lib/buckaroo_client/service/pay_per_email.rb
Instance Attribute Summary collapse
-
#customeremail ⇒ Object
Returns the value of attribute customeremail.
-
#customerfirstname ⇒ Object
Returns the value of attribute customerfirstname.
-
#customergender ⇒ Object
Returns the value of attribute customergender.
-
#customerlastname ⇒ Object
Returns the value of attribute customerlastname.
-
#expirationdate ⇒ Object
Returns the value of attribute expirationdate.
-
#merchantsendsemail ⇒ Object
Returns the value of attribute merchantsendsemail.
-
#paymentmethodsallowed ⇒ Object
Returns the value of attribute paymentmethodsallowed.
Instance Method Summary collapse
- #action ⇒ Object
- #gateway_attributes ⇒ Object
-
#initialize(args = {}) ⇒ PayPerEmail
constructor
A new instance of PayPerEmail.
- #servicecode ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ PayPerEmail
Returns a new instance of PayPerEmail.
8 9 10 11 12 13 14 15 16 |
# File 'lib/buckaroo_client/service/pay_per_email.rb', line 8 def initialize(args = {}) @customergender = args.fetch(:customergender, 0) @customeremail = args[:customeremail] @customerfirstname = args[:customerfirstname] @customerlastname = args[:customerlastname] @merchantsendsemail = args.fetch(:merchantsendsemail, false) @paymentmethodsallowed = args[:paymentmethodsallowed] @expirationdate = args[:expirationdate] end |
Instance Attribute Details
#customeremail ⇒ Object
Returns the value of attribute customeremail.
5 6 7 |
# File 'lib/buckaroo_client/service/pay_per_email.rb', line 5 def customeremail @customeremail end |
#customerfirstname ⇒ Object
Returns the value of attribute customerfirstname.
5 6 7 |
# File 'lib/buckaroo_client/service/pay_per_email.rb', line 5 def customerfirstname @customerfirstname end |
#customergender ⇒ Object
Returns the value of attribute customergender.
5 6 7 |
# File 'lib/buckaroo_client/service/pay_per_email.rb', line 5 def customergender @customergender end |
#customerlastname ⇒ Object
Returns the value of attribute customerlastname.
5 6 7 |
# File 'lib/buckaroo_client/service/pay_per_email.rb', line 5 def customerlastname @customerlastname end |
#expirationdate ⇒ Object
Returns the value of attribute expirationdate.
5 6 7 |
# File 'lib/buckaroo_client/service/pay_per_email.rb', line 5 def expirationdate @expirationdate end |
#merchantsendsemail ⇒ Object
Returns the value of attribute merchantsendsemail.
5 6 7 |
# File 'lib/buckaroo_client/service/pay_per_email.rb', line 5 def merchantsendsemail @merchantsendsemail end |
#paymentmethodsallowed ⇒ Object
Returns the value of attribute paymentmethodsallowed.
5 6 7 |
# File 'lib/buckaroo_client/service/pay_per_email.rb', line 5 def paymentmethodsallowed @paymentmethodsallowed end |
Instance Method Details
#action ⇒ Object
22 23 24 |
# File 'lib/buckaroo_client/service/pay_per_email.rb', line 22 def action 'paymentinvitation' end |
#gateway_attributes ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/buckaroo_client/service/pay_per_email.rb', line 26 def gateway_attributes { 'service_payperemail_action' => action, 'service_payperemail_customergender' => customergender.to_s, 'service_payperemail_customeremail' => customeremail, 'service_payperemail_customerfirstname' => customerfirstname, 'service_payperemail_customerlastname' => customerlastname, 'service_payperemail_merchantsendsemail' => merchantsendsemail.to_s.upcase, 'service_payperemail_paymentmethodsallowed' => paymentmethodsallowed, 'service_payperemail_expirationdate' => expirationdate, }.select { |_, value| !value.nil? } end |
#servicecode ⇒ Object
18 19 20 |
# File 'lib/buckaroo_client/service/pay_per_email.rb', line 18 def servicecode 'payperemail' end |