mparticle 1.0.8 → 1.1.1
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/README.md +5 -0
- data/docs/Batch.md +3 -1
- data/docs/DeviceInformation.md +2 -0
- data/docs/UserIdentities.md +12 -0
- data/example/main.rb +7 -3
- data/lib/mparticle.rb +2 -0
- data/lib/mparticle/api_client.rb +1 -1
- data/lib/mparticle/models/batch.rb +26 -4
- data/lib/mparticle/models/batch_context.rb +177 -0
- data/lib/mparticle/models/data_plan_context.rb +186 -0
- data/lib/mparticle/models/device_information.rb +33 -3
- data/lib/mparticle/models/user_identities.rb +112 -4
- data/mparticle.gemspec +1 -1
- data/spec/models/batch_spec.rb +39 -0
- data/spec/models/ccpa_consent_state_spec.rb +1 -1
- data/spec/models/data_plan_context_spec.rb +19 -0
- data/spec/models/gdpr_consent_state_spec.rb +1 -1
- data/spec/models/user_identities_spec.rb +59 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c913a8245d602c812a7d248be5a2585cdf380a0018e0b3ec8bec9b6552477f7c
|
4
|
+
data.tar.gz: ee13e35cbf538ec7e45b306d5f6a723d9110bfe54db0b89ecbefdc791f7e73a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dd3ff99fd7117ae08690b69fb158d09c0ef6850e867c64506a4ced60f81f791fb83615b50bd9e1f9929f95ff5d289d476749d433fe35b9695ba78529f0b5908
|
7
|
+
data.tar.gz: 53639252fd0467e14a7dc248ae63518d8b6072f840f294b4aaa6dfdb936d769191469dd15a2ab4252d029ba6f5cdf3e3fddb3bb1677e9d793684c68d1f6925dd
|
data/README.md
CHANGED
@@ -41,6 +41,11 @@ api_instance = MParticle::EventsApi.new(config)
|
|
41
41
|
|
42
42
|
batch = MParticle::Batch.new
|
43
43
|
batch.environment = 'development'
|
44
|
+
batch.context = MParticle::BatchContext.new
|
45
|
+
|
46
|
+
batch.context.data_plan = MParticle::DataPlanContext.new
|
47
|
+
batch.context.data_plan.plan_id = 'my_plan_id'
|
48
|
+
batch.context.data_plan.plan_version = 1
|
44
49
|
|
45
50
|
user_identities = MParticle::UserIdentities.new
|
46
51
|
user_identities.customerid = '12345'
|
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/docs/DeviceInformation.md
CHANGED
@@ -35,6 +35,8 @@ Name | Type | Description | Notes
|
|
35
35
|
**has_nfc** | **BOOLEAN** | | [optional]
|
36
36
|
**bluetooth_enabled** | **BOOLEAN** | | [optional]
|
37
37
|
**bluetooth_version** | **String** | | [optional]
|
38
|
+
**att_timestamp_unixtime_ms** | **Integer** | | [optional]
|
39
|
+
**att_authorization_status** | **String** | | [optional]
|
38
40
|
**ios_idfv** | **String** | | [optional]
|
39
41
|
**android_advertising_id** | **String** | | [optional]
|
40
42
|
|
data/docs/UserIdentities.md
CHANGED
@@ -13,5 +13,17 @@ Name | Type | Description | Notes
|
|
13
13
|
**email** | **String** | | [optional]
|
14
14
|
**_alias** | **String** | | [optional]
|
15
15
|
**facebook_custom_audience_id** | **String** | | [optional]
|
16
|
+
**other_id_2** | **String** | | [optional]
|
17
|
+
**other_id_3** | **String** | | [optional]
|
18
|
+
**other_id_4** | **String** | | [optional]
|
19
|
+
**other_id_5** | **String** | | [optional]
|
20
|
+
**other_id_6** | **String** | | [optional]
|
21
|
+
**other_id_7** | **String** | | [optional]
|
22
|
+
**other_id_8** | **String** | | [optional]
|
23
|
+
**other_id_9** | **String** | | [optional]
|
24
|
+
**other_id_10** | **String** | | [optional]
|
25
|
+
**mobile_number** | **String** | | [optional]
|
26
|
+
**phone_number_2** | **String** | | [optional]
|
27
|
+
**phone_number_3** | **String** | | [optional]
|
16
28
|
|
17
29
|
|
data/example/main.rb
CHANGED
@@ -14,6 +14,10 @@ batch = MParticle::Batch.new
|
|
14
14
|
batch.timestamp_unixtime_ms = DateTime.now.strftime('%Q').to_i
|
15
15
|
batch.environment = 'development'
|
16
16
|
|
17
|
+
batch.device_info = MParticle::DeviceInformation.new
|
18
|
+
batch.device_info.att_timestamp_unixtime_ms = DateTime.now.strftime('%Q').to_i
|
19
|
+
batch.device_info.att_authorization_status = 'authorized'
|
20
|
+
|
17
21
|
user_identities = MParticle::UserIdentities.new
|
18
22
|
user_identities.customerid = '12345'
|
19
23
|
|
@@ -56,14 +60,14 @@ batch.user_identities = user_identities
|
|
56
60
|
ccpa_consent_state = MParticle::CCPAConsentState.new
|
57
61
|
ccpa_consent_state.document = 'document.agreement.v3'
|
58
62
|
ccpa_consent_state.consented = true
|
59
|
-
ccpa_consent_state.timestamp_unixtime_ms = Time.now.to_i
|
63
|
+
ccpa_consent_state.timestamp_unixtime_ms = (Time.now.to_f * 1000).to_i
|
60
64
|
ccpa_consent_state.location = 'mparticle.test/signup'
|
61
65
|
ccpa_consent_state.hardware_id = 'IDFA:a5d96n32-224a-3b11-1088-a202695bc710'
|
62
66
|
|
63
67
|
gdpr_consent_state = MParticle::GDPRConsentState.new
|
64
68
|
gdpr_consent_state.document = 'document_agreement.v2'
|
65
69
|
gdpr_consent_state.consented = true
|
66
|
-
gdpr_consent_state.timestamp_unixtime_ms = Time.now.to_i
|
70
|
+
gdpr_consent_state.timestamp_unixtime_ms = (Time.now.to_f * 1000).to_i
|
67
71
|
gdpr_consent_state.location = 'dtmgbank.com/signup'
|
68
72
|
gdpr_consent_state.hardware_id = 'IDFA:a5d934n0-232f-4afc-2e9a-3832d95zc702'
|
69
73
|
|
@@ -88,5 +92,5 @@ begin
|
|
88
92
|
# wait for the thread, otherwise process may exit too early
|
89
93
|
thread.join
|
90
94
|
rescue MParticle::ApiError => e
|
91
|
-
puts "Exception when calling mParticle: #{e.
|
95
|
+
puts "Exception when calling mParticle: #{e.code}"
|
92
96
|
end
|
data/lib/mparticle.rb
CHANGED
@@ -41,6 +41,8 @@ require 'mparticle/models/session_start_event'
|
|
41
41
|
require 'mparticle/models/shopping_cart'
|
42
42
|
require 'mparticle/models/source_information'
|
43
43
|
require 'mparticle/models/user_identities'
|
44
|
+
require 'mparticle/models/batch_context'
|
45
|
+
require 'mparticle/models/data_plan_context'
|
44
46
|
|
45
47
|
# APIs
|
46
48
|
require 'mparticle/api/events_api'
|
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.
|
22
|
+
@user_agent = "mParticle Ruby client/1.1.1"
|
23
23
|
@default_headers = {
|
24
24
|
'Content-Type' => "application/json",
|
25
25
|
'User-Agent' => @user_agent
|
@@ -33,6 +33,10 @@ module MParticle
|
|
33
33
|
|
34
34
|
attr_accessor :timestamp_unixtime_ms
|
35
35
|
|
36
|
+
attr_accessor :context
|
37
|
+
|
38
|
+
attr_accessor :integration_attributes
|
39
|
+
|
36
40
|
class EnumAttributeValidator
|
37
41
|
attr_reader :datatype
|
38
42
|
attr_reader :allowable_values
|
@@ -112,7 +116,9 @@ module MParticle
|
|
112
116
|
:'api_key' => :'api_key',
|
113
117
|
:'mpid' => :'mpid',
|
114
118
|
:'mp_deviceid' => :'mp_deviceid',
|
115
|
-
:'timestamp_unixtime_ms' => :'timestamp_unixtime_ms'
|
119
|
+
:'timestamp_unixtime_ms' => :'timestamp_unixtime_ms',
|
120
|
+
:'context' => :'context',
|
121
|
+
:'integration_attributes' => :'integration_attributes'
|
116
122
|
}
|
117
123
|
end
|
118
124
|
|
@@ -132,7 +138,10 @@ module MParticle
|
|
132
138
|
:'api_key' => :'String',
|
133
139
|
:'mpid' => :'Integer',
|
134
140
|
:'mp_deviceid' => :'String',
|
135
|
-
:'timestamp_unixtime_ms' => :'Integer'
|
141
|
+
:'timestamp_unixtime_ms' => :'Integer',
|
142
|
+
:'consent_state' => :'ConsentState',
|
143
|
+
:'context' => :'BatchContext',
|
144
|
+
:'integration_attributes' => :'Hash<Integer,Hash<String,String>>'
|
136
145
|
}
|
137
146
|
end
|
138
147
|
|
@@ -204,6 +213,18 @@ module MParticle
|
|
204
213
|
self.timestamp_unixtime_ms = attributes[:'timestamp_unixtime_ms']
|
205
214
|
end
|
206
215
|
|
216
|
+
if attributes.has_key?(:'consent_state')
|
217
|
+
self.consent_state = attributes[:'consent_state']
|
218
|
+
end
|
219
|
+
|
220
|
+
if attributes.has_key?(:'context')
|
221
|
+
self.context = attributes[:'context']
|
222
|
+
end
|
223
|
+
|
224
|
+
if attributes.has_key?(:'integration_attributes')
|
225
|
+
self.integration_attributes = attributes[:'integration_attributes']
|
226
|
+
end
|
227
|
+
|
207
228
|
end
|
208
229
|
|
209
230
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -254,7 +275,8 @@ module MParticle
|
|
254
275
|
api_key == o.api_key &&
|
255
276
|
mpid == o.mpid &&
|
256
277
|
mp_deviceid == o.mp_deviceid &&
|
257
|
-
timestamp_unixtime_ms == o.timestamp_unixtime_ms
|
278
|
+
timestamp_unixtime_ms == o.timestamp_unixtime_ms &&
|
279
|
+
integration_attributes == o.integration_attributes
|
258
280
|
end
|
259
281
|
|
260
282
|
# @see the `==` method
|
@@ -266,7 +288,7 @@ module MParticle
|
|
266
288
|
# Calculates hash code according to all attributes.
|
267
289
|
# @return [Fixnum] Hash code
|
268
290
|
def hash
|
269
|
-
[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
|
270
292
|
end
|
271
293
|
|
272
294
|
# Builds the object from hash
|
@@ -0,0 +1,177 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
3
|
+
module MParticle
|
4
|
+
|
5
|
+
class BatchContext
|
6
|
+
attr_accessor :data_plan
|
7
|
+
|
8
|
+
|
9
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
10
|
+
def self.attribute_map
|
11
|
+
{
|
12
|
+
:'data_plan' => :'data_plan'
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
# Attribute type mapping.
|
17
|
+
def self.swagger_types
|
18
|
+
{
|
19
|
+
:'data_plan' => :'DataPlanContext'
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
# Initializes the object
|
24
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
25
|
+
def initialize(attributes = {})
|
26
|
+
return unless attributes.is_a?(Hash)
|
27
|
+
|
28
|
+
# convert string to symbol for hash key
|
29
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
30
|
+
|
31
|
+
if attributes.has_key?(:'data_plan')
|
32
|
+
self.data_plan = attributes[:'data_plan']
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
38
|
+
# @return Array for valid properies with the reasons
|
39
|
+
def list_invalid_properties
|
40
|
+
invalid_properties = Array.new
|
41
|
+
return invalid_properties
|
42
|
+
end
|
43
|
+
|
44
|
+
# Check to see if the all the properties in the model are valid
|
45
|
+
# @return true if the model is valid
|
46
|
+
def valid?
|
47
|
+
return true
|
48
|
+
end
|
49
|
+
|
50
|
+
# Checks equality by comparing each attribute.
|
51
|
+
# @param [Object] Object to be compared
|
52
|
+
def ==(o)
|
53
|
+
return true if self.equal?(o)
|
54
|
+
self.class == o.class &&
|
55
|
+
data_plan == o.data_plan
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
# @see the `==` method
|
60
|
+
# @param [Object] Object to be compared
|
61
|
+
def eql?(o)
|
62
|
+
self == o
|
63
|
+
end
|
64
|
+
|
65
|
+
# Calculates hash code according to all attributes.
|
66
|
+
# @return [Fixnum] Hash code
|
67
|
+
def hash
|
68
|
+
[data_plan].hash
|
69
|
+
end
|
70
|
+
|
71
|
+
# Builds the object from hash
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
73
|
+
# @return [Object] Returns the model itself
|
74
|
+
def build_from_hash(attributes)
|
75
|
+
return nil unless attributes.is_a?(Hash)
|
76
|
+
self.class.swagger_types.each_pair do |key, type|
|
77
|
+
if type =~ /\AArray<(.*)>/i
|
78
|
+
# check to ensure the input is an array given that the the attribute
|
79
|
+
# is documented as an array but the input is not
|
80
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
81
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
82
|
+
end
|
83
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
84
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
85
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
86
|
+
end
|
87
|
+
|
88
|
+
self
|
89
|
+
end
|
90
|
+
|
91
|
+
# Deserializes the data based on type
|
92
|
+
# @param string type Data type
|
93
|
+
# @param string value Value to be deserialized
|
94
|
+
# @return [Object] Deserialized data
|
95
|
+
def _deserialize(type, value)
|
96
|
+
case type.to_sym
|
97
|
+
when :DateTime
|
98
|
+
DateTime.parse(value)
|
99
|
+
when :Date
|
100
|
+
Date.parse(value)
|
101
|
+
when :String
|
102
|
+
value.to_s
|
103
|
+
when :Integer
|
104
|
+
value.to_i
|
105
|
+
when :Float
|
106
|
+
value.to_f
|
107
|
+
when :BOOLEAN
|
108
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
109
|
+
true
|
110
|
+
else
|
111
|
+
false
|
112
|
+
end
|
113
|
+
when :Object
|
114
|
+
# generic object (usually a Hash), return directly
|
115
|
+
value
|
116
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
117
|
+
inner_type = Regexp.last_match[:inner_type]
|
118
|
+
value.map { |v| _deserialize(inner_type, v) }
|
119
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
120
|
+
k_type = Regexp.last_match[:k_type]
|
121
|
+
v_type = Regexp.last_match[:v_type]
|
122
|
+
{}.tap do |hash|
|
123
|
+
value.each do |k, v|
|
124
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
125
|
+
end
|
126
|
+
end
|
127
|
+
else # model
|
128
|
+
temp_model = MParticle.const_get(type).new
|
129
|
+
temp_model.build_from_hash(value)
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
# Returns the string representation of the object
|
134
|
+
# @return [String] String presentation of the object
|
135
|
+
def to_s
|
136
|
+
to_hash.to_s
|
137
|
+
end
|
138
|
+
|
139
|
+
# to_body is an alias to to_hash (backward compatibility)
|
140
|
+
# @return [Hash] Returns the object in the form of hash
|
141
|
+
def to_body
|
142
|
+
to_hash
|
143
|
+
end
|
144
|
+
|
145
|
+
# Returns the object in the form of hash
|
146
|
+
# @return [Hash] Returns the object in the form of hash
|
147
|
+
def to_hash
|
148
|
+
hash = {}
|
149
|
+
self.class.attribute_map.each_pair do |attr, param|
|
150
|
+
value = self.send(attr)
|
151
|
+
next if value.nil?
|
152
|
+
hash[param] = _to_hash(value)
|
153
|
+
end
|
154
|
+
hash
|
155
|
+
end
|
156
|
+
|
157
|
+
# Outputs non-array value in the form of hash
|
158
|
+
# For object, use to_hash. Otherwise, just return the value
|
159
|
+
# @param [Object] value Any valid value
|
160
|
+
# @return [Hash] Returns the value in the form of hash
|
161
|
+
def _to_hash(value)
|
162
|
+
if value.is_a?(Array)
|
163
|
+
value.compact.map{ |v| _to_hash(v) }
|
164
|
+
elsif value.is_a?(Hash)
|
165
|
+
{}.tap do |hash|
|
166
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
167
|
+
end
|
168
|
+
elsif value.respond_to? :to_hash
|
169
|
+
value.to_hash
|
170
|
+
else
|
171
|
+
value
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
end
|
176
|
+
|
177
|
+
end
|
@@ -0,0 +1,186 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
3
|
+
module MParticle
|
4
|
+
|
5
|
+
class DataPlanContext
|
6
|
+
attr_accessor :plan_id
|
7
|
+
|
8
|
+
attr_accessor :plan_version
|
9
|
+
|
10
|
+
|
11
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
12
|
+
def self.attribute_map
|
13
|
+
{
|
14
|
+
:'plan_id' => :'plan_id',
|
15
|
+
:'plan_version' => :'plan_version'
|
16
|
+
}
|
17
|
+
end
|
18
|
+
|
19
|
+
# Attribute type mapping.
|
20
|
+
def self.swagger_types
|
21
|
+
{
|
22
|
+
:'plan_id' => :'String',
|
23
|
+
:'plan_version' => :'Integer'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Initializes the object
|
28
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
29
|
+
def initialize(attributes = {})
|
30
|
+
return unless attributes.is_a?(Hash)
|
31
|
+
|
32
|
+
# convert string to symbol for hash key
|
33
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
34
|
+
|
35
|
+
if attributes.has_key?(:'plan_id')
|
36
|
+
self.plan_id = attributes[:'plan_id']
|
37
|
+
end
|
38
|
+
|
39
|
+
if attributes.has_key?(:'plan_version')
|
40
|
+
self.plan_version = attributes[:'plan_version']
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
46
|
+
# @return Array for valid properies with the reasons
|
47
|
+
def list_invalid_properties
|
48
|
+
invalid_properties = Array.new
|
49
|
+
return invalid_properties
|
50
|
+
end
|
51
|
+
|
52
|
+
# Check to see if the all the properties in the model are valid
|
53
|
+
# @return true if the model is valid
|
54
|
+
def valid?
|
55
|
+
return true
|
56
|
+
end
|
57
|
+
|
58
|
+
# Checks equality by comparing each attribute.
|
59
|
+
# @param [Object] Object to be compared
|
60
|
+
def ==(o)
|
61
|
+
return true if self.equal?(o)
|
62
|
+
self.class == o.class &&
|
63
|
+
plan_id == o.plan_id &&
|
64
|
+
plan_version == o.plan_version
|
65
|
+
|
66
|
+
end
|
67
|
+
|
68
|
+
# @see the `==` method
|
69
|
+
# @param [Object] Object to be compared
|
70
|
+
def eql?(o)
|
71
|
+
self == o
|
72
|
+
end
|
73
|
+
|
74
|
+
# Calculates hash code according to all attributes.
|
75
|
+
# @return [Fixnum] Hash code
|
76
|
+
def hash
|
77
|
+
[plan_id, plan_version].hash
|
78
|
+
end
|
79
|
+
|
80
|
+
# Builds the object from hash
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
82
|
+
# @return [Object] Returns the model itself
|
83
|
+
def build_from_hash(attributes)
|
84
|
+
return nil unless attributes.is_a?(Hash)
|
85
|
+
self.class.swagger_types.each_pair do |key, type|
|
86
|
+
if type =~ /\AArray<(.*)>/i
|
87
|
+
# check to ensure the input is an array given that the the attribute
|
88
|
+
# is documented as an array but the input is not
|
89
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
90
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
91
|
+
end
|
92
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
93
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
94
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
95
|
+
end
|
96
|
+
|
97
|
+
self
|
98
|
+
end
|
99
|
+
|
100
|
+
# Deserializes the data based on type
|
101
|
+
# @param string type Data type
|
102
|
+
# @param string value Value to be deserialized
|
103
|
+
# @return [Object] Deserialized data
|
104
|
+
def _deserialize(type, value)
|
105
|
+
case type.to_sym
|
106
|
+
when :DateTime
|
107
|
+
DateTime.parse(value)
|
108
|
+
when :Date
|
109
|
+
Date.parse(value)
|
110
|
+
when :String
|
111
|
+
value.to_s
|
112
|
+
when :Integer
|
113
|
+
value.to_i
|
114
|
+
when :Float
|
115
|
+
value.to_f
|
116
|
+
when :BOOLEAN
|
117
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
118
|
+
true
|
119
|
+
else
|
120
|
+
false
|
121
|
+
end
|
122
|
+
when :Object
|
123
|
+
# generic object (usually a Hash), return directly
|
124
|
+
value
|
125
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
126
|
+
inner_type = Regexp.last_match[:inner_type]
|
127
|
+
value.map { |v| _deserialize(inner_type, v) }
|
128
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
129
|
+
k_type = Regexp.last_match[:k_type]
|
130
|
+
v_type = Regexp.last_match[:v_type]
|
131
|
+
{}.tap do |hash|
|
132
|
+
value.each do |k, v|
|
133
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
134
|
+
end
|
135
|
+
end
|
136
|
+
else # model
|
137
|
+
temp_model = MParticle.const_get(type).new
|
138
|
+
temp_model.build_from_hash(value)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
# Returns the string representation of the object
|
143
|
+
# @return [String] String presentation of the object
|
144
|
+
def to_s
|
145
|
+
to_hash.to_s
|
146
|
+
end
|
147
|
+
|
148
|
+
# to_body is an alias to to_hash (backward compatibility)
|
149
|
+
# @return [Hash] Returns the object in the form of hash
|
150
|
+
def to_body
|
151
|
+
to_hash
|
152
|
+
end
|
153
|
+
|
154
|
+
# Returns the object in the form of hash
|
155
|
+
# @return [Hash] Returns the object in the form of hash
|
156
|
+
def to_hash
|
157
|
+
hash = {}
|
158
|
+
self.class.attribute_map.each_pair do |attr, param|
|
159
|
+
value = self.send(attr)
|
160
|
+
next if value.nil?
|
161
|
+
hash[param] = _to_hash(value)
|
162
|
+
end
|
163
|
+
hash
|
164
|
+
end
|
165
|
+
|
166
|
+
# Outputs non-array value in the form of hash
|
167
|
+
# For object, use to_hash. Otherwise, just return the value
|
168
|
+
# @param [Object] value Any valid value
|
169
|
+
# @return [Hash] Returns the value in the form of hash
|
170
|
+
def _to_hash(value)
|
171
|
+
if value.is_a?(Array)
|
172
|
+
value.compact.map{ |v| _to_hash(v) }
|
173
|
+
elsif value.is_a?(Hash)
|
174
|
+
{}.tap do |hash|
|
175
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
176
|
+
end
|
177
|
+
elsif value.respond_to? :to_hash
|
178
|
+
value.to_hash
|
179
|
+
else
|
180
|
+
value
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
end
|
185
|
+
|
186
|
+
end
|
@@ -67,6 +67,10 @@ module MParticle
|
|
67
67
|
|
68
68
|
attr_accessor :bluetooth_version
|
69
69
|
|
70
|
+
attr_accessor :att_timestamp_unixtime_ms
|
71
|
+
|
72
|
+
attr_accessor :att_authorization_status
|
73
|
+
|
70
74
|
attr_accessor :ios_idfv
|
71
75
|
|
72
76
|
attr_accessor :android_advertising_id
|
@@ -128,6 +132,8 @@ module MParticle
|
|
128
132
|
:'has_nfc' => :'has_nfc',
|
129
133
|
:'bluetooth_enabled' => :'bluetooth_enabled',
|
130
134
|
:'bluetooth_version' => :'bluetooth_version',
|
135
|
+
:'att_timestamp_unixtime_ms' => :'att_timestamp_unixtime_ms',
|
136
|
+
:'att_authorization_status' => :'att_authorization_status',
|
131
137
|
:'ios_idfv' => :'ios_idfv',
|
132
138
|
:'android_advertising_id' => :'android_advertising_id'
|
133
139
|
}
|
@@ -168,6 +174,8 @@ module MParticle
|
|
168
174
|
:'has_nfc' => :'BOOLEAN',
|
169
175
|
:'bluetooth_enabled' => :'BOOLEAN',
|
170
176
|
:'bluetooth_version' => :'String',
|
177
|
+
:'att_timestamp_unixtime_ms' => :'Integer',
|
178
|
+
:'att_authorization_status' => :'String',
|
171
179
|
:'ios_idfv' => :'String',
|
172
180
|
:'android_advertising_id' => :'String'
|
173
181
|
}
|
@@ -309,6 +317,14 @@ module MParticle
|
|
309
317
|
self.bluetooth_version = attributes[:'bluetooth_version']
|
310
318
|
end
|
311
319
|
|
320
|
+
if attributes.has_key?(:'att_timestamp_unixtime_ms')
|
321
|
+
self.att_timestamp_unixtime_ms = attributes[:'att_timestamp_unixtime_ms']
|
322
|
+
end
|
323
|
+
|
324
|
+
if attributes.has_key?(:'att_authorization_status')
|
325
|
+
self.att_authorization_status = attributes[:'att_authorization_status']
|
326
|
+
end
|
327
|
+
|
312
328
|
if attributes.has_key?(:'ios_idfv')
|
313
329
|
self.ios_idfv = attributes[:'ios_idfv']
|
314
330
|
end
|
@@ -329,21 +345,33 @@ module MParticle
|
|
329
345
|
# Check to see if the all the properties in the model are valid
|
330
346
|
# @return true if the model is valid
|
331
347
|
def valid?
|
332
|
-
platform_validator = EnumAttributeValidator.new('String', ["Unknown", "iOS", "Android", "tvOS"])
|
348
|
+
platform_validator = EnumAttributeValidator.new('String', ["Unknown", "iOS", "Android", "web", "tvOS", "roku", "out_of_band", "alexa", "smart_tv", "fire_tv", "xbox"])
|
349
|
+
att_validator = EnumAttributeValidator.new('String', ["authorized", "denied", "not_determined", "restricted"])
|
333
350
|
return false unless platform_validator.valid?(@platform)
|
351
|
+
return false unless att_validator.valid?(@att_authorization_status)
|
334
352
|
return true
|
335
353
|
end
|
336
354
|
|
337
355
|
# Custom attribute writer method checking allowed values (enum).
|
338
356
|
# @param [Object] platform Object to be assigned
|
339
357
|
def platform=(platform)
|
340
|
-
validator = EnumAttributeValidator.new('String', ["Unknown", "iOS", "Android", "tvOS"])
|
358
|
+
validator = EnumAttributeValidator.new('String', ["Unknown", "iOS", "Android", "web", "tvOS", "roku", "out_of_band", "alexa", "smart_tv", "fire_tv", "xbox"])
|
341
359
|
unless validator.valid?(platform)
|
342
360
|
fail ArgumentError, "invalid value for 'platform', must be one of #{validator.allowable_values}."
|
343
361
|
end
|
344
362
|
@platform = platform
|
345
363
|
end
|
346
364
|
|
365
|
+
# Custom attribute writer method checking allowed values (enum).
|
366
|
+
# @param [Object] att_authorization_status Object to be assigned
|
367
|
+
def att_authorization_status=(att_authorization_status)
|
368
|
+
validator = EnumAttributeValidator.new('String', ["authorized", "denied", "not_determined", "restricted"])
|
369
|
+
unless validator.valid?(att_authorization_status)
|
370
|
+
fail ArgumentError, "invalid value for 'att_authorization_status', must be one of #{validator.allowable_values}."
|
371
|
+
end
|
372
|
+
@att_authorization_status = att_authorization_status
|
373
|
+
end
|
374
|
+
|
347
375
|
# Checks equality by comparing each attribute.
|
348
376
|
# @param [Object] Object to be compared
|
349
377
|
def ==(o)
|
@@ -381,6 +409,8 @@ module MParticle
|
|
381
409
|
has_nfc == o.has_nfc &&
|
382
410
|
bluetooth_enabled == o.bluetooth_enabled &&
|
383
411
|
bluetooth_version == o.bluetooth_version &&
|
412
|
+
att_timestamp_unixtime_ms == o.att_timestamp_unixtime_ms &&
|
413
|
+
att_authorization_status == o.att_authorization_status &&
|
384
414
|
ios_idfv == o.ios_idfv &&
|
385
415
|
android_advertising_id == o.android_advertising_id
|
386
416
|
end
|
@@ -394,7 +424,7 @@ module MParticle
|
|
394
424
|
# Calculates hash code according to all attributes.
|
395
425
|
# @return [Fixnum] Hash code
|
396
426
|
def hash
|
397
|
-
[brand, product, device, android_uuid, device_manufacturer, platform, os_version, device_model, screen_height, screen_width, screen_dpi, device_country, locale_language, locale_country, network_country, network_carrier, network_code, network_mobile_country_code, timezone_offset, build_identifier, http_header_user_agent, ios_advertising_id, push_token, cpu_architecture, is_tablet, push_notification_sound_enabled, push_notification_vibrate_enabled, radio_access_technology, supports_telephony, has_nfc, bluetooth_enabled, bluetooth_version, ios_idfv, android_advertising_id].hash
|
427
|
+
[brand, product, device, android_uuid, device_manufacturer, platform, os_version, device_model, screen_height, screen_width, screen_dpi, device_country, locale_language, locale_country, network_country, network_carrier, network_code, network_mobile_country_code, timezone_offset, build_identifier, http_header_user_agent, ios_advertising_id, push_token, cpu_architecture, is_tablet, push_notification_sound_enabled, push_notification_vibrate_enabled, radio_access_technology, supports_telephony, has_nfc, bluetooth_enabled, bluetooth_version, att_timestamp_unixtime_ms, att_authorization_status, ios_idfv, android_advertising_id].hash
|
398
428
|
end
|
399
429
|
|
400
430
|
# Builds the object from hash
|
@@ -23,6 +23,30 @@ module MParticle
|
|
23
23
|
|
24
24
|
attr_accessor :facebook_custom_audience_id
|
25
25
|
|
26
|
+
attr_accessor :other_id_2
|
27
|
+
|
28
|
+
attr_accessor :other_id_3
|
29
|
+
|
30
|
+
attr_accessor :other_id_4
|
31
|
+
|
32
|
+
attr_accessor :other_id_5
|
33
|
+
|
34
|
+
attr_accessor :other_id_6
|
35
|
+
|
36
|
+
attr_accessor :other_id_7
|
37
|
+
|
38
|
+
attr_accessor :other_id_8
|
39
|
+
|
40
|
+
attr_accessor :other_id_9
|
41
|
+
|
42
|
+
attr_accessor :other_id_10
|
43
|
+
|
44
|
+
attr_accessor :mobile_number
|
45
|
+
|
46
|
+
attr_accessor :phone_number_2
|
47
|
+
|
48
|
+
attr_accessor :phone_number_3
|
49
|
+
|
26
50
|
|
27
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
52
|
def self.attribute_map
|
@@ -36,7 +60,19 @@ module MParticle
|
|
36
60
|
:'yahoo' => :'yahoo',
|
37
61
|
:'email' => :'email',
|
38
62
|
:'_alias' => :'alias',
|
39
|
-
:'facebook_custom_audience_id' => :'facebook_custom_audience_id'
|
63
|
+
:'facebook_custom_audience_id' => :'facebook_custom_audience_id',
|
64
|
+
:'other_id_2' => :'other_id_2',
|
65
|
+
:'other_id_3' => :'other_id_3',
|
66
|
+
:'other_id_4' => :'other_id_4',
|
67
|
+
:'other_id_5' => :'other_id_5',
|
68
|
+
:'other_id_6' => :'other_id_6',
|
69
|
+
:'other_id_7' => :'other_id_7',
|
70
|
+
:'other_id_8' => :'other_id_8',
|
71
|
+
:'other_id_9' => :'other_id_9',
|
72
|
+
:'other_id_10' => :'other_id_10',
|
73
|
+
:'mobile_number' => :'mobile_number',
|
74
|
+
:'phone_number_2' => :'phone_number_2',
|
75
|
+
:'phone_number_3' => :'phone_number_3'
|
40
76
|
}
|
41
77
|
end
|
42
78
|
|
@@ -52,7 +88,19 @@ module MParticle
|
|
52
88
|
:'yahoo' => :'String',
|
53
89
|
:'email' => :'String',
|
54
90
|
:'_alias' => :'String',
|
55
|
-
:'facebook_custom_audience_id' => :'String'
|
91
|
+
:'facebook_custom_audience_id' => :'String',
|
92
|
+
:'other_id_2' => :'String',
|
93
|
+
:'other_id_3' => :'String',
|
94
|
+
:'other_id_4' => :'String',
|
95
|
+
:'other_id_5' => :'String',
|
96
|
+
:'other_id_6' => :'String',
|
97
|
+
:'other_id_7' => :'String',
|
98
|
+
:'other_id_8' => :'String',
|
99
|
+
:'other_id_9' => :'String',
|
100
|
+
:'other_id_10' => :'String',
|
101
|
+
:'mobile_number' => :'String',
|
102
|
+
:'phone_number_2' => :'String',
|
103
|
+
:'phone_number_3' => :'String'
|
56
104
|
}
|
57
105
|
end
|
58
106
|
|
@@ -104,6 +152,54 @@ module MParticle
|
|
104
152
|
self.facebook_custom_audience_id = attributes[:'facebook_custom_audience_id']
|
105
153
|
end
|
106
154
|
|
155
|
+
if attributes.has_key?(:'other_id_2')
|
156
|
+
self.other_id_2 = attributes[:'other_id_2']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.has_key?(:'other_id_3')
|
160
|
+
self.other_id_3 = attributes[:'other_id_3']
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.has_key?(:'other_id_4')
|
164
|
+
self.other_id_4 = attributes[:'other_id_4']
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.has_key?(:'other_id_5')
|
168
|
+
self.other_id_5 = attributes[:'other_id_5']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.has_key?(:'other_id_6')
|
172
|
+
self.other_id_6 = attributes[:'other_id_6']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.has_key?(:'other_id_7')
|
176
|
+
self.other_id_7 = attributes[:'other_id_7']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.has_key?(:'other_id_8')
|
180
|
+
self.other_id_8 = attributes[:'other_id_8']
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.has_key?(:'other_id_9')
|
184
|
+
self.other_id_9 = attributes[:'other_id_9']
|
185
|
+
end
|
186
|
+
|
187
|
+
if attributes.has_key?(:'other_id_10')
|
188
|
+
self.other_id_10 = attributes[:'other_id_10']
|
189
|
+
end
|
190
|
+
|
191
|
+
if attributes.has_key?(:'mobile_number')
|
192
|
+
self.mobile_number = attributes[:'mobile_number']
|
193
|
+
end
|
194
|
+
|
195
|
+
if attributes.has_key?(:'phone_number_2')
|
196
|
+
self.phone_number_2 = attributes[:'phone_number_2']
|
197
|
+
end
|
198
|
+
|
199
|
+
if attributes.has_key?(:'phone_number_3')
|
200
|
+
self.phone_number_3 = attributes[:'phone_number_3']
|
201
|
+
end
|
202
|
+
|
107
203
|
end
|
108
204
|
|
109
205
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -133,7 +229,19 @@ module MParticle
|
|
133
229
|
yahoo == o.yahoo &&
|
134
230
|
email == o.email &&
|
135
231
|
_alias == o._alias &&
|
136
|
-
facebook_custom_audience_id == o.facebook_custom_audience_id
|
232
|
+
facebook_custom_audience_id == o.facebook_custom_audience_id &&
|
233
|
+
other_id_2 == o.other_id_2 &&
|
234
|
+
other_id_3 == o.other_id_3 &&
|
235
|
+
other_id_4 == o.other_id_4 &&
|
236
|
+
other_id_5 == o.other_id_5 &&
|
237
|
+
other_id_6 == o.other_id_6 &&
|
238
|
+
other_id_7 == o.other_id_7 &&
|
239
|
+
other_id_8 == o.other_id_8 &&
|
240
|
+
other_id_9 == o.other_id_9 &&
|
241
|
+
other_id_10 == o.other_id_10 &&
|
242
|
+
mobile_number == o.mobile_number &&
|
243
|
+
phone_number_2 == o.phone_number_2 &&
|
244
|
+
phone_number_3 == o.phone_number_3
|
137
245
|
end
|
138
246
|
|
139
247
|
# @see the `==` method
|
@@ -145,7 +253,7 @@ module MParticle
|
|
145
253
|
# Calculates hash code according to all attributes.
|
146
254
|
# @return [Fixnum] Hash code
|
147
255
|
def hash
|
148
|
-
[other, customerid, facebook, twitter, google, microsoft, yahoo, email, _alias, facebook_custom_audience_id].hash
|
256
|
+
[other, customerid, facebook, twitter, google, microsoft, yahoo, email, _alias, facebook_custom_audience_id, other_id_2, other_id_3, other_id_4, other_id_5, other_id_6, other_id_7, other_id_8, other_id_9, other_id_10, mobile_number, phone_number_2, phone_number_3].hash
|
149
257
|
end
|
150
258
|
|
151
259
|
# Builds the object from hash
|
data/mparticle.gemspec
CHANGED
@@ -0,0 +1,39 @@
|
|
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
|
+
it 'should have the property att_timestamp_unixtime_ms {base name: "att_timestamp_unixtime_ms" }' do
|
21
|
+
device_info = MParticle::DeviceInformation.new
|
22
|
+
now = (Time.now.to_f * 1000).to_i
|
23
|
+
device_info.att_timestamp_unixtime_ms = now
|
24
|
+
expect(device_info.att_timestamp_unixtime_ms).to eq now
|
25
|
+
puts device_info.to_hash
|
26
|
+
json = device_info.to_hash.to_json
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'should have the property att_authorization_status {base name: "att_authorization_status" }' do
|
31
|
+
device_info = MParticle::DeviceInformation.new
|
32
|
+
device_info.att_authorization_status = 'authorized'
|
33
|
+
expect(device_info.att_authorization_status).to eq('authorized')
|
34
|
+
puts device_info.to_hash
|
35
|
+
json = device_info.to_hash.to_json
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
@@ -13,7 +13,7 @@ describe 'CCPAConsentState' do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
it 'should have the property timestamp_unixtime_ms {base name: "timestamp_unixtime_ms" }' do
|
16
|
-
now = Time.now.to_i
|
16
|
+
now = (Time.now.to_f * 1000).to_i
|
17
17
|
model = MParticle::CCPAConsentState.new
|
18
18
|
model.timestamp_unixtime_ms = now
|
19
19
|
expect(model.timestamp_unixtime_ms).to eq now
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'mparticle'
|
2
|
+
|
3
|
+
describe 'DataPlanContext' do
|
4
|
+
it 'should create an instance of DataPlanContext' do
|
5
|
+
model = MParticle::DataPlanContext.new
|
6
|
+
expect(model).to be_an_instance_of MParticle::DataPlanContext
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should set context on batch' do
|
10
|
+
batch_model = MParticle::Batch.new
|
11
|
+
batch_model.context = MParticle::BatchContext.new
|
12
|
+
batch_model.context.data_plan = MParticle::DataPlanContext.new
|
13
|
+
batch_model.context.data_plan.plan_id = 'foo_dp_id'
|
14
|
+
batch_model.context.data_plan.plan_version = 5
|
15
|
+
expect(batch_model.context.data_plan.plan_id).to eq('foo_dp_id')
|
16
|
+
expect(batch_model.context.data_plan.plan_version).to eq(5)
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -19,7 +19,7 @@ describe 'GDPRConsentState' do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
it 'should have the property timestamp_unixtime_ms {base name: "timestamp_unixtime_ms" }' do
|
22
|
-
now = Time.now.to_i
|
22
|
+
now = (Time.now.to_f * 1000).to_i
|
23
23
|
model = MParticle::GDPRConsentState.new
|
24
24
|
model.timestamp_unixtime_ms = now
|
25
25
|
expect(model.timestamp_unixtime_ms).to eq now
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'mparticle'
|
2
|
+
|
3
|
+
describe 'UserIdentities' do
|
4
|
+
it 'should create an instance of UserIdentities' do
|
5
|
+
model = MParticle::UserIdentities.new
|
6
|
+
expect(model).to be_an_instance_of MParticle::UserIdentities
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should set all identities' do
|
10
|
+
model = MParticle::UserIdentities.new
|
11
|
+
model.other = 'foo_other'
|
12
|
+
expect(model.other).to eq('foo_other')
|
13
|
+
model.customerid = 'foo_customerid'
|
14
|
+
expect(model.customerid).to eq('foo_customerid')
|
15
|
+
model.facebook = 'foo_facebook'
|
16
|
+
expect(model.facebook).to eq('foo_facebook')
|
17
|
+
model.twitter = 'foo_twitter'
|
18
|
+
expect(model.twitter).to eq('foo_twitter')
|
19
|
+
model.google = 'foo_google'
|
20
|
+
expect(model.google).to eq('foo_google')
|
21
|
+
model.microsoft = 'foo_microsoft'
|
22
|
+
expect(model.microsoft).to eq('foo_microsoft')
|
23
|
+
model.yahoo = 'foo_yahoo'
|
24
|
+
expect(model.yahoo).to eq('foo_yahoo')
|
25
|
+
model.email = 'foo_email'
|
26
|
+
expect(model.email).to eq('foo_email')
|
27
|
+
model._alias = 'foo_alias'
|
28
|
+
expect(model._alias).to eq('foo_alias')
|
29
|
+
model.facebook_custom_audience_id = 'foo_fbid'
|
30
|
+
expect(model.facebook_custom_audience_id).to eq('foo_fbid')
|
31
|
+
model.other_id_2 = 'foo_other_id_2'
|
32
|
+
expect(model.other_id_2).to eq('foo_other_id_2')
|
33
|
+
model.other_id_3 = 'foo_other_id_3'
|
34
|
+
expect(model.other_id_3).to eq('foo_other_id_3')
|
35
|
+
model.other_id_4 = 'foo_other_id_4'
|
36
|
+
expect(model.other_id_4).to eq('foo_other_id_4')
|
37
|
+
model.other_id_5 = 'foo_other_id_5'
|
38
|
+
expect(model.other_id_5).to eq('foo_other_id_5')
|
39
|
+
model.other_id_6 = 'foo_other_id_6'
|
40
|
+
expect(model.other_id_6).to eq('foo_other_id_6')
|
41
|
+
model.other_id_7 = 'foo_other_id_7'
|
42
|
+
expect(model.other_id_7).to eq('foo_other_id_7')
|
43
|
+
model.other_id_8 = 'foo_other_id_8'
|
44
|
+
expect(model.other_id_8).to eq('foo_other_id_8')
|
45
|
+
model.other_id_9 = 'foo_other_id_9'
|
46
|
+
expect(model.other_id_9).to eq('foo_other_id_9')
|
47
|
+
model.other_id_10 = 'foo_other_id_10'
|
48
|
+
expect(model.other_id_10).to eq('foo_other_id_10')
|
49
|
+
model.mobile_number = 'foo_mobile_number'
|
50
|
+
expect(model.mobile_number).to eq('foo_mobile_number')
|
51
|
+
model.phone_number_2 = 'foo_phone_number_2'
|
52
|
+
expect(model.phone_number_2).to eq('foo_phone_number_2')
|
53
|
+
model.phone_number_3 = 'foo_phone_number_3'
|
54
|
+
expect(model.phone_number_3).to eq('foo_phone_number_3')
|
55
|
+
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
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.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mParticle Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -108,11 +108,13 @@ files:
|
|
108
108
|
- lib/mparticle/models/application_state_transition_event.rb
|
109
109
|
- lib/mparticle/models/attribution_info.rb
|
110
110
|
- lib/mparticle/models/batch.rb
|
111
|
+
- lib/mparticle/models/batch_context.rb
|
111
112
|
- lib/mparticle/models/breadcrumb_event.rb
|
112
113
|
- lib/mparticle/models/ccpa_consent_state.rb
|
113
114
|
- lib/mparticle/models/commerce_event.rb
|
114
115
|
- lib/mparticle/models/consent_state.rb
|
115
116
|
- lib/mparticle/models/crash_report_event.rb
|
117
|
+
- lib/mparticle/models/data_plan_context.rb
|
116
118
|
- lib/mparticle/models/device_current_state.rb
|
117
119
|
- lib/mparticle/models/device_information.rb
|
118
120
|
- lib/mparticle/models/event_base.rb
|
@@ -140,12 +142,15 @@ files:
|
|
140
142
|
- lib/mparticle/version.rb
|
141
143
|
- mparticle.gemspec
|
142
144
|
- spec/models/app_event_spec.rb
|
145
|
+
- spec/models/batch_spec.rb
|
143
146
|
- spec/models/ccpa_consent_state_spec.rb
|
144
147
|
- spec/models/commerce_event_spec.rb
|
145
148
|
- spec/models/consent_state_spec.rb
|
149
|
+
- spec/models/data_plan_context_spec.rb
|
146
150
|
- spec/models/gdpr_consent_state_spec.rb
|
147
151
|
- spec/models/product_spec.rb
|
148
152
|
- spec/models/screen_view_event_spec.rb
|
153
|
+
- spec/models/user_identities_spec.rb
|
149
154
|
homepage: https://www.mparticle.com
|
150
155
|
licenses:
|
151
156
|
- Apache-2.0
|