Sha256: 516ce7f1ffcf9591a300c4712e088f4cf292f4d51390caf340f61b4f55efd0fe

Contents?: true

Size: 577 Bytes

Versions: 4

Compression:

Stored size: 577 Bytes

Contents

module Aptible
  module Billing
    class Meter < Resource
      field :id
      field :size
      field :type, type: String
      field :description, type: String
      field :account_id, type: String
      field :created_at, type: Time
      field :updated_at, type: Time
      field :started_at, type: Time
      field :ended_at, type: Time

      def billing_detail
        Aptible::Billing::BillingDetail.find_by_url(
          links['billing_detail'].href,
          token: token,
          headers: headers
        )
      rescue
        nil
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
aptible-billing-1.0.1 lib/aptible/billing/meter.rb
aptible-billing-1.0.0 lib/aptible/billing/meter.rb
aptible-billing-0.1.7 lib/aptible/billing/meter.rb
aptible-billing-0.1.6 lib/aptible/billing/meter.rb