celitech 2.0.7
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 +7 -0
- data/README.md +225 -0
- data/lib/celitech/client.rb +81 -0
- data/lib/celitech/config.rb +48 -0
- data/lib/celitech/environment.rb +7 -0
- data/lib/celitech/error.rb +50 -0
- data/lib/celitech/http/connection.rb +321 -0
- data/lib/celitech/http/hooks.rb +17 -0
- data/lib/celitech/http/oauth_token_manager.rb +76 -0
- data/lib/celitech/http/response.rb +35 -0
- data/lib/celitech/models/bad_request.rb +47 -0
- data/lib/celitech/models/create_purchase_ok_response.rb +63 -0
- data/lib/celitech/models/create_purchase_ok_response_profile.rb +75 -0
- data/lib/celitech/models/create_purchase_ok_response_purchase.rb +111 -0
- data/lib/celitech/models/create_purchase_request.rb +155 -0
- data/lib/celitech/models/create_purchase_request_language.rb +14 -0
- data/lib/celitech/models/create_purchase_v2_ok_response.rb +63 -0
- data/lib/celitech/models/create_purchase_v2_ok_response_profile.rb +96 -0
- data/lib/celitech/models/create_purchase_v2_ok_response_purchase.rb +70 -0
- data/lib/celitech/models/create_purchase_v2_request.rb +156 -0
- data/lib/celitech/models/create_purchase_v2_request_language.rb +14 -0
- data/lib/celitech/models/destinations.rb +80 -0
- data/lib/celitech/models/device.rb +80 -0
- data/lib/celitech/models/edit_purchase_ok_response.rb +90 -0
- data/lib/celitech/models/edit_purchase_request.rb +90 -0
- data/lib/celitech/models/get_esim_device_ok_response.rb +52 -0
- data/lib/celitech/models/get_esim_history_ok_response.rb +52 -0
- data/lib/celitech/models/get_esim_history_ok_response_esim.rb +61 -0
- data/lib/celitech/models/get_esim_ok_response.rb +52 -0
- data/lib/celitech/models/get_esim_ok_response_esim.rb +116 -0
- data/lib/celitech/models/get_purchase_consumption_ok_response.rb +70 -0
- data/lib/celitech/models/grant_type.rb +10 -0
- data/lib/celitech/models/history.rb +70 -0
- data/lib/celitech/models/list_destinations_ok_response.rb +51 -0
- data/lib/celitech/models/list_packages_ok_response.rb +64 -0
- data/lib/celitech/models/list_purchases_ok_response.rb +64 -0
- data/lib/celitech/models/o_auth_token_request.rb +84 -0
- data/lib/celitech/models/o_auth_token_response.rb +60 -0
- data/lib/celitech/models/open_model.rb +30 -0
- data/lib/celitech/models/package.rb +111 -0
- data/lib/celitech/models/packages.rb +121 -0
- data/lib/celitech/models/purchases.rb +178 -0
- data/lib/celitech/models/purchases_esim.rb +51 -0
- data/lib/celitech/models/serializable.rb +63 -0
- data/lib/celitech/models/token_ok_response.rb +47 -0
- data/lib/celitech/models/top_up_esim_ok_response.rb +63 -0
- data/lib/celitech/models/top_up_esim_ok_response_profile.rb +51 -0
- data/lib/celitech/models/top_up_esim_ok_response_purchase.rb +111 -0
- data/lib/celitech/models/top_up_esim_request.rb +145 -0
- data/lib/celitech/models/unauthorized.rb +47 -0
- data/lib/celitech/models/union_type.rb +12 -0
- data/lib/celitech/serializers/form_serializer.rb +41 -0
- data/lib/celitech/serializers/json_serializer.rb +41 -0
- data/lib/celitech/services/destinations.rb +59 -0
- data/lib/celitech/services/e_sim.rb +108 -0
- data/lib/celitech/services/i_frame.rb +59 -0
- data/lib/celitech/services/o_auth.rb +49 -0
- data/lib/celitech/services/packages.rb +82 -0
- data/lib/celitech/services/purchases.rb +195 -0
- data/lib/celitech/validator.rb +42 -0
- data/lib/celitech/version.rb +5 -0
- data/lib/celitech.rb +64 -0
- metadata +162 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Celitech
|
|
4
|
+
module Models
|
|
5
|
+
class CreatePurchaseOkResponsePurchase
|
|
6
|
+
include ::Celitech::Models::Serializable
|
|
7
|
+
include ::Celitech::Models::OpenModel
|
|
8
|
+
|
|
9
|
+
def self.wire_keys
|
|
10
|
+
{
|
|
11
|
+
id: 'id',
|
|
12
|
+
package_id: 'packageId',
|
|
13
|
+
start_date: 'startDate',
|
|
14
|
+
end_date: 'endDate',
|
|
15
|
+
created_date: 'createdDate',
|
|
16
|
+
start_time: 'startTime',
|
|
17
|
+
end_time: 'endTime',
|
|
18
|
+
}.freeze
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def id
|
|
22
|
+
val = @id
|
|
23
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def package_id
|
|
27
|
+
val = @package_id
|
|
28
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def start_date
|
|
32
|
+
val = @start_date
|
|
33
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def end_date
|
|
37
|
+
val = @end_date
|
|
38
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def created_date
|
|
42
|
+
val = @created_date
|
|
43
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def start_time
|
|
47
|
+
val = @start_time
|
|
48
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def end_time
|
|
52
|
+
val = @end_time
|
|
53
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
attr_reader :additional_properties
|
|
57
|
+
|
|
58
|
+
def initialize(
|
|
59
|
+
id: ::Celitech::Models::UNSET,
|
|
60
|
+
package_id: ::Celitech::Models::UNSET,
|
|
61
|
+
start_date: ::Celitech::Models::UNSET,
|
|
62
|
+
end_date: ::Celitech::Models::UNSET,
|
|
63
|
+
created_date: ::Celitech::Models::UNSET,
|
|
64
|
+
start_time: ::Celitech::Models::UNSET,
|
|
65
|
+
end_time: ::Celitech::Models::UNSET,
|
|
66
|
+
additional_properties: {}
|
|
67
|
+
)
|
|
68
|
+
@id = id
|
|
69
|
+
@package_id = package_id
|
|
70
|
+
@start_date = start_date
|
|
71
|
+
@end_date = end_date
|
|
72
|
+
@created_date = created_date
|
|
73
|
+
@start_time = start_time
|
|
74
|
+
@end_time = end_time
|
|
75
|
+
@additional_properties = additional_properties
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def self.from_hash(hash)
|
|
79
|
+
return unless hash
|
|
80
|
+
|
|
81
|
+
new(
|
|
82
|
+
id: hash.fetch('id', ::Celitech::Models::UNSET),
|
|
83
|
+
package_id: hash.fetch('packageId', ::Celitech::Models::UNSET),
|
|
84
|
+
start_date: hash.fetch('startDate', ::Celitech::Models::UNSET),
|
|
85
|
+
end_date: hash.fetch('endDate', ::Celitech::Models::UNSET),
|
|
86
|
+
created_date: hash.fetch('createdDate', ::Celitech::Models::UNSET),
|
|
87
|
+
start_time: hash.fetch('startTime', ::Celitech::Models::UNSET),
|
|
88
|
+
end_time: hash.fetch('endTime', ::Celitech::Models::UNSET),
|
|
89
|
+
additional_properties:
|
|
90
|
+
hash.except('id', 'packageId', 'startDate', 'endDate', 'createdDate', 'startTime', 'endTime'),
|
|
91
|
+
)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def attributes
|
|
95
|
+
{
|
|
96
|
+
id: @id,
|
|
97
|
+
package_id: @package_id,
|
|
98
|
+
start_date: @start_date,
|
|
99
|
+
end_date: @end_date,
|
|
100
|
+
created_date: @created_date,
|
|
101
|
+
start_time: @start_time,
|
|
102
|
+
end_time: @end_time,
|
|
103
|
+
}
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def open_model_extras
|
|
107
|
+
@additional_properties
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Celitech
|
|
4
|
+
module Models
|
|
5
|
+
class CreatePurchaseRequest
|
|
6
|
+
include ::Celitech::Models::Serializable
|
|
7
|
+
include ::Celitech::Models::OpenModel
|
|
8
|
+
|
|
9
|
+
def self.wire_keys
|
|
10
|
+
{
|
|
11
|
+
destination: 'destination',
|
|
12
|
+
data_limit_in_gb: 'dataLimitInGB',
|
|
13
|
+
start_date: 'startDate',
|
|
14
|
+
end_date: 'endDate',
|
|
15
|
+
email: 'email',
|
|
16
|
+
reference_id: 'referenceId',
|
|
17
|
+
network_brand: 'networkBrand',
|
|
18
|
+
email_brand: 'emailBrand',
|
|
19
|
+
language: 'language',
|
|
20
|
+
start_time: 'startTime',
|
|
21
|
+
end_time: 'endTime',
|
|
22
|
+
}.freeze
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def destination
|
|
26
|
+
val = @destination
|
|
27
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def data_limit_in_gb
|
|
31
|
+
val = @data_limit_in_gb
|
|
32
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def start_date
|
|
36
|
+
val = @start_date
|
|
37
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def end_date
|
|
41
|
+
val = @end_date
|
|
42
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def email
|
|
46
|
+
val = @email
|
|
47
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def reference_id
|
|
51
|
+
val = @reference_id
|
|
52
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def network_brand
|
|
56
|
+
val = @network_brand
|
|
57
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def email_brand
|
|
61
|
+
val = @email_brand
|
|
62
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def language
|
|
66
|
+
val = @language
|
|
67
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def start_time
|
|
71
|
+
val = @start_time
|
|
72
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def end_time
|
|
76
|
+
val = @end_time
|
|
77
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
attr_reader :additional_properties
|
|
81
|
+
|
|
82
|
+
def initialize(
|
|
83
|
+
destination: ::Celitech::Models::UNSET,
|
|
84
|
+
data_limit_in_gb: ::Celitech::Models::UNSET,
|
|
85
|
+
start_date: ::Celitech::Models::UNSET,
|
|
86
|
+
end_date: ::Celitech::Models::UNSET,
|
|
87
|
+
email: ::Celitech::Models::UNSET,
|
|
88
|
+
reference_id: ::Celitech::Models::UNSET,
|
|
89
|
+
network_brand: ::Celitech::Models::UNSET,
|
|
90
|
+
email_brand: ::Celitech::Models::UNSET,
|
|
91
|
+
language: ::Celitech::Models::UNSET,
|
|
92
|
+
start_time: ::Celitech::Models::UNSET,
|
|
93
|
+
end_time: ::Celitech::Models::UNSET,
|
|
94
|
+
additional_properties: {}
|
|
95
|
+
)
|
|
96
|
+
@destination = destination
|
|
97
|
+
@data_limit_in_gb = data_limit_in_gb
|
|
98
|
+
@start_date = start_date
|
|
99
|
+
@end_date = end_date
|
|
100
|
+
@email = email
|
|
101
|
+
@reference_id = reference_id
|
|
102
|
+
@network_brand = network_brand
|
|
103
|
+
@email_brand = email_brand
|
|
104
|
+
@language = language
|
|
105
|
+
@start_time = start_time
|
|
106
|
+
@end_time = end_time
|
|
107
|
+
@additional_properties = additional_properties
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def self.from_hash(hash)
|
|
111
|
+
return unless hash
|
|
112
|
+
|
|
113
|
+
new(
|
|
114
|
+
destination: hash.fetch('destination', ::Celitech::Models::UNSET),
|
|
115
|
+
data_limit_in_gb: hash.fetch('dataLimitInGB', ::Celitech::Models::UNSET),
|
|
116
|
+
start_date: hash.fetch('startDate', ::Celitech::Models::UNSET),
|
|
117
|
+
end_date: hash.fetch('endDate', ::Celitech::Models::UNSET),
|
|
118
|
+
email: hash.fetch('email', ::Celitech::Models::UNSET),
|
|
119
|
+
reference_id: hash.fetch('referenceId', ::Celitech::Models::UNSET),
|
|
120
|
+
network_brand: hash.fetch('networkBrand', ::Celitech::Models::UNSET),
|
|
121
|
+
email_brand: hash.fetch('emailBrand', ::Celitech::Models::UNSET),
|
|
122
|
+
language: hash.fetch('language', ::Celitech::Models::UNSET),
|
|
123
|
+
start_time: hash.fetch('startTime', ::Celitech::Models::UNSET),
|
|
124
|
+
end_time: hash.fetch('endTime', ::Celitech::Models::UNSET),
|
|
125
|
+
additional_properties:
|
|
126
|
+
hash.except('destination', 'dataLimitInGB', 'startDate', 'endDate', 'email', 'referenceId', 'networkBrand', 'emailBrand', 'language', 'startTime', 'endTime'),
|
|
127
|
+
)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
def attributes
|
|
131
|
+
{
|
|
132
|
+
destination: @destination,
|
|
133
|
+
data_limit_in_gb: @data_limit_in_gb,
|
|
134
|
+
start_date: @start_date,
|
|
135
|
+
end_date: @end_date,
|
|
136
|
+
email: @email,
|
|
137
|
+
reference_id: @reference_id,
|
|
138
|
+
network_brand: @network_brand,
|
|
139
|
+
email_brand: @email_brand,
|
|
140
|
+
language: @language,
|
|
141
|
+
start_time: @start_time,
|
|
142
|
+
end_time: @end_time,
|
|
143
|
+
}
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
def validate!
|
|
147
|
+
@language&.validate! if !@language.equal?(::Celitech::Models::UNSET) && @language.respond_to?(:validate!)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
def open_model_extras
|
|
151
|
+
@additional_properties
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Celitech
|
|
4
|
+
module Models
|
|
5
|
+
class CreatePurchaseV2OkResponse
|
|
6
|
+
include ::Celitech::Models::Serializable
|
|
7
|
+
include ::Celitech::Models::OpenModel
|
|
8
|
+
|
|
9
|
+
def self.wire_keys
|
|
10
|
+
{
|
|
11
|
+
purchase: 'purchase',
|
|
12
|
+
profile: 'profile',
|
|
13
|
+
}.freeze
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def purchase
|
|
17
|
+
val = @purchase
|
|
18
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def profile
|
|
22
|
+
val = @profile
|
|
23
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
attr_reader :additional_properties
|
|
27
|
+
|
|
28
|
+
def initialize(purchase: ::Celitech::Models::UNSET, profile: ::Celitech::Models::UNSET, additional_properties: {})
|
|
29
|
+
@purchase = purchase
|
|
30
|
+
@profile = profile
|
|
31
|
+
@additional_properties = additional_properties
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def self.from_hash(hash)
|
|
35
|
+
return unless hash
|
|
36
|
+
|
|
37
|
+
new(
|
|
38
|
+
purchase:
|
|
39
|
+
hash.key?('purchase') ? ::Celitech::Models::CreatePurchaseV2OkResponsePurchase.from_hash(hash['purchase']) : ::Celitech::Models::UNSET,
|
|
40
|
+
profile:
|
|
41
|
+
hash.key?('profile') ? ::Celitech::Models::CreatePurchaseV2OkResponseProfile.from_hash(hash['profile']) : ::Celitech::Models::UNSET,
|
|
42
|
+
additional_properties: hash.except('purchase', 'profile'),
|
|
43
|
+
)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def attributes
|
|
47
|
+
{
|
|
48
|
+
purchase: @purchase,
|
|
49
|
+
profile: @profile,
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def validate!
|
|
54
|
+
@purchase&.validate! if !@purchase.equal?(::Celitech::Models::UNSET) && @purchase.respond_to?(:validate!)
|
|
55
|
+
@profile&.validate! if !@profile.equal?(::Celitech::Models::UNSET) && @profile.respond_to?(:validate!)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def open_model_extras
|
|
59
|
+
@additional_properties
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Celitech
|
|
4
|
+
module Models
|
|
5
|
+
class CreatePurchaseV2OkResponseProfile
|
|
6
|
+
include ::Celitech::Models::Serializable
|
|
7
|
+
include ::Celitech::Models::OpenModel
|
|
8
|
+
|
|
9
|
+
def self.wire_keys
|
|
10
|
+
{
|
|
11
|
+
iccid: 'iccid',
|
|
12
|
+
activation_code: 'activationCode',
|
|
13
|
+
manual_activation_code: 'manualActivationCode',
|
|
14
|
+
ios_activation_link: 'iosActivationLink',
|
|
15
|
+
android_activation_link: 'androidActivationLink',
|
|
16
|
+
}.freeze
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def iccid
|
|
20
|
+
val = @iccid
|
|
21
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def activation_code
|
|
25
|
+
val = @activation_code
|
|
26
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def manual_activation_code
|
|
30
|
+
val = @manual_activation_code
|
|
31
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def ios_activation_link
|
|
35
|
+
val = @ios_activation_link
|
|
36
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def android_activation_link
|
|
40
|
+
val = @android_activation_link
|
|
41
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
attr_reader :additional_properties
|
|
45
|
+
|
|
46
|
+
def initialize(
|
|
47
|
+
iccid: ::Celitech::Models::UNSET,
|
|
48
|
+
activation_code: ::Celitech::Models::UNSET,
|
|
49
|
+
manual_activation_code: ::Celitech::Models::UNSET,
|
|
50
|
+
ios_activation_link: ::Celitech::Models::UNSET,
|
|
51
|
+
android_activation_link: ::Celitech::Models::UNSET,
|
|
52
|
+
additional_properties: {}
|
|
53
|
+
)
|
|
54
|
+
@iccid = iccid
|
|
55
|
+
@activation_code = activation_code
|
|
56
|
+
@manual_activation_code = manual_activation_code
|
|
57
|
+
@ios_activation_link = ios_activation_link
|
|
58
|
+
@android_activation_link = android_activation_link
|
|
59
|
+
@additional_properties = additional_properties
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def self.from_hash(hash)
|
|
63
|
+
return unless hash
|
|
64
|
+
|
|
65
|
+
new(
|
|
66
|
+
iccid: hash.fetch('iccid', ::Celitech::Models::UNSET),
|
|
67
|
+
activation_code: hash.fetch('activationCode', ::Celitech::Models::UNSET),
|
|
68
|
+
manual_activation_code: hash.fetch('manualActivationCode', ::Celitech::Models::UNSET),
|
|
69
|
+
ios_activation_link: hash.fetch('iosActivationLink', ::Celitech::Models::UNSET),
|
|
70
|
+
android_activation_link: hash.fetch('androidActivationLink', ::Celitech::Models::UNSET),
|
|
71
|
+
additional_properties:
|
|
72
|
+
hash.except('iccid', 'activationCode', 'manualActivationCode', 'iosActivationLink', 'androidActivationLink'),
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def attributes
|
|
77
|
+
{
|
|
78
|
+
iccid: @iccid,
|
|
79
|
+
activation_code: @activation_code,
|
|
80
|
+
manual_activation_code: @manual_activation_code,
|
|
81
|
+
ios_activation_link: @ios_activation_link,
|
|
82
|
+
android_activation_link: @android_activation_link,
|
|
83
|
+
}
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def validate!
|
|
87
|
+
Validator.validate_string!(@iccid, 'iccid', min_length: 18, max_length: 22) unless @iccid.equal?(::Celitech::Models::UNSET)
|
|
88
|
+
Validator.validate_string!(@activation_code, 'activationCode', min_length: 1000, max_length: 8000) unless @activation_code.equal?(::Celitech::Models::UNSET)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def open_model_extras
|
|
92
|
+
@additional_properties
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Celitech
|
|
4
|
+
module Models
|
|
5
|
+
class CreatePurchaseV2OkResponsePurchase
|
|
6
|
+
include ::Celitech::Models::Serializable
|
|
7
|
+
include ::Celitech::Models::OpenModel
|
|
8
|
+
|
|
9
|
+
def self.wire_keys
|
|
10
|
+
{
|
|
11
|
+
id: 'id',
|
|
12
|
+
package_id: 'packageId',
|
|
13
|
+
created_date: 'createdDate',
|
|
14
|
+
}.freeze
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def id
|
|
18
|
+
val = @id
|
|
19
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def package_id
|
|
23
|
+
val = @package_id
|
|
24
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def created_date
|
|
28
|
+
val = @created_date
|
|
29
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
attr_reader :additional_properties
|
|
33
|
+
|
|
34
|
+
def initialize(
|
|
35
|
+
id: ::Celitech::Models::UNSET,
|
|
36
|
+
package_id: ::Celitech::Models::UNSET,
|
|
37
|
+
created_date: ::Celitech::Models::UNSET,
|
|
38
|
+
additional_properties: {}
|
|
39
|
+
)
|
|
40
|
+
@id = id
|
|
41
|
+
@package_id = package_id
|
|
42
|
+
@created_date = created_date
|
|
43
|
+
@additional_properties = additional_properties
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def self.from_hash(hash)
|
|
47
|
+
return unless hash
|
|
48
|
+
|
|
49
|
+
new(
|
|
50
|
+
id: hash.fetch('id', ::Celitech::Models::UNSET),
|
|
51
|
+
package_id: hash.fetch('packageId', ::Celitech::Models::UNSET),
|
|
52
|
+
created_date: hash.fetch('createdDate', ::Celitech::Models::UNSET),
|
|
53
|
+
additional_properties: hash.except('id', 'packageId', 'createdDate'),
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def attributes
|
|
58
|
+
{
|
|
59
|
+
id: @id,
|
|
60
|
+
package_id: @package_id,
|
|
61
|
+
created_date: @created_date,
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def open_model_extras
|
|
66
|
+
@additional_properties
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Celitech
|
|
4
|
+
module Models
|
|
5
|
+
class CreatePurchaseV2Request
|
|
6
|
+
include ::Celitech::Models::Serializable
|
|
7
|
+
include ::Celitech::Models::OpenModel
|
|
8
|
+
|
|
9
|
+
def self.wire_keys
|
|
10
|
+
{
|
|
11
|
+
destination: 'destination',
|
|
12
|
+
data_limit_in_gb: 'dataLimitInGB',
|
|
13
|
+
start_date: 'startDate',
|
|
14
|
+
end_date: 'endDate',
|
|
15
|
+
duration: 'duration',
|
|
16
|
+
quantity: 'quantity',
|
|
17
|
+
email: 'email',
|
|
18
|
+
reference_id: 'referenceId',
|
|
19
|
+
network_brand: 'networkBrand',
|
|
20
|
+
email_brand: 'emailBrand',
|
|
21
|
+
language: 'language',
|
|
22
|
+
}.freeze
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def destination
|
|
26
|
+
val = @destination
|
|
27
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def data_limit_in_gb
|
|
31
|
+
val = @data_limit_in_gb
|
|
32
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def start_date
|
|
36
|
+
val = @start_date
|
|
37
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def end_date
|
|
41
|
+
val = @end_date
|
|
42
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def duration
|
|
46
|
+
val = @duration
|
|
47
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def quantity
|
|
51
|
+
val = @quantity
|
|
52
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def email
|
|
56
|
+
val = @email
|
|
57
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def reference_id
|
|
61
|
+
val = @reference_id
|
|
62
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def network_brand
|
|
66
|
+
val = @network_brand
|
|
67
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def email_brand
|
|
71
|
+
val = @email_brand
|
|
72
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def language
|
|
76
|
+
val = @language
|
|
77
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
attr_reader :additional_properties
|
|
81
|
+
|
|
82
|
+
def initialize(
|
|
83
|
+
destination: ::Celitech::Models::UNSET,
|
|
84
|
+
data_limit_in_gb: ::Celitech::Models::UNSET,
|
|
85
|
+
start_date: ::Celitech::Models::UNSET,
|
|
86
|
+
end_date: ::Celitech::Models::UNSET,
|
|
87
|
+
duration: ::Celitech::Models::UNSET,
|
|
88
|
+
quantity: ::Celitech::Models::UNSET,
|
|
89
|
+
email: ::Celitech::Models::UNSET,
|
|
90
|
+
reference_id: ::Celitech::Models::UNSET,
|
|
91
|
+
network_brand: ::Celitech::Models::UNSET,
|
|
92
|
+
email_brand: ::Celitech::Models::UNSET,
|
|
93
|
+
language: ::Celitech::Models::UNSET,
|
|
94
|
+
additional_properties: {}
|
|
95
|
+
)
|
|
96
|
+
@destination = destination
|
|
97
|
+
@data_limit_in_gb = data_limit_in_gb
|
|
98
|
+
@start_date = start_date
|
|
99
|
+
@end_date = end_date
|
|
100
|
+
@duration = duration
|
|
101
|
+
@quantity = quantity
|
|
102
|
+
@email = email
|
|
103
|
+
@reference_id = reference_id
|
|
104
|
+
@network_brand = network_brand
|
|
105
|
+
@email_brand = email_brand
|
|
106
|
+
@language = language
|
|
107
|
+
@additional_properties = additional_properties
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def self.from_hash(hash)
|
|
111
|
+
return unless hash
|
|
112
|
+
|
|
113
|
+
new(
|
|
114
|
+
destination: hash.fetch('destination', ::Celitech::Models::UNSET),
|
|
115
|
+
data_limit_in_gb: hash.fetch('dataLimitInGB', ::Celitech::Models::UNSET),
|
|
116
|
+
start_date: hash.fetch('startDate', ::Celitech::Models::UNSET),
|
|
117
|
+
end_date: hash.fetch('endDate', ::Celitech::Models::UNSET),
|
|
118
|
+
duration: hash.fetch('duration', ::Celitech::Models::UNSET),
|
|
119
|
+
quantity: hash.fetch('quantity', ::Celitech::Models::UNSET),
|
|
120
|
+
email: hash.fetch('email', ::Celitech::Models::UNSET),
|
|
121
|
+
reference_id: hash.fetch('referenceId', ::Celitech::Models::UNSET),
|
|
122
|
+
network_brand: hash.fetch('networkBrand', ::Celitech::Models::UNSET),
|
|
123
|
+
email_brand: hash.fetch('emailBrand', ::Celitech::Models::UNSET),
|
|
124
|
+
language: hash.fetch('language', ::Celitech::Models::UNSET),
|
|
125
|
+
additional_properties:
|
|
126
|
+
hash.except('destination', 'dataLimitInGB', 'startDate', 'endDate', 'duration', 'quantity', 'email', 'referenceId', 'networkBrand', 'emailBrand', 'language'),
|
|
127
|
+
)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
def attributes
|
|
131
|
+
{
|
|
132
|
+
destination: @destination,
|
|
133
|
+
data_limit_in_gb: @data_limit_in_gb,
|
|
134
|
+
start_date: @start_date,
|
|
135
|
+
end_date: @end_date,
|
|
136
|
+
duration: @duration,
|
|
137
|
+
quantity: @quantity,
|
|
138
|
+
email: @email,
|
|
139
|
+
reference_id: @reference_id,
|
|
140
|
+
network_brand: @network_brand,
|
|
141
|
+
email_brand: @email_brand,
|
|
142
|
+
language: @language,
|
|
143
|
+
}
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
def validate!
|
|
147
|
+
Validator.validate_number!(@quantity, 'quantity', min: 1, max: 5) unless @quantity.equal?(::Celitech::Models::UNSET)
|
|
148
|
+
@language&.validate! if !@language.equal?(::Celitech::Models::UNSET) && @language.respond_to?(:validate!)
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
def open_model_extras
|
|
152
|
+
@additional_properties
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|