Sha256: 065b7019b9310208215a7e7ae014f9e4209e0f8892bf2126f732cfb137df2cf5

Contents?: true

Size: 647 Bytes

Versions: 1

Compression:

Stored size: 647 Bytes

Contents

# frozen_string_literal: true

require 'json'

module GoogleAnalyticsV4Api
  class Property
    attr_accessor :name, :propertyType, :createTime, :updateTime, :parent, :displayName, :industryCategory, :timeZone, :currencyCode, :serviceLevel, :deleteTime, :expireTime, :account

    def initialize(attributes = {})
      attributes.each do |k, v|
        self.send("#{k}=", v)
      end
    end

    def self.parse_list(body)
      JSON.parse(body)["properties"].map do |attrs|
        GoogleAnalyticsV4Api::Property.new(attrs)
      end
    end

    def self.parse(body)
      GoogleAnalyticsV4Api::Property.new(JSON.parse(body))
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
google_analytics_v4_api-0.0.1 lib/google_analytics_v4_api/property.rb