polar-accesslink-api-gem 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +182 -0
- data/Rakefile +10 -0
- data/docs/Activity.md +34 -0
- data/docs/ActivityLog.md +18 -0
- data/docs/ActivityStepSample.md +20 -0
- data/docs/ActivityStepSamples.md +20 -0
- data/docs/ActivityZoneSample.md +20 -0
- data/docs/ActivityZoneSamples.md +20 -0
- data/docs/AvailableSleep.md +22 -0
- data/docs/AvailableSleeps.md +18 -0
- data/docs/AvailableUserData.md +22 -0
- data/docs/AvailableUserDatas.md +18 -0
- data/docs/CreatedWebhook.md +18 -0
- data/docs/CreatedWebhookData.md +24 -0
- data/docs/DailyActivityApi.md +440 -0
- data/docs/DurationZone.md +20 -0
- data/docs/Error.md +26 -0
- data/docs/Exercise.md +54 -0
- data/docs/ExerciseHashId.md +52 -0
- data/docs/Exercises.md +18 -0
- data/docs/ExercisesApi.md +214 -0
- data/docs/HeartRate.md +20 -0
- data/docs/NightlyRecharge.md +38 -0
- data/docs/NightlyRechargeApi.md +144 -0
- data/docs/Nights.md +18 -0
- data/docs/PhysicalInfoApi.md +294 -0
- data/docs/PhysicalInformation.md +40 -0
- data/docs/PhysicalInformations.md +18 -0
- data/docs/PullNotificationsApi.md +75 -0
- data/docs/Recharges.md +18 -0
- data/docs/Register.md +18 -0
- data/docs/Sample.md +22 -0
- data/docs/Samples.md +18 -0
- data/docs/Sleep.md +64 -0
- data/docs/SleepApi.md +211 -0
- data/docs/TrainingDataApi.md +744 -0
- data/docs/TransactionLocation.md +20 -0
- data/docs/User.md +36 -0
- data/docs/UserExtraInfo.md +22 -0
- data/docs/UsersApi.md +216 -0
- data/docs/WebhookInfo.md +18 -0
- data/docs/WebhookInfoData.md +22 -0
- data/docs/WebhookPatch.md +20 -0
- data/docs/WebhookPayloadExercise.md +26 -0
- data/docs/WebhookPayloadSleep.md +26 -0
- data/docs/WebhookPing.md +20 -0
- data/docs/WebhookRequest.md +20 -0
- data/docs/WebhookType.md +15 -0
- data/docs/WebhooksApi.md +289 -0
- data/docs/Zone.md +24 -0
- data/docs/Zones.md +18 -0
- data/git_push.sh +58 -0
- data/lib/polar-accesslink-api-gem/api/daily_activity_api.rb +469 -0
- data/lib/polar-accesslink-api-gem/api/exercises_api.rb +205 -0
- data/lib/polar-accesslink-api-gem/api/nightly_recharge_api.rb +142 -0
- data/lib/polar-accesslink-api-gem/api/physical_info_api.rb +296 -0
- data/lib/polar-accesslink-api-gem/api/pull_notifications_api.rb +79 -0
- data/lib/polar-accesslink-api-gem/api/sleep_api.rb +199 -0
- data/lib/polar-accesslink-api-gem/api/training_data_api.rb +785 -0
- data/lib/polar-accesslink-api-gem/api/users_api.rb +221 -0
- data/lib/polar-accesslink-api-gem/api/webhooks_api.rb +278 -0
- data/lib/polar-accesslink-api-gem/api_client.rb +390 -0
- data/lib/polar-accesslink-api-gem/api_error.rb +57 -0
- data/lib/polar-accesslink-api-gem/configuration.rb +284 -0
- data/lib/polar-accesslink-api-gem/models/activity.rb +300 -0
- data/lib/polar-accesslink-api-gem/models/activity_log.rb +222 -0
- data/lib/polar-accesslink-api-gem/models/activity_step_sample.rb +230 -0
- data/lib/polar-accesslink-api-gem/models/activity_step_samples.rb +232 -0
- data/lib/polar-accesslink-api-gem/models/activity_zone_sample.rb +232 -0
- data/lib/polar-accesslink-api-gem/models/activity_zone_samples.rb +232 -0
- data/lib/polar-accesslink-api-gem/models/available_sleep.rb +239 -0
- data/lib/polar-accesslink-api-gem/models/available_sleeps.rb +221 -0
- data/lib/polar-accesslink-api-gem/models/available_user_data.rb +274 -0
- data/lib/polar-accesslink-api-gem/models/available_user_datas.rb +222 -0
- data/lib/polar-accesslink-api-gem/models/created_webhook.rb +218 -0
- data/lib/polar-accesslink-api-gem/models/created_webhook_data.rb +248 -0
- data/lib/polar-accesslink-api-gem/models/duration_zone.rb +230 -0
- data/lib/polar-accesslink-api-gem/models/error.rb +260 -0
- data/lib/polar-accesslink-api-gem/models/exercise.rb +399 -0
- data/lib/polar-accesslink-api-gem/models/exercise_hash_id.rb +389 -0
- data/lib/polar-accesslink-api-gem/models/exercises.rb +222 -0
- data/lib/polar-accesslink-api-gem/models/heart_rate.rb +230 -0
- data/lib/polar-accesslink-api-gem/models/nightly_recharge.rb +319 -0
- data/lib/polar-accesslink-api-gem/models/nights.rb +222 -0
- data/lib/polar-accesslink-api-gem/models/physical_information.rb +364 -0
- data/lib/polar-accesslink-api-gem/models/physical_informations.rb +222 -0
- data/lib/polar-accesslink-api-gem/models/recharges.rb +222 -0
- data/lib/polar-accesslink-api-gem/models/register.rb +225 -0
- data/lib/polar-accesslink-api-gem/models/sample.rb +240 -0
- data/lib/polar-accesslink-api-gem/models/samples.rb +222 -0
- data/lib/polar-accesslink-api-gem/models/sleep.rb +449 -0
- data/lib/polar-accesslink-api-gem/models/transaction_location.rb +230 -0
- data/lib/polar-accesslink-api-gem/models/user.rb +346 -0
- data/lib/polar-accesslink-api-gem/models/user_extra_info.rb +240 -0
- data/lib/polar-accesslink-api-gem/models/webhook_info.rb +218 -0
- data/lib/polar-accesslink-api-gem/models/webhook_info_data.rb +238 -0
- data/lib/polar-accesslink-api-gem/models/webhook_patch.rb +231 -0
- data/lib/polar-accesslink-api-gem/models/webhook_payload_exercise.rb +260 -0
- data/lib/polar-accesslink-api-gem/models/webhook_payload_sleep.rb +260 -0
- data/lib/polar-accesslink-api-gem/models/webhook_ping.rb +264 -0
- data/lib/polar-accesslink-api-gem/models/webhook_request.rb +241 -0
- data/lib/polar-accesslink-api-gem/models/webhook_type.rb +36 -0
- data/lib/polar-accesslink-api-gem/models/zone.rb +250 -0
- data/lib/polar-accesslink-api-gem/models/zones.rb +222 -0
- data/lib/polar-accesslink-api-gem/version.rb +15 -0
- data/lib/polar-accesslink-api-gem.rb +88 -0
- data/polar-accesslink-api-gem.gemspec +38 -0
- data/spec/api/daily_activity_api_spec.rb +114 -0
- data/spec/api/exercises_api_spec.rb +70 -0
- data/spec/api/nightly_recharge_api_spec.rb +58 -0
- data/spec/api/physical_info_api_spec.rb +87 -0
- data/spec/api/pull_notifications_api_spec.rb +46 -0
- data/spec/api/sleep_api_spec.rb +69 -0
- data/spec/api/training_data_api_spec.rb +173 -0
- data/spec/api/users_api_spec.rb +71 -0
- data/spec/api/webhooks_api_spec.rb +83 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/activity_log_spec.rb +34 -0
- data/spec/models/activity_spec.rb +82 -0
- data/spec/models/activity_step_sample_spec.rb +40 -0
- data/spec/models/activity_step_samples_spec.rb +40 -0
- data/spec/models/activity_zone_sample_spec.rb +40 -0
- data/spec/models/activity_zone_samples_spec.rb +40 -0
- data/spec/models/available_sleep_spec.rb +46 -0
- data/spec/models/available_sleeps_spec.rb +34 -0
- data/spec/models/available_user_data_spec.rb +50 -0
- data/spec/models/available_user_datas_spec.rb +34 -0
- data/spec/models/created_webhook_data_spec.rb +52 -0
- data/spec/models/created_webhook_spec.rb +34 -0
- data/spec/models/duration_zone_spec.rb +40 -0
- data/spec/models/error_spec.rb +58 -0
- data/spec/models/exercise_hash_id_spec.rb +136 -0
- data/spec/models/exercise_spec.rb +142 -0
- data/spec/models/exercises_spec.rb +34 -0
- data/spec/models/heart_rate_spec.rb +40 -0
- data/spec/models/nightly_recharge_spec.rb +94 -0
- data/spec/models/nights_spec.rb +34 -0
- data/spec/models/physical_information_spec.rb +104 -0
- data/spec/models/physical_informations_spec.rb +34 -0
- data/spec/models/recharges_spec.rb +34 -0
- data/spec/models/register_spec.rb +34 -0
- data/spec/models/sample_spec.rb +46 -0
- data/spec/models/samples_spec.rb +34 -0
- data/spec/models/sleep_spec.rb +172 -0
- data/spec/models/transaction_location_spec.rb +40 -0
- data/spec/models/user_extra_info_spec.rb +46 -0
- data/spec/models/user_spec.rb +92 -0
- data/spec/models/webhook_info_data_spec.rb +46 -0
- data/spec/models/webhook_info_spec.rb +34 -0
- data/spec/models/webhook_patch_spec.rb +40 -0
- data/spec/models/webhook_payload_exercise_spec.rb +58 -0
- data/spec/models/webhook_payload_sleep_spec.rb +58 -0
- data/spec/models/webhook_ping_spec.rb +44 -0
- data/spec/models/webhook_request_spec.rb +40 -0
- data/spec/models/webhook_type_spec.rb +28 -0
- data/spec/models/zone_spec.rb +52 -0
- data/spec/models/zones_spec.rb +34 -0
- data/spec/spec_helper.rb +111 -0
- metadata +295 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# PolarAccesslinkApiGem::NightlyRechargeApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://www.polaraccesslink.com*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**list_nightly_recharge**](NightlyRechargeApi.md#list_nightly_recharge) | **GET** /v3/users/nightly-recharge | List Nightly Recharges |
|
|
8
|
+
| [**v3_users_nightly_recharge_date_get**](NightlyRechargeApi.md#v3_users_nightly_recharge_date_get) | **GET** /v3/users/nightly-recharge/{date} | Get Nightly Recharge |
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## list_nightly_recharge
|
|
12
|
+
|
|
13
|
+
> <Recharges> list_nightly_recharge
|
|
14
|
+
|
|
15
|
+
List Nightly Recharges
|
|
16
|
+
|
|
17
|
+
List Nightly Recharge data of user for the last 28 days.
|
|
18
|
+
|
|
19
|
+
### Examples
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require 'time'
|
|
23
|
+
require 'polar-accesslink-api-gem'
|
|
24
|
+
# setup authorization
|
|
25
|
+
PolarAccesslinkApiGem.configure do |config|
|
|
26
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
|
27
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
api_instance = PolarAccesslinkApiGem::NightlyRechargeApi.new
|
|
31
|
+
|
|
32
|
+
begin
|
|
33
|
+
# List Nightly Recharges
|
|
34
|
+
result = api_instance.list_nightly_recharge
|
|
35
|
+
p result
|
|
36
|
+
rescue PolarAccesslinkApiGem::ApiError => e
|
|
37
|
+
puts "Error when calling NightlyRechargeApi->list_nightly_recharge: #{e}"
|
|
38
|
+
end
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
#### Using the list_nightly_recharge_with_http_info variant
|
|
42
|
+
|
|
43
|
+
This returns an Array which contains the response data, status code and headers.
|
|
44
|
+
|
|
45
|
+
> <Array(<Recharges>, Integer, Hash)> list_nightly_recharge_with_http_info
|
|
46
|
+
|
|
47
|
+
```ruby
|
|
48
|
+
begin
|
|
49
|
+
# List Nightly Recharges
|
|
50
|
+
data, status_code, headers = api_instance.list_nightly_recharge_with_http_info
|
|
51
|
+
p status_code # => 2xx
|
|
52
|
+
p headers # => { ... }
|
|
53
|
+
p data # => <Recharges>
|
|
54
|
+
rescue PolarAccesslinkApiGem::ApiError => e
|
|
55
|
+
puts "Error when calling NightlyRechargeApi->list_nightly_recharge_with_http_info: #{e}"
|
|
56
|
+
end
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Parameters
|
|
60
|
+
|
|
61
|
+
This endpoint does not need any parameter.
|
|
62
|
+
|
|
63
|
+
### Return type
|
|
64
|
+
|
|
65
|
+
[**Recharges**](Recharges.md)
|
|
66
|
+
|
|
67
|
+
### Authorization
|
|
68
|
+
|
|
69
|
+
[OAuth2](../README.md#OAuth2)
|
|
70
|
+
|
|
71
|
+
### HTTP request headers
|
|
72
|
+
|
|
73
|
+
- **Content-Type**: Not defined
|
|
74
|
+
- **Accept**: application/json
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
## v3_users_nightly_recharge_date_get
|
|
78
|
+
|
|
79
|
+
> <NightlyRecharge> v3_users_nightly_recharge_date_get(date)
|
|
80
|
+
|
|
81
|
+
Get Nightly Recharge
|
|
82
|
+
|
|
83
|
+
Get Users Nightly Recharge data for given date.
|
|
84
|
+
|
|
85
|
+
### Examples
|
|
86
|
+
|
|
87
|
+
```ruby
|
|
88
|
+
require 'time'
|
|
89
|
+
require 'polar-accesslink-api-gem'
|
|
90
|
+
# setup authorization
|
|
91
|
+
PolarAccesslinkApiGem.configure do |config|
|
|
92
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
|
93
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
api_instance = PolarAccesslinkApiGem::NightlyRechargeApi.new
|
|
97
|
+
date = 'date_example' # String | Date of Nightly Recharge as ISO-8601 date string, example: \"2020-01-01\"
|
|
98
|
+
|
|
99
|
+
begin
|
|
100
|
+
# Get Nightly Recharge
|
|
101
|
+
result = api_instance.v3_users_nightly_recharge_date_get(date)
|
|
102
|
+
p result
|
|
103
|
+
rescue PolarAccesslinkApiGem::ApiError => e
|
|
104
|
+
puts "Error when calling NightlyRechargeApi->v3_users_nightly_recharge_date_get: #{e}"
|
|
105
|
+
end
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
#### Using the v3_users_nightly_recharge_date_get_with_http_info variant
|
|
109
|
+
|
|
110
|
+
This returns an Array which contains the response data, status code and headers.
|
|
111
|
+
|
|
112
|
+
> <Array(<NightlyRecharge>, Integer, Hash)> v3_users_nightly_recharge_date_get_with_http_info(date)
|
|
113
|
+
|
|
114
|
+
```ruby
|
|
115
|
+
begin
|
|
116
|
+
# Get Nightly Recharge
|
|
117
|
+
data, status_code, headers = api_instance.v3_users_nightly_recharge_date_get_with_http_info(date)
|
|
118
|
+
p status_code # => 2xx
|
|
119
|
+
p headers # => { ... }
|
|
120
|
+
p data # => <NightlyRecharge>
|
|
121
|
+
rescue PolarAccesslinkApiGem::ApiError => e
|
|
122
|
+
puts "Error when calling NightlyRechargeApi->v3_users_nightly_recharge_date_get_with_http_info: #{e}"
|
|
123
|
+
end
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Parameters
|
|
127
|
+
|
|
128
|
+
| Name | Type | Description | Notes |
|
|
129
|
+
| ---- | ---- | ----------- | ----- |
|
|
130
|
+
| **date** | **String** | Date of Nightly Recharge as ISO-8601 date string, example: \"2020-01-01\" | |
|
|
131
|
+
|
|
132
|
+
### Return type
|
|
133
|
+
|
|
134
|
+
[**NightlyRecharge**](NightlyRecharge.md)
|
|
135
|
+
|
|
136
|
+
### Authorization
|
|
137
|
+
|
|
138
|
+
[OAuth2](../README.md#OAuth2)
|
|
139
|
+
|
|
140
|
+
### HTTP request headers
|
|
141
|
+
|
|
142
|
+
- **Content-Type**: Not defined
|
|
143
|
+
- **Accept**: application/json
|
|
144
|
+
|
data/docs/Nights.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# PolarAccesslinkApiGem::Nights
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **nights** | [**Array<Sleep>**](Sleep.md) | List of sleep objects | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'polar-accesslink-api-gem'
|
|
13
|
+
|
|
14
|
+
instance = PolarAccesslinkApiGem::Nights.new(
|
|
15
|
+
nights: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
# PolarAccesslinkApiGem::PhysicalInfoApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://www.polaraccesslink.com*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**commit_physical_info_transaction**](PhysicalInfoApi.md#commit_physical_info_transaction) | **PUT** /v3/users/{user-id}/physical-information-transactions/{transaction-id} | Commit transaction |
|
|
8
|
+
| [**create_physical_info_transaction**](PhysicalInfoApi.md#create_physical_info_transaction) | **POST** /v3/users/{user-id}/physical-information-transactions | Create transaction |
|
|
9
|
+
| [**get_physical_info**](PhysicalInfoApi.md#get_physical_info) | **GET** /v3/users/{user-id}/physical-information-transactions/{transaction-id}/physical-informations/{physical-info-id} | Get physical info |
|
|
10
|
+
| [**list_physical_infos**](PhysicalInfoApi.md#list_physical_infos) | **GET** /v3/users/{user-id}/physical-information-transactions/{transaction-id} | List physical infos |
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## commit_physical_info_transaction
|
|
14
|
+
|
|
15
|
+
> commit_physical_info_transaction(transaction_id, user_id)
|
|
16
|
+
|
|
17
|
+
Commit transaction
|
|
18
|
+
|
|
19
|
+
After successfully retrieving physical information within a transaction, partners are expected to commit the transaction.
|
|
20
|
+
|
|
21
|
+
### Examples
|
|
22
|
+
|
|
23
|
+
```ruby
|
|
24
|
+
require 'time'
|
|
25
|
+
require 'polar-accesslink-api-gem'
|
|
26
|
+
# setup authorization
|
|
27
|
+
PolarAccesslinkApiGem.configure do |config|
|
|
28
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
|
29
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
api_instance = PolarAccesslinkApiGem::PhysicalInfoApi.new
|
|
33
|
+
transaction_id = 789 # Integer | Transaction identifier
|
|
34
|
+
user_id = 56 # Integer | User identifier
|
|
35
|
+
|
|
36
|
+
begin
|
|
37
|
+
# Commit transaction
|
|
38
|
+
api_instance.commit_physical_info_transaction(transaction_id, user_id)
|
|
39
|
+
rescue PolarAccesslinkApiGem::ApiError => e
|
|
40
|
+
puts "Error when calling PhysicalInfoApi->commit_physical_info_transaction: #{e}"
|
|
41
|
+
end
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
#### Using the commit_physical_info_transaction_with_http_info variant
|
|
45
|
+
|
|
46
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
47
|
+
|
|
48
|
+
> <Array(nil, Integer, Hash)> commit_physical_info_transaction_with_http_info(transaction_id, user_id)
|
|
49
|
+
|
|
50
|
+
```ruby
|
|
51
|
+
begin
|
|
52
|
+
# Commit transaction
|
|
53
|
+
data, status_code, headers = api_instance.commit_physical_info_transaction_with_http_info(transaction_id, user_id)
|
|
54
|
+
p status_code # => 2xx
|
|
55
|
+
p headers # => { ... }
|
|
56
|
+
p data # => nil
|
|
57
|
+
rescue PolarAccesslinkApiGem::ApiError => e
|
|
58
|
+
puts "Error when calling PhysicalInfoApi->commit_physical_info_transaction_with_http_info: #{e}"
|
|
59
|
+
end
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Parameters
|
|
63
|
+
|
|
64
|
+
| Name | Type | Description | Notes |
|
|
65
|
+
| ---- | ---- | ----------- | ----- |
|
|
66
|
+
| **transaction_id** | **Integer** | Transaction identifier | |
|
|
67
|
+
| **user_id** | **Integer** | User identifier | |
|
|
68
|
+
|
|
69
|
+
### Return type
|
|
70
|
+
|
|
71
|
+
nil (empty response body)
|
|
72
|
+
|
|
73
|
+
### Authorization
|
|
74
|
+
|
|
75
|
+
[OAuth2](../README.md#OAuth2)
|
|
76
|
+
|
|
77
|
+
### HTTP request headers
|
|
78
|
+
|
|
79
|
+
- **Content-Type**: Not defined
|
|
80
|
+
- **Accept**: Not defined
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## create_physical_info_transaction
|
|
84
|
+
|
|
85
|
+
> <TransactionLocation> create_physical_info_transaction(user_id)
|
|
86
|
+
|
|
87
|
+
Create transaction
|
|
88
|
+
|
|
89
|
+
Initiate physical info transaction. Check for new physical info and create a new transaction if found.
|
|
90
|
+
|
|
91
|
+
### Examples
|
|
92
|
+
|
|
93
|
+
```ruby
|
|
94
|
+
require 'time'
|
|
95
|
+
require 'polar-accesslink-api-gem'
|
|
96
|
+
# setup authorization
|
|
97
|
+
PolarAccesslinkApiGem.configure do |config|
|
|
98
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
|
99
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
api_instance = PolarAccesslinkApiGem::PhysicalInfoApi.new
|
|
103
|
+
user_id = 56 # Integer | User identifier
|
|
104
|
+
|
|
105
|
+
begin
|
|
106
|
+
# Create transaction
|
|
107
|
+
result = api_instance.create_physical_info_transaction(user_id)
|
|
108
|
+
p result
|
|
109
|
+
rescue PolarAccesslinkApiGem::ApiError => e
|
|
110
|
+
puts "Error when calling PhysicalInfoApi->create_physical_info_transaction: #{e}"
|
|
111
|
+
end
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
#### Using the create_physical_info_transaction_with_http_info variant
|
|
115
|
+
|
|
116
|
+
This returns an Array which contains the response data, status code and headers.
|
|
117
|
+
|
|
118
|
+
> <Array(<TransactionLocation>, Integer, Hash)> create_physical_info_transaction_with_http_info(user_id)
|
|
119
|
+
|
|
120
|
+
```ruby
|
|
121
|
+
begin
|
|
122
|
+
# Create transaction
|
|
123
|
+
data, status_code, headers = api_instance.create_physical_info_transaction_with_http_info(user_id)
|
|
124
|
+
p status_code # => 2xx
|
|
125
|
+
p headers # => { ... }
|
|
126
|
+
p data # => <TransactionLocation>
|
|
127
|
+
rescue PolarAccesslinkApiGem::ApiError => e
|
|
128
|
+
puts "Error when calling PhysicalInfoApi->create_physical_info_transaction_with_http_info: #{e}"
|
|
129
|
+
end
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Parameters
|
|
133
|
+
|
|
134
|
+
| Name | Type | Description | Notes |
|
|
135
|
+
| ---- | ---- | ----------- | ----- |
|
|
136
|
+
| **user_id** | **Integer** | User identifier | |
|
|
137
|
+
|
|
138
|
+
### Return type
|
|
139
|
+
|
|
140
|
+
[**TransactionLocation**](TransactionLocation.md)
|
|
141
|
+
|
|
142
|
+
### Authorization
|
|
143
|
+
|
|
144
|
+
[OAuth2](../README.md#OAuth2)
|
|
145
|
+
|
|
146
|
+
### HTTP request headers
|
|
147
|
+
|
|
148
|
+
- **Content-Type**: Not defined
|
|
149
|
+
- **Accept**: application/json, application/xml
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
## get_physical_info
|
|
153
|
+
|
|
154
|
+
> <PhysicalInformation> get_physical_info(user_id, transaction_id, physical_info_id)
|
|
155
|
+
|
|
156
|
+
Get physical info
|
|
157
|
+
|
|
158
|
+
Get physical info entity data
|
|
159
|
+
|
|
160
|
+
### Examples
|
|
161
|
+
|
|
162
|
+
```ruby
|
|
163
|
+
require 'time'
|
|
164
|
+
require 'polar-accesslink-api-gem'
|
|
165
|
+
# setup authorization
|
|
166
|
+
PolarAccesslinkApiGem.configure do |config|
|
|
167
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
|
168
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
api_instance = PolarAccesslinkApiGem::PhysicalInfoApi.new
|
|
172
|
+
user_id = 56 # Integer | User identifier
|
|
173
|
+
transaction_id = 56 # Integer | Transaction identifier
|
|
174
|
+
physical_info_id = 56 # Integer | Physical information identifier
|
|
175
|
+
|
|
176
|
+
begin
|
|
177
|
+
# Get physical info
|
|
178
|
+
result = api_instance.get_physical_info(user_id, transaction_id, physical_info_id)
|
|
179
|
+
p result
|
|
180
|
+
rescue PolarAccesslinkApiGem::ApiError => e
|
|
181
|
+
puts "Error when calling PhysicalInfoApi->get_physical_info: #{e}"
|
|
182
|
+
end
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
#### Using the get_physical_info_with_http_info variant
|
|
186
|
+
|
|
187
|
+
This returns an Array which contains the response data, status code and headers.
|
|
188
|
+
|
|
189
|
+
> <Array(<PhysicalInformation>, Integer, Hash)> get_physical_info_with_http_info(user_id, transaction_id, physical_info_id)
|
|
190
|
+
|
|
191
|
+
```ruby
|
|
192
|
+
begin
|
|
193
|
+
# Get physical info
|
|
194
|
+
data, status_code, headers = api_instance.get_physical_info_with_http_info(user_id, transaction_id, physical_info_id)
|
|
195
|
+
p status_code # => 2xx
|
|
196
|
+
p headers # => { ... }
|
|
197
|
+
p data # => <PhysicalInformation>
|
|
198
|
+
rescue PolarAccesslinkApiGem::ApiError => e
|
|
199
|
+
puts "Error when calling PhysicalInfoApi->get_physical_info_with_http_info: #{e}"
|
|
200
|
+
end
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Parameters
|
|
204
|
+
|
|
205
|
+
| Name | Type | Description | Notes |
|
|
206
|
+
| ---- | ---- | ----------- | ----- |
|
|
207
|
+
| **user_id** | **Integer** | User identifier | |
|
|
208
|
+
| **transaction_id** | **Integer** | Transaction identifier | |
|
|
209
|
+
| **physical_info_id** | **Integer** | Physical information identifier | |
|
|
210
|
+
|
|
211
|
+
### Return type
|
|
212
|
+
|
|
213
|
+
[**PhysicalInformation**](PhysicalInformation.md)
|
|
214
|
+
|
|
215
|
+
### Authorization
|
|
216
|
+
|
|
217
|
+
[OAuth2](../README.md#OAuth2)
|
|
218
|
+
|
|
219
|
+
### HTTP request headers
|
|
220
|
+
|
|
221
|
+
- **Content-Type**: Not defined
|
|
222
|
+
- **Accept**: application/json, application/xml
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
## list_physical_infos
|
|
226
|
+
|
|
227
|
+
> <PhysicalInformations> list_physical_infos(transaction_id, user_id)
|
|
228
|
+
|
|
229
|
+
List physical infos
|
|
230
|
+
|
|
231
|
+
List new physical info data. After successfully initiating a transaction, physical infos included within it can be retrieved with the provided transactionId.
|
|
232
|
+
|
|
233
|
+
### Examples
|
|
234
|
+
|
|
235
|
+
```ruby
|
|
236
|
+
require 'time'
|
|
237
|
+
require 'polar-accesslink-api-gem'
|
|
238
|
+
# setup authorization
|
|
239
|
+
PolarAccesslinkApiGem.configure do |config|
|
|
240
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
|
241
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
api_instance = PolarAccesslinkApiGem::PhysicalInfoApi.new
|
|
245
|
+
transaction_id = 789 # Integer | Transaction identifier
|
|
246
|
+
user_id = 56 # Integer | User identifier
|
|
247
|
+
|
|
248
|
+
begin
|
|
249
|
+
# List physical infos
|
|
250
|
+
result = api_instance.list_physical_infos(transaction_id, user_id)
|
|
251
|
+
p result
|
|
252
|
+
rescue PolarAccesslinkApiGem::ApiError => e
|
|
253
|
+
puts "Error when calling PhysicalInfoApi->list_physical_infos: #{e}"
|
|
254
|
+
end
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
#### Using the list_physical_infos_with_http_info variant
|
|
258
|
+
|
|
259
|
+
This returns an Array which contains the response data, status code and headers.
|
|
260
|
+
|
|
261
|
+
> <Array(<PhysicalInformations>, Integer, Hash)> list_physical_infos_with_http_info(transaction_id, user_id)
|
|
262
|
+
|
|
263
|
+
```ruby
|
|
264
|
+
begin
|
|
265
|
+
# List physical infos
|
|
266
|
+
data, status_code, headers = api_instance.list_physical_infos_with_http_info(transaction_id, user_id)
|
|
267
|
+
p status_code # => 2xx
|
|
268
|
+
p headers # => { ... }
|
|
269
|
+
p data # => <PhysicalInformations>
|
|
270
|
+
rescue PolarAccesslinkApiGem::ApiError => e
|
|
271
|
+
puts "Error when calling PhysicalInfoApi->list_physical_infos_with_http_info: #{e}"
|
|
272
|
+
end
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Parameters
|
|
276
|
+
|
|
277
|
+
| Name | Type | Description | Notes |
|
|
278
|
+
| ---- | ---- | ----------- | ----- |
|
|
279
|
+
| **transaction_id** | **Integer** | Transaction identifier | |
|
|
280
|
+
| **user_id** | **Integer** | User identifier | |
|
|
281
|
+
|
|
282
|
+
### Return type
|
|
283
|
+
|
|
284
|
+
[**PhysicalInformations**](PhysicalInformations.md)
|
|
285
|
+
|
|
286
|
+
### Authorization
|
|
287
|
+
|
|
288
|
+
[OAuth2](../README.md#OAuth2)
|
|
289
|
+
|
|
290
|
+
### HTTP request headers
|
|
291
|
+
|
|
292
|
+
- **Content-Type**: Not defined
|
|
293
|
+
- **Accept**: application/json, application/xml
|
|
294
|
+
|