multiwoven-integrations 0.1.40 → 0.1.41

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: fe7930e94008087332f002d0c0c38c10272faf015fd4df6d0ff99ce3431882cb
4
- data.tar.gz: 3949c86542bb76581ee712aa49b4c4ffc34e051d00b14fcb4f341eeddbc07af7
3
+ metadata.gz: 82b67da3db5fd718642d785a6c88d95aab50098e900ace51d275839b0282ce1d
4
+ data.tar.gz: 5e749c3149f853de00482ddb1899b622a062cf96b3ee22dfd428e0fa94a68ca9
5
5
  SHA512:
6
- metadata.gz: daf492cc2d89a62aa9085a7d400b677628dee18614c4b5320e30b8d076e3f2e4a69cce2495610c25f4ca95e1e6099ef2e94e490dbd77b03cbc590e5dbc91a0ca
7
- data.tar.gz: 113414676e43c7c62f941d6ad998453864a005cf4ded3b9a7e89b93995144c6ae22ddc405df3c954a402af6b8abe475c2e5aa6b32e40aebf959b308ce2a16488
6
+ metadata.gz: 18fc7eb3472d27029851e6768cec57b9d1cf0c13dd462938a76d7ecc3770f041be0f5c5de3609d5270869358e5080af969bca7296ee11bfb41244b40aa05bcf5
7
+ data.tar.gz: aaa27f548de6c20a6444644fe784ee708b7f6b8f9113812ab046d8b72ea161e114e16cc5d524a196aa479c707d3055143952658fd018a026e484905a2b30b7c4
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Multiwoven
4
4
  module Integrations
5
- VERSION = "0.1.40"
5
+ VERSION = "0.1.41"
6
6
 
7
7
  ENABLED_SOURCES = %w[
8
8
  Snowflake
@@ -9,7 +9,7 @@ module Multiwoven
9
9
  include Multiwoven::Integrations::Core
10
10
 
11
11
  API_VERSION = "59.0"
12
- SALESFORCE_OBJECTS = %w[Account User].freeze
12
+ SALESFORCE_OBJECTS = %w[Account User Visit RetailStore].freeze
13
13
 
14
14
  class Client < SourceConnector # rubocop:disable Metrics/ClassLength
15
15
  prepend Multiwoven::Integrations::Core::RateLimiter
@@ -55,13 +55,29 @@ module Multiwoven
55
55
 
56
56
  private
57
57
 
58
+ def query(connection, query)
59
+ exclude_keys = ["attributes"]
60
+ queried_data = connection.query(query)
61
+ results = queried_data.map do |record|
62
+ record.reject { |key, _| exclude_keys.include?(key) }
63
+ end
64
+ results.map do |row|
65
+ RecordMessage.new(data: row, emitted_at: Time.now.to_i).to_multiwoven_message
66
+ end
67
+ end
68
+
69
+ def create_connection(connection_config)
70
+ initialize_client(connection_config)
71
+ end
72
+
58
73
  def initialize_client(config)
59
74
  config = config.with_indifferent_access
60
75
  @client = Restforce.new(username: config[:username],
61
76
  password: config[:password] + config[:security_token],
62
77
  host: config[:host],
63
78
  client_id: config[:client_id],
64
- client_secret: config[:client_secret])
79
+ client_secret: config[:client_secret],
80
+ api_version: API_VERSION)
65
81
  end
66
82
 
67
83
  def salesforce_field_to_json_schema_type(sf_field) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/PerceivedComplexity
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multiwoven-integrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.40
4
+ version: 0.1.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - Subin T P