Sha256: ec81293963c8c77c314a087c3e65456b394c2ae59f2038b3f3eb71b728c13e3b

Contents?: true

Size: 481 Bytes

Versions: 6

Compression:

Stored size: 481 Bytes

Contents

module Cobrato
  module Resources
    class ChargingType < Base

      def collection_name
        'charging_types'
      end

      def list
        http.get(resource_base_path) do |response|
          bank_billets =  parsed_body(response)[collection_name]['bank_billets'].map do |item|
                            Cobrato::Entities::BankBillet.new(item)
                          end

          Struct.new(:bank_billets).new(bank_billets)
        end
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cobrato-client-0.2.5 lib/cobrato/resources/charging_type.rb
cobrato-client-0.2.4 lib/cobrato/resources/charging_type.rb
cobrato-client-0.2.3 lib/cobrato/resources/charging_type.rb
cobrato-client-0.2.3.pre lib/cobrato/resources/charging_type.rb
cobrato-client-0.2.2 lib/cobrato/resources/charging_type.rb
cobrato-client-0.2.1 lib/cobrato/resources/charging_type.rb