e-invoice-api 0.3.0 → 0.5.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.
@@ -3,7 +3,8 @@
3
3
  module EInvoiceAPI
4
4
  module Resources
5
5
  class Inbox
6
- # Retrieve a paginated list of received documents with filtering options.
6
+ # Retrieve a paginated list of received documents with filtering options including
7
+ # state, type, sender, date range, and text search.
7
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
10
  #
@@ -28,7 +28,8 @@ module EInvoiceAPI
28
28
  )
29
29
  end
30
30
 
31
- # Retrieve a paginated list of received documents with filtering options.
31
+ # Retrieve a paginated list of sent documents with filtering options including
32
+ # state, type, sender, date range, and text search.
32
33
  #
33
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: {})
34
35
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EInvoiceAPI
4
- VERSION = "0.3.0"
4
+ VERSION = "0.5.0"
5
5
  end
@@ -33,6 +33,9 @@ module EInvoiceAPI
33
33
  sig { returns(T.nilable(Integer)) }
34
34
  attr_accessor :status
35
35
 
36
+ sig { returns(T.nilable(T::Hash[String, String])) }
37
+ attr_accessor :headers
38
+
36
39
  sig { returns(T.nilable(T.anything)) }
37
40
  attr_accessor :body
38
41
 
@@ -41,6 +44,7 @@ module EInvoiceAPI
41
44
  params(
42
45
  url: URI::Generic,
43
46
  status: T.nilable(Integer),
47
+ headers: T.nilable(T::Hash[String, String]),
44
48
  body: T.nilable(Object),
45
49
  request: NilClass,
46
50
  response: NilClass,
@@ -50,6 +54,7 @@ module EInvoiceAPI
50
54
  def self.new(
51
55
  url:,
52
56
  status: nil,
57
+ headers: nil,
53
58
  body: nil,
54
59
  request: nil,
55
60
  response: nil,
@@ -70,6 +75,7 @@ module EInvoiceAPI
70
75
  params(
71
76
  url: URI::Generic,
72
77
  status: NilClass,
78
+ headers: T.nilable(T::Hash[String, String]),
73
79
  body: NilClass,
74
80
  request: NilClass,
75
81
  response: NilClass,
@@ -79,6 +85,7 @@ module EInvoiceAPI
79
85
  def self.new(
80
86
  url:,
81
87
  status: nil,
88
+ headers: nil,
82
89
  body: nil,
83
90
  request: nil,
84
91
  response: nil,
@@ -93,6 +100,7 @@ module EInvoiceAPI
93
100
  params(
94
101
  url: URI::Generic,
95
102
  status: NilClass,
103
+ headers: T.nilable(T::Hash[String, String]),
96
104
  body: NilClass,
97
105
  request: NilClass,
98
106
  response: NilClass,
@@ -102,6 +110,7 @@ module EInvoiceAPI
102
110
  def self.new(
103
111
  url:,
104
112
  status: nil,
113
+ headers: nil,
105
114
  body: nil,
106
115
  request: nil,
107
116
  response: nil,
@@ -116,13 +125,22 @@ module EInvoiceAPI
116
125
  params(
117
126
  url: URI::Generic,
118
127
  status: Integer,
128
+ headers: T.nilable(T::Hash[String, String]),
119
129
  body: T.nilable(Object),
120
130
  request: NilClass,
121
131
  response: NilClass,
122
132
  message: T.nilable(String)
123
133
  ).returns(T.attached_class)
124
134
  end
125
- def self.for(url:, status:, body:, request:, response:, message: nil)
135
+ def self.for(
136
+ url:,
137
+ status:,
138
+ headers:,
139
+ body:,
140
+ request:,
141
+ response:,
142
+ message: nil
143
+ )
126
144
  end
127
145
 
128
146
  sig { returns(Integer) }
@@ -133,13 +151,22 @@ module EInvoiceAPI
133
151
  params(
134
152
  url: URI::Generic,
135
153
  status: Integer,
154
+ headers: T.nilable(T::Hash[String, String]),
136
155
  body: T.nilable(Object),
137
156
  request: NilClass,
138
157
  response: NilClass,
139
158
  message: T.nilable(String)
140
159
  ).returns(T.attached_class)
141
160
  end
142
- def self.new(url:, status:, body:, request:, response:, message: nil)
161
+ def self.new(
162
+ url:,
163
+ status:,
164
+ headers:,
165
+ body:,
166
+ request:,
167
+ response:,
168
+ message: nil
169
+ )
143
170
  end
144
171
  end
145
172
 
@@ -85,10 +85,9 @@ module EInvoiceAPI
85
85
 
86
86
  # @api private
87
87
  sig do
88
- params(
89
- status: Integer,
90
- headers: T.any(T::Hash[String, String], Net::HTTPHeader)
91
- ).returns(T::Boolean)
88
+ params(status: Integer, headers: T::Hash[String, String]).returns(
89
+ T::Boolean
90
+ )
92
91
  end
93
92
  def should_retry?(status, headers:)
94
93
  end
@@ -99,7 +98,7 @@ module EInvoiceAPI
99
98
  request:
100
99
  EInvoiceAPI::Internal::Transport::BaseClient::RequestInput,
101
100
  status: Integer,
102
- response_headers: T.any(T::Hash[String, String], Net::HTTPHeader)
101
+ response_headers: T::Hash[String, String]
103
102
  ).returns(
104
103
  EInvoiceAPI::Internal::Transport::BaseClient::RequestInput
105
104
  )
@@ -31,7 +31,7 @@ module EInvoiceAPI
31
31
  client: EInvoiceAPI::Internal::Transport::BaseClient,
32
32
  req:
33
33
  EInvoiceAPI::Internal::Transport::BaseClient::RequestComponents,
34
- headers: T.any(T::Hash[String, String], Net::HTTPHeader),
34
+ headers: T::Hash[String, String],
35
35
  page_data: T.anything
36
36
  ).void
37
37
  end
@@ -361,7 +361,7 @@ module EInvoiceAPI
361
361
  # Assumes each chunk in stream has `Encoding::BINARY`.
362
362
  sig do
363
363
  params(
364
- headers: T.any(T::Hash[String, String], Net::HTTPHeader),
364
+ headers: T::Hash[String, String],
365
365
  stream: T::Enumerable[String],
366
366
  suppress_error: T::Boolean
367
367
  ).returns(T.anything)