Class: TFSO::Payment

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/tfso/payment.rb

Constant Summary collapse

URL =
'https://api.24sevenoffice.com/Economy/InvoiceOrder/V001/PaymentService.asmx?WSDL'

Instance Method Summary collapse

Methods included from Helpers

#ensure_authenticated, #intialize_savon_client, #savon_client, #session_id, #session_id=

Constructor Details

#initialize(auth) ⇒ Payment

Returns a new instance of Payment.



8
9
10
11
12
# File 'lib/tfso/payment.rb', line 8

def initialize(auth)
  ensure_authenticated(auth)
  self.session_id = auth.session_id
  intialize_savon_client
end

Instance Method Details

#create(payment_info) ⇒ Object



14
15
16
17
# File 'lib/tfso/payment.rb', line 14

def create(payment_info)
  response = savon_client.call(:register_invoice_payment, message: {payment: payment_info}, cookies: @cookies)
  response.body[:register_invoice_payment_response][:register_invoice_payment_result]
end