class Ponto::Payment
Public Class Methods
create(account_id:, access_token: nil, **attributes)
click to toggle source
# File lib/ponto/api/payment.rb, line 3 def self.create(account_id:, access_token: nil, **attributes) path = Ponto.api_schema["account"]["payments"] .gsub("{accountId}", account_id) .gsub("{paymentId}", "") uri = Ponto.client.build_uri(path) create_by_uri( uri: uri, resource_type: "payment", attributes: attributes, access_token: access_token ) end
delete(id:, account_id:, access_token:)
click to toggle source
# File lib/ponto/api/payment.rb, line 23 def self.delete(id:, account_id:, access_token:) uri = Ponto.api_schema["account"]["payments"] .gsub("{accountId}", account_id) .sub("{paymentId}", id) destroy_by_uri(uri: uri, access_token: access_token) end
find(id:, account_id:, access_token:)
click to toggle source
# File lib/ponto/api/payment.rb, line 16 def self.find(id:, account_id:, access_token:) uri = Ponto.api_schema["account"]["payments"] .gsub("{accountId}", account_id) .sub("{paymentId}", id) find_by_uri(uri: uri, access_token: access_token) end