Class: EInvoiceAPI::Resources::Lookup
- Inherits:
-
Object
- Object
- EInvoiceAPI::Resources::Lookup
- Defined in:
- lib/e_invoice_api/resources/lookup.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Lookup
constructor
private
A new instance of Lookup.
-
#retrieve(peppol_id: , request_options: {}) ⇒ EInvoiceAPI::Models::LookupRetrieveResponse
Some parameter documentations has been truncated, see Models::LookupRetrieveParams for more details.
-
#retrieve_participants(query: , country_code: nil, request_options: {}) ⇒ EInvoiceAPI::Models::LookupRetrieveParticipantsResponse
Some parameter documentations has been truncated, see Models::LookupRetrieveParticipantsParams for more details.
Constructor Details
#initialize(client:) ⇒ Lookup
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Lookup.
66 67 68 |
# File 'lib/e_invoice_api/resources/lookup.rb', line 66 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(peppol_id: , request_options: {}) ⇒ EInvoiceAPI::Models::LookupRetrieveResponse
Some parameter documentations has been truncated, see Models::LookupRetrieveParams for more details.
Lookup Peppol ID. The peppol_id must be in the form of ‘<scheme>:<id>`. The scheme is a 4-digit code representing the identifier scheme, and the id is the actual identifier value. For example, for a Belgian company it is `0208:0123456789` (where 0208 is the scheme for Belgian enterprises, followed by the 10 digits of the official BTW / KBO number).
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/e_invoice_api/resources/lookup.rb', line 24 def retrieve(params) parsed, = EInvoiceAPI::LookupRetrieveParams.dump_request(params) @client.request( method: :get, path: "api/lookup", query: parsed, model: EInvoiceAPI::Models::LookupRetrieveResponse, options: ) end |
#retrieve_participants(query: , country_code: nil, request_options: {}) ⇒ EInvoiceAPI::Models::LookupRetrieveParticipantsResponse
Some parameter documentations has been truncated, see Models::LookupRetrieveParticipantsParams for more details.
Lookup Peppol participants by name or other identifiers. You can limit the search to a specific country by providing the country code.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/e_invoice_api/resources/lookup.rb', line 52 def retrieve_participants(params) parsed, = EInvoiceAPI::LookupRetrieveParticipantsParams.dump_request(params) @client.request( method: :get, path: "api/lookup/participants", query: parsed, model: EInvoiceAPI::Models::LookupRetrieveParticipantsResponse, options: ) end |