Tabnine Logo
Coupon
Code IndexAdd Tabnine to your IDE (free)

How to use
Coupon
in
me.hao0.wepay.model.common

Best Java code snippets using me.hao0.wepay.model.common.Coupon (Showing top 11 results out of 315)

origin: ihaolin/wepay

public static Coupon newCoupon(String batchId, String id, Integer fee){
  Coupon c = new Coupon();
  c.batchId = batchId;
  c.id = id;
  c.fee = fee;
  return c;
}
origin: ihaolin/wepay

private void setCoupons(WePayOrder order, Map<String, Object> orderData) {
  if (order != null
      && order.getCouponCount() != null
      && order.getCouponCount() > 0){
    List<Coupon> coupons = new ArrayList<>();
    Coupon coupon;
    for (int couponIndex = 0; couponIndex < order.getCouponCount(); couponIndex++){
      coupon = Coupon.newCoupon(
          (String)orderData.get(WepayField.COUPON_BATCH_ID + "_" + couponIndex),
          (String) orderData.get(WepayField.COUPON_ID + "_" + couponIndex),
          Integer.parseInt((String) orderData.get(WepayField.COUPON_FEE + "_" + couponIndex))
      );
      coupons.add(coupon);
    }
    order.setCoupons(coupons);
  }
}
origin: me.hao0/wepay-core

private void setCoupons(WePayOrder order, Map<String, Object> orderData) {
  if (order != null
      && order.getCouponCount() != null
      && order.getCouponCount() > 0){
    List<Coupon> coupons = new ArrayList<>();
    Coupon coupon;
    for (int couponIndex = 0; couponIndex < order.getCouponCount(); couponIndex++){
      coupon = Coupon.newCoupon(
          (String)orderData.get(WepayField.COUPON_BATCH_ID + "_" + couponIndex),
          (String) orderData.get(WepayField.COUPON_ID + "_" + couponIndex),
          Integer.parseInt((String) orderData.get(WepayField.COUPON_FEE + "_" + couponIndex))
      );
      coupons.add(coupon);
    }
    order.setCoupons(coupons);
  }
}
origin: me.hao0/wepay-core

public static Coupon newCoupon(String batchId, String id, Integer fee){
  Coupon c = new Coupon();
  c.batchId = batchId;
  c.id = id;
  c.fee = fee;
  return c;
}
origin: me.hao0/wepay-core

Coupon couponItem;
for (int couponItemIndex = 0; couponItemIndex < couponRefundCount; couponItemIndex++){
  couponItem = Coupon.newCoupon(
      (String) refundData.get(WepayField.COUPON_REFUND_BATCH_ID + "_" + refundItemIndex + "_" + couponItemIndex),
      (String) refundData.get(WepayField.COUPON_REFUND_ID + "_" + refundItemIndex + "_" + couponItemIndex),
origin: stackoverflow.com

couponReader: function () {
  var self = this
   , coupon = new Coupon();
  coupon.fetch({success: function (model, response) {
   Cart.add(model);
  });
 }
origin: ihaolin/wepay

Coupon couponItem;
for (int couponItemIndex = 0; couponItemIndex < couponRefundCount; couponItemIndex++){
  couponItem = Coupon.newCoupon(
      (String) refundData.get(WepayField.COUPON_REFUND_BATCH_ID + "_" + refundItemIndex + "_" + couponItemIndex),
      (String) refundData.get(WepayField.COUPON_REFUND_ID + "_" + refundItemIndex + "_" + couponItemIndex),
origin: stackoverflow.com

 List<Coupon> couponsList = new ArrayList<>();
JSONArray coupons = json
      .getJSONArray(TAG_COUPONS); // JSON Array
for (JSONObject coupon : (Iterable<JSONObject>) coupons) {
  String text = coupon.get("text");
  couponsList.add(new Coupon(text));
}
origin: stackoverflow.com

final GenericRawResults<Coupon> results = couponDao.queryRaw("SELECT "
       + "product_table.product_id AS id, "
       + "product_table.store_id AS storeId "
       + " FROM coupon_table "
       + "JOIN product_table ON coupon_table.store_id = product_table.store_id "
       + "WHERE product_table.store_id = 1", new RawRowMapper<Coupon>() {
         @Override
         public Coupon mapRow(String[] columnNames, String[] resultColumns) throws SQLException {
           final Integer productId = Integer.parseInt(resultColumns[0]);
           final Integer storeId = Integer.parseInt(resultColumns[1]);
           final Product product = new Product();
           product.setId(productId);
           product.setStoreId(storeId);
           final Coupon coupon = new Coupon();
           coupon.setProduct(product);
           return coupon;
         }
       });
     final Coupon coupon = results.getResults().get(0);
     final Product product = coupon.getProduct();
     System.out.println("Product id is " + product.getId() + " , Store id is " + product.getStoreId());
origin: stackoverflow.com

Coupon coupon = new Coupon(jsonObject.getString(KEY_TITLE),
    jsonObject.getString(KEY_NAME),
    jsonObject.getString(KEY_CODE),
origin: stackoverflow.com

Coupon newCoupon = new Coupon(sc.next(), sc.nextDouble());
coupons.add(i, newCoupon);
sc.nextLine();
me.hao0.wepay.model.commonCoupon

Javadoc

代金券 Author: haolin Email: haolin.h0@gmail.com Date: 1/12/15

Most used methods

  • <init>
  • newCoupon

Popular in Java

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
  • Kernel (java.awt.image)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Permission (java.security)
    Legacy security code; do not use.
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Notification (javax.management)
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now