com.github.theresasogunle.Refund   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 32
rs 10
wmc 3

6 Methods

Rating   Name   Duplication   Size   Complexity  
getRef 0 2 ?
refund 0 9 ?
setRef 0 2 ?
A refund() 0 9 1
A getRef() 0 2 1
A setRef(String) 0 2 1
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