Class: PolarAccesslink::PhysicalInfoApi

Inherits:
Object
  • Object
show all
Defined in:
lib/polar_accesslink/api/physical_info_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PhysicalInfoApi

Returns a new instance of PhysicalInfoApi.



19
20
21
# File 'lib/polar_accesslink/api/physical_info_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/polar_accesslink/api/physical_info_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#commit_physical_info_transaction(transaction_id, user_id, opts = {}) ⇒ nil

Commit transaction After successfully retrieving physical information within a transaction, partners are expected to commit the transaction.

Parameters:

  • transaction_id

    Transaction identifier

  • user_id

    User identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


28
29
30
31
# File 'lib/polar_accesslink/api/physical_info_api.rb', line 28

def commit_physical_info_transaction(transaction_id, user_id, opts = {})
  commit_physical_info_transaction_with_http_info(transaction_id, user_id, opts)
  nil
end

#commit_physical_info_transaction_with_http_info(transaction_id, user_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Commit transaction After successfully retrieving physical information within a transaction, partners are expected to commit the transaction.

Parameters:

  • transaction_id

    Transaction identifier

  • user_id

    User identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/polar_accesslink/api/physical_info_api.rb', line 39

def commit_physical_info_transaction_with_http_info(transaction_id, user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhysicalInfoApi.commit_physical_info_transaction ...'
  end
  # verify the required parameter 'transaction_id' is set
  if @api_client.config.client_side_validation && transaction_id.nil?
    fail ArgumentError, "Missing the required parameter 'transaction_id' when calling PhysicalInfoApi.commit_physical_info_transaction"
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling PhysicalInfoApi.commit_physical_info_transaction"
  end
  # resource path
  local_var_path = '/v3/users/{user-id}/physical-information-transactions/{transaction-id}'.sub('{' + 'transaction-id' + '}', transaction_id.to_s).sub('{' + 'user-id' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhysicalInfoApi#commit_physical_info_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_physical_info_transaction(user_id, opts = {}) ⇒ nil

Create transaction Initiate physical info transaction. Check for new physical info and create a new transaction if found.

Parameters:

  • user_id

    User identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


82
83
84
85
# File 'lib/polar_accesslink/api/physical_info_api.rb', line 82

def create_physical_info_transaction(user_id, opts = {})
  create_physical_info_transaction_with_http_info(user_id, opts)
  nil
end

#create_physical_info_transaction_with_http_info(user_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Create transaction Initiate physical info transaction. Check for new physical info and create a new transaction if found.

Parameters:

  • user_id

    User identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/polar_accesslink/api/physical_info_api.rb', line 92

def create_physical_info_transaction_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhysicalInfoApi.create_physical_info_transaction ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling PhysicalInfoApi.create_physical_info_transaction"
  end
  # resource path
  local_var_path = '/v3/users/{user-id}/physical-information-transactions'.sub('{' + 'user-id' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhysicalInfoApi#create_physical_info_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_physical_info(user_id, transaction_id, physical_info_id, opts = {}) ⇒ nil

Get physical info Get physical info entity data

Parameters:

  • user_id

    User identifier

  • transaction_id

    Transaction identifier

  • physical_info_id

    Physical information identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


133
134
135
136
# File 'lib/polar_accesslink/api/physical_info_api.rb', line 133

def get_physical_info(user_id, transaction_id, physical_info_id, opts = {})
  get_physical_info_with_http_info(user_id, transaction_id, physical_info_id, opts)
  nil
end

#get_physical_info_with_http_info(user_id, transaction_id, physical_info_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Get physical info Get physical info entity data

Parameters:

  • user_id

    User identifier

  • transaction_id

    Transaction identifier

  • physical_info_id

    Physical information identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/polar_accesslink/api/physical_info_api.rb', line 145

def get_physical_info_with_http_info(user_id, transaction_id, physical_info_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhysicalInfoApi.get_physical_info ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling PhysicalInfoApi.get_physical_info"
  end
  # verify the required parameter 'transaction_id' is set
  if @api_client.config.client_side_validation && transaction_id.nil?
    fail ArgumentError, "Missing the required parameter 'transaction_id' when calling PhysicalInfoApi.get_physical_info"
  end
  # verify the required parameter 'physical_info_id' is set
  if @api_client.config.client_side_validation && physical_info_id.nil?
    fail ArgumentError, "Missing the required parameter 'physical_info_id' when calling PhysicalInfoApi.get_physical_info"
  end
  # resource path
  local_var_path = '/v3/users/{user-id}/physical-information-transactions/{transaction-id}/physical-informations/{physical-info-id}'.sub('{' + 'user-id' + '}', user_id.to_s).sub('{' + 'transaction-id' + '}', transaction_id.to_s).sub('{' + 'physical-info-id' + '}', physical_info_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhysicalInfoApi#get_physical_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_physical_infos(transaction_id, user_id, opts = {}) ⇒ nil

List physical infos List new physical info data. After successfully initiating a transaction, physical infos included within it can be retrieved with the provided transactionId.

Parameters:

  • transaction_id

    Transaction identifier

  • user_id

    User identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


193
194
195
196
# File 'lib/polar_accesslink/api/physical_info_api.rb', line 193

def list_physical_infos(transaction_id, user_id, opts = {})
  list_physical_infos_with_http_info(transaction_id, user_id, opts)
  nil
end

#list_physical_infos_with_http_info(transaction_id, user_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

List physical infos List new physical info data. After successfully initiating a transaction, physical infos included within it can be retrieved with the provided transactionId.

Parameters:

  • transaction_id

    Transaction identifier

  • user_id

    User identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# File 'lib/polar_accesslink/api/physical_info_api.rb', line 204

def list_physical_infos_with_http_info(transaction_id, user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: PhysicalInfoApi.list_physical_infos ...'
  end
  # verify the required parameter 'transaction_id' is set
  if @api_client.config.client_side_validation && transaction_id.nil?
    fail ArgumentError, "Missing the required parameter 'transaction_id' when calling PhysicalInfoApi.list_physical_infos"
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling PhysicalInfoApi.list_physical_infos"
  end
  # resource path
  local_var_path = '/v3/users/{user-id}/physical-information-transactions/{transaction-id}'.sub('{' + 'transaction-id' + '}', transaction_id.to_s).sub('{' + 'user-id' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: PhysicalInfoApi#list_physical_infos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end