class OrderCloud::MeApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

create_address(address, opts = {}) click to toggle source

@param address @param [Hash] opts the optional parameters @return [BuyerAddress]

# File lib/order_cloud/api/me_api.rb, line 39
def create_address(address, opts = {})
  data, _status_code, _headers = create_address_with_http_info(address, opts)
  return data
end
create_address_with_http_info(address, opts = {}) click to toggle source

@param address @param [Hash] opts the optional parameters @return [Array<(BuyerAddress, Fixnum, Hash)>] BuyerAddress data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 49
def create_address_with_http_info(address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.create_address ..."
  end
  # verify the required parameter 'address' is set
  fail ArgumentError, "Missing the required parameter 'address' when calling MeApi.create_address" if address.nil?
  # resource path
  local_var_path = "/me/addresses".sub('{format}','json')

  # 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(address)
  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 => 'BuyerAddress')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#create_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_credit_card(credit_card, opts = {}) click to toggle source

@param credit_card @param [Hash] opts the optional parameters @return [BuyerCreditCard]

# File lib/order_cloud/api/me_api.rb, line 96
def create_credit_card(credit_card, opts = {})
  data, _status_code, _headers = create_credit_card_with_http_info(credit_card, opts)
  return data
end
create_credit_card_with_http_info(credit_card, opts = {}) click to toggle source

@param credit_card @param [Hash] opts the optional parameters @return [Array<(BuyerCreditCard, Fixnum, Hash)>] BuyerCreditCard data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 106
def create_credit_card_with_http_info(credit_card, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.create_credit_card ..."
  end
  # verify the required parameter 'credit_card' is set
  fail ArgumentError, "Missing the required parameter 'credit_card' when calling MeApi.create_credit_card" if credit_card.nil?
  # resource path
  local_var_path = "/me/creditcards".sub('{format}','json')

  # 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(credit_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 => 'BuyerCreditCard')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#create_credit_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_address(address_id, opts = {}) click to toggle source

@param address_id ID of the address. @param [Hash] opts the optional parameters @return [nil]

# File lib/order_cloud/api/me_api.rb, line 153
def delete_address(address_id, opts = {})
  delete_address_with_http_info(address_id, opts)
  return nil
end
delete_address_with_http_info(address_id, opts = {}) click to toggle source

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

# File lib/order_cloud/api/me_api.rb, line 163
def delete_address_with_http_info(address_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.delete_address ..."
  end
  # verify the required parameter 'address_id' is set
  fail ArgumentError, "Missing the required parameter 'address_id' when calling MeApi.delete_address" if address_id.nil?
  # resource path
  local_var_path = "/me/addresses/{addressID}".sub('{format}','json').sub('{' + 'addressID' + '}', address_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: MeApi#delete_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_credit_card(creditcard_id, opts = {}) click to toggle source

@param creditcard_id ID of the creditcard. @param [Hash] opts the optional parameters @return [nil]

# File lib/order_cloud/api/me_api.rb, line 209
def delete_credit_card(creditcard_id, opts = {})
  delete_credit_card_with_http_info(creditcard_id, opts)
  return nil
end
delete_credit_card_with_http_info(creditcard_id, opts = {}) click to toggle source

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

# File lib/order_cloud/api/me_api.rb, line 219
def delete_credit_card_with_http_info(creditcard_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.delete_credit_card ..."
  end
  # verify the required parameter 'creditcard_id' is set
  fail ArgumentError, "Missing the required parameter 'creditcard_id' when calling MeApi.delete_credit_card" if creditcard_id.nil?
  # resource path
  local_var_path = "/me/creditcards/{creditcardID}".sub('{format}','json').sub('{' + 'creditcardID' + '}', creditcard_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: MeApi#delete_credit_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get(opts = {}) click to toggle source

@param [Hash] opts the optional parameters @return [MeUser]

# File lib/order_cloud/api/me_api.rb, line 264
def get(opts = {})
  data, _status_code, _headers = get_with_http_info(opts)
  return data
end
get_address(address_id, opts = {}) click to toggle source

@param address_id ID of the address. @param [Hash] opts the optional parameters @return [BuyerAddress]

# File lib/order_cloud/api/me_api.rb, line 318
def get_address(address_id, opts = {})
  data, _status_code, _headers = get_address_with_http_info(address_id, opts)
  return data
end
get_address_with_http_info(address_id, opts = {}) click to toggle source

@param address_id ID of the address. @param [Hash] opts the optional parameters @return [Array<(BuyerAddress, Fixnum, Hash)>] BuyerAddress data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 328
def get_address_with_http_info(address_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.get_address ..."
  end
  # verify the required parameter 'address_id' is set
  fail ArgumentError, "Missing the required parameter 'address_id' when calling MeApi.get_address" if address_id.nil?
  # resource path
  local_var_path = "/me/addresses/{addressID}".sub('{format}','json').sub('{' + 'addressID' + '}', address_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 => 'BuyerAddress')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#get_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_catalog(catalog_id, opts = {}) click to toggle source

@param catalog_id ID of the catalog. @param [Hash] opts the optional parameters @return [Catalog]

# File lib/order_cloud/api/me_api.rb, line 375
def get_catalog(catalog_id, opts = {})
  data, _status_code, _headers = get_catalog_with_http_info(catalog_id, opts)
  return data
end
get_catalog_with_http_info(catalog_id, opts = {}) click to toggle source

@param catalog_id ID of the catalog. @param [Hash] opts the optional parameters @return [Array<(Catalog, Fixnum, Hash)>] Catalog data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 385
def get_catalog_with_http_info(catalog_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.get_catalog ..."
  end
  # verify the required parameter 'catalog_id' is set
  fail ArgumentError, "Missing the required parameter 'catalog_id' when calling MeApi.get_catalog" if catalog_id.nil?
  # resource path
  local_var_path = "/me/catalogs/{catalogID}".sub('{format}','json').sub('{' + 'catalogID' + '}', catalog_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 => 'Catalog')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#get_catalog\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_credit_card(creditcard_id, opts = {}) click to toggle source

@param creditcard_id ID of the creditcard. @param [Hash] opts the optional parameters @return [BuyerCreditCard]

# File lib/order_cloud/api/me_api.rb, line 432
def get_credit_card(creditcard_id, opts = {})
  data, _status_code, _headers = get_credit_card_with_http_info(creditcard_id, opts)
  return data
end
get_credit_card_with_http_info(creditcard_id, opts = {}) click to toggle source

@param creditcard_id ID of the creditcard. @param [Hash] opts the optional parameters @return [Array<(BuyerCreditCard, Fixnum, Hash)>] BuyerCreditCard data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 442
def get_credit_card_with_http_info(creditcard_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.get_credit_card ..."
  end
  # verify the required parameter 'creditcard_id' is set
  fail ArgumentError, "Missing the required parameter 'creditcard_id' when calling MeApi.get_credit_card" if creditcard_id.nil?
  # resource path
  local_var_path = "/me/creditcards/{creditcardID}".sub('{format}','json').sub('{' + 'creditcardID' + '}', creditcard_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 => 'BuyerCreditCard')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#get_credit_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_product(product_id, opts = {}) click to toggle source

@param product_id ID of the product. @param [Hash] opts the optional parameters @return [BuyerProduct]

# File lib/order_cloud/api/me_api.rb, line 489
def get_product(product_id, opts = {})
  data, _status_code, _headers = get_product_with_http_info(product_id, opts)
  return data
end
get_product_with_http_info(product_id, opts = {}) click to toggle source

@param product_id ID of the product. @param [Hash] opts the optional parameters @return [Array<(BuyerProduct, Fixnum, Hash)>] BuyerProduct data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 499
def get_product_with_http_info(product_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.get_product ..."
  end
  # verify the required parameter 'product_id' is set
  fail ArgumentError, "Missing the required parameter 'product_id' when calling MeApi.get_product" if product_id.nil?
  # resource path
  local_var_path = "/me/products/{productID}".sub('{format}','json').sub('{' + 'productID' + '}', product_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 => 'BuyerProduct')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#get_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_promotion(promotion_id, opts = {}) click to toggle source

@param promotion_id ID of the promotion. @param [Hash] opts the optional parameters @return [Promotion]

# File lib/order_cloud/api/me_api.rb, line 546
def get_promotion(promotion_id, opts = {})
  data, _status_code, _headers = get_promotion_with_http_info(promotion_id, opts)
  return data
end
get_promotion_with_http_info(promotion_id, opts = {}) click to toggle source

@param promotion_id ID of the promotion. @param [Hash] opts the optional parameters @return [Array<(Promotion, Fixnum, Hash)>] Promotion data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 556
def get_promotion_with_http_info(promotion_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.get_promotion ..."
  end
  # verify the required parameter 'promotion_id' is set
  fail ArgumentError, "Missing the required parameter 'promotion_id' when calling MeApi.get_promotion" if promotion_id.nil?
  # resource path
  local_var_path = "/me/promotions/{promotionID}".sub('{format}','json').sub('{' + 'promotionID' + '}', promotion_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 => 'Promotion')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#get_promotion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_shipment(shipment_id, opts = {}) click to toggle source

@param shipment_id ID of the shipment. @param [Hash] opts the optional parameters @return [BuyerShipment]

# File lib/order_cloud/api/me_api.rb, line 603
def get_shipment(shipment_id, opts = {})
  data, _status_code, _headers = get_shipment_with_http_info(shipment_id, opts)
  return data
end
get_shipment_with_http_info(shipment_id, opts = {}) click to toggle source

@param shipment_id ID of the shipment. @param [Hash] opts the optional parameters @return [Array<(BuyerShipment, Fixnum, Hash)>] BuyerShipment data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 613
def get_shipment_with_http_info(shipment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.get_shipment ..."
  end
  # verify the required parameter 'shipment_id' is set
  fail ArgumentError, "Missing the required parameter 'shipment_id' when calling MeApi.get_shipment" if shipment_id.nil?
  # resource path
  local_var_path = "/me/shipments/{shipmentID}".sub('{format}','json').sub('{' + 'shipmentID' + '}', shipment_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 => 'BuyerShipment')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#get_shipment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_spec(product_id, spec_id, opts = {}) click to toggle source

@param product_id ID of the product. @param spec_id ID of the spec. @param [Hash] opts the optional parameters @option opts [String] :catalog_id ID of the catalog. @return [BuyerSpec]

# File lib/order_cloud/api/me_api.rb, line 662
def get_spec(product_id, spec_id, opts = {})
  data, _status_code, _headers = get_spec_with_http_info(product_id, spec_id, opts)
  return data
end
get_spec_with_http_info(product_id, spec_id, opts = {}) click to toggle source

@param product_id ID of the product. @param spec_id ID of the spec. @param [Hash] opts the optional parameters @option opts [String] :catalog_id ID of the catalog. @return [Array<(BuyerSpec, Fixnum, Hash)>] BuyerSpec data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 674
def get_spec_with_http_info(product_id, spec_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.get_spec ..."
  end
  # verify the required parameter 'product_id' is set
  fail ArgumentError, "Missing the required parameter 'product_id' when calling MeApi.get_spec" if product_id.nil?
  # verify the required parameter 'spec_id' is set
  fail ArgumentError, "Missing the required parameter 'spec_id' when calling MeApi.get_spec" if spec_id.nil?
  # resource path
  local_var_path = "/me/products/{productID}/specs/{specID}".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s).sub('{' + 'specID' + '}', spec_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'catalogID'] = opts[:'catalog_id'] if !opts[:'catalog_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(: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 => 'BuyerSpec')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#get_spec\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_spending_account(spending_account_id, opts = {}) click to toggle source

@param spending_account_id ID of the spending account. @param [Hash] opts the optional parameters @return [SpendingAccount]

# File lib/order_cloud/api/me_api.rb, line 724
def get_spending_account(spending_account_id, opts = {})
  data, _status_code, _headers = get_spending_account_with_http_info(spending_account_id, opts)
  return data
end
get_spending_account_with_http_info(spending_account_id, opts = {}) click to toggle source

@param spending_account_id ID of the spending account. @param [Hash] opts the optional parameters @return [Array<(SpendingAccount, Fixnum, Hash)>] SpendingAccount data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 734
def get_spending_account_with_http_info(spending_account_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.get_spending_account ..."
  end
  # verify the required parameter 'spending_account_id' is set
  fail ArgumentError, "Missing the required parameter 'spending_account_id' when calling MeApi.get_spending_account" if spending_account_id.nil?
  # resource path
  local_var_path = "/me/spendingaccounts/{spendingAccountID}".sub('{format}','json').sub('{' + 'spendingAccountID' + '}', spending_account_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 => 'SpendingAccount')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#get_spending_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_with_http_info(opts = {}) click to toggle source

@param [Hash] opts the optional parameters @return [Array<(MeUser, Fixnum, Hash)>] MeUser data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 273
def get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.get ..."
  end
  # resource path
  local_var_path = "/me".sub('{format}','json')

  # 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 => 'MeUser')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_addresses(opts = {}) click to toggle source

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

# File lib/order_cloud/api/me_api.rb, line 786
def list_addresses(opts = {})
  data, _status_code, _headers = list_addresses_with_http_info(opts)
  return data
end
list_addresses_with_http_info(opts = {}) click to toggle source

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

# File lib/order_cloud/api/me_api.rb, line 801
def list_addresses_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.list_addresses ..."
  end
  # resource path
  local_var_path = "/me/addresses".sub('{format}','json')

  # 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 => 'ListBuyerAddress')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#list_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_approvable_orders(opts = {}) click to toggle source

@param [Hash] opts the optional parameters @option opts [String] :from Lower bound of date range that the order was created (if outgoing) or submitted (if incoming). @option opts [String] :to Upper bound of date range that the order was created (if outgoing) or submitted (if incoming). @option opts [String] :search Search of the order. @option opts [Array<String>] :search_on Search on of the order. @option opts [Array<String>] :sort_by Sort by of the order. @option opts [Integer] :page Page of the order. @option opts [Integer] :page_size Page size of the order. @option opts [Hash<String, String>] :filters Filters of the order. @return [ListOrder]

# File lib/order_cloud/api/me_api.rb, line 859
def list_approvable_orders(opts = {})
  data, _status_code, _headers = list_approvable_orders_with_http_info(opts)
  return data
end
list_approvable_orders_with_http_info(opts = {}) click to toggle source

@param [Hash] opts the optional parameters @option opts [String] :from Lower bound of date range that the order was created (if outgoing) or submitted (if incoming). @option opts [String] :to Upper bound of date range that the order was created (if outgoing) or submitted (if incoming). @option opts [String] :search Search of the order. @option opts [Array<String>] :search_on Search on of the order. @option opts [Array<String>] :sort_by Sort by of the order. @option opts [Integer] :page Page of the order. @option opts [Integer] :page_size Page size of the order. @option opts [Hash<String, String>] :filters Filters of the order. @return [Array<(ListOrder, Fixnum, Hash)>] ListOrder data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 876
def list_approvable_orders_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.list_approvable_orders ..."
  end
  # resource path
  local_var_path = "/me/orders/approvable".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  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 => 'ListOrder')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#list_approvable_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_catalogs(opts = {}) click to toggle source

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

# File lib/order_cloud/api/me_api.rb, line 934
def list_catalogs(opts = {})
  data, _status_code, _headers = list_catalogs_with_http_info(opts)
  return data
end
list_catalogs_with_http_info(opts = {}) click to toggle source

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

# File lib/order_cloud/api/me_api.rb, line 949
def list_catalogs_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.list_catalogs ..."
  end
  # resource path
  local_var_path = "/me/catalogs".sub('{format}','json')

  # 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 => 'ListCatalog')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#list_catalogs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_categories(opts = {}) click to toggle source

@param [Hash] opts the optional parameters @option opts [String] :depth Depth of the category. @option opts [String] :catalog_id ID of the catalog. @option opts [String] :search Search of the category. @option opts [Array<String>] :search_on Search on of the category. @option opts [Array<String>] :sort_by Sort by of the category. @option opts [Integer] :page Page of the category. @option opts [Integer] :page_size Page size of the category. @option opts [Hash<String, String>] :filters Filters of the category. @return [ListCategory]

# File lib/order_cloud/api/me_api.rb, line 1007
def list_categories(opts = {})
  data, _status_code, _headers = list_categories_with_http_info(opts)
  return data
end
list_categories_with_http_info(opts = {}) click to toggle source

@param [Hash] opts the optional parameters @option opts [String] :depth Depth of the category. @option opts [String] :catalog_id ID of the catalog. @option opts [String] :search Search of the category. @option opts [Array<String>] :search_on Search on of the category. @option opts [Array<String>] :sort_by Sort by of the category. @option opts [Integer] :page Page of the category. @option opts [Integer] :page_size Page size of the category. @option opts [Hash<String, String>] :filters Filters of the category. @return [Array<(ListCategory, Fixnum, Hash)>] ListCategory data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 1024
def list_categories_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.list_categories ..."
  end
  # resource path
  local_var_path = "/me/categories".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
  query_params[:'catalogID'] = opts[:'catalog_id'] if !opts[:'catalog_id'].nil?
  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 => 'ListCategory')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#list_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_cost_centers(opts = {}) click to toggle source

@param [Hash] opts the optional parameters @option opts [String] :search Search of the cost center. @option opts [Array<String>] :search_on Search on of the cost center. @option opts [Array<String>] :sort_by Sort by of the cost center. @option opts [Integer] :page Page of the cost center. @option opts [Integer] :page_size Page size of the cost center. @option opts [Hash<String, String>] :filters Filters of the cost center. @return [ListCostCenter]

# File lib/order_cloud/api/me_api.rb, line 1082
def list_cost_centers(opts = {})
  data, _status_code, _headers = list_cost_centers_with_http_info(opts)
  return data
end
list_cost_centers_with_http_info(opts = {}) click to toggle source

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

# File lib/order_cloud/api/me_api.rb, line 1097
def list_cost_centers_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.list_cost_centers ..."
  end
  # resource path
  local_var_path = "/me/costcenters".sub('{format}','json')

  # 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 => 'ListCostCenter')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#list_cost_centers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_credit_cards(opts = {}) click to toggle source

@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 [ListBuyerCreditCard]

# File lib/order_cloud/api/me_api.rb, line 1153
def list_credit_cards(opts = {})
  data, _status_code, _headers = list_credit_cards_with_http_info(opts)
  return data
end
list_credit_cards_with_http_info(opts = {}) click to toggle source

@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<(ListBuyerCreditCard, Fixnum, Hash)>] ListBuyerCreditCard data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 1168
def list_credit_cards_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.list_credit_cards ..."
  end
  # resource path
  local_var_path = "/me/creditcards".sub('{format}','json')

  # 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 => 'ListBuyerCreditCard')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#list_credit_cards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_orders(opts = {}) click to toggle source

@param [Hash] opts the optional parameters @option opts [String] :from Lower bound of date range that the order was created (if outgoing) or submitted (if incoming). @option opts [String] :to Upper bound of date range that the order was created (if outgoing) or submitted (if incoming). @option opts [String] :search Search of the order. @option opts [Array<String>] :search_on Search on of the order. @option opts [Array<String>] :sort_by Sort by of the order. @option opts [Integer] :page Page of the order. @option opts [Integer] :page_size Page size of the order. @option opts [Hash<String, String>] :filters Filters of the order. @return [ListOrder]

# File lib/order_cloud/api/me_api.rb, line 1226
def list_orders(opts = {})
  data, _status_code, _headers = list_orders_with_http_info(opts)
  return data
end
list_orders_with_http_info(opts = {}) click to toggle source

@param [Hash] opts the optional parameters @option opts [String] :from Lower bound of date range that the order was created (if outgoing) or submitted (if incoming). @option opts [String] :to Upper bound of date range that the order was created (if outgoing) or submitted (if incoming). @option opts [String] :search Search of the order. @option opts [Array<String>] :search_on Search on of the order. @option opts [Array<String>] :sort_by Sort by of the order. @option opts [Integer] :page Page of the order. @option opts [Integer] :page_size Page size of the order. @option opts [Hash<String, String>] :filters Filters of the order. @return [Array<(ListOrder, Fixnum, Hash)>] ListOrder data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 1243
def list_orders_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.list_orders ..."
  end
  # resource path
  local_var_path = "/me/orders".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  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 => 'ListOrder')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#list_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_products(opts = {}) click to toggle source

@param [Hash] opts the optional parameters @option opts [String] :catalog_id ID of the catalog. @option opts [String] :category_id ID of the category. @option opts [String] :depth Depth of the product. @option opts [String] :search Search of the product. @option opts [Array<String>] :search_on Search on of the product. @option opts [Array<String>] :sort_by Sort by of the product. @option opts [Integer] :page Page of the product. @option opts [Integer] :page_size Page size of the product. @option opts [Hash<String, String>] :filters Filters of the product. @return [ListBuyerProduct]

# File lib/order_cloud/api/me_api.rb, line 1304
def list_products(opts = {})
  data, _status_code, _headers = list_products_with_http_info(opts)
  return data
end
list_products_with_http_info(opts = {}) click to toggle source

@param [Hash] opts the optional parameters @option opts [String] :catalog_id ID of the catalog. @option opts [String] :category_id ID of the category. @option opts [String] :depth Depth of the product. @option opts [String] :search Search of the product. @option opts [Array<String>] :search_on Search on of the product. @option opts [Array<String>] :sort_by Sort by of the product. @option opts [Integer] :page Page of the product. @option opts [Integer] :page_size Page size of the product. @option opts [Hash<String, String>] :filters Filters of the product. @return [Array<(ListBuyerProduct, Fixnum, Hash)>] ListBuyerProduct data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 1322
def list_products_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.list_products ..."
  end
  # resource path
  local_var_path = "/me/products".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'catalogID'] = opts[:'catalog_id'] if !opts[:'catalog_id'].nil?
  query_params[:'categoryID'] = opts[:'category_id'] if !opts[:'category_id'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
  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 => 'ListBuyerProduct')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#list_products\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_promotions(opts = {}) click to toggle source

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

# File lib/order_cloud/api/me_api.rb, line 1381
def list_promotions(opts = {})
  data, _status_code, _headers = list_promotions_with_http_info(opts)
  return data
end
list_promotions_with_http_info(opts = {}) click to toggle source

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

# File lib/order_cloud/api/me_api.rb, line 1396
def list_promotions_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.list_promotions ..."
  end
  # resource path
  local_var_path = "/me/promotions".sub('{format}','json')

  # 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 => 'ListPromotion')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#list_promotions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_shipment_items(shipment_id, opts = {}) click to toggle source

@param shipment_id ID of the shipment. @param [Hash] opts the optional parameters @option opts [String] :order_id ID of the order. @option opts [String] :search Search of the shipment. @option opts [Array<String>] :search_on Search on of the shipment. @option opts [Array<String>] :sort_by Sort by of the shipment. @option opts [Integer] :page Page of the shipment. @option opts [Integer] :page_size Page size of the shipment. @option opts [Hash<String, String>] :filters Filters of the shipment. @return [ListShipmentItem]

# File lib/order_cloud/api/me_api.rb, line 1454
def list_shipment_items(shipment_id, opts = {})
  data, _status_code, _headers = list_shipment_items_with_http_info(shipment_id, opts)
  return data
end
list_shipment_items_with_http_info(shipment_id, opts = {}) click to toggle source

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

# File lib/order_cloud/api/me_api.rb, line 1471
def list_shipment_items_with_http_info(shipment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.list_shipment_items ..."
  end
  # verify the required parameter 'shipment_id' is set
  fail ArgumentError, "Missing the required parameter 'shipment_id' when calling MeApi.list_shipment_items" if shipment_id.nil?
  # resource path
  local_var_path = "/me/shipments/{shipmentID}/items".sub('{format}','json').sub('{' + 'shipmentID' + '}', shipment_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'orderID'] = opts[:'order_id'] if !opts[:'order_id'].nil?
  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 => 'ListShipmentItem')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#list_shipment_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_shipments(opts = {}) click to toggle source

@param [Hash] opts the optional parameters @option opts [String] :order_id ID of the order. @option opts [String] :search Search of the shipment. @option opts [Array<String>] :search_on Search on of the shipment. @option opts [Array<String>] :sort_by Sort by of the shipment. @option opts [Integer] :page Page of the shipment. @option opts [Integer] :page_size Page size of the shipment. @option opts [Hash<String, String>] :filters Filters of the shipment. @return [ListBuyerShipment]

# File lib/order_cloud/api/me_api.rb, line 1531
def list_shipments(opts = {})
  data, _status_code, _headers = list_shipments_with_http_info(opts)
  return data
end
list_shipments_with_http_info(opts = {}) click to toggle source

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

# File lib/order_cloud/api/me_api.rb, line 1547
def list_shipments_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.list_shipments ..."
  end
  # resource path
  local_var_path = "/me/shipments".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'orderID'] = opts[:'order_id'] if !opts[:'order_id'].nil?
  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 => 'ListBuyerShipment')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#list_shipments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_specs(product_id, opts = {}) click to toggle source

@param product_id ID of the product. @param [Hash] opts the optional parameters @option opts [String] :catalog_id ID of the catalog. @option opts [String] :search Search of the product. @option opts [Array<String>] :search_on Search on of the product. @option opts [Array<String>] :sort_by Sort by of the product. @option opts [Integer] :page Page of the product. @option opts [Integer] :page_size Page size of the product. @option opts [Hash<String, String>] :filters Filters of the product. @return [ListBuyerSpec]

# File lib/order_cloud/api/me_api.rb, line 1606
def list_specs(product_id, opts = {})
  data, _status_code, _headers = list_specs_with_http_info(product_id, opts)
  return data
end
list_specs_with_http_info(product_id, opts = {}) click to toggle source

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

# File lib/order_cloud/api/me_api.rb, line 1623
def list_specs_with_http_info(product_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.list_specs ..."
  end
  # verify the required parameter 'product_id' is set
  fail ArgumentError, "Missing the required parameter 'product_id' when calling MeApi.list_specs" if product_id.nil?
  # resource path
  local_var_path = "/me/products/{productID}/specs".sub('{format}','json').sub('{' + 'productID' + '}', product_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'catalogID'] = opts[:'catalog_id'] if !opts[:'catalog_id'].nil?
  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 => 'ListBuyerSpec')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#list_specs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_spending_accounts(opts = {}) click to toggle source

@param [Hash] opts the optional parameters @option opts [String] :search Search of the spending account. @option opts [Array<String>] :search_on Search on of the spending account. @option opts [Array<String>] :sort_by Sort by of the spending account. @option opts [Integer] :page Page of the spending account. @option opts [Integer] :page_size Page size of the spending account. @option opts [Hash<String, String>] :filters Filters of the spending account. @return [ListSpendingAccount]

# File lib/order_cloud/api/me_api.rb, line 1682
def list_spending_accounts(opts = {})
  data, _status_code, _headers = list_spending_accounts_with_http_info(opts)
  return data
end
list_spending_accounts_with_http_info(opts = {}) click to toggle source

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

# File lib/order_cloud/api/me_api.rb, line 1697
def list_spending_accounts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.list_spending_accounts ..."
  end
  # resource path
  local_var_path = "/me/spendingAccounts".sub('{format}','json')

  # 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 => 'ListSpendingAccount')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#list_spending_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_user_groups(opts = {}) click to toggle source

@param [Hash] opts the optional parameters @option opts [String] :search Search of the user group. @option opts [Array<String>] :search_on Search on of the user group. @option opts [Array<String>] :sort_by Sort by of the user group. @option opts [Integer] :page Page of the user group. @option opts [Integer] :page_size Page size of the user group. @option opts [Hash<String, String>] :filters Filters of the user group. @return [ListUserGroup]

# File lib/order_cloud/api/me_api.rb, line 1753
def list_user_groups(opts = {})
  data, _status_code, _headers = list_user_groups_with_http_info(opts)
  return data
end
list_user_groups_with_http_info(opts = {}) click to toggle source

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

# File lib/order_cloud/api/me_api.rb, line 1768
def list_user_groups_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.list_user_groups ..."
  end
  # resource path
  local_var_path = "/me/usergroups".sub('{format}','json')

  # 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 => 'ListUserGroup')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#list_user_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch(user, opts = {}) click to toggle source

@param user @param [Hash] opts the optional parameters @return [MeUser]

# File lib/order_cloud/api/me_api.rb, line 1819
def patch(user, opts = {})
  data, _status_code, _headers = patch_with_http_info(user, opts)
  return data
end
patch_address(address_id, address, opts = {}) click to toggle source

@param address_id ID of the address. @param address @param [Hash] opts the optional parameters @return [nil]

# File lib/order_cloud/api/me_api.rb, line 1877
def patch_address(address_id, address, opts = {})
  patch_address_with_http_info(address_id, address, opts)
  return nil
end
patch_address_with_http_info(address_id, address, opts = {}) click to toggle source

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

# File lib/order_cloud/api/me_api.rb, line 1888
def patch_address_with_http_info(address_id, address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.patch_address ..."
  end
  # verify the required parameter 'address_id' is set
  fail ArgumentError, "Missing the required parameter 'address_id' when calling MeApi.patch_address" if address_id.nil?
  # verify the required parameter 'address' is set
  fail ArgumentError, "Missing the required parameter 'address' when calling MeApi.patch_address" if address.nil?
  # resource path
  local_var_path = "/me/addresses/{addressID}".sub('{format}','json').sub('{' + 'addressID' + '}', address_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(address)
  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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#patch_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch_credit_card(creditcard_id, credit_card, opts = {}) click to toggle source

@param creditcard_id ID of the creditcard. @param credit_card @param [Hash] opts the optional parameters @return [nil]

# File lib/order_cloud/api/me_api.rb, line 1937
def patch_credit_card(creditcard_id, credit_card, opts = {})
  patch_credit_card_with_http_info(creditcard_id, credit_card, opts)
  return nil
end
patch_credit_card_with_http_info(creditcard_id, credit_card, opts = {}) click to toggle source

@param creditcard_id ID of the creditcard. @param 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/me_api.rb, line 1948
def patch_credit_card_with_http_info(creditcard_id, credit_card, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.patch_credit_card ..."
  end
  # verify the required parameter 'creditcard_id' is set
  fail ArgumentError, "Missing the required parameter 'creditcard_id' when calling MeApi.patch_credit_card" if creditcard_id.nil?
  # verify the required parameter 'credit_card' is set
  fail ArgumentError, "Missing the required parameter 'credit_card' when calling MeApi.patch_credit_card" if credit_card.nil?
  # resource path
  local_var_path = "/me/creditcards/{creditcardID}".sub('{format}','json').sub('{' + 'creditcardID' + '}', creditcard_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(credit_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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#patch_credit_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch_with_http_info(user, opts = {}) click to toggle source

@param user @param [Hash] opts the optional parameters @return [Array<(MeUser, Fixnum, Hash)>] MeUser data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 1829
def patch_with_http_info(user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.patch ..."
  end
  # verify the required parameter 'user' is set
  fail ArgumentError, "Missing the required parameter 'user' when calling MeApi.patch" if user.nil?
  # resource path
  local_var_path = "/me".sub('{format}','json')

  # 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(user)
  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 => 'MeUser')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
register(anon_user_token, user, opts = {}) click to toggle source

@param anon_user_token Anon user token of the me. @param user @param [Hash] opts the optional parameters @return [Object]

# File lib/order_cloud/api/me_api.rb, line 1997
def register(anon_user_token, user, opts = {})
  data, _status_code, _headers = register_with_http_info(anon_user_token, user, opts)
  return data
end
register_with_http_info(anon_user_token, user, opts = {}) click to toggle source

@param anon_user_token Anon user token of the me. @param user @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 2008
def register_with_http_info(anon_user_token, user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.register ..."
  end
  # verify the required parameter 'anon_user_token' is set
  fail ArgumentError, "Missing the required parameter 'anon_user_token' when calling MeApi.register" if anon_user_token.nil?
  # verify the required parameter 'user' is set
  fail ArgumentError, "Missing the required parameter 'user' when calling MeApi.register" if user.nil?
  # resource path
  local_var_path = "/me/register".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'anonUserToken'] = anon_user_token

  # 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(user)
  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 => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#register\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
reset_password_by_token(reset, opts = {}) click to toggle source

@param reset @param [Hash] opts the optional parameters @return [nil]

# File lib/order_cloud/api/me_api.rb, line 2058
def reset_password_by_token(reset, opts = {})
  reset_password_by_token_with_http_info(reset, opts)
  return nil
end
reset_password_by_token_with_http_info(reset, opts = {}) click to toggle source

@param reset @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 2068
def reset_password_by_token_with_http_info(reset, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.reset_password_by_token ..."
  end
  # verify the required parameter 'reset' is set
  fail ArgumentError, "Missing the required parameter 'reset' when calling MeApi.reset_password_by_token" if reset.nil?
  # resource path
  local_var_path = "/me/password".sub('{format}','json')

  # 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(reset)
  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: MeApi#reset_password_by_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
transfer_anon_user_order(anon_user_token, opts = {}) click to toggle source

@param anon_user_token Anon user token of the me. @param [Hash] opts the optional parameters @return [nil]

# File lib/order_cloud/api/me_api.rb, line 2114
def transfer_anon_user_order(anon_user_token, opts = {})
  transfer_anon_user_order_with_http_info(anon_user_token, opts)
  return nil
end
transfer_anon_user_order_with_http_info(anon_user_token, opts = {}) click to toggle source

@param anon_user_token Anon user token of the me. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 2124
def transfer_anon_user_order_with_http_info(anon_user_token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.transfer_anon_user_order ..."
  end
  # verify the required parameter 'anon_user_token' is set
  fail ArgumentError, "Missing the required parameter 'anon_user_token' when calling MeApi.transfer_anon_user_order" if anon_user_token.nil?
  # resource path
  local_var_path = "/me/orders".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'anonUserToken'] = anon_user_token

  # 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(: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: MeApi#transfer_anon_user_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update(user, opts = {}) click to toggle source

@param user @param [Hash] opts the optional parameters @return [MeUser]

# File lib/order_cloud/api/me_api.rb, line 2171
def update(user, opts = {})
  data, _status_code, _headers = update_with_http_info(user, opts)
  return data
end
update_address(address_id, address, opts = {}) click to toggle source

@param address_id ID of the address. @param address @param [Hash] opts the optional parameters @return [BuyerAddress]

# File lib/order_cloud/api/me_api.rb, line 2229
def update_address(address_id, address, opts = {})
  data, _status_code, _headers = update_address_with_http_info(address_id, address, opts)
  return data
end
update_address_with_http_info(address_id, address, opts = {}) click to toggle source

@param address_id ID of the address. @param address @param [Hash] opts the optional parameters @return [Array<(BuyerAddress, Fixnum, Hash)>] BuyerAddress data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 2240
def update_address_with_http_info(address_id, address, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.update_address ..."
  end
  # verify the required parameter 'address_id' is set
  fail ArgumentError, "Missing the required parameter 'address_id' when calling MeApi.update_address" if address_id.nil?
  # verify the required parameter 'address' is set
  fail ArgumentError, "Missing the required parameter 'address' when calling MeApi.update_address" if address.nil?
  # resource path
  local_var_path = "/me/addresses/{addressID}".sub('{format}','json').sub('{' + 'addressID' + '}', address_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(address)
  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 => 'BuyerAddress')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#update_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_credit_card(creditcard_id, credit_card, opts = {}) click to toggle source

@param creditcard_id ID of the creditcard. @param credit_card @param [Hash] opts the optional parameters @return [BuyerCreditCard]

# File lib/order_cloud/api/me_api.rb, line 2290
def update_credit_card(creditcard_id, credit_card, opts = {})
  data, _status_code, _headers = update_credit_card_with_http_info(creditcard_id, credit_card, opts)
  return data
end
update_credit_card_with_http_info(creditcard_id, credit_card, opts = {}) click to toggle source

@param creditcard_id ID of the creditcard. @param credit_card @param [Hash] opts the optional parameters @return [Array<(BuyerCreditCard, Fixnum, Hash)>] BuyerCreditCard data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 2301
def update_credit_card_with_http_info(creditcard_id, credit_card, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.update_credit_card ..."
  end
  # verify the required parameter 'creditcard_id' is set
  fail ArgumentError, "Missing the required parameter 'creditcard_id' when calling MeApi.update_credit_card" if creditcard_id.nil?
  # verify the required parameter 'credit_card' is set
  fail ArgumentError, "Missing the required parameter 'credit_card' when calling MeApi.update_credit_card" if credit_card.nil?
  # resource path
  local_var_path = "/me/creditcards/{creditcardID}".sub('{format}','json').sub('{' + 'creditcardID' + '}', creditcard_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(credit_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 => 'BuyerCreditCard')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: MeApi#update_credit_card\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
update_with_http_info(user, opts = {}) click to toggle source

@param user @param [Hash] opts the optional parameters @return [Array<(MeUser, Fixnum, Hash)>] MeUser data, response status code and response headers

# File lib/order_cloud/api/me_api.rb, line 2181
def update_with_http_info(user, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: MeApi.update ..."
  end
  # verify the required parameter 'user' is set
  fail ArgumentError, "Missing the required parameter 'user' when calling MeApi.update" if user.nil?
  # resource path
  local_var_path = "/me".sub('{format}','json')

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