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,80 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Celitech
|
|
4
|
+
module Models
|
|
5
|
+
class Destinations
|
|
6
|
+
include ::Celitech::Models::Serializable
|
|
7
|
+
include ::Celitech::Models::OpenModel
|
|
8
|
+
|
|
9
|
+
def self.wire_keys
|
|
10
|
+
{
|
|
11
|
+
name: 'name',
|
|
12
|
+
destination: 'destination',
|
|
13
|
+
destination_iso2: 'destinationISO2',
|
|
14
|
+
supported_countries: 'supportedCountries',
|
|
15
|
+
}.freeze
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def name
|
|
19
|
+
val = @name
|
|
20
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def destination
|
|
24
|
+
val = @destination
|
|
25
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def destination_iso2
|
|
29
|
+
val = @destination_iso2
|
|
30
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def supported_countries
|
|
34
|
+
val = @supported_countries
|
|
35
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
attr_reader :additional_properties
|
|
39
|
+
|
|
40
|
+
def initialize(
|
|
41
|
+
name: ::Celitech::Models::UNSET,
|
|
42
|
+
destination: ::Celitech::Models::UNSET,
|
|
43
|
+
destination_iso2: ::Celitech::Models::UNSET,
|
|
44
|
+
supported_countries: ::Celitech::Models::UNSET,
|
|
45
|
+
additional_properties: {}
|
|
46
|
+
)
|
|
47
|
+
@name = name
|
|
48
|
+
@destination = destination
|
|
49
|
+
@destination_iso2 = destination_iso2
|
|
50
|
+
@supported_countries = supported_countries
|
|
51
|
+
@additional_properties = additional_properties
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def self.from_hash(hash)
|
|
55
|
+
return unless hash
|
|
56
|
+
|
|
57
|
+
new(
|
|
58
|
+
name: hash.fetch('name', ::Celitech::Models::UNSET),
|
|
59
|
+
destination: hash.fetch('destination', ::Celitech::Models::UNSET),
|
|
60
|
+
destination_iso2: hash.fetch('destinationISO2', ::Celitech::Models::UNSET),
|
|
61
|
+
supported_countries: hash.fetch('supportedCountries', ::Celitech::Models::UNSET),
|
|
62
|
+
additional_properties: hash.except('name', 'destination', 'destinationISO2', 'supportedCountries'),
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def attributes
|
|
67
|
+
{
|
|
68
|
+
name: @name,
|
|
69
|
+
destination: @destination,
|
|
70
|
+
destination_iso2: @destination_iso2,
|
|
71
|
+
supported_countries: @supported_countries,
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def open_model_extras
|
|
76
|
+
@additional_properties
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Celitech
|
|
4
|
+
module Models
|
|
5
|
+
class Device
|
|
6
|
+
include ::Celitech::Models::Serializable
|
|
7
|
+
include ::Celitech::Models::OpenModel
|
|
8
|
+
|
|
9
|
+
def self.wire_keys
|
|
10
|
+
{
|
|
11
|
+
oem: 'oem',
|
|
12
|
+
hardware_name: 'hardwareName',
|
|
13
|
+
hardware_model: 'hardwareModel',
|
|
14
|
+
eid: 'eid',
|
|
15
|
+
}.freeze
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def oem
|
|
19
|
+
val = @oem
|
|
20
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def hardware_name
|
|
24
|
+
val = @hardware_name
|
|
25
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def hardware_model
|
|
29
|
+
val = @hardware_model
|
|
30
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def eid
|
|
34
|
+
val = @eid
|
|
35
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
attr_reader :additional_properties
|
|
39
|
+
|
|
40
|
+
def initialize(
|
|
41
|
+
oem: ::Celitech::Models::UNSET,
|
|
42
|
+
hardware_name: ::Celitech::Models::UNSET,
|
|
43
|
+
hardware_model: ::Celitech::Models::UNSET,
|
|
44
|
+
eid: ::Celitech::Models::UNSET,
|
|
45
|
+
additional_properties: {}
|
|
46
|
+
)
|
|
47
|
+
@oem = oem
|
|
48
|
+
@hardware_name = hardware_name
|
|
49
|
+
@hardware_model = hardware_model
|
|
50
|
+
@eid = eid
|
|
51
|
+
@additional_properties = additional_properties
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def self.from_hash(hash)
|
|
55
|
+
return unless hash
|
|
56
|
+
|
|
57
|
+
new(
|
|
58
|
+
oem: hash.fetch('oem', ::Celitech::Models::UNSET),
|
|
59
|
+
hardware_name: hash.fetch('hardwareName', ::Celitech::Models::UNSET),
|
|
60
|
+
hardware_model: hash.fetch('hardwareModel', ::Celitech::Models::UNSET),
|
|
61
|
+
eid: hash.fetch('eid', ::Celitech::Models::UNSET),
|
|
62
|
+
additional_properties: hash.except('oem', 'hardwareName', 'hardwareModel', 'eid'),
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def attributes
|
|
67
|
+
{
|
|
68
|
+
oem: @oem,
|
|
69
|
+
hardware_name: @hardware_name,
|
|
70
|
+
hardware_model: @hardware_model,
|
|
71
|
+
eid: @eid,
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def open_model_extras
|
|
76
|
+
@additional_properties
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Celitech
|
|
4
|
+
module Models
|
|
5
|
+
class EditPurchaseOkResponse
|
|
6
|
+
include ::Celitech::Models::Serializable
|
|
7
|
+
include ::Celitech::Models::OpenModel
|
|
8
|
+
|
|
9
|
+
def self.wire_keys
|
|
10
|
+
{
|
|
11
|
+
purchase_id: 'purchaseId',
|
|
12
|
+
new_start_date: 'newStartDate',
|
|
13
|
+
new_end_date: 'newEndDate',
|
|
14
|
+
new_start_time: 'newStartTime',
|
|
15
|
+
new_end_time: 'newEndTime',
|
|
16
|
+
}.freeze
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def purchase_id
|
|
20
|
+
val = @purchase_id
|
|
21
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def new_start_date
|
|
25
|
+
val = @new_start_date
|
|
26
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def new_end_date
|
|
30
|
+
val = @new_end_date
|
|
31
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def new_start_time
|
|
35
|
+
val = @new_start_time
|
|
36
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def new_end_time
|
|
40
|
+
val = @new_end_time
|
|
41
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
attr_reader :additional_properties
|
|
45
|
+
|
|
46
|
+
def initialize(
|
|
47
|
+
purchase_id: ::Celitech::Models::UNSET,
|
|
48
|
+
new_start_date: ::Celitech::Models::UNSET,
|
|
49
|
+
new_end_date: ::Celitech::Models::UNSET,
|
|
50
|
+
new_start_time: ::Celitech::Models::UNSET,
|
|
51
|
+
new_end_time: ::Celitech::Models::UNSET,
|
|
52
|
+
additional_properties: {}
|
|
53
|
+
)
|
|
54
|
+
@purchase_id = purchase_id
|
|
55
|
+
@new_start_date = new_start_date
|
|
56
|
+
@new_end_date = new_end_date
|
|
57
|
+
@new_start_time = new_start_time
|
|
58
|
+
@new_end_time = new_end_time
|
|
59
|
+
@additional_properties = additional_properties
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def self.from_hash(hash)
|
|
63
|
+
return unless hash
|
|
64
|
+
|
|
65
|
+
new(
|
|
66
|
+
purchase_id: hash.fetch('purchaseId', ::Celitech::Models::UNSET),
|
|
67
|
+
new_start_date: hash.fetch('newStartDate', ::Celitech::Models::UNSET),
|
|
68
|
+
new_end_date: hash.fetch('newEndDate', ::Celitech::Models::UNSET),
|
|
69
|
+
new_start_time: hash.fetch('newStartTime', ::Celitech::Models::UNSET),
|
|
70
|
+
new_end_time: hash.fetch('newEndTime', ::Celitech::Models::UNSET),
|
|
71
|
+
additional_properties: hash.except('purchaseId', 'newStartDate', 'newEndDate', 'newStartTime', 'newEndTime'),
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def attributes
|
|
76
|
+
{
|
|
77
|
+
purchase_id: @purchase_id,
|
|
78
|
+
new_start_date: @new_start_date,
|
|
79
|
+
new_end_date: @new_end_date,
|
|
80
|
+
new_start_time: @new_start_time,
|
|
81
|
+
new_end_time: @new_end_time,
|
|
82
|
+
}
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def open_model_extras
|
|
86
|
+
@additional_properties
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Celitech
|
|
4
|
+
module Models
|
|
5
|
+
class EditPurchaseRequest
|
|
6
|
+
include ::Celitech::Models::Serializable
|
|
7
|
+
include ::Celitech::Models::OpenModel
|
|
8
|
+
|
|
9
|
+
def self.wire_keys
|
|
10
|
+
{
|
|
11
|
+
purchase_id: 'purchaseId',
|
|
12
|
+
start_date: 'startDate',
|
|
13
|
+
end_date: 'endDate',
|
|
14
|
+
start_time: 'startTime',
|
|
15
|
+
end_time: 'endTime',
|
|
16
|
+
}.freeze
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def purchase_id
|
|
20
|
+
val = @purchase_id
|
|
21
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def start_date
|
|
25
|
+
val = @start_date
|
|
26
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def end_date
|
|
30
|
+
val = @end_date
|
|
31
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def start_time
|
|
35
|
+
val = @start_time
|
|
36
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def end_time
|
|
40
|
+
val = @end_time
|
|
41
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
attr_reader :additional_properties
|
|
45
|
+
|
|
46
|
+
def initialize(
|
|
47
|
+
purchase_id: ::Celitech::Models::UNSET,
|
|
48
|
+
start_date: ::Celitech::Models::UNSET,
|
|
49
|
+
end_date: ::Celitech::Models::UNSET,
|
|
50
|
+
start_time: ::Celitech::Models::UNSET,
|
|
51
|
+
end_time: ::Celitech::Models::UNSET,
|
|
52
|
+
additional_properties: {}
|
|
53
|
+
)
|
|
54
|
+
@purchase_id = purchase_id
|
|
55
|
+
@start_date = start_date
|
|
56
|
+
@end_date = end_date
|
|
57
|
+
@start_time = start_time
|
|
58
|
+
@end_time = end_time
|
|
59
|
+
@additional_properties = additional_properties
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def self.from_hash(hash)
|
|
63
|
+
return unless hash
|
|
64
|
+
|
|
65
|
+
new(
|
|
66
|
+
purchase_id: hash.fetch('purchaseId', ::Celitech::Models::UNSET),
|
|
67
|
+
start_date: hash.fetch('startDate', ::Celitech::Models::UNSET),
|
|
68
|
+
end_date: hash.fetch('endDate', ::Celitech::Models::UNSET),
|
|
69
|
+
start_time: hash.fetch('startTime', ::Celitech::Models::UNSET),
|
|
70
|
+
end_time: hash.fetch('endTime', ::Celitech::Models::UNSET),
|
|
71
|
+
additional_properties: hash.except('purchaseId', 'startDate', 'endDate', 'startTime', 'endTime'),
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def attributes
|
|
76
|
+
{
|
|
77
|
+
purchase_id: @purchase_id,
|
|
78
|
+
start_date: @start_date,
|
|
79
|
+
end_date: @end_date,
|
|
80
|
+
start_time: @start_time,
|
|
81
|
+
end_time: @end_time,
|
|
82
|
+
}
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def open_model_extras
|
|
86
|
+
@additional_properties
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Celitech
|
|
4
|
+
module Models
|
|
5
|
+
class GetEsimDeviceOkResponse
|
|
6
|
+
include ::Celitech::Models::Serializable
|
|
7
|
+
include ::Celitech::Models::OpenModel
|
|
8
|
+
|
|
9
|
+
def self.wire_keys
|
|
10
|
+
{
|
|
11
|
+
device: 'device',
|
|
12
|
+
}.freeze
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def device
|
|
16
|
+
val = @device
|
|
17
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
attr_reader :additional_properties
|
|
21
|
+
|
|
22
|
+
def initialize(device: ::Celitech::Models::UNSET, additional_properties: {})
|
|
23
|
+
@device = device
|
|
24
|
+
@additional_properties = additional_properties
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def self.from_hash(hash)
|
|
28
|
+
return unless hash
|
|
29
|
+
|
|
30
|
+
new(
|
|
31
|
+
device:
|
|
32
|
+
hash.key?('device') ? ::Celitech::Models::Device.from_hash(hash['device']) : ::Celitech::Models::UNSET,
|
|
33
|
+
additional_properties: hash.except('device'),
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def attributes
|
|
38
|
+
{
|
|
39
|
+
device: @device,
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def validate!
|
|
44
|
+
@device&.validate! if !@device.equal?(::Celitech::Models::UNSET) && @device.respond_to?(:validate!)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def open_model_extras
|
|
48
|
+
@additional_properties
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Celitech
|
|
4
|
+
module Models
|
|
5
|
+
class GetEsimHistoryOkResponse
|
|
6
|
+
include ::Celitech::Models::Serializable
|
|
7
|
+
include ::Celitech::Models::OpenModel
|
|
8
|
+
|
|
9
|
+
def self.wire_keys
|
|
10
|
+
{
|
|
11
|
+
esim: 'esim',
|
|
12
|
+
}.freeze
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def esim
|
|
16
|
+
val = @esim
|
|
17
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
attr_reader :additional_properties
|
|
21
|
+
|
|
22
|
+
def initialize(esim: ::Celitech::Models::UNSET, additional_properties: {})
|
|
23
|
+
@esim = esim
|
|
24
|
+
@additional_properties = additional_properties
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def self.from_hash(hash)
|
|
28
|
+
return unless hash
|
|
29
|
+
|
|
30
|
+
new(
|
|
31
|
+
esim:
|
|
32
|
+
hash.key?('esim') ? ::Celitech::Models::GetEsimHistoryOkResponseEsim.from_hash(hash['esim']) : ::Celitech::Models::UNSET,
|
|
33
|
+
additional_properties: hash.except('esim'),
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def attributes
|
|
38
|
+
{
|
|
39
|
+
esim: @esim,
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def validate!
|
|
44
|
+
@esim&.validate! if !@esim.equal?(::Celitech::Models::UNSET) && @esim.respond_to?(:validate!)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def open_model_extras
|
|
48
|
+
@additional_properties
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Celitech
|
|
4
|
+
module Models
|
|
5
|
+
class GetEsimHistoryOkResponseEsim
|
|
6
|
+
include ::Celitech::Models::Serializable
|
|
7
|
+
include ::Celitech::Models::OpenModel
|
|
8
|
+
|
|
9
|
+
def self.wire_keys
|
|
10
|
+
{
|
|
11
|
+
iccid: 'iccid',
|
|
12
|
+
history: 'history',
|
|
13
|
+
}.freeze
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def iccid
|
|
17
|
+
val = @iccid
|
|
18
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def history
|
|
22
|
+
val = @history
|
|
23
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
attr_reader :additional_properties
|
|
27
|
+
|
|
28
|
+
def initialize(iccid: ::Celitech::Models::UNSET, history: ::Celitech::Models::UNSET, additional_properties: {})
|
|
29
|
+
@iccid = iccid
|
|
30
|
+
@history = history
|
|
31
|
+
@additional_properties = additional_properties
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def self.from_hash(hash)
|
|
35
|
+
return unless hash
|
|
36
|
+
|
|
37
|
+
new(
|
|
38
|
+
iccid: hash.fetch('iccid', ::Celitech::Models::UNSET),
|
|
39
|
+
history: hash.fetch('history', ::Celitech::Models::UNSET),
|
|
40
|
+
additional_properties: hash.except('iccid', 'history'),
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def attributes
|
|
45
|
+
{
|
|
46
|
+
iccid: @iccid,
|
|
47
|
+
history: @history,
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def validate!
|
|
52
|
+
Validator.validate_string!(@iccid, 'iccid', min_length: 18, max_length: 22) unless @iccid.equal?(::Celitech::Models::UNSET)
|
|
53
|
+
@history&.each { |item| item.validate! if item.respond_to?(:validate!) } unless @history.equal?(::Celitech::Models::UNSET)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def open_model_extras
|
|
57
|
+
@additional_properties
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Celitech
|
|
4
|
+
module Models
|
|
5
|
+
class GetEsimOkResponse
|
|
6
|
+
include ::Celitech::Models::Serializable
|
|
7
|
+
include ::Celitech::Models::OpenModel
|
|
8
|
+
|
|
9
|
+
def self.wire_keys
|
|
10
|
+
{
|
|
11
|
+
esim: 'esim',
|
|
12
|
+
}.freeze
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def esim
|
|
16
|
+
val = @esim
|
|
17
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
attr_reader :additional_properties
|
|
21
|
+
|
|
22
|
+
def initialize(esim: ::Celitech::Models::UNSET, additional_properties: {})
|
|
23
|
+
@esim = esim
|
|
24
|
+
@additional_properties = additional_properties
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def self.from_hash(hash)
|
|
28
|
+
return unless hash
|
|
29
|
+
|
|
30
|
+
new(
|
|
31
|
+
esim:
|
|
32
|
+
hash.key?('esim') ? ::Celitech::Models::GetEsimOkResponseEsim.from_hash(hash['esim']) : ::Celitech::Models::UNSET,
|
|
33
|
+
additional_properties: hash.except('esim'),
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def attributes
|
|
38
|
+
{
|
|
39
|
+
esim: @esim,
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def validate!
|
|
44
|
+
@esim&.validate! if !@esim.equal?(::Celitech::Models::UNSET) && @esim.respond_to?(:validate!)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def open_model_extras
|
|
48
|
+
@additional_properties
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Celitech
|
|
4
|
+
module Models
|
|
5
|
+
class GetEsimOkResponseEsim
|
|
6
|
+
include ::Celitech::Models::Serializable
|
|
7
|
+
include ::Celitech::Models::OpenModel
|
|
8
|
+
|
|
9
|
+
def self.wire_keys
|
|
10
|
+
{
|
|
11
|
+
iccid: 'iccid',
|
|
12
|
+
smdp_address: 'smdpAddress',
|
|
13
|
+
activation_code: 'activationCode',
|
|
14
|
+
manual_activation_code: 'manualActivationCode',
|
|
15
|
+
status: 'status',
|
|
16
|
+
connectivity_status: 'connectivityStatus',
|
|
17
|
+
is_top_up_allowed: 'isTopUpAllowed',
|
|
18
|
+
}.freeze
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def iccid
|
|
22
|
+
val = @iccid
|
|
23
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def smdp_address
|
|
27
|
+
val = @smdp_address
|
|
28
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def activation_code
|
|
32
|
+
val = @activation_code
|
|
33
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def manual_activation_code
|
|
37
|
+
val = @manual_activation_code
|
|
38
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def status
|
|
42
|
+
val = @status
|
|
43
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def connectivity_status
|
|
47
|
+
val = @connectivity_status
|
|
48
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def is_top_up_allowed
|
|
52
|
+
val = @is_top_up_allowed
|
|
53
|
+
val.equal?(::Celitech::Models::UNSET) ? nil : val
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
attr_reader :additional_properties
|
|
57
|
+
|
|
58
|
+
def initialize(
|
|
59
|
+
iccid: ::Celitech::Models::UNSET,
|
|
60
|
+
smdp_address: ::Celitech::Models::UNSET,
|
|
61
|
+
activation_code: ::Celitech::Models::UNSET,
|
|
62
|
+
manual_activation_code: ::Celitech::Models::UNSET,
|
|
63
|
+
status: ::Celitech::Models::UNSET,
|
|
64
|
+
connectivity_status: ::Celitech::Models::UNSET,
|
|
65
|
+
is_top_up_allowed: ::Celitech::Models::UNSET,
|
|
66
|
+
additional_properties: {}
|
|
67
|
+
)
|
|
68
|
+
@iccid = iccid
|
|
69
|
+
@smdp_address = smdp_address
|
|
70
|
+
@activation_code = activation_code
|
|
71
|
+
@manual_activation_code = manual_activation_code
|
|
72
|
+
@status = status
|
|
73
|
+
@connectivity_status = connectivity_status
|
|
74
|
+
@is_top_up_allowed = is_top_up_allowed
|
|
75
|
+
@additional_properties = additional_properties
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def self.from_hash(hash)
|
|
79
|
+
return unless hash
|
|
80
|
+
|
|
81
|
+
new(
|
|
82
|
+
iccid: hash.fetch('iccid', ::Celitech::Models::UNSET),
|
|
83
|
+
smdp_address: hash.fetch('smdpAddress', ::Celitech::Models::UNSET),
|
|
84
|
+
activation_code: hash.fetch('activationCode', ::Celitech::Models::UNSET),
|
|
85
|
+
manual_activation_code: hash.fetch('manualActivationCode', ::Celitech::Models::UNSET),
|
|
86
|
+
status: hash.fetch('status', ::Celitech::Models::UNSET),
|
|
87
|
+
connectivity_status: hash.fetch('connectivityStatus', ::Celitech::Models::UNSET),
|
|
88
|
+
is_top_up_allowed: hash.fetch('isTopUpAllowed', ::Celitech::Models::UNSET),
|
|
89
|
+
additional_properties:
|
|
90
|
+
hash.except('iccid', 'smdpAddress', 'activationCode', 'manualActivationCode', 'status', 'connectivityStatus', 'isTopUpAllowed'),
|
|
91
|
+
)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def attributes
|
|
95
|
+
{
|
|
96
|
+
iccid: @iccid,
|
|
97
|
+
smdp_address: @smdp_address,
|
|
98
|
+
activation_code: @activation_code,
|
|
99
|
+
manual_activation_code: @manual_activation_code,
|
|
100
|
+
status: @status,
|
|
101
|
+
connectivity_status: @connectivity_status,
|
|
102
|
+
is_top_up_allowed: @is_top_up_allowed,
|
|
103
|
+
}
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def validate!
|
|
107
|
+
Validator.validate_string!(@iccid, 'iccid', min_length: 18, max_length: 22) unless @iccid.equal?(::Celitech::Models::UNSET)
|
|
108
|
+
Validator.validate_string!(@activation_code, 'activationCode', min_length: 1000, max_length: 8000) unless @activation_code.equal?(::Celitech::Models::UNSET)
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def open_model_extras
|
|
112
|
+
@additional_properties
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|