gpd_debtposition_api

GPDDebtPositions - the Ruby gem for the PagoPA API Debt Position

Progetto Gestione Posizioni Debitorie

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 0.11.18
  • Package version: 3.8.0
  • Generator version: 7.11.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build gpd_debtposition_api.gemspec

Then either install the gem locally:

gem install ./gpd_debtposition_api-3.8.0.gem

(for development, run gem install --dev ./gpd_debtposition_api-3.8.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'gpd_debtposition_api', '~> 3.8.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'gpd_debtposition_api', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'gpd_debtposition_api'

# Setup authorization
GPDDebtPositions.configure do |config|
  # Configure Bearer authorization (JWT): Authorization
  config.access_token = 'YOUR_BEARER_TOKEN'
  # Configure a proc to get access tokens in lieu of the static access_token configuration
  config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' } 

  # Configure API key authorization: ApiKey
  config.api_key['Ocp-Apim-Subscription-Key'] = '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['Ocp-Apim-Subscription-Key'] = 'Bearer'
end

api_instance = GPDDebtPositions::DebtPositionActionsAPIApi.new
organizationfiscalcode = 'organizationfiscalcode_example' # String | Organization fiscal code, the fiscal code of the Organization.
iupd = 'iupd_example' # String | IUPD (Unique identifier of the debt position). Format could be `<Organization fiscal code + UUID>` this would make it unique within the new PD management system. It's the responsibility of the EC to guarantee uniqueness. The pagoPa system shall verify that this is `true` and if not, notify the EC.
opts = {
  x_request_id: 'x_request_id_example' # String | This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
}

begin
  #The Organization invalidate a debt Position.
  result = api_instance.invalidate_position(organizationfiscalcode, iupd, opts)
  p result
rescue GPDDebtPositions::ApiError => e
  puts "Exception when calling DebtPositionActionsAPIApi->invalidate_position: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.uat.platform.pagopa.it/gpd/debt-positions-service/v1

Class Method HTTP request Description
GPDDebtPositions::DebtPositionActionsAPIApi invalidate_position POST /organizations/organizationfiscalcode/debtpositions/iupd/invalidate The Organization invalidate a debt Position.
GPDDebtPositions::DebtPositionActionsAPIApi publish_position POST /organizations/organizationfiscalcode/debtpositions/iupd/publish The Organization publish a debt Position.
GPDDebtPositions::DebtPositionsAPIApi create_position POST /organizations/organizationfiscalcode/debtpositions The Organization creates a debt Position.
GPDDebtPositions::DebtPositionsAPIApi delete_position DELETE /organizations/organizationfiscalcode/debtpositions/iupd The Organization deletes a debt position
GPDDebtPositions::DebtPositionsAPIApi get_organization_debt_position_by_iupd GET /organizations/organizationfiscalcode/debtpositions/iupd Return the details of a specific debt position.
GPDDebtPositions::DebtPositionsAPIApi get_organization_debt_positions GET /organizations/organizationfiscalcode/debtpositions Return the list of the organization debt positions. The due dates interval is mutually exclusive with the payment dates interval.
GPDDebtPositions::DebtPositionsAPIApi update_position PUT /organizations/organizationfiscalcode/debtpositions/iupd The Organization updates a debt position
GPDDebtPositions::HomeApi health_check GET /info Return OK if application is started

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

ApiKey

  • Type: API key
  • API key parameter name: Ocp-Apim-Subscription-Key
  • Location: HTTP header

Authorization

  • Type: Bearer authentication (JWT)