# SyncteraRubySdk::PaymentSchedulesApi All URIs are relative to *https://api.synctera.com/v0* | Method | HTTP request | Description | | ------ | ------------ | ----------- | | [**create_payment_schedule**](PaymentSchedulesApi.md#create_payment_schedule) | **POST** /payment_schedules | Create a payment schedule | | [**list_payment_schedules**](PaymentSchedulesApi.md#list_payment_schedules) | **GET** /payment_schedules | List payment schedules | | [**list_payments**](PaymentSchedulesApi.md#list_payments) | **GET** /payment_schedules/payments | List payments | | [**patch_payment_schedule**](PaymentSchedulesApi.md#patch_payment_schedule) | **PATCH** /payment_schedules/{payment_schedule_id} | Update a payment schedule | ## create_payment_schedule > create_payment_schedule(payment_schedule) Create a payment schedule Create a payment schedule ### Examples ```ruby require 'time' require 'synctera_ruby_sdk' # setup authorization SyncteraRubySdk.configure do |config| # Configure Bearer authorization (api_key): bearerAuth config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = SyncteraRubySdk::PaymentSchedulesApi.new payment_schedule = SyncteraRubySdk::PaymentSchedule.new({description: 'description_example', payment_instruction: SyncteraRubySdk::AchInstruction.new({request: SyncteraRubySdk::OutgoingAchRequest.new({amount: 607, currency: 'USD', customer_id: 'b01db9c7-78f2-4a99-8aca-1231d32f9b96', dc_sign: 'debit', originating_account_id: 'b01db9c7-78f2-4a99-8aca-1231d32f9b96', receiving_account_id: 'b01db9c7-78f2-4a99-8aca-1231d32f9b96'}), type: 'ACH'}), schedule: SyncteraRubySdk::ScheduleConfig.new({frequency: 'DAILY', interval: 37, start_date: Date.today})}) # PaymentSchedule | payment schedule to create begin # Create a payment schedule result = api_instance.create_payment_schedule(payment_schedule) p result rescue SyncteraRubySdk::ApiError => e puts "Error when calling PaymentSchedulesApi->create_payment_schedule: #{e}" end ``` #### Using the create_payment_schedule_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> create_payment_schedule_with_http_info(payment_schedule) ```ruby begin # Create a payment schedule data, status_code, headers = api_instance.create_payment_schedule_with_http_info(payment_schedule) p status_code # => 2xx p headers # => { ... } p data # => rescue SyncteraRubySdk::ApiError => e puts "Error when calling PaymentSchedulesApi->create_payment_schedule_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **payment_schedule** | [**PaymentSchedule**](PaymentSchedule.md) | payment schedule to create | | ### Return type [**PaymentSchedule**](PaymentSchedule.md) ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json, application/problem+json ## list_payment_schedules > list_payment_schedules(opts) List payment schedules Get paginated list of payment schedules ### Examples ```ruby require 'time' require 'synctera_ruby_sdk' # setup authorization SyncteraRubySdk.configure do |config| # Configure Bearer authorization (api_key): bearerAuth config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = SyncteraRubySdk::PaymentSchedulesApi.new opts = { limit: 100, # Integer | page_token: 'a8937a0d', # String | id: ['inner_example'], # Array | IDs. Multiple IDs can be provided as a comma-separated list. account_id: ['inner_example'], # Array | Originating account IDs. Multiple IDs can be provided as a comma-separated list. customer_id: ['inner_example'] # Array | The IDs of customers who created the payment schedules. Multiple IDs can be provided as a comma-separated list. } begin # List payment schedules result = api_instance.list_payment_schedules(opts) p result rescue SyncteraRubySdk::ApiError => e puts "Error when calling PaymentSchedulesApi->list_payment_schedules: #{e}" end ``` #### Using the list_payment_schedules_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> list_payment_schedules_with_http_info(opts) ```ruby begin # List payment schedules data, status_code, headers = api_instance.list_payment_schedules_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => rescue SyncteraRubySdk::ApiError => e puts "Error when calling PaymentSchedulesApi->list_payment_schedules_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **limit** | **Integer** | | [optional][default to 100] | | **page_token** | **String** | | [optional] | | **id** | [**Array<String>**](String.md) | IDs. Multiple IDs can be provided as a comma-separated list. | [optional] | | **account_id** | [**Array<String>**](String.md) | Originating account IDs. Multiple IDs can be provided as a comma-separated list. | [optional] | | **customer_id** | [**Array<String>**](String.md) | The IDs of customers who created the payment schedules. Multiple IDs can be provided as a comma-separated list. | [optional] | ### Return type [**PaymentScheduleList**](PaymentScheduleList.md) ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json, application/problem+json ## list_payments > list_payments(opts) List payments Get paginated list of payments ### Examples ```ruby require 'time' require 'synctera_ruby_sdk' # setup authorization SyncteraRubySdk.configure do |config| # Configure Bearer authorization (api_key): bearerAuth config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = SyncteraRubySdk::PaymentSchedulesApi.new opts = { limit: 100, # Integer | page_token: 'a8937a0d', # String | id: ['inner_example'], # Array | IDs. Multiple IDs can be provided as a comma-separated list. schedule_id: ['inner_example'], # Array | Payment schedule IDs. Multiple IDs can be provided as a comma-separated list. account_id: ['inner_example'], # Array | Originating account IDs. Multiple IDs can be provided as a comma-separated list. customer_id: ['inner_example'] # Array | The IDs of customers who created the payment schedules. Multiple IDs can be provided as a comma-separated list. } begin # List payments result = api_instance.list_payments(opts) p result rescue SyncteraRubySdk::ApiError => e puts "Error when calling PaymentSchedulesApi->list_payments: #{e}" end ``` #### Using the list_payments_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> list_payments_with_http_info(opts) ```ruby begin # List payments data, status_code, headers = api_instance.list_payments_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => rescue SyncteraRubySdk::ApiError => e puts "Error when calling PaymentSchedulesApi->list_payments_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **limit** | **Integer** | | [optional][default to 100] | | **page_token** | **String** | | [optional] | | **id** | [**Array<String>**](String.md) | IDs. Multiple IDs can be provided as a comma-separated list. | [optional] | | **schedule_id** | [**Array<String>**](String.md) | Payment schedule IDs. Multiple IDs can be provided as a comma-separated list. | [optional] | | **account_id** | [**Array<String>**](String.md) | Originating account IDs. Multiple IDs can be provided as a comma-separated list. | [optional] | | **customer_id** | [**Array<String>**](String.md) | The IDs of customers who created the payment schedules. Multiple IDs can be provided as a comma-separated list. | [optional] | ### Return type [**PaymentList**](PaymentList.md) ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json, application/problem+json ## patch_payment_schedule > patch_payment_schedule(payment_schedule_id, patch_payment_schedule) Update a payment schedule Update a payment schedule ### Examples ```ruby require 'time' require 'synctera_ruby_sdk' # setup authorization SyncteraRubySdk.configure do |config| # Configure Bearer authorization (api_key): bearerAuth config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = SyncteraRubySdk::PaymentSchedulesApi.new payment_schedule_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | Payment schedule ID patch_payment_schedule = SyncteraRubySdk::PatchPaymentSchedule.new # PatchPaymentSchedule | payment schedule to update begin # Update a payment schedule result = api_instance.patch_payment_schedule(payment_schedule_id, patch_payment_schedule) p result rescue SyncteraRubySdk::ApiError => e puts "Error when calling PaymentSchedulesApi->patch_payment_schedule: #{e}" end ``` #### Using the patch_payment_schedule_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> patch_payment_schedule_with_http_info(payment_schedule_id, patch_payment_schedule) ```ruby begin # Update a payment schedule data, status_code, headers = api_instance.patch_payment_schedule_with_http_info(payment_schedule_id, patch_payment_schedule) p status_code # => 2xx p headers # => { ... } p data # => rescue SyncteraRubySdk::ApiError => e puts "Error when calling PaymentSchedulesApi->patch_payment_schedule_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **payment_schedule_id** | **String** | Payment schedule ID | | | **patch_payment_schedule** | [**PatchPaymentSchedule**](PatchPaymentSchedule.md) | payment schedule to update | | ### Return type [**PaymentSchedule**](PaymentSchedule.md) ### Authorization [bearerAuth](../README.md#bearerAuth) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json, application/problem+json