payments package

Contents

payments package#

Subpackages#

Submodules#

payments.admin module#

Generated by utils/cgit/cgit_util_generate_admin_file on 2022-01-24 12:29:48.524865

class payments.admin.MemberOrganisationLinkAdmin(model, admin_site)[source]#

Bases: ModelAdmin

Admin class for model MemberOrganisationLink

autocomplete_fields = ['member_transaction', 'organisation_transaction']#
property media#
class payments.admin.MemberTransactionAdmin(model, admin_site)[source]#

Bases: ModelAdmin

Admin class for model MemberTransaction

autocomplete_fields = ['member', 'stripe_transaction', 'other_member', 'organisation']#
property media#
search_fields = ['reference_no', 'type', 'member__system_number', 'member__first_name', 'member__last_name']#
class payments.admin.OrgPaymentMethodAdmin(model, admin_site)[source]#

Bases: ModelAdmin

Admin class for model OrgPaymentMethod

autocomplete_fields = ['organisation']#
property media#
search_fields = ['organisation']#
class payments.admin.OrganisationTransactionAdmin(model, admin_site)[source]#

Bases: ModelAdmin

Admin class for model OrganisationTransaction

autocomplete_fields = ['organisation', 'member', 'stripe_transaction', 'other_organisation']#
property media#
search_fields = ['reference_no', 'type', 'organisation__name', 'member__first_name', 'member__last_name', 'member__system_number']#
class payments.admin.PaymentStaticAdmin(model, admin_site)[source]#

Bases: ModelAdmin

Admin class for model PaymentStatic

autocomplete_fields = ['modified_by']#
property media#
class payments.admin.StripeLogAdmin(model, admin_site)[source]#

Bases: ModelAdmin

property media#
search_fields = ['event']#
class payments.admin.StripeTransactionAdmin(model, admin_site)[source]#

Bases: ModelAdmin

Admin class for model StripeTransaction

autocomplete_fields = ['member', 'linked_organisation', 'linked_member']#
property media#
search_fields = ['stripe_reference']#
class payments.admin.UserPendingPaymentAdmin(model, admin_site)[source]#

Bases: ModelAdmin

Admin class for model UserPendingPayment

autocomplete_fields = ['organisation', 'session_entry', 'session_misc_payment']#
property media#
search_fields = ['system_number', 'description']#

payments.apps module#

class payments.apps.PaymentsConfig(app_name, app_module)[source]#

Bases: AppConfig

name = 'payments'#

payments.forms module#

Payment forms with validation

class payments.forms.AdjustMemberForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]#

Bases: ModelForm

For dodgy changes to members

class Meta[source]#

Bases: object

fields = ('member', 'description', 'amount')#
model#

alias of MemberTransaction

base_fields = {'amount': <django.forms.fields.DecimalField object>, 'description': <django.forms.fields.CharField object>, 'member': <django.forms.models.ModelChoiceField object>}#
declared_fields = {}#
property media#

Return all media required to render the widgets on this form.

class payments.forms.AdjustOrgForm(*args, **kwargs)[source]#

Bases: ModelForm

For dodgy changes to orgs

class Meta[source]#

Bases: object

fields = ('organisation', 'description', 'amount')#
model#

alias of OrganisationTransaction

base_fields = {'adjustment_type': <django.forms.fields.ChoiceField object>, 'amount': <django.forms.fields.DecimalField object>, 'description': <django.forms.fields.CharField object>, 'organisation': <django.forms.models.ModelChoiceField object>}#
clean()[source]#

Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‘__all__’.

declared_fields = {'adjustment_type': <django.forms.fields.ChoiceField object>}#
property media#

Return all media required to render the widgets on this form.

class payments.forms.DateForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None, bound_field_class=None)[source]#

Bases: Form

for simple from to date ranges

base_fields = {'from_date': <django.forms.fields.DateField object>, 'to_date': <django.forms.fields.DateField object>}#
declared_fields = {'from_date': <django.forms.fields.DateField object>, 'to_date': <django.forms.fields.DateField object>}#
property media#

Return all media required to render the widgets on this form.

class payments.forms.ManualTopup(*args, **kwargs)[source]#

Bases: Form

Manual top up form

CARD_CHOICES = [('Existing', 'Use Registered Card'), ('Another', 'Use Another Card')]#
base_fields = {'amount': <django.forms.fields.DecimalField object>, 'card_choice': <django.forms.fields.ChoiceField object>}#
clean()[source]#

validation for the amount field

declared_fields = {'amount': <django.forms.fields.DecimalField object>, 'card_choice': <django.forms.fields.ChoiceField object>}#
property media#

Return all media required to render the widgets on this form.

class payments.forms.MemberTransfer(*args, **kwargs)[source]#

Bases: Form

M2M transfer form

base_fields = {'amount': <django.forms.fields.DecimalField object>, 'description': <django.forms.fields.CharField object>, 'transfer_to': <django.forms.models.ModelChoiceField object>}#
declared_fields = {'amount': <django.forms.fields.DecimalField object>, 'description': <django.forms.fields.CharField object>, 'transfer_to': <django.forms.models.ModelChoiceField object>}#
property media#

Return all media required to render the widgets on this form.

class payments.forms.MemberTransferOrg(*args, **kwargs)[source]#

Bases: Form

Org to Member transfer form

base_fields = {'amount': <django.forms.fields.DecimalField object>, 'description': <django.forms.fields.CharField object>, 'transfer_to': <django.forms.models.ModelChoiceField object>}#
clean_amount()[source]#

check the balance is sufficient for the payment

declared_fields = {'amount': <django.forms.fields.DecimalField object>, 'description': <django.forms.fields.CharField object>, 'transfer_to': <django.forms.models.ModelChoiceField object>}#
property media#

Return all media required to render the widgets on this form.

class payments.forms.OrgStaticOverrideForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]#

Bases: ModelForm

override default ABF fees for an organisation

class Meta[source]#

Bases: object

fields = ('organisation', 'org_fee_percent')#
model#

alias of OrganisationSettlementFees

base_fields = {'org_fee_percent': <django.forms.fields.DecimalField object>, 'organisation': <django.forms.models.ModelChoiceField object>}#
declared_fields = {}#
property media#

Return all media required to render the widgets on this form.

class payments.forms.PaymentStaticForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]#

Bases: ModelForm

static data on payments

class Meta[source]#

Bases: object

fields = ('default_org_fee_percent', 'stripe_cost_per_transaction', 'stripe_percentage_charge', 'stripe_refund_percentage_charge', 'stripe_refund_weeks')#
model#

alias of PaymentStatic

base_fields = {'default_org_fee_percent': <django.forms.fields.DecimalField object>, 'stripe_cost_per_transaction': <django.forms.fields.DecimalField object>, 'stripe_percentage_charge': <django.forms.fields.DecimalField object>, 'stripe_refund_percentage_charge': <django.forms.fields.DecimalField object>, 'stripe_refund_weeks': <django.forms.fields.IntegerField object>}#
declared_fields = {}#
property media#

Return all media required to render the widgets on this form.

class payments.forms.SettlementForm(*args, **kwargs)[source]#

Bases: Form

For payments to Orgs

CARD_CHOICES = [('Dummy', 'Dummy')]#
base_fields = {'settle_list': <django.forms.fields.MultipleChoiceField object>}#
declared_fields = {'settle_list': <django.forms.fields.MultipleChoiceField object>}#
property media#

Return all media required to render the widgets on this form.

class payments.forms.StripeRefund(*args, **kwargs)[source]#

Bases: Form

Allow admins to make Stripe refunds

base_fields = {'amount': <django.forms.fields.DecimalField object>, 'description': <django.forms.fields.CharField object>}#
clean()[source]#

validation for the amount field

declared_fields = {'amount': <django.forms.fields.DecimalField object>, 'description': <django.forms.fields.CharField object>}#
property media#

Return all media required to render the widgets on this form.

payments.models module#

Model definitions for Payments.

See Payments Overview for more details.

class payments.models.AbstractTransaction(*args, **kwargs)[source]#

Bases: Model

Common attributes for the other transaction classes

class Meta[source]#

Bases: object

abstract = False#
amount#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

balance#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

club_session_id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

created_date#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

description#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

event_id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_created_date(*, field=<django.db.models.fields.DateTimeField: created_date>, is_next=True, **kwargs)#
get_previous_by_created_date(*, field=<django.db.models.fields.DateTimeField: created_date>, is_next=False, **kwargs)#
get_type_display(*, field=<django.db.models.fields.CharField: type>)#
reference_no#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

type#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

Bases: Model

This was built to provide the linkage between users, clubs and general, small payments. However, it can be used any time you want to link a specific member_transaction to a specific organisation_transaction. These link to a user or an org, but you won’t know which specific transaction without this linkage.

We could have solved this by adding an optional field to MemberTransaction and OrganisationTransaction but they are already overloaded. Another option would have been to add a metaclass to both with extended data. This looks like the most generic solution, however.

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

member_transaction#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

member_transaction_id#
objects = <django.db.models.manager.Manager object>#
organisation_transaction#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

organisation_transaction_id#
class payments.models.MemberTransaction(*args, **kwargs)[source]#

Bases: AbstractTransaction

Member Transactions. May have a linked transaction.

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

amount#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

balance#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

club_session_id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

created_date#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

description#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

event_id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_created_date(*, field=<django.db.models.fields.DateTimeField: created_date>, is_next=True, **kwargs)#
get_previous_by_created_date(*, field=<django.db.models.fields.DateTimeField: created_date>, is_next=False, **kwargs)#
get_type_display(*, field=<django.db.models.fields.CharField: type>)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

member#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

member_id#

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>#
organisation#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

organisation_id#
other_member#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

other_member_id#
reference_no#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

save(*args, **kwargs)[source]#

Save the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

sessionentry_set#

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

stripe_transaction#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

stripe_transaction_id#
type#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class payments.models.OrgPaymentMethod(*args, **kwargs)[source]#

Bases: Model

Defines the types of payments that an organisation will accept These are Bridge Credits plus any kind of off system payment. We allow an organisation to enter anything they like here but create sensible defaults for them.

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

active#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

membermembershiptype_set#

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>#
org_secondary_payment_type#

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

organisation#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

organisation_id#
payment_method#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

session_set#

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

sessionentry_set#

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

sessionmiscpayment_set#

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

sessiontypepaymentmethod_set#

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class payments.models.OrganisationSettlementFees(*args, **kwargs)[source]#

Bases: Model

ability to override default_org_fee_percent for an organisation

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>#
org_fee_percent#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

organisation#

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

organisation_id#
class payments.models.OrganisationTransaction(*args, **kwargs)[source]#

Bases: AbstractTransaction

Organisation transactions.

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

amount#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

balance#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

bank_settlement_amount#

Records the actual amount paid out minus the fees for settlement transactions. Blank for anything else

club_session_id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

created_date#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

description#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

event_id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_created_date(*, field=<django.db.models.fields.DateTimeField: created_date>, is_next=True, **kwargs)#
get_previous_by_created_date(*, field=<django.db.models.fields.DateTimeField: created_date>, is_next=False, **kwargs)#
get_type_display(*, field=<django.db.models.fields.CharField: type>)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

member#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

member_id#

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>#
organisation#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

organisation_id#
other_organisation#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

other_organisation_id#
reference_no#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

save(*args, **kwargs)[source]#

Save the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

sessionentry_set#

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

property settlement_amount#

How much will org actually be paid for this BALANCE (not amount) after we deduct our fees

We include the organisations minimum balance after settlement in the calculation so that we leave a float in the club’s account to take care of any outgoings before payments come in

stripe_transaction#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

stripe_transaction_id#
type#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class payments.models.PaymentStatic(*args, **kwargs)[source]#

Bases: Model

single row table with static data on payments

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

active#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

created_date#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

default_org_fee_percent#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_created_date(*, field=<django.db.models.fields.DateTimeField: created_date>, is_next=True, **kwargs)#
get_previous_by_created_date(*, field=<django.db.models.fields.DateTimeField: created_date>, is_next=False, **kwargs)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

modified_by#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

modified_by_id#
objects = <django.db.models.manager.Manager object>#
stripe_cost_per_transaction#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

stripe_percentage_charge#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

stripe_refund_percentage_charge#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

stripe_refund_weeks#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class payments.models.StripeLog(*args, **kwargs)[source]#

Bases: Model

Log messages received from Stripe on the webhook in case we need them in full

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

cobalt_tran_type#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

created_date#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

event#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

event_type#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_created_date(*, field=<django.db.models.fields.DateTimeField: created_date>, is_next=True, **kwargs)#
get_previous_by_created_date(*, field=<django.db.models.fields.DateTimeField: created_date>, is_next=False, **kwargs)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>#
class payments.models.StripeTransaction(*args, **kwargs)[source]#

Bases: Model

Our record of Stripe transactions.

Only stores basic information, for the full details use the stripe_reference to look up the transaction in Stripe.

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

TRANSACTION_STATUS = [('Initiated', 'Initiated - Stripe Transaction object created'), ('Intent', 'Intent - received customer intent to pay from Stripe'), ('Pending', 'Pending - transaction approved by Stripe - awaiting confirmation'), ('Succeeded', 'Succeeded - payment completed successfully'), ('Failed', 'Failed - payment failed'), ('Partial refund', 'Partial refund - some money returned'), ('Refunded', 'Refunded - Fully refunded')]#
amount#

Amount of the transaction in currency unit (default Australian Dollars). Be careful as Stripe stores the amount in cents, not dollars.

created_date#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

description#

Description of the transaction.

get_next_by_created_date(*, field=<django.db.models.fields.DateTimeField: created_date>, is_next=True, **kwargs)#
get_next_by_last_change_date(*, field=<django.db.models.fields.DateTimeField: last_change_date>, is_next=True, **kwargs)#
get_previous_by_created_date(*, field=<django.db.models.fields.DateTimeField: created_date>, is_next=False, **kwargs)#
get_previous_by_last_change_date(*, field=<django.db.models.fields.DateTimeField: last_change_date>, is_next=False, **kwargs)#
get_status_display(*, field=<django.db.models.fields.CharField: status>)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

last_change_date#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

linked_amount#

linked amount can be different to amount if the member had some money in their account already

linked_member#

A stripe payment can be linked to a payment to an organisation or to a member, but not both

linked_member_id#
linked_organisation#

A stripe payment can be linked to a payment to an organisation or to a member, but not both

linked_organisation_id#
linked_transaction_type#

Type of the transaction that we are linked to. This is payload on StripeTransaction that is used to create the linked MemberTransaction or OrganisationTransaction record.

member#

Link to the member(User object) that is associated with this transaction.

member_id#
membertransaction_set#

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>#
organisationtransaction_set#

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

refund_amount#

How much has been refunded

route_code#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

route_payload#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

status#

Status of the transaction. See TRANSACTION_STATUS for options.

stripe_balance_transaction#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

stripe_brand#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

stripe_country#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

stripe_currency#

Stripe currency for the transaction.

stripe_exp_month#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

stripe_exp_year#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

stripe_last4#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

stripe_method#

Stripe payment method - always “Card”.

stripe_receipt_url#

Stripe receipt URL. User can go directly to this for Stripe info.

stripe_reference#

Reference passed by Stripe. Use this to look up more detail within Stripe itself.

class payments.models.TransactionType(*values)[source]#

Bases: TextChoices

CONGRESS = 'CO'#
SESSION = 'SE'#
class payments.models.UserPendingPayment(*args, **kwargs)[source]#

Bases: Model

This is basically an IOU for when a player cannot pay for something at a club but the club is okay for them to pay later.

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

class SessionEntry(*args, **kwargs)#

Bases: Model

A player who is playing in a session

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

fee#

default to -99 so we know it hasn’t been set. Zero is a valid fee to set it to

get_seat_display(*, field=<django.db.models.fields.CharField: seat>)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_paid#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

member_tran#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

member_tran_id#
objects = <django.db.models.manager.Manager object>#
org_tran#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

org_tran_id#
pair_team_number#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

payment_method#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

payment_method_id#
player_name_from_file#

Player name as it appears on the file. We usually use the system_number, but for non-ABF members we need this

save(*args, **kwargs)#

We add the seat number internal on save, so we can load from database in order NSEW

seat#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

seat_number_internal#

seat_number_internal is used to sort NSEW in order

session#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

session_id#
sessionmiscpayment_set#

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

system_number#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

userpendingpayment_set#

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class SessionMiscPayment(*args, **kwargs)#

Bases: Model

holds miscellaneous payments associated with a session. These are not paid until the payments for this session are all processed.

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

class TypeOfPayment(*values)#

Bases: TextChoices

OTHER = 'OT'#
TOP_UP = 'TU'#
amount#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

description#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_payment_type_display(*, field=<django.db.models.fields.CharField: payment_type>)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>#
payment_made#

Has this payment been processed. We use a different name from SessionEntry to help with searching the code

payment_method#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

payment_method_id#
payment_type#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

session_entry#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

session_entry_id#
userpendingpayment_set#

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

amount#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

created_at#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

description#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)#
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>#
organisation#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

organisation_id#
session_entry#

Optional but likely that this IOU is for a session that they played in

session_entry_id#
session_misc_payment#

Optional For a miscellaneous payment we want the id of the payment, not just the session id

session_misc_payment_id#
system_number#

We use system_number to cover both Users and UnregisteredUsers

payments.urls module#

Module contents#