tapyrus-api-client 0.0.3 → 1.1.0beta4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +11 -9
- data/README.md +54 -52
- data/docs/AddTimestampRequest.md +3 -1
- data/docs/AddTimestampResponse.md +36 -0
- data/docs/AddressApi.md +15 -10
- data/docs/ConsumeTrackingRequest.md +18 -0
- data/docs/GetTimestampResponse.md +36 -0
- data/docs/PurposeAddressRequest.md +18 -0
- data/docs/SupplyTrackingRequest.md +20 -0
- data/docs/TimestampApi.md +84 -16
- data/docs/TimestampType.md +15 -0
- data/docs/TokenApi.md +1 -1
- data/docs/TokenResponse.md +4 -4
- data/docs/TrackingApi.md +344 -0
- data/docs/TrackingDestination.md +20 -0
- data/docs/TrackingResponse.md +18 -0
- data/docs/TrackingSubject.md +20 -0
- data/docs/TrackingSubjectMerkleRoot.md +22 -0
- data/docs/TrackingTrace.md +40 -0
- data/docs/TrackingTracesResponse.md +44 -0
- data/docs/TransportTrackingRequest.md +18 -0
- data/docs/UserApi.md +1 -1
- data/git_push.sh +3 -4
- data/lib/tapyrus-api-client/api/address_api.rb +25 -11
- data/lib/tapyrus-api-client/api/timestamp_api.rb +85 -17
- data/lib/tapyrus-api-client/api/token_api.rb +15 -6
- data/lib/tapyrus-api-client/api/tracking_api.rb +348 -0
- data/lib/tapyrus-api-client/api/user_api.rb +7 -4
- data/lib/tapyrus-api-client/api_client.rb +6 -6
- data/lib/tapyrus-api-client/api_error.rb +3 -3
- data/lib/tapyrus-api-client/configuration.rb +23 -6
- data/lib/tapyrus-api-client/models/add_timestamp_request.rb +16 -7
- data/lib/tapyrus-api-client/models/add_timestamp_response.rb +299 -0
- data/lib/tapyrus-api-client/models/consume_tracking_request.rb +226 -0
- data/lib/tapyrus-api-client/models/create_user_request.rb +3 -3
- data/lib/tapyrus-api-client/models/get_addresses_response.rb +3 -3
- data/lib/tapyrus-api-client/models/get_timestamp_response.rb +337 -0
- data/lib/tapyrus-api-client/models/get_tokens_response.rb +3 -3
- data/lib/tapyrus-api-client/models/issue_token_request.rb +3 -3
- data/lib/tapyrus-api-client/models/purpose_address_request.rb +218 -0
- data/lib/tapyrus-api-client/models/reissue_token_request.rb +3 -3
- data/lib/tapyrus-api-client/models/supply_tracking_request.rb +241 -0
- data/lib/tapyrus-api-client/models/timestamp_type.rb +37 -0
- data/lib/tapyrus-api-client/models/token_response.rb +11 -10
- data/lib/tapyrus-api-client/models/{payment_request.rb → tracking_destination.rb} +15 -32
- data/lib/tapyrus-api-client/models/{payment_response.rb → tracking_response.rb} +12 -6
- data/lib/tapyrus-api-client/models/tracking_subject.rb +234 -0
- data/lib/tapyrus-api-client/models/tracking_subject_merkle_root.rb +238 -0
- data/lib/tapyrus-api-client/models/tracking_trace.rb +321 -0
- data/lib/tapyrus-api-client/models/tracking_traces_response.rb +343 -0
- data/lib/tapyrus-api-client/models/transfer_token_request.rb +3 -3
- data/lib/tapyrus-api-client/models/transport_tracking_request.rb +226 -0
- data/lib/tapyrus-api-client/models/userinfo_response.rb +3 -3
- data/lib/tapyrus-api-client/models/userinfo_response_balances.rb +3 -3
- data/lib/tapyrus-api-client/version.rb +4 -4
- data/lib/tapyrus-api-client.rb +17 -6
- data/spec/api/address_api_spec.rb +7 -5
- data/spec/api/timestamp_api_spec.rb +19 -7
- data/spec/api/token_api_spec.rb +3 -3
- data/spec/api/tracking_api_spec.rb +95 -0
- data/spec/api/user_api_spec.rb +3 -3
- data/spec/api_client_spec.rb +5 -5
- data/spec/configuration_spec.rb +6 -6
- data/spec/models/add_timestamp_request_spec.rb +9 -3
- data/spec/models/add_timestamp_response_spec.rb +88 -0
- data/spec/models/consume_tracking_request_spec.rb +34 -0
- data/spec/models/create_user_request_spec.rb +3 -3
- data/spec/models/get_addresses_response_spec.rb +3 -3
- data/spec/models/get_timestamp_response_spec.rb +92 -0
- data/spec/models/get_tokens_response_spec.rb +3 -3
- data/spec/models/issue_token_request_spec.rb +3 -3
- data/spec/models/purpose_address_request_spec.rb +34 -0
- data/spec/models/reissue_token_request_spec.rb +3 -3
- data/spec/models/supply_tracking_request_spec.rb +40 -0
- data/spec/models/timestamp_type_spec.rb +28 -0
- data/spec/models/token_response_spec.rb +4 -4
- data/spec/models/tracking_destination_spec.rb +40 -0
- data/spec/models/tracking_response_spec.rb +34 -0
- data/spec/models/tracking_subject_merkle_root_spec.rb +46 -0
- data/spec/models/tracking_subject_spec.rb +40 -0
- data/spec/models/tracking_trace_spec.rb +100 -0
- data/spec/models/tracking_traces_response_spec.rb +112 -0
- data/spec/models/transfer_token_request_spec.rb +3 -3
- data/spec/models/transport_tracking_request_spec.rb +34 -0
- data/spec/models/userinfo_response_balances_spec.rb +3 -3
- data/spec/models/userinfo_response_spec.rb +3 -3
- data/spec/spec_helper.rb +3 -3
- data/tapyrus-api-client.gemspec +4 -4
- metadata +67 -23
- data/docs/PaymentApi.md +0 -76
- data/docs/PaymentRequest.md +0 -22
- data/docs/PaymentResponse.md +0 -18
- data/lib/tapyrus-api-client/api/payment_api.rb +0 -83
- data/spec/api/payment_api_spec.rb +0 -47
- data/spec/models/payment_request_spec.rb +0 -46
- data/spec/models/payment_response_spec.rb +0 -34
data/docs/TimestampApi.md
CHANGED
@@ -1,20 +1,21 @@
|
|
1
1
|
# TapyrusApiClient::TimestampApi
|
2
2
|
|
3
|
-
All URIs are relative to *https://ap-01.tapyrus.chaintope.com/api/v1*
|
3
|
+
All URIs are relative to *https://ap-01.api.tapyrus.chaintope.com/api/v1*
|
4
4
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
|
-
| [**add_timestamp**](TimestampApi.md#add_timestamp) | **POST** /
|
7
|
+
| [**add_timestamp**](TimestampApi.md#add_timestamp) | **POST** /timestamps | Timestampを記録 |
|
8
|
+
| [**get_timestamp**](TimestampApi.md#get_timestamp) | **GET** /timestamps/{id} | Timestamp表示 |
|
8
9
|
| [**get_timestamps**](TimestampApi.md#get_timestamps) | **GET** /timestamps | Timestamp一覧表示 |
|
9
10
|
|
10
11
|
|
11
12
|
## add_timestamp
|
12
13
|
|
13
|
-
> add_timestamp(opts)
|
14
|
+
> <AddTimestampResponse> add_timestamp(opts)
|
14
15
|
|
15
16
|
Timestampを記録
|
16
17
|
|
17
|
-
ブロックチェーンにハッシュ値をタイムスタンプとして記録します。
|
18
|
+
ブロックチェーンにハッシュ値をタイムスタンプとして記録します。 現在、記録方法として2種類の`type`(`simple`(デフォルト)、`trackable`)をサポートしています。 `simple`を指定した場合は、ハッシュ値がトランザクション内のOP_RETURNアウトプットに直接埋め込まれます。 単純に値をブロックチェーンに記録する場合は`simple`の利用を推奨します。 `trackable`を指定した場合は、ハッシュ値を組み合わせたPay to Contractアドレスが生成され、ハッシュ値は間接的に記録されます。 アドレスは、Timestampの戻り値の1つである`payment_base`と指定されたコンテンツハッシュを使って次のように計算されます。 ``` アドレスの公開鍵 = payment_base + SHA256(payment_base || コンテンツハッシュ)G ``` ※Gは楕円曲線の生成元。公開鍵からアドレス(P2PKH)を導出すると、戻り値の1つである`p2c_address`と合致します。 `trackable`を使用するとハッシュ値は間接的に記録されますが、ブロックチェーン上で使用可能なアセットとして管理できます。 そのため、ある記録を持つデータを更新する場合に、このアセットを使用して新しい`trackable`アセットを作成することで、 記録の更新、最新性を表現することが可能になります。未使用な記録のみ`latest`がtrueになります。
|
18
19
|
|
19
20
|
### Examples
|
20
21
|
|
@@ -26,12 +27,13 @@ TapyrusApiClient.configure do |config|end
|
|
26
27
|
|
27
28
|
api_instance = TapyrusApiClient::TimestampApi.new
|
28
29
|
opts = {
|
29
|
-
add_timestamp_request: TapyrusApiClient::AddTimestampRequest.new({content_hash: '9ccc644b03a88358a754962903a659a2d338767ee61674dde5434702a6256e6d'}) # AddTimestampRequest | `content_hash`, `prefix
|
30
|
+
add_timestamp_request: TapyrusApiClient::AddTimestampRequest.new({content_hash: '9ccc644b03a88358a754962903a659a2d338767ee61674dde5434702a6256e6d'}) # AddTimestampRequest | `content_hash`, `prefix`, `type` を受け取り、ブロックチェーンにハッシュ値をタイムスタンプとして記録します。
|
30
31
|
}
|
31
32
|
|
32
33
|
begin
|
33
34
|
# Timestampを記録
|
34
|
-
api_instance.add_timestamp(opts)
|
35
|
+
result = api_instance.add_timestamp(opts)
|
36
|
+
p result
|
35
37
|
rescue TapyrusApiClient::ApiError => e
|
36
38
|
puts "Error when calling TimestampApi->add_timestamp: #{e}"
|
37
39
|
end
|
@@ -39,9 +41,9 @@ end
|
|
39
41
|
|
40
42
|
#### Using the add_timestamp_with_http_info variant
|
41
43
|
|
42
|
-
This returns an Array which contains the response data
|
44
|
+
This returns an Array which contains the response data, status code and headers.
|
43
45
|
|
44
|
-
> <Array(
|
46
|
+
> <Array(<AddTimestampResponse>, Integer, Hash)> add_timestamp_with_http_info(opts)
|
45
47
|
|
46
48
|
```ruby
|
47
49
|
begin
|
@@ -49,7 +51,7 @@ begin
|
|
49
51
|
data, status_code, headers = api_instance.add_timestamp_with_http_info(opts)
|
50
52
|
p status_code # => 2xx
|
51
53
|
p headers # => { ... }
|
52
|
-
p data # =>
|
54
|
+
p data # => <AddTimestampResponse>
|
53
55
|
rescue TapyrusApiClient::ApiError => e
|
54
56
|
puts "Error when calling TimestampApi->add_timestamp_with_http_info: #{e}"
|
55
57
|
end
|
@@ -59,11 +61,11 @@ end
|
|
59
61
|
|
60
62
|
| Name | Type | Description | Notes |
|
61
63
|
| ---- | ---- | ----------- | ----- |
|
62
|
-
| **add_timestamp_request** | [**AddTimestampRequest**](AddTimestampRequest.md) | `content_hash`, `prefix`
|
64
|
+
| **add_timestamp_request** | [**AddTimestampRequest**](AddTimestampRequest.md) | `content_hash`, `prefix`, `type` を受け取り、ブロックチェーンにハッシュ値をタイムスタンプとして記録します。 | [optional] |
|
63
65
|
|
64
66
|
### Return type
|
65
67
|
|
66
|
-
|
68
|
+
[**AddTimestampResponse**](AddTimestampResponse.md)
|
67
69
|
|
68
70
|
### Authorization
|
69
71
|
|
@@ -72,12 +74,78 @@ No authorization required
|
|
72
74
|
### HTTP request headers
|
73
75
|
|
74
76
|
- **Content-Type**: application/json
|
75
|
-
- **Accept**:
|
77
|
+
- **Accept**: application/json
|
78
|
+
|
79
|
+
|
80
|
+
## get_timestamp
|
81
|
+
|
82
|
+
> <GetTimestampResponse> get_timestamp(id)
|
83
|
+
|
84
|
+
Timestamp表示
|
85
|
+
|
86
|
+
タイムスタンプ ID に対応する Timestamp を表示します。
|
87
|
+
|
88
|
+
### Examples
|
89
|
+
|
90
|
+
```ruby
|
91
|
+
require 'time'
|
92
|
+
require 'tapyrus-api-client'
|
93
|
+
# setup authorization
|
94
|
+
TapyrusApiClient.configure do |config|end
|
95
|
+
|
96
|
+
api_instance = TapyrusApiClient::TimestampApi.new
|
97
|
+
id = 56 # Integer | Timestamp id。`Timestamp を記録 API(POST /timestamps)` の返り値の JSON の `id` 要素の値です。
|
98
|
+
|
99
|
+
begin
|
100
|
+
# Timestamp表示
|
101
|
+
result = api_instance.get_timestamp(id)
|
102
|
+
p result
|
103
|
+
rescue TapyrusApiClient::ApiError => e
|
104
|
+
puts "Error when calling TimestampApi->get_timestamp: #{e}"
|
105
|
+
end
|
106
|
+
```
|
107
|
+
|
108
|
+
#### Using the get_timestamp_with_http_info variant
|
109
|
+
|
110
|
+
This returns an Array which contains the response data, status code and headers.
|
111
|
+
|
112
|
+
> <Array(<GetTimestampResponse>, Integer, Hash)> get_timestamp_with_http_info(id)
|
113
|
+
|
114
|
+
```ruby
|
115
|
+
begin
|
116
|
+
# Timestamp表示
|
117
|
+
data, status_code, headers = api_instance.get_timestamp_with_http_info(id)
|
118
|
+
p status_code # => 2xx
|
119
|
+
p headers # => { ... }
|
120
|
+
p data # => <GetTimestampResponse>
|
121
|
+
rescue TapyrusApiClient::ApiError => e
|
122
|
+
puts "Error when calling TimestampApi->get_timestamp_with_http_info: #{e}"
|
123
|
+
end
|
124
|
+
```
|
125
|
+
|
126
|
+
### Parameters
|
127
|
+
|
128
|
+
| Name | Type | Description | Notes |
|
129
|
+
| ---- | ---- | ----------- | ----- |
|
130
|
+
| **id** | **Integer** | Timestamp id。`Timestamp を記録 API(POST /timestamps)` の返り値の JSON の `id` 要素の値です。 | |
|
131
|
+
|
132
|
+
### Return type
|
133
|
+
|
134
|
+
[**GetTimestampResponse**](GetTimestampResponse.md)
|
135
|
+
|
136
|
+
### Authorization
|
137
|
+
|
138
|
+
No authorization required
|
139
|
+
|
140
|
+
### HTTP request headers
|
141
|
+
|
142
|
+
- **Content-Type**: Not defined
|
143
|
+
- **Accept**: application/json
|
76
144
|
|
77
145
|
|
78
146
|
## get_timestamps
|
79
147
|
|
80
|
-
> Array
|
148
|
+
> <Array<GetTimestampResponse>> get_timestamps
|
81
149
|
|
82
150
|
Timestamp一覧表示
|
83
151
|
|
@@ -106,7 +174,7 @@ end
|
|
106
174
|
|
107
175
|
This returns an Array which contains the response data, status code and headers.
|
108
176
|
|
109
|
-
> <Array(Array
|
177
|
+
> <Array(<Array<GetTimestampResponse>>, Integer, Hash)> get_timestamps_with_http_info
|
110
178
|
|
111
179
|
```ruby
|
112
180
|
begin
|
@@ -114,7 +182,7 @@ begin
|
|
114
182
|
data, status_code, headers = api_instance.get_timestamps_with_http_info
|
115
183
|
p status_code # => 2xx
|
116
184
|
p headers # => { ... }
|
117
|
-
p data # => Array
|
185
|
+
p data # => <Array<GetTimestampResponse>>
|
118
186
|
rescue TapyrusApiClient::ApiError => e
|
119
187
|
puts "Error when calling TimestampApi->get_timestamps_with_http_info: #{e}"
|
120
188
|
end
|
@@ -126,7 +194,7 @@ This endpoint does not need any parameter.
|
|
126
194
|
|
127
195
|
### Return type
|
128
196
|
|
129
|
-
**Array<
|
197
|
+
[**Array<GetTimestampResponse>**](GetTimestampResponse.md)
|
130
198
|
|
131
199
|
### Authorization
|
132
200
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# TapyrusApiClient::TimestampType
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
|
8
|
+
## Example
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'tapyrus-api-client'
|
12
|
+
|
13
|
+
instance = TapyrusApiClient::TimestampType.new()
|
14
|
+
```
|
15
|
+
|
data/docs/TokenApi.md
CHANGED
data/docs/TokenResponse.md
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **
|
8
|
-
| **txid** | **String** |
|
7
|
+
| **token_id** | **String** | | [optional] |
|
8
|
+
| **txid** | **String** | トランザクションID | [optional] |
|
9
9
|
|
10
10
|
## Example
|
11
11
|
|
@@ -13,8 +13,8 @@
|
|
13
13
|
require 'tapyrus-api-client'
|
14
14
|
|
15
15
|
instance = TapyrusApiClient::TokenResponse.new(
|
16
|
-
|
17
|
-
txid:
|
16
|
+
token_id: c3ec2fd806701a3f55808cbec3922c38dafaa3070c48c803e9043ee3642c660b46,
|
17
|
+
txid: 6fce02d39279f6d645ecc710ebcf1dbb7b8104106553d8da13f5db79c5a628fc
|
18
18
|
)
|
19
19
|
```
|
20
20
|
|
data/docs/TrackingApi.md
ADDED
@@ -0,0 +1,344 @@
|
|
1
|
+
# TapyrusApiClient::TrackingApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://ap-01.api.tapyrus.chaintope.com/api/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**consume_tracking**](TrackingApi.md#consume_tracking) | **POST** /tracking/consume | モノのトラッキングを終了します。 |
|
8
|
+
| [**get_tracking_subjects**](TrackingApi.md#get_tracking_subjects) | **GET** /tracking/subjects/{subject_id}/traces | モノの移動の履歴を返します。 |
|
9
|
+
| [**get_tracking_traces**](TrackingApi.md#get_tracking_traces) | **GET** /tracking/traces/{trace_id} | モノの移動履歴(trace)に関する情報を返します。 |
|
10
|
+
| [**supply_tracking**](TrackingApi.md#supply_tracking) | **POST** /tracking/supply | 新規でトラッキングを開始します。 |
|
11
|
+
| [**transport_tracking**](TrackingApi.md#transport_tracking) | **POST** /tracking/transport | トラッキング中のモノの移動を記録します。 |
|
12
|
+
|
13
|
+
|
14
|
+
## consume_tracking
|
15
|
+
|
16
|
+
> <TrackingResponse> consume_tracking(consume_tracking_request)
|
17
|
+
|
18
|
+
モノのトラッキングを終了します。
|
19
|
+
|
20
|
+
トラッキング中のモノが消費されたものとみなして、トラッキングを終了します。モノがトラッキング中でない場合は失敗します。
|
21
|
+
|
22
|
+
### Examples
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'time'
|
26
|
+
require 'tapyrus-api-client'
|
27
|
+
# setup authorization
|
28
|
+
TapyrusApiClient.configure do |config|end
|
29
|
+
|
30
|
+
api_instance = TapyrusApiClient::TrackingApi.new
|
31
|
+
consume_tracking_request = TapyrusApiClient::ConsumeTrackingRequest.new({subjects: ['6948DF80-14BD-4E04-8842-7668D9C001F5']}) # ConsumeTrackingRequest |
|
32
|
+
|
33
|
+
begin
|
34
|
+
# モノのトラッキングを終了します。
|
35
|
+
result = api_instance.consume_tracking(consume_tracking_request)
|
36
|
+
p result
|
37
|
+
rescue TapyrusApiClient::ApiError => e
|
38
|
+
puts "Error when calling TrackingApi->consume_tracking: #{e}"
|
39
|
+
end
|
40
|
+
```
|
41
|
+
|
42
|
+
#### Using the consume_tracking_with_http_info variant
|
43
|
+
|
44
|
+
This returns an Array which contains the response data, status code and headers.
|
45
|
+
|
46
|
+
> <Array(<TrackingResponse>, Integer, Hash)> consume_tracking_with_http_info(consume_tracking_request)
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
begin
|
50
|
+
# モノのトラッキングを終了します。
|
51
|
+
data, status_code, headers = api_instance.consume_tracking_with_http_info(consume_tracking_request)
|
52
|
+
p status_code # => 2xx
|
53
|
+
p headers # => { ... }
|
54
|
+
p data # => <TrackingResponse>
|
55
|
+
rescue TapyrusApiClient::ApiError => e
|
56
|
+
puts "Error when calling TrackingApi->consume_tracking_with_http_info: #{e}"
|
57
|
+
end
|
58
|
+
```
|
59
|
+
|
60
|
+
### Parameters
|
61
|
+
|
62
|
+
| Name | Type | Description | Notes |
|
63
|
+
| ---- | ---- | ----------- | ----- |
|
64
|
+
| **consume_tracking_request** | [**ConsumeTrackingRequest**](ConsumeTrackingRequest.md) | | |
|
65
|
+
|
66
|
+
### Return type
|
67
|
+
|
68
|
+
[**TrackingResponse**](TrackingResponse.md)
|
69
|
+
|
70
|
+
### Authorization
|
71
|
+
|
72
|
+
No authorization required
|
73
|
+
|
74
|
+
### HTTP request headers
|
75
|
+
|
76
|
+
- **Content-Type**: application/json
|
77
|
+
- **Accept**: application/json
|
78
|
+
|
79
|
+
|
80
|
+
## get_tracking_subjects
|
81
|
+
|
82
|
+
> <Array<TrackingTrace>> get_tracking_subjects(subject_id)
|
83
|
+
|
84
|
+
モノの移動の履歴を返します。
|
85
|
+
|
86
|
+
モノの移動の履歴を返します。履歴は発生日時の昇順でソートされています。
|
87
|
+
|
88
|
+
### Examples
|
89
|
+
|
90
|
+
```ruby
|
91
|
+
require 'time'
|
92
|
+
require 'tapyrus-api-client'
|
93
|
+
# setup authorization
|
94
|
+
TapyrusApiClient.configure do |config|end
|
95
|
+
|
96
|
+
api_instance = TapyrusApiClient::TrackingApi.new
|
97
|
+
subject_id = 'subject_id_example' # String | モノの識別子。
|
98
|
+
|
99
|
+
begin
|
100
|
+
# モノの移動の履歴を返します。
|
101
|
+
result = api_instance.get_tracking_subjects(subject_id)
|
102
|
+
p result
|
103
|
+
rescue TapyrusApiClient::ApiError => e
|
104
|
+
puts "Error when calling TrackingApi->get_tracking_subjects: #{e}"
|
105
|
+
end
|
106
|
+
```
|
107
|
+
|
108
|
+
#### Using the get_tracking_subjects_with_http_info variant
|
109
|
+
|
110
|
+
This returns an Array which contains the response data, status code and headers.
|
111
|
+
|
112
|
+
> <Array(<Array<TrackingTrace>>, Integer, Hash)> get_tracking_subjects_with_http_info(subject_id)
|
113
|
+
|
114
|
+
```ruby
|
115
|
+
begin
|
116
|
+
# モノの移動の履歴を返します。
|
117
|
+
data, status_code, headers = api_instance.get_tracking_subjects_with_http_info(subject_id)
|
118
|
+
p status_code # => 2xx
|
119
|
+
p headers # => { ... }
|
120
|
+
p data # => <Array<TrackingTrace>>
|
121
|
+
rescue TapyrusApiClient::ApiError => e
|
122
|
+
puts "Error when calling TrackingApi->get_tracking_subjects_with_http_info: #{e}"
|
123
|
+
end
|
124
|
+
```
|
125
|
+
|
126
|
+
### Parameters
|
127
|
+
|
128
|
+
| Name | Type | Description | Notes |
|
129
|
+
| ---- | ---- | ----------- | ----- |
|
130
|
+
| **subject_id** | **String** | モノの識別子。 | |
|
131
|
+
|
132
|
+
### Return type
|
133
|
+
|
134
|
+
[**Array<TrackingTrace>**](TrackingTrace.md)
|
135
|
+
|
136
|
+
### Authorization
|
137
|
+
|
138
|
+
No authorization required
|
139
|
+
|
140
|
+
### HTTP request headers
|
141
|
+
|
142
|
+
- **Content-Type**: Not defined
|
143
|
+
- **Accept**: application/json
|
144
|
+
|
145
|
+
|
146
|
+
## get_tracking_traces
|
147
|
+
|
148
|
+
> <TrackingTracesResponse> get_tracking_traces(trace_id)
|
149
|
+
|
150
|
+
モノの移動履歴(trace)に関する情報を返します。
|
151
|
+
|
152
|
+
モノの移動履歴(trace)に関する情報を返します。
|
153
|
+
|
154
|
+
### Examples
|
155
|
+
|
156
|
+
```ruby
|
157
|
+
require 'time'
|
158
|
+
require 'tapyrus-api-client'
|
159
|
+
# setup authorization
|
160
|
+
TapyrusApiClient.configure do |config|end
|
161
|
+
|
162
|
+
api_instance = TapyrusApiClient::TrackingApi.new
|
163
|
+
trace_id = 8.14 # Float | モノの移動履歴(trace)に一意に振られたID
|
164
|
+
|
165
|
+
begin
|
166
|
+
# モノの移動履歴(trace)に関する情報を返します。
|
167
|
+
result = api_instance.get_tracking_traces(trace_id)
|
168
|
+
p result
|
169
|
+
rescue TapyrusApiClient::ApiError => e
|
170
|
+
puts "Error when calling TrackingApi->get_tracking_traces: #{e}"
|
171
|
+
end
|
172
|
+
```
|
173
|
+
|
174
|
+
#### Using the get_tracking_traces_with_http_info variant
|
175
|
+
|
176
|
+
This returns an Array which contains the response data, status code and headers.
|
177
|
+
|
178
|
+
> <Array(<TrackingTracesResponse>, Integer, Hash)> get_tracking_traces_with_http_info(trace_id)
|
179
|
+
|
180
|
+
```ruby
|
181
|
+
begin
|
182
|
+
# モノの移動履歴(trace)に関する情報を返します。
|
183
|
+
data, status_code, headers = api_instance.get_tracking_traces_with_http_info(trace_id)
|
184
|
+
p status_code # => 2xx
|
185
|
+
p headers # => { ... }
|
186
|
+
p data # => <TrackingTracesResponse>
|
187
|
+
rescue TapyrusApiClient::ApiError => e
|
188
|
+
puts "Error when calling TrackingApi->get_tracking_traces_with_http_info: #{e}"
|
189
|
+
end
|
190
|
+
```
|
191
|
+
|
192
|
+
### Parameters
|
193
|
+
|
194
|
+
| Name | Type | Description | Notes |
|
195
|
+
| ---- | ---- | ----------- | ----- |
|
196
|
+
| **trace_id** | **Float** | モノの移動履歴(trace)に一意に振られたID | |
|
197
|
+
|
198
|
+
### Return type
|
199
|
+
|
200
|
+
[**TrackingTracesResponse**](TrackingTracesResponse.md)
|
201
|
+
|
202
|
+
### Authorization
|
203
|
+
|
204
|
+
No authorization required
|
205
|
+
|
206
|
+
### HTTP request headers
|
207
|
+
|
208
|
+
- **Content-Type**: Not defined
|
209
|
+
- **Accept**: application/json
|
210
|
+
|
211
|
+
|
212
|
+
## supply_tracking
|
213
|
+
|
214
|
+
> <TrackingResponse> supply_tracking(opts)
|
215
|
+
|
216
|
+
新規でトラッキングを開始します。
|
217
|
+
|
218
|
+
新規でトラッキングを開始します。指定されたモノがすでにトラッキング中の場合はトラッキングの開始に失敗します。
|
219
|
+
|
220
|
+
### Examples
|
221
|
+
|
222
|
+
```ruby
|
223
|
+
require 'time'
|
224
|
+
require 'tapyrus-api-client'
|
225
|
+
# setup authorization
|
226
|
+
TapyrusApiClient.configure do |config|end
|
227
|
+
|
228
|
+
api_instance = TapyrusApiClient::TrackingApi.new
|
229
|
+
opts = {
|
230
|
+
supply_tracking_request: TapyrusApiClient::SupplyTrackingRequest.new({from_address: '1CY6TSSARn8rAFD9chCghX5B7j4PKR8S1a', destinations: [TapyrusApiClient::TrackingDestination.new]}) # SupplyTrackingRequest |
|
231
|
+
}
|
232
|
+
|
233
|
+
begin
|
234
|
+
# 新規でトラッキングを開始します。
|
235
|
+
result = api_instance.supply_tracking(opts)
|
236
|
+
p result
|
237
|
+
rescue TapyrusApiClient::ApiError => e
|
238
|
+
puts "Error when calling TrackingApi->supply_tracking: #{e}"
|
239
|
+
end
|
240
|
+
```
|
241
|
+
|
242
|
+
#### Using the supply_tracking_with_http_info variant
|
243
|
+
|
244
|
+
This returns an Array which contains the response data, status code and headers.
|
245
|
+
|
246
|
+
> <Array(<TrackingResponse>, Integer, Hash)> supply_tracking_with_http_info(opts)
|
247
|
+
|
248
|
+
```ruby
|
249
|
+
begin
|
250
|
+
# 新規でトラッキングを開始します。
|
251
|
+
data, status_code, headers = api_instance.supply_tracking_with_http_info(opts)
|
252
|
+
p status_code # => 2xx
|
253
|
+
p headers # => { ... }
|
254
|
+
p data # => <TrackingResponse>
|
255
|
+
rescue TapyrusApiClient::ApiError => e
|
256
|
+
puts "Error when calling TrackingApi->supply_tracking_with_http_info: #{e}"
|
257
|
+
end
|
258
|
+
```
|
259
|
+
|
260
|
+
### Parameters
|
261
|
+
|
262
|
+
| Name | Type | Description | Notes |
|
263
|
+
| ---- | ---- | ----------- | ----- |
|
264
|
+
| **supply_tracking_request** | [**SupplyTrackingRequest**](SupplyTrackingRequest.md) | | [optional] |
|
265
|
+
|
266
|
+
### Return type
|
267
|
+
|
268
|
+
[**TrackingResponse**](TrackingResponse.md)
|
269
|
+
|
270
|
+
### Authorization
|
271
|
+
|
272
|
+
No authorization required
|
273
|
+
|
274
|
+
### HTTP request headers
|
275
|
+
|
276
|
+
- **Content-Type**: application/json
|
277
|
+
- **Accept**: application/json
|
278
|
+
|
279
|
+
|
280
|
+
## transport_tracking
|
281
|
+
|
282
|
+
> <TrackingResponse> transport_tracking(transport_tracking_request)
|
283
|
+
|
284
|
+
トラッキング中のモノの移動を記録します。
|
285
|
+
|
286
|
+
トラッキング中のモノの移動を記録します。モノがトラッキング中でない場合は記録に失敗します。
|
287
|
+
|
288
|
+
### Examples
|
289
|
+
|
290
|
+
```ruby
|
291
|
+
require 'time'
|
292
|
+
require 'tapyrus-api-client'
|
293
|
+
# setup authorization
|
294
|
+
TapyrusApiClient.configure do |config|end
|
295
|
+
|
296
|
+
api_instance = TapyrusApiClient::TrackingApi.new
|
297
|
+
transport_tracking_request = TapyrusApiClient::TransportTrackingRequest.new({destinations: [TapyrusApiClient::TrackingDestination.new]}) # TransportTrackingRequest |
|
298
|
+
|
299
|
+
begin
|
300
|
+
# トラッキング中のモノの移動を記録します。
|
301
|
+
result = api_instance.transport_tracking(transport_tracking_request)
|
302
|
+
p result
|
303
|
+
rescue TapyrusApiClient::ApiError => e
|
304
|
+
puts "Error when calling TrackingApi->transport_tracking: #{e}"
|
305
|
+
end
|
306
|
+
```
|
307
|
+
|
308
|
+
#### Using the transport_tracking_with_http_info variant
|
309
|
+
|
310
|
+
This returns an Array which contains the response data, status code and headers.
|
311
|
+
|
312
|
+
> <Array(<TrackingResponse>, Integer, Hash)> transport_tracking_with_http_info(transport_tracking_request)
|
313
|
+
|
314
|
+
```ruby
|
315
|
+
begin
|
316
|
+
# トラッキング中のモノの移動を記録します。
|
317
|
+
data, status_code, headers = api_instance.transport_tracking_with_http_info(transport_tracking_request)
|
318
|
+
p status_code # => 2xx
|
319
|
+
p headers # => { ... }
|
320
|
+
p data # => <TrackingResponse>
|
321
|
+
rescue TapyrusApiClient::ApiError => e
|
322
|
+
puts "Error when calling TrackingApi->transport_tracking_with_http_info: #{e}"
|
323
|
+
end
|
324
|
+
```
|
325
|
+
|
326
|
+
### Parameters
|
327
|
+
|
328
|
+
| Name | Type | Description | Notes |
|
329
|
+
| ---- | ---- | ----------- | ----- |
|
330
|
+
| **transport_tracking_request** | [**TransportTrackingRequest**](TransportTrackingRequest.md) | | |
|
331
|
+
|
332
|
+
### Return type
|
333
|
+
|
334
|
+
[**TrackingResponse**](TrackingResponse.md)
|
335
|
+
|
336
|
+
### Authorization
|
337
|
+
|
338
|
+
No authorization required
|
339
|
+
|
340
|
+
### HTTP request headers
|
341
|
+
|
342
|
+
- **Content-Type**: application/json
|
343
|
+
- **Accept**: application/json
|
344
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TapyrusApiClient::TrackingDestination
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **address** | **String** | | [optional] |
|
8
|
+
| **subjects** | [**Array<AnyOfstringTrackingSubject>**](AnyOfstringTrackingSubject.md) | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'tapyrus-api-client'
|
14
|
+
|
15
|
+
instance = TapyrusApiClient::TrackingDestination.new(
|
16
|
+
address: mnzdZUieW2Hqe9GzZzVbcA7nHkDeFhJFzd,
|
17
|
+
subjects: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# TapyrusApiClient::TrackingResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **txid** | **String** | トランザクションID | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'tapyrus-api-client'
|
13
|
+
|
14
|
+
instance = TapyrusApiClient::TrackingResponse.new(
|
15
|
+
txid: 6fce02d39279f6d645ecc710ebcf1dbb7b8104106553d8da13f5db79c5a628fc
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# TapyrusApiClient::TrackingSubject
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **subject_id** | **String** | | |
|
8
|
+
| **children** | [**Array<AnyOfstringTrackingSubject>**](AnyOfstringTrackingSubject.md) | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'tapyrus-api-client'
|
14
|
+
|
15
|
+
instance = TapyrusApiClient::TrackingSubject.new(
|
16
|
+
subject_id: 6948DF80-14BD-4E04-8842-7668D9C001F5,
|
17
|
+
children: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# TapyrusApiClient::TrackingSubjectMerkleRoot
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **subject_id** | **String** | | [optional] |
|
8
|
+
| **merkle_root** | **String** | | [optional] |
|
9
|
+
| **merkle_path** | **Array<String>** | | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'tapyrus-api-client'
|
15
|
+
|
16
|
+
instance = TapyrusApiClient::TrackingSubjectMerkleRoot.new(
|
17
|
+
subject_id: 6948DF80-14BD-4E04-8842-7668D9C001F5,
|
18
|
+
merkle_root: a6964be0afa2451a7e95806b90ae6e9d2de35b9e6c94a168133e8d354d401267,
|
19
|
+
merkle_path: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|