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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8308b885dc052724e0e33e9c81c48b66962eaba058d4dbee48b23aa910c59409
4
- data.tar.gz: 4ec2ce62682cc068114983cc33841cb589cc67d9c272c99ec41757c3d6397f7a
3
+ metadata.gz: 3b4b30c931a78c920091ae233dda6a478d5f2fbf9b57ca4470a8ee4d1fd866d1
4
+ data.tar.gz: 4a8f7748c45ab84b9a180c84001379b0d102b9b973c2b302ed1de367afcc3ccd
5
5
  SHA512:
6
- metadata.gz: aef4d8bfb6b787652096f7648d8e9d1e34f496143fc9ebda570dfb3980d2decec02b69b3ff883d187078e98904ecaeddb373bba2e5c1139097736297de8d1756
7
- data.tar.gz: d59b4c4c687d46fa906629e7bca7bc420278356dec3f6bab162d480207bb9b8d073b82e068b3993bbea0317db581bf23de53eae2617c68e235d8bd1a069674d2
6
+ metadata.gz: 54b7b4841fec9dbac24534a31fcc003b360e3d49a165d9d330116b291005f9be7b85f6161387c7fc8f4351c0a2d0c867c1a36c2c14d3d8b5ff590e1b480a8403
7
+ data.tar.gz: 6aa790099163be36dfc190374048755bd905ae8d9b3476ffc1ca0687423a0e15f8f7b5926fbe766dba59ea8c620ce090dcc1fe9122c1e44bea843ade1d16743c
@@ -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] |
@@ -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.9"
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "mparticle"
3
- s.version = "1.0.9"
3
+ s.version = "1.0.10"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.authors = ["mParticle Inc."]
6
6
  s.email = ["support@mparticle.com"]
@@ -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.9
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 00:00:00.000000000 Z
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