braze_api_client 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE.md +9 -0
  4. data/README.md +191 -0
  5. data/Rakefile +10 -0
  6. data/braze_api_client.gemspec +38 -0
  7. data/docs/Attributes.md +58 -0
  8. data/docs/AttributesArray.md +18 -0
  9. data/docs/AttributesCurrentLocation.md +20 -0
  10. data/docs/AttributesFacebook.md +22 -0
  11. data/docs/AttributesPushTokens.md +22 -0
  12. data/docs/AttributesTwitter.md +26 -0
  13. data/docs/Event.md +26 -0
  14. data/docs/EventsArray.md +18 -0
  15. data/docs/GeneralError.md +20 -0
  16. data/docs/Identifier.md +51 -0
  17. data/docs/IdentifierOneOf.md +18 -0
  18. data/docs/IdentifierOneOf1.md +18 -0
  19. data/docs/IdentifierOneOf2.md +18 -0
  20. data/docs/RestApi.md +427 -0
  21. data/docs/UsersTrackRequest.md +18 -0
  22. data/docs/UsersTrackResponse.md +24 -0
  23. data/git_push.sh +16 -0
  24. data/lib/braze_api_client/api/rest_api.rb +400 -0
  25. data/lib/braze_api_client/api_client.rb +390 -0
  26. data/lib/braze_api_client/api_error.rb +57 -0
  27. data/lib/braze_api_client/configuration.rb +294 -0
  28. data/lib/braze_api_client/models/attributes.rb +458 -0
  29. data/lib/braze_api_client/models/attributes_array.rb +225 -0
  30. data/lib/braze_api_client/models/attributes_current_location.rb +227 -0
  31. data/lib/braze_api_client/models/attributes_facebook.rb +238 -0
  32. data/lib/braze_api_client/models/attributes_push_tokens.rb +246 -0
  33. data/lib/braze_api_client/models/attributes_twitter.rb +254 -0
  34. data/lib/braze_api_client/models/event.rb +264 -0
  35. data/lib/braze_api_client/models/events_array.rb +220 -0
  36. data/lib/braze_api_client/models/general_error.rb +227 -0
  37. data/lib/braze_api_client/models/identifier.rb +106 -0
  38. data/lib/braze_api_client/models/identifier_one_of.rb +223 -0
  39. data/lib/braze_api_client/models/identifier_one_of1.rb +223 -0
  40. data/lib/braze_api_client/models/identifier_one_of2.rb +223 -0
  41. data/lib/braze_api_client/models/users_track_request.rb +245 -0
  42. data/lib/braze_api_client/models/users_track_response.rb +245 -0
  43. data/lib/braze_api_client/version.rb +15 -0
  44. data/lib/braze_api_client.rb +55 -0
  45. data/spec/api/rest_api_spec.rb +101 -0
  46. data/spec/api_client_spec.rb +226 -0
  47. data/spec/configuration_spec.rb +42 -0
  48. data/spec/models/attributes_array_spec.rb +34 -0
  49. data/spec/models/attributes_current_location_spec.rb +40 -0
  50. data/spec/models/attributes_facebook_spec.rb +46 -0
  51. data/spec/models/attributes_push_tokens_spec.rb +46 -0
  52. data/spec/models/attributes_spec.rb +166 -0
  53. data/spec/models/attributes_twitter_spec.rb +58 -0
  54. data/spec/models/event_spec.rb +58 -0
  55. data/spec/models/events_array_spec.rb +34 -0
  56. data/spec/models/general_error_spec.rb +40 -0
  57. data/spec/models/identifier_one_of1_spec.rb +34 -0
  58. data/spec/models/identifier_one_of2_spec.rb +34 -0
  59. data/spec/models/identifier_one_of_spec.rb +34 -0
  60. data/spec/models/identifier_spec.rb +31 -0
  61. data/spec/models/users_track_request_spec.rb +34 -0
  62. data/spec/models/users_track_response_spec.rb +52 -0
  63. data/spec/spec_helper.rb +111 -0
  64. metadata +164 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5f798e36c422e6bf7b20f8a03b3eb14a62f7a33c2169220b716f1f28d4c04155
4
+ data.tar.gz: 65ef0db1d80017692361d0f54d7347da78b91fc6e378edf1030767682ad15053
5
+ SHA512:
6
+ metadata.gz: e32681c682c8f6702c7b99dc0d7703b9280abfbecf1a3016d3a8a7563ccf377d93ed28bdc0f574324d4a32d3d0d411ee9c3d0ea19ec695131341ed184dcb6d0d
7
+ data.tar.gz: a1faaf88c9a086f4897fb3d1f3b4999f4a3f467e7fef2253a48c3e88a578947d457bfbfe715da0eab5f457efc09461f5627f40ad53ebb6a74d5645b25381d84c
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 13.0.1'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 0.66.0'
9
+ end
data/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ Copyright 2022 Braze, Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8
+
9
+ Customer acknowledges and agrees that this software is being provided at no charge by Braze for Customer's use in connection with the Braze Services and that this software is separate from, and not part of, the Braze Services. In addition, THIS SOFTWARE IS PROVIDED BY BRAZE "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BRAZE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md ADDED
@@ -0,0 +1,191 @@
1
+ # Braze API Ruby Client ![Tests](https://img.shields.io/github/workflow/status/braze-inc/braze-api-client-ruby/rspec) [![Gem Version](https://img.shields.io/gem/v/braze_client.svg)](https://rubygems.org/gems/braze_client)
2
+
3
+ Track users, send messages, export data, and more
4
+
5
+ > :warning: **This library is in early development, subject to breaking changes, and may be discontinued.**
6
+
7
+ ## Installation
8
+
9
+ Add the following line to your Gemfile:
10
+
11
+ ```
12
+ gem "braze_api_client"
13
+ ```
14
+
15
+ Followed by running:
16
+
17
+ ```shell
18
+ bundle install
19
+ ```
20
+
21
+ Or install it yourself as:
22
+
23
+ ```shell
24
+ gem install braze_api_client
25
+ ```
26
+
27
+ ## Configuration
28
+
29
+ Generate an [API key](https://www.braze.com/docs/api/api_key/) with permissions for the endpoints you need to call.
30
+
31
+ You can determine which API host to use based on your Braze dashboard URL:
32
+
33
+ |Instance|URL|API Host|
34
+ |---|---|---|
35
+ |US-01| `https://dashboard-01.braze.com` | `rest.iad-01.braze.com` |
36
+ |US-02| `https://dashboard-02.braze.com` | `rest.iad-02.braze.com` |
37
+ |US-03| `https://dashboard-03.braze.com` | `rest.iad-03.braze.com` |
38
+ |US-04| `https://dashboard-04.braze.com` | `rest.iad-04.braze.com` |
39
+ |US-05| `https://dashboard-05.braze.com` | `rest.iad-05.braze.com` |
40
+ |US-06| `https://dashboard-06.braze.com` | `rest.iad-06.braze.com` |
41
+ |US-08| `https://dashboard-08.braze.com` | `rest.iad-08.braze.com` |
42
+ |EU-01| `https://dashboard-01.braze.eu` | `rest.fra-01.braze.eu` |
43
+ |EU-02| `https://dashboard-02.braze.eu` | `rest.fra-02.braze.eu` |
44
+
45
+
46
+ ```ruby
47
+ # Load the gem
48
+ require 'braze_api_client'
49
+
50
+ # Setup authorization
51
+ BrazeClient.configure do |config|
52
+ config.access_token = 'YOUR_API_KEY'
53
+ config.server_variables[:host] = 'rest.YOUR-REGION.braze.com'
54
+ end
55
+
56
+ ```
57
+
58
+
59
+ ## Endpoints
60
+ ### Track users
61
+
62
+ You can use the `/users/track` [endpoint](https://www.braze.com/docs/api/endpoints/user_data/post_user_track/) to record custom events, purchases, and update user profile attributes. Provide up to 75 of each type in a single request.
63
+
64
+ ```ruby
65
+ braze_api = BrazeClient::RestApi.new
66
+
67
+ begin
68
+ result = braze_api.track_users({
69
+ :events => [{
70
+ :external_id => "user123",
71
+ :app_id => "yourappid",
72
+ :time => Time.now,
73
+ :name => "watched_trailer",
74
+ }],
75
+ :attributes => [{
76
+ :external_id => "user456",
77
+ :first_name => "Alice",
78
+ :favorite_color => "blue",
79
+ }],
80
+ :purchases => [
81
+ :external_id => "user456",
82
+ :app_id => "yourappid",
83
+ :time => Time.now,
84
+ :product_id => "product_name",
85
+ :currency => "USD",
86
+ :price => 12.12,
87
+ :quantity => 2,
88
+ :properties => {
89
+ :color => "blue",
90
+ }
91
+ ]
92
+ })
93
+ p result
94
+ rescue BrazeClient::ApiError => e
95
+ puts "Exception when calling RestApi->users_track: #{e}"
96
+ end
97
+ ```
98
+
99
+ ### Delete users
100
+ ```ruby
101
+ braze_api = BrazeClient::RestApi.new
102
+
103
+ begin
104
+ result = braze_api.delete_users({
105
+ # use any or all of these 3 identifier types
106
+ :external_ids => ["user1", "user2"],
107
+ :user_aliases => ["alias123", "alias456"],
108
+ :braze_ids => ["braze_identifier1", "braze_identifier2"],
109
+ })
110
+ p result
111
+ rescue BrazeClient::ApiError => e
112
+ puts "Exception when calling RestApi->users_track: #{e}"
113
+ end
114
+ ```
115
+
116
+ ### Create new user aliases
117
+ ```ruby
118
+ braze_api = BrazeClient::RestApi.new
119
+
120
+ begin
121
+ result = braze_api.new_user_aliases({
122
+ :user_aliases => [{
123
+ :external_id => "user123", # optional
124
+ :alias_name => "c123",
125
+ :alias_label => "customer_id",
126
+ }]
127
+ })
128
+ p result
129
+ rescue BrazeClient::ApiError => e
130
+ puts "Exception when calling RestApi->users_track: #{e}"
131
+ end
132
+ ```
133
+
134
+ ### Identify users
135
+ ```ruby
136
+ braze_api = BrazeClient::RestApi.new
137
+
138
+ begin
139
+ result = braze_api.identify_users({
140
+ :aliases_to_identify => [{
141
+ :external_id => "user123",
142
+ :user_alias => {
143
+ :alias_name => "c123",
144
+ :alias_label => "customer_id",
145
+ }
146
+ }],
147
+ })
148
+ p result
149
+ rescue BrazeClient::ApiError => e
150
+ puts "Exception when calling RestApi->users_track: #{e}"
151
+ end
152
+ ```
153
+
154
+ ### Rename external IDs
155
+ ```ruby
156
+ braze_api = BrazeClient::RestApi.new
157
+
158
+ begin
159
+ result = braze_api.rename_exernal_ids({
160
+ :external_id_renames => [{
161
+ :current_external_id => "user123",
162
+ :new_external_id => "u123",
163
+ }],
164
+ })
165
+ p result
166
+ rescue BrazeClient::ApiError => e
167
+ puts "Exception when calling RestApi->users_track: #{e}"
168
+ end
169
+ ```
170
+
171
+ ### Remove external IDs
172
+ ```ruby
173
+ braze_api = BrazeClient::RestApi.new
174
+
175
+ begin
176
+ result = braze_api.remove_exernal_ids({
177
+ :external_ids => ["user123", "user456"],
178
+ })
179
+ p result
180
+ rescue BrazeClient::ApiError => e
181
+ puts "Exception when calling RestApi->users_track: #{e}"
182
+ end
183
+ ```
184
+
185
+ ## Contributing
186
+
187
+ This library is automatically generated. To make changes, please see [braze-api-client-codegen](https://github.com/braze-inc/braze-api-client-codegen)
188
+
189
+ - API version: 0.1.0
190
+ - Package version: 0.1.0
191
+ - Build package: org.openapitools.codegen.languages.RubyClientCodegen
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
@@ -0,0 +1,38 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #Braze
5
+
6
+ #Track users, send messages, export data, and more
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+
10
+ Generated by: https://openapi-generator.tech
11
+ OpenAPI Generator version: 5.2.1
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "braze_api_client/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "braze_api_client"
20
+ s.version = BrazeClient::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["OpenAPI-Generator"]
23
+ s.email = [""]
24
+ s.homepage = "https://openapi-generator.tech"
25
+ s.summary = "Braze Ruby Gem"
26
+ s.description = "Track users, send messages, export data, and more"
27
+ s.license = "Unlicense"
28
+ s.required_ruby_version = ">= 2.4"
29
+
30
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
31
+
32
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
33
+
34
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
35
+ s.test_files = `find spec/*`.split("\n")
36
+ s.executables = []
37
+ s.require_paths = ["lib"]
38
+ end
@@ -0,0 +1,58 @@
1
+ # BrazeClient::Attributes
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **country** | **String** | | [optional] |
8
+ | **current_location** | [**AttributesCurrentLocation**](AttributesCurrentLocation.md) | | [optional] |
9
+ | **date_of_first_session** | **Time** | | [optional] |
10
+ | **date_of_last_session** | **Time** | | [optional] |
11
+ | **dob** | **Date** | | [optional] |
12
+ | **email** | **String** | | [optional] |
13
+ | **email_subscribe** | **String** | | [optional] |
14
+ | **email_open_tracking_disabled** | **Boolean** | | [optional] |
15
+ | **email_click_tracking_disabled** | **Boolean** | | [optional] |
16
+ | **facebook** | [**AttributesFacebook**](AttributesFacebook.md) | | [optional] |
17
+ | **first_name** | **String** | | [optional] |
18
+ | **gender** | **String** | | [optional] |
19
+ | **home_city** | **String** | | [optional] |
20
+ | **language** | **String** | | [optional] |
21
+ | **last_name** | **String** | | [optional] |
22
+ | **marked_email_as_spam_at** | **Time** | | [optional] |
23
+ | **phone** | **String** | | [optional] |
24
+ | **push_subscribe** | **String** | | [optional] |
25
+ | **push_tokens** | [**Array<AttributesPushTokens>**](AttributesPushTokens.md) | | [optional] |
26
+ | **time_zone** | **String** | | [optional] |
27
+ | **twitter** | [**AttributesTwitter**](AttributesTwitter.md) | | [optional] |
28
+
29
+ ## Example
30
+
31
+ ```ruby
32
+ require 'braze_api_client'
33
+
34
+ instance = BrazeClient::Attributes.new(
35
+ country: null,
36
+ current_location: null,
37
+ date_of_first_session: null,
38
+ date_of_last_session: null,
39
+ dob: null,
40
+ email: null,
41
+ email_subscribe: null,
42
+ email_open_tracking_disabled: null,
43
+ email_click_tracking_disabled: null,
44
+ facebook: null,
45
+ first_name: null,
46
+ gender: null,
47
+ home_city: null,
48
+ language: null,
49
+ last_name: null,
50
+ marked_email_as_spam_at: null,
51
+ phone: null,
52
+ push_subscribe: null,
53
+ push_tokens: null,
54
+ time_zone: null,
55
+ twitter: null
56
+ )
57
+ ```
58
+
@@ -0,0 +1,18 @@
1
+ # BrazeClient::AttributesArray
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **attributes** | [**Array<Attributes>**](Attributes.md) | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'braze_api_client'
13
+
14
+ instance = BrazeClient::AttributesArray.new(
15
+ attributes: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # BrazeClient::AttributesCurrentLocation
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **latitude** | **Float** | | [optional] |
8
+ | **longitude** | **Float** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'braze_api_client'
14
+
15
+ instance = BrazeClient::AttributesCurrentLocation.new(
16
+ latitude: null,
17
+ longitude: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,22 @@
1
+ # BrazeClient::AttributesFacebook
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **likes** | **Array<String>** | | [optional] |
9
+ | **num_friends** | **Integer** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'braze_api_client'
15
+
16
+ instance = BrazeClient::AttributesFacebook.new(
17
+ id: null,
18
+ likes: null,
19
+ num_friends: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,22 @@
1
+ # BrazeClient::AttributesPushTokens
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **app_id** | **String** | | |
8
+ | **token** | **String** | | |
9
+ | **device_id** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'braze_api_client'
15
+
16
+ instance = BrazeClient::AttributesPushTokens.new(
17
+ app_id: null,
18
+ token: null,
19
+ device_id: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,26 @@
1
+ # BrazeClient::AttributesTwitter
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | | [optional] |
8
+ | **screen_name** | **String** | | [optional] |
9
+ | **followers_count** | **Integer** | | [optional] |
10
+ | **friends_count** | **Integer** | | [optional] |
11
+ | **statuses_count** | **Integer** | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'braze_api_client'
17
+
18
+ instance = BrazeClient::AttributesTwitter.new(
19
+ id: null,
20
+ screen_name: null,
21
+ followers_count: null,
22
+ friends_count: null,
23
+ statuses_count: null
24
+ )
25
+ ```
26
+
data/docs/Event.md ADDED
@@ -0,0 +1,26 @@
1
+ # BrazeClient::Event
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | | |
8
+ | **time** | **Time** | | |
9
+ | **app_id** | **String** | | [optional] |
10
+ | **properties** | **Object** | | [optional] |
11
+ | **_update_existing_only** | **Boolean** | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'braze_api_client'
17
+
18
+ instance = BrazeClient::Event.new(
19
+ name: null,
20
+ time: null,
21
+ app_id: null,
22
+ properties: null,
23
+ _update_existing_only: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,18 @@
1
+ # BrazeClient::EventsArray
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **attributes** | [**Array<Event>**](Event.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'braze_api_client'
13
+
14
+ instance = BrazeClient::EventsArray.new(
15
+ attributes: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # BrazeClient::GeneralError
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **code** | **Integer** | | [optional] |
8
+ | **message** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'braze_api_client'
14
+
15
+ instance = BrazeClient::GeneralError.new(
16
+ code: null,
17
+ message: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,51 @@
1
+ # BrazeClient::Identifier
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'braze_api_client'
13
+
14
+ BrazeClient::Identifier.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'IdentifierOneOf',
18
+ # :'IdentifierOneOf1',
19
+ # :'IdentifierOneOf2'
20
+ # ]
21
+ ```
22
+
23
+ ### build
24
+
25
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
26
+
27
+ #### Example
28
+
29
+ ```ruby
30
+ require 'braze_api_client'
31
+
32
+ BrazeClient::Identifier.build(data)
33
+ # => #<IdentifierOneOf:0x00007fdd4aab02a0>
34
+
35
+ BrazeClient::Identifier.build(data_that_doesnt_match)
36
+ # => nil
37
+ ```
38
+
39
+ #### Parameters
40
+
41
+ | Name | Type | Description |
42
+ | ---- | ---- | ----------- |
43
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
44
+
45
+ #### Return type
46
+
47
+ - `IdentifierOneOf`
48
+ - `IdentifierOneOf1`
49
+ - `IdentifierOneOf2`
50
+ - `nil` (if no type matches)
51
+
@@ -0,0 +1,18 @@
1
+ # BrazeClient::IdentifierOneOf
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **external_id** | **String** | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'braze_api_client'
13
+
14
+ instance = BrazeClient::IdentifierOneOf.new(
15
+ external_id: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # BrazeClient::IdentifierOneOf1
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **user_alias** | **String** | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'braze_api_client'
13
+
14
+ instance = BrazeClient::IdentifierOneOf1.new(
15
+ user_alias: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # BrazeClient::IdentifierOneOf2
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **braze_id** | **String** | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'braze_api_client'
13
+
14
+ instance = BrazeClient::IdentifierOneOf2.new(
15
+ braze_id: null
16
+ )
17
+ ```
18
+