Class: Bfwd::CybersourcetokensApi

Inherits:
Object
  • Object
show all
Defined in:
lib/bf_ruby2/api/cybersourcetokens_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CybersourcetokensApi

Returns a new instance of CybersourcetokensApi.



19
20
21
# File 'lib/bf_ruby2/api/cybersourcetokens_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/bf_ruby2/api/cybersourcetokens_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_cybersource_token(cybersource_token, opts = {}) ⇒ CybersourceTokenPagedMetadata

Create a cybersource-token. a cybersource-token","request":"createCybersourceTokenRequest.html","response":"createCybersourceTokenResponse.html"

Parameters:

  • cybersource_token

    The cybersource-token object to be created.

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

    the optional parameters

Returns:



28
29
30
31
# File 'lib/bf_ruby2/api/cybersourcetokens_api.rb', line 28

def create_cybersource_token(cybersource_token, opts = {})
  data, _status_code, _headers = create_cybersource_token_with_http_info(cybersource_token, opts)
  return data
end

#create_cybersource_token_with_http_info(cybersource_token, opts = {}) ⇒ Array<(CybersourceTokenPagedMetadata, Fixnum, Hash)>

Create a cybersource-token. a cybersource-token&quot;,&quot;request&quot;:&quot;createCybersourceTokenRequest.html&quot;,&quot;response&quot;:&quot;createCybersourceTokenResponse.html&quot;

Parameters:

  • cybersource_token

    The cybersource-token object to be created.

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

    the optional parameters

Returns:



38
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/bf_ruby2/api/cybersourcetokens_api.rb', line 38

def create_cybersource_token_with_http_info(cybersource_token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CybersourcetokensApi.create_cybersource_token ..."
  end
  # verify the required parameter 'cybersource_token' is set
  if @api_client.config.client_side_validation && cybersource_token.nil?
    fail ArgumentError, "Missing the required parameter 'cybersource_token' when calling CybersourcetokensApi.create_cybersource_token"
  end
  # resource path
  local_var_path = "/cybersource-tokens"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/xml', 'application/xml', 'application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(cybersource_token)
  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,
    :return_type => 'CybersourceTokenPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CybersourcetokensApi#create_cybersource_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_cybersource_token_by_id(token_id, opts = {}) ⇒ CybersourceTokenPagedMetadata

Returns a single cybersource-token, specified by the token-ID parameter. Bfwd::CybersourcetokensApi."nickname":"NICKNAME","response":"getCybersourceTokenByID"nickname":"NICKNAME","response":"getCybersourceTokenByID.html"

Parameters:

  • token_id

    The unique sting ID of the cybersource token.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

Returns:



84
85
86
87
# File 'lib/bf_ruby2/api/cybersourcetokens_api.rb', line 84

def get_cybersource_token_by_id(token_id, opts = {})
  data, _status_code, _headers = get_cybersource_token_by_id_with_http_info(token_id, opts)
  return data
end

#get_cybersource_token_by_id_with_http_info(token_id, opts = {}) ⇒ Array<(CybersourceTokenPagedMetadata, Fixnum, Hash)>

Returns a single cybersource-token, specified by the token-ID parameter. Bfwd::CybersourcetokensApi.&quot;nickname&quot;:&quot;NICKNAME&quot;,&quot;response&quot;:&quot;getCybersourceTokenByID&quot;nickname&quot;:&quot;NICKNAME&quot;,&quot;response&quot;:&quot;getCybersourceTokenByID.html&quot;

Parameters:

  • token_id

    The unique sting ID of the cybersource token.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

Returns:



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
126
127
128
129
130
131
132
133
134
# File 'lib/bf_ruby2/api/cybersourcetokens_api.rb', line 95

def get_cybersource_token_by_id_with_http_info(token_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CybersourcetokensApi.get_cybersource_token_by_id ..."
  end
  # verify the required parameter 'token_id' is set
  if @api_client.config.client_side_validation && token_id.nil?
    fail ArgumentError, "Missing the required parameter 'token_id' when calling CybersourcetokensApi.get_cybersource_token_by_id"
  end
  # resource path
  local_var_path = "/cybersource-tokens/{token-ID}".sub('{' + 'token-ID' + '}', token_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?

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

  # 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,
    :return_type => 'CybersourceTokenPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CybersourcetokensApi#get_cybersource_token_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_cybersource_token_by_recurring_subscription_id(recurring_subscription_id, opts = {}) ⇒ CybersourceTokenPagedMetadata

Returns a single cybersource-token, specified by the recurring-subscription-ID parameter. Bfwd::CybersourcetokensApi."nickname":"NICKNAME","response":"getCybersourceTokenByID"nickname":"NICKNAME","response":"getCybersourceTokenByID.html"

Parameters:

  • recurring_subscription_id

    The recurring-subscription-info-subscription-ID of the cybersource token.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

Returns:



142
143
144
145
# File 'lib/bf_ruby2/api/cybersourcetokens_api.rb', line 142

def get_cybersource_token_by_recurring_subscription_id(recurring_subscription_id, opts = {})
  data, _status_code, _headers = get_cybersource_token_by_recurring_subscription_id_with_http_info(recurring_subscription_id, opts)
  return data
end

#get_cybersource_token_by_recurring_subscription_id_with_http_info(recurring_subscription_id, opts = {}) ⇒ Array<(CybersourceTokenPagedMetadata, Fixnum, Hash)>

Returns a single cybersource-token, specified by the recurring-subscription-ID parameter. Bfwd::CybersourcetokensApi.&quot;nickname&quot;:&quot;NICKNAME&quot;,&quot;response&quot;:&quot;getCybersourceTokenByID&quot;nickname&quot;:&quot;NICKNAME&quot;,&quot;response&quot;:&quot;getCybersourceTokenByID.html&quot;

Parameters:

  • recurring_subscription_id

    The recurring-subscription-info-subscription-ID of the cybersource token.

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

    the optional parameters

Options Hash (opts):

  • :organizations (Array<String>)

    A list of organization-IDs used to restrict the scope of API calls.

Returns:



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
187
188
189
190
191
192
# File 'lib/bf_ruby2/api/cybersourcetokens_api.rb', line 153

def get_cybersource_token_by_recurring_subscription_id_with_http_info(recurring_subscription_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CybersourcetokensApi.get_cybersource_token_by_recurring_subscription_id ..."
  end
  # verify the required parameter 'recurring_subscription_id' is set
  if @api_client.config.client_side_validation && recurring_subscription_id.nil?
    fail ArgumentError, "Missing the required parameter 'recurring_subscription_id' when calling CybersourcetokensApi.get_cybersource_token_by_recurring_subscription_id"
  end
  # resource path
  local_var_path = "/cybersource-tokens/recurring-subscription-info/{recurring-subscription-ID}".sub('{' + 'recurring-subscription-ID' + '}', recurring_subscription_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil?

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

  # 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,
    :return_type => 'CybersourceTokenPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CybersourcetokensApi#get_cybersource_token_by_recurring_subscription_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#retire_cybersource_token(token_id, organizations, opts = {}) ⇒ CybersourceTokenPagedMetadata

Retires the cybersource token specified by the token-ID parameter. Bfwd::CybersourcetokensApi."nickname":"NICKNAME","response":"deleteCybersourceToken"nickname":"NICKNAME","response":"deleteCybersourceToken.html"

Parameters:

  • token_id

    ID of the cybersource-token.

  • organizations

    A list of organization-IDs used to restrict the scope of API calls.

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

    the optional parameters

Returns:



200
201
202
203
# File 'lib/bf_ruby2/api/cybersourcetokens_api.rb', line 200

def retire_cybersource_token(token_id, organizations, opts = {})
  data, _status_code, _headers = retire_cybersource_token_with_http_info(token_id, organizations, opts)
  return data
end

#retire_cybersource_token_with_http_info(token_id, organizations, opts = {}) ⇒ Array<(CybersourceTokenPagedMetadata, Fixnum, Hash)>

Retires the cybersource token specified by the token-ID parameter. Bfwd::CybersourcetokensApi.&quot;nickname&quot;:&quot;NICKNAME&quot;,&quot;response&quot;:&quot;deleteCybersourceToken&quot;nickname&quot;:&quot;NICKNAME&quot;,&quot;response&quot;:&quot;deleteCybersourceToken.html&quot;

Parameters:

  • token_id

    ID of the cybersource-token.

  • organizations

    A list of organization-IDs used to restrict the scope of API calls.

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

    the optional parameters

Returns:



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
242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'lib/bf_ruby2/api/cybersourcetokens_api.rb', line 211

def retire_cybersource_token_with_http_info(token_id, organizations, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CybersourcetokensApi.retire_cybersource_token ..."
  end
  # verify the required parameter 'token_id' is set
  if @api_client.config.client_side_validation && token_id.nil?
    fail ArgumentError, "Missing the required parameter 'token_id' when calling CybersourcetokensApi.retire_cybersource_token"
  end
  # verify the required parameter 'organizations' is set
  if @api_client.config.client_side_validation && organizations.nil?
    fail ArgumentError, "Missing the required parameter 'organizations' when calling CybersourcetokensApi.retire_cybersource_token"
  end
  # resource path
  local_var_path = "/cybersource-tokens/{token-ID}".sub('{' + 'token-ID' + '}', token_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'organizations'] = @api_client.build_collection_param(organizations, :multi)

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

  # form parameters
  form_params = {}

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

#update_cybersource_token(cybersource_token, opts = {}) ⇒ CybersourceTokenPagedMetadata

Update a cybersource-token. a cybersource-token","request":"updateCybersourceTokenRequest.html","response":"updateCybersourceTokenResponse.html"

Parameters:

  • cybersource_token

    The cybersource-token object to be updated.

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

    the optional parameters

Returns:



261
262
263
264
# File 'lib/bf_ruby2/api/cybersourcetokens_api.rb', line 261

def update_cybersource_token(cybersource_token, opts = {})
  data, _status_code, _headers = update_cybersource_token_with_http_info(cybersource_token, opts)
  return data
end

#update_cybersource_token_with_http_info(cybersource_token, opts = {}) ⇒ Array<(CybersourceTokenPagedMetadata, Fixnum, Hash)>

Update a cybersource-token. a cybersource-token&quot;,&quot;request&quot;:&quot;updateCybersourceTokenRequest.html&quot;,&quot;response&quot;:&quot;updateCybersourceTokenResponse.html&quot;

Parameters:

  • cybersource_token

    The cybersource-token object to be updated.

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

    the optional parameters

Returns:



271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
# File 'lib/bf_ruby2/api/cybersourcetokens_api.rb', line 271

def update_cybersource_token_with_http_info(cybersource_token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CybersourcetokensApi.update_cybersource_token ..."
  end
  # verify the required parameter 'cybersource_token' is set
  if @api_client.config.client_side_validation && cybersource_token.nil?
    fail ArgumentError, "Missing the required parameter 'cybersource_token' when calling CybersourcetokensApi.update_cybersource_token"
  end
  # resource path
  local_var_path = "/cybersource-tokens"

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/xml', 'application/xml', 'application/json; charset=utf-8'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(cybersource_token)
  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,
    :return_type => 'CybersourceTokenPagedMetadata')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CybersourcetokensApi#update_cybersource_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end