Sha256: ccc3d843355c572a64f17e2b6d1f13f8391de754189d01c3793cc47d1630e974

Contents?: true

Size: 749 Bytes

Versions: 1

Compression:

Stored size: 749 Bytes

Contents

#
# tracking_activity.rb
# ConstantContact
#
# Copyright (c) 2013 Constant Contact. All rights reserved.

module ConstantContact
	module Components
		class TrackingActivity < Component
			attr_accessor :results, :next


			# Constructor to create a TrackingActivity from the results/pagination response from getting a set of activities
			# @param [Array] results - results array from a tracking endpoint
			# @param [Hash] pagination - pagination hash returned from a tracking endpoint
			# @return [TrackingActivity] 
			def initialize(results, pagination)
				@results = results

				if (pagination.has_key?('next'))
					@next = pagination['next'][pagination['next'].index('&next=') + 6, pagination['next'].length]
				end
			end

		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
constantcontact-1.0.0 lib/constantcontact/components/tracking/tracking_activity.rb