Class: Ibanity::Xs2a::BulkPaymentInitiationRequest

Inherits:
BaseResource
  • Object
show all
Defined in:
lib/ibanity/api/xs2a/bulk_payment_initiation_request.rb

Class Method Summary collapse

Methods inherited from BaseResource

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

Constructor Details

This class inherits a constructor from Ibanity::BaseResource

Class Method Details

.create_for_financial_institution(financial_institution_id:, customer_access_token:, idempotency_key: nil, **attributes) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/ibanity/api/xs2a/bulk_payment_initiation_request.rb', line 4

def self.create_for_financial_institution(financial_institution_id:, customer_access_token:, idempotency_key: nil, **attributes)
  path = Ibanity.xs2a_api_schema["customer"]["financialInstitution"]["bulkPaymentInitiationRequests"]
    .gsub("{financialInstitutionId}", financial_institution_id)
    .sub("{paymentInitiationRequestId}", "")
  uri = Ibanity.client.build_uri(path)
  create_by_uri(
    uri: uri,
    resource_type: "bulkPaymentInitiationRequest",
    attributes: attributes,
    customer_access_token: customer_access_token,
    idempotency_key: idempotency_key
  )
end

.delete(id:, financial_institution_id:, customer_access_token:) ⇒ Object



25
26
27
28
29
30
# File 'lib/ibanity/api/xs2a/bulk_payment_initiation_request.rb', line 25

def self.delete(id:, financial_institution_id:, customer_access_token:)
  uri = Ibanity.xs2a_api_schema["customer"]["financialInstitution"]["bulkPaymentInitiationRequests"]
    .gsub("{financialInstitutionId}", financial_institution_id)
    .sub("{paymentInitiationRequestId}", id)
  destroy_by_uri(uri: uri, customer_access_token: customer_access_token)
end

.find(id:, financial_institution_id:, customer_access_token:) ⇒ Object



18
19
20
21
22
23
# File 'lib/ibanity/api/xs2a/bulk_payment_initiation_request.rb', line 18

def self.find(id:, financial_institution_id:, customer_access_token:)
  uri = Ibanity.xs2a_api_schema["customer"]["financialInstitution"]["bulkPaymentInitiationRequests"]
    .gsub("{financialInstitutionId}", financial_institution_id)
    .sub("{paymentInitiationRequestId}", id)
  find_by_uri(uri: uri, customer_access_token: customer_access_token)
end