e-invoice-api 0.33.0 → 0.34.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/e_invoice_api/client.rb +16 -0
- data/lib/e_invoice_api/models/conversion/document_create_from_pdf_task.rb +43 -0
- data/lib/e_invoice_api/models/conversion/pdf_create_params.rb +22 -0
- data/lib/e_invoice_api/models/conversion/pdf_result_params.rb +22 -0
- data/lib/e_invoice_api/models/conversion/pdf_retrieve_params.rb +22 -0
- data/lib/e_invoice_api/models/document_create.rb +158 -5
- data/lib/e_invoice_api/models/document_create_from_pdf_response.rb +108 -5
- data/lib/e_invoice_api/models/document_lifecycle_params.rb +20 -0
- data/lib/e_invoice_api/models/document_lifecycle_response.rb +134 -0
- data/lib/e_invoice_api/models/document_response.rb +112 -7
- data/lib/e_invoice_api/models/document_timeline_params.rb +20 -0
- data/lib/e_invoice_api/models/document_timeline_response.rb +71 -0
- data/lib/e_invoice_api/models/draft_list_params.rb +113 -0
- data/lib/e_invoice_api/models/inbound_email_response.rb +129 -0
- data/lib/e_invoice_api/models/mailbox_download_attachment_params.rb +26 -0
- data/lib/e_invoice_api/models/mailbox_list_params.rb +129 -0
- data/lib/e_invoice_api/models/mailbox_reprocess_params.rb +20 -0
- data/lib/e_invoice_api/models/mailbox_retrieve_params.rb +20 -0
- data/lib/e_invoice_api/models/me_retrieve_response.rb +8 -7
- data/lib/e_invoice_api/models/payment_detail_create.rb +4 -2
- data/lib/e_invoice_api/models/stats_retrieve_params.rb +55 -0
- data/lib/e_invoice_api/models/stats_retrieve_response.rb +141 -0
- data/lib/e_invoice_api/models/ubl_document_validation.rb +10 -1
- data/lib/e_invoice_api/models/webhook_history_params.rb +20 -0
- data/lib/e_invoice_api/models/webhook_history_response.rb +17 -0
- data/lib/e_invoice_api/models/webhook_test_params.rb +37 -0
- data/lib/e_invoice_api/models/webhook_test_response.rb +35 -0
- data/lib/e_invoice_api/models.rb +24 -0
- data/lib/e_invoice_api/resources/conversion/pdf.rb +76 -0
- data/lib/e_invoice_api/resources/conversion.rb +18 -0
- data/lib/e_invoice_api/resources/documents.rb +62 -1
- data/lib/e_invoice_api/resources/drafts.rb +55 -0
- data/lib/e_invoice_api/resources/mailbox.rb +123 -0
- data/lib/e_invoice_api/resources/stats.rb +47 -0
- data/lib/e_invoice_api/resources/validate.rb +22 -2
- data/lib/e_invoice_api/resources/webhooks.rb +45 -0
- data/lib/e_invoice_api/version.rb +1 -1
- data/lib/e_invoice_api.rb +25 -0
- data/rbi/e_invoice_api/client.rbi +12 -0
- data/rbi/e_invoice_api/models/conversion/document_create_from_pdf_task.rbi +108 -0
- data/rbi/e_invoice_api/models/conversion/pdf_create_params.rbi +43 -0
- data/rbi/e_invoice_api/models/conversion/pdf_result_params.rbi +40 -0
- data/rbi/e_invoice_api/models/conversion/pdf_retrieve_params.rbi +40 -0
- data/rbi/e_invoice_api/models/document_create.rbi +210 -3
- data/rbi/e_invoice_api/models/document_create_from_pdf_response.rbi +124 -3
- data/rbi/e_invoice_api/models/document_lifecycle_params.rbi +38 -0
- data/rbi/e_invoice_api/models/document_lifecycle_response.rbi +353 -0
- data/rbi/e_invoice_api/models/document_response.rbi +130 -5
- data/rbi/e_invoice_api/models/document_timeline_params.rbi +38 -0
- data/rbi/e_invoice_api/models/document_timeline_response.rbi +168 -0
- data/rbi/e_invoice_api/models/draft_list_params.rbi +194 -0
- data/rbi/e_invoice_api/models/inbound_email_response.rbi +189 -0
- data/rbi/e_invoice_api/models/mailbox_download_attachment_params.rbi +46 -0
- data/rbi/e_invoice_api/models/mailbox_list_params.rbi +218 -0
- data/rbi/e_invoice_api/models/mailbox_reprocess_params.rbi +41 -0
- data/rbi/e_invoice_api/models/mailbox_retrieve_params.rbi +41 -0
- data/rbi/e_invoice_api/models/me_retrieve_response.rbi +10 -8
- data/rbi/e_invoice_api/models/payment_detail_create.rbi +6 -2
- data/rbi/e_invoice_api/models/stats_retrieve_params.rbi +111 -0
- data/rbi/e_invoice_api/models/stats_retrieve_response.rbi +251 -0
- data/rbi/e_invoice_api/models/ubl_document_validation.rbi +11 -1
- data/rbi/e_invoice_api/models/webhook_history_params.rbi +38 -0
- data/rbi/e_invoice_api/models/webhook_history_response.rbi +32 -0
- data/rbi/e_invoice_api/models/webhook_test_params.rbi +57 -0
- data/rbi/e_invoice_api/models/webhook_test_response.rbi +57 -0
- data/rbi/e_invoice_api/models.rbi +25 -0
- data/rbi/e_invoice_api/resources/conversion/pdf.rbi +44 -0
- data/rbi/e_invoice_api/resources/conversion.rbi +15 -0
- data/rbi/e_invoice_api/resources/documents.rbi +67 -0
- data/rbi/e_invoice_api/resources/drafts.rbi +55 -0
- data/rbi/e_invoice_api/resources/mailbox.rbi +93 -0
- data/rbi/e_invoice_api/resources/stats.rbi +38 -0
- data/rbi/e_invoice_api/resources/validate.rbi +44 -1
- data/rbi/e_invoice_api/resources/webhooks.rbi +29 -0
- data/sig/e_invoice_api/client.rbs +8 -0
- data/sig/e_invoice_api/models/conversion/document_create_from_pdf_task.rbs +45 -0
- data/sig/e_invoice_api/models/conversion/pdf_create_params.rbs +26 -0
- data/sig/e_invoice_api/models/conversion/pdf_result_params.rbs +25 -0
- data/sig/e_invoice_api/models/conversion/pdf_retrieve_params.rbs +25 -0
- data/sig/e_invoice_api/models/document_create.rbs +87 -4
- data/sig/e_invoice_api/models/document_create_from_pdf_response.rbs +61 -4
- data/sig/e_invoice_api/models/document_lifecycle_params.rbs +23 -0
- data/sig/e_invoice_api/models/document_lifecycle_response.rbs +151 -0
- data/sig/e_invoice_api/models/document_response.rbs +61 -4
- data/sig/e_invoice_api/models/document_timeline_params.rbs +23 -0
- data/sig/e_invoice_api/models/document_timeline_response.rbs +84 -0
- data/sig/e_invoice_api/models/draft_list_params.rbs +112 -0
- data/sig/e_invoice_api/models/inbound_email_response.rbs +126 -0
- data/sig/e_invoice_api/models/mailbox_download_attachment_params.rbs +28 -0
- data/sig/e_invoice_api/models/mailbox_list_params.rbs +112 -0
- data/sig/e_invoice_api/models/mailbox_reprocess_params.rbs +24 -0
- data/sig/e_invoice_api/models/mailbox_retrieve_params.rbs +24 -0
- data/sig/e_invoice_api/models/stats_retrieve_params.rbs +48 -0
- data/sig/e_invoice_api/models/stats_retrieve_response.rbs +107 -0
- data/sig/e_invoice_api/models/webhook_history_params.rbs +23 -0
- data/sig/e_invoice_api/models/webhook_history_response.rbs +13 -0
- data/sig/e_invoice_api/models/webhook_test_params.rbs +32 -0
- data/sig/e_invoice_api/models/webhook_test_response.rbs +30 -0
- data/sig/e_invoice_api/models.rbs +24 -0
- data/sig/e_invoice_api/resources/conversion/pdf.rbs +24 -0
- data/sig/e_invoice_api/resources/conversion.rbs +9 -0
- data/sig/e_invoice_api/resources/documents.rbs +19 -0
- data/sig/e_invoice_api/resources/drafts.rbs +20 -0
- data/sig/e_invoice_api/resources/mailbox.rbs +36 -0
- data/sig/e_invoice_api/resources/stats.rbs +14 -0
- data/sig/e_invoice_api/resources/validate.rbs +9 -0
- data/sig/e_invoice_api/resources/webhooks.rbs +12 -0
- metadata +77 -2
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module EInvoiceAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see EInvoiceAPI::Resources::Documents#timeline
|
|
6
|
+
class DocumentTimelineParams < EInvoiceAPI::Internal::Type::BaseModel
|
|
7
|
+
extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include EInvoiceAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute document_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :document_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(document_id:, request_options: {})
|
|
16
|
+
# @param document_id [String]
|
|
17
|
+
# @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module EInvoiceAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see EInvoiceAPI::Resources::Documents#timeline
|
|
6
|
+
class DocumentTimelineResponse < EInvoiceAPI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute document_id
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :document_id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute events
|
|
13
|
+
#
|
|
14
|
+
# @return [Array<EInvoiceAPI::Models::DocumentTimelineResponse::Event>]
|
|
15
|
+
required :events,
|
|
16
|
+
-> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::Models::DocumentTimelineResponse::Event] }
|
|
17
|
+
|
|
18
|
+
# @!method initialize(document_id:, events:)
|
|
19
|
+
# @param document_id [String]
|
|
20
|
+
# @param events [Array<EInvoiceAPI::Models::DocumentTimelineResponse::Event>]
|
|
21
|
+
|
|
22
|
+
class Event < EInvoiceAPI::Internal::Type::BaseModel
|
|
23
|
+
# @!attribute event_type
|
|
24
|
+
#
|
|
25
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType]
|
|
26
|
+
required :event_type, enum: -> { EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType }
|
|
27
|
+
|
|
28
|
+
# @!attribute timestamp
|
|
29
|
+
#
|
|
30
|
+
# @return [Time]
|
|
31
|
+
required :timestamp, Time
|
|
32
|
+
|
|
33
|
+
# @!attribute id
|
|
34
|
+
#
|
|
35
|
+
# @return [String, nil]
|
|
36
|
+
optional :id, String, nil?: true
|
|
37
|
+
|
|
38
|
+
# @!attribute details
|
|
39
|
+
#
|
|
40
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
41
|
+
optional :details,
|
|
42
|
+
EInvoiceAPI::Internal::Type::HashOf[EInvoiceAPI::Internal::Type::Unknown],
|
|
43
|
+
nil?: true
|
|
44
|
+
|
|
45
|
+
# @!method initialize(event_type:, timestamp:, id: nil, details: nil)
|
|
46
|
+
# @param event_type [Symbol, EInvoiceAPI::Models::DocumentTimelineResponse::Event::EventType]
|
|
47
|
+
# @param timestamp [Time]
|
|
48
|
+
# @param id [String, nil]
|
|
49
|
+
# @param details [Hash{Symbol=>Object}, nil]
|
|
50
|
+
|
|
51
|
+
# @see EInvoiceAPI::Models::DocumentTimelineResponse::Event#event_type
|
|
52
|
+
module EventType
|
|
53
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
54
|
+
|
|
55
|
+
EMAIL_RECEIVED = :email_received
|
|
56
|
+
EMAIL_PROCESSED = :email_processed
|
|
57
|
+
DOCUMENT_CREATED = :document_created
|
|
58
|
+
SEND_ATTEMPTED = :send_attempted
|
|
59
|
+
SEND_FAILED = :send_failed
|
|
60
|
+
SEND_SUCCESS = :send_success
|
|
61
|
+
RECEIVE_SUCCESS = :receive_success
|
|
62
|
+
MLR_RECEIVED = :mlr_received
|
|
63
|
+
IMR_RECEIVED = :imr_received
|
|
64
|
+
|
|
65
|
+
# @!method self.values
|
|
66
|
+
# @return [Array<Symbol>]
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module EInvoiceAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see EInvoiceAPI::Resources::Drafts#list
|
|
6
|
+
class DraftListParams < EInvoiceAPI::Internal::Type::BaseModel
|
|
7
|
+
extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include EInvoiceAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute date_from
|
|
11
|
+
# Filter by issue date (from)
|
|
12
|
+
#
|
|
13
|
+
# @return [Time, nil]
|
|
14
|
+
optional :date_from, Time, nil?: true
|
|
15
|
+
|
|
16
|
+
# @!attribute date_to
|
|
17
|
+
# Filter by issue date (to)
|
|
18
|
+
#
|
|
19
|
+
# @return [Time, nil]
|
|
20
|
+
optional :date_to, Time, nil?: true
|
|
21
|
+
|
|
22
|
+
# @!attribute page
|
|
23
|
+
# Page number
|
|
24
|
+
#
|
|
25
|
+
# @return [Integer, nil]
|
|
26
|
+
optional :page, Integer
|
|
27
|
+
|
|
28
|
+
# @!attribute page_size
|
|
29
|
+
# Number of items per page
|
|
30
|
+
#
|
|
31
|
+
# @return [Integer, nil]
|
|
32
|
+
optional :page_size, Integer
|
|
33
|
+
|
|
34
|
+
# @!attribute search
|
|
35
|
+
# Search in invoice number, seller/buyer names
|
|
36
|
+
#
|
|
37
|
+
# @return [String, nil]
|
|
38
|
+
optional :search, String, nil?: true
|
|
39
|
+
|
|
40
|
+
# @!attribute sort_by
|
|
41
|
+
# Field to sort by
|
|
42
|
+
#
|
|
43
|
+
# @return [Symbol, EInvoiceAPI::Models::DraftListParams::SortBy, nil]
|
|
44
|
+
optional :sort_by, enum: -> { EInvoiceAPI::DraftListParams::SortBy }
|
|
45
|
+
|
|
46
|
+
# @!attribute sort_order
|
|
47
|
+
# Sort direction (asc/desc)
|
|
48
|
+
#
|
|
49
|
+
# @return [Symbol, EInvoiceAPI::Models::DraftListParams::SortOrder, nil]
|
|
50
|
+
optional :sort_order, enum: -> { EInvoiceAPI::DraftListParams::SortOrder }
|
|
51
|
+
|
|
52
|
+
# @!attribute state
|
|
53
|
+
# Filter by document state. By default return all states (DRAFT, TRANSIT, FAILED).
|
|
54
|
+
#
|
|
55
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentState, nil]
|
|
56
|
+
optional :state, enum: -> { EInvoiceAPI::DocumentState }, nil?: true
|
|
57
|
+
|
|
58
|
+
# @!attribute type
|
|
59
|
+
# Filter by document type
|
|
60
|
+
#
|
|
61
|
+
# @return [Symbol, EInvoiceAPI::Models::DocumentType, nil]
|
|
62
|
+
optional :type, enum: -> { EInvoiceAPI::DocumentType }, nil?: true
|
|
63
|
+
|
|
64
|
+
# @!method initialize(date_from: nil, date_to: nil, page: nil, page_size: nil, search: nil, sort_by: nil, sort_order: nil, state: nil, type: nil, request_options: {})
|
|
65
|
+
# @param date_from [Time, nil] Filter by issue date (from)
|
|
66
|
+
#
|
|
67
|
+
# @param date_to [Time, nil] Filter by issue date (to)
|
|
68
|
+
#
|
|
69
|
+
# @param page [Integer] Page number
|
|
70
|
+
#
|
|
71
|
+
# @param page_size [Integer] Number of items per page
|
|
72
|
+
#
|
|
73
|
+
# @param search [String, nil] Search in invoice number, seller/buyer names
|
|
74
|
+
#
|
|
75
|
+
# @param sort_by [Symbol, EInvoiceAPI::Models::DraftListParams::SortBy] Field to sort by
|
|
76
|
+
#
|
|
77
|
+
# @param sort_order [Symbol, EInvoiceAPI::Models::DraftListParams::SortOrder] Sort direction (asc/desc)
|
|
78
|
+
#
|
|
79
|
+
# @param state [Symbol, EInvoiceAPI::Models::DocumentState, nil] Filter by document state. By default return all states (DRAFT, TRANSIT, FAILED).
|
|
80
|
+
#
|
|
81
|
+
# @param type [Symbol, EInvoiceAPI::Models::DocumentType, nil] Filter by document type
|
|
82
|
+
#
|
|
83
|
+
# @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}]
|
|
84
|
+
|
|
85
|
+
# Field to sort by
|
|
86
|
+
module SortBy
|
|
87
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
88
|
+
|
|
89
|
+
CREATED_AT = :created_at
|
|
90
|
+
INVOICE_DATE = :invoice_date
|
|
91
|
+
DUE_DATE = :due_date
|
|
92
|
+
INVOICE_TOTAL = :invoice_total
|
|
93
|
+
CUSTOMER_NAME = :customer_name
|
|
94
|
+
VENDOR_NAME = :vendor_name
|
|
95
|
+
INVOICE_ID = :invoice_id
|
|
96
|
+
|
|
97
|
+
# @!method self.values
|
|
98
|
+
# @return [Array<Symbol>]
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Sort direction (asc/desc)
|
|
102
|
+
module SortOrder
|
|
103
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
104
|
+
|
|
105
|
+
ASC = :asc
|
|
106
|
+
DESC = :desc
|
|
107
|
+
|
|
108
|
+
# @!method self.values
|
|
109
|
+
# @return [Array<Symbol>]
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module EInvoiceAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see EInvoiceAPI::Resources::Mailbox#retrieve
|
|
6
|
+
class InboundEmailResponse < EInvoiceAPI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute created_at
|
|
13
|
+
#
|
|
14
|
+
# @return [Time]
|
|
15
|
+
required :created_at, Time
|
|
16
|
+
|
|
17
|
+
# @!attribute message_id
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :message_id, String
|
|
21
|
+
|
|
22
|
+
# @!attribute sender_email
|
|
23
|
+
#
|
|
24
|
+
# @return [String]
|
|
25
|
+
required :sender_email, String
|
|
26
|
+
|
|
27
|
+
# @!attribute attachment_count
|
|
28
|
+
#
|
|
29
|
+
# @return [Integer, nil]
|
|
30
|
+
optional :attachment_count, Integer
|
|
31
|
+
|
|
32
|
+
# @!attribute attachments
|
|
33
|
+
#
|
|
34
|
+
# @return [Array<EInvoiceAPI::Models::InboundEmailResponse::Attachment>, nil]
|
|
35
|
+
optional :attachments,
|
|
36
|
+
-> { EInvoiceAPI::Internal::Type::ArrayOf[EInvoiceAPI::InboundEmailResponse::Attachment] }
|
|
37
|
+
|
|
38
|
+
# @!attribute bcc_addresses
|
|
39
|
+
#
|
|
40
|
+
# @return [String, nil]
|
|
41
|
+
optional :bcc_addresses, String, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!attribute cc_addresses
|
|
44
|
+
#
|
|
45
|
+
# @return [String, nil]
|
|
46
|
+
optional :cc_addresses, String, nil?: true
|
|
47
|
+
|
|
48
|
+
# @!attribute document_id
|
|
49
|
+
#
|
|
50
|
+
# @return [String, nil]
|
|
51
|
+
optional :document_id, String, nil?: true
|
|
52
|
+
|
|
53
|
+
# @!attribute error_message
|
|
54
|
+
#
|
|
55
|
+
# @return [String, nil]
|
|
56
|
+
optional :error_message, String, nil?: true
|
|
57
|
+
|
|
58
|
+
# @!attribute processed
|
|
59
|
+
#
|
|
60
|
+
# @return [Boolean, nil]
|
|
61
|
+
optional :processed, EInvoiceAPI::Internal::Type::Boolean
|
|
62
|
+
|
|
63
|
+
# @!attribute processed_at
|
|
64
|
+
#
|
|
65
|
+
# @return [Time, nil]
|
|
66
|
+
optional :processed_at, Time, nil?: true
|
|
67
|
+
|
|
68
|
+
# @!attribute received_at
|
|
69
|
+
#
|
|
70
|
+
# @return [Time, nil]
|
|
71
|
+
optional :received_at, Time, nil?: true
|
|
72
|
+
|
|
73
|
+
# @!attribute sender_name
|
|
74
|
+
#
|
|
75
|
+
# @return [String, nil]
|
|
76
|
+
optional :sender_name, String, nil?: true
|
|
77
|
+
|
|
78
|
+
# @!attribute subject
|
|
79
|
+
#
|
|
80
|
+
# @return [String, nil]
|
|
81
|
+
optional :subject, String, nil?: true
|
|
82
|
+
|
|
83
|
+
# @!attribute to_addresses
|
|
84
|
+
#
|
|
85
|
+
# @return [String, nil]
|
|
86
|
+
optional :to_addresses, String, nil?: true
|
|
87
|
+
|
|
88
|
+
# @!method initialize(id:, created_at:, message_id:, sender_email:, attachment_count: nil, attachments: nil, bcc_addresses: nil, cc_addresses: nil, document_id: nil, error_message: nil, processed: nil, processed_at: nil, received_at: nil, sender_name: nil, subject: nil, to_addresses: nil)
|
|
89
|
+
# @param id [String]
|
|
90
|
+
# @param created_at [Time]
|
|
91
|
+
# @param message_id [String]
|
|
92
|
+
# @param sender_email [String]
|
|
93
|
+
# @param attachment_count [Integer]
|
|
94
|
+
# @param attachments [Array<EInvoiceAPI::Models::InboundEmailResponse::Attachment>]
|
|
95
|
+
# @param bcc_addresses [String, nil]
|
|
96
|
+
# @param cc_addresses [String, nil]
|
|
97
|
+
# @param document_id [String, nil]
|
|
98
|
+
# @param error_message [String, nil]
|
|
99
|
+
# @param processed [Boolean]
|
|
100
|
+
# @param processed_at [Time, nil]
|
|
101
|
+
# @param received_at [Time, nil]
|
|
102
|
+
# @param sender_name [String, nil]
|
|
103
|
+
# @param subject [String, nil]
|
|
104
|
+
# @param to_addresses [String, nil]
|
|
105
|
+
|
|
106
|
+
class Attachment < EInvoiceAPI::Internal::Type::BaseModel
|
|
107
|
+
# @!attribute filename
|
|
108
|
+
#
|
|
109
|
+
# @return [String]
|
|
110
|
+
required :filename, String
|
|
111
|
+
|
|
112
|
+
# @!attribute content_type
|
|
113
|
+
#
|
|
114
|
+
# @return [String, nil]
|
|
115
|
+
optional :content_type, String, nil?: true
|
|
116
|
+
|
|
117
|
+
# @!attribute size
|
|
118
|
+
#
|
|
119
|
+
# @return [Integer, nil]
|
|
120
|
+
optional :size, Integer, nil?: true
|
|
121
|
+
|
|
122
|
+
# @!method initialize(filename:, content_type: nil, size: nil)
|
|
123
|
+
# @param filename [String]
|
|
124
|
+
# @param content_type [String, nil]
|
|
125
|
+
# @param size [Integer, nil]
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module EInvoiceAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see EInvoiceAPI::Resources::Mailbox#download_attachment
|
|
6
|
+
class MailboxDownloadAttachmentParams < EInvoiceAPI::Internal::Type::BaseModel
|
|
7
|
+
extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include EInvoiceAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute inbound_email_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :inbound_email_id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute filename
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :filename, String
|
|
19
|
+
|
|
20
|
+
# @!method initialize(inbound_email_id:, filename:, request_options: {})
|
|
21
|
+
# @param inbound_email_id [String]
|
|
22
|
+
# @param filename [String]
|
|
23
|
+
# @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module EInvoiceAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see EInvoiceAPI::Resources::Mailbox#list
|
|
6
|
+
class MailboxListParams < EInvoiceAPI::Internal::Type::BaseModel
|
|
7
|
+
extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include EInvoiceAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute page
|
|
11
|
+
# Page number
|
|
12
|
+
#
|
|
13
|
+
# @return [Integer, nil]
|
|
14
|
+
optional :page, Integer
|
|
15
|
+
|
|
16
|
+
# @!attribute page_size
|
|
17
|
+
# Number of items per page
|
|
18
|
+
#
|
|
19
|
+
# @return [Integer, nil]
|
|
20
|
+
optional :page_size, Integer
|
|
21
|
+
|
|
22
|
+
# @!attribute processed
|
|
23
|
+
# Filter by processing status. If not provided, returns all. Ignored when `status`
|
|
24
|
+
# is set.
|
|
25
|
+
#
|
|
26
|
+
# @return [Boolean, nil]
|
|
27
|
+
optional :processed, EInvoiceAPI::Internal::Type::Boolean, nil?: true
|
|
28
|
+
|
|
29
|
+
# @!attribute received_from
|
|
30
|
+
# Inclusive lower bound on received date (falls back to created_at when
|
|
31
|
+
# received_at is null)
|
|
32
|
+
#
|
|
33
|
+
# @return [Time, nil]
|
|
34
|
+
optional :received_from, Time, nil?: true
|
|
35
|
+
|
|
36
|
+
# @!attribute received_to
|
|
37
|
+
# Inclusive upper bound on received date (falls back to created_at when
|
|
38
|
+
# received_at is null)
|
|
39
|
+
#
|
|
40
|
+
# @return [Time, nil]
|
|
41
|
+
optional :received_to, Time, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!attribute search
|
|
44
|
+
# Case-insensitive search across sender email, subject, message ID, and attachment
|
|
45
|
+
# filenames
|
|
46
|
+
#
|
|
47
|
+
# @return [String, nil]
|
|
48
|
+
optional :search, String, nil?: true
|
|
49
|
+
|
|
50
|
+
# @!attribute sort_by
|
|
51
|
+
# Field to sort by
|
|
52
|
+
#
|
|
53
|
+
# @return [Symbol, EInvoiceAPI::Models::MailboxListParams::SortBy, nil]
|
|
54
|
+
optional :sort_by, enum: -> { EInvoiceAPI::MailboxListParams::SortBy }
|
|
55
|
+
|
|
56
|
+
# @!attribute sort_order
|
|
57
|
+
# Sort direction (asc/desc)
|
|
58
|
+
#
|
|
59
|
+
# @return [Symbol, EInvoiceAPI::Models::MailboxListParams::SortOrder, nil]
|
|
60
|
+
optional :sort_order, enum: -> { EInvoiceAPI::MailboxListParams::SortOrder }
|
|
61
|
+
|
|
62
|
+
# @!attribute status
|
|
63
|
+
# Filter by status: pending, success, or failed. Takes precedence over `processed`
|
|
64
|
+
# if both are provided.
|
|
65
|
+
#
|
|
66
|
+
# @return [Symbol, EInvoiceAPI::Models::MailboxListParams::Status, nil]
|
|
67
|
+
optional :status, enum: -> { EInvoiceAPI::MailboxListParams::Status }, nil?: true
|
|
68
|
+
|
|
69
|
+
# @!method initialize(page: nil, page_size: nil, processed: nil, received_from: nil, received_to: nil, search: nil, sort_by: nil, sort_order: nil, status: nil, request_options: {})
|
|
70
|
+
# Some parameter documentations has been truncated, see
|
|
71
|
+
# {EInvoiceAPI::Models::MailboxListParams} for more details.
|
|
72
|
+
#
|
|
73
|
+
# @param page [Integer] Page number
|
|
74
|
+
#
|
|
75
|
+
# @param page_size [Integer] Number of items per page
|
|
76
|
+
#
|
|
77
|
+
# @param processed [Boolean, nil] Filter by processing status. If not provided, returns all. Ignored when `status`
|
|
78
|
+
#
|
|
79
|
+
# @param received_from [Time, nil] Inclusive lower bound on received date (falls back to created_at when received_a
|
|
80
|
+
#
|
|
81
|
+
# @param received_to [Time, nil] Inclusive upper bound on received date (falls back to created_at when received_a
|
|
82
|
+
#
|
|
83
|
+
# @param search [String, nil] Case-insensitive search across sender email, subject, message ID, and attachment
|
|
84
|
+
#
|
|
85
|
+
# @param sort_by [Symbol, EInvoiceAPI::Models::MailboxListParams::SortBy] Field to sort by
|
|
86
|
+
#
|
|
87
|
+
# @param sort_order [Symbol, EInvoiceAPI::Models::MailboxListParams::SortOrder] Sort direction (asc/desc)
|
|
88
|
+
#
|
|
89
|
+
# @param status [Symbol, EInvoiceAPI::Models::MailboxListParams::Status, nil] Filter by status: pending, success, or failed. Takes precedence over `processed`
|
|
90
|
+
#
|
|
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
|
+
RECEIVED_AT = :received_at
|
|
98
|
+
CREATED_AT = :created_at
|
|
99
|
+
|
|
100
|
+
# @!method self.values
|
|
101
|
+
# @return [Array<Symbol>]
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Sort direction (asc/desc)
|
|
105
|
+
module SortOrder
|
|
106
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
107
|
+
|
|
108
|
+
ASC = :asc
|
|
109
|
+
DESC = :desc
|
|
110
|
+
|
|
111
|
+
# @!method self.values
|
|
112
|
+
# @return [Array<Symbol>]
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Filter by status: pending, success, or failed. Takes precedence over `processed`
|
|
116
|
+
# if both are provided.
|
|
117
|
+
module Status
|
|
118
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
119
|
+
|
|
120
|
+
PENDING = :pending
|
|
121
|
+
SUCCESS = :success
|
|
122
|
+
FAILED = :failed
|
|
123
|
+
|
|
124
|
+
# @!method self.values
|
|
125
|
+
# @return [Array<Symbol>]
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module EInvoiceAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see EInvoiceAPI::Resources::Mailbox#reprocess
|
|
6
|
+
class MailboxReprocessParams < EInvoiceAPI::Internal::Type::BaseModel
|
|
7
|
+
extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include EInvoiceAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute inbound_email_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :inbound_email_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(inbound_email_id:, request_options: {})
|
|
16
|
+
# @param inbound_email_id [String]
|
|
17
|
+
# @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module EInvoiceAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see EInvoiceAPI::Resources::Mailbox#retrieve
|
|
6
|
+
class MailboxRetrieveParams < EInvoiceAPI::Internal::Type::BaseModel
|
|
7
|
+
extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include EInvoiceAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute inbound_email_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :inbound_email_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(inbound_email_id:, request_options: {})
|
|
16
|
+
# @param inbound_email_id [String]
|
|
17
|
+
# @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -54,8 +54,8 @@ module EInvoiceAPI
|
|
|
54
54
|
optional :company_number, String, nil?: true
|
|
55
55
|
|
|
56
56
|
# @!attribute company_tax_id
|
|
57
|
-
# Company tax ID
|
|
58
|
-
#
|
|
57
|
+
# Company tax ID (VAT number), including the country prefix. Stored in compact
|
|
58
|
+
# form: uppercased with separators removed, e.g. `BE0123456789`.
|
|
59
59
|
#
|
|
60
60
|
# @return [String, nil]
|
|
61
61
|
optional :company_tax_id, String, nil?: true
|
|
@@ -96,13 +96,14 @@ module EInvoiceAPI
|
|
|
96
96
|
optional :plan, enum: -> { EInvoiceAPI::Models::MeRetrieveResponse::Plan }
|
|
97
97
|
|
|
98
98
|
# @!attribute smp_registration
|
|
99
|
-
#
|
|
99
|
+
# Legacy field. Does not show whether a Peppol ID is published: it is usually
|
|
100
|
+
# `false`, also for a tenant whose Peppol IDs are published.
|
|
100
101
|
#
|
|
101
102
|
# @return [Boolean, nil]
|
|
102
103
|
optional :smp_registration, EInvoiceAPI::Internal::Type::Boolean, nil?: true
|
|
103
104
|
|
|
104
105
|
# @!attribute smp_registration_date
|
|
105
|
-
#
|
|
106
|
+
# Legacy field. Does not show whether or when a Peppol ID was published.
|
|
106
107
|
#
|
|
107
108
|
# @return [Time, nil]
|
|
108
109
|
optional :smp_registration_date, Time, nil?: true
|
|
@@ -127,7 +128,7 @@ module EInvoiceAPI
|
|
|
127
128
|
#
|
|
128
129
|
# @param company_number [String, nil] Company number. For Belgium this is the CBE number or their EUID (European Uniqu
|
|
129
130
|
#
|
|
130
|
-
# @param company_tax_id [String, nil] Company tax ID
|
|
131
|
+
# @param company_tax_id [String, nil] Company tax ID (VAT number), including the country prefix. Stored in compact for
|
|
131
132
|
#
|
|
132
133
|
# @param company_zip [String, nil] Zip code of the company
|
|
133
134
|
#
|
|
@@ -141,9 +142,9 @@ module EInvoiceAPI
|
|
|
141
142
|
#
|
|
142
143
|
# @param plan [Symbol, EInvoiceAPI::Models::MeRetrieveResponse::Plan] Plan of the tenant
|
|
143
144
|
#
|
|
144
|
-
# @param smp_registration [Boolean, nil]
|
|
145
|
+
# @param smp_registration [Boolean, nil] Legacy field. Does not show whether a Peppol ID is published: it is usually `fal
|
|
145
146
|
#
|
|
146
|
-
# @param smp_registration_date [Time, nil]
|
|
147
|
+
# @param smp_registration_date [Time, nil] Legacy field. Does not show whether or when a Peppol ID was published.
|
|
147
148
|
|
|
148
149
|
# Plan of the tenant
|
|
149
150
|
#
|
|
@@ -23,7 +23,9 @@ module EInvoiceAPI
|
|
|
23
23
|
optional :payment_reference, String, nil?: true
|
|
24
24
|
|
|
25
25
|
# @!attribute swift
|
|
26
|
-
#
|
|
26
|
+
# The payment service provider identifier (BT-86): the BIC of the payee's bank, or
|
|
27
|
+
# `SE:BANKGIRO` / `SE:PLUSGIRO` when `bank_account_number` is a Swedish bankgiro
|
|
28
|
+
# or plusgiro number.
|
|
27
29
|
#
|
|
28
30
|
# @return [String, nil]
|
|
29
31
|
optional :swift, String, nil?: true
|
|
@@ -38,7 +40,7 @@ module EInvoiceAPI
|
|
|
38
40
|
#
|
|
39
41
|
# @param payment_reference [String, nil] Structured payment reference or communication (e.g., structured communication fo
|
|
40
42
|
#
|
|
41
|
-
# @param swift [String, nil]
|
|
43
|
+
# @param swift [String, nil] The payment service provider identifier (BT-86): the BIC of the payee's bank, or
|
|
42
44
|
end
|
|
43
45
|
end
|
|
44
46
|
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module EInvoiceAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see EInvoiceAPI::Resources::Stats#retrieve
|
|
6
|
+
class StatsRetrieveParams < EInvoiceAPI::Internal::Type::BaseModel
|
|
7
|
+
extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include EInvoiceAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute aggregation
|
|
11
|
+
# Aggregation type: DAY, WEEK, or MONTH. Defaults to DAY.
|
|
12
|
+
#
|
|
13
|
+
# @return [Symbol, EInvoiceAPI::Models::StatsRetrieveParams::Aggregation, nil]
|
|
14
|
+
optional :aggregation, enum: -> { EInvoiceAPI::StatsRetrieveParams::Aggregation }, nil?: true
|
|
15
|
+
|
|
16
|
+
# @!attribute end_date
|
|
17
|
+
# End date in yyyy-mm-dd format. If not provided, queries to latest available
|
|
18
|
+
# data.
|
|
19
|
+
#
|
|
20
|
+
# @return [Date, nil]
|
|
21
|
+
optional :end_date, Date, nil?: true
|
|
22
|
+
|
|
23
|
+
# @!attribute start_date
|
|
24
|
+
# Start date in yyyy-mm-dd format. If not provided, queries from earliest
|
|
25
|
+
# available data.
|
|
26
|
+
#
|
|
27
|
+
# @return [Date, nil]
|
|
28
|
+
optional :start_date, Date, nil?: true
|
|
29
|
+
|
|
30
|
+
# @!method initialize(aggregation: nil, end_date: nil, start_date: nil, request_options: {})
|
|
31
|
+
# Some parameter documentations has been truncated, see
|
|
32
|
+
# {EInvoiceAPI::Models::StatsRetrieveParams} for more details.
|
|
33
|
+
#
|
|
34
|
+
# @param aggregation [Symbol, EInvoiceAPI::Models::StatsRetrieveParams::Aggregation, nil] Aggregation type: DAY, WEEK, or MONTH. Defaults to DAY.
|
|
35
|
+
#
|
|
36
|
+
# @param end_date [Date, nil] End date in yyyy-mm-dd format. If not provided, queries to latest available data
|
|
37
|
+
#
|
|
38
|
+
# @param start_date [Date, nil] Start date in yyyy-mm-dd format. If not provided, queries from earliest availabl
|
|
39
|
+
#
|
|
40
|
+
# @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}]
|
|
41
|
+
|
|
42
|
+
# Aggregation type: DAY, WEEK, or MONTH. Defaults to DAY.
|
|
43
|
+
module Aggregation
|
|
44
|
+
extend EInvoiceAPI::Internal::Type::Enum
|
|
45
|
+
|
|
46
|
+
DAY = :DAY
|
|
47
|
+
WEEK = :WEEK
|
|
48
|
+
MONTH = :MONTH
|
|
49
|
+
|
|
50
|
+
# @!method self.values
|
|
51
|
+
# @return [Array<Symbol>]
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|