talon_one 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +7 -4
  3. data/docs/Application.md +1 -1
  4. data/docs/Campaign.md +2 -0
  5. data/docs/InlineResponse20025.md +2 -1
  6. data/docs/IntegrationState.md +1 -0
  7. data/docs/ManagementApi.md +11 -1
  8. data/docs/NewApplication.md +1 -1
  9. data/docs/NewSamlConnection.md +15 -0
  10. data/docs/SamlConnection.md +19 -0
  11. data/docs/UpdateApplication.md +14 -0
  12. data/docs/User.md +1 -0
  13. data/lib/talon_one.rb +3 -0
  14. data/lib/talon_one/api/management_api.rb +15 -0
  15. data/lib/talon_one/models/application.rb +53 -53
  16. data/lib/talon_one/models/campaign.rb +21 -1
  17. data/lib/talon_one/models/inline_response_200_25.rb +10 -6
  18. data/lib/talon_one/models/integration_state.rb +13 -4
  19. data/lib/talon_one/models/limit_config.rb +2 -2
  20. data/lib/talon_one/models/new_application.rb +48 -56
  21. data/lib/talon_one/models/new_saml_connection.rb +356 -0
  22. data/lib/talon_one/models/saml_connection.rb +420 -0
  23. data/lib/talon_one/models/update_application.rb +352 -0
  24. data/lib/talon_one/models/user.rb +14 -4
  25. data/lib/talon_one/version.rb +1 -1
  26. data/spec/api/management_api_spec.rb +5 -0
  27. data/spec/models/application_spec.rb +6 -6
  28. data/spec/models/campaign_spec.rb +12 -0
  29. data/spec/models/inline_response_200_25_spec.rb +6 -0
  30. data/spec/models/integration_state_spec.rb +6 -0
  31. data/spec/models/limit_config_spec.rb +1 -1
  32. data/spec/models/new_application_spec.rb +6 -6
  33. data/spec/models/new_saml_connection_spec.rb +83 -0
  34. data/spec/models/saml_connection_spec.rb +107 -0
  35. data/spec/models/update_application_spec.rb +81 -0
  36. data/spec/models/user_spec.rb +6 -0
  37. data/talon_one-1.2.0.gem +0 -0
  38. metadata +28 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3f39c6a8fc2964f76caaa933c5e03ab0e8f033cd
4
- data.tar.gz: a37e870cf423a03aa685077b2334005028f8bfd8
2
+ SHA256:
3
+ metadata.gz: f8554b314e19813b57b268b4c5383c8f2b70f9b04700671811671e7d8af7ec05
4
+ data.tar.gz: 392acdebb7b7495971340c0d6cafa920c81ee55b6dfc2f14f29c2de37651eec3
5
5
  SHA512:
6
- metadata.gz: 4d069d80d1cbe17ae87373a9d430f832c61b630dd33d7609a4fe0f8e990290d65c75cb1ecaf978a8caef4f293bc6f6c263f2ca7d0d460dcfecb0241d4017f39d
7
- data.tar.gz: c78ba793510c2ad7b4d414077a74a1f950f5c7ebb1053d50dfc40c5935e878a5c5b5862d5fc6ec58ce042588baa0fae694c217225dbe0045723cea0a9d461aa0
6
+ metadata.gz: f3ba323ffc282b52fc6f450b1264e4782d2c582606cdd9ed1e8debae39878e0e49dd2b7160469f7f10767962f2f184a9707abe66475f3d65dfb86af6498ecc0f
7
+ data.tar.gz: 16e72f1c0d8a616e9aa7429ebf6abbd570f00440af3511ce26d158c88b30173be8aebc4dbf218eb2c0ac4a299c250dd05668c13a509617df54b547d47cba1c0a
data/README.md CHANGED
@@ -7,7 +7,7 @@ The Talon.One API is used to manage applications and campaigns, as well as to in
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: 1.0.0
10
- - Package version: 1.2.0
10
+ - Package version: 1.3.0
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,15 +23,15 @@ gem build talon_one.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./talon_one-1.2.0.gem
26
+ gem install ./talon_one-1.3.0.gem
27
27
  ```
28
- (for development, run `gem install --dev ./talon_one-1.2.0.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./talon_one-1.3.0.gem` to install the development dependencies)
29
29
 
30
30
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
31
 
32
32
  Finally add this to the Gemfile:
33
33
 
34
- gem 'talon_one', '~> 1.2.0'
34
+ gem 'talon_one', '~> 1.3.0'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -359,6 +359,7 @@ Class | Method | HTTP request | Description
359
359
  - [TalonOne::NewReferral](docs/NewReferral.md)
360
360
  - [TalonOne::NewRole](docs/NewRole.md)
361
361
  - [TalonOne::NewRuleset](docs/NewRuleset.md)
362
+ - [TalonOne::NewSamlConnection](docs/NewSamlConnection.md)
362
363
  - [TalonOne::NewTemplateDef](docs/NewTemplateDef.md)
363
364
  - [TalonOne::NewUser](docs/NewUser.md)
364
365
  - [TalonOne::NewWebhook](docs/NewWebhook.md)
@@ -371,11 +372,13 @@ Class | Method | HTTP request | Description
371
372
  - [TalonOne::RoleMembership](docs/RoleMembership.md)
372
373
  - [TalonOne::Rule](docs/Rule.md)
373
374
  - [TalonOne::Ruleset](docs/Ruleset.md)
375
+ - [TalonOne::SamlConnection](docs/SamlConnection.md)
374
376
  - [TalonOne::Session](docs/Session.md)
375
377
  - [TalonOne::SlotDef](docs/SlotDef.md)
376
378
  - [TalonOne::TemplateArgDef](docs/TemplateArgDef.md)
377
379
  - [TalonOne::TemplateDef](docs/TemplateDef.md)
378
380
  - [TalonOne::UpdateAccount](docs/UpdateAccount.md)
381
+ - [TalonOne::UpdateApplication](docs/UpdateApplication.md)
379
382
  - [TalonOne::UpdateCampaign](docs/UpdateCampaign.md)
380
383
  - [TalonOne::UpdateCoupon](docs/UpdateCoupon.md)
381
384
  - [TalonOne::UpdateCouponBatch](docs/UpdateCouponBatch.md)
@@ -9,12 +9,12 @@ Name | Type | Description | Notes
9
9
  **account_id** | **Integer** | The ID of the account that owns this entity. |
10
10
  **name** | **String** | The name of this application. |
11
11
  **description** | **String** | A longer description of the application. | [optional]
12
- **key** | **String** | Hex key for HMAC-signing API calls as coming from this application (16 hex digits) |
13
12
  **timezone** | **String** | A string containing an IANA timezone descriptor. |
14
13
  **currency** | **String** | A string describing a default currency for new customer sessions. |
15
14
  **case_sensitivity** | **String** | A string indicating how should campaigns in this application deal with case sensitivity on coupon codes. | [optional]
16
15
  **attributes** | **Object** | Arbitrary properties associated with this campaign | [optional]
17
16
  **limits** | [**Array<LimitConfig>**](LimitConfig.md) | Default limits for campaigns created in this application | [optional]
17
+ **key** | **String** | Hex key for HMAC-signing API calls as coming from this application (16 hex digits) |
18
18
  **loyalty_programs** | [**Array<LoyaltyProgram>**](LoyaltyProgram.md) | An array containing all the loyalty programs to which this application is subscribed |
19
19
 
20
20
 
@@ -22,6 +22,8 @@ Name | Type | Description | Notes
22
22
  **coupon_redemption_count** | **Integer** | Number of coupons redeemed in the campaign. | [optional]
23
23
  **referral_redemption_count** | **Integer** | Number of referral codes redeemed in the campaign. | [optional]
24
24
  **discount_count** | **Integer** | Total amount of discounts redeemed in the campaign. | [optional]
25
+ **discount_effect_count** | **Integer** | Total number of times discounts were redeemed in this campaign. | [optional]
26
+ **coupon_creation_count** | **Integer** | Total number of coupons created by rules in this campaign. | [optional]
25
27
  **last_activity** | **DateTime** | Timestamp of the most recent event received by this campaign. | [optional]
26
28
  **updated** | **DateTime** | Timestamp of the most recent update to the campaign or any of its elements. | [optional]
27
29
  **created_by** | **String** | Name of the user who created this campaign if available. | [optional]
@@ -3,7 +3,8 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **total_result_size** | **Integer** | |
6
+ **total_result_size** | **Integer** | | [optional]
7
+ **has_more** | **BOOLEAN** | | [optional]
7
8
  **data** | [**Array<Change>**](Change.md) | |
8
9
 
9
10
 
@@ -7,5 +7,6 @@ Name | Type | Description | Notes
7
7
  **profile** | [**CustomerProfile**](CustomerProfile.md) | |
8
8
  **event** | [**Event**](Event.md) | |
9
9
  **loyalty** | [**Loyalty**](Loyalty.md) | | [optional]
10
+ **coupon** | [**Coupon**](Coupon.md) | | [optional]
10
11
 
11
12
 
@@ -2318,7 +2318,12 @@ api_instance = TalonOne::ManagementApi.new
2318
2318
  opts = {
2319
2319
  page_size: 56, # Integer | The number of items to include in this response. When omitted, the maximum value of 1000 will be used.
2320
2320
  skip: 56, # Integer | Skips the given number of items when paging through large result sets.
2321
- sort: 'sort_example' # String | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order.
2321
+ sort: 'sort_example', # String | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order.
2322
+ application_id: 56, # Integer |
2323
+ created_before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp.
2324
+ created_after: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp.
2325
+ with_total_result_size: true, # BOOLEAN | When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query.
2326
+ include_old: true # BOOLEAN | When this flag is set to false, the state without the change will not be returned. The default value is true.
2322
2327
  }
2323
2328
 
2324
2329
  begin
@@ -2337,6 +2342,11 @@ Name | Type | Description | Notes
2337
2342
  **page_size** | **Integer**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional]
2338
2343
  **skip** | **Integer**| Skips the given number of items when paging through large result sets. | [optional]
2339
2344
  **sort** | **String**| The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [optional]
2345
+ **application_id** | **Integer**| | [optional]
2346
+ **created_before** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. | [optional]
2347
+ **created_after** | **DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. | [optional]
2348
+ **with_total_result_size** | **BOOLEAN**| When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. | [optional]
2349
+ **include_old** | **BOOLEAN**| When this flag is set to false, the state without the change will not be returned. The default value is true. | [optional]
2340
2350
 
2341
2351
  ### Return type
2342
2352
 
@@ -5,11 +5,11 @@ Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **name** | **String** | The name of this application. |
7
7
  **description** | **String** | A longer description of the application. | [optional]
8
- **key** | **String** | Hex key for HMAC-signing API calls as coming from this application (16 hex digits) |
9
8
  **timezone** | **String** | A string containing an IANA timezone descriptor. |
10
9
  **currency** | **String** | A string describing a default currency for new customer sessions. |
11
10
  **case_sensitivity** | **String** | A string indicating how should campaigns in this application deal with case sensitivity on coupon codes. | [optional]
12
11
  **attributes** | **Object** | Arbitrary properties associated with this campaign | [optional]
13
12
  **limits** | [**Array<LimitConfig>**](LimitConfig.md) | Default limits for campaigns created in this application | [optional]
13
+ **key** | **String** | Hex key for HMAC-signing API calls as coming from this application (16 hex digits) | [optional]
14
14
 
15
15
 
@@ -0,0 +1,15 @@
1
+ # TalonOne::NewSamlConnection
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **name** | **String** | ID of the SAML service. |
7
+ **enabled** | **BOOLEAN** | Determines if this SAML connection active. |
8
+ **issuer** | **String** | Identity Provider Entity ID. |
9
+ **sign_on_url** | **String** | Single Sign-On URL. |
10
+ **sign_out_url** | **String** | Single Sign-Out URL. | [optional]
11
+ **metadata_url** | **String** | Metadata URL. | [optional]
12
+ **x509certificate** | **String** | X.509 Certificate. |
13
+ **audience** | **String** | The application-defined unique identifier that is the intended audience of the SAML assertion. This is most often the SP Entity ID of your application. When not specified, the ACS URL will be used. | [optional]
14
+
15
+
@@ -0,0 +1,19 @@
1
+ # TalonOne::SamlConnection
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | |
7
+ **created** | **DateTime** | Unix timestamp indicating when the session was first created. |
8
+ **account_id** | **Integer** | The ID of the account that owns this SAML Service. |
9
+ **assertion_consumer_service_url** | **String** | The location where the SAML assertion is sent with a HTTP POST. |
10
+ **name** | **String** | ID of the SAML service. |
11
+ **enabled** | **BOOLEAN** | Determines if this SAML connection active. |
12
+ **issuer** | **String** | Identity Provider Entity ID. |
13
+ **sign_on_url** | **String** | Single Sign-On URL. |
14
+ **sign_out_url** | **String** | Single Sign-Out URL. | [optional]
15
+ **metadata_url** | **String** | Metadata URL. | [optional]
16
+ **x509certificate** | **String** | X.509 Certificate. |
17
+ **audience** | **String** | The application-defined unique identifier that is the intended audience of the SAML assertion. This is most often the SP Entity ID of your application. When not specified, the ACS URL will be used. |
18
+
19
+
@@ -0,0 +1,14 @@
1
+ # TalonOne::UpdateApplication
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **name** | **String** | The name of this application. |
7
+ **description** | **String** | A longer description of the application. | [optional]
8
+ **timezone** | **String** | A string containing an IANA timezone descriptor. |
9
+ **currency** | **String** | A string describing a default currency for new customer sessions. |
10
+ **case_sensitivity** | **String** | A string indicating how should campaigns in this application deal with case sensitivity on coupon codes. | [optional]
11
+ **attributes** | **Object** | Arbitrary properties associated with this campaign | [optional]
12
+ **limits** | [**Array<LimitConfig>**](LimitConfig.md) | Default limits for campaigns created in this application | [optional]
13
+
14
+
@@ -16,5 +16,6 @@ Name | Type | Description | Notes
16
16
  **latest_feature** | **String** | Latest feature the user has been notified. | [optional]
17
17
  **roles** | **Array<Integer>** | Contains a list of all roles a user is a memeber of | [optional]
18
18
  **application_notification_subscriptions** | **Object** | | [optional]
19
+ **auth_method** | **String** | The Authentication method for this user | [optional]
19
20
 
20
21
 
@@ -149,6 +149,7 @@ require 'talon_one/models/new_password_email'
149
149
  require 'talon_one/models/new_referral'
150
150
  require 'talon_one/models/new_role'
151
151
  require 'talon_one/models/new_ruleset'
152
+ require 'talon_one/models/new_saml_connection'
152
153
  require 'talon_one/models/new_template_def'
153
154
  require 'talon_one/models/new_user'
154
155
  require 'talon_one/models/new_webhook'
@@ -161,11 +162,13 @@ require 'talon_one/models/role_assign'
161
162
  require 'talon_one/models/role_membership'
162
163
  require 'talon_one/models/rule'
163
164
  require 'talon_one/models/ruleset'
165
+ require 'talon_one/models/saml_connection'
164
166
  require 'talon_one/models/session'
165
167
  require 'talon_one/models/slot_def'
166
168
  require 'talon_one/models/template_arg_def'
167
169
  require 'talon_one/models/template_def'
168
170
  require 'talon_one/models/update_account'
171
+ require 'talon_one/models/update_application'
169
172
  require 'talon_one/models/update_campaign'
170
173
  require 'talon_one/models/update_coupon'
171
174
  require 'talon_one/models/update_coupon_batch'
@@ -2438,6 +2438,11 @@ module TalonOne
2438
2438
  # @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used.
2439
2439
  # @option opts [Integer] :skip Skips the given number of items when paging through large result sets.
2440
2440
  # @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order.
2441
+ # @option opts [Integer] :application_id
2442
+ # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp.
2443
+ # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp.
2444
+ # @option opts [BOOLEAN] :with_total_result_size When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query.
2445
+ # @option opts [BOOLEAN] :include_old When this flag is set to false, the state without the change will not be returned. The default value is true.
2441
2446
  # @return [InlineResponse20025]
2442
2447
  def get_changes(opts = {})
2443
2448
  data, _status_code, _headers = get_changes_with_http_info(opts)
@@ -2450,6 +2455,11 @@ module TalonOne
2450
2455
  # @option opts [Integer] :page_size The number of items to include in this response. When omitted, the maximum value of 1000 will be used.
2451
2456
  # @option opts [Integer] :skip Skips the given number of items when paging through large result sets.
2452
2457
  # @option opts [String] :sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order.
2458
+ # @option opts [Integer] :application_id
2459
+ # @option opts [DateTime] :created_before Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp.
2460
+ # @option opts [DateTime] :created_after Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp.
2461
+ # @option opts [BOOLEAN] :with_total_result_size When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query.
2462
+ # @option opts [BOOLEAN] :include_old When this flag is set to false, the state without the change will not be returned. The default value is true.
2453
2463
  # @return [Array<(InlineResponse20025, Fixnum, Hash)>] InlineResponse20025 data, response status code and response headers
2454
2464
  def get_changes_with_http_info(opts = {})
2455
2465
  if @api_client.config.debugging
@@ -2463,6 +2473,11 @@ module TalonOne
2463
2473
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
2464
2474
  query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
2465
2475
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
2476
+ query_params[:'applicationId'] = opts[:'application_id'] if !opts[:'application_id'].nil?
2477
+ query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
2478
+ query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
2479
+ query_params[:'withTotalResultSize'] = opts[:'with_total_result_size'] if !opts[:'with_total_result_size'].nil?
2480
+ query_params[:'includeOld'] = opts[:'include_old'] if !opts[:'include_old'].nil?
2466
2481
 
2467
2482
  # header parameters
2468
2483
  header_params = {}
@@ -33,9 +33,6 @@ module TalonOne
33
33
  # A longer description of the application.
34
34
  attr_accessor :description
35
35
 
36
- # Hex key for HMAC-signing API calls as coming from this application (16 hex digits)
37
- attr_accessor :key
38
-
39
36
  # A string containing an IANA timezone descriptor.
40
37
  attr_accessor :timezone
41
38
 
@@ -51,6 +48,9 @@ module TalonOne
51
48
  # Default limits for campaigns created in this application
52
49
  attr_accessor :limits
53
50
 
51
+ # Hex key for HMAC-signing API calls as coming from this application (16 hex digits)
52
+ attr_accessor :key
53
+
54
54
  # An array containing all the loyalty programs to which this application is subscribed
55
55
  attr_accessor :loyalty_programs
56
56
 
@@ -85,12 +85,12 @@ module TalonOne
85
85
  :'account_id' => :'accountId',
86
86
  :'name' => :'name',
87
87
  :'description' => :'description',
88
- :'key' => :'key',
89
88
  :'timezone' => :'timezone',
90
89
  :'currency' => :'currency',
91
90
  :'case_sensitivity' => :'caseSensitivity',
92
91
  :'attributes' => :'attributes',
93
92
  :'limits' => :'limits',
93
+ :'key' => :'key',
94
94
  :'loyalty_programs' => :'loyaltyPrograms'
95
95
  }
96
96
  end
@@ -104,12 +104,12 @@ module TalonOne
104
104
  :'account_id' => :'Integer',
105
105
  :'name' => :'String',
106
106
  :'description' => :'String',
107
- :'key' => :'String',
108
107
  :'timezone' => :'String',
109
108
  :'currency' => :'String',
110
109
  :'case_sensitivity' => :'String',
111
110
  :'attributes' => :'Object',
112
111
  :'limits' => :'Array<LimitConfig>',
112
+ :'key' => :'String',
113
113
  :'loyalty_programs' => :'Array<LoyaltyProgram>'
114
114
  }
115
115
  end
@@ -146,10 +146,6 @@ module TalonOne
146
146
  self.description = attributes[:'description']
147
147
  end
148
148
 
149
- if attributes.has_key?(:'key')
150
- self.key = attributes[:'key']
151
- end
152
-
153
149
  if attributes.has_key?(:'timezone')
154
150
  self.timezone = attributes[:'timezone']
155
151
  end
@@ -172,6 +168,10 @@ module TalonOne
172
168
  end
173
169
  end
174
170
 
171
+ if attributes.has_key?(:'key')
172
+ self.key = attributes[:'key']
173
+ end
174
+
175
175
  if attributes.has_key?(:'loyaltyPrograms')
176
176
  if (value = attributes[:'loyaltyPrograms']).is_a?(Array)
177
177
  self.loyalty_programs = value
@@ -207,22 +207,6 @@ module TalonOne
207
207
  invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
208
208
  end
209
209
 
210
- if @key.nil?
211
- invalid_properties.push('invalid value for "key", key cannot be nil.')
212
- end
213
-
214
- if @key.to_s.length > 16
215
- invalid_properties.push('invalid value for "key", the character length must be smaller than or equal to 16.')
216
- end
217
-
218
- if @key.to_s.length < 16
219
- invalid_properties.push('invalid value for "key", the character length must be great than or equal to 16.')
220
- end
221
-
222
- if @key !~ Regexp.new(/^[a-fA-F0-9]{16}$/)
223
- invalid_properties.push('invalid value for "key", must conform to the pattern /^[a-fA-F0-9]{16}$/.')
224
- end
225
-
226
210
  if @timezone.nil?
227
211
  invalid_properties.push('invalid value for "timezone", timezone cannot be nil.')
228
212
  end
@@ -239,6 +223,22 @@ module TalonOne
239
223
  invalid_properties.push('invalid value for "currency", the character length must be great than or equal to 1.')
240
224
  end
241
225
 
226
+ if @key.nil?
227
+ invalid_properties.push('invalid value for "key", key cannot be nil.')
228
+ end
229
+
230
+ if @key.to_s.length > 16
231
+ invalid_properties.push('invalid value for "key", the character length must be smaller than or equal to 16.')
232
+ end
233
+
234
+ if @key.to_s.length < 16
235
+ invalid_properties.push('invalid value for "key", the character length must be great than or equal to 16.')
236
+ end
237
+
238
+ if @key !~ Regexp.new(/^[a-fA-F0-9]{16}$/)
239
+ invalid_properties.push('invalid value for "key", must conform to the pattern /^[a-fA-F0-9]{16}$/.')
240
+ end
241
+
242
242
  if @loyalty_programs.nil?
243
243
  invalid_properties.push('invalid value for "loyalty_programs", loyalty_programs cannot be nil.')
244
244
  end
@@ -255,16 +255,16 @@ module TalonOne
255
255
  return false if @account_id.nil?
256
256
  return false if @name.nil?
257
257
  return false if @name.to_s.length < 1
258
- return false if @key.nil?
259
- return false if @key.to_s.length > 16
260
- return false if @key.to_s.length < 16
261
- return false if @key !~ Regexp.new(/^[a-fA-F0-9]{16}$/)
262
258
  return false if @timezone.nil?
263
259
  return false if @timezone.to_s.length < 1
264
260
  return false if @currency.nil?
265
261
  return false if @currency.to_s.length < 1
266
262
  case_sensitivity_validator = EnumAttributeValidator.new('String', ['sensitive', 'insensitive-uppercase', 'insensitive-lowercase'])
267
263
  return false unless case_sensitivity_validator.valid?(@case_sensitivity)
264
+ return false if @key.nil?
265
+ return false if @key.to_s.length > 16
266
+ return false if @key.to_s.length < 16
267
+ return false if @key !~ Regexp.new(/^[a-fA-F0-9]{16}$/)
268
268
  return false if @loyalty_programs.nil?
269
269
  true
270
270
  end
@@ -283,28 +283,6 @@ module TalonOne
283
283
  @name = name
284
284
  end
285
285
 
286
- # Custom attribute writer method with validation
287
- # @param [Object] key Value to be assigned
288
- def key=(key)
289
- if key.nil?
290
- fail ArgumentError, 'key cannot be nil'
291
- end
292
-
293
- if key.to_s.length > 16
294
- fail ArgumentError, 'invalid value for "key", the character length must be smaller than or equal to 16.'
295
- end
296
-
297
- if key.to_s.length < 16
298
- fail ArgumentError, 'invalid value for "key", the character length must be great than or equal to 16.'
299
- end
300
-
301
- if key !~ Regexp.new(/^[a-fA-F0-9]{16}$/)
302
- fail ArgumentError, 'invalid value for "key", must conform to the pattern /^[a-fA-F0-9]{16}$/.'
303
- end
304
-
305
- @key = key
306
- end
307
-
308
286
  # Custom attribute writer method with validation
309
287
  # @param [Object] timezone Value to be assigned
310
288
  def timezone=(timezone)
@@ -343,6 +321,28 @@ module TalonOne
343
321
  @case_sensitivity = case_sensitivity
344
322
  end
345
323
 
324
+ # Custom attribute writer method with validation
325
+ # @param [Object] key Value to be assigned
326
+ def key=(key)
327
+ if key.nil?
328
+ fail ArgumentError, 'key cannot be nil'
329
+ end
330
+
331
+ if key.to_s.length > 16
332
+ fail ArgumentError, 'invalid value for "key", the character length must be smaller than or equal to 16.'
333
+ end
334
+
335
+ if key.to_s.length < 16
336
+ fail ArgumentError, 'invalid value for "key", the character length must be great than or equal to 16.'
337
+ end
338
+
339
+ if key !~ Regexp.new(/^[a-fA-F0-9]{16}$/)
340
+ fail ArgumentError, 'invalid value for "key", must conform to the pattern /^[a-fA-F0-9]{16}$/.'
341
+ end
342
+
343
+ @key = key
344
+ end
345
+
346
346
  # Checks equality by comparing each attribute.
347
347
  # @param [Object] Object to be compared
348
348
  def ==(o)
@@ -354,12 +354,12 @@ module TalonOne
354
354
  account_id == o.account_id &&
355
355
  name == o.name &&
356
356
  description == o.description &&
357
- key == o.key &&
358
357
  timezone == o.timezone &&
359
358
  currency == o.currency &&
360
359
  case_sensitivity == o.case_sensitivity &&
361
360
  attributes == o.attributes &&
362
361
  limits == o.limits &&
362
+ key == o.key &&
363
363
  loyalty_programs == o.loyalty_programs
364
364
  end
365
365
 
@@ -372,7 +372,7 @@ module TalonOne
372
372
  # Calculates hash code according to all attributes.
373
373
  # @return [Fixnum] Hash code
374
374
  def hash
375
- [id, created, modified, account_id, name, description, key, timezone, currency, case_sensitivity, attributes, limits, loyalty_programs].hash
375
+ [id, created, modified, account_id, name, description, timezone, currency, case_sensitivity, attributes, limits, key, loyalty_programs].hash
376
376
  end
377
377
 
378
378
  # Builds the object from hash