The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Interchange6::Schema::Result::Order

ACCESSORS

orders_id

Primary key.

order_number

Unique representation of the order.

order_date

Timestamp of when the order was placed. Is nullable.

users_id

Foreign key constraint on "users_id" in Interchange6::Schema::Result::User via "user" relationship.

email

Email address used for the order. Default is empty string

shipping_addresses_id

Foreign key constraint on "addresses_id" in Interchange6::Schema::Result::Address via "shipping_address" relationship.

billing_addresses_id

Foreign key constraint on "addresses_id" in Interchange6::Schema::Result::Address via "billing_address" relationship.

weight

Total numeric weight of the order. Default is 0

payment_method

This is the type of payment used for the order.

payment_number

A validation record for the payment.

payment_status

The status of the payment for the current order.

shipping_method

What shipping method was used for the order.

subtotal

The sum of all items in the cart before tax and shipping costs.

Defaults to 0.

shipping

The numeric cost associated with shipping the order. Default is 0

handling

The numeric cost associated with handling the order. Default is 0.

salestax

The total tax applied to the order. Default is 0

total_cost

The total cost of all items shipping handling and tax for the order. Default is 0.

RELATIONS

shipping_address

Type: belongs_to

Related object: Interchange6::Schema::Result::Address

billing_address

Type: belongs_to

Related object: Interchange6::Schema::Result::Address

orderlines

Type: has_many

Related object: Interchange6::Schema::Result::Orderline

payment_orders

Type: has_many

Related object: Interchange6::Schema::Result::PaymentOrder

user

Type: belongs_to

Related object: Interchange6::Schema::Result::User

order_comments

Type: has_many

Related object: Interchange6::Schema::Result::OrderComment

_comments

Type: many_to_many

This is considered a private method. Please see public "comments" and "add_to_comments" methods.

statuses

Type: has_many

Related object: Interchange6::Schema::Result::OrderStatus

METHODS

comments

Arguments: none
Return Value: Interchange6::Schema::Result::Message resultset.

add_to_comments

Arguments: \%col_data
Return Value: Interchange6::Schema::Result::Message

See "add_to_$rel" in DBIx::Class::Relationship::Base many_to_many for further details.

set_comments

Arguments: (\@hashrefs_of_col_data | \@result_objs)
Return Value: not defined

Similar to "set_$rel" in DBIx::Class::Relationship::Base except that this method D OES delete objects in the table on the right side of the relation.

delete

Overload delete to force removal of any order comments.

insert

Override insert so that if no Interchange6::Schema::Result::OrderStatus has been provided via multicreate then create a single status named new.

status

Option argument $status will cause creation of a new related entry in Interchange6::Schema::Result::OrderStatus.

Returns the most recent "status" in Interchange6::Schema::Result::OrderStatus or undef if none are found.

If initial result set was created using "with_status" in Interchange6::Schema::ResultSet::Order then the status added by that method will be returned so that a new query is not required.