Class: Ibanity::PontoConnect::PaymentRequest
- Inherits:
-
BaseResource
- Object
- OpenStruct
- BaseResource
- Ibanity::PontoConnect::PaymentRequest
show all
- Defined in:
- lib/ibanity/api/ponto_connect/payment_request.rb
Class Method Summary
collapse
create_by_uri, create_file_by_uri, destroy_by_uri, find_by_uri, find_file_by_uri, find_raw_by_uri, #initialize, list_by_uri, #reload!, update_by_uri
Class Method Details
.create(account_id:, access_token: nil, **attributes) ⇒ Object
9
10
11
12
|
# File 'lib/ibanity/api/ponto_connect/payment_request.rb', line 9
def self.create(account_id:, access_token: nil, **attributes)
uri = Ibanity.ponto_connect_api_schema["account"]["paymentRequests"].gsub("{accountId}", account_id).gsub("{paymentRequestId}", "")
create_by_uri(uri: uri, resource_type: "payment", attributes: attributes, customer_access_token: access_token)
end
|
.delete(id:, account_id:, access_token:) ⇒ Object
14
15
16
17
|
# File 'lib/ibanity/api/ponto_connect/payment_request.rb', line 14
def self.delete(id:, account_id:, access_token:)
uri = Ibanity.ponto_connect_api_schema["account"]["paymentRequests"].gsub("{accountId}", account_id).gsub("{paymentRequestId}", id)
destroy_by_uri(uri: uri, customer_access_token: access_token)
end
|
.find(access_token:, account_id:, id:) ⇒ Object
4
5
6
7
|
# File 'lib/ibanity/api/ponto_connect/payment_request.rb', line 4
def self.find(access_token:, account_id:, id:)
uri = Ibanity.ponto_connect_api_schema["account"]["paymentRequests"].sub("{accountId}", account_id).sub("{paymentRequestId}", id)
find_by_uri(uri: uri, customer_access_token: access_token)
end
|