Class: Ibanity::IsabelConnect::BulkPaymentInitiationRequest

Inherits:
BaseResource
  • Object
show all
Defined in:
lib/ibanity/api/isabel_connect/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(access_token:, raw_content:, filename:, idempotency_key: nil, is_shared: true, hide_details: false) ⇒ Object



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

def self.create(access_token:, raw_content:, filename:, idempotency_key: nil, is_shared: true, hide_details: false)
  uri = Ibanity.isabel_connect_api_schema["bulkPaymentInitiationRequests"].sub("{bulkPaymentInitiationRequestId}", "")
  create_file_by_uri(
    uri: uri,
    resource_type: "bulkPaymentInitiationRequest",
    raw_content: raw_content,
    customer_access_token: access_token,
    idempotency_key: idempotency_key,
    headers: {
      content_type: :xml,
      "Content-Disposition": "inline; filename=#{filename}",
      "Is-Shared": is_shared,
      "Hide-Details": hide_details
    }
  )
end

.find(id:, access_token:) ⇒ Object



21
22
23
24
# File 'lib/ibanity/api/isabel_connect/bulk_payment_initiation_request.rb', line 21

def self.find(id:, access_token:)
  uri = Ibanity.isabel_connect_api_schema["bulkPaymentInitiationRequests"].sub("{bulkPaymentInitiationRequestId}", id)
  find_by_uri(uri: uri, customer_access_token: access_token)
end