Module: Square::Connect::Connections::Payments
- Included in:
- Merchant
- Defined in:
- lib/square/connect/connections/payments.rb
Instance Method Summary collapse
Instance Method Details
#payment(payment_id, params = nil) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/square/connect/connections/payments.rb', line 17 def payment(payment_id, params = nil) access_token_required! Payment.new( payment_id, merchant_id: identifier, access_token: access_token ).fetch end |
#payments(params = nil) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/square/connect/connections/payments.rb', line 5 def payments(params = nil) access_token_required! payments = handle_response do access_token.get endpoint_for(identifier, :payments), params end payments.collect do |payment| Payment.new payment.merge( access_token: access_token ) end end |