seeuletter 1.4.1 → 1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5bc0dfd516e4b918a21c7c592788df8e12b98ccecc428fa59a0fac7c5ec4f771
4
- data.tar.gz: '0957b2824afb423e6a1e91a76644e84e58e0f4b1e10c1920afa453d414d9b2b7'
3
+ metadata.gz: 8d8f0ef5ad1a4a5fa1ecc2e9b8bb884c69bf7b7cafc404d9d4e5396315a1031c
4
+ data.tar.gz: 3bd27cfff44dad93249b43c4b41cfdfc623fff5040e8ff5da5cb6629ebfc5dde
5
5
  SHA512:
6
- metadata.gz: 33de5980a1dfa835a8c5547352b3a5f87c2562d504a66b2e128be536d347bb1b9847ca09890f09ad001bf1b8fc2f40cd197d6c0f78dcdb77568d0fb1c5740e4d
7
- data.tar.gz: b5e47137fc690881260c1357566e7187a73d05b993e9621a1ff1a4cc15015808c7ee4fe143541a5d65779026126f5d6e55a46ebce7aa427c8f149c77c4c4280c
6
+ metadata.gz: e705d29c734418ae29105a320286e0cc127957126b9b27e591d2b4567eade43d64dc00af7da3b09872475e082f24506fabbab1e64b82caa2f4965a90050e8365
7
+ data.tar.gz: 44202bd632ea59fdd7217d89ba05279f9f1eadb4b986ebd0f41e1884acc26fbff1ecbddd3744afa543604fb93c2fe91c8af7f5ca3a2c4efc26669309bb08cbcf
data/README.md CHANGED
@@ -59,6 +59,11 @@ For optional parameters and other details, refer to the docs [here](https://docs
59
59
  seeuletter = Seeuletter::Client.new(api_key: "your-api-key")
60
60
  ```
61
61
 
62
+ ```ruby
63
+ # To initialize a Seeuletter object configured with non default host api
64
+ seeuletter = Seeuletter::Client.new(api_key: "your-api-key", host: "127.0.0.1")
65
+ ```
66
+
62
67
  ### Letters
63
68
 
64
69
  #### Create a new letter
@@ -227,6 +232,6 @@ There are simple scripts to demonstrate how to create all letters with the Seeul
227
232
 
228
233
  =======================
229
234
 
230
- Copyright © 2017 Seeuletter.com
235
+ Copyright © 2024 Seeuletter.com
231
236
 
232
237
  Released under the MIT License, which can be found in the repository in `LICENSE.txt`.
data/examples/invoices.rb CHANGED
@@ -12,9 +12,14 @@ begin
12
12
  )
13
13
  puts "The Seeuletter API Invoices responded : #{list_response}"
14
14
 
15
- # get single invoice by API
16
- find_response = seeuletter.invoices.find(list_response['invoices'][0]['_id'])
17
- puts "The Seeuletter API Invoice responded : #{find_response}"
15
+ if list_response['invoices'].count > 0
16
+ # get single invoice by API
17
+ find_response = seeuletter.invoices.find(list_response['invoices'][0]['_id'])
18
+ puts "The Seeuletter API Invoice responded : #{find_response}"
19
+ else
20
+ # no invoice to get by API
21
+ puts "No invoice can be found"
22
+ end
18
23
 
19
24
  rescue Seeuletter::SeeuletterError => ex
20
25
  puts "Error from API : #{ex}"
@@ -93,7 +93,7 @@ module Seeuletter
93
93
  end
94
94
 
95
95
  def base_url
96
- "https://#{config[:api_key]}:@api.seeuletter.com"
96
+ "https://#{config[:api_key]}:@#{config[:host].nil? ? 'api.seeuletter.com' : config[:host]}"
97
97
  end
98
98
 
99
99
  def endpoint_url
@@ -1,3 +1,3 @@
1
1
  module Seeuletter
2
- VERSION = "1.4.1"
2
+ VERSION = "1.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seeuletter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seeuletter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-25 00:00:00.000000000 Z
11
+ date: 2024-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client