mparticle 1.0.9 → 1.0.10
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 +4 -4
- data/docs/Batch.md +3 -1
- data/lib/mparticle/api_client.rb +1 -1
- data/lib/mparticle/models/batch.rb +13 -4
- data/mparticle.gemspec +1 -1
- data/spec/models/batch_spec.rb +20 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b4b30c931a78c920091ae233dda6a478d5f2fbf9b57ca4470a8ee4d1fd866d1
|
4
|
+
data.tar.gz: 4a8f7748c45ab84b9a180c84001379b0d102b9b973c2b302ed1de367afcc3ccd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54b7b4841fec9dbac24534a31fcc003b360e3d49a165d9d330116b291005f9be7b85f6161387c7fc8f4351c0a2d0c867c1a36c2c14d3d8b5ff590e1b480a8403
|
7
|
+
data.tar.gz: 6aa790099163be36dfc190374048755bd905ae8d9b3476ffc1ca0687423a0e15f8f7b5926fbe766dba59ea8c620ce090dcc1fe9122c1e44bea843ade1d16743c
|
data/docs/Batch.md
CHANGED
@@ -18,4 +18,6 @@
|
|
18
18
|
| **api_key** | **String** | | [optional] |
|
19
19
|
| **mpid** | **Integer** | | [optional] |
|
20
20
|
| **mp_deviceid** | **String** | | [optional] |
|
21
|
-
| **timestamp_unixtime_ms** | **Integer** | | [optional] |
|
21
|
+
| **timestamp_unixtime_ms** | **Integer** | | [optional] |
|
22
|
+
| **context** | [**BatchContext**](BatchContext.md) | | [optional] |
|
23
|
+
| **integration_attributes** | **Hash<Integer,Hash<String,String>>** | | [optional] |
|
data/lib/mparticle/api_client.rb
CHANGED
@@ -19,7 +19,7 @@ module MParticle
|
|
19
19
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
20
20
|
def initialize(config)
|
21
21
|
@config = config
|
22
|
-
@user_agent = "mParticle Ruby client/1.0.
|
22
|
+
@user_agent = "mParticle Ruby client/1.0.10"
|
23
23
|
@default_headers = {
|
24
24
|
'Content-Type' => "application/json",
|
25
25
|
'User-Agent' => @user_agent
|
@@ -34,6 +34,8 @@ module MParticle
|
|
34
34
|
attr_accessor :timestamp_unixtime_ms
|
35
35
|
|
36
36
|
attr_accessor :context
|
37
|
+
|
38
|
+
attr_accessor :integration_attributes
|
37
39
|
|
38
40
|
class EnumAttributeValidator
|
39
41
|
attr_reader :datatype
|
@@ -115,7 +117,8 @@ module MParticle
|
|
115
117
|
:'mpid' => :'mpid',
|
116
118
|
:'mp_deviceid' => :'mp_deviceid',
|
117
119
|
:'timestamp_unixtime_ms' => :'timestamp_unixtime_ms',
|
118
|
-
:'context' => :'context'
|
120
|
+
:'context' => :'context',
|
121
|
+
:'integration_attributes' => :'integration_attributes'
|
119
122
|
}
|
120
123
|
end
|
121
124
|
|
@@ -137,7 +140,8 @@ module MParticle
|
|
137
140
|
:'mp_deviceid' => :'String',
|
138
141
|
:'timestamp_unixtime_ms' => :'Integer',
|
139
142
|
:'consent_state' => :'ConsentState',
|
140
|
-
:'context' => :'BatchContext'
|
143
|
+
:'context' => :'BatchContext',
|
144
|
+
:'integration_attributes' => :'Hash<Integer,Hash<String,String>>'
|
141
145
|
}
|
142
146
|
end
|
143
147
|
|
@@ -216,6 +220,10 @@ module MParticle
|
|
216
220
|
if attributes.has_key?(:'context')
|
217
221
|
self.context = attributes[:'context']
|
218
222
|
end
|
223
|
+
|
224
|
+
if attributes.has_key?(:'integration_attributes')
|
225
|
+
self.integration_attributes = attributes[:'integration_attributes']
|
226
|
+
end
|
219
227
|
|
220
228
|
end
|
221
229
|
|
@@ -267,7 +275,8 @@ module MParticle
|
|
267
275
|
api_key == o.api_key &&
|
268
276
|
mpid == o.mpid &&
|
269
277
|
mp_deviceid == o.mp_deviceid &&
|
270
|
-
timestamp_unixtime_ms == o.timestamp_unixtime_ms
|
278
|
+
timestamp_unixtime_ms == o.timestamp_unixtime_ms &&
|
279
|
+
integration_attributes == o.integration_attributes
|
271
280
|
end
|
272
281
|
|
273
282
|
# @see the `==` method
|
@@ -279,7 +288,7 @@ module MParticle
|
|
279
288
|
# Calculates hash code according to all attributes.
|
280
289
|
# @return [Fixnum] Hash code
|
281
290
|
def hash
|
282
|
-
[events, source_request_id, environment, ip, schema_version, device_info, application_info, user_attributes, deleted_user_attributes, user_identities, api_key, mpid, mp_deviceid, timestamp_unixtime_ms].hash
|
291
|
+
[events, source_request_id, environment, ip, schema_version, device_info, application_info, user_attributes, deleted_user_attributes, user_identities, api_key, mpid, mp_deviceid, timestamp_unixtime_ms, integration_attributes].hash
|
283
292
|
end
|
284
293
|
|
285
294
|
# Builds the object from hash
|
data/mparticle.gemspec
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'mparticle'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
describe 'Batch' do
|
5
|
+
it 'should create an instance of Batch' do
|
6
|
+
model = MParticle::Batch.new
|
7
|
+
expect(model).to be_an_instance_of MParticle::Batch
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should set integration attributes on batch' do
|
11
|
+
batch_model = MParticle::Batch.new
|
12
|
+
batch_model.integration_attributes = { 123 => { "foo" => "bar"}, 456 => { "foo" => "baz" }}
|
13
|
+
expect(batch_model.integration_attributes[123]["foo"]).to eq 'bar'
|
14
|
+
expect(batch_model.integration_attributes[456]["foo"]).to eq 'baz'
|
15
|
+
puts batch_model.to_hash
|
16
|
+
json = batch_model.to_hash.to_json
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mparticle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mParticle Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -142,6 +142,7 @@ files:
|
|
142
142
|
- lib/mparticle/version.rb
|
143
143
|
- mparticle.gemspec
|
144
144
|
- spec/models/app_event_spec.rb
|
145
|
+
- spec/models/batch_spec.rb
|
145
146
|
- spec/models/ccpa_consent_state_spec.rb
|
146
147
|
- spec/models/commerce_event_spec.rb
|
147
148
|
- spec/models/consent_state_spec.rb
|