Class: Ibanity::Xs2a::PaymentInitiationRequestAuthorization

Inherits:
BaseResource
  • Object
show all
Defined in:
lib/ibanity/api/xs2a/payment_initiation_request_authorization.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(financial_institution_id:, payment_initiation_request_id:, customer_access_token:, idempotency_key: nil, meta: nil, **attributes) ⇒ Object



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

def self.create(financial_institution_id:, payment_initiation_request_id:, customer_access_token:, idempotency_key: nil, meta: nil, **attributes)
  path = Ibanity.xs2a_api_schema["customer"]["financialInstitution"]["paymentInitiationRequest"]["authorizations"]
             .gsub("{financialInstitutionId}", financial_institution_id)
             .gsub("{paymentInitiationRequestId}", payment_initiation_request_id)
             .gsub("{authorizationId}", "")
  uri = Ibanity.client.build_uri(path)
  create_by_uri(
      uri: uri,
      resource_type: "authorization",
      attributes: attributes,
      customer_access_token: customer_access_token,
      idempotency_key: idempotency_key,
      meta: meta
  )
end