Skip to content

Latest commit

 

History

History
306 lines (218 loc) · 10.8 KB

BlocklistsApi.md

File metadata and controls

306 lines (218 loc) · 10.8 KB

RebillySdk::BlocklistsApi

All URIs are relative to https://api-sandbox.rebilly.com/organizations/{organizationId}

Method HTTP request Description
delete_blocklist DELETE /blocklists/{id} Delete a blocklist
get_blocklist GET /blocklists/{id} Retrieve a blocklist
get_blocklist_collection GET /blocklists Retrieve a list of blocklists
post_blocklist POST /blocklists Create a blocklist
put_blocklist PUT /blocklists/{id} Create a blocklist with predefined ID

delete_blocklist

delete_blocklist(id, opts)

Delete a blocklist

Delete a blocklist with predefined identifier string.

Example

# load the gem
require 'rebilly_sdk'
# setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::BlocklistsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Delete a blocklist
  api_instance.delete_blocklist(id, opts)
rescue RebillySdk::ApiError => e
  puts "Exception when calling BlocklistsApi->delete_blocklist: #{e}"
end

Parameters

Name Type Description Notes
id String The resource identifier string.
organization_id ResourceId Organization identifier in scope of which need to perform request (if not specified, the default organization will be used). It is deprecated. Use servers with `/organizations/{organizationId}` base path instead. [optional]

Return type

nil (empty response body)

Authorization

JWT, SecretApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_blocklist

Blocklist get_blocklist(id, opts)

Retrieve a blocklist

Retrieve a blocklist with specified identifier string.

Example

# load the gem
require 'rebilly_sdk'
# setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::BlocklistsApi.new
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Retrieve a blocklist
  result = api_instance.get_blocklist(id, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling BlocklistsApi->get_blocklist: #{e}"
end

Parameters

Name Type Description Notes
id String The resource identifier string.
organization_id ResourceId Organization identifier in scope of which need to perform request (if not specified, the default organization will be used). It is deprecated. Use servers with `/organizations/{organizationId}` base path instead. [optional]

Return type

Blocklist

Authorization

JWT, SecretApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

get_blocklist_collection

Array<Blocklist> get_blocklist_collection(opts)

Retrieve a list of blocklists

Retrieve a list of blocklists.

Example

# load the gem
require 'rebilly_sdk'
# setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::BlocklistsApi.new
opts = { 
  organization_id: RebillySdk::ResourceId.new, # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
  limit: 56, # Integer | The collection items limit.
  offset: 56, # Integer | The collection items offset.
  sort: ['sort_example'], # Array<String> | The collection items sort field and order (prefix with \"-\" for descending sort).
  filter: 'filter_example', # String | The collection items filter requires a special format. Use \",\" for multiple allowed values.  Use \";\" for multiple fields. See the [filter guide](https://api-reference.rebilly.com/#section/Using-filter-with-collections) for more options and examples about this format. 
  q: 'q_example' # String | The partial search of the text fields.
}

begin
  #Retrieve a list of blocklists
  result = api_instance.get_blocklist_collection(opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling BlocklistsApi->get_blocklist_collection: #{e}"
end

Parameters

Name Type Description Notes
organization_id ResourceId Organization identifier in scope of which need to perform request (if not specified, the default organization will be used). It is deprecated. Use servers with `/organizations/{organizationId}` base path instead. [optional]
limit Integer The collection items limit. [optional]
offset Integer The collection items offset. [optional]
sort Array<String> The collection items sort field and order (prefix with &quot;-&quot; for descending sort). [optional]
filter String The collection items filter requires a special format. Use &quot;,&quot; for multiple allowed values. Use &quot;;&quot; for multiple fields. See the filter guide for more options and examples about this format. [optional]
q String The partial search of the text fields. [optional]

Return type

Array<Blocklist>

Authorization

JWT, SecretApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

post_blocklist

Blocklist post_blocklist(body, opts)

Create a blocklist

Create a blocklist.

Example

# load the gem
require 'rebilly_sdk'
# setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::BlocklistsApi.new
body = RebillySdk::Blocklist.new # Blocklist | Blocklist resource.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a blocklist
  result = api_instance.post_blocklist(body, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling BlocklistsApi->post_blocklist: #{e}"
end

Parameters

Name Type Description Notes
body Blocklist Blocklist resource.
organization_id ResourceId Organization identifier in scope of which need to perform request (if not specified, the default organization will be used). It is deprecated. Use servers with `/organizations/{organizationId}` base path instead. [optional]

Return type

Blocklist

Authorization

JWT, SecretApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

put_blocklist

Blocklist put_blocklist(bodyid, opts)

Create a blocklist with predefined ID

Create a blocklist with predefined identifier string.

Example

# load the gem
require 'rebilly_sdk'
# setup authorization
RebillySdk.configure do |config|

  # Configure API key authorization: SecretApiKey
  config.api_key['REB-APIKEY'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['REB-APIKEY'] = 'Bearer'
end

api_instance = RebillySdk::BlocklistsApi.new
body = RebillySdk::Blocklist.new # Blocklist | Blocklist resource.
id = 'id_example' # String | The resource identifier string.
opts = { 
  organization_id: RebillySdk::ResourceId.new # ResourceId | Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).  It is deprecated. Use servers with `/organizations/{organizationId}` base path instead.
}

begin
  #Create a blocklist with predefined ID
  result = api_instance.put_blocklist(bodyid, opts)
  p result
rescue RebillySdk::ApiError => e
  puts "Exception when calling BlocklistsApi->put_blocklist: #{e}"
end

Parameters

Name Type Description Notes
body Blocklist Blocklist resource.
id String The resource identifier string.
organization_id ResourceId Organization identifier in scope of which need to perform request (if not specified, the default organization will be used). It is deprecated. Use servers with `/organizations/{organizationId}` base path instead. [optional]

Return type

Blocklist

Authorization

JWT, SecretApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json