프로젝트

일반

사용자정보

ConsumeTicket » 이력 » 버전 5

이름없음, 2021/06/07 04:35

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