Class: BlackStack::InvoicingPaymentsProcessing::BasePlan

Inherits:
Object
  • Object
show all
Defined in:
lib/invoicing_payments_processing.rb

Constant Summary collapse

PAYMENT_PAY_AS_YOU_GO =
'G'
PAYMENT_SUBSCRIPTION =
'S'
CONSUMPTION_BY_UNIT =

el producto se conume credito por credito. Ejemplo: lead records.

0
CONSUMPTION_BY_TIME =

el producto exira al final del periodo de la factura. Ejemplos: Publicidad. Membresía.

1
PRODUCT_WAREHOUSE =
'Warehouse Service'
PRODUCT_SOFTWARE =
'Software Service'
PRODUCT_AGENCY =
'Agency Service'
PRODUCT_EDUCATION =
'Education Service'
PRODUCT_OTHER =
'Other Service'

Class Method Summary collapse

Class Method Details

.consumption_type_description(type) ⇒ Object



104
105
106
107
# File 'lib/invoicing_payments_processing.rb', line 104

def self.consumption_type_description(type)
  return 'Pay as You Go' if type == CONSUMPTION_BY_UNIT
  return 'Subscription' if type == CONSUMPTION_BY_TIME
end

.consumption_typesObject



100
101
102
# File 'lib/invoicing_payments_processing.rb', line 100

def self.consumption_types()
  [CONSUMPTION_BY_UNIT, CONSUMPTION_BY_TIME]
end

.payment_type_description(type) ⇒ Object



94
95
96
97
# File 'lib/invoicing_payments_processing.rb', line 94

def self.payment_type_description(type)
  return 'Pay as You Go' if type == PAYMENT_PAY_AS_YOU_GO
  return 'Subscription' if type == PAYMENT_SUBSCRIPTION
end

.payment_typesObject



90
91
92
# File 'lib/invoicing_payments_processing.rb', line 90

def self.payment_types()
  [PAYMENT_PAY_AS_YOU_GO, PAYMENT_SUBSCRIPTION]
end

.product_type_icon(s) ⇒ Object



114
115
116
117
118
119
120
# File 'lib/invoicing_payments_processing.rb', line 114

def self.product_type_icon(s)
  return "icon-cloud" if s == PRODUCT_WAREHOUSE
  return "icon-desktop" if s == PRODUCT_SOFTWARE
  return "icon-coffee" if s == PRODUCT_AGENCY 
  return "icon-book" if s == PRODUCT_EDUCATION
  return "icon-help" if s == PRODUCT_OTHER
end

.product_typesObject



110
111
112
# File 'lib/invoicing_payments_processing.rb', line 110

def self.product_types()
  [PRODUCT_WAREHOUSE, PRODUCT_SOFTWARE, PRODUCT_AGENCY, PRODUCT_EDUCATION, PRODUCT_OTHER]  
end