Sha256: 06be75b797b18bbc31ad10541be4735c5033a2ae0808b77191bfe0207be87c9d

Contents?: true

Size: 520 Bytes

Versions: 2

Compression:

Stored size: 520 Bytes

Contents

module SantanderChile
  module ApiClient
    class MovementsResource < Resource
      DIG_RESPONSE = ["DATA", "MovimientosDepositos"]

      def list(account, **params)
        response = post_request("Consultas/MvtosYDeposiDocCtas", body: body_builder(account))
        Collection.from_response(response, dig_keys: DIG_RESPONSE, type: Movement)
      end

      private

      def body_builder(account)
        with_template "requests/MvtosYDeposiDocCtas", client: @client, account: account
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
santander_chile-api_client-1.1.1 lib/santander_chile/api_client/resources/movements.rb
santander_chile-api_client-1.1.0 lib/santander_chile/api_client/resources/movements.rb