ifeelgoods 0.2.0.beta.4 → 0.2.0.beta.5
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/Gemfile.lock +3 -3
- data/README.md +7 -4
- data/docs/Redemption.md +4 -0
- data/docs/RedemptionRewardCodes.md +22 -0
- data/docs/RedemptionRewardCodesCodesInner.md +24 -0
- data/docs/RedemptionUser.md +18 -0
- data/lib/ifeelgoods/models/redemption.rb +21 -1
- data/lib/ifeelgoods/models/redemption_reward_codes.rb +205 -0
- data/lib/ifeelgoods/models/redemption_reward_codes_codes_inner.rb +224 -0
- data/lib/ifeelgoods/models/redemption_user.rb +147 -0
- data/lib/ifeelgoods/version.rb +1 -1
- data/lib/ifeelgoods.rb +3 -0
- data/spec/models/redemption_reward_codes_codes_inner_spec.rb +62 -0
- data/spec/models/redemption_reward_codes_spec.rb +52 -0
- data/spec/models/redemption_spec.rb +12 -0
- data/spec/models/redemption_user_spec.rb +36 -0
- metadata +14 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b51fc12bdb1e78f2b83b302c4f411a6ce68a81993181d89e82e1f3a83252a9a0
|
|
4
|
+
data.tar.gz: ed5c5e18eb208df170f20c48153bd02c68401cc1d933424463c6a9a329eb4cab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 80798e0e5b497ecd5f2d47c4a539b989c8537f17311e7438090107e920a8a3aec7fcfb892013f6916870859982bef374c817ee27275a8d1861cf13078ceaf56d
|
|
7
|
+
data.tar.gz: 24bc655292b0d8422961d915189af66d51bff1f764ffc08a9f2472cefdac90bae4db933fc28061fa2cd0ae4b18ccfdac3521e524f8e346bf2ac730e1bf741aae
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
ifeelgoods (0.2.0.beta.
|
|
4
|
+
ifeelgoods (0.2.0.beta.5)
|
|
5
5
|
typhoeus (~> 1.0, >= 1.0.1)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -17,7 +17,7 @@ GEM
|
|
|
17
17
|
ffi (>= 1.15.0)
|
|
18
18
|
logger
|
|
19
19
|
ffi (1.17.4-x86_64-linux-gnu)
|
|
20
|
-
io-console (0.
|
|
20
|
+
io-console (0.9.2)
|
|
21
21
|
jaro_winkler (1.5.6)
|
|
22
22
|
logger (1.7.0)
|
|
23
23
|
method_source (1.1.0)
|
|
@@ -38,7 +38,7 @@ GEM
|
|
|
38
38
|
racc (1.8.1)
|
|
39
39
|
rainbow (3.1.1)
|
|
40
40
|
rake (13.0.6)
|
|
41
|
-
reline (0.
|
|
41
|
+
reline (0.7.0)
|
|
42
42
|
io-console (~> 0.5)
|
|
43
43
|
rspec (3.13.2)
|
|
44
44
|
rspec-core (~> 3.13.0)
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Public API exposed to ifeelgoods customers.
|
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
8
|
|
|
9
9
|
- API version: v2
|
|
10
|
-
- Package version: 0.2.0.beta.
|
|
10
|
+
- Package version: 0.2.0.beta.5
|
|
11
11
|
- Generator version: 7.24.0
|
|
12
12
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
13
13
|
|
|
@@ -24,16 +24,16 @@ gem build ifeelgoods.gemspec
|
|
|
24
24
|
Then either install the gem locally:
|
|
25
25
|
|
|
26
26
|
```shell
|
|
27
|
-
gem install ./ifeelgoods-0.2.0.beta.
|
|
27
|
+
gem install ./ifeelgoods-0.2.0.beta.5.gem
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
(for development, run `gem install --dev ./ifeelgoods-0.2.0.beta.
|
|
30
|
+
(for development, run `gem install --dev ./ifeelgoods-0.2.0.beta.5.gem` to install the development dependencies)
|
|
31
31
|
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
33
33
|
|
|
34
34
|
Finally add this to the Gemfile:
|
|
35
35
|
|
|
36
|
-
gem 'ifeelgoods', '~> 0.2.0.beta.
|
|
36
|
+
gem 'ifeelgoods', '~> 0.2.0.beta.5'
|
|
37
37
|
|
|
38
38
|
### Install from Git
|
|
39
39
|
|
|
@@ -168,7 +168,10 @@ Class | Method | HTTP request | Description
|
|
|
168
168
|
- [Ifeelgoods::Redemption](docs/Redemption.md)
|
|
169
169
|
- [Ifeelgoods::RedemptionPromotion](docs/RedemptionPromotion.md)
|
|
170
170
|
- [Ifeelgoods::RedemptionReward](docs/RedemptionReward.md)
|
|
171
|
+
- [Ifeelgoods::RedemptionRewardCodes](docs/RedemptionRewardCodes.md)
|
|
172
|
+
- [Ifeelgoods::RedemptionRewardCodesCodesInner](docs/RedemptionRewardCodesCodesInner.md)
|
|
171
173
|
- [Ifeelgoods::RedemptionRewardFormat](docs/RedemptionRewardFormat.md)
|
|
174
|
+
- [Ifeelgoods::RedemptionUser](docs/RedemptionUser.md)
|
|
172
175
|
- [Ifeelgoods::RedemptionValue](docs/RedemptionValue.md)
|
|
173
176
|
- [Ifeelgoods::RewardDetails](docs/RewardDetails.md)
|
|
174
177
|
- [Ifeelgoods::RewardDetailsBrand](docs/RewardDetailsBrand.md)
|
data/docs/Redemption.md
CHANGED
|
@@ -18,8 +18,10 @@
|
|
|
18
18
|
| **activation_notification_channels** | **Array<String>** | | [optional] |
|
|
19
19
|
| **can_consult** | **Boolean** | | [optional] |
|
|
20
20
|
| **reward_format** | [**RedemptionRewardFormat**](RedemptionRewardFormat.md) | | [optional] |
|
|
21
|
+
| **reward_codes** | [**RedemptionRewardCodes**](RedemptionRewardCodes.md) | | [optional] |
|
|
21
22
|
| **reward** | [**RedemptionReward**](RedemptionReward.md) | | [optional] |
|
|
22
23
|
| **value** | [**RedemptionValue**](RedemptionValue.md) | | [optional] |
|
|
24
|
+
| **user** | [**RedemptionUser**](RedemptionUser.md) | | [optional] |
|
|
23
25
|
| **activation_datetime** | **Time** | | [optional] |
|
|
24
26
|
| **expiration_datetime** | **Time** | Redemption expiration date (when the redemption is in pending state, it may have a date after which it is no longer redeemable). | [optional] |
|
|
25
27
|
| **redeemed_datetime** | **Time** | Available when redemption has reached a redeemed state. | [optional] |
|
|
@@ -46,8 +48,10 @@ instance = Ifeelgoods::Redemption.new(
|
|
|
46
48
|
activation_notification_channels: ["email","sms"],
|
|
47
49
|
can_consult: null,
|
|
48
50
|
reward_format: null,
|
|
51
|
+
reward_codes: null,
|
|
49
52
|
reward: null,
|
|
50
53
|
value: null,
|
|
54
|
+
user: null,
|
|
51
55
|
activation_datetime: null,
|
|
52
56
|
expiration_datetime: null,
|
|
53
57
|
redeemed_datetime: null,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Ifeelgoods::RedemptionRewardCodes
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **type** | **String** | Indicates whether the reward has a single code or multiple codes. | [optional] |
|
|
8
|
+
| **codes** | [**Array<RedemptionRewardCodesCodesInner>**](RedemptionRewardCodesCodesInner.md) | | [optional] |
|
|
9
|
+
| **expiration_datetime** | **Time** | The expiration date of the reward code(s), if applicable. | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'ifeelgoods'
|
|
15
|
+
|
|
16
|
+
instance = Ifeelgoods::RedemptionRewardCodes.new(
|
|
17
|
+
type: unique_code,
|
|
18
|
+
codes: null,
|
|
19
|
+
expiration_datetime: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Ifeelgoods::RedemptionRewardCodesCodesInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **name** | **String** | The human-readable label for this code (e.g., \"Primary Code\", \"Security Code\"). | [optional] |
|
|
8
|
+
| **format** | **String** | The format of the code value. \"string\" for text codes, \"url\" for links. | [optional] |
|
|
9
|
+
| **usage** | **String** | The usage category of this code (e.g., \"primary\", \"security\", \"url\"). | [optional] |
|
|
10
|
+
| **value** | **String** | The actual code or link value to be redeemed. | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'ifeelgoods'
|
|
16
|
+
|
|
17
|
+
instance = Ifeelgoods::RedemptionRewardCodesCodesInner.new(
|
|
18
|
+
name: Primary Code,
|
|
19
|
+
format: string,
|
|
20
|
+
usage: primary,
|
|
21
|
+
value: ABC123-XYZ789
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Ifeelgoods::RedemptionUser
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **Integer** | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'ifeelgoods'
|
|
13
|
+
|
|
14
|
+
instance = Ifeelgoods::RedemptionUser.new(
|
|
15
|
+
id: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -47,10 +47,14 @@ module Ifeelgoods
|
|
|
47
47
|
|
|
48
48
|
attr_accessor :reward_format
|
|
49
49
|
|
|
50
|
+
attr_accessor :reward_codes
|
|
51
|
+
|
|
50
52
|
attr_accessor :reward
|
|
51
53
|
|
|
52
54
|
attr_accessor :value
|
|
53
55
|
|
|
56
|
+
attr_accessor :user
|
|
57
|
+
|
|
54
58
|
attr_accessor :activation_datetime
|
|
55
59
|
|
|
56
60
|
# Redemption expiration date (when the redemption is in pending state, it may have a date after which it is no longer redeemable).
|
|
@@ -103,8 +107,10 @@ module Ifeelgoods
|
|
|
103
107
|
:'activation_notification_channels' => :'activation_notification_channels',
|
|
104
108
|
:'can_consult' => :'can_consult',
|
|
105
109
|
:'reward_format' => :'reward_format',
|
|
110
|
+
:'reward_codes' => :'reward_codes',
|
|
106
111
|
:'reward' => :'reward',
|
|
107
112
|
:'value' => :'value',
|
|
113
|
+
:'user' => :'user',
|
|
108
114
|
:'activation_datetime' => :'activation_datetime',
|
|
109
115
|
:'expiration_datetime' => :'expiration_datetime',
|
|
110
116
|
:'redeemed_datetime' => :'redeemed_datetime',
|
|
@@ -140,8 +146,10 @@ module Ifeelgoods
|
|
|
140
146
|
:'activation_notification_channels' => :'Array<String>',
|
|
141
147
|
:'can_consult' => :'Boolean',
|
|
142
148
|
:'reward_format' => :'RedemptionRewardFormat',
|
|
149
|
+
:'reward_codes' => :'RedemptionRewardCodes',
|
|
143
150
|
:'reward' => :'RedemptionReward',
|
|
144
151
|
:'value' => :'RedemptionValue',
|
|
152
|
+
:'user' => :'RedemptionUser',
|
|
145
153
|
:'activation_datetime' => :'Time',
|
|
146
154
|
:'expiration_datetime' => :'Time',
|
|
147
155
|
:'redeemed_datetime' => :'Time',
|
|
@@ -158,7 +166,9 @@ module Ifeelgoods
|
|
|
158
166
|
:'activation_notification_channels',
|
|
159
167
|
:'can_consult',
|
|
160
168
|
:'reward_format',
|
|
169
|
+
:'reward_codes',
|
|
161
170
|
:'value',
|
|
171
|
+
:'user',
|
|
162
172
|
:'expiration_datetime',
|
|
163
173
|
:'redeemed_datetime',
|
|
164
174
|
:'refunded_datetime',
|
|
@@ -243,6 +253,10 @@ module Ifeelgoods
|
|
|
243
253
|
self.reward_format = attributes[:'reward_format']
|
|
244
254
|
end
|
|
245
255
|
|
|
256
|
+
if attributes.key?(:'reward_codes')
|
|
257
|
+
self.reward_codes = attributes[:'reward_codes']
|
|
258
|
+
end
|
|
259
|
+
|
|
246
260
|
if attributes.key?(:'reward')
|
|
247
261
|
self.reward = attributes[:'reward']
|
|
248
262
|
end
|
|
@@ -251,6 +265,10 @@ module Ifeelgoods
|
|
|
251
265
|
self.value = attributes[:'value']
|
|
252
266
|
end
|
|
253
267
|
|
|
268
|
+
if attributes.key?(:'user')
|
|
269
|
+
self.user = attributes[:'user']
|
|
270
|
+
end
|
|
271
|
+
|
|
254
272
|
if attributes.key?(:'activation_datetime')
|
|
255
273
|
self.activation_datetime = attributes[:'activation_datetime']
|
|
256
274
|
end
|
|
@@ -318,8 +336,10 @@ module Ifeelgoods
|
|
|
318
336
|
activation_notification_channels == o.activation_notification_channels &&
|
|
319
337
|
can_consult == o.can_consult &&
|
|
320
338
|
reward_format == o.reward_format &&
|
|
339
|
+
reward_codes == o.reward_codes &&
|
|
321
340
|
reward == o.reward &&
|
|
322
341
|
value == o.value &&
|
|
342
|
+
user == o.user &&
|
|
323
343
|
activation_datetime == o.activation_datetime &&
|
|
324
344
|
expiration_datetime == o.expiration_datetime &&
|
|
325
345
|
redeemed_datetime == o.redeemed_datetime &&
|
|
@@ -336,7 +356,7 @@ module Ifeelgoods
|
|
|
336
356
|
# Calculates hash code according to all attributes.
|
|
337
357
|
# @return [Integer] Hash code
|
|
338
358
|
def hash
|
|
339
|
-
[id, url, state, order_id, testing, cancelable, reversed, client, promotion, authentication_systems, notification_channels, activation_notification_channels, can_consult, reward_format, reward, value, activation_datetime, expiration_datetime, redeemed_datetime, refunded_datetime, updated_datetime].hash
|
|
359
|
+
[id, url, state, order_id, testing, cancelable, reversed, client, promotion, authentication_systems, notification_channels, activation_notification_channels, can_consult, reward_format, reward_codes, reward, value, user, activation_datetime, expiration_datetime, redeemed_datetime, refunded_datetime, updated_datetime].hash
|
|
340
360
|
end
|
|
341
361
|
|
|
342
362
|
# Builds the object from hash
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Fulfillment API
|
|
3
|
+
|
|
4
|
+
#Public API exposed to ifeelgoods customers.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Ifeelgoods
|
|
17
|
+
# Only available when redemption is redeemed. Please refer to [FAQ](ref:faq#how-to-retrieve-redemption-code-format) for more information about `reward_codes` object.
|
|
18
|
+
class RedemptionRewardCodes < ApiModelBase
|
|
19
|
+
# Indicates whether the reward has a single code or multiple codes.
|
|
20
|
+
attr_accessor :type
|
|
21
|
+
|
|
22
|
+
attr_accessor :codes
|
|
23
|
+
|
|
24
|
+
# The expiration date of the reward code(s), if applicable.
|
|
25
|
+
attr_accessor :expiration_datetime
|
|
26
|
+
|
|
27
|
+
class EnumAttributeValidator
|
|
28
|
+
attr_reader :datatype
|
|
29
|
+
attr_reader :allowable_values
|
|
30
|
+
|
|
31
|
+
def initialize(datatype, allowable_values)
|
|
32
|
+
@allowable_values = allowable_values.map do |value|
|
|
33
|
+
case datatype.to_s
|
|
34
|
+
when /Integer/i
|
|
35
|
+
value.to_i
|
|
36
|
+
when /Float/i
|
|
37
|
+
value.to_f
|
|
38
|
+
else
|
|
39
|
+
value
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def valid?(value)
|
|
45
|
+
!value || allowable_values.include?(value)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
50
|
+
def self.attribute_map
|
|
51
|
+
{
|
|
52
|
+
:'type' => :'type',
|
|
53
|
+
:'codes' => :'codes',
|
|
54
|
+
:'expiration_datetime' => :'expiration_datetime'
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Returns attribute mapping this model knows about
|
|
59
|
+
def self.acceptable_attribute_map
|
|
60
|
+
attribute_map
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Returns all the JSON keys this model knows about
|
|
64
|
+
def self.acceptable_attributes
|
|
65
|
+
acceptable_attribute_map.values
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Attribute type mapping.
|
|
69
|
+
def self.openapi_types
|
|
70
|
+
{
|
|
71
|
+
:'type' => :'String',
|
|
72
|
+
:'codes' => :'Array<RedemptionRewardCodesCodesInner>',
|
|
73
|
+
:'expiration_datetime' => :'Time'
|
|
74
|
+
}
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# List of attributes with nullable: true
|
|
78
|
+
def self.openapi_nullable
|
|
79
|
+
Set.new([
|
|
80
|
+
:'expiration_datetime'
|
|
81
|
+
])
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Initializes the object
|
|
85
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
86
|
+
def initialize(attributes = {})
|
|
87
|
+
if (!attributes.is_a?(Hash))
|
|
88
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Ifeelgoods::RedemptionRewardCodes` initialize method"
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
92
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
93
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
94
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
95
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Ifeelgoods::RedemptionRewardCodes`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
96
|
+
end
|
|
97
|
+
h[k.to_sym] = v
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'type')
|
|
101
|
+
self.type = attributes[:'type']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'codes')
|
|
105
|
+
if (value = attributes[:'codes']).is_a?(Array)
|
|
106
|
+
self.codes = value
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'expiration_datetime')
|
|
111
|
+
self.expiration_datetime = attributes[:'expiration_datetime']
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
116
|
+
# @return Array for valid properties with the reasons
|
|
117
|
+
def list_invalid_properties
|
|
118
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
119
|
+
invalid_properties = Array.new
|
|
120
|
+
invalid_properties
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Check to see if the all the properties in the model are valid
|
|
124
|
+
# @return true if the model is valid
|
|
125
|
+
def valid?
|
|
126
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
127
|
+
type_validator = EnumAttributeValidator.new('String', ["unique_code", "multiple_codes"])
|
|
128
|
+
return false unless type_validator.valid?(@type)
|
|
129
|
+
true
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
133
|
+
# @param [Object] type Object to be assigned
|
|
134
|
+
def type=(type)
|
|
135
|
+
validator = EnumAttributeValidator.new('String', ["unique_code", "multiple_codes"])
|
|
136
|
+
unless validator.valid?(type)
|
|
137
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
138
|
+
end
|
|
139
|
+
@type = type
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Checks equality by comparing each attribute.
|
|
143
|
+
# @param [Object] Object to be compared
|
|
144
|
+
def ==(o)
|
|
145
|
+
return true if self.equal?(o)
|
|
146
|
+
self.class == o.class &&
|
|
147
|
+
type == o.type &&
|
|
148
|
+
codes == o.codes &&
|
|
149
|
+
expiration_datetime == o.expiration_datetime
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# @see the `==` method
|
|
153
|
+
# @param [Object] Object to be compared
|
|
154
|
+
def eql?(o)
|
|
155
|
+
self == o
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Calculates hash code according to all attributes.
|
|
159
|
+
# @return [Integer] Hash code
|
|
160
|
+
def hash
|
|
161
|
+
[type, codes, expiration_datetime].hash
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Builds the object from hash
|
|
165
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
166
|
+
# @return [Object] Returns the model itself
|
|
167
|
+
def self.build_from_hash(attributes)
|
|
168
|
+
return nil unless attributes.is_a?(Hash)
|
|
169
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
170
|
+
transformed_hash = {}
|
|
171
|
+
openapi_types.each_pair do |key, type|
|
|
172
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
173
|
+
transformed_hash["#{key}"] = nil
|
|
174
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
175
|
+
# check to ensure the input is an array given that the attribute
|
|
176
|
+
# is documented as an array but the input is not
|
|
177
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
178
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
179
|
+
end
|
|
180
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
181
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
new(transformed_hash)
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Returns the object in the form of hash
|
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
|
189
|
+
def to_hash
|
|
190
|
+
hash = {}
|
|
191
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
192
|
+
value = self.send(attr)
|
|
193
|
+
if value.nil?
|
|
194
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
195
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
hash[param] = _to_hash(value)
|
|
199
|
+
end
|
|
200
|
+
hash
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
end
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Fulfillment API
|
|
3
|
+
|
|
4
|
+
#Public API exposed to ifeelgoods customers.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Ifeelgoods
|
|
17
|
+
class RedemptionRewardCodesCodesInner < ApiModelBase
|
|
18
|
+
# The human-readable label for this code (e.g., \"Primary Code\", \"Security Code\").
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
21
|
+
# The format of the code value. \"string\" for text codes, \"url\" for links.
|
|
22
|
+
attr_accessor :format
|
|
23
|
+
|
|
24
|
+
# The usage category of this code (e.g., \"primary\", \"security\", \"url\").
|
|
25
|
+
attr_accessor :usage
|
|
26
|
+
|
|
27
|
+
# The actual code or link value to be redeemed.
|
|
28
|
+
attr_accessor :value
|
|
29
|
+
|
|
30
|
+
class EnumAttributeValidator
|
|
31
|
+
attr_reader :datatype
|
|
32
|
+
attr_reader :allowable_values
|
|
33
|
+
|
|
34
|
+
def initialize(datatype, allowable_values)
|
|
35
|
+
@allowable_values = allowable_values.map do |value|
|
|
36
|
+
case datatype.to_s
|
|
37
|
+
when /Integer/i
|
|
38
|
+
value.to_i
|
|
39
|
+
when /Float/i
|
|
40
|
+
value.to_f
|
|
41
|
+
else
|
|
42
|
+
value
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def valid?(value)
|
|
48
|
+
!value || allowable_values.include?(value)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
53
|
+
def self.attribute_map
|
|
54
|
+
{
|
|
55
|
+
:'name' => :'name',
|
|
56
|
+
:'format' => :'format',
|
|
57
|
+
:'usage' => :'usage',
|
|
58
|
+
:'value' => :'value'
|
|
59
|
+
}
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Returns attribute mapping this model knows about
|
|
63
|
+
def self.acceptable_attribute_map
|
|
64
|
+
attribute_map
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Returns all the JSON keys this model knows about
|
|
68
|
+
def self.acceptable_attributes
|
|
69
|
+
acceptable_attribute_map.values
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Attribute type mapping.
|
|
73
|
+
def self.openapi_types
|
|
74
|
+
{
|
|
75
|
+
:'name' => :'String',
|
|
76
|
+
:'format' => :'String',
|
|
77
|
+
:'usage' => :'String',
|
|
78
|
+
:'value' => :'String'
|
|
79
|
+
}
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# List of attributes with nullable: true
|
|
83
|
+
def self.openapi_nullable
|
|
84
|
+
Set.new([
|
|
85
|
+
])
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Initializes the object
|
|
89
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
90
|
+
def initialize(attributes = {})
|
|
91
|
+
if (!attributes.is_a?(Hash))
|
|
92
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Ifeelgoods::RedemptionRewardCodesCodesInner` initialize method"
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
96
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
97
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
98
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
99
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Ifeelgoods::RedemptionRewardCodesCodesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
100
|
+
end
|
|
101
|
+
h[k.to_sym] = v
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'name')
|
|
105
|
+
self.name = attributes[:'name']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'format')
|
|
109
|
+
self.format = attributes[:'format']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'usage')
|
|
113
|
+
self.usage = attributes[:'usage']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'value')
|
|
117
|
+
self.value = attributes[:'value']
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
122
|
+
# @return Array for valid properties with the reasons
|
|
123
|
+
def list_invalid_properties
|
|
124
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
125
|
+
invalid_properties = Array.new
|
|
126
|
+
invalid_properties
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Check to see if the all the properties in the model are valid
|
|
130
|
+
# @return true if the model is valid
|
|
131
|
+
def valid?
|
|
132
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
133
|
+
format_validator = EnumAttributeValidator.new('String', ["string", "url"])
|
|
134
|
+
return false unless format_validator.valid?(@format)
|
|
135
|
+
usage_validator = EnumAttributeValidator.new('String', ["tracking", "security", "primary", "url", "security_url", "security_url_code", "preauth_link", "preauth_short_link"])
|
|
136
|
+
return false unless usage_validator.valid?(@usage)
|
|
137
|
+
true
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
141
|
+
# @param [Object] format Object to be assigned
|
|
142
|
+
def format=(format)
|
|
143
|
+
validator = EnumAttributeValidator.new('String', ["string", "url"])
|
|
144
|
+
unless validator.valid?(format)
|
|
145
|
+
fail ArgumentError, "invalid value for \"format\", must be one of #{validator.allowable_values}."
|
|
146
|
+
end
|
|
147
|
+
@format = format
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
151
|
+
# @param [Object] usage Object to be assigned
|
|
152
|
+
def usage=(usage)
|
|
153
|
+
validator = EnumAttributeValidator.new('String', ["tracking", "security", "primary", "url", "security_url", "security_url_code", "preauth_link", "preauth_short_link"])
|
|
154
|
+
unless validator.valid?(usage)
|
|
155
|
+
fail ArgumentError, "invalid value for \"usage\", must be one of #{validator.allowable_values}."
|
|
156
|
+
end
|
|
157
|
+
@usage = usage
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Checks equality by comparing each attribute.
|
|
161
|
+
# @param [Object] Object to be compared
|
|
162
|
+
def ==(o)
|
|
163
|
+
return true if self.equal?(o)
|
|
164
|
+
self.class == o.class &&
|
|
165
|
+
name == o.name &&
|
|
166
|
+
format == o.format &&
|
|
167
|
+
usage == o.usage &&
|
|
168
|
+
value == o.value
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# @see the `==` method
|
|
172
|
+
# @param [Object] Object to be compared
|
|
173
|
+
def eql?(o)
|
|
174
|
+
self == o
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Calculates hash code according to all attributes.
|
|
178
|
+
# @return [Integer] Hash code
|
|
179
|
+
def hash
|
|
180
|
+
[name, format, usage, value].hash
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Builds the object from hash
|
|
184
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
185
|
+
# @return [Object] Returns the model itself
|
|
186
|
+
def self.build_from_hash(attributes)
|
|
187
|
+
return nil unless attributes.is_a?(Hash)
|
|
188
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
189
|
+
transformed_hash = {}
|
|
190
|
+
openapi_types.each_pair do |key, type|
|
|
191
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
192
|
+
transformed_hash["#{key}"] = nil
|
|
193
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
194
|
+
# check to ensure the input is an array given that the attribute
|
|
195
|
+
# is documented as an array but the input is not
|
|
196
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
197
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
198
|
+
end
|
|
199
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
200
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
new(transformed_hash)
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Returns the object in the form of hash
|
|
207
|
+
# @return [Hash] Returns the object in the form of hash
|
|
208
|
+
def to_hash
|
|
209
|
+
hash = {}
|
|
210
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
211
|
+
value = self.send(attr)
|
|
212
|
+
if value.nil?
|
|
213
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
214
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
hash[param] = _to_hash(value)
|
|
218
|
+
end
|
|
219
|
+
hash
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
end
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Fulfillment API
|
|
3
|
+
|
|
4
|
+
#Public API exposed to ifeelgoods customers.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Ifeelgoods
|
|
17
|
+
class RedemptionUser < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'id' => :'id'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'id' => :'Integer'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Ifeelgoods::RedemptionUser` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Ifeelgoods::RedemptionUser`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'id')
|
|
67
|
+
self.id = attributes[:'id']
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
72
|
+
# @return Array for valid properties with the reasons
|
|
73
|
+
def list_invalid_properties
|
|
74
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
75
|
+
invalid_properties = Array.new
|
|
76
|
+
invalid_properties
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Check to see if the all the properties in the model are valid
|
|
80
|
+
# @return true if the model is valid
|
|
81
|
+
def valid?
|
|
82
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
83
|
+
true
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Checks equality by comparing each attribute.
|
|
87
|
+
# @param [Object] Object to be compared
|
|
88
|
+
def ==(o)
|
|
89
|
+
return true if self.equal?(o)
|
|
90
|
+
self.class == o.class &&
|
|
91
|
+
id == o.id
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# @see the `==` method
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def eql?(o)
|
|
97
|
+
self == o
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Calculates hash code according to all attributes.
|
|
101
|
+
# @return [Integer] Hash code
|
|
102
|
+
def hash
|
|
103
|
+
[id].hash
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Builds the object from hash
|
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
108
|
+
# @return [Object] Returns the model itself
|
|
109
|
+
def self.build_from_hash(attributes)
|
|
110
|
+
return nil unless attributes.is_a?(Hash)
|
|
111
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
112
|
+
transformed_hash = {}
|
|
113
|
+
openapi_types.each_pair do |key, type|
|
|
114
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
115
|
+
transformed_hash["#{key}"] = nil
|
|
116
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
117
|
+
# check to ensure the input is an array given that the attribute
|
|
118
|
+
# is documented as an array but the input is not
|
|
119
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
120
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
121
|
+
end
|
|
122
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
123
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
new(transformed_hash)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Returns the object in the form of hash
|
|
130
|
+
# @return [Hash] Returns the object in the form of hash
|
|
131
|
+
def to_hash
|
|
132
|
+
hash = {}
|
|
133
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
134
|
+
value = self.send(attr)
|
|
135
|
+
if value.nil?
|
|
136
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
137
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
hash[param] = _to_hash(value)
|
|
141
|
+
end
|
|
142
|
+
hash
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
end
|
data/lib/ifeelgoods/version.rb
CHANGED
data/lib/ifeelgoods.rb
CHANGED
|
@@ -68,7 +68,10 @@ require 'ifeelgoods/models/promotion_details_rewards_inner'
|
|
|
68
68
|
require 'ifeelgoods/models/redemption'
|
|
69
69
|
require 'ifeelgoods/models/redemption_promotion'
|
|
70
70
|
require 'ifeelgoods/models/redemption_reward'
|
|
71
|
+
require 'ifeelgoods/models/redemption_reward_codes'
|
|
72
|
+
require 'ifeelgoods/models/redemption_reward_codes_codes_inner'
|
|
71
73
|
require 'ifeelgoods/models/redemption_reward_format'
|
|
74
|
+
require 'ifeelgoods/models/redemption_user'
|
|
72
75
|
require 'ifeelgoods/models/redemption_value'
|
|
73
76
|
require 'ifeelgoods/models/reward_details'
|
|
74
77
|
require 'ifeelgoods/models/reward_details_brand'
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Fulfillment API
|
|
3
|
+
|
|
4
|
+
#Public API exposed to ifeelgoods customers.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Ifeelgoods::RedemptionRewardCodesCodesInner
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Ifeelgoods::RedemptionRewardCodesCodesInner do
|
|
21
|
+
#let(:instance) { Ifeelgoods::RedemptionRewardCodesCodesInner.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of RedemptionRewardCodesCodesInner' do
|
|
24
|
+
it 'should create an instance of RedemptionRewardCodesCodesInner' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Ifeelgoods::RedemptionRewardCodesCodesInner)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "name"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "format"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["string", "url"])
|
|
40
|
+
# validator.allowable_values.each do |value|
|
|
41
|
+
# expect { instance.format = value }.not_to raise_error
|
|
42
|
+
# end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
describe 'test attribute "usage"' do
|
|
47
|
+
it 'should work' do
|
|
48
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
49
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["tracking", "security", "primary", "url", "security_url", "security_url_code", "preauth_link", "preauth_short_link"])
|
|
50
|
+
# validator.allowable_values.each do |value|
|
|
51
|
+
# expect { instance.usage = value }.not_to raise_error
|
|
52
|
+
# end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
describe 'test attribute "value"' do
|
|
57
|
+
it 'should work' do
|
|
58
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Fulfillment API
|
|
3
|
+
|
|
4
|
+
#Public API exposed to ifeelgoods customers.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Ifeelgoods::RedemptionRewardCodes
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Ifeelgoods::RedemptionRewardCodes do
|
|
21
|
+
#let(:instance) { Ifeelgoods::RedemptionRewardCodes.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of RedemptionRewardCodes' do
|
|
24
|
+
it 'should create an instance of RedemptionRewardCodes' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Ifeelgoods::RedemptionRewardCodes)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "type"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["unique_code", "multiple_codes"])
|
|
34
|
+
# validator.allowable_values.each do |value|
|
|
35
|
+
# expect { instance.type = value }.not_to raise_error
|
|
36
|
+
# end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
describe 'test attribute "codes"' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
describe 'test attribute "expiration_datetime"' do
|
|
47
|
+
it 'should work' do
|
|
48
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
end
|
|
@@ -123,6 +123,12 @@ describe Ifeelgoods::Redemption do
|
|
|
123
123
|
end
|
|
124
124
|
end
|
|
125
125
|
|
|
126
|
+
describe 'test attribute "reward_codes"' do
|
|
127
|
+
it 'should work' do
|
|
128
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
126
132
|
describe 'test attribute "reward"' do
|
|
127
133
|
it 'should work' do
|
|
128
134
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -135,6 +141,12 @@ describe Ifeelgoods::Redemption do
|
|
|
135
141
|
end
|
|
136
142
|
end
|
|
137
143
|
|
|
144
|
+
describe 'test attribute "user"' do
|
|
145
|
+
it 'should work' do
|
|
146
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
138
150
|
describe 'test attribute "activation_datetime"' do
|
|
139
151
|
it 'should work' do
|
|
140
152
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Fulfillment API
|
|
3
|
+
|
|
4
|
+
#Public API exposed to ifeelgoods customers.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v2
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Ifeelgoods::RedemptionUser
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Ifeelgoods::RedemptionUser do
|
|
21
|
+
#let(:instance) { Ifeelgoods::RedemptionUser.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of RedemptionUser' do
|
|
24
|
+
it 'should create an instance of RedemptionUser' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Ifeelgoods::RedemptionUser)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "id"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ifeelgoods
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.0.beta.
|
|
4
|
+
version: 0.2.0.beta.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- IFeelGoods Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-08-
|
|
11
|
+
date: 2026-08-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -114,7 +114,10 @@ files:
|
|
|
114
114
|
- docs/Redemption.md
|
|
115
115
|
- docs/RedemptionPromotion.md
|
|
116
116
|
- docs/RedemptionReward.md
|
|
117
|
+
- docs/RedemptionRewardCodes.md
|
|
118
|
+
- docs/RedemptionRewardCodesCodesInner.md
|
|
117
119
|
- docs/RedemptionRewardFormat.md
|
|
120
|
+
- docs/RedemptionUser.md
|
|
118
121
|
- docs/RedemptionValue.md
|
|
119
122
|
- docs/RedemptionsApi.md
|
|
120
123
|
- docs/RewardDetails.md
|
|
@@ -200,7 +203,10 @@ files:
|
|
|
200
203
|
- lib/ifeelgoods/models/redemption.rb
|
|
201
204
|
- lib/ifeelgoods/models/redemption_promotion.rb
|
|
202
205
|
- lib/ifeelgoods/models/redemption_reward.rb
|
|
206
|
+
- lib/ifeelgoods/models/redemption_reward_codes.rb
|
|
207
|
+
- lib/ifeelgoods/models/redemption_reward_codes_codes_inner.rb
|
|
203
208
|
- lib/ifeelgoods/models/redemption_reward_format.rb
|
|
209
|
+
- lib/ifeelgoods/models/redemption_user.rb
|
|
204
210
|
- lib/ifeelgoods/models/redemption_value.rb
|
|
205
211
|
- lib/ifeelgoods/models/reward_details.rb
|
|
206
212
|
- lib/ifeelgoods/models/reward_details_brand.rb
|
|
@@ -274,9 +280,12 @@ files:
|
|
|
274
280
|
- spec/models/promotion_details_rewards_inner_spec.rb
|
|
275
281
|
- spec/models/promotion_details_spec.rb
|
|
276
282
|
- spec/models/redemption_promotion_spec.rb
|
|
283
|
+
- spec/models/redemption_reward_codes_codes_inner_spec.rb
|
|
284
|
+
- spec/models/redemption_reward_codes_spec.rb
|
|
277
285
|
- spec/models/redemption_reward_format_spec.rb
|
|
278
286
|
- spec/models/redemption_reward_spec.rb
|
|
279
287
|
- spec/models/redemption_spec.rb
|
|
288
|
+
- spec/models/redemption_user_spec.rb
|
|
280
289
|
- spec/models/redemption_value_spec.rb
|
|
281
290
|
- spec/models/reward_details_brand_spec.rb
|
|
282
291
|
- spec/models/reward_details_dimensions_spec.rb
|
|
@@ -329,6 +338,7 @@ test_files:
|
|
|
329
338
|
- spec/models/vendor_place_brand_spec.rb
|
|
330
339
|
- spec/models/get_current_account200_response_spec.rb
|
|
331
340
|
- spec/models/list_redemptions200_response_spec.rb
|
|
341
|
+
- spec/models/redemption_reward_codes_codes_inner_spec.rb
|
|
332
342
|
- spec/models/create_redemption_request_data_spec.rb
|
|
333
343
|
- spec/models/redemption_promotion_spec.rb
|
|
334
344
|
- spec/models/card_consult_redemption422_response_spec.rb
|
|
@@ -341,6 +351,7 @@ test_files:
|
|
|
341
351
|
- spec/models/user_spec.rb
|
|
342
352
|
- spec/models/product_type_spec.rb
|
|
343
353
|
- spec/models/reward_details_targeting_spec.rb
|
|
354
|
+
- spec/models/redemption_user_spec.rb
|
|
344
355
|
- spec/models/list_client_promotions200_response_paging_spec.rb
|
|
345
356
|
- spec/models/get_reward_by_sku200_response_spec.rb
|
|
346
357
|
- spec/models/stats_values_inner_states_spec.rb
|
|
@@ -364,6 +375,7 @@ test_files:
|
|
|
364
375
|
- spec/models/activate_redemption_request_data_spec.rb
|
|
365
376
|
- spec/models/address_spec.rb
|
|
366
377
|
- spec/models/list_client_promotions401_response_spec.rb
|
|
378
|
+
- spec/models/redemption_reward_codes_spec.rb
|
|
367
379
|
- spec/models/get_promotion_by_id200_response_spec.rb
|
|
368
380
|
- spec/models/reward_format_spec.rb
|
|
369
381
|
- spec/models/stats_spec.rb
|