terminal-shop 1.4.0 → 1.5.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 768bdcebc5333de72d3b2d85a3fa97bc1abd1c6c5ec5277db2c97c0b368f733a
4
- data.tar.gz: bc4f2911f1d7b441ae52da8ea310e75597799eada64b31ea009f7a48f1035be9
3
+ metadata.gz: dd260c7be43496138640e129202003772d0d9c0510c3cdf1a5d654b63f2e6c99
4
+ data.tar.gz: 467f6996e9ff91cff4b8b0d060d4338a493c84ed86823a1863f3ab09b472d4e1
5
5
  SHA512:
6
- metadata.gz: e0dc39a0556ec3b66a4e765db6e519680c922132d35c5aecdb37b56cd4c6ae7cf52f2bd324820c96e5ce924afbfcac1801f62b11ec0f5759fe0c501ca70cec0b
7
- data.tar.gz: 61532646f0b81b9dbf3fa30dda6cefd55fc7e01ccc5dd7d76eac43e9bb73ad2771373068cc7a5bdd130eca8d8f387443a246f9e5d5871dde4883c2a75e8c8aac
6
+ metadata.gz: '09e4ad8a23dbb323077e2649767ed1aa1092b0f125a518f8882b82ac8ff57c2a043e31a4548dbf02f36b77556a9be75386c7ffcd309571d8d1c96c51d41d2e0e'
7
+ data.tar.gz: 74cb047f3dcc1fb18f6e4e77619ee50e47caf1b17f2577ea0268129a4d198436a009dfd8580328911da17cd40260859e7125937d8c9921f7d248e285d63e8520
@@ -128,15 +128,6 @@ module TerminalShop
128
128
  # # @return [Boolean]
129
129
  # attr_writer :market_na
130
130
 
131
- # @!attribute [r] type
132
- #
133
- # @return [String, nil]
134
- optional :type, String
135
-
136
- # @!parse
137
- # # @return [String]
138
- # attr_writer :type
139
-
140
131
  # @!parse
141
132
  # # Tags for the product.
142
133
  # #
@@ -145,9 +136,8 @@ module TerminalShop
145
136
  # # @param featured [Boolean]
146
137
  # # @param market_eu [Boolean]
147
138
  # # @param market_na [Boolean]
148
- # # @param type [String]
149
139
  # #
150
- # def initialize(app: nil, color: nil, featured: nil, market_eu: nil, market_na: nil, type: nil, **) = super
140
+ # def initialize(app: nil, color: nil, featured: nil, market_eu: nil, market_na: nil, **) = super
151
141
 
152
142
  # def initialize: (Hash | TerminalShop::BaseModel) -> void
153
143
  end
@@ -54,6 +54,11 @@ module TerminalShop
54
54
  # @return [TerminalShop::Models::ProfileAPI]
55
55
  required :profile, -> { TerminalShop::Models::ProfileAPI }
56
56
 
57
+ # @!attribute region
58
+ #
59
+ # @return [Symbol, TerminalShop::Models::ViewInitResponse::Data::Region]
60
+ required :region, enum: -> { TerminalShop::Models::ViewInitResponse::Data::Region }
61
+
57
62
  # @!attribute subscriptions
58
63
  #
59
64
  # @return [Array<TerminalShop::Models::SubscriptionAPI>]
@@ -74,12 +79,22 @@ module TerminalShop
74
79
  # # @param orders [Array<TerminalShop::Models::OrderAPI>]
75
80
  # # @param products [Array<TerminalShop::Models::ProductAPI>]
76
81
  # # @param profile [TerminalShop::Models::ProfileAPI]
82
+ # # @param region [Symbol, TerminalShop::Models::ViewInitResponse::Data::Region]
77
83
  # # @param subscriptions [Array<TerminalShop::Models::SubscriptionAPI>]
78
84
  # # @param tokens [Array<TerminalShop::Models::TokenAPI>]
79
85
  # #
80
- # def initialize(addresses:, apps:, cards:, cart:, orders:, products:, profile:, subscriptions:, tokens:, **) = super
86
+ # def initialize(addresses:, apps:, cards:, cart:, orders:, products:, profile:, region:, subscriptions:, tokens:, **) = super
81
87
 
82
88
  # def initialize: (Hash | TerminalShop::BaseModel) -> void
89
+
90
+ # @abstract
91
+ #
92
+ class Region < TerminalShop::Enum
93
+ NA = :na
94
+ EU = :eu
95
+
96
+ finalize!
97
+ end
83
98
  end
84
99
  end
85
100
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TerminalShop
4
- VERSION = "1.4.0"
4
+ VERSION = "1.5.0"
5
5
  end
@@ -148,40 +148,28 @@ module TerminalShop
148
148
  def market_na=(_)
149
149
  end
150
150
 
151
- sig { returns(T.nilable(String)) }
152
- def type
153
- end
154
-
155
- sig { params(_: String).returns(String) }
156
- def type=(_)
157
- end
158
-
159
151
  sig do
160
152
  params(
161
153
  app: String,
162
154
  color: String,
163
155
  featured: T::Boolean,
164
156
  market_eu: T::Boolean,
165
- market_na: T::Boolean,
166
- type: String
157
+ market_na: T::Boolean
167
158
  )
168
159
  .returns(T.attached_class)
169
160
  end
170
- def self.new(app: nil, color: nil, featured: nil, market_eu: nil, market_na: nil, type: nil)
161
+ def self.new(app: nil, color: nil, featured: nil, market_eu: nil, market_na: nil)
171
162
  end
172
163
 
173
164
  sig do
174
165
  override
175
- .returns(
176
- {
177
- app: String,
178
- color: String,
179
- featured: T::Boolean,
180
- market_eu: T::Boolean,
181
- market_na: T::Boolean,
182
- type: String
183
- }
184
- )
166
+ .returns({
167
+ app: String,
168
+ color: String,
169
+ featured: T::Boolean,
170
+ market_eu: T::Boolean,
171
+ market_na: T::Boolean
172
+ })
185
173
  end
186
174
  def to_hash
187
175
  end
@@ -79,6 +79,14 @@ module TerminalShop
79
79
  def profile=(_)
80
80
  end
81
81
 
82
+ sig { returns(Symbol) }
83
+ def region
84
+ end
85
+
86
+ sig { params(_: Symbol).returns(Symbol) }
87
+ def region=(_)
88
+ end
89
+
82
90
  sig { returns(T::Array[TerminalShop::Models::SubscriptionAPI]) }
83
91
  def subscriptions
84
92
  end
@@ -107,12 +115,13 @@ module TerminalShop
107
115
  orders: T::Array[TerminalShop::Models::OrderAPI],
108
116
  products: T::Array[TerminalShop::Models::ProductAPI],
109
117
  profile: TerminalShop::Models::ProfileAPI,
118
+ region: Symbol,
110
119
  subscriptions: T::Array[TerminalShop::Models::SubscriptionAPI],
111
120
  tokens: T::Array[TerminalShop::Models::TokenAPI]
112
121
  )
113
122
  .returns(T.attached_class)
114
123
  end
115
- def self.new(addresses:, apps:, cards:, cart:, orders:, products:, profile:, subscriptions:, tokens:)
124
+ def self.new(addresses:, apps:, cards:, cart:, orders:, products:, profile:, region:, subscriptions:, tokens:)
116
125
  end
117
126
 
118
127
  sig do
@@ -126,6 +135,7 @@ module TerminalShop
126
135
  orders: T::Array[TerminalShop::Models::OrderAPI],
127
136
  products: T::Array[TerminalShop::Models::ProductAPI],
128
137
  profile: TerminalShop::Models::ProfileAPI,
138
+ region: Symbol,
129
139
  subscriptions: T::Array[TerminalShop::Models::SubscriptionAPI],
130
140
  tokens: T::Array[TerminalShop::Models::TokenAPI]
131
141
  }
@@ -133,6 +143,19 @@ module TerminalShop
133
143
  end
134
144
  def to_hash
135
145
  end
146
+
147
+ class Region < TerminalShop::Enum
148
+ abstract!
149
+
150
+ NA = :na
151
+ EU = :eu
152
+
153
+ class << self
154
+ sig { override.returns(T::Array[Symbol]) }
155
+ def values
156
+ end
157
+ end
158
+ end
136
159
  end
137
160
  end
138
161
  end
@@ -1,5 +1,5 @@
1
1
  # typed: strong
2
2
 
3
3
  module TerminalShop
4
- VERSION = "1.4.0"
4
+ VERSION = "1.5.0"
5
5
  end
@@ -67,8 +67,7 @@ module TerminalShop
67
67
  color: String,
68
68
  featured: bool,
69
69
  market_eu: bool,
70
- market_na: bool,
71
- type: String
70
+ market_na: bool
72
71
  }
73
72
 
74
73
  class Tags < TerminalShop::BaseModel
@@ -92,18 +91,13 @@ module TerminalShop
92
91
 
93
92
  def market_na=: (bool) -> bool
94
93
 
95
- attr_reader type: String?
96
-
97
- def type=: (String) -> String
98
-
99
94
  def initialize:
100
95
  (
101
96
  app: String,
102
97
  color: String,
103
98
  featured: bool,
104
99
  market_eu: bool,
105
- market_na: bool,
106
- type: String
100
+ market_na: bool
107
101
  ) -> void
108
102
  | (
109
103
  ?TerminalShop::Models::ProductAPI::tags
@@ -24,6 +24,7 @@ module TerminalShop
24
24
  orders: ::Array[TerminalShop::Models::OrderAPI],
25
25
  products: ::Array[TerminalShop::Models::ProductAPI],
26
26
  profile: TerminalShop::Models::ProfileAPI,
27
+ region: TerminalShop::Models::ViewInitResponse::Data::region,
27
28
  subscriptions: ::Array[TerminalShop::Models::SubscriptionAPI],
28
29
  tokens: ::Array[TerminalShop::Models::TokenAPI]
29
30
  }
@@ -43,6 +44,8 @@ module TerminalShop
43
44
 
44
45
  attr_accessor profile: TerminalShop::Models::ProfileAPI
45
46
 
47
+ attr_accessor region: TerminalShop::Models::ViewInitResponse::Data::region
48
+
46
49
  attr_accessor subscriptions: ::Array[TerminalShop::Models::SubscriptionAPI]
47
50
 
48
51
  attr_accessor tokens: ::Array[TerminalShop::Models::TokenAPI]
@@ -56,6 +59,7 @@ module TerminalShop
56
59
  orders: ::Array[TerminalShop::Models::OrderAPI],
57
60
  products: ::Array[TerminalShop::Models::ProductAPI],
58
61
  profile: TerminalShop::Models::ProfileAPI,
62
+ region: TerminalShop::Models::ViewInitResponse::Data::region,
59
63
  subscriptions: ::Array[TerminalShop::Models::SubscriptionAPI],
60
64
  tokens: ::Array[TerminalShop::Models::TokenAPI]
61
65
  ) -> void
@@ -65,6 +69,15 @@ module TerminalShop
65
69
  ) -> void
66
70
 
67
71
  def to_hash: -> TerminalShop::Models::ViewInitResponse::data
72
+
73
+ type region = :na | :eu
74
+
75
+ class Region < TerminalShop::Enum
76
+ NA: :na
77
+ EU: :eu
78
+
79
+ def self.values: -> ::Array[TerminalShop::Models::ViewInitResponse::Data::region]
80
+ end
68
81
  end
69
82
  end
70
83
  end
@@ -1,3 +1,3 @@
1
1
  module TerminalShop
2
- VERSION: "1.3.0"
2
+ VERSION: "1.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terminal-shop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terminal