buchida 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fcf69caf904b7e44acd3566606f5f1ade948dfc6d01d094437067ae72310cbf
4
- data.tar.gz: 7f7c9892d7b633081b75d464fe775406a33d34f6d351fdd434a32a08a1bd0cdb
3
+ metadata.gz: 7dbd112ad5d392d35ec62955149963bbec35a8765644c4305939fb42d985b4de
4
+ data.tar.gz: bee7497ebefacd406ff96a6501e09df13e4b8009b5d814bdcbd79b4edec81aea
5
5
  SHA512:
6
- metadata.gz: dc088609542a0c45a81021a4e8bcc6861893c09df6483dbf0ae26c7f3f5906dd3c05c221b2d284c13577c2a087838591331ba48212f9502d3f50c19438b98fba
7
- data.tar.gz: 2f269621f280e5b4320be5d3d7b8079192c4686d09740db87186b51291f743c77f11c19bbd111b0c59fc0d2cbdb2f2112500d8f5b12317301044b77db4fea479
6
+ metadata.gz: 104960ce3956b0c51b243139a74c14fd045eef4d7f391d4b1bf41f0ccbdc290852507391cdd65d278b85b13ce89cea92d35260b6f5a8f6ffb7b80598ca917720
7
+ data.tar.gz: 814f8c84b3398dd20ba19d852523c946afd8099676db8cade70d9f3fe3c8724ef958fbcce35cd6bc1695c9f388ffd62a54a2dd9a7ed48b0d32da51ca68279553
@@ -24,13 +24,19 @@ module Buchida
24
24
  @client.request_object(:get, "/emails/#{id}")
25
25
  end
26
26
 
27
- def list(cursor: nil, limit: nil, status: nil, from: nil, to: nil)
27
+ # +from+ / +to+ filter by sender / recipient ADDRESS (not dates).
28
+ # +from_date+ / +to_date+ (ISO 8601) filter by creation date;
29
+ # +direction+ is "inbound" or "outbound".
30
+ def list(cursor: nil, limit: nil, status: nil, from: nil, to: nil, from_date: nil, to_date: nil, direction: nil)
28
31
  params = {}
29
32
  params[:cursor] = cursor if cursor
30
33
  params[:limit] = limit if limit
31
34
  params[:status] = status if status
32
35
  params[:from] = from if from
33
36
  params[:to] = to if to
37
+ params[:from_date] = from_date if from_date
38
+ params[:to_date] = to_date if to_date
39
+ params[:direction] = direction if direction
34
40
  qs = URI.encode_www_form(params) unless params.empty?
35
41
  path = qs ? "/emails?#{qs}" : "/emails"
36
42
  @client.request_list(:get, path)
@@ -7,8 +7,13 @@ module Buchida
7
7
  @client = client
8
8
  end
9
9
 
10
- def list
11
- @client.request_list(:get, "/templates")
10
+ # +status+ is "draft" or "published"; +search+ matches name/subject.
11
+ def list(status: nil, search: nil)
12
+ params = {}
13
+ params[:status] = status if status
14
+ params[:search] = search if search
15
+ path = params.empty? ? "/templates" : "/templates?#{URI.encode_www_form(params)}"
16
+ @client.request_list(:get, path)
12
17
  end
13
18
 
14
19
  def get(id)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Buchida
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buchida
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - buchida
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-13 00:00:00.000000000 Z
11
+ date: 2026-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest