sunnyman's (sunnyman) wrote in changelog,
sunnyman's
sunnyman
changelog

[ljcom] r12108: LJSUP-12300: Update documentations for i...

Committer: vtroitsky
LJSUP-12300: Update documentations for internal APIs functions
U   trunk/cgi-bin/LJ/Pay/SelfPromo.pm
Modified: trunk/cgi-bin/LJ/Pay/SelfPromo.pm
===================================================================
--- trunk/cgi-bin/LJ/Pay/SelfPromo.pm	2012-06-14 09:33:39 UTC (rev 12107)
+++ trunk/cgi-bin/LJ/Pay/SelfPromo.pm	2012-06-14 09:41:03 UTC (rev 12108)
@@ -259,7 +259,7 @@
 }
 
 =item _deliver_item
-    Actually perform all specific actions to cancel/refuns previous promo
+    Actually perform all specific actions to cancel/refuns previous promo if it exists  
     Parameters:
     $slot, $item, $rcpt_u, $current_promotion, $promoted_object
 =cut
@@ -704,7 +704,6 @@
     return 1;
 }
 
-
 # return current promoted object: 
 # So it might be: entry / journal / community
 sub current_promoted_object {
@@ -721,7 +720,6 @@
         count   - max count of slots
     REQ: index <= 0
     REQ: index + count <= 0
-
     TODO: Add cache scheme
 =cut
 sub get_promotions {
@@ -924,7 +922,7 @@
 
     my $it = LJ::Pay::Payment::PayItem->new_memonly(
         'item'    => 'selfpromo',
-        'subitem' => '',
+        'subitem' => '',            # todo add reference to promotion object here
         'amt'     => $opts->{'price'} / LJ::Pay::Wallet::EXCHANGE_RATE,
         'qty'     => 1,
         'anon'    => 0,
@@ -936,8 +934,8 @@
     ($it) = $cart->get_items;
 
     # set payitem props as appropriate
-    $it->set_prop( 'selfpromo'                => $opts->{'slot'}->type );
-    $it->set_prop( 'selfpromo_type'           => $opts->{'type'} );
+    $it->set_prop( 'selfpromo'                => $opts->{'slot'}->type );   # type of item promoted
+    $it->set_prop( 'selfpromo_type'           => $opts->{'type'} );         # type of the cart operation
     $it->set_prop( 'selfpromo_profit'         => $opts->{'profit'} );
     $it->set_prop( 'selfpromo_refund'         => $opts->{'refund'} );
     $it->set_prop( 'selfpromo_refund_userid'  => $opts->{'refund_userid'} );
@@ -967,10 +965,14 @@
     return $cart;
 }
 
+=item send_notifications
+    Send notification to the specified user about action performed with promo related to him
 # supported opts: reason, details, object, refund_amount, exptimea
-# Send notification to the specified user about action performed with promo related to him
 
 # TODO (Refactoring):  Pass PromoObject instead of %opts and use methods
+
+# TODO (Refactoring): Move to Promotion objects 
+=cut
 sub send_notification {
     my ( $class, $slot, $user, $action, %opts ) = @_;
   

Tags: ljcom, pm, sunnyman, vtroitsky
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments