class OrderCloud::CreditCardApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/order_cloud/api/credit_card_api.rb, line 30
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

create(buyer_id, card, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param card @param [Hash] opts the optional parameters @return [CreditCard]

# File lib/order_cloud/api/credit_card_api.rb, line 40
def create(buyer_id, card, opts = {})
  data, _status_code, _headers = create_with_http_info(buyer_id, card, opts)
  return data
end
create_with_http_info(buyer_id, card, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param card @param [Hash] opts the optional parameters @return [Array<(CreditCard, Fixnum, Hash)>] CreditCard data, response status code and response headers

# File lib/order_cloud/api/credit_card_api.rb, line 51
def create_with_http_info(buyer_id, card, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CreditCardApi.create ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CreditCardApi.create" if buyer_id.nil?
  # verify the required parameter 'card' is set
  fail ArgumentError, "Missing the required parameter 'card' when calling CreditCardApi.create" if card.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/creditcards".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(card)
  auth_names = ['oauth2']
  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 => 'CreditCard')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreditCardApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete(buyer_id, credit_card_id, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param credit_card_id ID of the credit card. @param [Hash] opts the optional parameters @return [nil]

# File lib/order_cloud/api/credit_card_api.rb, line 101
def delete(buyer_id, credit_card_id, opts = {})
  delete_with_http_info(buyer_id, credit_card_id, opts)
  return nil
end
delete_assignment(buyer_id, credit_card_id, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param credit_card_id ID of the credit card. @param [Hash] opts the optional parameters @option opts [String] :user_id ID of the user. @option opts [String] :user_group_id ID of the user group. @return [nil]

# File lib/order_cloud/api/credit_card_api.rb, line 163
def delete_assignment(buyer_id, credit_card_id, opts = {})
  delete_assignment_with_http_info(buyer_id, credit_card_id, opts)
  return nil
end
delete_assignment_with_http_info(buyer_id, credit_card_id, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param credit_card_id ID of the credit card. @param [Hash] opts the optional parameters @option opts [String] :user_id ID of the user. @option opts [String] :user_group_id ID of the user group. @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/order_cloud/api/credit_card_api.rb, line 176
def delete_assignment_with_http_info(buyer_id, credit_card_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CreditCardApi.delete_assignment ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CreditCardApi.delete_assignment" if buyer_id.nil?
  # verify the required parameter 'credit_card_id' is set
  fail ArgumentError, "Missing the required parameter 'credit_card_id' when calling CreditCardApi.delete_assignment" if credit_card_id.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/creditcards/{creditCardID}/assignments".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'creditCardID' + '}', credit_card_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'userID'] = opts[:'user_id'] if !opts[:'user_id'].nil?
  query_params[:'userGroupID'] = opts[:'user_group_id'] if !opts[:'user_group_id'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreditCardApi#delete_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_with_http_info(buyer_id, credit_card_id, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param credit_card_id ID of the credit card. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/order_cloud/api/credit_card_api.rb, line 112
def delete_with_http_info(buyer_id, credit_card_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CreditCardApi.delete ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CreditCardApi.delete" if buyer_id.nil?
  # verify the required parameter 'credit_card_id' is set
  fail ArgumentError, "Missing the required parameter 'credit_card_id' when calling CreditCardApi.delete" if credit_card_id.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/creditcards/{creditCardID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'creditCardID' + '}', credit_card_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreditCardApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get(buyer_id, credit_card_id, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param credit_card_id ID of the credit card. @param [Hash] opts the optional parameters @return [CreditCard]

# File lib/order_cloud/api/credit_card_api.rb, line 227
def get(buyer_id, credit_card_id, opts = {})
  data, _status_code, _headers = get_with_http_info(buyer_id, credit_card_id, opts)
  return data
end
get_with_http_info(buyer_id, credit_card_id, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param credit_card_id ID of the credit card. @param [Hash] opts the optional parameters @return [Array<(CreditCard, Fixnum, Hash)>] CreditCard data, response status code and response headers

# File lib/order_cloud/api/credit_card_api.rb, line 238
def get_with_http_info(buyer_id, credit_card_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CreditCardApi.get ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CreditCardApi.get" if buyer_id.nil?
  # verify the required parameter 'credit_card_id' is set
  fail ArgumentError, "Missing the required parameter 'credit_card_id' when calling CreditCardApi.get" if credit_card_id.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/creditcards/{creditCardID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'creditCardID' + '}', credit_card_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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 => 'CreditCard')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreditCardApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list(buyer_id, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param [Hash] opts the optional parameters @option opts [String] :search Search of the credit card. @option opts [Array<String>] :search_on Search on of the credit card. @option opts [Array<String>] :sort_by Sort by of the credit card. @option opts [Integer] :page Page of the credit card. @option opts [Integer] :page_size Page size of the credit card. @option opts [Hash<String, String>] :filters Filters of the credit card. @return [ListCreditCard]

# File lib/order_cloud/api/credit_card_api.rb, line 293
def list(buyer_id, opts = {})
  data, _status_code, _headers = list_with_http_info(buyer_id, opts)
  return data
end
list_assignments(buyer_id, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param [Hash] opts the optional parameters @option opts [String] :credit_card_id ID of the credit card. @option opts [String] :user_id ID of the user. @option opts [String] :user_group_id ID of the user group. @option opts [String] :level Level of the credit card. @option opts [Integer] :page Page of the credit card. @option opts [Integer] :page_size Page size of the credit card. @return [ListCreditCardAssignment]

# File lib/order_cloud/api/credit_card_api.rb, line 368
def list_assignments(buyer_id, opts = {})
  data, _status_code, _headers = list_assignments_with_http_info(buyer_id, opts)
  return data
end
list_assignments_with_http_info(buyer_id, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param [Hash] opts the optional parameters @option opts [String] :credit_card_id ID of the credit card. @option opts [String] :user_id ID of the user. @option opts [String] :user_group_id ID of the user group. @option opts [String] :level Level of the credit card. @option opts [Integer] :page Page of the credit card. @option opts [Integer] :page_size Page size of the credit card. @return [Array<(ListCreditCardAssignment, Fixnum, Hash)>] ListCreditCardAssignment data, response status code and response headers

# File lib/order_cloud/api/credit_card_api.rb, line 384
def list_assignments_with_http_info(buyer_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CreditCardApi.list_assignments ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CreditCardApi.list_assignments" if buyer_id.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/creditcards/assignments".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'creditCardID'] = opts[:'credit_card_id'] if !opts[:'credit_card_id'].nil?
  query_params[:'userID'] = opts[:'user_id'] if !opts[:'user_id'].nil?
  query_params[:'userGroupID'] = opts[:'user_group_id'] if !opts[:'user_group_id'].nil?
  query_params[:'level'] = opts[:'level'] if !opts[:'level'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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 => 'ListCreditCardAssignment')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreditCardApi#list_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_with_http_info(buyer_id, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param [Hash] opts the optional parameters @option opts [String] :search Search of the credit card. @option opts [Array<String>] :search_on Search on of the credit card. @option opts [Array<String>] :sort_by Sort by of the credit card. @option opts [Integer] :page Page of the credit card. @option opts [Integer] :page_size Page size of the credit card. @option opts [Hash<String, String>] :filters Filters of the credit card. @return [Array<(ListCreditCard, Fixnum, Hash)>] ListCreditCard data, response status code and response headers

# File lib/order_cloud/api/credit_card_api.rb, line 309
def list_with_http_info(buyer_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CreditCardApi.list ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CreditCardApi.list" if buyer_id.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/creditcards".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
  query_params[:'searchOn'] = @api_client.build_collection_param(opts[:'search_on'], :csv) if !opts[:'search_on'].nil?
  query_params[:'sortBy'] = @api_client.build_collection_param(opts[:'sort_by'], :csv) if !opts[:'sort_by'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['oauth2']
  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 => 'ListCreditCard')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreditCardApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch(buyer_id, credit_card_id, card, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param credit_card_id ID of the credit card. @param card @param [Hash] opts the optional parameters @return [CreditCard]

# File lib/order_cloud/api/credit_card_api.rb, line 439
def patch(buyer_id, credit_card_id, card, opts = {})
  data, _status_code, _headers = patch_with_http_info(buyer_id, credit_card_id, card, opts)
  return data
end
patch_with_http_info(buyer_id, credit_card_id, card, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param credit_card_id ID of the credit card. @param card @param [Hash] opts the optional parameters @return [Array<(CreditCard, Fixnum, Hash)>] CreditCard data, response status code and response headers

# File lib/order_cloud/api/credit_card_api.rb, line 451
def patch_with_http_info(buyer_id, credit_card_id, card, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CreditCardApi.patch ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CreditCardApi.patch" if buyer_id.nil?
  # verify the required parameter 'credit_card_id' is set
  fail ArgumentError, "Missing the required parameter 'credit_card_id' when calling CreditCardApi.patch" if credit_card_id.nil?
  # verify the required parameter 'card' is set
  fail ArgumentError, "Missing the required parameter 'card' when calling CreditCardApi.patch" if card.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/creditcards/{creditCardID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'creditCardID' + '}', credit_card_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(card)
  auth_names = ['oauth2']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CreditCard')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CreditCardApi#patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
save_assignment(buyer_id, assignment, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param assignment @param [Hash] opts the optional parameters @return [nil]

# File lib/order_cloud/api/credit_card_api.rb, line 503
def save_assignment(buyer_id, assignment, opts = {})
  save_assignment_with_http_info(buyer_id, assignment, opts)
  return nil
end
save_assignment_with_http_info(buyer_id, assignment, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param assignment @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/order_cloud/api/credit_card_api.rb, line 514
def save_assignment_with_http_info(buyer_id, assignment, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CreditCardApi.save_assignment ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CreditCardApi.save_assignment" if buyer_id.nil?
  # verify the required parameter 'assignment' is set
  fail ArgumentError, "Missing the required parameter 'assignment' when calling CreditCardApi.save_assignment" if assignment.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/creditcards/assignments".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(assignment)
  auth_names = ['oauth2']
  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: CreditCardApi#save_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update(buyer_id, credit_card_id, card, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param credit_card_id ID of the credit card. @param card @param [Hash] opts the optional parameters @return [CreditCard]

# File lib/order_cloud/api/credit_card_api.rb, line 564
def update(buyer_id, credit_card_id, card, opts = {})
  data, _status_code, _headers = update_with_http_info(buyer_id, credit_card_id, card, opts)
  return data
end
update_with_http_info(buyer_id, credit_card_id, card, opts = {}) click to toggle source

@param buyer_id ID of the buyer. @param credit_card_id ID of the credit card. @param card @param [Hash] opts the optional parameters @return [Array<(CreditCard, Fixnum, Hash)>] CreditCard data, response status code and response headers

# File lib/order_cloud/api/credit_card_api.rb, line 576
def update_with_http_info(buyer_id, credit_card_id, card, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CreditCardApi.update ..."
  end
  # verify the required parameter 'buyer_id' is set
  fail ArgumentError, "Missing the required parameter 'buyer_id' when calling CreditCardApi.update" if buyer_id.nil?
  # verify the required parameter 'credit_card_id' is set
  fail ArgumentError, "Missing the required parameter 'credit_card_id' when calling CreditCardApi.update" if credit_card_id.nil?
  # verify the required parameter 'card' is set
  fail ArgumentError, "Missing the required parameter 'card' when calling CreditCardApi.update" if card.nil?
  # resource path
  local_var_path = "/buyers/{buyerID}/creditcards/{creditCardID}".sub('{format}','json').sub('{' + 'buyerID' + '}', buyer_id.to_s).sub('{' + 'creditCardID' + '}', credit_card_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json', 'text/plain; charset=utf-8']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

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