Class: DnaPaymentsPartnerReportingSettlementApIs::TransactionType

Inherits:
Object
  • Object
show all
Defined in:
lib/dna_payments_partner_reporting_settlement_ap_is/models/transaction_type.rb

Overview

Type of transaction/fee recorded in the Settlement (and, by reference, POS Reporting) API.

Constant Summary collapse

TRANSACTION_TYPE =
[
  # TODO: Write general description for RETAIL
  RETAIL = 'retail'.freeze,

  # TODO: Write general description for CREDIT
  CREDIT = 'credit'.freeze,

  # TODO: Write general description for RETAILAPM
  RETAILAPM = 'retail-apm'.freeze,

  # TODO: Write general description for CREDITAPM
  CREDITAPM = 'credit-apm'.freeze,

  # TODO: Write general description for UNIQUE
  UNIQUE = 'unique'.freeze,

  # TODO: Write general description for DECLINEDTXN
  DECLINEDTXN = 'declined-txn'.freeze,

  # TODO: Write general description for MINIMUMMONTHLYSERVICECHARGE
  MINIMUMMONTHLYSERVICECHARGE = 'minimum-monthly-service-charge'.freeze,

  # TODO: Write general description for PCIFEE
  PCIFEE = 'pci-fee'.freeze,

  # TODO: Write general description for MERCHANTMONTHLYFEE
  MERCHANTMONTHLYFEE = 'merchant-monthly-fee'.freeze,

  # TODO: Write general description for MOTOFEE
  MOTOFEE = 'moto-fee'.freeze,

  # TODO: Write general description for ZASHAPPFEE
  ZASHAPPFEE = 'zash-app-fee'.freeze,

  # TODO: Write general description for AIRTIMESERVICEFEE
  AIRTIMESERVICEFEE = 'airtime-service-fee'.freeze,

  # TODO: Write general description for SETTLEMENTFEE
  SETTLEMENTFEE = 'settlement-fee'.freeze,

  # TODO: Write general description for SETTLEMENTFEETRANS
  SETTLEMENTFEETRANS = 'settlement-fee-trans'.freeze,

  # TODO: Write general description for ONEOFFTERMINALCOST
  ONEOFFTERMINALCOST = 'one-off-terminal-cost'.freeze,

  # TODO: Write general description for ONEOFFTERMINALSETUPFEE
  ONEOFFTERMINALSETUPFEE = 'one-off-terminal-setup-fee'.freeze,

  # TODO: Write general description for MONTHLYRENTFEE
  MONTHLYRENTFEE = 'monthly-rent-fee'.freeze,

  # TODO: Write general description for FASTERFUNDINGMONTHLYFEE
  FASTERFUNDINGMONTHLYFEE = 'faster-funding-monthly-fee'.freeze,

  # TODO: Write general description for MONTHLYGATEWAYFEE
  MONTHLYGATEWAYFEE = 'monthly-gateway-fee'.freeze,

  # TODO: Write general description for AXEPTSERVICESSUBSCRIPTIONFEES
  AXEPTSERVICESSUBSCRIPTIONFEES = 'axept-services-subscription-fees'.freeze,

  # TODO: Write general description for ONEOFFCHARGE
  ONEOFFCHARGE = 'one-off-charge'.freeze,

  # TODO: Write general description for ONEOFFCHARGEWVAT
  ONEOFFCHARGEWVAT = 'one-off-charge-w-vat'.freeze,

  # TODO: Write general description for RETAILCBK
  RETAILCBK = 'retail-cbk'.freeze,

  # TODO: Write general description for CREDITCBK
  CREDITCBK = 'credit-cbk'.freeze,

  # TODO: Write general description for RETAIL2PRS
  RETAIL2PRS = 'retail-2prs'.freeze,

  # TODO: Write general description for UNIQUE2PRS
  UNIQUE2PRS = 'unique-2prs'.freeze,

  # TODO: Write general description for UNIQUECBK
  UNIQUECBK = 'unique-cbk'.freeze,

  # TODO: Write general description for ENUM_RETAILCOLLABORATIONRDR
  ENUM_RETAILCOLLABORATIONRDR = 'retail-collaboration/rdr'.freeze,

  # TODO: Write general description for ADJUSTMENTDUETOMANUALPAYMENT
  ADJUSTMENTDUETOMANUALPAYMENT = 'adjustment-due-to-manual-payment'.freeze,

  # TODO: Write general description for ACCOUNTREPLENISHMENT
  ACCOUNTREPLENISHMENT = 'account-replenishment'.freeze,

  # TODO: Write general description for NEGATIVEBALANCETODDINVOICE
  NEGATIVEBALANCETODDINVOICE = 'negative-balance-to-dd-invoice'.freeze,

  # TODO: Write general description for CREDITNOTIF
  CREDITNOTIF = 'credit-notif'.freeze,

  # TODO: Write general description for FEECOLLECTIONOUT
  FEECOLLECTIONOUT = 'fee-collection-out'.freeze,

  # TODO: Write general description for FEECOLLECTIONINC
  FEECOLLECTIONINC = 'fee-collection-inc'.freeze,

  # TODO: Write general description for FEECOLLECTIONCBKOUT
  FEECOLLECTIONCBKOUT = 'fee-collection-cbk-out'.freeze,

  # TODO: Write general description for FUNDSDISBOUT
  FUNDSDISBOUT = 'funds-disb-out'.freeze,

  # TODO: Write general description for FUNDSDISBINC
  FUNDSDISBINC = 'funds-disb-inc'.freeze,

  # TODO: Write general description for DEBITACCOUNT
  DEBITACCOUNT = 'debit-account'.freeze,

  # TODO: Write general description for CREDITACCOUNT
  CREDITACCOUNT = 'credit-account'.freeze,

  # TODO: Write general description for FEESADJUSTMENT
  FEESADJUSTMENT = 'fees-adjustment'.freeze,

  # TODO: Write general description for HOLDSETTLEMENT
  HOLDSETTLEMENT = 'hold-settlement'.freeze,

  # TODO: Write general description for RELEASEFUNDS
  RELEASEFUNDS = 'release-funds'.freeze,

  # TODO: Write general description for TRANSFERTOSECURITYDEPOSIT
  TRANSFERTOSECURITYDEPOSIT = 'transfer-to-security-deposit'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = RETAIL) ⇒ Object



147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/transaction_type.rb', line 147

def self.from_value(value, default_value = RETAIL)
  return default_value if value.nil?

  str = value.to_s.strip

  case str.downcase
  when 'retail' then RETAIL
  when 'credit' then CREDIT
  when 'retailapm' then RETAILAPM
  when 'creditapm' then CREDITAPM
  when 'unique' then UNIQUE
  when 'declinedtxn' then DECLINEDTXN
  when 'minimummonthlyservicecharge' then MINIMUMMONTHLYSERVICECHARGE
  when 'pcifee' then PCIFEE
  when 'merchantmonthlyfee' then MERCHANTMONTHLYFEE
  when 'motofee' then MOTOFEE
  when 'zashappfee' then ZASHAPPFEE
  when 'airtimeservicefee' then AIRTIMESERVICEFEE
  when 'settlementfee' then SETTLEMENTFEE
  when 'settlementfeetrans' then SETTLEMENTFEETRANS
  when 'oneoffterminalcost' then ONEOFFTERMINALCOST
  when 'oneoffterminalsetupfee' then ONEOFFTERMINALSETUPFEE
  when 'monthlyrentfee' then MONTHLYRENTFEE
  when 'fasterfundingmonthlyfee' then FASTERFUNDINGMONTHLYFEE
  when 'monthlygatewayfee' then MONTHLYGATEWAYFEE
  when 'axeptservicessubscriptionfees' then AXEPTSERVICESSUBSCRIPTIONFEES
  when 'oneoffcharge' then ONEOFFCHARGE
  when 'oneoffchargewvat' then ONEOFFCHARGEWVAT
  when 'retailcbk' then RETAILCBK
  when 'creditcbk' then CREDITCBK
  when 'retail2prs' then RETAIL2PRS
  when 'unique2prs' then UNIQUE2PRS
  when 'uniquecbk' then UNIQUECBK
  when 'enum_retailcollaborationrdr' then ENUM_RETAILCOLLABORATIONRDR
  when 'adjustmentduetomanualpayment' then ADJUSTMENTDUETOMANUALPAYMENT
  when 'accountreplenishment' then ACCOUNTREPLENISHMENT
  when 'negativebalancetoddinvoice' then NEGATIVEBALANCETODDINVOICE
  when 'creditnotif' then CREDITNOTIF
  when 'feecollectionout' then FEECOLLECTIONOUT
  when 'feecollectioninc' then FEECOLLECTIONINC
  when 'feecollectioncbkout' then FEECOLLECTIONCBKOUT
  when 'fundsdisbout' then FUNDSDISBOUT
  when 'fundsdisbinc' then FUNDSDISBINC
  when 'debitaccount' then DEBITACCOUNT
  when 'creditaccount' then CREDITACCOUNT
  when 'feesadjustment' then FEESADJUSTMENT
  when 'holdsettlement' then HOLDSETTLEMENT
  when 'releasefunds' then RELEASEFUNDS
  when 'transfertosecuritydeposit' then TRANSFERTOSECURITYDEPOSIT
  else
    default_value
  end
end

.validate(value) ⇒ Object



141
142
143
144
145
# File 'lib/dna_payments_partner_reporting_settlement_ap_is/models/transaction_type.rb', line 141

def self.validate(value)
  return false if value.nil?

  TRANSACTION_TYPE.include?(value)
end