Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions app/models/event/plan/usps_debit.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# frozen_string_literal: true

# == Schema Information
#
# Table name: event_plans
#
# id :bigint not null, primary key
# aasm_state :string
# inactive_at :datetime
# type :string
# created_at :datetime not null
# updated_at :datetime not null
# event_id :bigint not null
#
# Indexes
#
# index_event_plans_on_event_id (event_id)
#
# Foreign Keys
#
# fk_rails_... (event_id => events.id)
#
class Event
class Plan
class USPSDebit < Internal
def label = "HQ USPS debit"

validate do
unless event_id == EventMappingEngine::EventIds::HQ_USPS_OPS
errors.add(:event, "must be Theseus USPS Operating Account")
end
Comment on lines +29 to +31
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NICE

end

def description
"account for HQ's USPS integration - no receipts (if it gets card-locked we're federally cooked)"
end

def features = %w[cards account_number transfers documentation unrestricted_disbursements front_disbursements]

def card_lockable? = false

def receipts_required? = false

end

end

end
1 change: 1 addition & 0 deletions app/services/event_mapping_engine/event_ids.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ module EventIds
HACK_FOUNDATION_INTEREST = 2740
REIMBURSEMENT_CLEARING = 4318
SVB_SWEEPS = 5832
HQ_USPS_OPS = 7893
end
end
1 change: 1 addition & 0 deletions config/initializers/inflections.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@
inflect.irregular "has", "have"
inflect.irregular "hasn't", "haven't"
inflect.acronym "HQ"
inflect.acronym "USPS"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

end