com.github.theresasogunle.Refund.refund()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 9
rs 9.95
1
/*
2
 * To change this license header, choose License Headers in Project Properties.
3
 * To change this template file, choose Tools | Templates
4
 * and open the template in the editor.
5
 */
6
package com.github.theresasogunle;
7
8
9
import org.json.JSONObject;
10
11
/**
12
 *
13
 * @author Theresa
14
 */
15
public class Refund {
16
    private ApiConnection apiConnection;
17
    final  private RaveConstant key= new RaveConstant();
0 ignored issues
show
Coding Style introduced by
The modifiers are customarily declared int the following order: annotations, scope (public, protected, private), abstract, static, final, transient, volatile, synchronized, native, strictfp. Consider reordering your modifiers to comply with this custom.

The Java specification lists the customary order.

Loading history...
Unused Code introduced by
Consider removing the unused private field key.
Loading history...
18
    Endpoints end= new Endpoints();
19
   private String ref;
20
    /**
21
     * @return JSONObject
22
     *
23
     */
24
    public JSONObject refund(){
25
        this.apiConnection = new ApiConnection(end.getRefundEndPoint());
26
        ApiQuery api= new ApiQuery();
27
28
        api.putParams("ref", this.getRef());
29
        api.putParams("seckey",  RaveConstant.SECRET_KEY);
30
31
32
        return this.apiConnection.connectAndQuery(api);
33
    }
34
35
    /**
36
     * @return the ref
37
     */
38
    public String getRef() {
39
        return ref;
40
    }
41
42
    /**
43
     * @param ref the ref to set
44
     */
45
    public void setRef(String ref) {
46
        this.ref = ref;
47
    }
48
}
49