khipu-chaski-api-client 1.0.0 → 1.0.9

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
  SHA1:
3
- metadata.gz: 9045d480f192313e4da1c6d3d4cffce495251c28
4
- data.tar.gz: 71bcd4701100a22be2c648e735ae324447364c40
3
+ metadata.gz: 5f26aef6114250fe8ae95265c05a4092a0e5cef3
4
+ data.tar.gz: 3d2b0ad49fc29c0c5c9cf94b9fc8fa6e1e9b4145
5
5
  SHA512:
6
- metadata.gz: fbefd415aa93a4c919a52b407c9aee087a4b9063e80372e52808145c692e4a5e9049e833c51c75ce30766bfcbb8506d00b07d53aea45a482a4b090c2e87ca96c
7
- data.tar.gz: ed66f1eb3016669f5f2a5305b604c4225db302ae330fc96797a8433100bb4d28fe34ee72d34711aa5df283269fec6854efd35ae0fdb02231f363c014ea19092c
6
+ metadata.gz: 1823df4f2a06abde46de223bef90e6da95f0eb4b241cece715353dd7d74c363174e405691d129a297e2a06dd1068bb6efdecdd8866cab106262c2ac3a9418e5b
7
+ data.tar.gz: f4fe8d0c5fa80beb06a6026065367c559616d8625ed52225ce0de6d2394f4410cff07ef63504bf70bb7f8e49c1a25b3059274c74f8f50ac35f739478b21ff7cd
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["khipu"]
10
10
  s.email = ["developers@khipu.com"]
11
- s.homepage = "https://github.com/khipu/khipu-chaski-api-ruby-client"
12
- s.summary = %q{A ruby wrapper for the khipu chaski APIs}
11
+ s.homepage = "https://github.com/khipu/khipu-api-ruby-client"
12
+ s.summary = %q{A ruby wrapper for the khipu APIs}
13
13
  s.description = %q{This gem maps to a swagger API}
14
14
  s.license = "Apache-2.0"
15
15
 
@@ -9,8 +9,15 @@ require 'khipu-chaski-api-client/models/base_object'
9
9
  require 'khipu-chaski-api-client/models/success_response'
10
10
  require 'khipu-chaski-api-client/models/authorization_error'
11
11
  require 'khipu-chaski-api-client/models/service_error'
12
+ require 'khipu-chaski-api-client/models/device'
13
+ require 'khipu-chaski-api-client/models/message'
14
+ require 'khipu-chaski-api-client/models/msg_property'
15
+ require 'khipu-chaski-api-client/models/device_list'
12
16
 
13
17
  # APIs
18
+ require 'khipu-chaski-api-client/api/device_registry_list_api'
19
+ require 'khipu-chaski-api-client/api/device_registry_api'
20
+ require 'khipu-chaski-api-client/api/recipient_registry_list_api'
14
21
  require 'khipu-chaski-api-client/api/push_notifications_api'
15
22
 
16
23
  module KhipuChaski
@@ -0,0 +1,227 @@
1
+ require "uri"
2
+
3
+ module KhipuChaski
4
+ class DeviceRegistryApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = nil)
8
+ @api_client = api_client || Configuration.api_client
9
+ end
10
+
11
+ # Registro de dispositivo
12
+ # Registra un dispositivo identificado por su tokenId
13
+ # @param device Dispositivo a registrar
14
+ # @param [Hash] opts the optional parameters
15
+ # @return [SuccessResponse]
16
+ def add_device(device, opts = {})
17
+ if Configuration.debugging
18
+ Configuration.logger.debug "Calling API: DeviceRegistryApi#add_device ..."
19
+ end
20
+
21
+ # verify the required parameter 'device' is set
22
+ fail "Missing the required parameter 'device' when calling add_device" if device.nil?
23
+
24
+ # resource path
25
+ path = "/devices".sub('{format}','json')
26
+
27
+ # query parameters
28
+ query_params = {}
29
+
30
+ # header parameters
31
+ header_params = {}
32
+
33
+ # HTTP header 'Accept' (if needed)
34
+ _header_accept = ['application/json']
35
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
36
+
37
+ # HTTP header 'Content-Type'
38
+ _header_content_type = ['application/json']
39
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
40
+
41
+ # form parameters
42
+ form_params = {}
43
+
44
+ # http body (model)
45
+ post_body = @api_client.object_to_http_body(device)
46
+
47
+
48
+ auth_names = ['khipu']
49
+ result = @api_client.call_api(:POST, path,
50
+ :header_params => header_params,
51
+ :query_params => query_params,
52
+ :form_params => form_params,
53
+ :body => post_body,
54
+ :auth_names => auth_names,
55
+ :return_type => 'SuccessResponse')
56
+ if Configuration.debugging
57
+ Configuration.logger.debug "API called: DeviceRegistryApi#add_device. Result: #{result.inspect}"
58
+ end
59
+ return result
60
+ end
61
+
62
+ # Obtiene dispositivo
63
+ # Obtiene la informacion de un dispositivo especifico
64
+ # @param token_id Token que identifica al dispositivo. Tiene la forma <platform>:<registryId>, donde platform puede tomar los valores \"and\" o \"ios\".
65
+ # @param [Hash] opts the optional parameters
66
+ # @return [Device]
67
+ def get_device(token_id, opts = {})
68
+ if Configuration.debugging
69
+ Configuration.logger.debug "Calling API: DeviceRegistryApi#get_device ..."
70
+ end
71
+
72
+ # verify the required parameter 'token_id' is set
73
+ fail "Missing the required parameter 'token_id' when calling get_device" if token_id.nil?
74
+
75
+ # resource path
76
+ path = "/devices/{tokenId}".sub('{format}','json').sub('{' + 'tokenId' + '}', token_id.to_s)
77
+
78
+ # query parameters
79
+ query_params = {}
80
+
81
+ # header parameters
82
+ header_params = {}
83
+
84
+ # HTTP header 'Accept' (if needed)
85
+ _header_accept = ['application/json']
86
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
87
+
88
+ # HTTP header 'Content-Type'
89
+ _header_content_type = ['application/json']
90
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
91
+
92
+ # form parameters
93
+ form_params = {}
94
+
95
+ # http body (model)
96
+ post_body = nil
97
+
98
+
99
+ auth_names = ['khipu']
100
+ result = @api_client.call_api(:GET, path,
101
+ :header_params => header_params,
102
+ :query_params => query_params,
103
+ :form_params => form_params,
104
+ :body => post_body,
105
+ :auth_names => auth_names,
106
+ :return_type => 'Device')
107
+ if Configuration.debugging
108
+ Configuration.logger.debug "API called: DeviceRegistryApi#get_device. Result: #{result.inspect}"
109
+ end
110
+ return result
111
+ end
112
+
113
+ # Agregar receptor
114
+ # Agregar receptor de un dispositivo especifico
115
+ # @param token_id Token que identifica al dispositivo. Tiene la forma <platform>:<registryId>, donde platform puede tomar los valores \"and\" o \"ios\".
116
+ # @param recipient_id Identificador asociado a un receptor de mensajes push
117
+ # @param [Hash] opts the optional parameters
118
+ # @return [SuccessResponse]
119
+ def add_device_recipient(token_id, recipient_id, opts = {})
120
+ if Configuration.debugging
121
+ Configuration.logger.debug "Calling API: DeviceRegistryApi#add_device_recipient ..."
122
+ end
123
+
124
+ # verify the required parameter 'token_id' is set
125
+ fail "Missing the required parameter 'token_id' when calling add_device_recipient" if token_id.nil?
126
+
127
+ # verify the required parameter 'recipient_id' is set
128
+ fail "Missing the required parameter 'recipient_id' when calling add_device_recipient" if recipient_id.nil?
129
+
130
+ # resource path
131
+ path = "/devices/{tokenId}/recipients/{recipientId}".sub('{format}','json').sub('{' + 'tokenId' + '}', token_id.to_s).sub('{' + 'recipientId' + '}', recipient_id.to_s)
132
+
133
+ # query parameters
134
+ query_params = {}
135
+
136
+ # header parameters
137
+ header_params = {}
138
+
139
+ # HTTP header 'Accept' (if needed)
140
+ _header_accept = ['application/json']
141
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
142
+
143
+ # HTTP header 'Content-Type'
144
+ _header_content_type = ['application/json']
145
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
146
+
147
+ # form parameters
148
+ form_params = {}
149
+
150
+ # http body (model)
151
+ post_body = nil
152
+
153
+
154
+ auth_names = ['khipu']
155
+ result = @api_client.call_api(:POST, path,
156
+ :header_params => header_params,
157
+ :query_params => query_params,
158
+ :form_params => form_params,
159
+ :body => post_body,
160
+ :auth_names => auth_names,
161
+ :return_type => 'SuccessResponse')
162
+ if Configuration.debugging
163
+ Configuration.logger.debug "API called: DeviceRegistryApi#add_device_recipient. Result: #{result.inspect}"
164
+ end
165
+ return result
166
+ end
167
+
168
+ # Elimina receptor
169
+ # Elimina receptor de un dispositivo especifico
170
+ # @param token_id Token que identifica al dispositivo. Tiene la forma <platform>:<registryId>, donde platform puede tomar los valores \"and\" o \"ios\".
171
+ # @param recipient_id Identificador asociado a un receptor de mensajes push
172
+ # @param [Hash] opts the optional parameters
173
+ # @return [SuccessResponse]
174
+ def remove_device_recipient(token_id, recipient_id, opts = {})
175
+ if Configuration.debugging
176
+ Configuration.logger.debug "Calling API: DeviceRegistryApi#remove_device_recipient ..."
177
+ end
178
+
179
+ # verify the required parameter 'token_id' is set
180
+ fail "Missing the required parameter 'token_id' when calling remove_device_recipient" if token_id.nil?
181
+
182
+ # verify the required parameter 'recipient_id' is set
183
+ fail "Missing the required parameter 'recipient_id' when calling remove_device_recipient" if recipient_id.nil?
184
+
185
+ # resource path
186
+ path = "/devices/{tokenId}/recipients/{recipientId}".sub('{format}','json').sub('{' + 'tokenId' + '}', token_id.to_s).sub('{' + 'recipientId' + '}', recipient_id.to_s)
187
+
188
+ # query parameters
189
+ query_params = {}
190
+
191
+ # header parameters
192
+ header_params = {}
193
+
194
+ # HTTP header 'Accept' (if needed)
195
+ _header_accept = ['application/json']
196
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
197
+
198
+ # HTTP header 'Content-Type'
199
+ _header_content_type = ['application/json']
200
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
201
+
202
+ # form parameters
203
+ form_params = {}
204
+
205
+ # http body (model)
206
+ post_body = nil
207
+
208
+
209
+ auth_names = ['khipu']
210
+ result = @api_client.call_api(:DELETE, path,
211
+ :header_params => header_params,
212
+ :query_params => query_params,
213
+ :form_params => form_params,
214
+ :body => post_body,
215
+ :auth_names => auth_names,
216
+ :return_type => 'SuccessResponse')
217
+ if Configuration.debugging
218
+ Configuration.logger.debug "API called: DeviceRegistryApi#remove_device_recipient. Result: #{result.inspect}"
219
+ end
220
+ return result
221
+ end
222
+ end
223
+ end
224
+
225
+
226
+
227
+
@@ -0,0 +1,113 @@
1
+ require "uri"
2
+
3
+ module KhipuChaski
4
+ class DeviceRegistryListApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = nil)
8
+ @api_client = api_client || Configuration.api_client
9
+ end
10
+
11
+ # Lista de dispositivos
12
+ # Obtiene la lista de dispositivos registrados
13
+ # @param [Hash] opts the optional parameters
14
+ # @return [DeviceList]
15
+ def get_devices(opts = {})
16
+ if Configuration.debugging
17
+ Configuration.logger.debug "Calling API: DeviceRegistryListApi#get_devices ..."
18
+ end
19
+
20
+ # resource path
21
+ path = "/devices".sub('{format}','json')
22
+
23
+ # query parameters
24
+ query_params = {}
25
+
26
+ # header parameters
27
+ header_params = {}
28
+
29
+ # HTTP header 'Accept' (if needed)
30
+ _header_accept = ['application/json']
31
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
32
+
33
+ # HTTP header 'Content-Type'
34
+ _header_content_type = ['application/x-www-form-urlencoded']
35
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
36
+
37
+ # form parameters
38
+ form_params = {}
39
+
40
+ # http body (model)
41
+ post_body = nil
42
+
43
+
44
+ auth_names = ['khipu']
45
+ result = @api_client.call_api(:GET, path,
46
+ :header_params => header_params,
47
+ :query_params => query_params,
48
+ :form_params => form_params,
49
+ :body => post_body,
50
+ :auth_names => auth_names,
51
+ :return_type => 'DeviceList')
52
+ if Configuration.debugging
53
+ Configuration.logger.debug "API called: DeviceRegistryListApi#get_devices. Result: #{result.inspect}"
54
+ end
55
+ return result
56
+ end
57
+
58
+ # Lista de dispositivos asociados a un id de receptor
59
+ # Obtiene la lista de dispositivos asociados a un receptor
60
+ # @param recipient_id Identificador asociado a un receptor de mensajes push
61
+ # @param [Hash] opts the optional parameters
62
+ # @return [DeviceList]
63
+ def get_recipient_devices(recipient_id, opts = {})
64
+ if Configuration.debugging
65
+ Configuration.logger.debug "Calling API: DeviceRegistryListApi#get_recipient_devices ..."
66
+ end
67
+
68
+ # verify the required parameter 'recipient_id' is set
69
+ fail "Missing the required parameter 'recipient_id' when calling get_recipient_devices" if recipient_id.nil?
70
+
71
+ # resource path
72
+ path = "/recipients/{recipientId}/devices".sub('{format}','json').sub('{' + 'recipientId' + '}', recipient_id.to_s)
73
+
74
+ # query parameters
75
+ query_params = {}
76
+
77
+ # header parameters
78
+ header_params = {}
79
+
80
+ # HTTP header 'Accept' (if needed)
81
+ _header_accept = ['application/json']
82
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
83
+
84
+ # HTTP header 'Content-Type'
85
+ _header_content_type = ['application/x-www-form-urlencoded']
86
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
87
+
88
+ # form parameters
89
+ form_params = {}
90
+
91
+ # http body (model)
92
+ post_body = nil
93
+
94
+
95
+ auth_names = ['khipu']
96
+ result = @api_client.call_api(:GET, path,
97
+ :header_params => header_params,
98
+ :query_params => query_params,
99
+ :form_params => form_params,
100
+ :body => post_body,
101
+ :auth_names => auth_names,
102
+ :return_type => 'DeviceList')
103
+ if Configuration.debugging
104
+ Configuration.logger.debug "API called: DeviceRegistryListApi#get_recipient_devices. Result: #{result.inspect}"
105
+ end
106
+ return result
107
+ end
108
+ end
109
+ end
110
+
111
+
112
+
113
+
@@ -10,27 +10,19 @@ module KhipuChaski
10
10
 
11
11
  # Enviar un nuevo mensaje
12
12
  # Encolar un nuevo mensaje para dispositivos moviles.
13
- # @param recipient_id_set Receptores del mensaje
14
- # @param subject Asunto del mensaje
15
- # @param body cuerpo del mensaje
13
+ # @param message Mensaje a enviar
16
14
  # @param [Hash] opts the optional parameters
17
15
  # @return [SuccessResponse]
18
- def msg_post(recipient_id_set, subject, body, opts = {})
16
+ def send_message(message, opts = {})
19
17
  if Configuration.debugging
20
- Configuration.logger.debug "Calling API: PushNotificationsApi#msg_post ..."
18
+ Configuration.logger.debug "Calling API: PushNotificationsApi#send_message ..."
21
19
  end
22
20
 
23
- # verify the required parameter 'recipient_id_set' is set
24
- fail "Missing the required parameter 'recipient_id_set' when calling msg_post" if recipient_id_set.nil?
25
-
26
- # verify the required parameter 'subject' is set
27
- fail "Missing the required parameter 'subject' when calling msg_post" if subject.nil?
28
-
29
- # verify the required parameter 'body' is set
30
- fail "Missing the required parameter 'body' when calling msg_post" if body.nil?
21
+ # verify the required parameter 'message' is set
22
+ fail "Missing the required parameter 'message' when calling send_message" if message.nil?
31
23
 
32
24
  # resource path
33
- path = "/msg".sub('{format}','json')
25
+ path = "/message".sub('{format}','json')
34
26
 
35
27
  # query parameters
36
28
  query_params = {}
@@ -43,17 +35,14 @@ module KhipuChaski
43
35
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
44
36
 
45
37
  # HTTP header 'Content-Type'
46
- _header_content_type = ['application/x-www-form-urlencoded']
38
+ _header_content_type = ['application/json']
47
39
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
48
40
 
49
41
  # form parameters
50
42
  form_params = {}
51
- form_params["recipientIdSet"] = recipient_id_set
52
- form_params["subject"] = subject
53
- form_params["body"] = body
54
43
 
55
44
  # http body (model)
56
- post_body = nil
45
+ post_body = @api_client.object_to_http_body(message)
57
46
 
58
47
 
59
48
  auth_names = ['khipu']
@@ -65,7 +54,7 @@ module KhipuChaski
65
54
  :auth_names => auth_names,
66
55
  :return_type => 'SuccessResponse')
67
56
  if Configuration.debugging
68
- Configuration.logger.debug "API called: PushNotificationsApi#msg_post. Result: #{result.inspect}"
57
+ Configuration.logger.debug "API called: PushNotificationsApi#send_message. Result: #{result.inspect}"
69
58
  end
70
59
  return result
71
60
  end
@@ -0,0 +1,62 @@
1
+ require "uri"
2
+
3
+ module KhipuChaski
4
+ class RecipientRegistryListApi
5
+ attr_accessor :api_client
6
+
7
+ def initialize(api_client = nil)
8
+ @api_client = api_client || Configuration.api_client
9
+ end
10
+
11
+ # Lista de receptores de asociados a la aplicacion
12
+ # Obtiene la lista de receptores asociados a la aplicacion
13
+ # @param [Hash] opts the optional parameters
14
+ # @return [Array<String>]
15
+ def get_recipients(opts = {})
16
+ if Configuration.debugging
17
+ Configuration.logger.debug "Calling API: RecipientRegistryListApi#get_recipients ..."
18
+ end
19
+
20
+ # resource path
21
+ path = "/recipients".sub('{format}','json')
22
+
23
+ # query parameters
24
+ query_params = {}
25
+
26
+ # header parameters
27
+ header_params = {}
28
+
29
+ # HTTP header 'Accept' (if needed)
30
+ _header_accept = ['application/json']
31
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
32
+
33
+ # HTTP header 'Content-Type'
34
+ _header_content_type = ['application/x-www-form-urlencoded']
35
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
36
+
37
+ # form parameters
38
+ form_params = {}
39
+
40
+ # http body (model)
41
+ post_body = nil
42
+
43
+
44
+ auth_names = ['khipu']
45
+ result = @api_client.call_api(:GET, path,
46
+ :header_params => header_params,
47
+ :query_params => query_params,
48
+ :form_params => form_params,
49
+ :body => post_body,
50
+ :auth_names => auth_names,
51
+ :return_type => 'Array<String>')
52
+ if Configuration.debugging
53
+ Configuration.logger.debug "API called: RecipientRegistryListApi#get_recipients. Result: #{result.inspect}"
54
+ end
55
+ return result
56
+ end
57
+ end
58
+ end
59
+
60
+
61
+
62
+
@@ -65,7 +65,7 @@ module KhipuChaski
65
65
  form_params = opts[:form_params] || {}
66
66
 
67
67
 
68
- update_params_for_auth! @host, path, http_method, header_params, query_params, form_params, opts[:auth_names]
68
+ update_params_for_auth! @host, path, http_method, header_params, query_params, form_params, opts[:auth_names], opts[:body]
69
69
 
70
70
 
71
71
  req_opts = {
@@ -209,7 +209,7 @@ module KhipuChaski
209
209
  end
210
210
 
211
211
  # Update hearder and query params based on authentication settings.
212
- def update_params_for_auth!(host, path, http_method, header_params, query_params, form_params, auth_names)
212
+ def update_params_for_auth!(host, path, http_method, header_params, query_params, form_params, auth_names, body)
213
213
  Array(auth_names).each do |auth_name|
214
214
  if auth_name == "khipu"
215
215
  params = query_params.merge(form_params)
@@ -224,7 +224,9 @@ module KhipuChaski
224
224
  encoded.keys.sort.each do |key|
225
225
  to_sign += "&#{key}=" + encoded[key]
226
226
  end
227
-
227
+ if !body.nil? && header_params['Content-Type']=='application/json'
228
+ to_sign += "&" + body
229
+ end
228
230
  if Configuration.debugging
229
231
  Configuration.logger.debug "encoded params: #{encoded}"
230
232
  Configuration.logger.debug "string to sign: #{to_sign}"
@@ -60,7 +60,8 @@ module KhipuChaski
60
60
  # return the object in the form of hash
61
61
  def to_hash
62
62
  hash = {}
63
- self.class.attribute_map.each_pair do |attr, param|
63
+ attributes = self.class.attribute_map.sort_by {|key,value| key}
64
+ attributes.each { |attr, param|
64
65
  value = self.send(attr)
65
66
  next if value.nil?
66
67
  if value.is_a?(Array)
@@ -68,7 +69,7 @@ module KhipuChaski
68
69
  else
69
70
  hash[param] = _to_hash(value)
70
71
  end
71
- end
72
+ }
72
73
  hash
73
74
  end
74
75
 
@@ -0,0 +1,55 @@
1
+ module KhipuChaski
2
+ #
3
+ class Device < BaseObject
4
+ attr_accessor :token_id, :recipients, :extra_data
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # token para notificaciones asociado al dispositivo. Tiene la forma &lt;platform&gt;:&lt;registryId&gt;, donde platform puede tomar los valores \&quot;and\&quot; o \&quot;ios\&quot;.
10
+ :'token_id' => :'tokenId',
11
+
12
+ # Lista de receptores asociados al dispositivo
13
+ :'recipients' => :'recipients',
14
+
15
+ # informacion adicional del dispositivo
16
+ :'extra_data' => :'extraData'
17
+
18
+ }
19
+ end
20
+
21
+ # attribute type
22
+ def self.swagger_types
23
+ {
24
+ :'token_id' => :'String',
25
+ :'recipients' => :'Array<String>',
26
+ :'extra_data' => :'String'
27
+
28
+ }
29
+ end
30
+
31
+ def initialize(attributes = {})
32
+ return if !attributes.is_a?(Hash) || attributes.empty?
33
+
34
+ # convert string to symbol for hash key
35
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
36
+
37
+
38
+ if attributes[:'tokenId']
39
+ self.token_id = attributes[:'tokenId']
40
+ end
41
+
42
+ if attributes[:'recipients']
43
+ if (value = attributes[:'recipients']).is_a?(Array)
44
+ self.recipients = value
45
+ end
46
+ end
47
+
48
+ if attributes[:'extraData']
49
+ self.extra_data = attributes[:'extraData']
50
+ end
51
+
52
+ end
53
+
54
+ end
55
+ end
@@ -0,0 +1,29 @@
1
+ module KhipuChaski
2
+ #
3
+ class DeviceList < BaseObject
4
+ attr_accessor
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ }
10
+ end
11
+
12
+ # attribute type
13
+ def self.swagger_types
14
+ {
15
+
16
+ }
17
+ end
18
+
19
+ def initialize(attributes = {})
20
+ return if !attributes.is_a?(Hash) || attributes.empty?
21
+
22
+ # convert string to symbol for hash key
23
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
24
+
25
+
26
+ end
27
+
28
+ end
29
+ end
@@ -0,0 +1,65 @@
1
+ module KhipuChaski
2
+ #
3
+ class Message < BaseObject
4
+ attr_accessor :subject, :recipient_id_set, :body, :msg_properties
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # Asunto de mensaje
10
+ :'subject' => :'subject',
11
+
12
+ # Lista de identificadores de receptores del mensaje
13
+ :'recipient_id_set' => :'recipientIdSet',
14
+
15
+ # Cuerpo del mensaje
16
+ :'body' => :'body',
17
+
18
+ # Lista de propiedades del mensaje
19
+ :'msg_properties' => :'msgProperties'
20
+
21
+ }
22
+ end
23
+
24
+ # attribute type
25
+ def self.swagger_types
26
+ {
27
+ :'subject' => :'String',
28
+ :'recipient_id_set' => :'Array<String>',
29
+ :'body' => :'String',
30
+ :'msg_properties' => :'Array<MsgProperty>'
31
+
32
+ }
33
+ end
34
+
35
+ def initialize(attributes = {})
36
+ return if !attributes.is_a?(Hash) || attributes.empty?
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
40
+
41
+
42
+ if attributes[:'subject']
43
+ self.subject = attributes[:'subject']
44
+ end
45
+
46
+ if attributes[:'recipientIdSet']
47
+ if (value = attributes[:'recipientIdSet']).is_a?(Array)
48
+ self.recipient_id_set = value
49
+ end
50
+ end
51
+
52
+ if attributes[:'body']
53
+ self.body = attributes[:'body']
54
+ end
55
+
56
+ if attributes[:'msgProperties']
57
+ if (value = attributes[:'msgProperties']).is_a?(Array)
58
+ self.msg_properties = value
59
+ end
60
+ end
61
+
62
+ end
63
+
64
+ end
65
+ end
@@ -0,0 +1,45 @@
1
+ module KhipuChaski
2
+ #
3
+ class MsgProperty < BaseObject
4
+ attr_accessor :key, :value
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # nombre de la propiedad
10
+ :'key' => :'key',
11
+
12
+ # valor de la propiedad
13
+ :'value' => :'value'
14
+
15
+ }
16
+ end
17
+
18
+ # attribute type
19
+ def self.swagger_types
20
+ {
21
+ :'key' => :'String',
22
+ :'value' => :'String'
23
+
24
+ }
25
+ end
26
+
27
+ def initialize(attributes = {})
28
+ return if !attributes.is_a?(Hash) || attributes.empty?
29
+
30
+ # convert string to symbol for hash key
31
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
32
+
33
+
34
+ if attributes[:'key']
35
+ self.key = attributes[:'key']
36
+ end
37
+
38
+ if attributes[:'value']
39
+ self.value = attributes[:'value']
40
+ end
41
+
42
+ end
43
+
44
+ end
45
+ end
@@ -1,3 +1,3 @@
1
1
  module KhipuChaski
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: khipu-chaski-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - khipu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-13 00:00:00.000000000 Z
11
+ date: 2019-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -201,16 +201,23 @@ files:
201
201
  - README.md
202
202
  - khipu-chaski-api-client.gemspec
203
203
  - lib/khipu-chaski-api-client.rb
204
+ - lib/khipu-chaski-api-client/api/device_registry_api.rb
205
+ - lib/khipu-chaski-api-client/api/device_registry_list_api.rb
204
206
  - lib/khipu-chaski-api-client/api/push_notifications_api.rb
207
+ - lib/khipu-chaski-api-client/api/recipient_registry_list_api.rb
205
208
  - lib/khipu-chaski-api-client/api_client.rb
206
209
  - lib/khipu-chaski-api-client/api_error.rb
207
210
  - lib/khipu-chaski-api-client/configuration.rb
208
211
  - lib/khipu-chaski-api-client/models/authorization_error.rb
209
212
  - lib/khipu-chaski-api-client/models/base_object.rb
213
+ - lib/khipu-chaski-api-client/models/device.rb
214
+ - lib/khipu-chaski-api-client/models/device_list.rb
215
+ - lib/khipu-chaski-api-client/models/message.rb
216
+ - lib/khipu-chaski-api-client/models/msg_property.rb
210
217
  - lib/khipu-chaski-api-client/models/service_error.rb
211
218
  - lib/khipu-chaski-api-client/models/success_response.rb
212
219
  - lib/khipu-chaski-api-client/version.rb
213
- homepage: https://github.com/khipu/khipu-chaski-api-ruby-client
220
+ homepage: https://github.com/khipu/khipu-api-ruby-client
214
221
  licenses:
215
222
  - Apache-2.0
216
223
  metadata: {}
@@ -233,5 +240,5 @@ rubyforge_project:
233
240
  rubygems_version: 2.5.2.1
234
241
  signing_key:
235
242
  specification_version: 4
236
- summary: A ruby wrapper for the khipu chaski APIs
243
+ summary: A ruby wrapper for the khipu APIs
237
244
  test_files: []