Subversion Repositories SmartDukaan

Rev

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

Rev 123 Rev 420
Line 24... Line 24...
24
import org.apache.thrift.protocol.*;
24
import org.apache.thrift.protocol.*;
25
 
25
 
26
public class Payment implements TBase<Payment._Fields>, java.io.Serializable, Cloneable {
26
public class Payment implements TBase<Payment._Fields>, java.io.Serializable, Cloneable {
27
  private static final TStruct STRUCT_DESC = new TStruct("Payment");
27
  private static final TStruct STRUCT_DESC = new TStruct("Payment");
28
 
28
 
29
  private static final TField MERCHANT_TX_ID_FIELD_DESC = new TField("merchant_tx_id", TType.I64, (short)1);
29
  private static final TField MERCHANT_TX_ID_FIELD_DESC = new TField("merchant_tx_id", TType.STRING, (short)1);
30
  private static final TField BANK_TX_ID_FIELD_DESC = new TField("bank_tx_id", TType.I64, (short)2);
30
  private static final TField BANK_TX_ID_FIELD_DESC = new TField("bank_tx_id", TType.STRING, (short)2);
31
  private static final TField AMOUNT_FIELD_DESC = new TField("amount", TType.DOUBLE, (short)3);
31
  private static final TField AMOUNT_FIELD_DESC = new TField("amount", TType.DOUBLE, (short)3);
32
  private static final TField INIT_TIMESTAMP_FIELD_DESC = new TField("init_timestamp", TType.I64, (short)4);
32
  private static final TField INIT_TIMESTAMP_FIELD_DESC = new TField("init_timestamp", TType.I64, (short)4);
33
  private static final TField BANK_ACK_TIMESTAMP_FIELD_DESC = new TField("bank_ack_timestamp", TType.I64, (short)5);
33
  private static final TField BANK_ACK_TIMESTAMP_FIELD_DESC = new TField("bank_ack_timestamp", TType.I64, (short)5);
34
  private static final TField BANK_STATUS_FIELD_DESC = new TField("bank_status", TType.STRING, (short)6);
34
  private static final TField BANK_STATUS_FIELD_DESC = new TField("bank_status", TType.STRING, (short)6);
35
  private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)7);
35
  private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)7);
36
  private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)8);
36
  private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)8);
37
  private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)9);
37
  private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)9);
38
  private static final TField CART_ID_FIELD_DESC = new TField("cart_id", TType.I64, (short)10);
38
  private static final TField CART_ID_FIELD_DESC = new TField("cart_id", TType.I64, (short)10);
39
  private static final TField OTHER_INFO_FIELD_DESC = new TField("other_info", TType.MAP, (short)11);
39
  private static final TField OTHER_INFO_FIELD_DESC = new TField("other_info", TType.MAP, (short)11);
40
  private static final TField GATEWAY_FIELD_DESC = new TField("gateway", TType.I32, (short)12);
40
  private static final TField GATEWAY_ID_FIELD_DESC = new TField("gateway_id", TType.I64, (short)12);
-
 
41
  private static final TField PAYMENT_ID_FIELD_DESC = new TField("payment_id", TType.STRING, (short)13);
-
 
42
  private static final TField ERROR_CODE_FIELD_DESC = new TField("error_code", TType.STRING, (short)14);
-
 
43
  private static final TField SESSION_ID_FIELD_DESC = new TField("session_id", TType.STRING, (short)15);
-
 
44
  private static final TField REF_CODE_FIELD_DESC = new TField("ref_code", TType.STRING, (short)16);
-
 
45
  private static final TField AUTH_CODE_FIELD_DESC = new TField("auth_code", TType.STRING, (short)17);
-
 
46
  private static final TField POST_DATE_FIELD_DESC = new TField("post_date", TType.STRING, (short)18);
41
 
47
 
42
  private long merchant_tx_id;
48
  private String merchant_tx_id;
43
  private long bank_tx_id;
49
  private String bank_tx_id;
44
  private double amount;
50
  private double amount;
45
  private long init_timestamp;
51
  private long init_timestamp;
46
  private long bank_ack_timestamp;
52
  private long bank_ack_timestamp;
47
  private String bank_status;
53
  private String bank_status;
48
  private PaymentStatus status;
54
  private PaymentStatus status;
49
  private String message;
55
  private String message;
50
  private long user_id;
56
  private long user_id;
51
  private long cart_id;
57
  private long cart_id;
52
  private Map<String,String> other_info;
58
  private Map<String,String> other_info;
53
  private PaymentGateway gateway;
59
  private long gateway_id;
-
 
60
  private String payment_id;
-
 
61
  private String error_code;
-
 
62
  private String session_id;
-
 
63
  private String ref_code;
-
 
64
  private String auth_code;
-
 
65
  private String post_date;
54
 
66
 
55
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
67
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
56
  public enum _Fields implements TFieldIdEnum {
68
  public enum _Fields implements TFieldIdEnum {
57
    MERCHANT_TX_ID((short)1, "merchant_tx_id"),
69
    MERCHANT_TX_ID((short)1, "merchant_tx_id"),
58
    BANK_TX_ID((short)2, "bank_tx_id"),
70
    BANK_TX_ID((short)2, "bank_tx_id"),
Line 67... Line 79...
67
    STATUS((short)7, "status"),
79
    STATUS((short)7, "status"),
68
    MESSAGE((short)8, "message"),
80
    MESSAGE((short)8, "message"),
69
    USER_ID((short)9, "user_id"),
81
    USER_ID((short)9, "user_id"),
70
    CART_ID((short)10, "cart_id"),
82
    CART_ID((short)10, "cart_id"),
71
    OTHER_INFO((short)11, "other_info"),
83
    OTHER_INFO((short)11, "other_info"),
-
 
84
    GATEWAY_ID((short)12, "gateway_id"),
-
 
85
    PAYMENT_ID((short)13, "payment_id"),
72
    /**
86
    ERROR_CODE((short)14, "error_code"),
73
     * 
87
    SESSION_ID((short)15, "session_id"),
74
     * @see PaymentGateway
88
    REF_CODE((short)16, "ref_code"),
75
     */
89
    AUTH_CODE((short)17, "auth_code"),
76
    GATEWAY((short)12, "gateway");
90
    POST_DATE((short)18, "post_date");
77
 
91
 
78
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
92
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
79
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
93
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
80
 
94
 
81
    static {
95
    static {
Line 125... Line 139...
125
      return _fieldName;
139
      return _fieldName;
126
    }
140
    }
127
  }
141
  }
128
 
142
 
129
  // isset id assignments
143
  // isset id assignments
130
  private static final int __MERCHANT_TX_ID_ISSET_ID = 0;
144
  private static final int __AMOUNT_ISSET_ID = 0;
131
  private static final int __BANK_TX_ID_ISSET_ID = 1;
145
  private static final int __INIT_TIMESTAMP_ISSET_ID = 1;
132
  private static final int __AMOUNT_ISSET_ID = 2;
-
 
133
  private static final int __INIT_TIMESTAMP_ISSET_ID = 3;
146
  private static final int __BANK_ACK_TIMESTAMP_ISSET_ID = 2;
134
  private static final int __BANK_ACK_TIMESTAMP_ISSET_ID = 4;
147
  private static final int __USER_ID_ISSET_ID = 3;
135
  private static final int __USER_ID_ISSET_ID = 5;
148
  private static final int __CART_ID_ISSET_ID = 4;
136
  private static final int __CART_ID_ISSET_ID = 6;
149
  private static final int __GATEWAY_ID_ISSET_ID = 5;
137
  private BitSet __isset_bit_vector = new BitSet(7);
150
  private BitSet __isset_bit_vector = new BitSet(6);
138
 
151
 
139
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
152
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
140
    put(_Fields.MERCHANT_TX_ID, new FieldMetaData("merchant_tx_id", TFieldRequirementType.DEFAULT, 
153
    put(_Fields.MERCHANT_TX_ID, new FieldMetaData("merchant_tx_id", TFieldRequirementType.DEFAULT, 
141
        new FieldValueMetaData(TType.I64)));
154
        new FieldValueMetaData(TType.STRING)));
142
    put(_Fields.BANK_TX_ID, new FieldMetaData("bank_tx_id", TFieldRequirementType.DEFAULT, 
155
    put(_Fields.BANK_TX_ID, new FieldMetaData("bank_tx_id", TFieldRequirementType.DEFAULT, 
143
        new FieldValueMetaData(TType.I64)));
156
        new FieldValueMetaData(TType.STRING)));
144
    put(_Fields.AMOUNT, new FieldMetaData("amount", TFieldRequirementType.DEFAULT, 
157
    put(_Fields.AMOUNT, new FieldMetaData("amount", TFieldRequirementType.DEFAULT, 
145
        new FieldValueMetaData(TType.DOUBLE)));
158
        new FieldValueMetaData(TType.DOUBLE)));
146
    put(_Fields.INIT_TIMESTAMP, new FieldMetaData("init_timestamp", TFieldRequirementType.DEFAULT, 
159
    put(_Fields.INIT_TIMESTAMP, new FieldMetaData("init_timestamp", TFieldRequirementType.DEFAULT, 
147
        new FieldValueMetaData(TType.I64)));
160
        new FieldValueMetaData(TType.I64)));
148
    put(_Fields.BANK_ACK_TIMESTAMP, new FieldMetaData("bank_ack_timestamp", TFieldRequirementType.DEFAULT, 
161
    put(_Fields.BANK_ACK_TIMESTAMP, new FieldMetaData("bank_ack_timestamp", TFieldRequirementType.DEFAULT, 
Line 159... Line 172...
159
        new FieldValueMetaData(TType.I64)));
172
        new FieldValueMetaData(TType.I64)));
160
    put(_Fields.OTHER_INFO, new FieldMetaData("other_info", TFieldRequirementType.DEFAULT, 
173
    put(_Fields.OTHER_INFO, new FieldMetaData("other_info", TFieldRequirementType.DEFAULT, 
161
        new MapMetaData(TType.MAP, 
174
        new MapMetaData(TType.MAP, 
162
            new FieldValueMetaData(TType.STRING), 
175
            new FieldValueMetaData(TType.STRING), 
163
            new FieldValueMetaData(TType.STRING))));
176
            new FieldValueMetaData(TType.STRING))));
164
    put(_Fields.GATEWAY, new FieldMetaData("gateway", TFieldRequirementType.DEFAULT, 
177
    put(_Fields.GATEWAY_ID, new FieldMetaData("gateway_id", TFieldRequirementType.DEFAULT, 
-
 
178
        new FieldValueMetaData(TType.I64)));
-
 
179
    put(_Fields.PAYMENT_ID, new FieldMetaData("payment_id", TFieldRequirementType.DEFAULT, 
-
 
180
        new FieldValueMetaData(TType.STRING)));
-
 
181
    put(_Fields.ERROR_CODE, new FieldMetaData("error_code", TFieldRequirementType.DEFAULT, 
-
 
182
        new FieldValueMetaData(TType.STRING)));
-
 
183
    put(_Fields.SESSION_ID, new FieldMetaData("session_id", TFieldRequirementType.DEFAULT, 
-
 
184
        new FieldValueMetaData(TType.STRING)));
-
 
185
    put(_Fields.REF_CODE, new FieldMetaData("ref_code", TFieldRequirementType.DEFAULT, 
-
 
186
        new FieldValueMetaData(TType.STRING)));
-
 
187
    put(_Fields.AUTH_CODE, new FieldMetaData("auth_code", TFieldRequirementType.DEFAULT, 
-
 
188
        new FieldValueMetaData(TType.STRING)));
-
 
189
    put(_Fields.POST_DATE, new FieldMetaData("post_date", TFieldRequirementType.DEFAULT, 
165
        new EnumMetaData(TType.ENUM, PaymentGateway.class)));
190
        new FieldValueMetaData(TType.STRING)));
166
  }});
191
  }});
167
 
192
 
168
  static {
193
  static {
169
    FieldMetaData.addStructMetaDataMap(Payment.class, metaDataMap);
194
    FieldMetaData.addStructMetaDataMap(Payment.class, metaDataMap);
170
  }
195
  }
171
 
196
 
172
  public Payment() {
197
  public Payment() {
173
  }
198
  }
174
 
199
 
175
  public Payment(
200
  public Payment(
176
    long merchant_tx_id,
201
    String merchant_tx_id,
177
    long bank_tx_id,
202
    String bank_tx_id,
178
    double amount,
203
    double amount,
179
    long init_timestamp,
204
    long init_timestamp,
180
    long bank_ack_timestamp,
205
    long bank_ack_timestamp,
181
    String bank_status,
206
    String bank_status,
182
    PaymentStatus status,
207
    PaymentStatus status,
183
    String message,
208
    String message,
184
    long user_id,
209
    long user_id,
185
    long cart_id,
210
    long cart_id,
186
    Map<String,String> other_info,
211
    Map<String,String> other_info,
187
    PaymentGateway gateway)
212
    long gateway_id,
-
 
213
    String payment_id,
-
 
214
    String error_code,
-
 
215
    String session_id,
-
 
216
    String ref_code,
-
 
217
    String auth_code,
-
 
218
    String post_date)
188
  {
219
  {
189
    this();
220
    this();
190
    this.merchant_tx_id = merchant_tx_id;
221
    this.merchant_tx_id = merchant_tx_id;
191
    setMerchant_tx_idIsSet(true);
-
 
192
    this.bank_tx_id = bank_tx_id;
222
    this.bank_tx_id = bank_tx_id;
193
    setBank_tx_idIsSet(true);
-
 
194
    this.amount = amount;
223
    this.amount = amount;
195
    setAmountIsSet(true);
224
    setAmountIsSet(true);
196
    this.init_timestamp = init_timestamp;
225
    this.init_timestamp = init_timestamp;
197
    setInit_timestampIsSet(true);
226
    setInit_timestampIsSet(true);
198
    this.bank_ack_timestamp = bank_ack_timestamp;
227
    this.bank_ack_timestamp = bank_ack_timestamp;
Line 203... Line 232...
203
    this.user_id = user_id;
232
    this.user_id = user_id;
204
    setUser_idIsSet(true);
233
    setUser_idIsSet(true);
205
    this.cart_id = cart_id;
234
    this.cart_id = cart_id;
206
    setCart_idIsSet(true);
235
    setCart_idIsSet(true);
207
    this.other_info = other_info;
236
    this.other_info = other_info;
208
    this.gateway = gateway;
237
    this.gateway_id = gateway_id;
-
 
238
    setGateway_idIsSet(true);
-
 
239
    this.payment_id = payment_id;
-
 
240
    this.error_code = error_code;
-
 
241
    this.session_id = session_id;
-
 
242
    this.ref_code = ref_code;
-
 
243
    this.auth_code = auth_code;
-
 
244
    this.post_date = post_date;
209
  }
245
  }
210
 
246
 
211
  /**
247
  /**
212
   * Performs a deep copy on <i>other</i>.
248
   * Performs a deep copy on <i>other</i>.
213
   */
249
   */
214
  public Payment(Payment other) {
250
  public Payment(Payment other) {
215
    __isset_bit_vector.clear();
251
    __isset_bit_vector.clear();
216
    __isset_bit_vector.or(other.__isset_bit_vector);
252
    __isset_bit_vector.or(other.__isset_bit_vector);
-
 
253
    if (other.isSetMerchant_tx_id()) {
217
    this.merchant_tx_id = other.merchant_tx_id;
254
      this.merchant_tx_id = other.merchant_tx_id;
-
 
255
    }
-
 
256
    if (other.isSetBank_tx_id()) {
218
    this.bank_tx_id = other.bank_tx_id;
257
      this.bank_tx_id = other.bank_tx_id;
-
 
258
    }
219
    this.amount = other.amount;
259
    this.amount = other.amount;
220
    this.init_timestamp = other.init_timestamp;
260
    this.init_timestamp = other.init_timestamp;
221
    this.bank_ack_timestamp = other.bank_ack_timestamp;
261
    this.bank_ack_timestamp = other.bank_ack_timestamp;
222
    if (other.isSetBank_status()) {
262
    if (other.isSetBank_status()) {
223
      this.bank_status = other.bank_status;
263
      this.bank_status = other.bank_status;
Line 243... Line 283...
243
 
283
 
244
        __this__other_info.put(__this__other_info_copy_key, __this__other_info_copy_value);
284
        __this__other_info.put(__this__other_info_copy_key, __this__other_info_copy_value);
245
      }
285
      }
246
      this.other_info = __this__other_info;
286
      this.other_info = __this__other_info;
247
    }
287
    }
-
 
288
    this.gateway_id = other.gateway_id;
-
 
289
    if (other.isSetPayment_id()) {
-
 
290
      this.payment_id = other.payment_id;
-
 
291
    }
-
 
292
    if (other.isSetError_code()) {
-
 
293
      this.error_code = other.error_code;
-
 
294
    }
-
 
295
    if (other.isSetSession_id()) {
-
 
296
      this.session_id = other.session_id;
-
 
297
    }
-
 
298
    if (other.isSetRef_code()) {
-
 
299
      this.ref_code = other.ref_code;
-
 
300
    }
-
 
301
    if (other.isSetAuth_code()) {
-
 
302
      this.auth_code = other.auth_code;
-
 
303
    }
248
    if (other.isSetGateway()) {
304
    if (other.isSetPost_date()) {
249
      this.gateway = other.gateway;
305
      this.post_date = other.post_date;
250
    }
306
    }
251
  }
307
  }
252
 
308
 
253
  public Payment deepCopy() {
309
  public Payment deepCopy() {
254
    return new Payment(this);
310
    return new Payment(this);
Line 257... Line 313...
257
  @Deprecated
313
  @Deprecated
258
  public Payment clone() {
314
  public Payment clone() {
259
    return new Payment(this);
315
    return new Payment(this);
260
  }
316
  }
261
 
317
 
262
  public long getMerchant_tx_id() {
318
  public String getMerchant_tx_id() {
263
    return this.merchant_tx_id;
319
    return this.merchant_tx_id;
264
  }
320
  }
265
 
321
 
266
  public Payment setMerchant_tx_id(long merchant_tx_id) {
322
  public Payment setMerchant_tx_id(String merchant_tx_id) {
267
    this.merchant_tx_id = merchant_tx_id;
323
    this.merchant_tx_id = merchant_tx_id;
268
    setMerchant_tx_idIsSet(true);
-
 
269
    return this;
324
    return this;
270
  }
325
  }
271
 
326
 
272
  public void unsetMerchant_tx_id() {
327
  public void unsetMerchant_tx_id() {
273
    __isset_bit_vector.clear(__MERCHANT_TX_ID_ISSET_ID);
328
    this.merchant_tx_id = null;
274
  }
329
  }
275
 
330
 
276
  /** Returns true if field merchant_tx_id is set (has been asigned a value) and false otherwise */
331
  /** Returns true if field merchant_tx_id is set (has been asigned a value) and false otherwise */
277
  public boolean isSetMerchant_tx_id() {
332
  public boolean isSetMerchant_tx_id() {
278
    return __isset_bit_vector.get(__MERCHANT_TX_ID_ISSET_ID);
333
    return this.merchant_tx_id != null;
279
  }
334
  }
280
 
335
 
281
  public void setMerchant_tx_idIsSet(boolean value) {
336
  public void setMerchant_tx_idIsSet(boolean value) {
-
 
337
    if (!value) {
282
    __isset_bit_vector.set(__MERCHANT_TX_ID_ISSET_ID, value);
338
      this.merchant_tx_id = null;
-
 
339
    }
283
  }
340
  }
284
 
341
 
285
  public long getBank_tx_id() {
342
  public String getBank_tx_id() {
286
    return this.bank_tx_id;
343
    return this.bank_tx_id;
287
  }
344
  }
288
 
345
 
289
  public Payment setBank_tx_id(long bank_tx_id) {
346
  public Payment setBank_tx_id(String bank_tx_id) {
290
    this.bank_tx_id = bank_tx_id;
347
    this.bank_tx_id = bank_tx_id;
291
    setBank_tx_idIsSet(true);
-
 
292
    return this;
348
    return this;
293
  }
349
  }
294
 
350
 
295
  public void unsetBank_tx_id() {
351
  public void unsetBank_tx_id() {
296
    __isset_bit_vector.clear(__BANK_TX_ID_ISSET_ID);
352
    this.bank_tx_id = null;
297
  }
353
  }
298
 
354
 
299
  /** Returns true if field bank_tx_id is set (has been asigned a value) and false otherwise */
355
  /** Returns true if field bank_tx_id is set (has been asigned a value) and false otherwise */
300
  public boolean isSetBank_tx_id() {
356
  public boolean isSetBank_tx_id() {
301
    return __isset_bit_vector.get(__BANK_TX_ID_ISSET_ID);
357
    return this.bank_tx_id != null;
302
  }
358
  }
303
 
359
 
304
  public void setBank_tx_idIsSet(boolean value) {
360
  public void setBank_tx_idIsSet(boolean value) {
-
 
361
    if (!value) {
305
    __isset_bit_vector.set(__BANK_TX_ID_ISSET_ID, value);
362
      this.bank_tx_id = null;
-
 
363
    }
306
  }
364
  }
307
 
365
 
308
  public double getAmount() {
366
  public double getAmount() {
309
    return this.amount;
367
    return this.amount;
310
  }
368
  }
Line 533... Line 591...
533
    if (!value) {
591
    if (!value) {
534
      this.other_info = null;
592
      this.other_info = null;
535
    }
593
    }
536
  }
594
  }
537
 
595
 
538
  /**
-
 
539
   * 
-
 
540
   * @see PaymentGateway
-
 
541
   */
-
 
542
  public PaymentGateway getGateway() {
596
  public long getGateway_id() {
543
    return this.gateway;
597
    return this.gateway_id;
544
  }
598
  }
545
 
599
 
546
  /**
-
 
547
   * 
-
 
548
   * @see PaymentGateway
-
 
549
   */
-
 
550
  public Payment setGateway(PaymentGateway gateway) {
600
  public Payment setGateway_id(long gateway_id) {
551
    this.gateway = gateway;
601
    this.gateway_id = gateway_id;
-
 
602
    setGateway_idIsSet(true);
552
    return this;
603
    return this;
553
  }
604
  }
554
 
605
 
555
  public void unsetGateway() {
606
  public void unsetGateway_id() {
-
 
607
    __isset_bit_vector.clear(__GATEWAY_ID_ISSET_ID);
-
 
608
  }
-
 
609
 
-
 
610
  /** Returns true if field gateway_id is set (has been asigned a value) and false otherwise */
556
    this.gateway = null;
611
  public boolean isSetGateway_id() {
-
 
612
    return __isset_bit_vector.get(__GATEWAY_ID_ISSET_ID);
557
  }
613
  }
558
 
614
 
559
  /** Returns true if field gateway is set (has been asigned a value) and false otherwise */
-
 
560
  public boolean isSetGateway() {
615
  public void setGateway_idIsSet(boolean value) {
561
    return this.gateway != null;
616
    __isset_bit_vector.set(__GATEWAY_ID_ISSET_ID, value);
562
  }
617
  }
563
 
618
 
-
 
619
  public String getPayment_id() {
-
 
620
    return this.payment_id;
-
 
621
  }
-
 
622
 
-
 
623
  public Payment setPayment_id(String payment_id) {
-
 
624
    this.payment_id = payment_id;
-
 
625
    return this;
-
 
626
  }
-
 
627
 
-
 
628
  public void unsetPayment_id() {
-
 
629
    this.payment_id = null;
-
 
630
  }
-
 
631
 
-
 
632
  /** Returns true if field payment_id is set (has been asigned a value) and false otherwise */
-
 
633
  public boolean isSetPayment_id() {
-
 
634
    return this.payment_id != null;
-
 
635
  }
-
 
636
 
564
  public void setGatewayIsSet(boolean value) {
637
  public void setPayment_idIsSet(boolean value) {
-
 
638
    if (!value) {
-
 
639
      this.payment_id = null;
-
 
640
    }
-
 
641
  }
-
 
642
 
-
 
643
  public String getError_code() {
-
 
644
    return this.error_code;
-
 
645
  }
-
 
646
 
-
 
647
  public Payment setError_code(String error_code) {
-
 
648
    this.error_code = error_code;
-
 
649
    return this;
-
 
650
  }
-
 
651
 
-
 
652
  public void unsetError_code() {
-
 
653
    this.error_code = null;
-
 
654
  }
-
 
655
 
-
 
656
  /** Returns true if field error_code is set (has been asigned a value) and false otherwise */
-
 
657
  public boolean isSetError_code() {
-
 
658
    return this.error_code != null;
-
 
659
  }
-
 
660
 
-
 
661
  public void setError_codeIsSet(boolean value) {
565
    if (!value) {
662
    if (!value) {
-
 
663
      this.error_code = null;
-
 
664
    }
-
 
665
  }
-
 
666
 
-
 
667
  public String getSession_id() {
-
 
668
    return this.session_id;
-
 
669
  }
-
 
670
 
-
 
671
  public Payment setSession_id(String session_id) {
-
 
672
    this.session_id = session_id;
-
 
673
    return this;
-
 
674
  }
-
 
675
 
-
 
676
  public void unsetSession_id() {
-
 
677
    this.session_id = null;
-
 
678
  }
-
 
679
 
-
 
680
  /** Returns true if field session_id is set (has been asigned a value) and false otherwise */
-
 
681
  public boolean isSetSession_id() {
-
 
682
    return this.session_id != null;
-
 
683
  }
-
 
684
 
-
 
685
  public void setSession_idIsSet(boolean value) {
-
 
686
    if (!value) {
-
 
687
      this.session_id = null;
-
 
688
    }
-
 
689
  }
-
 
690
 
-
 
691
  public String getRef_code() {
-
 
692
    return this.ref_code;
-
 
693
  }
-
 
694
 
-
 
695
  public Payment setRef_code(String ref_code) {
-
 
696
    this.ref_code = ref_code;
-
 
697
    return this;
-
 
698
  }
-
 
699
 
-
 
700
  public void unsetRef_code() {
-
 
701
    this.ref_code = null;
-
 
702
  }
-
 
703
 
-
 
704
  /** Returns true if field ref_code is set (has been asigned a value) and false otherwise */
-
 
705
  public boolean isSetRef_code() {
-
 
706
    return this.ref_code != null;
-
 
707
  }
-
 
708
 
-
 
709
  public void setRef_codeIsSet(boolean value) {
-
 
710
    if (!value) {
-
 
711
      this.ref_code = null;
-
 
712
    }
-
 
713
  }
-
 
714
 
-
 
715
  public String getAuth_code() {
-
 
716
    return this.auth_code;
-
 
717
  }
-
 
718
 
-
 
719
  public Payment setAuth_code(String auth_code) {
-
 
720
    this.auth_code = auth_code;
-
 
721
    return this;
-
 
722
  }
-
 
723
 
-
 
724
  public void unsetAuth_code() {
-
 
725
    this.auth_code = null;
-
 
726
  }
-
 
727
 
-
 
728
  /** Returns true if field auth_code is set (has been asigned a value) and false otherwise */
-
 
729
  public boolean isSetAuth_code() {
-
 
730
    return this.auth_code != null;
-
 
731
  }
-
 
732
 
-
 
733
  public void setAuth_codeIsSet(boolean value) {
-
 
734
    if (!value) {
-
 
735
      this.auth_code = null;
-
 
736
    }
-
 
737
  }
-
 
738
 
-
 
739
  public String getPost_date() {
-
 
740
    return this.post_date;
-
 
741
  }
-
 
742
 
-
 
743
  public Payment setPost_date(String post_date) {
-
 
744
    this.post_date = post_date;
-
 
745
    return this;
-
 
746
  }
-
 
747
 
-
 
748
  public void unsetPost_date() {
-
 
749
    this.post_date = null;
-
 
750
  }
-
 
751
 
-
 
752
  /** Returns true if field post_date is set (has been asigned a value) and false otherwise */
-
 
753
  public boolean isSetPost_date() {
-
 
754
    return this.post_date != null;
-
 
755
  }
-
 
756
 
-
 
757
  public void setPost_dateIsSet(boolean value) {
-
 
758
    if (!value) {
566
      this.gateway = null;
759
      this.post_date = null;
567
    }
760
    }
568
  }
761
  }
569
 
762
 
570
  public void setFieldValue(_Fields field, Object value) {
763
  public void setFieldValue(_Fields field, Object value) {
571
    switch (field) {
764
    switch (field) {
572
    case MERCHANT_TX_ID:
765
    case MERCHANT_TX_ID:
573
      if (value == null) {
766
      if (value == null) {
574
        unsetMerchant_tx_id();
767
        unsetMerchant_tx_id();
575
      } else {
768
      } else {
576
        setMerchant_tx_id((Long)value);
769
        setMerchant_tx_id((String)value);
577
      }
770
      }
578
      break;
771
      break;
579
 
772
 
580
    case BANK_TX_ID:
773
    case BANK_TX_ID:
581
      if (value == null) {
774
      if (value == null) {
582
        unsetBank_tx_id();
775
        unsetBank_tx_id();
583
      } else {
776
      } else {
584
        setBank_tx_id((Long)value);
777
        setBank_tx_id((String)value);
585
      }
778
      }
586
      break;
779
      break;
587
 
780
 
588
    case AMOUNT:
781
    case AMOUNT:
589
      if (value == null) {
782
      if (value == null) {
Line 655... Line 848...
655
      } else {
848
      } else {
656
        setOther_info((Map<String,String>)value);
849
        setOther_info((Map<String,String>)value);
657
      }
850
      }
658
      break;
851
      break;
659
 
852
 
660
    case GATEWAY:
853
    case GATEWAY_ID:
-
 
854
      if (value == null) {
-
 
855
        unsetGateway_id();
-
 
856
      } else {
-
 
857
        setGateway_id((Long)value);
-
 
858
      }
-
 
859
      break;
-
 
860
 
-
 
861
    case PAYMENT_ID:
-
 
862
      if (value == null) {
-
 
863
        unsetPayment_id();
-
 
864
      } else {
-
 
865
        setPayment_id((String)value);
-
 
866
      }
-
 
867
      break;
-
 
868
 
-
 
869
    case ERROR_CODE:
-
 
870
      if (value == null) {
-
 
871
        unsetError_code();
-
 
872
      } else {
-
 
873
        setError_code((String)value);
-
 
874
      }
-
 
875
      break;
-
 
876
 
-
 
877
    case SESSION_ID:
-
 
878
      if (value == null) {
-
 
879
        unsetSession_id();
-
 
880
      } else {
-
 
881
        setSession_id((String)value);
-
 
882
      }
-
 
883
      break;
-
 
884
 
-
 
885
    case REF_CODE:
661
      if (value == null) {
886
      if (value == null) {
662
        unsetGateway();
887
        unsetRef_code();
663
      } else {
888
      } else {
-
 
889
        setRef_code((String)value);
-
 
890
      }
-
 
891
      break;
-
 
892
 
-
 
893
    case AUTH_CODE:
-
 
894
      if (value == null) {
-
 
895
        unsetAuth_code();
-
 
896
      } else {
664
        setGateway((PaymentGateway)value);
897
        setAuth_code((String)value);
-
 
898
      }
-
 
899
      break;
-
 
900
 
-
 
901
    case POST_DATE:
-
 
902
      if (value == null) {
-
 
903
        unsetPost_date();
-
 
904
      } else {
-
 
905
        setPost_date((String)value);
665
      }
906
      }
666
      break;
907
      break;
667
 
908
 
668
    }
909
    }
669
  }
910
  }
Line 673... Line 914...
673
  }
914
  }
674
 
915
 
675
  public Object getFieldValue(_Fields field) {
916
  public Object getFieldValue(_Fields field) {
676
    switch (field) {
917
    switch (field) {
677
    case MERCHANT_TX_ID:
918
    case MERCHANT_TX_ID:
678
      return new Long(getMerchant_tx_id());
919
      return getMerchant_tx_id();
679
 
920
 
680
    case BANK_TX_ID:
921
    case BANK_TX_ID:
681
      return new Long(getBank_tx_id());
922
      return getBank_tx_id();
682
 
923
 
683
    case AMOUNT:
924
    case AMOUNT:
684
      return new Double(getAmount());
925
      return new Double(getAmount());
685
 
926
 
686
    case INIT_TIMESTAMP:
927
    case INIT_TIMESTAMP:
Line 705... Line 946...
705
      return new Long(getCart_id());
946
      return new Long(getCart_id());
706
 
947
 
707
    case OTHER_INFO:
948
    case OTHER_INFO:
708
      return getOther_info();
949
      return getOther_info();
709
 
950
 
710
    case GATEWAY:
951
    case GATEWAY_ID:
-
 
952
      return new Long(getGateway_id());
-
 
953
 
-
 
954
    case PAYMENT_ID:
-
 
955
      return getPayment_id();
-
 
956
 
-
 
957
    case ERROR_CODE:
-
 
958
      return getError_code();
-
 
959
 
-
 
960
    case SESSION_ID:
-
 
961
      return getSession_id();
-
 
962
 
-
 
963
    case REF_CODE:
-
 
964
      return getRef_code();
-
 
965
 
-
 
966
    case AUTH_CODE:
-
 
967
      return getAuth_code();
-
 
968
 
-
 
969
    case POST_DATE:
711
      return getGateway();
970
      return getPost_date();
712
 
971
 
713
    }
972
    }
714
    throw new IllegalStateException();
973
    throw new IllegalStateException();
715
  }
974
  }
716
 
975
 
Line 741... Line 1000...
741
      return isSetUser_id();
1000
      return isSetUser_id();
742
    case CART_ID:
1001
    case CART_ID:
743
      return isSetCart_id();
1002
      return isSetCart_id();
744
    case OTHER_INFO:
1003
    case OTHER_INFO:
745
      return isSetOther_info();
1004
      return isSetOther_info();
746
    case GATEWAY:
1005
    case GATEWAY_ID:
747
      return isSetGateway();
1006
      return isSetGateway_id();
-
 
1007
    case PAYMENT_ID:
-
 
1008
      return isSetPayment_id();
-
 
1009
    case ERROR_CODE:
-
 
1010
      return isSetError_code();
-
 
1011
    case SESSION_ID:
-
 
1012
      return isSetSession_id();
-
 
1013
    case REF_CODE:
-
 
1014
      return isSetRef_code();
-
 
1015
    case AUTH_CODE:
-
 
1016
      return isSetAuth_code();
-
 
1017
    case POST_DATE:
-
 
1018
      return isSetPost_date();
748
    }
1019
    }
749
    throw new IllegalStateException();
1020
    throw new IllegalStateException();
750
  }
1021
  }
751
 
1022
 
752
  public boolean isSet(int fieldID) {
1023
  public boolean isSet(int fieldID) {
Line 764... Line 1035...
764
 
1035
 
765
  public boolean equals(Payment that) {
1036
  public boolean equals(Payment that) {
766
    if (that == null)
1037
    if (that == null)
767
      return false;
1038
      return false;
768
 
1039
 
769
    boolean this_present_merchant_tx_id = true;
1040
    boolean this_present_merchant_tx_id = true && this.isSetMerchant_tx_id();
770
    boolean that_present_merchant_tx_id = true;
1041
    boolean that_present_merchant_tx_id = true && that.isSetMerchant_tx_id();
771
    if (this_present_merchant_tx_id || that_present_merchant_tx_id) {
1042
    if (this_present_merchant_tx_id || that_present_merchant_tx_id) {
772
      if (!(this_present_merchant_tx_id && that_present_merchant_tx_id))
1043
      if (!(this_present_merchant_tx_id && that_present_merchant_tx_id))
773
        return false;
1044
        return false;
774
      if (this.merchant_tx_id != that.merchant_tx_id)
1045
      if (!this.merchant_tx_id.equals(that.merchant_tx_id))
775
        return false;
1046
        return false;
776
    }
1047
    }
777
 
1048
 
778
    boolean this_present_bank_tx_id = true;
1049
    boolean this_present_bank_tx_id = true && this.isSetBank_tx_id();
779
    boolean that_present_bank_tx_id = true;
1050
    boolean that_present_bank_tx_id = true && that.isSetBank_tx_id();
780
    if (this_present_bank_tx_id || that_present_bank_tx_id) {
1051
    if (this_present_bank_tx_id || that_present_bank_tx_id) {
781
      if (!(this_present_bank_tx_id && that_present_bank_tx_id))
1052
      if (!(this_present_bank_tx_id && that_present_bank_tx_id))
782
        return false;
1053
        return false;
783
      if (this.bank_tx_id != that.bank_tx_id)
1054
      if (!this.bank_tx_id.equals(that.bank_tx_id))
784
        return false;
1055
        return false;
785
    }
1056
    }
786
 
1057
 
787
    boolean this_present_amount = true;
1058
    boolean this_present_amount = true;
788
    boolean that_present_amount = true;
1059
    boolean that_present_amount = true;
Line 863... Line 1134...
863
        return false;
1134
        return false;
864
      if (!this.other_info.equals(that.other_info))
1135
      if (!this.other_info.equals(that.other_info))
865
        return false;
1136
        return false;
866
    }
1137
    }
867
 
1138
 
-
 
1139
    boolean this_present_gateway_id = true;
-
 
1140
    boolean that_present_gateway_id = true;
-
 
1141
    if (this_present_gateway_id || that_present_gateway_id) {
-
 
1142
      if (!(this_present_gateway_id && that_present_gateway_id))
-
 
1143
        return false;
-
 
1144
      if (this.gateway_id != that.gateway_id)
-
 
1145
        return false;
-
 
1146
    }
-
 
1147
 
-
 
1148
    boolean this_present_payment_id = true && this.isSetPayment_id();
-
 
1149
    boolean that_present_payment_id = true && that.isSetPayment_id();
-
 
1150
    if (this_present_payment_id || that_present_payment_id) {
-
 
1151
      if (!(this_present_payment_id && that_present_payment_id))
-
 
1152
        return false;
-
 
1153
      if (!this.payment_id.equals(that.payment_id))
-
 
1154
        return false;
-
 
1155
    }
-
 
1156
 
-
 
1157
    boolean this_present_error_code = true && this.isSetError_code();
-
 
1158
    boolean that_present_error_code = true && that.isSetError_code();
-
 
1159
    if (this_present_error_code || that_present_error_code) {
-
 
1160
      if (!(this_present_error_code && that_present_error_code))
-
 
1161
        return false;
-
 
1162
      if (!this.error_code.equals(that.error_code))
-
 
1163
        return false;
-
 
1164
    }
-
 
1165
 
-
 
1166
    boolean this_present_session_id = true && this.isSetSession_id();
-
 
1167
    boolean that_present_session_id = true && that.isSetSession_id();
-
 
1168
    if (this_present_session_id || that_present_session_id) {
-
 
1169
      if (!(this_present_session_id && that_present_session_id))
-
 
1170
        return false;
-
 
1171
      if (!this.session_id.equals(that.session_id))
-
 
1172
        return false;
-
 
1173
    }
-
 
1174
 
-
 
1175
    boolean this_present_ref_code = true && this.isSetRef_code();
-
 
1176
    boolean that_present_ref_code = true && that.isSetRef_code();
-
 
1177
    if (this_present_ref_code || that_present_ref_code) {
-
 
1178
      if (!(this_present_ref_code && that_present_ref_code))
-
 
1179
        return false;
-
 
1180
      if (!this.ref_code.equals(that.ref_code))
-
 
1181
        return false;
-
 
1182
    }
-
 
1183
 
-
 
1184
    boolean this_present_auth_code = true && this.isSetAuth_code();
-
 
1185
    boolean that_present_auth_code = true && that.isSetAuth_code();
-
 
1186
    if (this_present_auth_code || that_present_auth_code) {
-
 
1187
      if (!(this_present_auth_code && that_present_auth_code))
-
 
1188
        return false;
-
 
1189
      if (!this.auth_code.equals(that.auth_code))
-
 
1190
        return false;
-
 
1191
    }
-
 
1192
 
868
    boolean this_present_gateway = true && this.isSetGateway();
1193
    boolean this_present_post_date = true && this.isSetPost_date();
869
    boolean that_present_gateway = true && that.isSetGateway();
1194
    boolean that_present_post_date = true && that.isSetPost_date();
870
    if (this_present_gateway || that_present_gateway) {
1195
    if (this_present_post_date || that_present_post_date) {
871
      if (!(this_present_gateway && that_present_gateway))
1196
      if (!(this_present_post_date && that_present_post_date))
872
        return false;
1197
        return false;
873
      if (!this.gateway.equals(that.gateway))
1198
      if (!this.post_date.equals(that.post_date))
874
        return false;
1199
        return false;
875
    }
1200
    }
876
 
1201
 
877
    return true;
1202
    return true;
878
  }
1203
  }
Line 895... Line 1220...
895
      if (fieldId == null) {
1220
      if (fieldId == null) {
896
        TProtocolUtil.skip(iprot, field.type);
1221
        TProtocolUtil.skip(iprot, field.type);
897
      } else {
1222
      } else {
898
        switch (fieldId) {
1223
        switch (fieldId) {
899
          case MERCHANT_TX_ID:
1224
          case MERCHANT_TX_ID:
900
            if (field.type == TType.I64) {
1225
            if (field.type == TType.STRING) {
901
              this.merchant_tx_id = iprot.readI64();
1226
              this.merchant_tx_id = iprot.readString();
902
              setMerchant_tx_idIsSet(true);
-
 
903
            } else { 
1227
            } else { 
904
              TProtocolUtil.skip(iprot, field.type);
1228
              TProtocolUtil.skip(iprot, field.type);
905
            }
1229
            }
906
            break;
1230
            break;
907
          case BANK_TX_ID:
1231
          case BANK_TX_ID:
908
            if (field.type == TType.I64) {
1232
            if (field.type == TType.STRING) {
909
              this.bank_tx_id = iprot.readI64();
1233
              this.bank_tx_id = iprot.readString();
910
              setBank_tx_idIsSet(true);
-
 
911
            } else { 
1234
            } else { 
912
              TProtocolUtil.skip(iprot, field.type);
1235
              TProtocolUtil.skip(iprot, field.type);
913
            }
1236
            }
914
            break;
1237
            break;
915
          case AMOUNT:
1238
          case AMOUNT:
Line 974... Line 1297...
974
            }
1297
            }
975
            break;
1298
            break;
976
          case OTHER_INFO:
1299
          case OTHER_INFO:
977
            if (field.type == TType.MAP) {
1300
            if (field.type == TType.MAP) {
978
              {
1301
              {
979
                TMap _map0 = iprot.readMapBegin();
1302
                TMap _map5 = iprot.readMapBegin();
980
                this.other_info = new HashMap<String,String>(2*_map0.size);
1303
                this.other_info = new HashMap<String,String>(2*_map5.size);
981
                for (int _i1 = 0; _i1 < _map0.size; ++_i1)
1304
                for (int _i6 = 0; _i6 < _map5.size; ++_i6)
982
                {
1305
                {
983
                  String _key2;
1306
                  String _key7;
984
                  String _val3;
1307
                  String _val8;
985
                  _key2 = iprot.readString();
1308
                  _key7 = iprot.readString();
986
                  _val3 = iprot.readString();
1309
                  _val8 = iprot.readString();
987
                  this.other_info.put(_key2, _val3);
1310
                  this.other_info.put(_key7, _val8);
988
                }
1311
                }
989
                iprot.readMapEnd();
1312
                iprot.readMapEnd();
990
              }
1313
              }
991
            } else { 
1314
            } else { 
992
              TProtocolUtil.skip(iprot, field.type);
1315
              TProtocolUtil.skip(iprot, field.type);
993
            }
1316
            }
994
            break;
1317
            break;
995
          case GATEWAY:
1318
          case GATEWAY_ID:
996
            if (field.type == TType.I32) {
1319
            if (field.type == TType.I64) {
997
              this.gateway = PaymentGateway.findByValue(iprot.readI32());
1320
              this.gateway_id = iprot.readI64();
-
 
1321
              setGateway_idIsSet(true);
-
 
1322
            } else { 
-
 
1323
              TProtocolUtil.skip(iprot, field.type);
-
 
1324
            }
-
 
1325
            break;
-
 
1326
          case PAYMENT_ID:
-
 
1327
            if (field.type == TType.STRING) {
-
 
1328
              this.payment_id = iprot.readString();
-
 
1329
            } else { 
-
 
1330
              TProtocolUtil.skip(iprot, field.type);
-
 
1331
            }
-
 
1332
            break;
-
 
1333
          case ERROR_CODE:
-
 
1334
            if (field.type == TType.STRING) {
-
 
1335
              this.error_code = iprot.readString();
-
 
1336
            } else { 
-
 
1337
              TProtocolUtil.skip(iprot, field.type);
-
 
1338
            }
-
 
1339
            break;
-
 
1340
          case SESSION_ID:
-
 
1341
            if (field.type == TType.STRING) {
-
 
1342
              this.session_id = iprot.readString();
-
 
1343
            } else { 
-
 
1344
              TProtocolUtil.skip(iprot, field.type);
-
 
1345
            }
-
 
1346
            break;
-
 
1347
          case REF_CODE:
-
 
1348
            if (field.type == TType.STRING) {
-
 
1349
              this.ref_code = iprot.readString();
-
 
1350
            } else { 
-
 
1351
              TProtocolUtil.skip(iprot, field.type);
-
 
1352
            }
-
 
1353
            break;
-
 
1354
          case AUTH_CODE:
-
 
1355
            if (field.type == TType.STRING) {
-
 
1356
              this.auth_code = iprot.readString();
-
 
1357
            } else { 
-
 
1358
              TProtocolUtil.skip(iprot, field.type);
-
 
1359
            }
-
 
1360
            break;
-
 
1361
          case POST_DATE:
-
 
1362
            if (field.type == TType.STRING) {
-
 
1363
              this.post_date = iprot.readString();
998
            } else { 
1364
            } else { 
999
              TProtocolUtil.skip(iprot, field.type);
1365
              TProtocolUtil.skip(iprot, field.type);
1000
            }
1366
            }
1001
            break;
1367
            break;
1002
        }
1368
        }
Line 1009... Line 1375...
1009
 
1375
 
1010
  public void write(TProtocol oprot) throws TException {
1376
  public void write(TProtocol oprot) throws TException {
1011
    validate();
1377
    validate();
1012
 
1378
 
1013
    oprot.writeStructBegin(STRUCT_DESC);
1379
    oprot.writeStructBegin(STRUCT_DESC);
-
 
1380
    if (this.merchant_tx_id != null) {
1014
    oprot.writeFieldBegin(MERCHANT_TX_ID_FIELD_DESC);
1381
      oprot.writeFieldBegin(MERCHANT_TX_ID_FIELD_DESC);
1015
    oprot.writeI64(this.merchant_tx_id);
1382
      oprot.writeString(this.merchant_tx_id);
1016
    oprot.writeFieldEnd();
1383
      oprot.writeFieldEnd();
-
 
1384
    }
-
 
1385
    if (this.bank_tx_id != null) {
1017
    oprot.writeFieldBegin(BANK_TX_ID_FIELD_DESC);
1386
      oprot.writeFieldBegin(BANK_TX_ID_FIELD_DESC);
1018
    oprot.writeI64(this.bank_tx_id);
1387
      oprot.writeString(this.bank_tx_id);
1019
    oprot.writeFieldEnd();
1388
      oprot.writeFieldEnd();
-
 
1389
    }
1020
    oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
1390
    oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
1021
    oprot.writeDouble(this.amount);
1391
    oprot.writeDouble(this.amount);
1022
    oprot.writeFieldEnd();
1392
    oprot.writeFieldEnd();
1023
    oprot.writeFieldBegin(INIT_TIMESTAMP_FIELD_DESC);
1393
    oprot.writeFieldBegin(INIT_TIMESTAMP_FIELD_DESC);
1024
    oprot.writeI64(this.init_timestamp);
1394
    oprot.writeI64(this.init_timestamp);
Line 1049... Line 1419...
1049
    oprot.writeFieldEnd();
1419
    oprot.writeFieldEnd();
1050
    if (this.other_info != null) {
1420
    if (this.other_info != null) {
1051
      oprot.writeFieldBegin(OTHER_INFO_FIELD_DESC);
1421
      oprot.writeFieldBegin(OTHER_INFO_FIELD_DESC);
1052
      {
1422
      {
1053
        oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.other_info.size()));
1423
        oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.other_info.size()));
1054
        for (Map.Entry<String, String> _iter4 : this.other_info.entrySet())
1424
        for (Map.Entry<String, String> _iter9 : this.other_info.entrySet())
1055
        {
1425
        {
1056
          oprot.writeString(_iter4.getKey());
1426
          oprot.writeString(_iter9.getKey());
1057
          oprot.writeString(_iter4.getValue());
1427
          oprot.writeString(_iter9.getValue());
1058
        }
1428
        }
1059
        oprot.writeMapEnd();
1429
        oprot.writeMapEnd();
1060
      }
1430
      }
1061
      oprot.writeFieldEnd();
1431
      oprot.writeFieldEnd();
1062
    }
1432
    }
-
 
1433
    oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
-
 
1434
    oprot.writeI64(this.gateway_id);
-
 
1435
    oprot.writeFieldEnd();
-
 
1436
    if (this.payment_id != null) {
-
 
1437
      oprot.writeFieldBegin(PAYMENT_ID_FIELD_DESC);
-
 
1438
      oprot.writeString(this.payment_id);
-
 
1439
      oprot.writeFieldEnd();
-
 
1440
    }
-
 
1441
    if (this.error_code != null) {
-
 
1442
      oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
-
 
1443
      oprot.writeString(this.error_code);
-
 
1444
      oprot.writeFieldEnd();
-
 
1445
    }
-
 
1446
    if (this.session_id != null) {
-
 
1447
      oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
-
 
1448
      oprot.writeString(this.session_id);
-
 
1449
      oprot.writeFieldEnd();
-
 
1450
    }
-
 
1451
    if (this.ref_code != null) {
-
 
1452
      oprot.writeFieldBegin(REF_CODE_FIELD_DESC);
-
 
1453
      oprot.writeString(this.ref_code);
-
 
1454
      oprot.writeFieldEnd();
-
 
1455
    }
-
 
1456
    if (this.auth_code != null) {
-
 
1457
      oprot.writeFieldBegin(AUTH_CODE_FIELD_DESC);
-
 
1458
      oprot.writeString(this.auth_code);
-
 
1459
      oprot.writeFieldEnd();
-
 
1460
    }
1063
    if (this.gateway != null) {
1461
    if (this.post_date != null) {
1064
      oprot.writeFieldBegin(GATEWAY_FIELD_DESC);
1462
      oprot.writeFieldBegin(POST_DATE_FIELD_DESC);
1065
      oprot.writeI32(this.gateway.getValue());
1463
      oprot.writeString(this.post_date);
1066
      oprot.writeFieldEnd();
1464
      oprot.writeFieldEnd();
1067
    }
1465
    }
1068
    oprot.writeFieldStop();
1466
    oprot.writeFieldStop();
1069
    oprot.writeStructEnd();
1467
    oprot.writeStructEnd();
1070
  }
1468
  }
Line 1073... Line 1471...
1073
  public String toString() {
1471
  public String toString() {
1074
    StringBuilder sb = new StringBuilder("Payment(");
1472
    StringBuilder sb = new StringBuilder("Payment(");
1075
    boolean first = true;
1473
    boolean first = true;
1076
 
1474
 
1077
    sb.append("merchant_tx_id:");
1475
    sb.append("merchant_tx_id:");
-
 
1476
    if (this.merchant_tx_id == null) {
-
 
1477
      sb.append("null");
-
 
1478
    } else {
1078
    sb.append(this.merchant_tx_id);
1479
      sb.append(this.merchant_tx_id);
-
 
1480
    }
1079
    first = false;
1481
    first = false;
1080
    if (!first) sb.append(", ");
1482
    if (!first) sb.append(", ");
1081
    sb.append("bank_tx_id:");
1483
    sb.append("bank_tx_id:");
-
 
1484
    if (this.bank_tx_id == null) {
-
 
1485
      sb.append("null");
-
 
1486
    } else {
1082
    sb.append(this.bank_tx_id);
1487
      sb.append(this.bank_tx_id);
-
 
1488
    }
1083
    first = false;
1489
    first = false;
1084
    if (!first) sb.append(", ");
1490
    if (!first) sb.append(", ");
1085
    sb.append("amount:");
1491
    sb.append("amount:");
1086
    sb.append(this.amount);
1492
    sb.append(this.amount);
1087
    first = false;
1493
    first = false;
Line 1140... Line 1546...
1140
    } else {
1546
    } else {
1141
      sb.append(this.other_info);
1547
      sb.append(this.other_info);
1142
    }
1548
    }
1143
    first = false;
1549
    first = false;
1144
    if (!first) sb.append(", ");
1550
    if (!first) sb.append(", ");
1145
    sb.append("gateway:");
1551
    sb.append("gateway_id:");
-
 
1552
    sb.append(this.gateway_id);
-
 
1553
    first = false;
-
 
1554
    if (!first) sb.append(", ");
-
 
1555
    sb.append("payment_id:");
1146
    if (this.gateway == null) {
1556
    if (this.payment_id == null) {
1147
      sb.append("null");
1557
      sb.append("null");
1148
    } else {
1558
    } else {
1149
      String gateway_name = gateway.name();
1559
      sb.append(this.payment_id);
-
 
1560
    }
-
 
1561
    first = false;
-
 
1562
    if (!first) sb.append(", ");
-
 
1563
    sb.append("error_code:");
1150
      if (gateway_name != null) {
1564
    if (this.error_code == null) {
-
 
1565
      sb.append("null");
-
 
1566
    } else {
1151
        sb.append(gateway_name);
1567
      sb.append(this.error_code);
-
 
1568
    }
-
 
1569
    first = false;
-
 
1570
    if (!first) sb.append(", ");
-
 
1571
    sb.append("session_id:");
-
 
1572
    if (this.session_id == null) {
1152
        sb.append(" (");
1573
      sb.append("null");
-
 
1574
    } else {
-
 
1575
      sb.append(this.session_id);
1153
      }
1576
    }
-
 
1577
    first = false;
-
 
1578
    if (!first) sb.append(", ");
-
 
1579
    sb.append("ref_code:");
-
 
1580
    if (this.ref_code == null) {
-
 
1581
      sb.append("null");
-
 
1582
    } else {
1154
      sb.append(this.gateway);
1583
      sb.append(this.ref_code);
-
 
1584
    }
-
 
1585
    first = false;
-
 
1586
    if (!first) sb.append(", ");
-
 
1587
    sb.append("auth_code:");
1155
      if (gateway_name != null) {
1588
    if (this.auth_code == null) {
1156
        sb.append(")");
1589
      sb.append("null");
-
 
1590
    } else {
-
 
1591
      sb.append(this.auth_code);
1157
      }
1592
    }
-
 
1593
    first = false;
-
 
1594
    if (!first) sb.append(", ");
-
 
1595
    sb.append("post_date:");
-
 
1596
    if (this.post_date == null) {
-
 
1597
      sb.append("null");
-
 
1598
    } else {
-
 
1599
      sb.append(this.post_date);
1158
    }
1600
    }
1159
    first = false;
1601
    first = false;
1160
    sb.append(")");
1602
    sb.append(")");
1161
    return sb.toString();
1603
    return sb.toString();
1162
  }
1604
  }