프로젝트

일반

사용자정보

ConsumeTicket » 이력 » 버전 7

이름없음, 2021/06/10 05:34

1 1 이름없음
h1. ConsumeTicket
2 2 이름없음
3 4 이름없음
* 발행된 티켓을 소모합니다.
4 2 이름없음
5 7 이름없음
---
6
7
<pre><code class="java">
8
consumeTicket(
9
param: TicketConsumeRequest
10
): TicketConsumeResponse
11
</code></pre>
12
13 4 이름없음
*TicketConsumeRequest (param)*
14 2 이름없음
15
| *field* | *type* | *description* | *note* |
16
| did | String |   |   |
17 6 이름없음
| command | String |   | 값 : consumeTicket |
18 2 이름없음
| ticketId | String |   |   |
19
| context | TicketContext |   |   |
20
21
*TicketContext*
22
23
| *field* | *type* | *description* | *note* |
24
| count | int |   |   |
25
| timeStamp | String |   |   |
26
27
*TicketConsumeResponse*
28
29
| *field* | *type* | *description* | *note* |
30 6 이름없음
| command | String |   | 값 : consumeTicket |
31 2 이름없음
| infoUrl | String |   |   |
32
| couponImg | String |   |   |
33
| validAt | String |   |   |
34
| expiredAt | String |   |   |
35
| createdAt | String |   |   |
36
| updatedAt | String |   |   |
37
| ticketId | String |   |   |
38
| status | int |   |   |
39 5 이름없음
| proposal | Proposal |   |   |
40
41
*Proposal*
42
43
| *field* | *type* | *description* | *note* |
44
| command | String |   |   |
45
| status | int |   |   |
46
| purpose | int |   |   |
47
| maxIssuable | int |   |   |
48
| category | int[] |   |   |
49
| disAllowMultiIssue | boolean |   |   |
50
| condition | String |   |   |
51
| content | String |   |   |
52
| createdAt | String |   |   |
53
| revokedAt | String |   |   |
54
| updatedAt | String |   |   |
55
| deposit | String |   |   |
56
| duration | String |   |   |
57
| filter | String |   |   |
58
| notAfter | String |   |   |
59
| notBefore | String |   |   |
60
| owner | String |   |   |
61
| proposalId | String |   |   |
62
| ticketValidFrom | String |   |   |
63
| description | String[] |   |   |
64
| imageurl | String[] |   |   |
65
| consumePolicy | ProposalConsumePolicy |   |   |
66
| rewardPolicy | ProposalRewardPolicy |   |   |
67
68
*ProposalConsumePolicy*
69
70
| *field* | *type* | *description* | *note* |
71
| type | int | 소모 유형 |   |
72
| count | int | 소모 허용 횟수 |   |
73
| maxDataCount | int | consume시 최대 데이터 소모 수 | optional |
74
| period | String | 소모 주기 | optional |
75
76
*ProposalRewardPolicy*
77
78
| *field* | *type* | *description* |
79
| type | int | 지급 유형 |
80
| amount | int | 티켓의 지급 가능 총량 |
81 2 이름없음
82
---
83
84
*Request Example*
85
86
<pre><code class="java">
87
mutation {
88
  consumeTicket(param : {
89 3 이름없음
    did: "G5rw9qAMbozGxySHkMaztD" 
90
    command: "consumeTicket" 
91
    ticketId: "orPxmv15e2oSPuvTht3fZ2qiSoJ2wqfaJpRd6hRkc59UPjtjmR78C46Xne28pRphq5ssh7kWaa1JvN7yvFkLbVYw2f3gfQFR2awCYQYHAHA5JYLcM" 
92 2 이름없음
    context : {
93
      count: 1
94 3 이름없음
      timeStamp: "" 
95 2 이름없음
    }
96
  }) {
97
    infoUrl
98
    validAt
99
    ticketId
100
    proposal {
101
      proposalId
102
    }
103
  }
104
}
105
</code></pre>
106
107
*Response Example*
108
109
<pre><code class="java">
110
{
111
  "data": {
112
    "consumeTicket": {
113
      "infoUrl": null,
114
      "validAt": "2021-06-03T06:48:15Z",
115
      "ticketId": "orPxmv15e2oSPuvTht3fZ2qiSoJ2wqfaJpRd6hRkc59UPjtjmR78C46Xne28pRphq5ssh7kWaa1JvN7yvFkLbVYw2f3gfQFR2awCYQYHAHA5JYLcM",
116
      "proposal": {
117 3 이름없음
        "proposalId": "orPxmv15e2oSPufT3TkfVmj9XSSnAqPzQirrU6A9yJCJovwkK6k89A1wCFwqWvHzNAvbDDypRgn4YeSVbeZDSS7MTRKEY1VCfypDu1wsFm41k22SK" 
118 1 이름없음
      }
119
    }
120
  }
121
}
122
</code></pre>
123 3 이름없음
124
---
125
126
*필드 관련하여 자세한 내용은 아래 URL 참고*
127
128
* "UNO.Cranberry ChainCode":https://snplab.synology.me/confluence/display/CBU/Cranberry+Chaincode
클립보드 이미지 추가 (최대 크기: 97.7 MB)