All URIs are relative to https://api-sandbox.transferzero.com/v1
Method | HTTP request | Description |
---|---|---|
delete_sender | DELETE /senders/{Sender ID} | Deleting a sender |
get_sender | GET /senders/{Sender ID} | Fetching a sender |
get_senders | GET /senders | Listing senders |
patch_sender | PATCH /senders/{Sender ID} | Updating a sender |
post_senders | POST /senders | Creating a sender |
SenderResponse delete_sender(sender_id)
Deleting a sender
Deletes a single sender by the Sender ID
# load the gem
require 'transferzero-sdk'
api_instance = TransferZero::SendersApi.new
begin
#Deleting a sender
result = api_instance.delete_sender(sender_id)
p result
rescue TransferZero::ApiError => e
if e.validation_error
puts "WARN: Validation error occured when calling the endpoint"
result = e.response_object("SenderResponse")
p result
else
puts "Exception when calling SendersApi->delete_sender: #{e}"
end
end
Name | Type | Description | Notes |
---|---|---|---|
sender_id | String | ID of the sender to delete. Example: `/v1/senders/bf9ff782-e182-45ac-abea-5bce83ad6670` |
You can set the API Key and Secret on the TransferZero object when setting it up:
TransferZero.configure do |config|
config.api_key = '<key'
config.api_secret = '<secret>'
config.host = 'https://api-sandbox.transferzero.com/v1'
end
- Content-Type: Not defined
- Accept: application/json
SenderResponse get_sender(sender_id)
Fetching a sender
Returns a single sender by the Sender ID
# load the gem
require 'transferzero-sdk'
api_instance = TransferZero::SendersApi.new
begin
#Fetching a sender
result = api_instance.get_sender(sender_id)
p result
rescue TransferZero::ApiError => e
if e.validation_error
puts "WARN: Validation error occured when calling the endpoint"
result = e.response_object("SenderResponse")
p result
else
puts "Exception when calling SendersApi->get_sender: #{e}"
end
end
Name | Type | Description | Notes |
---|---|---|---|
sender_id | String | ID of the sender to get. Example: `/v1/senders/bf9ff782-e182-45ac-abea-5bce83ad6670` |
You can set the API Key and Secret on the TransferZero object when setting it up:
TransferZero.configure do |config|
config.api_key = '<key'
config.api_secret = '<secret>'
config.host = 'https://api-sandbox.transferzero.com/v1'
end
- Content-Type: Not defined
- Accept: application/json
SenderListResponse get_senders(opts)
Listing senders
Get a list of available senders
# load the gem
require 'transferzero-sdk'
api_instance = TransferZero::SendersApi.new
opts = {
page: 1 # Integer | The page number to request (defaults to 1)
per: 10 # Integer | The number of results to load per page (defaults to 10)
created_at_from: 'created_at_from_example' # String | Start date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08`
created_at_to: 'created_at_to_example' # String | End date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08`
external_id: 'external_id_example' # String | Allows filtering results by `external_id`. Example: `/v1/senders?external_id=26ec8517-2f0d-48c0-b74f-0bccb9ab3a87`
}
begin
#Listing senders
result = api_instance.get_senders(opts)
p result
rescue TransferZero::ApiError => e
if e.validation_error
puts "WARN: Validation error occured when calling the endpoint"
result = e.response_object("SenderListResponse")
p result
else
puts "Exception when calling SendersApi->get_senders: #{e}"
end
end
Name | Type | Description | Notes |
---|---|---|---|
page | Integer | The page number to request (defaults to 1) | [optional] |
per | Integer | The number of results to load per page (defaults to 10) | [optional] |
created_at_from | String | Start date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08` | [optional] |
created_at_to | String | End date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08` | [optional] |
external_id | String | Allows filtering results by `external_id`. Example: `/v1/senders?external_id=26ec8517-2f0d-48c0-b74f-0bccb9ab3a87` | [optional] |
You can set the API Key and Secret on the TransferZero object when setting it up:
TransferZero.configure do |config|
config.api_key = '<key'
config.api_secret = '<secret>'
config.host = 'https://api-sandbox.transferzero.com/v1'
end
- Content-Type: Not defined
- Accept: application/json
SenderResponse patch_sender(sender_idsender_request)
Updating a sender
Updates a single sender by the Sender ID
# load the gem
require 'transferzero-sdk'
api_instance = TransferZero::SendersApi.new
begin
#Updating a sender
result = api_instance.patch_sender(sender_idsender_request)
p result
rescue TransferZero::ApiError => e
if e.validation_error
puts "WARN: Validation error occured when calling the endpoint"
result = e.response_object("SenderResponse")
p result
else
puts "Exception when calling SendersApi->patch_sender: #{e}"
end
end
Name | Type | Description | Notes |
---|---|---|---|
sender_id | String | ID of the sender to get. Example: `/v1/senders/bf9ff782-e182-45ac-abea-5bce83ad6670` | |
sender_request | SenderRequest |
You can set the API Key and Secret on the TransferZero object when setting it up:
TransferZero.configure do |config|
config.api_key = '<key'
config.api_secret = '<secret>'
config.host = 'https://api-sandbox.transferzero.com/v1'
end
- Content-Type: application/json
- Accept: application/json
SenderResponse post_senders(sender_request)
Creating a sender
Creates a new sender in our system.
# load the gem
require 'transferzero-sdk'
api_instance = TransferZero::SendersApi.new
begin
#Creating a sender
result = api_instance.post_senders(sender_request)
p result
rescue TransferZero::ApiError => e
if e.validation_error
puts "WARN: Validation error occured when calling the endpoint"
result = e.response_object("SenderResponse")
p result
else
puts "Exception when calling SendersApi->post_senders: #{e}"
end
end
Name | Type | Description | Notes |
---|---|---|---|
sender_request | SenderRequest |
You can set the API Key and Secret on the TransferZero object when setting it up:
TransferZero.configure do |config|
config.api_key = '<key'
config.api_secret = '<secret>'
config.host = 'https://api-sandbox.transferzero.com/v1'
end
- Content-Type: application/json
- Accept: application/json