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



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

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



113
114
115
# File 'lib/invoicing_payments_processing.rb', line 113

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

.payment_type_description(type) ⇒ Object



107
108
109
110
# File 'lib/invoicing_payments_processing.rb', line 107

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



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

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

.product_type_icon(s) ⇒ Object



127
128
129
130
131
132
133
# File 'lib/invoicing_payments_processing.rb', line 127

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



123
124
125
# File 'lib/invoicing_payments_processing.rb', line 123

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