e-invoice-api 0.16.2 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +10 -1
  4. data/lib/e_invoice_api/models/document_type.rb +2 -0
  5. data/lib/e_invoice_api/models/inbox_list_credit_notes_params.rb +44 -1
  6. data/lib/e_invoice_api/models/inbox_list_invoices_params.rb +44 -1
  7. data/lib/e_invoice_api/models/inbox_list_params.rb +46 -3
  8. data/lib/e_invoice_api/models/outbox_list_draft_documents_params.rb +68 -1
  9. data/lib/e_invoice_api/models/outbox_list_received_documents_params.rb +60 -3
  10. data/lib/e_invoice_api/models/paginated_document_response.rb +7 -1
  11. data/lib/e_invoice_api/resources/documents.rb +3 -3
  12. data/lib/e_invoice_api/resources/inbox.rb +16 -4
  13. data/lib/e_invoice_api/resources/outbox.rb +24 -4
  14. data/lib/e_invoice_api/version.rb +1 -1
  15. data/rbi/e_invoice_api/models/document_type.rbi +4 -0
  16. data/rbi/e_invoice_api/models/inbox_list_credit_notes_params.rbi +132 -0
  17. data/rbi/e_invoice_api/models/inbox_list_invoices_params.rbi +126 -0
  18. data/rbi/e_invoice_api/models/inbox_list_params.rbi +99 -2
  19. data/rbi/e_invoice_api/models/outbox_list_draft_documents_params.rbi +163 -0
  20. data/rbi/e_invoice_api/models/outbox_list_received_documents_params.rbi +155 -2
  21. data/rbi/e_invoice_api/models/paginated_document_response.rbi +6 -1
  22. data/rbi/e_invoice_api/resources/documents.rbi +3 -3
  23. data/rbi/e_invoice_api/resources/inbox.rbi +20 -1
  24. data/rbi/e_invoice_api/resources/outbox.rbi +32 -2
  25. data/sig/e_invoice_api/models/document_type.rbs +8 -1
  26. data/sig/e_invoice_api/models/inbox_list_credit_notes_params.rbs +56 -1
  27. data/sig/e_invoice_api/models/inbox_list_invoices_params.rbs +56 -1
  28. data/sig/e_invoice_api/models/inbox_list_params.rbs +52 -0
  29. data/sig/e_invoice_api/models/outbox_list_draft_documents_params.rbs +71 -1
  30. data/sig/e_invoice_api/models/outbox_list_received_documents_params.rbs +57 -0
  31. data/sig/e_invoice_api/models/paginated_document_response.rbs +5 -0
  32. data/sig/e_invoice_api/resources/inbox.rbs +6 -0
  33. data/sig/e_invoice_api/resources/outbox.rbs +8 -0
  34. metadata +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b406f6e08449a83aa5dbd3ce27916d318ebfd258f5dd7d6c2108263f582d6d9
4
- data.tar.gz: c18599bc9a690f2b88c341792026ae1ec76d85397f0ccf74b608672e1e7e62f4
3
+ metadata.gz: bb06266072da88f4830fb288bf68d7e8ef7d3bb925636795393b9fa0826a189d
4
+ data.tar.gz: aebbfeeddc77cf8cc48fe0fcf1b2629d54fbcbbb0ee1d2e0ac024cb9a8ada5a4
5
5
  SHA512:
6
- metadata.gz: afd59dbb0ee0fac8fa5ba8db1f64ace3b4aec5b845c97ce10ddd8a7db76d942f95c6f128fda9f7395056e1561fb34ca1a86e34fb59d46d1500fb35d1c7bd6a99
7
- data.tar.gz: 671edc1b1c9377a3aa30de0afc04a547c01672c645e54f06238692119c3dc5487691abcd2a920fde691ef44f88784252643fd65b5e2be94e66c7ed0d2bb4263f
6
+ metadata.gz: 6335f94228c77a28cf579f914eb9b712032c047ccc9646aaab7faec62f0d81648dc19a19517b37d82b8f3a2bb2a74b10ee2640b62f1fdc3d32b03520d9124dbe
7
+ data.tar.gz: 31cf5271942c7879bbabbed544608e461d21a574a9609050cc74b0f0c23a5584197a897e1621cce686dd4255c8e5b75d6353eb18f7eff1f03390f6b630a4077e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.17.0 (2026-01-15)
4
+
5
+ Full Changelog: [v0.16.2...v0.17.0](https://github.com/e-invoice-be/e-invoice-rb/compare/v0.16.2...v0.17.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([98fcc82](https://github.com/e-invoice-be/e-invoice-rb/commit/98fcc8246c3284db794e81609d5ba755f3c219b7))
10
+
11
+
12
+ ### Chores
13
+
14
+ * fix typo in descriptions ([8fcc06b](https://github.com/e-invoice-be/e-invoice-rb/commit/8fcc06b2c2513b0bace66a8cc022ebfb714f2c6a))
15
+ * **internal:** codegen related update ([54574e5](https://github.com/e-invoice-be/e-invoice-rb/commit/54574e575fdacf9430a8e1eaff3faced53cd4468))
16
+ * move `cgi` into dependencies for ruby 4 ([cd5cd05](https://github.com/e-invoice-be/e-invoice-rb/commit/cd5cd055aa0c36ff19de62fd9f22680de2243bac))
17
+
18
+
19
+ ### Documentation
20
+
21
+ * prominently feature MCP server setup in root SDK readmes ([d7f0db5](https://github.com/e-invoice-be/e-invoice-rb/commit/d7f0db5aa3c51da11a8be1c3551281b47acd5b49))
22
+
3
23
  ## 0.16.2 (2025-12-19)
4
24
 
5
25
  Full Changelog: [v0.16.1...v0.16.2](https://github.com/e-invoice-be/e-invoice-rb/compare/v0.16.1...v0.16.2)
data/README.md CHANGED
@@ -4,6 +4,15 @@ The e-invoice.be Peppol library provides convenient access to the e-invoice REST
4
4
 
5
5
  To get an API key, [make a free account](https://app.e-invoice.be/register?ref=ruby) and register your company.
6
6
 
7
+ ## MCP Server
8
+
9
+ Use the E Invoice MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
10
+
11
+ [![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=e-invoice-api-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImUtaW52b2ljZS1hcGktbWNwIl19)
12
+ [![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22e-invoice-api-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22e-invoice-api-mcp%22%5D%7D)
13
+
14
+ > Note: You may need to set environment variables in your MCP client.
15
+
7
16
  ## Documentation
8
17
 
9
18
  Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/e-invoice-api).
@@ -17,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
17
26
  <!-- x-release-please-start-version -->
18
27
 
19
28
  ```ruby
20
- gem "e-invoice-api", "~> 0.16.2"
29
+ gem "e-invoice-api", "~> 0.17.0"
21
30
  ```
22
31
 
23
32
  <!-- x-release-please-end -->
@@ -8,6 +8,8 @@ module EInvoiceAPI
8
8
  INVOICE = :INVOICE
9
9
  CREDIT_NOTE = :CREDIT_NOTE
10
10
  DEBIT_NOTE = :DEBIT_NOTE
11
+ SELFBILLING_INVOICE = :SELFBILLING_INVOICE
12
+ SELFBILLING_CREDIT_NOTE = :SELFBILLING_CREDIT_NOTE
11
13
 
12
14
  # @!method self.values
13
15
  # @return [Array<Symbol>]
@@ -19,12 +19,55 @@ module EInvoiceAPI
19
19
  # @return [Integer, nil]
20
20
  optional :page_size, Integer
21
21
 
22
- # @!method initialize(page: nil, page_size: nil, request_options: {})
22
+ # @!attribute sort_by
23
+ # Field to sort by
24
+ #
25
+ # @return [Symbol, EInvoiceAPI::Models::InboxListCreditNotesParams::SortBy, nil]
26
+ optional :sort_by, enum: -> { EInvoiceAPI::InboxListCreditNotesParams::SortBy }
27
+
28
+ # @!attribute sort_order
29
+ # Sort direction (asc/desc)
30
+ #
31
+ # @return [Symbol, EInvoiceAPI::Models::InboxListCreditNotesParams::SortOrder, nil]
32
+ optional :sort_order, enum: -> { EInvoiceAPI::InboxListCreditNotesParams::SortOrder }
33
+
34
+ # @!method initialize(page: nil, page_size: nil, sort_by: nil, sort_order: nil, request_options: {})
23
35
  # @param page [Integer] Page number
24
36
  #
25
37
  # @param page_size [Integer] Number of items per page
26
38
  #
39
+ # @param sort_by [Symbol, EInvoiceAPI::Models::InboxListCreditNotesParams::SortBy] Field to sort by
40
+ #
41
+ # @param sort_order [Symbol, EInvoiceAPI::Models::InboxListCreditNotesParams::SortOrder] Sort direction (asc/desc)
42
+ #
27
43
  # @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}]
44
+
45
+ # Field to sort by
46
+ module SortBy
47
+ extend EInvoiceAPI::Internal::Type::Enum
48
+
49
+ CREATED_AT = :created_at
50
+ INVOICE_DATE = :invoice_date
51
+ DUE_DATE = :due_date
52
+ INVOICE_TOTAL = :invoice_total
53
+ CUSTOMER_NAME = :customer_name
54
+ VENDOR_NAME = :vendor_name
55
+ INVOICE_ID = :invoice_id
56
+
57
+ # @!method self.values
58
+ # @return [Array<Symbol>]
59
+ end
60
+
61
+ # Sort direction (asc/desc)
62
+ module SortOrder
63
+ extend EInvoiceAPI::Internal::Type::Enum
64
+
65
+ ASC = :asc
66
+ DESC = :desc
67
+
68
+ # @!method self.values
69
+ # @return [Array<Symbol>]
70
+ end
28
71
  end
29
72
  end
30
73
  end
@@ -19,12 +19,55 @@ module EInvoiceAPI
19
19
  # @return [Integer, nil]
20
20
  optional :page_size, Integer
21
21
 
22
- # @!method initialize(page: nil, page_size: nil, request_options: {})
22
+ # @!attribute sort_by
23
+ # Field to sort by
24
+ #
25
+ # @return [Symbol, EInvoiceAPI::Models::InboxListInvoicesParams::SortBy, nil]
26
+ optional :sort_by, enum: -> { EInvoiceAPI::InboxListInvoicesParams::SortBy }
27
+
28
+ # @!attribute sort_order
29
+ # Sort direction (asc/desc)
30
+ #
31
+ # @return [Symbol, EInvoiceAPI::Models::InboxListInvoicesParams::SortOrder, nil]
32
+ optional :sort_order, enum: -> { EInvoiceAPI::InboxListInvoicesParams::SortOrder }
33
+
34
+ # @!method initialize(page: nil, page_size: nil, sort_by: nil, sort_order: nil, request_options: {})
23
35
  # @param page [Integer] Page number
24
36
  #
25
37
  # @param page_size [Integer] Number of items per page
26
38
  #
39
+ # @param sort_by [Symbol, EInvoiceAPI::Models::InboxListInvoicesParams::SortBy] Field to sort by
40
+ #
41
+ # @param sort_order [Symbol, EInvoiceAPI::Models::InboxListInvoicesParams::SortOrder] Sort direction (asc/desc)
42
+ #
27
43
  # @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}]
44
+
45
+ # Field to sort by
46
+ module SortBy
47
+ extend EInvoiceAPI::Internal::Type::Enum
48
+
49
+ CREATED_AT = :created_at
50
+ INVOICE_DATE = :invoice_date
51
+ DUE_DATE = :due_date
52
+ INVOICE_TOTAL = :invoice_total
53
+ CUSTOMER_NAME = :customer_name
54
+ VENDOR_NAME = :vendor_name
55
+ INVOICE_ID = :invoice_id
56
+
57
+ # @!method self.values
58
+ # @return [Array<Symbol>]
59
+ end
60
+
61
+ # Sort direction (asc/desc)
62
+ module SortOrder
63
+ extend EInvoiceAPI::Internal::Type::Enum
64
+
65
+ ASC = :asc
66
+ DESC = :desc
67
+
68
+ # @!method self.values
69
+ # @return [Array<Symbol>]
70
+ end
28
71
  end
29
72
  end
30
73
  end
@@ -38,11 +38,23 @@ module EInvoiceAPI
38
38
  optional :search, String, nil?: true
39
39
 
40
40
  # @!attribute sender
41
- # Filter by sender ID
41
+ # Filter by sender (vendor_name, vendor_email, vendor_tax_id, vendor_company_id)
42
42
  #
43
43
  # @return [String, nil]
44
44
  optional :sender, String, nil?: true
45
45
 
46
+ # @!attribute sort_by
47
+ # Field to sort by
48
+ #
49
+ # @return [Symbol, EInvoiceAPI::Models::InboxListParams::SortBy, nil]
50
+ optional :sort_by, enum: -> { EInvoiceAPI::InboxListParams::SortBy }
51
+
52
+ # @!attribute sort_order
53
+ # Sort direction (asc/desc)
54
+ #
55
+ # @return [Symbol, EInvoiceAPI::Models::InboxListParams::SortOrder, nil]
56
+ optional :sort_order, enum: -> { EInvoiceAPI::InboxListParams::SortOrder }
57
+
46
58
  # @!attribute state
47
59
  # Filter by document state
48
60
  #
@@ -55,7 +67,7 @@ module EInvoiceAPI
55
67
  # @return [Symbol, EInvoiceAPI::Models::DocumentType, nil]
56
68
  optional :type, enum: -> { EInvoiceAPI::DocumentType }, nil?: true
57
69
 
58
- # @!method initialize(date_from: nil, date_to: nil, page: nil, page_size: nil, search: nil, sender: nil, state: nil, type: nil, request_options: {})
70
+ # @!method initialize(date_from: nil, date_to: nil, page: nil, page_size: nil, search: nil, sender: nil, sort_by: nil, sort_order: nil, state: nil, type: nil, request_options: {})
59
71
  # @param date_from [Time, nil] Filter by issue date (from)
60
72
  #
61
73
  # @param date_to [Time, nil] Filter by issue date (to)
@@ -66,13 +78,44 @@ module EInvoiceAPI
66
78
  #
67
79
  # @param search [String, nil] Search in invoice number, seller/buyer names
68
80
  #
69
- # @param sender [String, nil] Filter by sender ID
81
+ # @param sender [String, nil] Filter by sender (vendor_name, vendor_email, vendor_tax_id, vendor_company_id)
82
+ #
83
+ # @param sort_by [Symbol, EInvoiceAPI::Models::InboxListParams::SortBy] Field to sort by
84
+ #
85
+ # @param sort_order [Symbol, EInvoiceAPI::Models::InboxListParams::SortOrder] Sort direction (asc/desc)
70
86
  #
71
87
  # @param state [Symbol, EInvoiceAPI::Models::DocumentState, nil] Filter by document state
72
88
  #
73
89
  # @param type [Symbol, EInvoiceAPI::Models::DocumentType, nil] Filter by document type
74
90
  #
75
91
  # @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}]
92
+
93
+ # Field to sort by
94
+ module SortBy
95
+ extend EInvoiceAPI::Internal::Type::Enum
96
+
97
+ CREATED_AT = :created_at
98
+ INVOICE_DATE = :invoice_date
99
+ DUE_DATE = :due_date
100
+ INVOICE_TOTAL = :invoice_total
101
+ CUSTOMER_NAME = :customer_name
102
+ VENDOR_NAME = :vendor_name
103
+ INVOICE_ID = :invoice_id
104
+
105
+ # @!method self.values
106
+ # @return [Array<Symbol>]
107
+ end
108
+
109
+ # Sort direction (asc/desc)
110
+ module SortOrder
111
+ extend EInvoiceAPI::Internal::Type::Enum
112
+
113
+ ASC = :asc
114
+ DESC = :desc
115
+
116
+ # @!method self.values
117
+ # @return [Array<Symbol>]
118
+ end
76
119
  end
77
120
  end
78
121
  end
@@ -19,12 +19,79 @@ module EInvoiceAPI
19
19
  # @return [Integer, nil]
20
20
  optional :page_size, Integer
21
21
 
22
- # @!method initialize(page: nil, page_size: nil, request_options: {})
22
+ # @!attribute search
23
+ # Search in invoice number, seller/buyer names
24
+ #
25
+ # @return [String, nil]
26
+ optional :search, String, nil?: true
27
+
28
+ # @!attribute sort_by
29
+ # Field to sort by
30
+ #
31
+ # @return [Symbol, EInvoiceAPI::Models::OutboxListDraftDocumentsParams::SortBy, nil]
32
+ optional :sort_by, enum: -> { EInvoiceAPI::OutboxListDraftDocumentsParams::SortBy }
33
+
34
+ # @!attribute sort_order
35
+ # Sort direction (asc/desc)
36
+ #
37
+ # @return [Symbol, EInvoiceAPI::Models::OutboxListDraftDocumentsParams::SortOrder, nil]
38
+ optional :sort_order, enum: -> { EInvoiceAPI::OutboxListDraftDocumentsParams::SortOrder }
39
+
40
+ # @!attribute state
41
+ # Filter by document state
42
+ #
43
+ # @return [Symbol, EInvoiceAPI::Models::DocumentState, nil]
44
+ optional :state, enum: -> { EInvoiceAPI::DocumentState }, nil?: true
45
+
46
+ # @!attribute type
47
+ # Filter by document type
48
+ #
49
+ # @return [Symbol, EInvoiceAPI::Models::DocumentType, nil]
50
+ optional :type, enum: -> { EInvoiceAPI::DocumentType }, nil?: true
51
+
52
+ # @!method initialize(page: nil, page_size: nil, search: nil, sort_by: nil, sort_order: nil, state: nil, type: nil, request_options: {})
23
53
  # @param page [Integer] Page number
24
54
  #
25
55
  # @param page_size [Integer] Number of items per page
26
56
  #
57
+ # @param search [String, nil] Search in invoice number, seller/buyer names
58
+ #
59
+ # @param sort_by [Symbol, EInvoiceAPI::Models::OutboxListDraftDocumentsParams::SortBy] Field to sort by
60
+ #
61
+ # @param sort_order [Symbol, EInvoiceAPI::Models::OutboxListDraftDocumentsParams::SortOrder] Sort direction (asc/desc)
62
+ #
63
+ # @param state [Symbol, EInvoiceAPI::Models::DocumentState, nil] Filter by document state
64
+ #
65
+ # @param type [Symbol, EInvoiceAPI::Models::DocumentType, nil] Filter by document type
66
+ #
27
67
  # @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}]
68
+
69
+ # Field to sort by
70
+ module SortBy
71
+ extend EInvoiceAPI::Internal::Type::Enum
72
+
73
+ CREATED_AT = :created_at
74
+ INVOICE_DATE = :invoice_date
75
+ DUE_DATE = :due_date
76
+ INVOICE_TOTAL = :invoice_total
77
+ CUSTOMER_NAME = :customer_name
78
+ VENDOR_NAME = :vendor_name
79
+ INVOICE_ID = :invoice_id
80
+
81
+ # @!method self.values
82
+ # @return [Array<Symbol>]
83
+ end
84
+
85
+ # Sort direction (asc/desc)
86
+ module SortOrder
87
+ extend EInvoiceAPI::Internal::Type::Enum
88
+
89
+ ASC = :asc
90
+ DESC = :desc
91
+
92
+ # @!method self.values
93
+ # @return [Array<Symbol>]
94
+ end
28
95
  end
29
96
  end
30
97
  end
@@ -31,6 +31,13 @@ module EInvoiceAPI
31
31
  # @return [Integer, nil]
32
32
  optional :page_size, Integer
33
33
 
34
+ # @!attribute receiver
35
+ # Filter by receiver (customer_name, customer_email, customer_tax_id,
36
+ # customer_company_id, customer_id)
37
+ #
38
+ # @return [String, nil]
39
+ optional :receiver, String, nil?: true
40
+
34
41
  # @!attribute search
35
42
  # Search in invoice number, seller/buyer names
36
43
  #
@@ -38,11 +45,25 @@ module EInvoiceAPI
38
45
  optional :search, String, nil?: true
39
46
 
40
47
  # @!attribute sender
41
- # Filter by sender ID
48
+ # @deprecated
49
+ #
50
+ # (Deprecated) Filter by sender ID
42
51
  #
43
52
  # @return [String, nil]
44
53
  optional :sender, String, nil?: true
45
54
 
55
+ # @!attribute sort_by
56
+ # Field to sort by
57
+ #
58
+ # @return [Symbol, EInvoiceAPI::Models::OutboxListReceivedDocumentsParams::SortBy, nil]
59
+ optional :sort_by, enum: -> { EInvoiceAPI::OutboxListReceivedDocumentsParams::SortBy }
60
+
61
+ # @!attribute sort_order
62
+ # Sort direction (asc/desc)
63
+ #
64
+ # @return [Symbol, EInvoiceAPI::Models::OutboxListReceivedDocumentsParams::SortOrder, nil]
65
+ optional :sort_order, enum: -> { EInvoiceAPI::OutboxListReceivedDocumentsParams::SortOrder }
66
+
46
67
  # @!attribute state
47
68
  # Filter by document state
48
69
  #
@@ -55,7 +76,10 @@ module EInvoiceAPI
55
76
  # @return [Symbol, EInvoiceAPI::Models::DocumentType, nil]
56
77
  optional :type, enum: -> { EInvoiceAPI::DocumentType }, nil?: true
57
78
 
58
- # @!method initialize(date_from: nil, date_to: nil, page: nil, page_size: nil, search: nil, sender: nil, state: nil, type: nil, request_options: {})
79
+ # @!method initialize(date_from: nil, date_to: nil, page: nil, page_size: nil, receiver: nil, search: nil, sender: nil, sort_by: nil, sort_order: nil, state: nil, type: nil, request_options: {})
80
+ # Some parameter documentations has been truncated, see
81
+ # {EInvoiceAPI::Models::OutboxListReceivedDocumentsParams} for more details.
82
+ #
59
83
  # @param date_from [Time, nil] Filter by issue date (from)
60
84
  #
61
85
  # @param date_to [Time, nil] Filter by issue date (to)
@@ -64,15 +88,48 @@ module EInvoiceAPI
64
88
  #
65
89
  # @param page_size [Integer] Number of items per page
66
90
  #
91
+ # @param receiver [String, nil] Filter by receiver (customer_name, customer_email, customer_tax_id, customer_com
92
+ #
67
93
  # @param search [String, nil] Search in invoice number, seller/buyer names
68
94
  #
69
- # @param sender [String, nil] Filter by sender ID
95
+ # @param sender [String, nil] (Deprecated) Filter by sender ID
96
+ #
97
+ # @param sort_by [Symbol, EInvoiceAPI::Models::OutboxListReceivedDocumentsParams::SortBy] Field to sort by
98
+ #
99
+ # @param sort_order [Symbol, EInvoiceAPI::Models::OutboxListReceivedDocumentsParams::SortOrder] Sort direction (asc/desc)
70
100
  #
71
101
  # @param state [Symbol, EInvoiceAPI::Models::DocumentState, nil] Filter by document state
72
102
  #
73
103
  # @param type [Symbol, EInvoiceAPI::Models::DocumentType, nil] Filter by document type
74
104
  #
75
105
  # @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}]
106
+
107
+ # Field to sort by
108
+ module SortBy
109
+ extend EInvoiceAPI::Internal::Type::Enum
110
+
111
+ CREATED_AT = :created_at
112
+ INVOICE_DATE = :invoice_date
113
+ DUE_DATE = :due_date
114
+ INVOICE_TOTAL = :invoice_total
115
+ CUSTOMER_NAME = :customer_name
116
+ VENDOR_NAME = :vendor_name
117
+ INVOICE_ID = :invoice_id
118
+
119
+ # @!method self.values
120
+ # @return [Array<Symbol>]
121
+ end
122
+
123
+ # Sort direction (asc/desc)
124
+ module SortOrder
125
+ extend EInvoiceAPI::Internal::Type::Enum
126
+
127
+ ASC = :asc
128
+ DESC = :desc
129
+
130
+ # @!method self.values
131
+ # @return [Array<Symbol>]
132
+ end
76
133
  end
77
134
  end
78
135
  end
@@ -3,6 +3,11 @@
3
3
  module EInvoiceAPI
4
4
  module Models
5
5
  class PaginatedDocumentResponse < EInvoiceAPI::Internal::Type::BaseModel
6
+ # @!attribute has_next_page
7
+ #
8
+ # @return [Boolean]
9
+ required :has_next_page, EInvoiceAPI::Internal::Type::Boolean
10
+
6
11
  # @!attribute items
7
12
  #
8
13
  # @return [Array<EInvoiceAPI::Models::DocumentResponse>]
@@ -28,7 +33,8 @@ module EInvoiceAPI
28
33
  # @return [Integer]
29
34
  required :total, Integer
30
35
 
31
- # @!method initialize(items:, page:, page_size:, pages:, total:)
36
+ # @!method initialize(has_next_page:, items:, page:, page_size:, pages:, total:)
37
+ # @param has_next_page [Boolean]
32
38
  # @param items [Array<EInvoiceAPI::Models::DocumentResponse>]
33
39
  # @param page [Integer]
34
40
  # @param page_size [Integer]
@@ -174,11 +174,11 @@ module EInvoiceAPI
174
174
  #
175
175
  # @overload create_from_pdf(file:, customer_tax_id: nil, vendor_tax_id: nil, request_options: {})
176
176
  #
177
- # @param file [Pathname, StringIO, IO, String, EInvoiceAPI::FilePart] Body param:
177
+ # @param file [Pathname, StringIO, IO, String, EInvoiceAPI::FilePart] Body param
178
178
  #
179
- # @param customer_tax_id [String, nil] Query param:
179
+ # @param customer_tax_id [String, nil] Query param
180
180
  #
181
- # @param vendor_tax_id [String, nil] Query param:
181
+ # @param vendor_tax_id [String, nil] Query param
182
182
  #
183
183
  # @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}, nil]
184
184
  #
@@ -6,7 +6,7 @@ module EInvoiceAPI
6
6
  # Retrieve a paginated list of received documents with filtering options including
7
7
  # state, type, sender, date range, and text search.
8
8
  #
9
- # @overload list(date_from: nil, date_to: nil, page: nil, page_size: nil, search: nil, sender: nil, state: nil, type: nil, request_options: {})
9
+ # @overload list(date_from: nil, date_to: nil, page: nil, page_size: nil, search: nil, sender: nil, sort_by: nil, sort_order: nil, state: nil, type: nil, request_options: {})
10
10
  #
11
11
  # @param date_from [Time, nil] Filter by issue date (from)
12
12
  #
@@ -18,7 +18,11 @@ module EInvoiceAPI
18
18
  #
19
19
  # @param search [String, nil] Search in invoice number, seller/buyer names
20
20
  #
21
- # @param sender [String, nil] Filter by sender ID
21
+ # @param sender [String, nil] Filter by sender (vendor_name, vendor_email, vendor_tax_id, vendor_company_id)
22
+ #
23
+ # @param sort_by [Symbol, EInvoiceAPI::Models::InboxListParams::SortBy] Field to sort by
24
+ #
25
+ # @param sort_order [Symbol, EInvoiceAPI::Models::InboxListParams::SortOrder] Sort direction (asc/desc)
22
26
  #
23
27
  # @param state [Symbol, EInvoiceAPI::Models::DocumentState, nil] Filter by document state
24
28
  #
@@ -43,12 +47,16 @@ module EInvoiceAPI
43
47
 
44
48
  # Retrieve a paginated list of received credit notes with filtering options.
45
49
  #
46
- # @overload list_credit_notes(page: nil, page_size: nil, request_options: {})
50
+ # @overload list_credit_notes(page: nil, page_size: nil, sort_by: nil, sort_order: nil, request_options: {})
47
51
  #
48
52
  # @param page [Integer] Page number
49
53
  #
50
54
  # @param page_size [Integer] Number of items per page
51
55
  #
56
+ # @param sort_by [Symbol, EInvoiceAPI::Models::InboxListCreditNotesParams::SortBy] Field to sort by
57
+ #
58
+ # @param sort_order [Symbol, EInvoiceAPI::Models::InboxListCreditNotesParams::SortOrder] Sort direction (asc/desc)
59
+ #
52
60
  # @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}, nil]
53
61
  #
54
62
  # @return [EInvoiceAPI::Internal::DocumentsNumberPage<EInvoiceAPI::Models::DocumentResponse>]
@@ -68,12 +76,16 @@ module EInvoiceAPI
68
76
 
69
77
  # Retrieve a paginated list of received invoices with filtering options.
70
78
  #
71
- # @overload list_invoices(page: nil, page_size: nil, request_options: {})
79
+ # @overload list_invoices(page: nil, page_size: nil, sort_by: nil, sort_order: nil, request_options: {})
72
80
  #
73
81
  # @param page [Integer] Page number
74
82
  #
75
83
  # @param page_size [Integer] Number of items per page
76
84
  #
85
+ # @param sort_by [Symbol, EInvoiceAPI::Models::InboxListInvoicesParams::SortBy] Field to sort by
86
+ #
87
+ # @param sort_order [Symbol, EInvoiceAPI::Models::InboxListInvoicesParams::SortOrder] Sort direction (asc/desc)
88
+ #
77
89
  # @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}, nil]
78
90
  #
79
91
  # @return [EInvoiceAPI::Internal::DocumentsNumberPage<EInvoiceAPI::Models::DocumentResponse>]
@@ -3,14 +3,25 @@
3
3
  module EInvoiceAPI
4
4
  module Resources
5
5
  class Outbox
6
- # Retrieve a paginated list of draft documents with filtering options.
6
+ # Retrieve a paginated list of draft documents with filtering options including
7
+ # state and text search.
7
8
  #
8
- # @overload list_draft_documents(page: nil, page_size: nil, request_options: {})
9
+ # @overload list_draft_documents(page: nil, page_size: nil, search: nil, sort_by: nil, sort_order: nil, state: nil, type: nil, request_options: {})
9
10
  #
10
11
  # @param page [Integer] Page number
11
12
  #
12
13
  # @param page_size [Integer] Number of items per page
13
14
  #
15
+ # @param search [String, nil] Search in invoice number, seller/buyer names
16
+ #
17
+ # @param sort_by [Symbol, EInvoiceAPI::Models::OutboxListDraftDocumentsParams::SortBy] Field to sort by
18
+ #
19
+ # @param sort_order [Symbol, EInvoiceAPI::Models::OutboxListDraftDocumentsParams::SortOrder] Sort direction (asc/desc)
20
+ #
21
+ # @param state [Symbol, EInvoiceAPI::Models::DocumentState, nil] Filter by document state
22
+ #
23
+ # @param type [Symbol, EInvoiceAPI::Models::DocumentType, nil] Filter by document type
24
+ #
14
25
  # @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}, nil]
15
26
  #
16
27
  # @return [EInvoiceAPI::Internal::DocumentsNumberPage<EInvoiceAPI::Models::DocumentResponse>]
@@ -28,10 +39,13 @@ module EInvoiceAPI
28
39
  )
29
40
  end
30
41
 
42
+ # Some parameter documentations has been truncated, see
43
+ # {EInvoiceAPI::Models::OutboxListReceivedDocumentsParams} for more details.
44
+ #
31
45
  # Retrieve a paginated list of sent documents with filtering options including
32
46
  # state, type, sender, date range, and text search.
33
47
  #
34
- # @overload list_received_documents(date_from: nil, date_to: nil, page: nil, page_size: nil, search: nil, sender: nil, state: nil, type: nil, request_options: {})
48
+ # @overload list_received_documents(date_from: nil, date_to: nil, page: nil, page_size: nil, receiver: nil, search: nil, sender: nil, sort_by: nil, sort_order: nil, state: nil, type: nil, request_options: {})
35
49
  #
36
50
  # @param date_from [Time, nil] Filter by issue date (from)
37
51
  #
@@ -41,9 +55,15 @@ module EInvoiceAPI
41
55
  #
42
56
  # @param page_size [Integer] Number of items per page
43
57
  #
58
+ # @param receiver [String, nil] Filter by receiver (customer_name, customer_email, customer_tax_id, customer_com
59
+ #
44
60
  # @param search [String, nil] Search in invoice number, seller/buyer names
45
61
  #
46
- # @param sender [String, nil] Filter by sender ID
62
+ # @param sender [String, nil] (Deprecated) Filter by sender ID
63
+ #
64
+ # @param sort_by [Symbol, EInvoiceAPI::Models::OutboxListReceivedDocumentsParams::SortBy] Field to sort by
65
+ #
66
+ # @param sort_order [Symbol, EInvoiceAPI::Models::OutboxListReceivedDocumentsParams::SortOrder] Sort direction (asc/desc)
47
67
  #
48
68
  # @param state [Symbol, EInvoiceAPI::Models::DocumentState, nil] Filter by document state
49
69
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EInvoiceAPI
4
- VERSION = "0.16.2"
4
+ VERSION = "0.17.0"
5
5
  end
@@ -11,6 +11,10 @@ module EInvoiceAPI
11
11
  INVOICE = T.let(:INVOICE, EInvoiceAPI::DocumentType::TaggedSymbol)
12
12
  CREDIT_NOTE = T.let(:CREDIT_NOTE, EInvoiceAPI::DocumentType::TaggedSymbol)
13
13
  DEBIT_NOTE = T.let(:DEBIT_NOTE, EInvoiceAPI::DocumentType::TaggedSymbol)
14
+ SELFBILLING_INVOICE =
15
+ T.let(:SELFBILLING_INVOICE, EInvoiceAPI::DocumentType::TaggedSymbol)
16
+ SELFBILLING_CREDIT_NOTE =
17
+ T.let(:SELFBILLING_CREDIT_NOTE, EInvoiceAPI::DocumentType::TaggedSymbol)
14
18
 
15
19
  sig do
16
20
  override.returns(T::Array[EInvoiceAPI::DocumentType::TaggedSymbol])