Subversion Repositories SmartDukaan

Rev

Rev 483 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 483 Rev 495
Line 41... Line 41...
41
 
41
 
42
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException;
42
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException;
43
 
43
 
44
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException;
44
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException;
45
 
45
 
-
 
46
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException;
-
 
47
 
46
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException;
48
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException;
47
 
49
 
48
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
50
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
49
 
51
 
50
    public long createOrder(Order order) throws TransactionServiceException, TException;
52
    public long createOrder(Order order) throws TransactionServiceException, TException;
Line 382... Line 384...
382
        throw result.ex;
384
        throw result.ex;
383
      }
385
      }
384
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
386
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
385
    }
387
    }
386
 
388
 
-
 
389
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
-
 
390
    {
-
 
391
      send_addBillingDetails(orderId, invoice_number, billed_by);
-
 
392
      return recv_addBillingDetails();
-
 
393
    }
-
 
394
 
-
 
395
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
-
 
396
    {
-
 
397
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
-
 
398
      addBillingDetails_args args = new addBillingDetails_args();
-
 
399
      args.orderId = orderId;
-
 
400
      args.invoice_number = invoice_number;
-
 
401
      args.billed_by = billed_by;
-
 
402
      args.write(oprot_);
-
 
403
      oprot_.writeMessageEnd();
-
 
404
      oprot_.getTransport().flush();
-
 
405
    }
-
 
406
 
-
 
407
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
-
 
408
    {
-
 
409
      TMessage msg = iprot_.readMessageBegin();
-
 
410
      if (msg.type == TMessageType.EXCEPTION) {
-
 
411
        TApplicationException x = TApplicationException.read(iprot_);
-
 
412
        iprot_.readMessageEnd();
-
 
413
        throw x;
-
 
414
      }
-
 
415
      addBillingDetails_result result = new addBillingDetails_result();
-
 
416
      result.read(iprot_);
-
 
417
      iprot_.readMessageEnd();
-
 
418
      if (result.isSetSuccess()) {
-
 
419
        return result.success;
-
 
420
      }
-
 
421
      if (result.ex != null) {
-
 
422
        throw result.ex;
-
 
423
      }
-
 
424
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
-
 
425
    }
-
 
426
 
387
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException
427
    public List<Order> getOrdersForTransaction(long transactionId) throws TransactionServiceException, TException
388
    {
428
    {
389
      send_getOrdersForTransaction(transactionId);
429
      send_getOrdersForTransaction(transactionId);
390
      return recv_getOrdersForTransaction();
430
      return recv_getOrdersForTransaction();
391
    }
431
    }
Line 646... Line 686...
646
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
686
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
647
      processMap_.put("getTransactionStatus", new getTransactionStatus());
687
      processMap_.put("getTransactionStatus", new getTransactionStatus());
648
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
688
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
649
      processMap_.put("getAllOrders", new getAllOrders());
689
      processMap_.put("getAllOrders", new getAllOrders());
650
      processMap_.put("changeOrderStatus", new changeOrderStatus());
690
      processMap_.put("changeOrderStatus", new changeOrderStatus());
-
 
691
      processMap_.put("addBillingDetails", new addBillingDetails());
651
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
692
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
652
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
693
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
653
      processMap_.put("createOrder", new createOrder());
694
      processMap_.put("createOrder", new createOrder());
654
      processMap_.put("getOrder", new getOrder());
695
      processMap_.put("getOrder", new getOrder());
655
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
696
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
Line 907... Line 948...
907
        oprot.getTransport().flush();
948
        oprot.getTransport().flush();
908
      }
949
      }
909
 
950
 
910
    }
951
    }
911
 
952
 
-
 
953
    private class addBillingDetails implements ProcessFunction {
-
 
954
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
955
      {
-
 
956
        addBillingDetails_args args = new addBillingDetails_args();
-
 
957
        args.read(iprot);
-
 
958
        iprot.readMessageEnd();
-
 
959
        addBillingDetails_result result = new addBillingDetails_result();
-
 
960
        try {
-
 
961
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
-
 
962
          result.setSuccessIsSet(true);
-
 
963
        } catch (TransactionServiceException ex) {
-
 
964
          result.ex = ex;
-
 
965
        } catch (Throwable th) {
-
 
966
          LOGGER.error("Internal error processing addBillingDetails", th);
-
 
967
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
-
 
968
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
-
 
969
          x.write(oprot);
-
 
970
          oprot.writeMessageEnd();
-
 
971
          oprot.getTransport().flush();
-
 
972
          return;
-
 
973
        }
-
 
974
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
-
 
975
        result.write(oprot);
-
 
976
        oprot.writeMessageEnd();
-
 
977
        oprot.getTransport().flush();
-
 
978
      }
-
 
979
 
-
 
980
    }
-
 
981
 
912
    private class getOrdersForTransaction implements ProcessFunction {
982
    private class getOrdersForTransaction implements ProcessFunction {
913
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
983
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
914
      {
984
      {
915
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
985
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
916
        args.read(iprot);
986
        args.read(iprot);
Line 7132... Line 7202...
7132
      boolean first = true;
7202
      boolean first = true;
7133
 
7203
 
7134
      sb.append("success:");
7204
      sb.append("success:");
7135
      sb.append(this.success);
7205
      sb.append(this.success);
7136
      first = false;
7206
      first = false;
-
 
7207
      if (!first) sb.append(", ");
-
 
7208
      sb.append("ex:");
-
 
7209
      if (this.ex == null) {
-
 
7210
        sb.append("null");
-
 
7211
      } else {
-
 
7212
        sb.append(this.ex);
-
 
7213
      }
-
 
7214
      first = false;
-
 
7215
      sb.append(")");
-
 
7216
      return sb.toString();
-
 
7217
    }
-
 
7218
 
-
 
7219
    public void validate() throws TException {
-
 
7220
      // check for required fields
-
 
7221
    }
-
 
7222
 
-
 
7223
  }
-
 
7224
 
-
 
7225
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
-
 
7226
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
-
 
7227
 
-
 
7228
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
-
 
7229
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
-
 
7230
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
-
 
7231
 
-
 
7232
    private long orderId;
-
 
7233
    private String invoice_number;
-
 
7234
    private String billed_by;
-
 
7235
 
-
 
7236
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
7237
    public enum _Fields implements TFieldIdEnum {
-
 
7238
      ORDER_ID((short)1, "orderId"),
-
 
7239
      INVOICE_NUMBER((short)2, "invoice_number"),
-
 
7240
      BILLED_BY((short)3, "billed_by");
-
 
7241
 
-
 
7242
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
7243
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
7244
 
-
 
7245
      static {
-
 
7246
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
7247
          byId.put((int)field._thriftId, field);
-
 
7248
          byName.put(field.getFieldName(), field);
-
 
7249
        }
-
 
7250
      }
-
 
7251
 
-
 
7252
      /**
-
 
7253
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
7254
       */
-
 
7255
      public static _Fields findByThriftId(int fieldId) {
-
 
7256
        return byId.get(fieldId);
-
 
7257
      }
-
 
7258
 
-
 
7259
      /**
-
 
7260
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
7261
       * if it is not found.
-
 
7262
       */
-
 
7263
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
7264
        _Fields fields = findByThriftId(fieldId);
-
 
7265
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
7266
        return fields;
-
 
7267
      }
-
 
7268
 
-
 
7269
      /**
-
 
7270
       * Find the _Fields constant that matches name, or null if its not found.
-
 
7271
       */
-
 
7272
      public static _Fields findByName(String name) {
-
 
7273
        return byName.get(name);
-
 
7274
      }
-
 
7275
 
-
 
7276
      private final short _thriftId;
-
 
7277
      private final String _fieldName;
-
 
7278
 
-
 
7279
      _Fields(short thriftId, String fieldName) {
-
 
7280
        _thriftId = thriftId;
-
 
7281
        _fieldName = fieldName;
-
 
7282
      }
-
 
7283
 
-
 
7284
      public short getThriftFieldId() {
-
 
7285
        return _thriftId;
-
 
7286
      }
-
 
7287
 
-
 
7288
      public String getFieldName() {
-
 
7289
        return _fieldName;
-
 
7290
      }
-
 
7291
    }
-
 
7292
 
-
 
7293
    // isset id assignments
-
 
7294
    private static final int __ORDERID_ISSET_ID = 0;
-
 
7295
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
7296
 
-
 
7297
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
7298
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
-
 
7299
          new FieldValueMetaData(TType.I64)));
-
 
7300
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
-
 
7301
          new FieldValueMetaData(TType.STRING)));
-
 
7302
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
-
 
7303
          new FieldValueMetaData(TType.STRING)));
-
 
7304
    }});
-
 
7305
 
-
 
7306
    static {
-
 
7307
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
-
 
7308
    }
-
 
7309
 
-
 
7310
    public addBillingDetails_args() {
-
 
7311
    }
-
 
7312
 
-
 
7313
    public addBillingDetails_args(
-
 
7314
      long orderId,
-
 
7315
      String invoice_number,
-
 
7316
      String billed_by)
-
 
7317
    {
-
 
7318
      this();
-
 
7319
      this.orderId = orderId;
-
 
7320
      setOrderIdIsSet(true);
-
 
7321
      this.invoice_number = invoice_number;
-
 
7322
      this.billed_by = billed_by;
-
 
7323
    }
-
 
7324
 
-
 
7325
    /**
-
 
7326
     * Performs a deep copy on <i>other</i>.
-
 
7327
     */
-
 
7328
    public addBillingDetails_args(addBillingDetails_args other) {
-
 
7329
      __isset_bit_vector.clear();
-
 
7330
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
7331
      this.orderId = other.orderId;
-
 
7332
      if (other.isSetInvoice_number()) {
-
 
7333
        this.invoice_number = other.invoice_number;
-
 
7334
      }
-
 
7335
      if (other.isSetBilled_by()) {
-
 
7336
        this.billed_by = other.billed_by;
-
 
7337
      }
-
 
7338
    }
-
 
7339
 
-
 
7340
    public addBillingDetails_args deepCopy() {
-
 
7341
      return new addBillingDetails_args(this);
-
 
7342
    }
-
 
7343
 
-
 
7344
    @Deprecated
-
 
7345
    public addBillingDetails_args clone() {
-
 
7346
      return new addBillingDetails_args(this);
-
 
7347
    }
-
 
7348
 
-
 
7349
    public long getOrderId() {
-
 
7350
      return this.orderId;
-
 
7351
    }
-
 
7352
 
-
 
7353
    public addBillingDetails_args setOrderId(long orderId) {
-
 
7354
      this.orderId = orderId;
-
 
7355
      setOrderIdIsSet(true);
-
 
7356
      return this;
-
 
7357
    }
-
 
7358
 
-
 
7359
    public void unsetOrderId() {
-
 
7360
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
-
 
7361
    }
-
 
7362
 
-
 
7363
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
-
 
7364
    public boolean isSetOrderId() {
-
 
7365
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
-
 
7366
    }
-
 
7367
 
-
 
7368
    public void setOrderIdIsSet(boolean value) {
-
 
7369
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
-
 
7370
    }
-
 
7371
 
-
 
7372
    public String getInvoice_number() {
-
 
7373
      return this.invoice_number;
-
 
7374
    }
-
 
7375
 
-
 
7376
    public addBillingDetails_args setInvoice_number(String invoice_number) {
-
 
7377
      this.invoice_number = invoice_number;
-
 
7378
      return this;
-
 
7379
    }
-
 
7380
 
-
 
7381
    public void unsetInvoice_number() {
-
 
7382
      this.invoice_number = null;
-
 
7383
    }
-
 
7384
 
-
 
7385
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
-
 
7386
    public boolean isSetInvoice_number() {
-
 
7387
      return this.invoice_number != null;
-
 
7388
    }
-
 
7389
 
-
 
7390
    public void setInvoice_numberIsSet(boolean value) {
-
 
7391
      if (!value) {
-
 
7392
        this.invoice_number = null;
-
 
7393
      }
-
 
7394
    }
-
 
7395
 
-
 
7396
    public String getBilled_by() {
-
 
7397
      return this.billed_by;
-
 
7398
    }
-
 
7399
 
-
 
7400
    public addBillingDetails_args setBilled_by(String billed_by) {
-
 
7401
      this.billed_by = billed_by;
-
 
7402
      return this;
-
 
7403
    }
-
 
7404
 
-
 
7405
    public void unsetBilled_by() {
-
 
7406
      this.billed_by = null;
-
 
7407
    }
-
 
7408
 
-
 
7409
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
-
 
7410
    public boolean isSetBilled_by() {
-
 
7411
      return this.billed_by != null;
-
 
7412
    }
-
 
7413
 
-
 
7414
    public void setBilled_byIsSet(boolean value) {
-
 
7415
      if (!value) {
-
 
7416
        this.billed_by = null;
-
 
7417
      }
-
 
7418
    }
-
 
7419
 
-
 
7420
    public void setFieldValue(_Fields field, Object value) {
-
 
7421
      switch (field) {
-
 
7422
      case ORDER_ID:
-
 
7423
        if (value == null) {
-
 
7424
          unsetOrderId();
-
 
7425
        } else {
-
 
7426
          setOrderId((Long)value);
-
 
7427
        }
-
 
7428
        break;
-
 
7429
 
-
 
7430
      case INVOICE_NUMBER:
-
 
7431
        if (value == null) {
-
 
7432
          unsetInvoice_number();
-
 
7433
        } else {
-
 
7434
          setInvoice_number((String)value);
-
 
7435
        }
-
 
7436
        break;
-
 
7437
 
-
 
7438
      case BILLED_BY:
-
 
7439
        if (value == null) {
-
 
7440
          unsetBilled_by();
-
 
7441
        } else {
-
 
7442
          setBilled_by((String)value);
-
 
7443
        }
-
 
7444
        break;
-
 
7445
 
-
 
7446
      }
-
 
7447
    }
-
 
7448
 
-
 
7449
    public void setFieldValue(int fieldID, Object value) {
-
 
7450
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
7451
    }
-
 
7452
 
-
 
7453
    public Object getFieldValue(_Fields field) {
-
 
7454
      switch (field) {
-
 
7455
      case ORDER_ID:
-
 
7456
        return new Long(getOrderId());
-
 
7457
 
-
 
7458
      case INVOICE_NUMBER:
-
 
7459
        return getInvoice_number();
-
 
7460
 
-
 
7461
      case BILLED_BY:
-
 
7462
        return getBilled_by();
-
 
7463
 
-
 
7464
      }
-
 
7465
      throw new IllegalStateException();
-
 
7466
    }
-
 
7467
 
-
 
7468
    public Object getFieldValue(int fieldId) {
-
 
7469
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
7470
    }
-
 
7471
 
-
 
7472
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
7473
    public boolean isSet(_Fields field) {
-
 
7474
      switch (field) {
-
 
7475
      case ORDER_ID:
-
 
7476
        return isSetOrderId();
-
 
7477
      case INVOICE_NUMBER:
-
 
7478
        return isSetInvoice_number();
-
 
7479
      case BILLED_BY:
-
 
7480
        return isSetBilled_by();
-
 
7481
      }
-
 
7482
      throw new IllegalStateException();
-
 
7483
    }
-
 
7484
 
-
 
7485
    public boolean isSet(int fieldID) {
-
 
7486
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
7487
    }
-
 
7488
 
-
 
7489
    @Override
-
 
7490
    public boolean equals(Object that) {
-
 
7491
      if (that == null)
-
 
7492
        return false;
-
 
7493
      if (that instanceof addBillingDetails_args)
-
 
7494
        return this.equals((addBillingDetails_args)that);
-
 
7495
      return false;
-
 
7496
    }
-
 
7497
 
-
 
7498
    public boolean equals(addBillingDetails_args that) {
-
 
7499
      if (that == null)
-
 
7500
        return false;
-
 
7501
 
-
 
7502
      boolean this_present_orderId = true;
-
 
7503
      boolean that_present_orderId = true;
-
 
7504
      if (this_present_orderId || that_present_orderId) {
-
 
7505
        if (!(this_present_orderId && that_present_orderId))
-
 
7506
          return false;
-
 
7507
        if (this.orderId != that.orderId)
-
 
7508
          return false;
-
 
7509
      }
-
 
7510
 
-
 
7511
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
-
 
7512
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
-
 
7513
      if (this_present_invoice_number || that_present_invoice_number) {
-
 
7514
        if (!(this_present_invoice_number && that_present_invoice_number))
-
 
7515
          return false;
-
 
7516
        if (!this.invoice_number.equals(that.invoice_number))
-
 
7517
          return false;
-
 
7518
      }
-
 
7519
 
-
 
7520
      boolean this_present_billed_by = true && this.isSetBilled_by();
-
 
7521
      boolean that_present_billed_by = true && that.isSetBilled_by();
-
 
7522
      if (this_present_billed_by || that_present_billed_by) {
-
 
7523
        if (!(this_present_billed_by && that_present_billed_by))
-
 
7524
          return false;
-
 
7525
        if (!this.billed_by.equals(that.billed_by))
-
 
7526
          return false;
-
 
7527
      }
-
 
7528
 
-
 
7529
      return true;
-
 
7530
    }
-
 
7531
 
-
 
7532
    @Override
-
 
7533
    public int hashCode() {
-
 
7534
      return 0;
-
 
7535
    }
-
 
7536
 
-
 
7537
    public int compareTo(addBillingDetails_args other) {
-
 
7538
      if (!getClass().equals(other.getClass())) {
-
 
7539
        return getClass().getName().compareTo(other.getClass().getName());
-
 
7540
      }
-
 
7541
 
-
 
7542
      int lastComparison = 0;
-
 
7543
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
-
 
7544
 
-
 
7545
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
-
 
7546
      if (lastComparison != 0) {
-
 
7547
        return lastComparison;
-
 
7548
      }
-
 
7549
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
-
 
7550
      if (lastComparison != 0) {
-
 
7551
        return lastComparison;
-
 
7552
      }
-
 
7553
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
-
 
7554
      if (lastComparison != 0) {
-
 
7555
        return lastComparison;
-
 
7556
      }
-
 
7557
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
-
 
7558
      if (lastComparison != 0) {
-
 
7559
        return lastComparison;
-
 
7560
      }
-
 
7561
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
-
 
7562
      if (lastComparison != 0) {
-
 
7563
        return lastComparison;
-
 
7564
      }
-
 
7565
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
-
 
7566
      if (lastComparison != 0) {
-
 
7567
        return lastComparison;
-
 
7568
      }
-
 
7569
      return 0;
-
 
7570
    }
-
 
7571
 
-
 
7572
    public void read(TProtocol iprot) throws TException {
-
 
7573
      TField field;
-
 
7574
      iprot.readStructBegin();
-
 
7575
      while (true)
-
 
7576
      {
-
 
7577
        field = iprot.readFieldBegin();
-
 
7578
        if (field.type == TType.STOP) { 
-
 
7579
          break;
-
 
7580
        }
-
 
7581
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
7582
        if (fieldId == null) {
-
 
7583
          TProtocolUtil.skip(iprot, field.type);
-
 
7584
        } else {
-
 
7585
          switch (fieldId) {
-
 
7586
            case ORDER_ID:
-
 
7587
              if (field.type == TType.I64) {
-
 
7588
                this.orderId = iprot.readI64();
-
 
7589
                setOrderIdIsSet(true);
-
 
7590
              } else { 
-
 
7591
                TProtocolUtil.skip(iprot, field.type);
-
 
7592
              }
-
 
7593
              break;
-
 
7594
            case INVOICE_NUMBER:
-
 
7595
              if (field.type == TType.STRING) {
-
 
7596
                this.invoice_number = iprot.readString();
-
 
7597
              } else { 
-
 
7598
                TProtocolUtil.skip(iprot, field.type);
-
 
7599
              }
-
 
7600
              break;
-
 
7601
            case BILLED_BY:
-
 
7602
              if (field.type == TType.STRING) {
-
 
7603
                this.billed_by = iprot.readString();
-
 
7604
              } else { 
-
 
7605
                TProtocolUtil.skip(iprot, field.type);
-
 
7606
              }
-
 
7607
              break;
-
 
7608
          }
-
 
7609
          iprot.readFieldEnd();
-
 
7610
        }
-
 
7611
      }
-
 
7612
      iprot.readStructEnd();
-
 
7613
      validate();
-
 
7614
    }
-
 
7615
 
-
 
7616
    public void write(TProtocol oprot) throws TException {
-
 
7617
      validate();
-
 
7618
 
-
 
7619
      oprot.writeStructBegin(STRUCT_DESC);
-
 
7620
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
-
 
7621
      oprot.writeI64(this.orderId);
-
 
7622
      oprot.writeFieldEnd();
-
 
7623
      if (this.invoice_number != null) {
-
 
7624
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
-
 
7625
        oprot.writeString(this.invoice_number);
-
 
7626
        oprot.writeFieldEnd();
-
 
7627
      }
-
 
7628
      if (this.billed_by != null) {
-
 
7629
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
-
 
7630
        oprot.writeString(this.billed_by);
-
 
7631
        oprot.writeFieldEnd();
-
 
7632
      }
-
 
7633
      oprot.writeFieldStop();
-
 
7634
      oprot.writeStructEnd();
-
 
7635
    }
-
 
7636
 
-
 
7637
    @Override
-
 
7638
    public String toString() {
-
 
7639
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
-
 
7640
      boolean first = true;
-
 
7641
 
-
 
7642
      sb.append("orderId:");
-
 
7643
      sb.append(this.orderId);
-
 
7644
      first = false;
-
 
7645
      if (!first) sb.append(", ");
-
 
7646
      sb.append("invoice_number:");
-
 
7647
      if (this.invoice_number == null) {
-
 
7648
        sb.append("null");
-
 
7649
      } else {
-
 
7650
        sb.append(this.invoice_number);
-
 
7651
      }
-
 
7652
      first = false;
-
 
7653
      if (!first) sb.append(", ");
-
 
7654
      sb.append("billed_by:");
-
 
7655
      if (this.billed_by == null) {
-
 
7656
        sb.append("null");
-
 
7657
      } else {
-
 
7658
        sb.append(this.billed_by);
-
 
7659
      }
-
 
7660
      first = false;
-
 
7661
      sb.append(")");
-
 
7662
      return sb.toString();
-
 
7663
    }
-
 
7664
 
-
 
7665
    public void validate() throws TException {
-
 
7666
      // check for required fields
-
 
7667
    }
-
 
7668
 
-
 
7669
  }
-
 
7670
 
-
 
7671
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
-
 
7672
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
-
 
7673
 
-
 
7674
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
-
 
7675
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
-
 
7676
 
-
 
7677
    private boolean success;
-
 
7678
    private TransactionServiceException ex;
-
 
7679
 
-
 
7680
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
7681
    public enum _Fields implements TFieldIdEnum {
-
 
7682
      SUCCESS((short)0, "success"),
-
 
7683
      EX((short)1, "ex");
-
 
7684
 
-
 
7685
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
7686
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
7687
 
-
 
7688
      static {
-
 
7689
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
7690
          byId.put((int)field._thriftId, field);
-
 
7691
          byName.put(field.getFieldName(), field);
-
 
7692
        }
-
 
7693
      }
-
 
7694
 
-
 
7695
      /**
-
 
7696
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
7697
       */
-
 
7698
      public static _Fields findByThriftId(int fieldId) {
-
 
7699
        return byId.get(fieldId);
-
 
7700
      }
-
 
7701
 
-
 
7702
      /**
-
 
7703
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
7704
       * if it is not found.
-
 
7705
       */
-
 
7706
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
7707
        _Fields fields = findByThriftId(fieldId);
-
 
7708
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
7709
        return fields;
-
 
7710
      }
-
 
7711
 
-
 
7712
      /**
-
 
7713
       * Find the _Fields constant that matches name, or null if its not found.
-
 
7714
       */
-
 
7715
      public static _Fields findByName(String name) {
-
 
7716
        return byName.get(name);
-
 
7717
      }
-
 
7718
 
-
 
7719
      private final short _thriftId;
-
 
7720
      private final String _fieldName;
-
 
7721
 
-
 
7722
      _Fields(short thriftId, String fieldName) {
-
 
7723
        _thriftId = thriftId;
-
 
7724
        _fieldName = fieldName;
-
 
7725
      }
-
 
7726
 
-
 
7727
      public short getThriftFieldId() {
-
 
7728
        return _thriftId;
-
 
7729
      }
-
 
7730
 
-
 
7731
      public String getFieldName() {
-
 
7732
        return _fieldName;
-
 
7733
      }
-
 
7734
    }
-
 
7735
 
-
 
7736
    // isset id assignments
-
 
7737
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
7738
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
7739
 
-
 
7740
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
7741
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
7742
          new FieldValueMetaData(TType.BOOL)));
-
 
7743
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
-
 
7744
          new FieldValueMetaData(TType.STRUCT)));
-
 
7745
    }});
-
 
7746
 
-
 
7747
    static {
-
 
7748
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
-
 
7749
    }
-
 
7750
 
-
 
7751
    public addBillingDetails_result() {
-
 
7752
    }
-
 
7753
 
-
 
7754
    public addBillingDetails_result(
-
 
7755
      boolean success,
-
 
7756
      TransactionServiceException ex)
-
 
7757
    {
-
 
7758
      this();
-
 
7759
      this.success = success;
-
 
7760
      setSuccessIsSet(true);
-
 
7761
      this.ex = ex;
-
 
7762
    }
-
 
7763
 
-
 
7764
    /**
-
 
7765
     * Performs a deep copy on <i>other</i>.
-
 
7766
     */
-
 
7767
    public addBillingDetails_result(addBillingDetails_result other) {
-
 
7768
      __isset_bit_vector.clear();
-
 
7769
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
7770
      this.success = other.success;
-
 
7771
      if (other.isSetEx()) {
-
 
7772
        this.ex = new TransactionServiceException(other.ex);
-
 
7773
      }
-
 
7774
    }
-
 
7775
 
-
 
7776
    public addBillingDetails_result deepCopy() {
-
 
7777
      return new addBillingDetails_result(this);
-
 
7778
    }
-
 
7779
 
-
 
7780
    @Deprecated
-
 
7781
    public addBillingDetails_result clone() {
-
 
7782
      return new addBillingDetails_result(this);
-
 
7783
    }
-
 
7784
 
-
 
7785
    public boolean isSuccess() {
-
 
7786
      return this.success;
-
 
7787
    }
-
 
7788
 
-
 
7789
    public addBillingDetails_result setSuccess(boolean success) {
-
 
7790
      this.success = success;
-
 
7791
      setSuccessIsSet(true);
-
 
7792
      return this;
-
 
7793
    }
-
 
7794
 
-
 
7795
    public void unsetSuccess() {
-
 
7796
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
7797
    }
-
 
7798
 
-
 
7799
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
7800
    public boolean isSetSuccess() {
-
 
7801
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
7802
    }
-
 
7803
 
-
 
7804
    public void setSuccessIsSet(boolean value) {
-
 
7805
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
7806
    }
-
 
7807
 
-
 
7808
    public TransactionServiceException getEx() {
-
 
7809
      return this.ex;
-
 
7810
    }
-
 
7811
 
-
 
7812
    public addBillingDetails_result setEx(TransactionServiceException ex) {
-
 
7813
      this.ex = ex;
-
 
7814
      return this;
-
 
7815
    }
-
 
7816
 
-
 
7817
    public void unsetEx() {
-
 
7818
      this.ex = null;
-
 
7819
    }
-
 
7820
 
-
 
7821
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
-
 
7822
    public boolean isSetEx() {
-
 
7823
      return this.ex != null;
-
 
7824
    }
-
 
7825
 
-
 
7826
    public void setExIsSet(boolean value) {
-
 
7827
      if (!value) {
-
 
7828
        this.ex = null;
-
 
7829
      }
-
 
7830
    }
-
 
7831
 
-
 
7832
    public void setFieldValue(_Fields field, Object value) {
-
 
7833
      switch (field) {
-
 
7834
      case SUCCESS:
-
 
7835
        if (value == null) {
-
 
7836
          unsetSuccess();
-
 
7837
        } else {
-
 
7838
          setSuccess((Boolean)value);
-
 
7839
        }
-
 
7840
        break;
-
 
7841
 
-
 
7842
      case EX:
-
 
7843
        if (value == null) {
-
 
7844
          unsetEx();
-
 
7845
        } else {
-
 
7846
          setEx((TransactionServiceException)value);
-
 
7847
        }
-
 
7848
        break;
-
 
7849
 
-
 
7850
      }
-
 
7851
    }
-
 
7852
 
-
 
7853
    public void setFieldValue(int fieldID, Object value) {
-
 
7854
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
7855
    }
-
 
7856
 
-
 
7857
    public Object getFieldValue(_Fields field) {
-
 
7858
      switch (field) {
-
 
7859
      case SUCCESS:
-
 
7860
        return new Boolean(isSuccess());
-
 
7861
 
-
 
7862
      case EX:
-
 
7863
        return getEx();
-
 
7864
 
-
 
7865
      }
-
 
7866
      throw new IllegalStateException();
-
 
7867
    }
-
 
7868
 
-
 
7869
    public Object getFieldValue(int fieldId) {
-
 
7870
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
7871
    }
-
 
7872
 
-
 
7873
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
7874
    public boolean isSet(_Fields field) {
-
 
7875
      switch (field) {
-
 
7876
      case SUCCESS:
-
 
7877
        return isSetSuccess();
-
 
7878
      case EX:
-
 
7879
        return isSetEx();
-
 
7880
      }
-
 
7881
      throw new IllegalStateException();
-
 
7882
    }
-
 
7883
 
-
 
7884
    public boolean isSet(int fieldID) {
-
 
7885
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
7886
    }
-
 
7887
 
-
 
7888
    @Override
-
 
7889
    public boolean equals(Object that) {
-
 
7890
      if (that == null)
-
 
7891
        return false;
-
 
7892
      if (that instanceof addBillingDetails_result)
-
 
7893
        return this.equals((addBillingDetails_result)that);
-
 
7894
      return false;
-
 
7895
    }
-
 
7896
 
-
 
7897
    public boolean equals(addBillingDetails_result that) {
-
 
7898
      if (that == null)
-
 
7899
        return false;
-
 
7900
 
-
 
7901
      boolean this_present_success = true;
-
 
7902
      boolean that_present_success = true;
-
 
7903
      if (this_present_success || that_present_success) {
-
 
7904
        if (!(this_present_success && that_present_success))
-
 
7905
          return false;
-
 
7906
        if (this.success != that.success)
-
 
7907
          return false;
-
 
7908
      }
-
 
7909
 
-
 
7910
      boolean this_present_ex = true && this.isSetEx();
-
 
7911
      boolean that_present_ex = true && that.isSetEx();
-
 
7912
      if (this_present_ex || that_present_ex) {
-
 
7913
        if (!(this_present_ex && that_present_ex))
-
 
7914
          return false;
-
 
7915
        if (!this.ex.equals(that.ex))
-
 
7916
          return false;
-
 
7917
      }
-
 
7918
 
-
 
7919
      return true;
-
 
7920
    }
-
 
7921
 
-
 
7922
    @Override
-
 
7923
    public int hashCode() {
-
 
7924
      return 0;
-
 
7925
    }
-
 
7926
 
-
 
7927
    public int compareTo(addBillingDetails_result other) {
-
 
7928
      if (!getClass().equals(other.getClass())) {
-
 
7929
        return getClass().getName().compareTo(other.getClass().getName());
-
 
7930
      }
-
 
7931
 
-
 
7932
      int lastComparison = 0;
-
 
7933
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
-
 
7934
 
-
 
7935
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
7936
      if (lastComparison != 0) {
-
 
7937
        return lastComparison;
-
 
7938
      }
-
 
7939
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
7940
      if (lastComparison != 0) {
-
 
7941
        return lastComparison;
-
 
7942
      }
-
 
7943
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
-
 
7944
      if (lastComparison != 0) {
-
 
7945
        return lastComparison;
-
 
7946
      }
-
 
7947
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
-
 
7948
      if (lastComparison != 0) {
-
 
7949
        return lastComparison;
-
 
7950
      }
-
 
7951
      return 0;
-
 
7952
    }
-
 
7953
 
-
 
7954
    public void read(TProtocol iprot) throws TException {
-
 
7955
      TField field;
-
 
7956
      iprot.readStructBegin();
-
 
7957
      while (true)
-
 
7958
      {
-
 
7959
        field = iprot.readFieldBegin();
-
 
7960
        if (field.type == TType.STOP) { 
-
 
7961
          break;
-
 
7962
        }
-
 
7963
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
7964
        if (fieldId == null) {
-
 
7965
          TProtocolUtil.skip(iprot, field.type);
-
 
7966
        } else {
-
 
7967
          switch (fieldId) {
-
 
7968
            case SUCCESS:
-
 
7969
              if (field.type == TType.BOOL) {
-
 
7970
                this.success = iprot.readBool();
-
 
7971
                setSuccessIsSet(true);
-
 
7972
              } else { 
-
 
7973
                TProtocolUtil.skip(iprot, field.type);
-
 
7974
              }
-
 
7975
              break;
-
 
7976
            case EX:
-
 
7977
              if (field.type == TType.STRUCT) {
-
 
7978
                this.ex = new TransactionServiceException();
-
 
7979
                this.ex.read(iprot);
-
 
7980
              } else { 
-
 
7981
                TProtocolUtil.skip(iprot, field.type);
-
 
7982
              }
-
 
7983
              break;
-
 
7984
          }
-
 
7985
          iprot.readFieldEnd();
-
 
7986
        }
-
 
7987
      }
-
 
7988
      iprot.readStructEnd();
-
 
7989
      validate();
-
 
7990
    }
-
 
7991
 
-
 
7992
    public void write(TProtocol oprot) throws TException {
-
 
7993
      oprot.writeStructBegin(STRUCT_DESC);
-
 
7994
 
-
 
7995
      if (this.isSetSuccess()) {
-
 
7996
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
7997
        oprot.writeBool(this.success);
-
 
7998
        oprot.writeFieldEnd();
-
 
7999
      } else if (this.isSetEx()) {
-
 
8000
        oprot.writeFieldBegin(EX_FIELD_DESC);
-
 
8001
        this.ex.write(oprot);
-
 
8002
        oprot.writeFieldEnd();
-
 
8003
      }
-
 
8004
      oprot.writeFieldStop();
-
 
8005
      oprot.writeStructEnd();
-
 
8006
    }
-
 
8007
 
-
 
8008
    @Override
-
 
8009
    public String toString() {
-
 
8010
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
-
 
8011
      boolean first = true;
-
 
8012
 
-
 
8013
      sb.append("success:");
-
 
8014
      sb.append(this.success);
-
 
8015
      first = false;
7137
      if (!first) sb.append(", ");
8016
      if (!first) sb.append(", ");
7138
      sb.append("ex:");
8017
      sb.append("ex:");
7139
      if (this.ex == null) {
8018
      if (this.ex == null) {
7140
        sb.append("null");
8019
        sb.append("null");
7141
      } else {
8020
      } else {