Class: TreezorClient::CardDigitalizationsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/treezor_client/api/card_digitalizations_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CardDigitalizationsApi

Returns a new instance of CardDigitalizationsApi.


19
20
21
# File 'lib/treezor_client/api/card_digitalizations_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/treezor_client/api/card_digitalizations_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#card_digitalizations_id(id, opts = {}) ⇒ InlineResponse2007

Get a card digitalizations based on its internal id Get a card digitalizations based on its internal id

Parameters:

  • id

    Card digitalization internal id.

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

    the optional parameters

Options Hash (opts):

  • :fields (String)

    fields to output separated by commas. Possible fields are id, externalId, cardId, detailsFromGPS, status, createdDate, modifiedDate

Returns:


28
29
30
31
# File 'lib/treezor_client/api/card_digitalizations_api.rb', line 28

def card_digitalizations_id(id, opts = {})
  data, _status_code, _headers = card_digitalizations_id_with_http_info(id, opts)
  data
end

#card_digitalizations_id_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse2007, Fixnum, Hash)>

Get a card digitalizations based on its internal id Get a card digitalizations based on its internal id

Parameters:

  • id

    Card digitalization internal id.

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

    the optional parameters

Options Hash (opts):

  • :fields (String)

    fields to output separated by commas. Possible fields are id, externalId, cardId, detailsFromGPS, status, createdDate, modifiedDate

Returns:

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

    InlineResponse2007 data, 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
77
78
# File 'lib/treezor_client/api/card_digitalizations_api.rb', line 39

def card_digitalizations_id_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CardDigitalizationsApi.card_digitalizations_id ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CardDigitalizationsApi.card_digitalizations_id"
  end
  # resource path
  local_var_path = '/cardDigitalizations/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  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,
    :return_type => 'InlineResponse2007')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CardDigitalizationsApi#card_digitalizations_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#deletecard_digitalizations_id(id, reason_code, opts = {}) ⇒ InlineResponse2007

Deletes a payment Token Deletes a payment Token

Parameters:

  • id

    Card digitalization internal id.

  • reason_code

    The reason code for the action. Possible values are : | Reason code | Description | | —- | ———– | | L | Cardholder confirmed token device lost | | S | Cardholder confirmed token device stolen | | F | Issuer or cardholder confirmed fraudulent token transactions (Deprecated) | | T | Issuer or cardholder confirmed fraudulent token transactions | | C | Account closed | | Z | Other |

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

    the optional parameters

Returns:


85
86
87
88
# File 'lib/treezor_client/api/card_digitalizations_api.rb', line 85

def deletecard_digitalizations_id(id, reason_code, opts = {})
  data, _status_code, _headers = deletecard_digitalizations_id_with_http_info(id, reason_code, opts)
  data
end

#deletecard_digitalizations_id_with_http_info(id, reason_code, opts = {}) ⇒ Array<(InlineResponse2007, Fixnum, Hash)>

Deletes a payment Token Deletes a payment Token

Parameters:

  • id

    Card digitalization internal id.

  • reason_code

    The reason code for the action. Possible values are : | Reason code | Description | | —- | ———– | | L | Cardholder confirmed token device lost | | S | Cardholder confirmed token device stolen | | F | Issuer or cardholder confirmed fraudulent token transactions (Deprecated) | | T | Issuer or cardholder confirmed fraudulent token transactions | | C | Account closed | | Z | Other |

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

    the optional parameters

Returns:

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

    InlineResponse2007 data, response status code and response headers


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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/treezor_client/api/card_digitalizations_api.rb', line 96

def deletecard_digitalizations_id_with_http_info(id, reason_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CardDigitalizationsApi.deletecard_digitalizations_id ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CardDigitalizationsApi.deletecard_digitalizations_id"
  end
  # verify the required parameter 'reason_code' is set
  if @api_client.config.client_side_validation && reason_code.nil?
    fail ArgumentError, "Missing the required parameter 'reason_code' when calling CardDigitalizationsApi.deletecard_digitalizations_id"
  end
  # resource path
  local_var_path = '/cardDigitalizations/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}
  query_params[:'reasonCode'] = reason_code

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

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

#putcard_digitalizations_id(id, status, reason_code, opts = {}) ⇒ InlineResponse2007

Update the status of a payment Token Update the status of a payment Token

Parameters:

  • id

    Card digitalization internal id.

  • status

    The new status for the payment Token. Possible values are : | Status | Description | | —- | ———– | | unsuspend | Unsuspend | | suspend | Suspend |

  • reason_code

    The reason code for the action. Possible values are : - For a suspension : | Reason code | Description | | —- | ———– | | L | Cardholder confirmed token device lost | | S | Cardholder confirmed token device stolen | | T | Issuer or cardholder confirmed fraudulent token transactions | | Z | Other | - For an unsuspension : | Reason code | Description | | —- | ———– | | F | Cardholder reported token device found or not stolen | | T | Issuer or cardholder confirmed no fraudulent token transactions | | Z | Other |

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

    the optional parameters

Returns:


147
148
149
150
# File 'lib/treezor_client/api/card_digitalizations_api.rb', line 147

def putcard_digitalizations_id(id, status, reason_code, opts = {})
  data, _status_code, _headers = putcard_digitalizations_id_with_http_info(id, status, reason_code, opts)
  data
end

#putcard_digitalizations_id_with_http_info(id, status, reason_code, opts = {}) ⇒ Array<(InlineResponse2007, Fixnum, Hash)>

Update the status of a payment Token Update the status of a payment Token

Parameters:

  • id

    Card digitalization internal id.

  • status

    The new status for the payment Token. Possible values are : | Status | Description | | —- | ———– | | unsuspend | Unsuspend | | suspend | Suspend |

  • reason_code

    The reason code for the action. Possible values are : - For a suspension : | Reason code | Description | | —- | ———– | | L | Cardholder confirmed token device lost | | S | Cardholder confirmed token device stolen | | T | Issuer or cardholder confirmed fraudulent token transactions | | Z | Other | - For an unsuspension : | Reason code | Description | | —- | ———– | | F | Cardholder reported token device found or not stolen | | T | Issuer or cardholder confirmed no fraudulent token transactions | | Z | Other |

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

    the optional parameters

Returns:

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

    InlineResponse2007 data, response status code and response headers


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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# File 'lib/treezor_client/api/card_digitalizations_api.rb', line 159

def putcard_digitalizations_id_with_http_info(id, status, reason_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CardDigitalizationsApi.putcard_digitalizations_id ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CardDigitalizationsApi.putcard_digitalizations_id"
  end
  # verify the required parameter 'status' is set
  if @api_client.config.client_side_validation && status.nil?
    fail ArgumentError, "Missing the required parameter 'status' when calling CardDigitalizationsApi.putcard_digitalizations_id"
  end
  # verify the required parameter 'reason_code' is set
  if @api_client.config.client_side_validation && reason_code.nil?
    fail ArgumentError, "Missing the required parameter 'reason_code' when calling CardDigitalizationsApi.putcard_digitalizations_id"
  end
  # resource path
  local_var_path = '/cardDigitalizations/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}
  query_params[:'status'] = status
  query_params[:'reasonCode'] = reason_code

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  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,
    :return_type => 'InlineResponse2007')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CardDigitalizationsApi#putcard_digitalizations_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#readcard_digitalizations(opts = {}) ⇒ InlineResponse2007

search for card digitalizations Search for card digitalizations.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :access_signature (String)

    Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](agent.treezor.com/security-authentication).

  • :access_tag (String)

    Access tag is used for idem potency query. More info [here](agent.treezor.com/basics).

  • :access_user_id (Integer)

    Access user&#39;s id is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics).

  • :access_user_ip (String)

    Access user&#39;s ip is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics).

  • :filter (String)

    Filterable fields are : - id - externalId - cardId - status - detailsFromGPS - createdDate - modifiedDate More info [here](agent.treezor.com/filterv2).

  • :fields (String)

    fields to output separated by commas. Possible fields are id, externalId, cardId, detailsFromGPS, status, createdDate, modifiedDate

Returns:


218
219
220
221
# File 'lib/treezor_client/api/card_digitalizations_api.rb', line 218

def readcard_digitalizations(opts = {})
  data, _status_code, _headers = readcard_digitalizations_with_http_info(opts)
  data
end

#readcard_digitalizations_with_http_info(opts = {}) ⇒ Array<(InlineResponse2007, Fixnum, Hash)>

search for card digitalizations Search for card digitalizations.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :access_signature (String)

    Access signature can be mandatory for specific context. Treezor will contact you if so. More info [here](agent.treezor.com/security-authentication).

  • :access_tag (String)

    Access tag is used for idem potency query. More info [here](agent.treezor.com/basics).

  • :access_user_id (Integer)

    Access user&#39;s id is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics).

  • :access_user_ip (String)

    Access user&#39;s ip is used for user&#39;s action restriction. More info [here](agent.treezor.com/basics).

  • :filter (String)

    Filterable fields are : - id - externalId - cardId - status - detailsFromGPS - createdDate - modifiedDate More info [here](agent.treezor.com/filterv2).

  • :fields (String)

    fields to output separated by commas. Possible fields are id, externalId, cardId, detailsFromGPS, status, createdDate, modifiedDate

Returns:

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

    InlineResponse2007 data, response status code and response headers


233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
# File 'lib/treezor_client/api/card_digitalizations_api.rb', line 233

def readcard_digitalizations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CardDigitalizationsApi.readcard_digitalizations ...'
  end
  # resource path
  local_var_path = '/cardDigitalizations'

  # query parameters
  query_params = {}
  query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil?
  query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil?
  query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil?
  query_params[:'accessUserIp'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil?
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['api_key']
  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,
    :return_type => 'InlineResponse2007')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CardDigitalizationsApi#readcard_digitalizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end