################################################
##
## This module generates an SingleTradingDay object.
##
## See examples/analyse files for more information.
##
################################################
## 
## CHANGELOG
##
## 1.0 - 25 Apr 2013
## * First public version
##
################################################

package Finance::SingleTradingDay;

use strict;
use warnings;

our $AUTHOR  = 'Joachim De Schrijver';
our $VERSION = '1.0';
our $DATE    = '25 Apr 2013';
our $MODULE  = 'Finance::SingleTradingDay';

################################################

#################
## Constructor ##
#################

sub new {

	# Set class name
	my $class = shift;	

	# Init obj	
	my $self = {	
		date              => undef,
		price_closing     => undef,
		price_closing_adj => undef,        
		price_opening     => undef,	
		price_day_high    => undef,
		price_day_low     => undef,
		volume            => undef,
		price_change      => undef,
		volume_change     => undef,
		spread            => undef,
		market_cap        => undef
	};

	# Bless
	bless($self, $class);

	# Return blessed obj
	return $self;
}

#############
## Setters ##
#############

sub set_date {
	
	# Read params
	my ($self, $a) = @_;
	
	# Set
	$self->{date} = $a;
}

sub set_price_closing {
	
	# Read params
	my ($self, $a) = @_;
	
	# Set
	$self->{price_closing} = $a;
}

sub set_price_closing_adj {
	
	# Read params
	my ($self, $a) = @_;
	
	# Set
	$self->{price_closing_adj} = $a;
}

sub set_price_opening {
	
	# Read params
	my ($self, $a) = @_;
	
	# Set
	$self->{price_opening} = $a;
}

sub set_price_day_high {
	
	# Read params
	my ($self, $a) = @_;
	
	# Set
	$self->{price_day_high} = $a;
}

sub set_price_day_low {
	
	# Read params
	my ($self, $a) = @_;
	
	# Set
	$self->{price_day_low} = $a;
}

sub set_volume {
	
	# Read params
	my ($self, $a) = @_;
	
	# Set
	$self->{volume} = $a;
}

sub set_price_change {
	
	# Read params
	my ($self, $a) = @_;
	
	# Set
	$self->{price_change} = $a;
}

sub set_volume_change {
	
	# Read params;
	my ($self, $a) = @_;
	
	# Set
	$self->{volume_change} = $a;
}

sub set_market_cap {
	
	# Read params
	my ($self, $a) = @_;
	
	# Set
	$self->{market_cap} = $a;
}

sub set_spread {
	
	# Read params
	my ($self, $a) = @_;
	
	# Set
	$self->{spread} = $a;
}

#############
## Getters ##
#############

sub get_date {
	
	# Read params
	my $self = shift;
	
	# return
	return($self->{date});
}

sub get_price_closing {
	
	# Read params
	my $self = shift;
	
	# Return
	return($self->{price_closing});
}

sub get_price_closing_adj {
	
	# Read params
	my $self = shift;
	
	# Return
	return($self->{price_closing_adj});
}

sub get_price_opening {
	
	# Read params
	my $self = shift;
	
	# Return
	return($self->{price_opening});
}

sub get_price_day_high {
	
	# Read params
	my $self = shift;
	
	# Return
	return($self->{price_day_high});
}

sub get_price_day_low {
	
	# Read params
	my $self = shift;
	
	# Return
	return($self->{price_day_low});
}

sub get_volume {
	
	# Read params
	my $self = shift;
	
	# Return
	return($self->{volume});
}

sub get_price_change {
	
	# Read params
	my $self = shift;
	
	# Return
	return($self->{price_change});
}

sub get_volume_change {
	
	# Read params
	my $self = shift;
	
	# Return
	return($self->{volume_change});
}

sub get_market_cap {
	
	# Read params
	my $self = shift;
	
	# Return
	return($self->{market_cap});
}

sub get_spread {
	
	# Read params
	my $self = shift;
	
	# Return
	return($self->{spread});
}

1;