istox 0.1.116 → 0.1.117

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f29d1b7e68de95eeefa9c2b9b6360d12df362c84c4c237157e57bda9bd93b582
4
- data.tar.gz: a9f0a6349a081d0b3628cc200a5dd44e50b4a4908af8b1de8f1ee3b3f71f9d6f
3
+ metadata.gz: 4634f2ed68bcfd2d9cadd13f7cf7abf058cddbe6e62ab93870aad18a88d53ac2
4
+ data.tar.gz: 62ed8c4add8ede254bb43ebc106ac065c28bf4511580c77877838a7126608364
5
5
  SHA512:
6
- metadata.gz: aa32e45a7a16f59f6f2d65851eb403f277ff30d27bf39aaa574550725f811360f18e0fb40b5c4702bb6bce7b5762b9e6e73dffd8c89e97c9f757a7fc3e11c61e
7
- data.tar.gz: 6b8cb8ab35f24ff0bb9701c8215ffefc6ed098127ed71434fec663488cc2debba2f72fb2d2331fa3fcbc24ad16c1619585ace9ca805fbc5d7cbd85b4631208fb
6
+ metadata.gz: 91efe33a64efaa55e2ee02dc418aed1d314ef63aaea7ea3e901457e90da0621b8eb6d1722e1089f417b24a6530ac938fc22d347118aa9974547991aed26a1ab5
7
+ data.tar.gz: 56c01ec415f4cf928fa4c4f4072b3b8f2081d4be5efa089b6f309d8b26b9fae0e561951aa83761f448f2d65b86371225ba3f481d43fc357ee7b3a8c96a0eadce
@@ -83,6 +83,8 @@ module Istox
83
83
  manual_ack = queue_config['manual_ack'].nil? ? true : queue_config['manual_ack']
84
84
 
85
85
  queue.subscribe manual_ack: manual_ack do |delivery_info, metadata, payload|
86
+ log.info "Received message in consumer: #{klass}, raw payload: #{payload.inspect}"
87
+
86
88
  processing_paylod = JSON.parse(payload)
87
89
  payload_object = ::Istox::CommonHelper.to_open_struct(processing_paylod)
88
90
 
@@ -55,7 +55,12 @@ module Istox
55
55
  end
56
56
 
57
57
  # email, email can be an array of multiple emails or just string of single email address
58
- def email(emails, subject:, content:)
58
+ # sample attachments data
59
+ # [{
60
+ # fileName: "filename.pdf",
61
+ # base64: "<Base64 of the file>"
62
+ # }]
63
+ def email(emails, subject:, content:, attachments: nil)
59
64
  targets = []
60
65
  if emails.is_a?(Array)
61
66
  targets = emails
@@ -77,7 +82,8 @@ module Istox
77
82
  data: {
78
83
  to: targets,
79
84
  subject: subject,
80
- body: content
85
+ body: content,
86
+ attachments: attachments
81
87
  }
82
88
  }
83
89
  )
@@ -89,7 +95,12 @@ module Istox
89
95
  # istoxP1: auth.first_name,
90
96
  # <more other sample template attributes>: <other sample template data>,
91
97
  # }]
92
- def email_template(template_name, template_data_arr)
98
+ # sample attachments data
99
+ # [{
100
+ # fileName: "filename.zip",
101
+ # base64: "<Base64 of the file>"
102
+ # }]
103
+ def email_template(template_name, template_data_arr, attachments: nil)
93
104
  raise ArgumentError, 'Template name and template data arr cannot be empty' if template_name.blank? || template_data_arr.nil? ||
94
105
  template_data_arr.empty?
95
106
 
@@ -101,7 +112,8 @@ module Istox
101
112
  type: 'SEND_EMAIL_TEMPLATE',
102
113
  data: {
103
114
  template_name: template_name,
104
- template_data_arr: template_data_arr
115
+ template_data_arr: template_data_arr,
116
+ attachments: attachments
105
117
  }
106
118
  }
107
119
  )
data/lib/istox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = '0.1.116'.freeze
2
+ VERSION = '0.1.117'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: istox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.116
4
+ version: 0.1.117
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siong Leng